to avoid AliFatal, for MOOD and displays, use of ideal geometry parameters is permitt...
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDscanAnalyzer.h
CommitLineData
f0aa5f6c 1#ifndef ALIITSONLINESPDSCANANALYZER_H
2#define ALIITSONLINESPDSCANANALYZER_H
3
4////////////////////////////////////////////////////////////
5// Author: Henrik Tydesjo //
6// This class is used in the detector algorithm framework //
7// to process the data stored in special container files //
8// (see AliITSOnlineSPDscan). For instance, minimum //
9// threshold values can be calculated. //
10////////////////////////////////////////////////////////////
11
53ae21ce 12#include <TString.h>
f0aa5f6c 13
14class AliITSOnlineSPDscan;
15class AliITSOnlineCalibrationSPDhandler;
16class TGraph;
17class TH2F;
18
19class AliITSOnlineSPDscanAnalyzer {
20
21 public:
53ae21ce 22 AliITSOnlineSPDscanAnalyzer(const Char_t *fileName);
f0aa5f6c 23 AliITSOnlineSPDscanAnalyzer(const AliITSOnlineSPDscanAnalyzer& handle);
24 ~AliITSOnlineSPDscanAnalyzer();
25
26 AliITSOnlineSPDscanAnalyzer& operator=(const AliITSOnlineSPDscanAnalyzer& handle);
27
53ae21ce 28 void SetParam(const Char_t *pname, const Char_t *pval);
29
f0aa5f6c 30 UInt_t GetType() const {return fType;}
31 UInt_t GetDacId() const {return fDacId;}
32
33 Int_t GetDelay(UInt_t hs, UInt_t chipNr);
34 Int_t GetMinTh(UInt_t hs, UInt_t chipNr);
35
36 Int_t GetNrNoisyUnima(UInt_t hs, UInt_t chipNr);
37
38 Bool_t ProcessDeadPixels(Char_t *oldCalibDir);
39 Bool_t ProcessNoisyPixels(Char_t *oldCalibDir);
40 Bool_t SaveDeadNoisyPixels(UInt_t module, Char_t *calibDir);
41
42 Bool_t ProcessNrTriggers();
43
44 AliITSOnlineCalibrationSPDhandler* GetOnlineCalibrationHandler(UInt_t module);
45 AliITSOnlineSPDscan* GetOnlineScan() {return fScanObj;}
46 UInt_t GetRouterNr();
47 Bool_t GetHalfStavePresent(UInt_t hs);
48
49 TGraph* GetNrTriggersG();
50 TGraph* GetMeanMultiplicityG(UInt_t hs, UInt_t chipNr);
51 TGraph* GetHitEventEfficiencyG(UInt_t hs, UInt_t chipNr);
52 TH2F* GetHitMapTot(UInt_t step);
53
54
55 private:
56 UInt_t fType; // calib type
57 UInt_t fDacId; // dac id
53ae21ce 58 TString fFileName; // container file name
f0aa5f6c 59 enum calibvals{kMINTH,kMEANTH,kDAC,kUNIMA,kNOISE,kDELAY}; // calib types
60
61 AliITSOnlineSPDscan *fScanObj; // container obj
62 AliITSOnlineCalibrationSPDhandler *fHandler[240]; // calib help objs
63
64 TGraph* fMeanMultiplicity[6][11]; // mean mult graphs
65 TGraph* fHitEventEfficiency[6][11]; // hit event graphs
66 TGraph* fTriggers; // trigger graph
67
68 void Init(); // init
69
70 Bool_t ProcessMeanMultiplicity(); // process mean mult
71 Bool_t ProcessHitEventEfficiency();// process hit event eff
72
73 Int_t FindLastMinThDac(UInt_t hs, UInt_t chipNr); // dac value where fMinIncreaseFromBaseLine reached
74 Int_t FindClosestLowerStep(Float_t dacValueInput); // step closest (lower) to a dacvalue
75 Float_t GetCompareLine(UInt_t step, UInt_t hs, UInt_t chipNr, Float_t basePar2); // line to compare mean mult with
76
77 // dead noisy parameters:
78 Bool_t fOverWrite; // overWrite old dead/noisy or just add new ones to it
79 // noise scan parameters:
80 Float_t fNoiseThreshold; // ratio of allowed hits/triggers
81 UInt_t fNoiseMinimumEvents; // minimum events required to find noisy pixels
82 // min th scan parameters:
83 UInt_t fMinNrStepsBeforeIncrease; // min nr of steps required before fMinIncreaseFromBaseLine reached
84 Float_t fMinIncreaseFromBaseLine; // min increase of mean mult from base line
85 UInt_t fStepDownDacSafe; // nr of steps down to put threshold result (to be on the safe side)
86 Float_t fMaxBaseLineLevel; // maximum value for the base line to compare with
87
88};
89
90#endif