- Timestamp:
- 04/01/04 21:11:50 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3627 r3628 21 21 22 22 2004/04/01: Markus Gaug 23 24 * msignal/MArrivalTimeCalc.[h,cc] 25 - set fSaturationLimit as a variable with default (instead of 0xff) 23 26 24 27 * mcalib/MHCalibrationChargeCam.[h,cc] -
trunk/MagicSoft/Mars/msignal/MArrivalTimeCalc.cc
r3413 r3628 15 15 ! * 16 16 ! 17 !18 17 ! Author(s): Sebastian Raducci 12/2003 <mailto:raducci@fisica.uniud.it> 19 18 ! … … 62 61 using namespace std; 63 62 63 const Byte_t MArrivalTimeCalc::fgSaturationLimit = 254; 64 64 // -------------------------------------------------------------------------- 65 65 // … … 72 72 fName = name ? name : "MArrivalTimeCalc"; 73 73 fTitle = title ? title : "Calculate photons arrival time"; 74 74 75 SetSaturationLimit(); 75 76 } 76 77 … … 149 150 // If pixel is saturated we use LoGains 150 151 // 151 if ( pixel.GetMaxHiGainSample() == 0xff&& pixel.HasLoGain())152 if ((pixel.GetMaxHiGainSample() >= fSaturationLimit) && pixel.HasLoGain()) 152 153 { 153 154 … … 191 192 // Initialize the spline 192 193 // 193 194 MCubicSpline *spline = new MCubicSpline(fadcSamples); 194 195 195 196 // 196 197 // Now find the maximum 197 198 // 198 199 200 201 202 203 204 205 206 207 } 208 199 Double_t abMaximum = spline->EvalAbMax(); 200 Double_t maximum = spline->EvalMax(); 201 const MPedestalPix &ped = (*fPedestals)[idx]; 202 const Double_t pedestal = ped.GetPedestal(); 203 const Double_t halfMax = (maximum + pedestal)/2.; 204 Float_t time = (halfMax > pedestal) ? (Float_t ) spline->FindVal(halfMax,abMaximum,'l'): 0.0; 205 delete spline; 206 return time; 207 208 } 209 -
trunk/MagicSoft/Mars/msignal/MArrivalTimeCalc.h
r3368 r3628 13 13 { 14 14 15 MRawEvtData *fRawEvt; // raw event data (time slices) 16 MRawRunHeader *fRunHeader; // RunHeader information 17 MPedestalCam *fPedestals; // pedestal information 18 19 MArrivalTimeCam *fArrTime; // Container with the photons arrival times 20 21 Int_t PreProcess(MParList *pList); 22 Bool_t ReInit(MParList *pList); 23 Int_t Process(); 24 Int_t PostProcess() {return kTRUE;} 25 26 Float_t Calc(const Byte_t *fadcSamples, const Short_t nslices, const UInt_t idx); 27 15 static const Byte_t fgSaturationLimit; // Default for fSaturationLimit 16 Byte_t fSaturationLimit; // Maximum FADC counts before being considered as saturated 17 18 MRawEvtData *fRawEvt; // raw event data (time slices) 19 MRawRunHeader *fRunHeader; // RunHeader information 20 MPedestalCam *fPedestals; // pedestal information 21 22 MArrivalTimeCam *fArrTime; // Container with the photons arrival times 23 24 Int_t PreProcess(MParList *pList); 25 Bool_t ReInit(MParList *pList); 26 Int_t Process(); 27 Int_t PostProcess() {return kTRUE;} 28 29 Float_t Calc(const Byte_t *fadcSamples, const Short_t nslices, const UInt_t idx); 30 28 31 public: 29 32 MArrivalTimeCalc(const char *name=NULL, const char *title=NULL); 30 33 ~MArrivalTimeCalc(){} 31 34 35 void SetSaturationLimit(const Byte_t lim=fgSaturationLimit) { fSaturationLimit = lim; } 36 32 37 ClassDef(MArrivalTimeCalc, 0) // Task to calculate Arrival Times from raw data 33 38 };
Note:
See TracChangeset
for help on using the changeset viewer.