]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSOnlineSPDscanAnalyzer.h
Improvements and bug fixes for DAs and Preprocessor (H. Tydesjo)
[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>
f0aa5f6c 17
18class AliITSOnlineSPDscan;
19class AliITSOnlineCalibrationSPDhandler;
20class TGraph;
21class TH2F;
22
23class AliITSOnlineSPDscanAnalyzer {
24
25 public:
6727e2db 26 AliITSOnlineSPDscanAnalyzer(const Char_t *fileName, AliITSOnlineCalibrationSPDhandler *handler);
f0aa5f6c 27 AliITSOnlineSPDscanAnalyzer(const AliITSOnlineSPDscanAnalyzer& handle);
28 ~AliITSOnlineSPDscanAnalyzer();
29
30 AliITSOnlineSPDscanAnalyzer& operator=(const AliITSOnlineSPDscanAnalyzer& handle);
31
4f88491f 32 Bool_t IsChipPresent(UInt_t hs, UInt_t chipNr);
6727e2db 33 Bool_t IsOverWriteSet() const {return fOverWrite;}
34 void SetCalibHandler(AliITSOnlineCalibrationSPDhandler *handler) {fHandler=handler;}
53ae21ce 35 void SetParam(const Char_t *pname, const Char_t *pval);
6727e2db 36 void ReadParamsFromLocation(const Char_t *dirName);
53ae21ce 37
f0aa5f6c 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
6727e2db 46 Bool_t ProcessDeadPixels();
47 Bool_t ProcessNoisyPixels();
f0aa5f6c 48
49 Bool_t ProcessNrTriggers();
50
f0aa5f6c 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);
6727e2db 59 TH2F* GetHitMapChip(UInt_t step, UInt_t hs, UInt_t chip);
f0aa5f6c 60
61
62 private:
63 UInt_t fType; // calib type
64 UInt_t fDacId; // dac id
53ae21ce 65 TString fFileName; // container file name
f0aa5f6c 66 enum calibvals{kMINTH,kMEANTH,kDAC,kUNIMA,kNOISE,kDELAY}; // calib types
67
6727e2db 68 AliITSOnlineSPDscan *fScanObj; // container obj
69 AliITSOnlineCalibrationSPDhandler *fHandler; // calib helper obj
70 Bool_t fbModuleScanned[240]; // is module used in scan?
f0aa5f6c 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