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 */
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 ////////////////////////////////////////////////////////////
18 class AliITSOnlineSPDscan;
19 class AliITSOnlineCalibrationSPDhandler;
23 class AliITSOnlineSPDscanAnalyzer {
26 AliITSOnlineSPDscanAnalyzer(const Char_t *fileName, AliITSOnlineCalibrationSPDhandler *handler);
27 AliITSOnlineSPDscanAnalyzer(const AliITSOnlineSPDscanAnalyzer& handle);
28 ~AliITSOnlineSPDscanAnalyzer();
30 AliITSOnlineSPDscanAnalyzer& operator=(const AliITSOnlineSPDscanAnalyzer& handle);
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);
38 UInt_t GetType() const {return fType;}
39 UInt_t GetDacId() const {return fDacId;}
41 Int_t GetDelay(UInt_t hs, UInt_t chipNr);
42 Int_t GetMinTh(UInt_t hs, UInt_t chipNr);
44 Int_t GetNrNoisyUnima(UInt_t hs, UInt_t chipNr);
46 Bool_t ProcessDeadPixels();
47 Bool_t ProcessNoisyPixels();
49 Bool_t ProcessNrTriggers();
51 AliITSOnlineSPDscan* GetOnlineScan() {return fScanObj;}
53 Bool_t GetHalfStavePresent(UInt_t hs);
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);
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
68 AliITSOnlineSPDscan *fScanObj; // container obj
69 AliITSOnlineCalibrationSPDhandler *fHandler; // calib helper obj
70 Bool_t fbModuleScanned[240]; // is module used in scan?
72 TGraph* fMeanMultiplicity[6][11]; // mean mult graphs
73 TGraph* fHitEventEfficiency[6][11]; // hit event graphs
74 TGraph* fTriggers; // trigger graph
78 Bool_t ProcessMeanMultiplicity(); // process mean mult
79 Bool_t ProcessHitEventEfficiency();// process hit event eff
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
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