]>
Commit | Line | Data |
---|---|---|
6344adcc | 1 | #ifndef ALIITSPLANEEFFSDD_H |
2 | #define ALIITSPLANEEFFSDD_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 SDD // | |
13 | // Origin: Giuseppe.Bruno@ba.infn.it // | |
14 | /////////////////////////////////////////// | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | class AliITSPlaneEffSDD : public AliITSPlaneEff { | |
19 | public: | |
20 | AliITSPlaneEffSDD(); // default constructor | |
21 | virtual ~AliITSPlaneEffSDD(); // destructror | |
22 | // copy constructor | |
23 | AliITSPlaneEffSDD(const AliITSPlaneEffSDD &source); | |
24 | // ass. operator | |
25 | AliITSPlaneEffSDD& operator=(const AliITSPlaneEffSDD &s); | |
26 | virtual AliITSPlaneEff& operator=(const AliITSPlaneEff &source); | |
27 | // Simple way to add another class (i.e. statistics). | |
28 | AliITSPlaneEffSDD& operator +=( const AliITSPlaneEffSDD &add); | |
29 | // Getters for average Plane efficiency (icluding dead/noisy) | |
30 | Double_t PlaneEff(const UInt_t mod, const UInt_t chip, | |
31 | const UInt_t wing, const UInt_t subw=0) const; | |
32 | Double_t ErrPlaneEff(const UInt_t mod, const UInt_t chip, | |
33 | const UInt_t wing, const UInt_t subw=0) const; | |
34 | Double_t PlaneEff(const UInt_t key) const | |
35 | {return PlaneEff(GetModFromKey(key),GetChipFromKey(key), | |
36 | GetWingFromKey(key),GetSubWingFromKey(key));}; | |
37 | Double_t ErrPlaneEff(const UInt_t key) const | |
38 | {return ErrPlaneEff(GetModFromKey(key),GetChipFromKey(key), | |
39 | GetWingFromKey(key),GetSubWingFromKey(key));}; | |
40 | // Methods to update the Plane efficiency (specific of the SDD segmentation) | |
41 | Bool_t UpDatePlaneEff(const Bool_t Kfound, const UInt_t mod, | |
42 | const UInt_t chip, const UInt_t wing, const UInt_t subw=0); | |
43 | virtual Bool_t UpDatePlaneEff(const Bool_t Kfound, const UInt_t key) | |
44 | {return UpDatePlaneEff(Kfound,GetModFromKey(key),GetChipFromKey(key), | |
45 | GetWingFromKey(key),GetSubWingFromKey(key));}; | |
46 | // | |
47 | enum {kNModule = 260}; // The number of modules (i.e. detector 7.25*7.53 cm^2) | |
48 | enum {kNChip = 4}; // The number of chips per half module (i.e. per wing, in total 4+4 chips) | |
49 | enum {kNWing = 2}; // The number of wings (this is hardware division of the module) | |
50 | enum {kNSubWing = 1}; // Eventually sub-divide each wing (by 2 ?) to account for different | |
51 | // efficiencies due to different drift times. | |
52 | enum {kNAnode = 64}; // Number of channels/chip (i.e. anodes per chip) | |
7167ae53 | 53 | //enum {kNTimeBin = 174}; // granularity along drift direction (i.e. segmentation in r-phi) |
6344adcc | 54 | // |
55 | // Plane efficiency for active detector (excluding dead/noisy channels) | |
56 | // access to DB is needed | |
57 | virtual Double_t LivePlaneEff(UInt_t key) const; | |
58 | Double_t LivePlaneEff(const UInt_t mod, const UInt_t chip, | |
59 | const UInt_t wing, const UInt_t subw=0) const | |
60 | {return LivePlaneEff(GetKey(mod,chip,wing,subw));}; | |
61 | virtual Double_t ErrLivePlaneEff(UInt_t key) const; | |
62 | Double_t ErrLivePlaneEff(const UInt_t mod, const UInt_t chip, | |
63 | const UInt_t wing, const UInt_t subw=0) const | |
64 | {return ErrLivePlaneEff(GetKey(mod,chip,wing,subw));}; | |
65 | // Compute the fraction of Live area (of the CHIP/SubWing for the SDD) | |
66 | virtual Double_t GetFracLive(const UInt_t key) const; | |
67 | // Compute the fraction of bad (i.e. dead and noisy) area (of the CHIP/SubWing for the SDD) | |
68 | virtual Double_t GetFracBad(const UInt_t key) const; | |
69 | virtual Bool_t WriteIntoCDB() const; | |
70 | virtual Bool_t ReadFromCDB(); // this method reads Data Members (statistics) from DataBase | |
71 | virtual Bool_t AddFromCDB() // this method updates Data Members (statistics) from DataBase | |
72 | {AliError("AddFromCDB: Still To be implemented"); return kFALSE;} | |
7167ae53 | 73 | // method to locate a basic block from Detector Local coordinate (to be used in tracking) |
74 | // see file cxx for numbering convention. | |
75 | // here idet runs from 0 to 83 for layer 2 and from 0 to 175 for layer 3 | |
76 | UInt_t GetKeyFromDetLocCoord(Int_t ilay,Int_t idet, Float_t locx, Float_t locz) const; | |
77 | UInt_t Nblock() const; // return the number of basic blocks | |
aa0de373 | 78 | // compute the geometrical limit of a basic block in detector local coordinate system |
79 | Bool_t GetBlockBoundaries(const UInt_t key,Float_t& xmn,Float_t& xmx,Float_t& zmn,Float_t& zmx) const; | |
6344adcc | 80 | |
81 | protected: | |
82 | virtual void Copy(TObject &obj) const; | |
83 | Int_t GetMissingTracksForGivenEff(Double_t eff, Double_t RelErr, | |
84 | UInt_t im, UInt_t ic, UInt_t iw, UInt_t isw=0) const; | |
85 | // | |
86 | Int_t fFound[kNModule*kNChip*kNWing*kNSubWing]; // number of associated clusters in a given block | |
87 | Int_t fTried[kNModule*kNChip*kNWing*kNSubWing]; // number of tracks used for efficiency evaluation | |
88 | private: | |
89 | UInt_t GetKey(const UInt_t mod, const UInt_t chip, // unique key to locate the | |
90 | const UInt_t wing, const UInt_t subw=0) const; // basic block of the SDD | |
91 | UInt_t GetModFromKey(const UInt_t key) const; | |
92 | UInt_t GetChipFromKey(const UInt_t key) const; | |
93 | UInt_t GetWingFromKey(const UInt_t key) const; | |
94 | UInt_t GetSubWingFromKey(const UInt_t key) const; | |
95 | // getters for chip and wing numbers, given the anode number [0,511] | |
96 | UInt_t ChipFromAnode(const UInt_t anode) const; // return the chip number (from 0 to kNChip-1) | |
97 | UInt_t WingFromAnode(const UInt_t anode) const; // return the wing number (from 0 to kNWing-1) | |
98 | void ChipAndWingFromAnode(const UInt_t anode,UInt_t& chip,UInt_t& wing) const; | |
7167ae53 | 99 | // return the Subwing (from 0 to kNSubWing-1) from the cell time bin in the range |
100 | // [0,ntb] and from the number of time bins | |
101 | UInt_t SubWingFromTimeBin(const Int_t tb, const Int_t ntb) const; | |
102 | ||
103 | void ChipAndWingAndSubWingFromLocCoor(Float_t locx, Float_t locz, | |
104 | UInt_t& chip, UInt_t& wing, UInt_t& subw) const; | |
6344adcc | 105 | // |
106 | void GetAllFromKey(const UInt_t key, UInt_t& mod, UInt_t& chip, | |
107 | UInt_t& wing, UInt_t& subw) const; | |
108 | void GetBadInBlock(const UInt_t key, UInt_t& bad) const; | |
109 | ||
110 | ClassDef(AliITSPlaneEffSDD,1) // SDD Plane Efficiency class | |
111 | }; | |
7167ae53 | 112 | // |
113 | inline UInt_t AliITSPlaneEffSDD::Nblock() const {return kNModule*kNChip*kNWing*kNSubWing;} | |
114 | // | |
6344adcc | 115 | #endif |
116 |