Changeset 1127 for trunk/MagicSoft
- Timestamp:
- 12/18/01 17:51:08 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r1108 r1127 83 83 Bool_t MCerPhotCalc::PreProcess(MParList *pList) 84 84 { 85 MRawRunHeader *RunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");86 if (! RunHeader)85 fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 86 if (!fRunHeader) 87 87 { 88 88 *fLog << dbginf << "MRawRunHeader not found... aborting." << endl; 89 89 return kFALSE; 90 90 } 91 fNumLoGainFadcSlices= RunHeader->GetNumSamplesLoGain();92 fNumHiGainFadcSlices= RunHeader->GetNumSamplesHiGain();93 91 94 92 fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData"); … … 133 131 Float_t nphot = (Float_t)pixel.GetSumHiGainSamples(); 134 132 135 if(nphot>0) nphot -= fNumHiGainFadcSlices*ped.GetMean(); 133 // We check that the pixel is not empty, if it is empty 134 // we won't substract the pedestal. Empty means that it has 135 // 0 signal in all the slices. 136 136 137 fCerPhotEvt->AddPixel(pixid, nphot, sqrt(fNumHiGainFadcSlices)*ped.GetMeanRms()); 137 if(nphot!=0) nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean(); 138 139 fCerPhotEvt->AddPixel(pixid, nphot, sqrt(fRunHeader->GetNumSamplesHiGain())*ped.GetSigma()); 138 140 139 141 // FIXME! Handling of Lo Gains is missing! … … 144 146 return kTRUE; 145 147 } 148
Note:
See TracChangeset
for help on using the changeset viewer.