Changeset 7122 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 06/01/05 18:13:13 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibColorSet.cc
r7095 r7122 157 157 } 158 158 159 if (header->IsMonteCarloRun())160 return kTRUE;161 162 if (header->GetRunNumber() > gkFirstRunWithFinalBits)163 return kTRUE;164 165 159 // 166 160 // Consider the case that a pedestal run is interleaved in the calibration run sequence ... prepare … … 176 170 } 177 171 172 // 173 // Check if the color was set explicitly from outside 174 // 178 175 if (fIsExplicitColor) 179 176 { … … 182 179 return kTRUE; 183 180 } 181 182 // 183 // 1) Do nothing if this is a MC run. Correct settings of all flags is assumed 184 // 2) Skip the rest if the run already contains the correct color information 185 // 186 if (header->IsMonteCarloRun() || header->GetRunNumber()>gkFirstRunWithFinalBits) 187 return kTRUE; 184 188 185 189 const Int_t num = header->GetRunNumber(); -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r7099 r7122 107 107 108 108 #include "MGeomCam.h" 109 #include "MRawRunHeader.h" 109 110 110 111 #include "MPedestalCam.h" … … 153 154 : fGeomCam(NULL), fBadPixels(NULL), fCalibrations(NULL), 154 155 fQEs(NULL), fSignals(NULL), fCerPhotEvt(NULL), fCalibConstCam(NULL), 155 fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.) 156 fPedestalFlag(kNo), fSignalType(kPhot), fRenormFactor(1.), fScaleFactor(1.) 156 157 { 157 158 … … 318 319 Bool_t MCalibrateData::ReInit(MParList *pList) 319 320 { 321 MRawRunHeader *header = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 322 if (!header) 323 { 324 *fLog << err << "MRawRunHeader not found... abort." << endl; 325 return kFALSE; 326 } 327 320 328 fGeomCam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam")); 321 329 if (!fGeomCam) … … 399 407 break; 400 408 } 401 409 410 if (header->IsMonteCarloRun()) 411 { 412 *fLog << "Additional scale factor: 1 (MonteCarloRun)" << endl; 413 fScaleFactor = 1; 414 } 415 else 416 *fLog << "Additional scale factor: " << fScaleFactor << endl; 417 402 418 const Int_t npixels = fGeomCam->GetNumPixels(); 403 419 … … 603 619 } 604 620 605 calibConv *= fRenormFactor * calibUpdate;606 calibFFactor *= TMath::Sqrt(fRenormFactor );621 calibConv *= fRenormFactor*fScaleFactor * calibUpdate; 622 calibFFactor *= TMath::Sqrt(fRenormFactor*fScaleFactor); 607 623 608 624 fHiLoConv [pixidx] = hiloconv; … … 861 877 } 862 878 879 if (IsEnvDefined(env, prefix, "ScaleFactor", print)) 880 { 881 fScaleFactor = GetEnvValue(env, prefix, "ScaleFactor", fScaleFactor); 882 rc = kTRUE; 883 } 884 863 885 return rc; 864 886 } -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r7099 r7122 71 71 72 72 Float_t fRenormFactor; // Possible renormalization factor for signals (-> phes) 73 Float_t fScaleFactor; // Possible scale factor for signals 73 74 74 75 TList fNamesPedestal; // Names of input and output pedestal conatainer … … 110 111 void SetCalibConvMinLimit( const Float_t f=gkCalibConvMinLimit ) { fCalibConvMinLimit = f; } 111 112 void SetCalibConvMaxLimit( const Float_t f=gkCalibConvMaxLimit ) { fCalibConvMaxLimit = f; } 112 113 114 void SetScaleFactor(const Float_t f=1) { fScaleFactor=1; } 115 113 116 Bool_t UpdateConversionFactors( const MCalibrationChargeCam *updatecam=NULL); 114 117
Note:
See TracChangeset
for help on using the changeset viewer.