Changeset 3960 for trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc
- Timestamp:
- 05/04/04 16:53:25 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc
r3956 r3960 264 264 const UInt_t nareas = fGeom->GetNumAreas(); 265 265 266 Float_t lowlim [nareas]; 267 Float_t upplim [nareas]; 268 Float_t areasum [nareas]; 269 Float_t areasum2 [nareas]; 270 Int_t numareavalid[nareas]; 266 Float_t lowlim [nareas]; 267 Float_t upplim [nareas]; 268 Float_t areasum [nareas]; 269 Float_t areasum2 [nareas]; 270 Int_t numareavalid [nareas]; 271 Int_t useunreliable[nareas]; 271 272 272 273 memset(lowlim ,0, nareas * sizeof(Float_t)); … … 275 276 memset(areasum2 ,0, nareas * sizeof(Float_t)); 276 277 memset(numareavalid ,0, nareas * sizeof(Int_t )); 277 278 memset(useunreliable ,0, nareas * sizeof(Int_t )); 279 280 // 281 // Apero loop: Count number of unreliable pixels: 282 // 283 for (UInt_t i=0; i<npixels; i++) 284 { 285 MBadPixelsPix &bad = (*fBadPixels)[i]; 286 const Int_t aidx = (*fGeom)[i].GetAidx(); 287 288 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 289 continue; 290 291 if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun)) 292 continue; 293 294 numareavalid[aidx] ++; 295 } 296 297 for (UInt_t aidx=0; aidx<nareas; aidx++) 298 if (numareavalid[aidx] < 100) 299 useunreliable[aidx] = 1; 300 301 memset(numareavalid ,0, nareas * sizeof(Int_t )); 278 302 // 279 303 // First loop: Get mean time resolution the RMS … … 292 316 continue; 293 317 318 const Int_t aidx = (*fGeom)[i].GetAidx(); 319 320 if (!useunreliable[aidx]) 321 if (bad.IsUnsuitable(MBadPixelsPix::kUnreliableRun)) 322 continue; 323 294 324 const Float_t res = pix.GetTimePrecision(); 295 const Int_t aidx = (*fGeom)[i].GetAidx();296 325 297 326 areasum [aidx] += res; … … 316 345 lowlim [aidx] = areasum [aidx] - fRelTimeRelErrLimit*areasum2[aidx]; 317 346 upplim [aidx] = areasum [aidx] + fRelTimeRelErrLimit*areasum2[aidx]; 318 347 348 *fLog << endl; 319 349 *fLog << inf << GetDescriptor() << ": Limits for acceptance of time resolution: [" 320 << Form("%4.2f%s%4.2f",lowlim[aidx],",",upplim[aidx]) << "] in area index " << aidx << endl;321 } 322 350 << Form("%4.2f%s%4.2f",lowlim[aidx],",",upplim[aidx]) << "] in area index " << aidx; 351 } 352 *fLog << endl; 323 353 324 354
Note:
See TracChangeset
for help on using the changeset viewer.