]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSOnlineSPDscanAnalyzer.h
Cellular Automaton based SA tracker - first skeleton
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDscanAnalyzer.h
CommitLineData
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
19class AliITSOnlineSPDscan;
20class AliITSOnlineCalibrationSPDhandler;
21class TGraph;
22class TH2F;
bd464ffa 23class TArrayI;
f0aa5f6c 24
25class AliITSOnlineSPDscanAnalyzer {
26
27 public:
6ddf3d66 28 AliITSOnlineSPDscanAnalyzer(const Char_t *fileName, AliITSOnlineCalibrationSPDhandler *handler, Bool_t readFromGridFile=kFALSE);
f0aa5f6c 29 AliITSOnlineSPDscanAnalyzer(const AliITSOnlineSPDscanAnalyzer& handle);
30 ~AliITSOnlineSPDscanAnalyzer();
31
32 AliITSOnlineSPDscanAnalyzer& operator=(const AliITSOnlineSPDscanAnalyzer& handle);
33
4f88491f 34 Bool_t IsChipPresent(UInt_t hs, UInt_t chipNr);
6727e2db 35 Bool_t IsOverWriteSet() const {return fOverWrite;}
f652c3be 36 void SetCalibHandler(AliITSOnlineCalibrationSPDhandler * const handler) {fHandler=handler;}
53ae21ce 37 void SetParam(const Char_t *pname, const Char_t *pval);
6727e2db 38 void ReadParamsFromLocation(const Char_t *dirName);
53ae21ce 39
f0aa5f6c 40 UInt_t GetType() const {return fType;}
41 UInt_t GetDacId() const {return fDacId;}
f652c3be 42
f0aa5f6c 43 Int_t GetDelay(UInt_t hs, UInt_t chipNr);
44 Int_t GetMinTh(UInt_t hs, UInt_t chipNr);
bd464ffa 45 TArrayI GetMeanTh(UInt_t hs, UInt_t chipNr);
f0aa5f6c 46
47 Int_t GetNrNoisyUnima(UInt_t hs, UInt_t chipNr);
48
de12e454 49 Bool_t ProcessUniformity();
6727e2db 50 Bool_t ProcessDeadPixels();
51 Bool_t ProcessNoisyPixels();
f0aa5f6c 52
53 Bool_t ProcessNrTriggers();
54
f652c3be 55 AliITSOnlineSPDscan* GetOnlineScan() const {return fScanObj;}
f0aa5f6c 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);
bd464ffa 63 TH2F* GetPhysicalHitMapTot(UInt_t step);
6727e2db 64 TH2F* GetHitMapChip(UInt_t step, UInt_t hs, UInt_t chip);
f0aa5f6c 65
f652c3be 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];}
f0aa5f6c 75
76 private:
77 UInt_t fType; // calib type
78 UInt_t fDacId; // dac id
53ae21ce 79 TString fFileName; // container file name
f0aa5f6c 80 enum calibvals{kMINTH,kMEANTH,kDAC,kUNIMA,kNOISE,kDELAY}; // calib types
81
6727e2db 82 AliITSOnlineSPDscan *fScanObj; // container obj
83 AliITSOnlineCalibrationSPDhandler *fHandler; // calib helper obj
84 Bool_t fbModuleScanned[240]; // is module used in scan?
f0aa5f6c 85
86 TGraph* fMeanMultiplicity[6][11]; // mean mult graphs
87 TGraph* fHitEventEfficiency[6][11]; // hit event graphs
88 TGraph* fTriggers; // trigger graph
89
de12e454 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
6ddf3d66 101 void Init(Bool_t readFromGridFile=kFALSE); // init
f0aa5f6c 102
de12e454 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
f0aa5f6c 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
de12e454 124
125
f0aa5f6c 126};
127
128#endif
f652c3be 129
130