Changeset 2251 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 06/30/03 10:55:30 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r2237 r2251 117 117 118 118 // Calculate quadratic sum of weights: 119 fSumWeights = 0; 119 Doubla_t sum = 0; 120 120 121 fSumQuadWeights = 0; 121 122 for (Int_t i=0; i<fWeight.GetSize(); i++) 122 { 123 fSumWeights += fWeight[i]; 123 sum += fWeight[i]; 124 125 for (Int_t i=0; i<fWeight.GetSize(); i++) 126 { 127 fWeight[i] /= sum; 124 128 fSumQuadWeights += fWeight[i]*fWeight[i]; 125 129 } 126 127 fSumQuadWeights = sqrt(fSumQuadWeights);128 130 129 131 return kTRUE; … … 180 182 181 183 const Double_t offset = fEnableFix ? ped.GetPedestal()-0.5 : ped.GetPedestal(); 182 ped.Set(offset *fSumWeights, ped.GetPedestalRms()*fSumQuadWeights);184 ped.Set(offset, ped.GetPedestalRms()*sqrt(fSumQuadWeights)); 183 185 } 184 186 … … 195 197 //fCerPhotEvt->InitSize(fRawEvt->GetNumPixels()); 196 198 197 if (fIsMcFile)198 ScalePedestals();199 // if (fIsMcFile) 200 // ScalePedestals(); 199 201 200 202 MRawEvtPixelIter pixel(fRawEvt); -
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.h
r2237 r2251 34 34 35 35 TArrayF fWeight; // Weights for adding up the ADC slices 36 Float_t fSumWeights;37 36 Float_t fSumQuadWeights; 38 37
Note:
See TracChangeset
for help on using the changeset viewer.