]>
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 // | |
6344adcc | 13 | // Origin: Giuseppe.Bruno@ba.infn.it // |
4a66240a | 14 | /////////////////////////////////////////// |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | class AliITSPlaneEffSPD : public AliITSPlaneEff { | |
19 | public: | |
20 | AliITSPlaneEffSPD(); // default constructor | |
21 | virtual ~AliITSPlaneEffSPD(); // destructror | |
22 | // copy constructor | |
23 | AliITSPlaneEffSPD(const AliITSPlaneEffSPD &source); | |
24 | // ass. operator | |
25 | AliITSPlaneEffSPD& operator=(const AliITSPlaneEffSPD &s); | |
7167ae53 | 26 | AliITSPlaneEff& operator=(const AliITSPlaneEff &source); |
27 | //AliPlaneEff& operator=(const AliPlaneEff &source); | |
4a66240a | 28 | // Simple way to add another class (i.e. statistics). |
29 | AliITSPlaneEffSPD& operator +=( const AliITSPlaneEffSPD &add); | |
30 | // Getters for average Plane efficiency (icluding dead/noisy) | |
31 | Double_t PlaneEff(const UInt_t mod, const UInt_t chip) const; | |
32 | Double_t ErrPlaneEff(const UInt_t mod, const UInt_t chip) const; | |
33 | Double_t PlaneEff(const UInt_t key) const | |
34 | {return PlaneEff(GetModFromKey(key),GetChipFromKey(key));}; | |
35 | Double_t ErrPlaneEff(const UInt_t key) const | |
36 | {return ErrPlaneEff(GetModFromKey(key),GetChipFromKey(key));}; | |
37 | // Methods to update the Plane efficiency (specific of the SPD segmentation) | |
38 | Bool_t UpDatePlaneEff(const Bool_t Kfound, const UInt_t mod, const UInt_t chip); | |
39 | virtual Bool_t UpDatePlaneEff(const Bool_t Kfound, const UInt_t key) | |
40 | {return UpDatePlaneEff(Kfound,GetModFromKey(key),GetChipFromKey(key));}; | |
41 | // | |
42 | enum {kNModule = 240}; // The number of modules | |
43 | enum {kNChip = 5}; // The number of chips per module | |
44 | enum {kNCol = 32}; // The number of columns per chip | |
45 | enum {kNRow = 256}; // The number of rows per chip (and per module) | |
46 | // | |
6344adcc | 47 | // UInt_t GetChip(const UInt_t col) const; // get the chip number (from 0 to kNChip) |
4a66240a | 48 | // Plane efficiency for active detector (excluding dead/noisy channels) |
49 | // access to DB is needed | |
50 | virtual Double_t LivePlaneEff(UInt_t key) const; | |
51 | Double_t LivePlaneEff(const UInt_t mod, const UInt_t chip) const | |
52 | {return LivePlaneEff(GetKey(mod,chip));}; | |
53 | virtual Double_t ErrLivePlaneEff(UInt_t key) const; | |
54 | Double_t ErrLivePlaneEff(const UInt_t mod, const UInt_t chip) const | |
55 | {return ErrLivePlaneEff(GetKey(mod,chip));}; | |
56 | // Compute the fraction of Live area (of the CHIP for the SPD) | |
57 | virtual Double_t GetFracLive(const UInt_t key) const; | |
58 | // Compute the fraction of bad (i.e. dead and noisy) area (of the CHIP for the SPD) | |
59 | virtual Double_t GetFracBad(const UInt_t key) const; | |
60 | virtual Bool_t WriteIntoCDB() const; | |
61 | virtual Bool_t ReadFromCDB(); // this method reads Data Members (statistics) from DataBase | |
62 | virtual Bool_t AddFromCDB() // this method updates Data Members (statistics) from DataBase | |
63 | {AliError("AddFromCDB: Still To be implemented"); return kFALSE;} | |
7167ae53 | 64 | // method to locate a basic block from Detector Local coordinate (to be used in tracking) |
65 | // see file cxx for numbering convention. | |
66 | // here idet runs from 0 to 79 for layer 0 and from 0 to 159 for layer 1 | |
67 | UInt_t GetKeyFromDetLocCoord(Int_t ilay,Int_t idet, Float_t, Float_t locz) const; | |
68 | UInt_t Nblock() const; // return the number of basic blocks | |
4a66240a | 69 | |
70 | protected: | |
71 | virtual void Copy(TObject &obj) const; | |
72 | Int_t GetMissingTracksForGivenEff(Double_t eff, Double_t RelErr, UInt_t im, UInt_t ic) const; | |
73 | ||
74 | // | |
75 | Int_t fFound[kNModule*kNChip]; // number of associated clusters in a given chip | |
76 | Int_t fTried[kNModule*kNChip]; // number of tracks used for chip efficiency evaluation | |
77 | private: | |
78 | UInt_t GetKey(const UInt_t mod, const UInt_t chip) const; // unique key to locate the basic | |
79 | // block of the SPD | |
80 | UInt_t GetModFromKey(const UInt_t key) const; | |
81 | UInt_t GetChipFromKey(const UInt_t key) const; | |
6344adcc | 82 | UInt_t GetChipFromCol(const UInt_t col) const; // get the chip number (from 0 to kNChip) |
7167ae53 | 83 | UInt_t GetColFromLocZ(Float_t zloc) const; // get the Column from the local z |
4a66240a | 84 | void GetModAndChipFromKey(const UInt_t key, UInt_t& mod, UInt_t& chip) const; |
85 | void GetDeadAndNoisyInChip(const UInt_t key, UInt_t& dead, UInt_t& noisy) const; | |
86 | ||
87 | ClassDef(AliITSPlaneEffSPD,1) // SPD Plane Efficiency class | |
88 | }; | |
7167ae53 | 89 | // |
90 | inline UInt_t AliITSPlaneEffSPD::Nblock() const {return kNModule*kNChip;} | |
91 | // | |
4a66240a | 92 | #endif |
93 |