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