]>
Commit | Line | Data |
---|---|---|
f0aa5f6c | 1 | #ifndef ALIITSONLINESPDSCANANALYZER_H |
2 | #define ALIITSONLINESPDSCANANALYZER_H | |
4ee23d3d | 3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
f0aa5f6c | 7 | |
8 | //////////////////////////////////////////////////////////// | |
9 | // Author: Henrik Tydesjo // | |
10 | // This class is used in the detector algorithm framework // | |
11 | // to process the data stored in special container files // | |
12 | // (see AliITSOnlineSPDscan). For instance, minimum // | |
6727e2db | 13 | // threshold values can be extracted. // |
f0aa5f6c | 14 | //////////////////////////////////////////////////////////// |
15 | ||
53ae21ce | 16 | #include <TString.h> |
de12e454 | 17 | #include <TH1F.h> |
f0aa5f6c | 18 | |
19 | class AliITSOnlineSPDscan; | |
20 | class AliITSOnlineCalibrationSPDhandler; | |
21 | class TGraph; | |
22 | class TH2F; | |
23 | ||
24 | class AliITSOnlineSPDscanAnalyzer { | |
25 | ||
26 | public: | |
6ddf3d66 | 27 | AliITSOnlineSPDscanAnalyzer(const Char_t *fileName, AliITSOnlineCalibrationSPDhandler *handler, Bool_t readFromGridFile=kFALSE); |
f0aa5f6c | 28 | AliITSOnlineSPDscanAnalyzer(const AliITSOnlineSPDscanAnalyzer& handle); |
29 | ~AliITSOnlineSPDscanAnalyzer(); | |
30 | ||
31 | AliITSOnlineSPDscanAnalyzer& operator=(const AliITSOnlineSPDscanAnalyzer& handle); | |
32 | ||
4f88491f | 33 | Bool_t IsChipPresent(UInt_t hs, UInt_t chipNr); |
6727e2db | 34 | Bool_t IsOverWriteSet() const {return fOverWrite;} |
f652c3be | 35 | void SetCalibHandler(AliITSOnlineCalibrationSPDhandler * const handler) {fHandler=handler;} |
53ae21ce | 36 | void SetParam(const Char_t *pname, const Char_t *pval); |
6727e2db | 37 | void ReadParamsFromLocation(const Char_t *dirName); |
53ae21ce | 38 | |
f0aa5f6c | 39 | UInt_t GetType() const {return fType;} |
40 | UInt_t GetDacId() const {return fDacId;} | |
f652c3be | 41 | |
f0aa5f6c | 42 | Int_t GetDelay(UInt_t hs, UInt_t chipNr); |
43 | Int_t GetMinTh(UInt_t hs, UInt_t chipNr); | |
f652c3be | 44 | Int_t GetMeanTh(UInt_t hs, UInt_t chipNr); |
f0aa5f6c | 45 | |
46 | Int_t GetNrNoisyUnima(UInt_t hs, UInt_t chipNr); | |
47 | ||
de12e454 | 48 | Bool_t ProcessUniformity(); |
6727e2db | 49 | Bool_t ProcessDeadPixels(); |
50 | Bool_t ProcessNoisyPixels(); | |
f0aa5f6c | 51 | |
52 | Bool_t ProcessNrTriggers(); | |
53 | ||
f652c3be | 54 | AliITSOnlineSPDscan* GetOnlineScan() const {return fScanObj;} |
f0aa5f6c | 55 | UInt_t GetRouterNr(); |
56 | Bool_t GetHalfStavePresent(UInt_t hs); | |
57 | ||
58 | TGraph* GetNrTriggersG(); | |
59 | TGraph* GetMeanMultiplicityG(UInt_t hs, UInt_t chipNr); | |
60 | TGraph* GetHitEventEfficiencyG(UInt_t hs, UInt_t chipNr); | |
61 | TH2F* GetHitMapTot(UInt_t step); | |
6727e2db | 62 | TH2F* GetHitMapChip(UInt_t step, UInt_t hs, UInt_t chip); |
f0aa5f6c | 63 | |
f652c3be | 64 | Float_t GetTPeff() const {return fTPeff;} |
65 | TH1F* GetTPeffHS() const {return fTPeffHS;} | |
66 | TH1F* GetTPeffChip(UInt_t hs) const {return fTPeffChip[hs];} | |
67 | Float_t GetDeadPixel() const {return fDeadPixel;} | |
68 | TH1F* GetDeadPixelHS() const {return fDeadPixelHS;} | |
69 | TH1F* GetDeadPixelChip(UInt_t hs) const {return fDeadPixelChip[hs];} | |
70 | Float_t GetNoisyPixel() const {return fNoisyPixel;} | |
71 | TH1F* GetNoisyPixelHS() const {return fNoisyPixelHS;} | |
72 | TH1F* GetNoisyPixelChip(UInt_t hs) const {return fNoisyPixelChip[hs];} | |
f0aa5f6c | 73 | |
74 | private: | |
75 | UInt_t fType; // calib type | |
76 | UInt_t fDacId; // dac id | |
53ae21ce | 77 | TString fFileName; // container file name |
f0aa5f6c | 78 | enum calibvals{kMINTH,kMEANTH,kDAC,kUNIMA,kNOISE,kDELAY}; // calib types |
79 | ||
6727e2db | 80 | AliITSOnlineSPDscan *fScanObj; // container obj |
81 | AliITSOnlineCalibrationSPDhandler *fHandler; // calib helper obj | |
82 | Bool_t fbModuleScanned[240]; // is module used in scan? | |
f0aa5f6c | 83 | |
84 | TGraph* fMeanMultiplicity[6][11]; // mean mult graphs | |
85 | TGraph* fHitEventEfficiency[6][11]; // hit event graphs | |
86 | TGraph* fTriggers; // trigger graph | |
87 | ||
de12e454 | 88 | // uniformity scan analysis: |
89 | Float_t fTPeff; // number of good pixels [%] (for full router) | |
90 | TH1F* fTPeffHS; // 6 bin histogram, number good pixels [%] (for each hs) | |
91 | TH1F* fTPeffChip[6]; // 10 bin histograms, number good pixels [%] (for each chip) | |
92 | Float_t fDeadPixel; // number of dead pixels [%] (for full router) | |
93 | TH1F* fDeadPixelHS; // 6 bin histogram, number dead pixels [%] (for each hs) | |
94 | TH1F* fDeadPixelChip[6]; // 10 bin histograms, number dead pixels [%] (for each chip) | |
95 | Float_t fNoisyPixel; // number of 'noisy' pixels [%] (for full router) | |
96 | TH1F* fNoisyPixelHS; // 6 bin histogram, number 'noisy' pixels [%] (for each hs) | |
97 | TH1F* fNoisyPixelChip[6]; // 10 bin histograms, number 'noisy' pixels [%] (for each chip) | |
98 | ||
6ddf3d66 | 99 | void Init(Bool_t readFromGridFile=kFALSE); // init |
f0aa5f6c | 100 | |
de12e454 | 101 | void CreateUniformityHistograms(); // method to create all histograms to be filled by 'ProcessUniformity' |
102 | void DeleteUniformityHistograms(); // method to delete all histograms used by uniformity scan analysis | |
103 | ||
f0aa5f6c | 104 | Bool_t ProcessMeanMultiplicity(); // process mean mult |
105 | Bool_t ProcessHitEventEfficiency();// process hit event eff | |
106 | ||
107 | Int_t FindLastMinThDac(UInt_t hs, UInt_t chipNr); // dac value where fMinIncreaseFromBaseLine reached | |
108 | Int_t FindClosestLowerStep(Float_t dacValueInput); // step closest (lower) to a dacvalue | |
109 | Float_t GetCompareLine(UInt_t step, UInt_t hs, UInt_t chipNr, Float_t basePar2); // line to compare mean mult with | |
110 | ||
111 | // dead noisy parameters: | |
112 | Bool_t fOverWrite; // overWrite old dead/noisy or just add new ones to it | |
113 | // noise scan parameters: | |
114 | Float_t fNoiseThreshold; // ratio of allowed hits/triggers | |
115 | UInt_t fNoiseMinimumEvents; // minimum events required to find noisy pixels | |
116 | // min th scan parameters: | |
117 | UInt_t fMinNrStepsBeforeIncrease; // min nr of steps required before fMinIncreaseFromBaseLine reached | |
118 | Float_t fMinIncreaseFromBaseLine; // min increase of mean mult from base line | |
119 | UInt_t fStepDownDacSafe; // nr of steps down to put threshold result (to be on the safe side) | |
120 | Float_t fMaxBaseLineLevel; // maximum value for the base line to compare with | |
121 | ||
de12e454 | 122 | |
123 | ||
f0aa5f6c | 124 | }; |
125 | ||
126 | #endif | |
f652c3be | 127 | |
128 |