FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
PndEmcDigiCalibrator Class Reference

#include <PndEmcDigiCalibrator.h>

Public Member Functions

 PndEmcDigiCalibrator ()
 
virtual ~PndEmcDigiCalibrator ()
 
Double_t CalibrationEvtTimeByDigi (PndEmcDigi *theDigi, bool PrintOut=kFALSE) const
 
Double_t CalibrationEvtTimeByBump (PndEmcBump *theBump, bool PrintOut=kFALSE) const
 
Double_t GetTimeResolutionOfDigi (PndEmcDigi *theDigi) const
 
Double_t GetTimeResolutionOfShower (PndEmcBump *theBump) const
 

Private Member Functions

Int_t GetIdxByEnergy (Double_t energy) const
 
Int_t GetIdxByEnergyForBump (Double_t energy) const
 
 PndEmcDigiCalibrator (const PndEmcDigiCalibrator &L)
 
PndEmcDigiCalibratoroperator= (const PndEmcDigiCalibrator &)
 

Private Attributes

TVectorD CoeffMod3
 
TVectorD CoeffMod5
 
TVectorD CoeffModo
 
TVectorD CoeffMod3A
 
TVectorD CoeffMod5A
 
TVectorD CoeffModoA
 
TVectorD CoeffMod3B
 
TVectorD CoeffMod5B
 
TVectorD CoeffModoB
 

Static Private Attributes

static Double_t fTimeWindowOfDigi [5][17]
 
static Double_t fTimeWindowOfShower [5][20]
 

Detailed Description

Definition at line 29 of file PndEmcDigiCalibrator.h.

Constructor & Destructor Documentation

PndEmcDigiCalibrator::PndEmcDigiCalibrator ( )

Definition at line 58 of file PndEmcDigiCalibrator.cxx.

References CoeffMod3, CoeffMod3A, CoeffMod3B, CoeffMod5, CoeffMod5A, CoeffMod5B, CoeffModo, CoeffModoA, and CoeffModoB.

59 {
60  //digi coefficients
61  //shashylik
62  CoeffMod5.ResizeTo(6);
63  CoeffMod5[0] = 41.636;
64  CoeffMod5[1] = 0.0532;
65  CoeffMod5[2] = 0.0277;
66  CoeffMod5[3] = 0.0097;
67  CoeffMod5[4] = -7.576e-5;
68  CoeffMod5[5] = 1.6053e-7;
69  //forward
70  CoeffMod3.ResizeTo(6);
71  CoeffMod3[0] = 130.996;
72  CoeffMod3[1] = 0.00135;
73  CoeffMod3[2] = 0.32456;
74  CoeffMod3[3] = -0.0295;
75  CoeffMod3[4] = -3.0491e-6;
76  CoeffMod3[5] = 1.93008e-7;
77  //other parts
78  //barrel mod == 1, 2, backward mod = 4
79  CoeffModo.ResizeTo(6);
80  CoeffModo[0] = 246.223;
81  CoeffModo[1] = 0.03520;
82  CoeffModo[2] = -0.1207;
83  CoeffModo[3] = 0.04283;
84  CoeffModo[4] = -0.0002;
85  CoeffModo[5]= 1.25472e-6;
86  //bump coefficients, for numofdigi>3
87  CoeffMod5A.ResizeTo(6);
88  CoeffMod5A[0] = 52.221;
89  CoeffMod5A[1] = 0.0408;
90  CoeffMod5A[2] = -0.5354;
91  CoeffMod5A[3] = 0.1821;
92  CoeffMod5A[4] = -9.337e-3;
93  CoeffMod5A[5] = 2.8338e-4;
94  //forward
95  CoeffMod3A.ResizeTo(6);
96  CoeffMod3A[0] = 131.428;
97  CoeffMod3A[1] = 0.01073;
98  CoeffMod3A[2] = -3.2207;
99  CoeffMod3A[3] = 1.2828;
100  CoeffMod3A[4] = -3.3757e-2;
101  CoeffMod3A[5] = 3.33785e-4;
102  //other parts
103  //barrel mod == 1, 2, backward mod = 4
104  CoeffModoA.ResizeTo(6);
105  CoeffModoA[0] = 246.536;
106  CoeffModoA[1] = 0.03316;
107  CoeffModoA[2] = -0.6604;
108  CoeffModoA[3] = 0.29184;
109  CoeffModoA[4] = -0.0076;
110  CoeffModoA[5]= 1.52179e-4;
111 //for bumps numofdigi<=3
112  CoeffMod5B.ResizeTo(6);
113  CoeffMod5B[0] = 44.206;
114  CoeffMod5B[1] = 0.0504;
115  CoeffMod5B[2] = -0.140;
116  CoeffMod5B[3] = 0.0225;
117  CoeffMod5B[4] = -9.603e-7;
118  CoeffMod5B[5] = -3.906e-7;
119  //forward
120  CoeffMod3B.ResizeTo(6);
121  CoeffMod3B[0] = 136.73;
122  CoeffMod3B[1] = -0.0359;
123  CoeffMod3B[2] = 1.9219;
124  CoeffMod3B[3] = -0.2218;
125  CoeffMod3B[4] = 7.4442e-4;
126  CoeffMod3B[5] = -1.16553e-6;
127  //other parts
128  //barrel mod == 1, 2, backward mod = 4
129  CoeffModoB.ResizeTo(6);
130  CoeffModoB[0] = 244.578;
131  CoeffModoB[1] = 0.04145;
132  CoeffModoB[2] = 0.34314;
133  CoeffModoB[3] = 0.02705;
134  CoeffModoB[4] = -2.6097e-4;
135  CoeffModoB[5] = 1.42555e-6;
136 
137 }
PndEmcDigiCalibrator::~PndEmcDigiCalibrator ( )
virtual

Definition at line 142 of file PndEmcDigiCalibrator.cxx.

143 {
144 }
PndEmcDigiCalibrator::PndEmcDigiCalibrator ( const PndEmcDigiCalibrator L)
private

Member Function Documentation

Double_t PndEmcDigiCalibrator::CalibrationEvtTimeByBump ( PndEmcBump theBump,
bool  PrintOut = kFALSE 
) const

Definition at line 183 of file PndEmcDigiCalibrator.cxx.

References CoeffMod3A, CoeffMod3B, CoeffMod5A, CoeffMod5B, CoeffModoA, CoeffModoB, Double_t, PndEmcCluster::energy(), PndEmcCluster::GetModule(), PndEmcCluster::NumberOfDigis(), CAMath::Sqrt(), and PndEmcCluster::where().

184 {
185  Double_t bumpT = theBump->GetTimeStamp();
186  Double_t bumpE = theBump->energy();
187  Int_t mod = theBump->GetModule();
188  Int_t nDigi = theBump->NumberOfDigis();
189  //Int_t detID = theDigi->GetDetectorId();
190  //PndEmcTwoCoordIndex* _tci = PndEmcMapper::Instance()->GetTCI(detID);
191  //PndEmcTciXtalMap& map = const_cast<PndEmcTciXtalMap&> ( PndEmcStructure::Instance()->GetTciXtalMap());
192  //TVector3 Where = PndEmcDigi::algPointer()(map.find(_tci)->second);
193  Double_t path = theBump->where().Mag();
194  //Double_t path = map[_tci]->frontCentre().Mag();
195 
196 
197  TVectorD vFunc(6);
198  vFunc[0]=1.;
199  vFunc[1]=path;
200  vFunc[2]=1./TMath::Sqrt(bumpE);
201  vFunc[3]=1./bumpE;
202  vFunc[4]=vFunc[3]*vFunc[3];
203  vFunc[5]=vFunc[4]*vFunc[3];
204 
205  Double_t corrT(0.);
206  //Int_t mod = detID/100000000;
207 
208  if(mod == 3){
209  if(nDigi > 3)
210  corrT = CoeffMod3A*vFunc;
211  else
212  corrT = CoeffMod3B*vFunc;
213  }else if( mod == 5){
214  if(nDigi > 3)
215  corrT = CoeffMod5A*vFunc;
216  else
217  corrT = CoeffMod5B*vFunc;
218  }else{
219  if(nDigi > 3)
220  corrT = CoeffModoA*vFunc;
221  else
222  corrT = CoeffModoB*vFunc;
223  }
224  if(PrintOut){
225  cout<<"path = "<<path<<", mod = "<<mod<<", corrT = "<<corrT<<endl;
226  }
227  return bumpT - corrT;
228 }
TVector3 where() const
Short_t GetModule() const
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
Double_t
Int_t NumberOfDigis() const
virtual Double_t energy() const
Double_t PndEmcDigiCalibrator::CalibrationEvtTimeByDigi ( PndEmcDigi theDigi,
bool  PrintOut = kFALSE 
) const

Definition at line 146 of file PndEmcDigiCalibrator.cxx.

References CoeffMod3, CoeffMod5, CoeffModo, Double_t, PndEmcDigi::GetEnergy(), PndEmcDigi::GetModule(), CAMath::Sqrt(), and PndEmcDigi::where().

Referenced by PndEmcCorrBump::Exec(), and PndEmcExpClusterSplitter::Exec().

147 {
148  Double_t digiT = theDigi->GetTimeStamp();
149  Double_t digiE = theDigi->GetEnergy();
150  Int_t mod = theDigi->GetModule();
151  //Int_t detID = theDigi->GetDetectorId();
152  //PndEmcTwoCoordIndex* _tci = PndEmcMapper::Instance()->GetTCI(detID);
153  //PndEmcTciXtalMap& map = const_cast<PndEmcTciXtalMap&> ( PndEmcStructure::Instance()->GetTciXtalMap());
154  //TVector3 Where = PndEmcDigi::algPointer()(map.find(_tci)->second);
155  Double_t path = theDigi->where().Mag();
156  //Double_t path = map[_tci]->frontCentre().Mag();
157 
158 
159  TVectorD vFunc(6);
160  vFunc[0]=1.;
161  vFunc[1]=path;
162  vFunc[2]=1./TMath::Sqrt(digiE);
163  vFunc[3]=1./digiE;
164  vFunc[4]=vFunc[3]*vFunc[3];
165  vFunc[5]=vFunc[4]*vFunc[3];
166 
167  Double_t corrT(0.);
168  //Int_t mod = detID/100000000;
169 
170  if(mod == 3){
171  corrT = CoeffMod3*vFunc;
172  }else if( mod == 5){
173  corrT = CoeffMod5*vFunc;
174  }else{
175  corrT = CoeffModo*vFunc;
176  }
177  if(PrintOut){
178  cout<<"path = "<<path<<", mod = "<<mod<<", corrT = "<<corrT<<endl;
179  }
180  return digiT - corrT;
181 }
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
Short_t GetModule() const
Definition: PndEmcDigi.h:103
Double_t
const TVector3 & where() const
Definition: PndEmcDigi.h:111
Int_t PndEmcDigiCalibrator::GetIdxByEnergy ( Double_t  energy) const
private

Definition at line 243 of file PndEmcDigiCalibrator.cxx.

References idx.

Referenced by GetTimeResolutionOfDigi().

244 {
245  if(energy < 0.006) return 0;
246  if(energy < 0.008) return 1;
247  if(energy < 0.010) return 2;
248  if(energy < 0.1)
249  return 2 + Int_t(energy/0.01);//energy step 0.01GeV
250  if(energy >= 0.1){
251  Int_t idx = 11 + Int_t(energy/0.1);
252  if(idx > 16) idx = 16;
253  return idx;
254  }
255  return -1;
256 }
int idx[MAX]
Definition: autocutx.C:38
Double_t energy
Definition: plot_dirc.C:15
Int_t PndEmcDigiCalibrator::GetIdxByEnergyForBump ( Double_t  energy) const
private

Definition at line 257 of file PndEmcDigiCalibrator.cxx.

References idx.

Referenced by GetTimeResolutionOfShower().

258 {
259  if(energy < 0.006) return 0;
260  if(energy < 0.008) return 1;
261  if(energy < 0.010) return 2;
262  if(energy < 0.1)
263  return 2 + Int_t(energy/0.01);//energy step 0.01GeV
264  if(energy >= 0.1){
265  Int_t idx = 11 + Int_t(energy/0.1);
266  if(idx > 19) idx = 19;
267  return idx;
268  }
269  return -1;
270 }
int idx[MAX]
Definition: autocutx.C:38
Double_t energy
Definition: plot_dirc.C:15
Double_t PndEmcDigiCalibrator::GetTimeResolutionOfDigi ( PndEmcDigi theDigi) const

Definition at line 230 of file PndEmcDigiCalibrator.cxx.

References fTimeWindowOfDigi, PndEmcDigi::GetEnergy(), GetIdxByEnergy(), and PndEmcDigi::GetModule().

Referenced by PndEmcCorrBump::Exec(), and PndEmcExpClusterSplitter::Exec().

231 {
232  Int_t TheIndexOfEnergy = GetIdxByEnergy(theDigi->GetEnergy());
233  Int_t TheIndexOfModule = theDigi->GetModule();
234  return PndEmcDigiCalibrator::fTimeWindowOfDigi[TheIndexOfModule-1][TheIndexOfEnergy];
235 }
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
Short_t GetModule() const
Definition: PndEmcDigi.h:103
static Double_t fTimeWindowOfDigi[5][17]
Int_t GetIdxByEnergy(Double_t energy) const
Double_t PndEmcDigiCalibrator::GetTimeResolutionOfShower ( PndEmcBump theBump) const

Definition at line 237 of file PndEmcDigiCalibrator.cxx.

References PndEmcCluster::energy(), fTimeWindowOfShower, GetIdxByEnergyForBump(), and PndEmcCluster::GetModule().

238 {
239  Int_t TheIndexOfEnergy = GetIdxByEnergyForBump(theBump->energy());
240  Int_t TheIndexOfModule = theBump->GetModule();
241  return PndEmcDigiCalibrator::fTimeWindowOfShower[TheIndexOfModule-1][TheIndexOfEnergy];
242 }
Short_t GetModule() const
static Double_t fTimeWindowOfShower[5][20]
virtual Double_t energy() const
Int_t GetIdxByEnergyForBump(Double_t energy) const
PndEmcDigiCalibrator& PndEmcDigiCalibrator::operator= ( const PndEmcDigiCalibrator )
inlineprivate

Definition at line 50 of file PndEmcDigiCalibrator.h.

50 {return *this;};

Member Data Documentation

TVectorD PndEmcDigiCalibrator::CoeffMod3
private

Definition at line 55 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByDigi(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffMod3A
private

Definition at line 59 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByBump(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffMod3B
private

Definition at line 63 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByBump(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffMod5
private

Definition at line 56 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByDigi(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffMod5A
private

Definition at line 60 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByBump(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffMod5B
private

Definition at line 64 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByBump(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffModo
private

Definition at line 57 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByDigi(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffModoA
private

Definition at line 61 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByBump(), and PndEmcDigiCalibrator().

TVectorD PndEmcDigiCalibrator::CoeffModoB
private

Definition at line 65 of file PndEmcDigiCalibrator.h.

Referenced by CalibrationEvtTimeByBump(), and PndEmcDigiCalibrator().

Double_t PndEmcDigiCalibrator::fTimeWindowOfDigi
staticprivate
Initial value:
={
14., 14., 9.4, 4.7, 3.0, 2.1, 1.6, 1.3, 1.1, 0.9, 0.8, 0.7, 0.5, 0.3, 0.2, 0.16, 0.14,
14., 14., 9.4, 4.7, 3.0, 2.1, 1.6, 1.3, 1.1, 0.9, 0.8, 0.7, 0.5, 0.3, 0.2, 0.16, 0.14,
7.0, 5.0, 3.6, 2.2, 1.2, 0.8, 0.7, 0.6, 0.5, 0.45,0.38,0.36, 0.27, 0.2, 0.20,0.20, 0.20,
14., 14., 9.4, 4.7, 3.0, 2.1, 1.6, 1.3, 1.0, 0.9, 0.8, 0.7, 0.5, 0.3, 0.2, 0.16, 0.14,
2.3, 1.8, 1.3, 0.9, 0.6, 0.4, 0.3, 0.3, 0.3, 0.3, 0.25,0.25, 0.25, 0.25, 0.25, 0.25, 0.25
}

Definition at line 50 of file PndEmcDigiCalibrator.h.

Referenced by GetTimeResolutionOfDigi().

Double_t PndEmcDigiCalibrator::fTimeWindowOfShower
staticprivate
Initial value:
={
24., 18., 12.5, 9.5, 4.7, 3.2, 2.3, 2.0, 1.7, 1.4, 1.2, 1.1, 0.7, 0.4, 0.3, 0.23, 0.19, 0.16, 0.14, 0.12,
24., 18., 12.5, 9.5, 4.7, 3.2, 2.3, 2.0, 1.7, 1.4, 1.2, 1.1, 0.7, 0.4, 0.3, 0.23, 0.19, 0.16, 0.14, 0.12,
7, 5.5, 3.7, 2.9, 2.0, 1.7, 1.7, 1.6, 1.5, 1.3, 1.3, 1.1, 0.86, 0.28, 0.18, 0.14, 0.15, 0.14, 0.14, 0.13,
24., 18., 12.5, 9.5, 4.7, 3.2, 2.3, 2.0, 1.7, 1.4, 1.2, 1.1, 0.7, 0.4, 0.3, 0.23, 0.19, 0.16, 0.14, 0.12,
7, 5.5, 1.4, 1.1, 0.67, 0.44, 0.29, 0.23, 0.24, 0.19, 0.14, 0.18, 0.14, 0.12, 0.13, 0.14, 0.12, 0.13, 0.13, 0.12
}

Definition at line 53 of file PndEmcDigiCalibrator.h.

Referenced by GetTimeResolutionOfShower().


The documentation for this class was generated from the following files: