Changeset 2691 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 12/17/03 16:26:30 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCalibrate.cc
r2685 r2691 32 32 // // 33 33 // Input Containers: // 34 // // 34 // // 35 // MGeomCam // 35 36 // MExtractedSingal // 36 37 // MCalibrationCam // … … 50 51 #include "MH.h" 51 52 52 #include "MRawRunHeader.h" 53 #include "MRawEvtData.h" // MRawEvtData::GetNumPixels 54 #include "MRawEvtPixelIter.h" 53 #include "MGeomCam.h" 55 54 56 55 #include "MCalibrationCam.h" … … 83 82 // 84 83 // The PreProcess searches for the following input containers: 84 // - MGeomCam 85 85 // - MCalibrationCam 86 86 // - MExtractedSignalCam … … 94 94 { 95 95 96 fCalibrations = (MCalibrationCam*)pList->FindObject("MCalibrationCam"); 96 97 fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam"); 97 98 if (!fCalibrations) 98 99 { 99 *fLog << err << dbginf << "M CalibrationCam could not be created ... aborting." << endl;100 *fLog << err << dbginf << "MGeomCam not found ... aborting." << endl; 100 101 return kFALSE; 101 102 } … … 104 105 if (!fSignals) 105 106 { 106 *fLog << err << dbginf << "Cannot find MExtractedSignalCam ... aborting" << endl; 107 *fLog << err << dbginf << "MExtractedSignalCam not found ... aborting" << endl; 108 return kFALSE; 109 } 110 111 fCalibrations = (MCalibrationCam*)pList->FindObject("MCalibrationCam"); 112 if (!fCalibrations) 113 { 114 *fLog << err << dbginf << "MCalibrationCam not found ... aborting." << endl; 107 115 return kFALSE; 108 116 } … … 111 119 if (!fCerPhotEvt) 112 120 { 113 *fLog << err << dbginf << "Cannot findMCerPhotEvt ... aborting" << endl;121 *fLog << err << dbginf << "Cannot create MCerPhotEvt ... aborting" << endl; 114 122 return kFALSE; 115 123 } … … 125 133 { 126 134 127 for (UInt_t pixid = 0; pixid<577; pixid++) 135 UInt_t imaxnumpix = fGeomCam->GetNumPixels(); 136 137 for (UInt_t pixid = 0; pixid < imaxnumpix; pixid++) 128 138 { 129 139 130 MExtractedSignalPix &sig = (*fSignals)[pixid];140 MCalibrationPix &pix = (*fCalibrations)[pixid]; 131 141 132 Bool_t logain = sig.IsLoGainUsed(); 142 if (pix.IsValid()) 143 { 144 MExtractedSignalPix &sig = (*fSignals)[pixid]; 133 145 134 Float_t signal; 135 if (logain) 136 signal = sig.GetExtractedSignalLoGain(); 137 else 138 signal = sig.GetExtractedSignalHiGain(); 146 Bool_t logain = sig.IsLoGainUsed(); 147 148 Float_t signal; 149 if (logain) 150 signal = sig.GetExtractedSignalLoGain(); 151 else 152 signal = sig.GetExtractedSignalHiGain(); 153 154 155 // Float_t fCalibraitonConvertionFactor = pix.GetMeanConversionFFactorMethod(); 156 Float_t fCalibrationConvertionFactor = pix.GetMeanConversionBlindPixelMethod(); 157 Float_t fCalibrationConvertionFactorError = pix.GetErrorConversionBlindPixelMethod(); 158 139 159 140 MCalibrationPix &pix = (*fCalibrations)[pixid]; 141 142 // Float_t fCalibraitonConvertionFactor = pix.GetMeanConversionFFactorMethod(); 143 Float_t fCalibrationConvertionFactor = pix.GetMeanConversionBlindPixelMethod(); 144 145 146 Float_t nphot = signal*fCalibrationConvertionFactor; 147 Float_t nphoterr = 0; 148 149 fCerPhotEvt->AddPixel(pixid, nphot, nphoterr); 150 160 Float_t nphot = signal*fCalibrationConvertionFactor; 161 Float_t nphoterr = signal*fCalibrationConvertionFactorError;; 162 163 fCerPhotEvt->AddPixel(pixid, nphot, nphoterr); 164 } 165 else 166 (*fCerPhotEvt)[pixid].SetPixelUnused(); 151 167 } 152 168 -
trunk/MagicSoft/Mars/manalysis/MCalibrate.h
r2684 r2691 4 4 ///////////////////////////////////////////////////////////////////////////// 5 5 // // 6 // MCalibrate //6 // MCalibrate // 7 7 // // 8 8 // Integrates the desired ADC time slices of one pixel and apply // … … 18 18 #endif 19 19 20 class MGeomCam; 20 21 class MCalibrationCam; 21 22 class MExtractedSignalCam; … … 25 26 { 26 27 27 MCalibrationCam *fCalibrations; 28 MExtractedSignalCam *fSignals; 29 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation 28 MGeomCam *fGeomCam; // Geometry of the camera 29 MCalibrationCam *fCalibrations; // Calibration constants 30 MExtractedSignalCam *fSignals; // Integrated charge in FADCs counts 31 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation 30 32 31 33 Int_t PreProcess(MParList *pList); … … 36 38 MCalibrate(const char *name=NULL, const char *title=NULL); 37 39 38 ClassDef(MCalibrate, 0) // Task to calculate cerenkov photons from raw data40 ClassDef(MCalibrate, 0) // Task to calculate cerenkov photons using calibration constants 39 41 }; 40 42
Note:
See TracChangeset
for help on using the changeset viewer.