]>
Commit | Line | Data |
---|---|---|
4a66240a | 1 | #ifndef ALIITSPLANEEFFSPD_H |
2 | #define ALIITSPLANEEFFSPD_H | |
3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | ||
7 | #include "AliITSPlaneEff.h" | |
8 | ||
9 | /////////////////////////////////////////// | |
10 | // // | |
11 | // ITS Plane Efficiency class // | |
12 | // for SPD // | |
13 | /////////////////////////////////////////// | |
14 | ||
15 | /* $Id$ */ | |
16 | ||
17 | class AliITSPlaneEffSPD : public AliITSPlaneEff { | |
18 | public: | |
19 | AliITSPlaneEffSPD(); // default constructor | |
20 | virtual ~AliITSPlaneEffSPD(); // destructror | |
21 | // copy constructor | |
22 | AliITSPlaneEffSPD(const AliITSPlaneEffSPD &source); | |
23 | // ass. operator | |
24 | AliITSPlaneEffSPD& operator=(const AliITSPlaneEffSPD &s); | |
25 | virtual AliITSPlaneEff& operator=(const AliITSPlaneEff &source); | |
26 | // Simple way to add another class (i.e. statistics). | |
27 | AliITSPlaneEffSPD& operator +=( const AliITSPlaneEffSPD &add); | |
28 | // Getters for average Plane efficiency (icluding dead/noisy) | |
29 | Double_t PlaneEff(const UInt_t mod, const UInt_t chip) const; | |
30 | Double_t ErrPlaneEff(const UInt_t mod, const UInt_t chip) const; | |
31 | Double_t PlaneEff(const UInt_t key) const | |
32 | {return PlaneEff(GetModFromKey(key),GetChipFromKey(key));}; | |
33 | Double_t ErrPlaneEff(const UInt_t key) const | |
34 | {return ErrPlaneEff(GetModFromKey(key),GetChipFromKey(key));}; | |
35 | // Methods to update the Plane efficiency (specific of the SPD segmentation) | |
36 | Bool_t UpDatePlaneEff(const Bool_t Kfound, const UInt_t mod, const UInt_t chip); | |
37 | virtual Bool_t UpDatePlaneEff(const Bool_t Kfound, const UInt_t key) | |
38 | {return UpDatePlaneEff(Kfound,GetModFromKey(key),GetChipFromKey(key));}; | |
39 | // | |
40 | enum {kNModule = 240}; // The number of modules | |
41 | enum {kNChip = 5}; // The number of chips per module | |
42 | enum {kNCol = 32}; // The number of columns per chip | |
43 | enum {kNRow = 256}; // The number of rows per chip (and per module) | |
44 | // | |
45 | UInt_t GetChip(const UInt_t col) const; // get the chip number (from 0 to kNChip) | |
46 | // Plane efficiency for active detector (excluding dead/noisy channels) | |
47 | // access to DB is needed | |
48 | virtual Double_t LivePlaneEff(UInt_t key) const; | |
49 | Double_t LivePlaneEff(const UInt_t mod, const UInt_t chip) const | |
50 | {return LivePlaneEff(GetKey(mod,chip));}; | |
51 | virtual Double_t ErrLivePlaneEff(UInt_t key) const; | |
52 | Double_t ErrLivePlaneEff(const UInt_t mod, const UInt_t chip) const | |
53 | {return ErrLivePlaneEff(GetKey(mod,chip));}; | |
54 | // Compute the fraction of Live area (of the CHIP for the SPD) | |
55 | virtual Double_t GetFracLive(const UInt_t key) const; | |
56 | // Compute the fraction of bad (i.e. dead and noisy) area (of the CHIP for the SPD) | |
57 | virtual Double_t GetFracBad(const UInt_t key) const; | |
58 | virtual Bool_t WriteIntoCDB() const; | |
59 | virtual Bool_t ReadFromCDB(); // this method reads Data Members (statistics) from DataBase | |
60 | virtual Bool_t AddFromCDB() // this method updates Data Members (statistics) from DataBase | |
61 | {AliError("AddFromCDB: Still To be implemented"); return kFALSE;} | |
62 | ||
63 | protected: | |
64 | virtual void Copy(TObject &obj) const; | |
65 | Int_t GetMissingTracksForGivenEff(Double_t eff, Double_t RelErr, UInt_t im, UInt_t ic) const; | |
66 | ||
67 | // | |
68 | Int_t fFound[kNModule*kNChip]; // number of associated clusters in a given chip | |
69 | Int_t fTried[kNModule*kNChip]; // number of tracks used for chip efficiency evaluation | |
70 | private: | |
71 | UInt_t GetKey(const UInt_t mod, const UInt_t chip) const; // unique key to locate the basic | |
72 | // block of the SPD | |
73 | UInt_t GetModFromKey(const UInt_t key) const; | |
74 | UInt_t GetChipFromKey(const UInt_t key) const; | |
75 | UInt_t GetChipFromCol(const UInt_t col) const; | |
76 | void GetModAndChipFromKey(const UInt_t key, UInt_t& mod, UInt_t& chip) const; | |
77 | void GetDeadAndNoisyInChip(const UInt_t key, UInt_t& dead, UInt_t& noisy) const; | |
78 | ||
79 | ClassDef(AliITSPlaneEffSPD,1) // SPD Plane Efficiency class | |
80 | }; | |
81 | #endif | |
82 |