CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/EmcRec/EmcRec-01-02-52/EmcRec/EmcRecParameter.h
Go to the documentation of this file.
1//
2// Parameters for Emc Reconstruction
3//
4// No Parameter is allowed to be hard coded into code!
5//
6// Created by Zhe Wang, May 31, 2004
7//
8#ifndef EMC_REC_PARAMETER_A_H
9#define EMC_REC_PARAMETER_A_H
10#include <pthread.h>
11#include <iostream>
12#include <vector>
13
14using namespace std;
15
16class TGraph2DErrors;
17
19{
20 private:
21 // Constructors and destructors
24
25 public:
26 //static member functions
28 static bool Exist();
29 static void Kill();
30 static void lock(){
31 if(pthread_mutex_lock(&m_pthread_lock) != 0){
32 std::cerr << "LOCK MUTEX_LOCK @ GZFSSTREAM" << std::endl;
33 }
34 };
35 static void unlock(){
36 if(pthread_mutex_unlock(&m_pthread_lock) != 0){
37 std::cerr << "UNLOCK MUTEX_LOCK @ GZFSSTREAM" << std::endl;
38 }
39 };
40
41
42
43 private:
44 //static data members
45 static EmcRecParameter* fpInstance;
46 static pthread_mutex_t m_pthread_lock;
47
48
49 public:
50 //access to each parameter
51 double ElectronicsNoiseLevel() const;
52 double EThresholdSeed() const;
53 double EThresholdCluster() const;
54 double LogPosOffset() const;
55
56 double TimeMin() const;
57 double TimeMax() const;
58 double MoliereRadius() const;
59 double LateralProfile() const;
60
61 double ECorr(int n) const;
62 double SigE(int n) const;
63 double SigTheta(int n) const;
64 double SigPhi(int n) const;
65
66 double HitNb(int n) const;
67 double ElecBias(int n) const;
68 double SmCut(int n) const;
69
70 double Peak(int n) const;
71
72 inline bool DigiCalib() const { return digiCalib; }
73 inline void SetDigiCalib(bool digi) { digiCalib=digi; }
74
75 inline void SetTimeMin(double min) { fTimeMin=min; }
76 inline void SetTimeMax(double max) { fTimeMax=max; }
77
78 inline void SetPeak(double e, int n) { peak[n]=e; }
79
80 inline std::string PositionMode1() const { return positionMode1; }
81 inline std::string PositionMode2() const { return positionMode2; }
82 void SetPositionMode(std::vector<std::string>& mode);
83
84 double ECorrMC(double eg, double theid) const;
85 double ErrMC(double eg, double theid) const;
86
87 private:
88 //each parameter
89 // ElectronicsNoiseLevel
90 double fElectronicsNoiseLevel;
91 // Energy threshold for seed search
92 double fEThresholdSeed;
93 // Energy threshold for cluster search
94 double fEThresholdCluster;
95 // LogPosOffset
96 double fLogPosOffset;
97
98 // Time window left
99 double fTimeMin;
100 // Time window right
101 double fTimeMax;
102 // Moliere radius
103 double fMoliereRadius;
104 // Lateral profile
105 double fLateralProfile;
106
107 // Energy correction
108 double eCorr[4];
109 // Energy error
110 double sigE[3];
111 // Theta error
112 double sigTheta[2];
113 // Phi error
114 double sigPhi[2];
115
116 // Hit number
117 double hitNb[3];
118 // Correction of electronics bias
119 double elecBias[5];
120 // Cluster splitting cut with second moment
121 double smCut[4];
122
123 // Digi calibration
124 bool digiCalib;
125
126 // Shower energy correction VS theta
127 double peak[56];
128
129 std::string positionMode1;
130 std::string positionMode2;
131
132 // Shower energy correction
133 TGraph2DErrors *dt;
134 // Energy error
135 TGraph2DErrors *dtErr;
136};
137
138#endif // EMC_REC_PARAMETER_A_H
139
const Int_t n
double LogPosOffset() const
double ECorr(int n) const
double SigE(int n) const
void SetPositionMode(std::vector< std::string > &mode)
double ECorrMC(double eg, double theid) const
static void Kill()
double EThresholdCluster() const
double EThresholdSeed() const
double HitNb(int n) const
double ElectronicsNoiseLevel() const
double LateralProfile() const
double SigTheta(int n) const
double TimeMax() const
double ElecBias(int n) const
static EmcRecParameter & GetInstance()
double MoliereRadius() const
double TimeMin() const
static bool Exist()
double SmCut(int n) const
double SigPhi(int n) const
double Peak(int n) const
double ErrMC(double eg, double theid) const