source: trunk/MagicSoft/Mars/mjobs/MJCalibration.h@ 3828

Last change on this file since 3828 was 3797, checked in by reyes, 21 years ago
*** empty log message ***
File size: 3.8 KB
Line 
1#ifndef MARS_MJCalibration
2#define MARS_MJCalibration
3
4#ifndef MARS_MCalibrationChargeCam
5#include "MCalibrationChargeCam.h"
6#endif
7#ifndef MARS_MCalibrationRelTimeCam
8#include "MCalibrationRelTimeCam.h"
9#endif
10#ifndef MARS_MCalibrationQECam
11#include "MCalibrationQECam.h"
12#endif
13#ifndef MARS_MBadPixelsCam
14#include "MBadPixelsCam.h"
15#endif
16
17class TCanvas;
18class MHCamera;
19class MCamEvent;
20class MRunIter;
21class MParList;
22class MPedestalCam;
23class MJCalibration : public MParContainer
24{
25private:
26
27 TString fOutputPath; // Path to the output files
28
29 MRunIter *fRuns; // Calibration files
30
31 MBadPixelsCam fBadPixels; // Bad Pixels cam, can be set from previous runs
32 MCalibrationChargeCam fCalibrationCam; // Calibration conversion factors FADC2Phe
33 MCalibrationQECam fQECam; // Quantum efficiency, can be set from previous runs
34 MCalibrationRelTimeCam fRelTimeCam; // Calibration constants rel. times
35
36 MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs
37
38 enum Display_t { kFullDisplay, kDataCheckDisplay, kNormalDisplay }; // Possible Display types
39
40 Display_t fDisplayType; // Chosen Display type
41
42 Bool_t fRelTimes; // Flag if relative times have to be calibrated
43 Bool_t fDataCheck; // Flag if the data check is run on raw data
44 UInt_t fExtractorLevel; // Level signal extractor (e.g. MExtractSignal2)
45 UInt_t fArrivalTimeLevel; // Level arr. time extractor (e.g. MArrivalTimeCalc2)
46
47 void DrawProjection ( MHCamera *obj, Int_t fit) const; // Draw projection of pixels values
48 void DrawRadialProfile( MHCamera *obj) const; // Draw projection of pixels values onto camera radius
49 void CamDraw(TCanvas &c, const Int_t x, const Int_t y, const MHCamera &cam1,
50 const Int_t fit, const Int_t rad=0); // Draw histograms into the MStatusDisplay
51
52 void DisplayResult(MParList &plist);
53 Bool_t WriteResult();
54
55public:
56
57 MJCalibration(const char *name=NULL, const char *title=NULL);
58
59 void SetInput(MRunIter *iter) { fRuns=iter; }
60 void SetOutputPath(const char *path=".");
61
62 TString GetOutputFile() const;
63
64 MCalibrationChargeCam &GetCalibrationCam() { return fCalibrationCam; }
65 MCalibrationRelTimeCam &GetRelTimeCam() { return fRelTimeCam; }
66 MCalibrationQECam &GetQECam() { return fQECam; }
67 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
68
69 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
70 void SetQECam (const MCalibrationQECam &qe) { qe.Copy(fQECam); }
71 void SetColor (const MCalibrationCam::PulserColor_t color) { fColor = color; }
72
73 // Displays
74 void SetFullDisplay() { fDisplayType = kFullDisplay; }
75 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
76 void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
77
78 // Rel. Time
79 void SetRelTimeCalibration(const Bool_t b=kTRUE) { fRelTimes = b; }
80
81 // Data Check
82 void SetDataCheck (const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); }
83
84 // Extractors
85 void SetExtractorLevel (const UInt_t i=1 ) { fExtractorLevel = i; }
86 void SetArrivalTimeLevel (const UInt_t i=1 ) { fArrivalTimeLevel = i; }
87
88
89 Bool_t ReadCalibrationCam();
90 Bool_t ProcessFile( MPedestalCam &pedcam );
91 Bool_t Process ( MPedestalCam &pedcam );
92
93 ClassDef(MJCalibration, 0) // Tool to run a calibration per pulser colour and intensity
94};
95
96#endif
Note: See TracBrowser for help on using the repository browser.