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

Last change on this file since 3762 was 3737, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.5 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, kDataCheck, 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 UInt_t fExtractorLevel; // Level signal extractor (e.g. MExtractSignal2)
44 UInt_t fArrivalTimeLevel; // Level arr. time extractor (e.g. MArrivalTimeCalc2)
45
46 void DrawProjection ( MHCamera *obj, Int_t fit) const; // Draw projection of pixels values
47 void DrawRadialProfile( MHCamera *obj) const; // Draw projection of pixels values onto camera radius
48 void CamDraw(TCanvas &c, const Int_t x, const Int_t y, const MHCamera &cam1,
49 const Int_t fit, const Int_t rad=0); // Draw histograms into the MStatusDisplay
50
51 void DisplayResult(MParList &plist);
52 Bool_t WriteResult();
53
54public:
55
56 MJCalibration(const char *name=NULL, const char *title=NULL);
57
58 void SetInput(MRunIter *iter) { fRuns=iter; }
59 void SetOutputPath(const char *path=".");
60
61 TString GetOutputFile() const;
62
63 MCalibrationChargeCam &GetCalibrationCam() { return fCalibrationCam; }
64 MCalibrationRelTimeCam &GetRelTimeCam() { return fRelTimeCam; }
65 MCalibrationQECam &GetQECam() { return fQECam; }
66 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
67
68 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
69 void SetQECam (const MCalibrationQECam &qe) { qe.Copy(fQECam); }
70 void SetColor (const MCalibrationCam::PulserColor_t color) { fColor = color; }
71
72 // Displays
73 void SetFullDisplay() { fDisplayType = kFullDisplay; }
74 void SetDataCheck() { fDisplayType = kDataCheck; }
75 void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
76
77 // Rel. Time
78 void SetRelTimeCalibration(const Bool_t b=kTRUE) { fRelTimes = b; }
79
80 // Extractors
81 void SetExtractorLevel (const UInt_t i=1 ) { fExtractorLevel = i; }
82 void SetArrivalTimeLevel (const UInt_t i=1 ) { fArrivalTimeLevel = i; }
83
84
85 Bool_t ReadCalibrationCam();
86 Bool_t ProcessFile( MPedestalCam &pedcam );
87 Bool_t Process ( MPedestalCam &pedcam );
88
89 ClassDef(MJCalibration, 0) // Tool to run a calibration per pulser colour and intensity
90};
91
92#endif
Note: See TracBrowser for help on using the repository browser.