1 #ifndef ALIITSONLINESPDPHYSANALYZER_H
2 #define ALIITSONLINESPDPHYSANALYZER_H
3 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 ////////////////////////////////////////////////////////////
7 // Author: Henrik Tydesjo //
8 // This class is used in the detector algorithm framework //
9 // to process the data stored in special container files //
10 // (see AliITSOnlineSPDphys). //
11 ////////////////////////////////////////////////////////////
15 class AliITSOnlineSPDphys;
16 class AliITSOnlineCalibrationSPDhandler;
20 class AliITSOnlineSPDphysAnalyzer {
23 AliITSOnlineSPDphysAnalyzer(const Char_t *fileName, AliITSOnlineCalibrationSPDhandler* handler);
24 AliITSOnlineSPDphysAnalyzer(AliITSOnlineSPDphys* physObj, AliITSOnlineCalibrationSPDhandler* handler);
25 AliITSOnlineSPDphysAnalyzer(const AliITSOnlineSPDphysAnalyzer& handle);
26 ~AliITSOnlineSPDphysAnalyzer();
28 AliITSOnlineSPDphysAnalyzer& operator=(const AliITSOnlineSPDphysAnalyzer& handle);
30 void SetCalibHandler(AliITSOnlineCalibrationSPDhandler *handler) {fHandler=handler;}
31 void SetParam(const Char_t *pname, const Char_t *pval);
32 void ReadParamsFromLocation(const Char_t *dirName);
34 UInt_t ProcessDeadPixels();
35 UInt_t ProcessNoisyPixels();
37 UInt_t GetNrEnoughStatChips();
38 UInt_t GetNrDeadChips();
39 UInt_t GetNrInefficientChips();
40 UInt_t GetNrNeedsMoreStatChips();
42 AliITSOnlineSPDphys* GetOnlinePhys() {return fPhysObj;}
43 UInt_t GetEqNr() const;
44 UInt_t GetNrEvents() const;
47 TH2F* GetHitMapChip(UInt_t hs, UInt_t chip);
50 TString fFileName; // container file name
51 enum calibvals{kMINTH,kMEANTH,kDAC,kUNIMA,kNOISE,kDELAY}; // calib types
52 AliITSOnlineSPDphys *fPhysObj; // container obj
53 AliITSOnlineCalibrationSPDhandler *fHandler; // calib helper obj
54 void Init(); // initialization
55 void Exponent(Double_t &val, Int_t &valExp) const;
57 UInt_t fNrEnoughStatChips; // nr of enough stat chips
58 UInt_t fNrDeadChips; // nr of dead chips
59 UInt_t fNrInefficientChips; // nr of inefficient chips
61 Double_t fNrEqHits; // total nr of hits for associated eq
62 Bool_t fbDeadProcessed; // flag to tell if ProcessDeadPixels has been called
64 // dead noisy parameters:
65 Double_t fThreshNoisy; // at what confidence level do we search for noisy
66 Int_t fThreshNoisyExp; // at what confidence level do we search for noisy
67 Double_t fThreshDead; // at what confidence level do we search for dead
68 Int_t fThreshDeadExp; // at what confidence level do we search for dead
69 UInt_t fMinEventsForNoisy; // min nr of events required to try noisy algorithm
70 UInt_t fMinEventsForDead; // min nr of events required to try dead algorithm
71 Float_t fDefinitelyNoisyRatio; // if a pixel fires more than this ratio of the events, it must be noisy
72 Double_t fMinNrEqHitsForDeadChips; // minimum nr of hits for eq to assign dead chip
73 Double_t fRatioToMeanForInefficientChip; // ratio to mean nr of hits per chip to assign ineff. chip