Changeset 8428 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 04/20/07 14:59:58 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r8427 r8428 19 19 #pragma link C++ class MCalibrationIntensityCam+; 20 20 #pragma link C++ class MCalibrationIntensityChargeCam+; 21 #pragma link C++ class MCalibrationIntensityRelTimeCam+;22 21 #pragma link C++ class MCalibrationIntensityTestCam+; 23 22 … … 29 28 #pragma link C++ class MCalibrationPulseTimeCam+; 30 29 #pragma link C++ class MCalibrationPedCam+; 31 //#pragma link C++ class MCalibrationHiLoCam+;32 //#pragma link C++ class MCalibrationHiLoPix+;33 30 #pragma link C++ class MCalibrationQECamMagic+; 34 31 #pragma link C++ class MCalibrationQECam+; -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r8427 r8428 31 31 // MParList 32 32 // MCalibrationIntensityChargeCam 33 // MCalibrationIntensityRelTimeCam34 33 // 35 34 // Output Containers: 36 35 // MCalibrationIntensityChargeCam 37 // MCalibrationIntensityRelTimeCam38 36 // 39 37 // Class version 2: … … 58 56 59 57 #include "MCalibrationIntensityChargeCam.h" 60 //#include "MCalibrationIntensityRelTimeCam.h"61 58 62 59 #include "MBadPixelsCam.h" … … 202 199 if (pList->FindObject(AddSerialNumber("MHCalibrationRelTimeCam"))) 203 200 { 204 205 MParContainer *cont = pList->FindCreateObj("MCalibrationIntensityRelTimeCam"); 206 if (!cont) 207 { 208 *fLog << err << "Could not find nor create MCalibrationIntensityRelTimeCam abort... " << endl; 209 return kFALSE; 210 } 201 // if (!pList->FindCreateObj("MCalibrationIntensityRelTimeCam")) 202 // return kFALSE; 211 203 212 204 if (!fRelTimeCalc) -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
r8427 r8428 34 34 // MParList 35 35 // MCalibrationIntensityChargeCam 36 // MCalibrationIntensityRelTimeCam37 36 // 38 37 // Output Containers: 39 38 // MCalibrationIntensityChargeCam 40 // MCalibrationIntensityRelTimeCam41 39 // 42 40 ////////////////////////////////////////////////////////////////////////////// … … 58 56 59 57 #include "MCalibrationIntensityChargeCam.h" 60 #include "MCalibrationIntensityRelTimeCam.h"61 58 62 59 #include "MCalibrationPattern.h" 63 60 #include "MCalibrationQECam.h" 64 61 #include "MCalibrationBlindCam.h" 62 65 63 #include "MCalibrationChargeCam.h" 66 64 #include "MCalibrationChargeCalc.h" 65 66 #include "MCalibrationRelTimeCam.h" 67 67 #include "MCalibrationRelTimeCalc.h" 68 68 … … 77 77 MCalibColorSteer::MCalibColorSteer(const char *name, const char *title) 78 78 : fCalibPattern(NULL), fGeom(NULL), fParList(NULL), 79 fIntensCharge(NULL), fIntensRelTime(NULL),79 fIntensCharge(NULL), 80 80 fBad(NULL), fChargeCalc(NULL), fRelTimeCalc(NULL), fHistCopy(kFALSE) 81 81 { … … 178 178 { 179 179 180 fIntensRelTime = (MCalibrationIntensityRelTimeCam*)pList->FindCreateObj("MCalibrationIntensityRelTimeCam");181 fRelTimeCalc = (MCalibrationRelTimeCalc*)tlist->FindObject(AddSerialNumber("MCalibrationRelTimeCalc"));182 183 180 *fLog << inf << "Found MHCalibrationRelTimeCam ... " << flush; 184 181 185 if (!fIntensRelTime) 186 { 187 *fLog << err << "Could not find nor create MCalibrationIntensityRelTimeCam abort... " << endl; 182 fRelTimeCam = (MCalibrationRelTimeCam*)pList->FindCreateObj("MCalibrationRelTimeCam"); 183 if (!fRelTimeCam) 188 184 return kFALSE; 189 } 190 185 186 fRelTimeCalc = (MCalibrationRelTimeCalc*)tlist->FindObject(AddSerialNumber("MCalibrationRelTimeCalc")); 191 187 if (!fRelTimeCalc) 192 {193 *fLog << err << "Could not find MCalibrationRelTimeCalc abort... " << endl;194 188 return kFALSE; 195 } 189 190 // CALL ITS PrePorcess ??? 196 191 } 197 192 … … 320 315 fBlindCam->SetPulserColor(fCalibPattern->GetPulserColor()); 321 316 317 fRelTimeCam->Clear(); 318 fRelTimeCam->SetPulserColor(fCalibPattern->GetPulserColor()); 319 322 320 if (fIntensCharge) 323 321 { … … 331 329 } 332 330 333 if (fIntensRelTime)334 {335 fIntensRelTime->AddToList(Form("MCalibrationRelTimeCam%s",namep.Data()),*fGeom);336 MCalibrationCam *cam = fIntensRelTime->GetCam();337 cam->SetPulserColor(fCalibPattern->GetPulserColor());338 *fLog << inf << "New MCalibrationRelTimeCam with name: " << cam->GetName() << endl;339 }340 341 331 return kTRUE; 342 332 … … 388 378 // fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone()); 389 379 390 if (n.Contains("RelTime"))391 if (fIntensRelTime)392 fIntensRelTime->AddHist((MHCalibrationCam*)hcam->Clone());393 } 394 395 // -------------------------------------------------------------------------- 380 // if (n.Contains("RelTime")) 381 // if (fIntensRelTime) 382 // fIntensRelTime->AddHist((MHCalibrationCam*)hcam->Clone()); 383 } 384 385 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h
r8427 r8428 18 18 class MCalibrationRelTimeCalc; 19 19 class MCalibrationIntensityChargeCam; 20 class MCalibration IntensityRelTimeCam;20 class MCalibrationRelTimeCam; 21 21 class MCalibrationBlindCam; 22 22 class MCalibrationQECam; … … 31 31 MParList *fParList; //! 32 32 MCalibrationIntensityChargeCam *fIntensCharge; //! 33 MCalibration IntensityRelTimeCam *fIntensRelTime;//!33 MCalibrationRelTimeCam *fRelTimeCam; //! 34 34 MCalibrationBlindCam *fBlindCam; //! 35 35 MCalibrationQECam *fQECam; //! -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
r8425 r8428 34 34 // per calibration camera result and area index 35 35 // 36 // See also: MCalibrationIntensityChargeCam, MCalibrationIntensityRelTimeCam,36 // See also: MCalibrationIntensityChargeCam, 37 37 // MCalibrationCam, MCalibrationPix, MHCalibrationChargePix, 38 38 // MHCalibrationChargeCam, MCalibrationChargeBlindPix, -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.cc
r8417 r8428 71 71 #include "MGeomPix.h" 72 72 73 #include "MCalibrationIntensityRelTimeCam.h"74 73 #include "MCalibrationRelTimeCam.h" 75 74 #include "MCalibrationRelTimePix.h" … … 122 121 void MCalibrationRelTimeCalc::Clear(const Option_t *o) 123 122 { 124 125 fBadPixels = NULL; 126 fCam = NULL; 127 fIntensCam = NULL; 128 123 fBadPixels = NULL; 124 fCam = NULL; 129 125 } 130 126 … … 133 129 // Search for the following input containers and abort if not existing: 134 130 // - MGeomCam 135 // - MCalibration IntensityRelTimeCam or MCalibrationRelTimeCam131 // - MCalibrationRelTimeCam 136 132 // - MBadPixelsCam 137 133 // … … 161 157 } 162 158 163 fIntensCam = (MCalibrationIntensityRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityRelTimeCam")); 164 if (fIntensCam) 165 *fLog << inf << "Found MCalibrationIntensityRelTimeCam ... " << endl; 166 else 167 { 168 fCam = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam")); 169 if (!fCam) 170 { 171 *fLog << err << "Cannot find MCalibrationRelTimeCam ... abort." << endl; 172 *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationRelTimeCam before..." << endl; 173 return kFALSE; 174 } 175 } 176 177 UInt_t npixels = fGeom->GetNumPixels(); 178 179 MCalibrationRelTimeCam *relcam = fIntensCam 180 ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam; 181 159 fCam = (MCalibrationRelTimeCam*)pList->FindObject(AddSerialNumber("MCalibrationRelTimeCam")); 160 if (!fCam) 161 { 162 *fLog << err << "Cannot find MCalibrationRelTimeCam ... abort." << endl; 163 return kFALSE; 164 } 165 166 const UInt_t npixels = fGeom->GetNumPixels(); 182 167 for (UInt_t i=0; i<npixels; i++) 183 { 184 185 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i]; 168 { 169 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i]; 186 170 187 171 if ((*fBadPixels)[i].IsBad()) 188 172 { 189 173 pix.SetExcluded(); 190 174 continue; 191 175 } 192 176 193 177 if (IsDebug()) 194 pix.SetDebug();195 178 pix.SetDebug(); 179 } 196 180 197 181 return kTRUE; … … 242 226 FinalizeUnsuitablePixels(); 243 227 244 if (fIntensCam) 245 fIntensCam->SetReadyToSave(); 246 else 247 fCam ->SetReadyToSave(); 248 228 fCam->SetReadyToSave(); 249 229 fBadPixels->SetReadyToSave(); 250 230 … … 277 257 { 278 258 279 MCalibrationRelTimeCam *relcam = fIntensCam280 ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam;281 282 259 const UInt_t npixels = fGeom->GetNumPixels(); 283 260 const UInt_t nareas = fGeom->GetNumAreas(); … … 286 263 TArrayF upplim (nareas); 287 264 TArrayF areasum (nareas); 288 // Float_t areasum2 [nareas];289 265 TArrayI numareavalid (nareas); 290 266 TArrayI useunreliable(nareas); … … 306 282 numareavalid[aidx] ++; 307 283 } 308 284 309 285 for (UInt_t aidx=0; aidx<nareas; aidx++) 310 286 if (numareavalid[aidx] < 100) … … 318 294 for (UInt_t i=0; i<npixels; i++) 319 295 { 320 321 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];296 297 const MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i]; 322 298 323 299 if (pix.IsExcluded()) … … 349 325 continue; 350 326 } 351 327 352 328 // Calculate the rms out of sum2: 353 329 /* … … 358 334 lowlim [aidx] = 0; 359 335 upplim [aidx] = areasum [aidx] + fRelTimeResolutionLimit; 360 336 361 337 } 362 338 *fLog << endl; … … 365 341 for (UInt_t i=0; i<npixels; i++) 366 342 { 367 368 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(* relcam)[i];369 343 344 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i]; 345 370 346 if (pix.IsExcluded()) 371 347 continue; 372 348 373 349 MBadPixelsPix &bad = (*fBadPixels)[i]; 374 350 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 375 351 continue; 376 352 377 353 const Float_t res = pix.GetTimePrecision(); 378 354 const Int_t aidx = (*fGeom)[i].GetAidx(); 379 355 380 356 if ( res < lowlim[aidx] || res > upplim[aidx] ) 381 357 { … … 401 377 void MCalibrationRelTimeCalc::FinalizeBadPixels() 402 378 { 403 404 MCalibrationRelTimeCam *relcam = fIntensCam405 ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam;406 379 407 380 for (Int_t i=0; i<fBadPixels->GetSize(); i++) 408 381 { 409 410 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*relcam)[i];411 382 412 383 MBadPixelsPix &bad = (*fBadPixels)[i]; … … 425 396 426 397 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 398 { 399 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*fCam)[i]; 427 400 pix.SetExcluded(); 401 } 428 402 } 429 403 … … 442 416 *fLog << dec; 443 417 444 MCalibrationRelTimeCam *relcam = fIntensCam ? (MCalibrationRelTimeCam*)fIntensCam->GetCam() : fCam;445 446 418 const Int_t nareas = fGeom->GetNumAreas(); 447 419 … … 453 425 unsuit[aidx] += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnsuitableRun, fGeom, aidx); 454 426 unrel[aidx] += fBadPixels->GetNumUnsuitable(MBadPixelsPix::kUnreliableRun, fGeom, aidx); 455 relcam->SetNumUnsuitable(unsuit[aidx], aidx);456 relcam->SetNumUnreliable(unrel[aidx], aidx);427 fCam->SetNumUnsuitable(unsuit[aidx], aidx); 428 fCam->SetNumUnreliable(unrel[aidx], aidx); 457 429 } 458 430 -
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCalc.h
r8417 r8428 19 19 #endif 20 20 21 class MCalibrationIntensityRelTimeCam;22 21 class MCalibrationRelTimeCam; 23 22 class MGeomCam; 24 //class MBadPixelsIntensityCam;25 23 class MBadPixelsCam; 26 24 … … 35 33 36 34 // Pointers 37 //MBadPixelsIntensityCam *fIntensBad; // Bad Pixels Intensity Cam38 35 MBadPixelsCam *fBadPixels; // Bad Pixels 39 MCalibrationIntensityRelTimeCam *fIntensCam; // Calibrated RelTimes for different intensities40 36 MCalibrationRelTimeCam *fCam; // Calibrated RelTimes of all pixels 41 37 MGeomCam *fGeom; //! Camera geometry -
trunk/MagicSoft/Mars/mcalib/Makefile
r8427 r8428 41 41 MCalibrationIntensityCam.cc \ 42 42 MCalibrationIntensityChargeCam.cc \ 43 MCalibrationIntensityRelTimeCam.cc \44 43 MCalibrationIntensityTestCam.cc \ 45 44 MCalibrationCam.cc \
Note:
See TracChangeset
for help on using the changeset viewer.