]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIITSONLINESPDSCANANALYZER_H | |
2 | #define ALIITSONLINESPDSCANANALYZER_H | |
3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
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 // | |
13 | // threshold values can be extracted. // | |
14 | //////////////////////////////////////////////////////////// | |
15 | ||
16 | #include <TString.h> | |
17 | ||
18 | class AliITSOnlineSPDscan; | |
19 | class AliITSOnlineCalibrationSPDhandler; | |
20 | class TGraph; | |
21 | class TH2F; | |
22 | ||
23 | class AliITSOnlineSPDscanAnalyzer { | |
24 | ||
25 | public: | |
26 | AliITSOnlineSPDscanAnalyzer(const Char_t *fileName, AliITSOnlineCalibrationSPDhandler *handler); | |
27 | AliITSOnlineSPDscanAnalyzer(const AliITSOnlineSPDscanAnalyzer& handle); | |
28 | ~AliITSOnlineSPDscanAnalyzer(); | |
29 | ||
30 | AliITSOnlineSPDscanAnalyzer& operator=(const AliITSOnlineSPDscanAnalyzer& handle); | |
31 | ||
32 | Bool_t IsChipPresent(UInt_t hs, UInt_t chipNr); | |
33 | Bool_t IsOverWriteSet() const {return fOverWrite;} | |
34 | void SetCalibHandler(AliITSOnlineCalibrationSPDhandler *handler) {fHandler=handler;} | |
35 | void SetParam(const Char_t *pname, const Char_t *pval); | |
36 | void ReadParamsFromLocation(const Char_t *dirName); | |
37 | ||
38 | UInt_t GetType() const {return fType;} | |
39 | UInt_t GetDacId() const {return fDacId;} | |
40 | ||
41 | Int_t GetDelay(UInt_t hs, UInt_t chipNr); | |
42 | Int_t GetMinTh(UInt_t hs, UInt_t chipNr); | |
43 | ||
44 | Int_t GetNrNoisyUnima(UInt_t hs, UInt_t chipNr); | |
45 | ||
46 | Bool_t ProcessDeadPixels(); | |
47 | Bool_t ProcessNoisyPixels(); | |
48 | ||
49 | Bool_t ProcessNrTriggers(); | |
50 | ||
51 | AliITSOnlineSPDscan* GetOnlineScan() {return fScanObj;} | |
52 | UInt_t GetRouterNr(); | |
53 | Bool_t GetHalfStavePresent(UInt_t hs); | |
54 | ||
55 | TGraph* GetNrTriggersG(); | |
56 | TGraph* GetMeanMultiplicityG(UInt_t hs, UInt_t chipNr); | |
57 | TGraph* GetHitEventEfficiencyG(UInt_t hs, UInt_t chipNr); | |
58 | TH2F* GetHitMapTot(UInt_t step); | |
59 | TH2F* GetHitMapChip(UInt_t step, UInt_t hs, UInt_t chip); | |
60 | ||
61 | ||
62 | private: | |
63 | UInt_t fType; // calib type | |
64 | UInt_t fDacId; // dac id | |
65 | TString fFileName; // container file name | |
66 | enum calibvals{kMINTH,kMEANTH,kDAC,kUNIMA,kNOISE,kDELAY}; // calib types | |
67 | ||
68 | AliITSOnlineSPDscan *fScanObj; // container obj | |
69 | AliITSOnlineCalibrationSPDhandler *fHandler; // calib helper obj | |
70 | Bool_t fbModuleScanned[240]; // is module used in scan? | |
71 | ||
72 | TGraph* fMeanMultiplicity[6][11]; // mean mult graphs | |
73 | TGraph* fHitEventEfficiency[6][11]; // hit event graphs | |
74 | TGraph* fTriggers; // trigger graph | |
75 | ||
76 | void Init(); // init | |
77 | ||
78 | Bool_t ProcessMeanMultiplicity(); // process mean mult | |
79 | Bool_t ProcessHitEventEfficiency();// process hit event eff | |
80 | ||
81 | Int_t FindLastMinThDac(UInt_t hs, UInt_t chipNr); // dac value where fMinIncreaseFromBaseLine reached | |
82 | Int_t FindClosestLowerStep(Float_t dacValueInput); // step closest (lower) to a dacvalue | |
83 | Float_t GetCompareLine(UInt_t step, UInt_t hs, UInt_t chipNr, Float_t basePar2); // line to compare mean mult with | |
84 | ||
85 | // dead noisy parameters: | |
86 | Bool_t fOverWrite; // overWrite old dead/noisy or just add new ones to it | |
87 | // noise scan parameters: | |
88 | Float_t fNoiseThreshold; // ratio of allowed hits/triggers | |
89 | UInt_t fNoiseMinimumEvents; // minimum events required to find noisy pixels | |
90 | // min th scan parameters: | |
91 | UInt_t fMinNrStepsBeforeIncrease; // min nr of steps required before fMinIncreaseFromBaseLine reached | |
92 | Float_t fMinIncreaseFromBaseLine; // min increase of mean mult from base line | |
93 | UInt_t fStepDownDacSafe; // nr of steps down to put threshold result (to be on the safe side) | |
94 | Float_t fMaxBaseLineLevel; // maximum value for the base line to compare with | |
95 | ||
96 | }; | |
97 | ||
98 | #endif |