Changeset 5851
- Timestamp:
- 01/15/05 12:29:35 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5848 r5851 20 20 21 21 -*-*- END OF LINE -*-*- 22 23 2005/01/16 Markus Gaug 24 25 * mhcalib/MHCalibrationCam.[h,cc] 26 - finished event type recognition and rejection. Only used if 27 SetInterlaced() is set. 22 28 23 29 2005/01/14 Hendrik Bartko -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc
r5802 r5851 81 81 82 82 #include "MRawRunHeader.h" 83 #include "M RawEvtHeader.h"83 #include "MTriggerPattern.h" 84 84 85 85 ClassImp(MHCalibrationCam); … … 121 121 fColor(MCalibrationCam::kNONE), fIntensBad(NULL), 122 122 fBadPixels(NULL), fIntensCam(NULL), fCam(NULL), fGeom(NULL), 123 fRunHeader(NULL), fEvtHeader(NULL) 123 fRunHeader(NULL), fTrigPattern(NULL), fInterlacedFlags(0), 124 fMaskInterlaced(0) 124 125 { 125 126 … … 514 515 } 515 516 516 fEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader"); 517 if (!fEvtHeader) 518 { 519 if (IsInterlaced()) 520 { 521 *fLog << err << GetDescriptor() 522 << ": MRawEvtHeader not found... Cannot run interlaced calibration events." << endl; 523 return kFALSE; 524 } 525 } 526 517 if (IsInterlaced()) 518 { 519 fTrigPattern = (MTriggerPattern*)pList->FindObject("MTriggerPattern"); 520 if (!fTrigPattern) 521 { 522 *fLog << err << "MTriggerPattern not found... abort." << endl; 523 return kFALSE; 524 } 525 if (IsInterlacedTypePed()) 526 fMaskInterlaced |= MTriggerPattern::kPedestal; 527 if (IsInterlacedTypeCal()) 528 fMaskInterlaced |= MTriggerPattern::kCalibration; 529 if (IsInterlacedTypePin()) 530 fMaskInterlaced |= MTriggerPattern::kPinDiode; 531 } 532 527 533 return SetupHists(pList); 528 534 } … … 858 864 859 865 if (IsInterlaced()) 860 if (!(fEvtHeader->GetTriggerID() & BIT(1))) 866 // check whether one of the bits in fMaskInterlaced is set in the trigger pattern 867 if (!(fTrigPattern->GetPrescaled() & fMaskInterlaced)) 861 868 return kTRUE; 862 869 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.h
r5802 r5851 29 29 class MGeomCam; 30 30 class MRawRunHeader; 31 class M RawEvtHeader;31 class MTriggerPattern; 32 32 class MCalibrationIntensityCam; 33 33 class MCalibrationCam; … … 52 52 protected: 53 53 54 Int_t fNbins; // Number of bins55 Axis_t fFirst; // Lower histogram limit56 Axis_t fLast; // Upper histogram limit57 58 Float_t fProbLimit; // Limit for acceptance of probability of Gauss-Fit59 60 TString fHistName; //! Histogram names61 TString fHistTitle; //! Histogram titles62 TString fHistXTitle; //! Histogram x-axis titles63 TString fHistYTitle; //! Histogram y-axis titles64 65 Float_t fNumHiGainSaturationLimit; // Rel. amount sat. higain FADC slices until pixel is called saturated66 Float_t fNumLoGainSaturationLimit; // Rel. amount sat. logain FADC slices until pixel is called saturated67 68 MArrayI fRunNumbers; // Numbers of runs used69 70 MArrayF fAverageAreaRelSigma; // Re-normalized relative sigmas in average pixels per area71 MArrayF fAverageAreaRelSigmaVar; // Variance Re-normalized relative sigmas in average pixels per area72 MArrayI fAverageAreaSat; // Number of saturated slices in average pixels per area73 MArrayF fAverageAreaSigma; // Re-normalized sigmas in average pixels per area74 MArrayF fAverageAreaSigmaVar; // Variance Re-normalized sigmas in average pixels per area75 MArrayI fAverageAreaNum; // Number of pixels in average pixels per area76 MArrayI fAverageSectorNum; // Number of pixels in average pixels per sector77 78 TOrdCollection *fAverageHiGainAreas; // Array of calibration pixels, one per pixel area79 TOrdCollection *fAverageHiGainSectors; // Array of calibration pixels, one per camera sector80 TOrdCollection *fAverageLoGainAreas; // Array of calibration pixels, one per pixel area81 TOrdCollection *fAverageLoGainSectors; // Array of calibration pixels, one per camera sector82 83 MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs84 85 MBadPixelsIntensityCam *fIntensBad; //! Bad Pixels intensity calibration storage container86 MBadPixelsCam *fBadPixels; //! Bad Pixels storage container87 MCalibrationIntensityCam *fIntensCam; //! Intensity Calibration Cam with the results88 MCalibrationCam *fCam; //! Calibration Cam with the results89 MGeomCam *fGeom; //! Camera geometry90 MRawRunHeader *fRunHeader; //! Run Header91 M RawEvtHeader *fEvtHeader; //! Evt Header92 93 TOrdCollection *fHiGainArray; // Array of calibration pixels, one per pixel94 TOrdCollection *fLoGainArray; // Array of calibration pixels, one per pixel95 96 Int_t fPulserFrequency;// Light pulser frequency54 Int_t fNbins; // Number of bins 55 Axis_t fFirst; // Lower histogram limit 56 Axis_t fLast; // Upper histogram limit 57 58 Float_t fProbLimit; // Limit for acceptance of probability of Gauss-Fit 59 60 TString fHistName; //! Histogram names 61 TString fHistTitle; //! Histogram titles 62 TString fHistXTitle; //! Histogram x-axis titles 63 TString fHistYTitle; //! Histogram y-axis titles 64 65 Float_t fNumHiGainSaturationLimit; // Rel. amount sat. higain FADC slices until pixel is called saturated 66 Float_t fNumLoGainSaturationLimit; // Rel. amount sat. logain FADC slices until pixel is called saturated 67 68 MArrayI fRunNumbers; // Numbers of runs used 69 70 MArrayF fAverageAreaRelSigma; // Re-normalized relative sigmas in average pixels per area 71 MArrayF fAverageAreaRelSigmaVar; // Variance Re-normalized relative sigmas in average pixels per area 72 MArrayI fAverageAreaSat; // Number of saturated slices in average pixels per area 73 MArrayF fAverageAreaSigma; // Re-normalized sigmas in average pixels per area 74 MArrayF fAverageAreaSigmaVar; // Variance Re-normalized sigmas in average pixels per area 75 MArrayI fAverageAreaNum; // Number of pixels in average pixels per area 76 MArrayI fAverageSectorNum; // Number of pixels in average pixels per sector 77 78 TOrdCollection *fAverageHiGainAreas; // Array of calibration pixels, one per pixel area 79 TOrdCollection *fAverageHiGainSectors; // Array of calibration pixels, one per camera sector 80 TOrdCollection *fAverageLoGainAreas; // Array of calibration pixels, one per pixel area 81 TOrdCollection *fAverageLoGainSectors; // Array of calibration pixels, one per camera sector 82 83 MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs 84 85 MBadPixelsIntensityCam *fIntensBad; //! Bad Pixels intensity calibration storage container 86 MBadPixelsCam *fBadPixels; //! Bad Pixels storage container 87 MCalibrationIntensityCam *fIntensCam; //! Intensity Calibration Cam with the results 88 MCalibrationCam *fCam; //! Calibration Cam with the results 89 MGeomCam *fGeom; //! Camera geometry 90 MRawRunHeader *fRunHeader; //! Run Header 91 MTriggerPattern *fTrigPattern; //! Trigger Pattern 92 93 TOrdCollection *fHiGainArray; // Array of calibration pixels, one per pixel 94 TOrdCollection *fLoGainArray; // Array of calibration pixels, one per pixel 95 96 Int_t fPulserFrequency; // Light pulser frequency 97 97 98 98 enum { kDebug, kLoGain, kAverageing, 99 99 kOscillations, kSizeCheck, 100 kInterlaced }; // Possible flags 101 102 Byte_t fFlags; // Bit-field to hold the flags 100 kInterlaced }; // Possible global flags 101 102 Byte_t fFlags; // Bit-field to hold the global flags 103 104 enum InterlacedMode_t 105 { 106 kInterlacedPed = BIT(0), 107 kInterlacedCal = BIT(1), 108 kInterlacedPin = BIT(2) 109 }; // Possible interlaced event types to be treated 110 111 Byte_t fInterlacedFlags; // Bit-field to hold the interlaced flags 112 Byte_t fMaskInterlaced; // Mask to define the interlaced event types 103 113 104 114 virtual Bool_t SetupHists ( const MParList *pList ) { return kTRUE; } … … 148 158 Bool_t IsSizeCheck () const { return TESTBIT(fFlags,kSizeCheck); } 149 159 Bool_t IsInterlaced () const { return TESTBIT(fFlags,kInterlaced); } 150 151 void Remove(TOrdCollection *col); 152 153 Int_t ReadEnv ( const TEnv &env, TString prefix, Bool_t print); 160 161 Bool_t IsInterlacedTypePed() const { return TESTBIT(fInterlacedFlags,kInterlacedPed); } 162 Bool_t IsInterlacedTypeCal() const { return TESTBIT(fInterlacedFlags,kInterlacedCal); } 163 Bool_t IsInterlacedTypePin() const { return TESTBIT(fInterlacedFlags,kInterlacedPin); } 164 165 void Remove ( TOrdCollection *col ); 166 167 Int_t ReadEnv ( const TEnv &env, TString prefix, Bool_t print ); 154 168 155 169 public: … … 164 178 165 179 virtual void ResetHists(); 166 180 167 181 // Draw 168 182 void Draw(const Option_t *opt); … … 211 225 ? SETBIT(fFlags,kInterlaced) 212 226 : CLRBIT(fFlags,kInterlaced); } 227 228 void SetInterlacedTypePed() { SETBIT(fInterlacedFlags,kInterlacedPed); } 229 void SetInterlacedTypeCal() { SETBIT(fInterlacedFlags,kInterlacedCal); } 230 void SetInterlacedTypePin() { SETBIT(fInterlacedFlags,kInterlacedPin); } 231 213 232 void SetHistName ( const char *name ) { fHistName = name; } 214 233 void SetHistTitle ( const char *name ) { fHistTitle = name; } … … 226 245 void SetPulserFrequency ( const Int_t f=fgPulserFrequency) { fPulserFrequency = f; } 227 246 228 ClassDef(MHCalibrationCam, 2) // Base Histogram class for Calibration Camera247 ClassDef(MHCalibrationCam, 3) // Base Histogram class for Calibration Camera 229 248 }; 230 249
Note:
See TracChangeset
for help on using the changeset viewer.