Changeset 1443 for trunk/MagicSoft/Mars/manalysis/MCerPhotCalc2.cc
- Timestamp:
- 07/25/02 17:14:55 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc2.cc
r1425 r1443 73 73 AddToBranchList("MRawEvtData.fHiGainFadcSamples"); 74 74 AddToBranchList("MRawEvtData.fLoGainFadcSamples"); 75 76 SetDefaultWeights(); 75 77 } 76 78 … … 115 117 // Calculate quadratic sum of weights: 116 118 fSumQuadWeights = 0.; 117 for (Int_t i = 0; i < 15; i++)119 for (Int_t i = 0; i < fWeight.GetSize(); i++) 118 120 fSumQuadWeights += fWeight[i]*fWeight[i]; 119 121 … … 138 140 } 139 141 140 if (fRunHeader->GetNumSamplesHiGain() != 15)141 { 142 *fLog << dbginf << "Number of FADC slices (" << fRunHeader->GetNumSamplesHiGain() <<") is different from expected (15)... aborting." << endl;142 if (fRunHeader->GetNumSamplesHiGain() != fWeight.GetSize()) 143 { 144 *fLog << dbginf << "Number of FADC slices (" << fRunHeader->GetNumSamplesHiGain() <<") is different from assumed one (" << fWeight.GetSize() << ")... aborting." << endl; 143 145 return kFALSE; 144 146 } … … 171 173 MRawEvtPixelIter pixel(fRawEvt); 172 174 173 Float_t BinSignal[15];175 TArrayF BinSignal(fWeight.GetSize()); 174 176 175 177 while (pixel.Next()) … … 194 196 Float_t nphot = 0.; 195 197 196 for(Int_t i = 0; i< 15; i++)198 for(Int_t i = 0; i<fWeight.GetSize(); i++) 197 199 { 198 200 BinSignal[i] = (Float_t) ptr[i] - mean; … … 212 214 } 213 215 214 // Default weights: 215 Float_t MCerPhotCalc2::fWeight[] = {0, 0.0809835, 0.289593, 0.366926, 0.211665, 0.0508328, 0., 0., 0., 0., 0., 0., 0., 0., 0.}; 216 // 217 // Set default values for the number of slices and weights: 218 // 219 220 void MCerPhotCalc2::SetDefaultWeights() 221 { 222 const Float_t dummy[15] = {0, 0.0809835, 0.289593, 0.366926, 0.211665, 0.0508328, 0., 0., 0., 0., 0., 0., 0., 0., 0.}; 223 224 fWeight.Set(15,dummy); 225 return; 226 } 227 228 229 230
Note:
See TracChangeset
for help on using the changeset viewer.