]>
Commit | Line | Data |
---|---|---|
efb451bf | 1 | #ifndef ALIITSMAPSDD_H |
2 | #define ALIITSMAPSDD_H | |
3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // Class for SDD maps used to correct for // | |
11 | // voltage divider shape and doping fluctuations // | |
12 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
13 | // // | |
14 | /////////////////////////////////////////////////////////////////// | |
15 | ||
c9a38d3d | 16 | #include "AliITSsegmentationSDD.h" |
efb451bf | 17 | #include<TNamed.h> |
d97eb3fe | 18 | #include "AliLog.h" |
efb451bf | 19 | class TH1F; |
20 | class TH2F; | |
21 | ||
22 | class AliITSMapSDD : public TNamed { | |
23 | ||
24 | public: | |
25 | AliITSMapSDD(); | |
26 | AliITSMapSDD(Char_t *mapname); | |
27 | virtual ~AliITSMapSDD(){}; | |
28 | ||
29 | void SetMap(TH2F* hmap); | |
c9a38d3d | 30 | Bool_t CheckBounds(Int_t iAn, Int_t iTb) const { |
31 | if(iAn<0 || iAn>=fgkNAnodPts || iTb<0 || iTb >= fgkNDrifPts){ | |
d97eb3fe | 32 | AliWarning(Form("Cell out of bounds, anode=%d time-bin=%d",iAn,iTb)); |
c9a38d3d | 33 | return kFALSE; |
d97eb3fe | 34 | } |
c9a38d3d | 35 | return kTRUE; |
36 | } | |
37 | void SetCellContent(Int_t iAn, Int_t iTb, Float_t devMicron){ | |
38 | if(CheckBounds(iAn,iTb)) fMap[iAn][iTb]=devMicron; | |
efb451bf | 39 | } |
c9a38d3d | 40 | |
d97eb3fe | 41 | Float_t GetCellContent(Int_t iAn, Int_t iTb) const { |
c9a38d3d | 42 | if(CheckBounds(iAn,iTb)) return fMap[iAn][iTb]; |
43 | else return 0.; | |
d97eb3fe | 44 | } |
c9a38d3d | 45 | Float_t GetCorrection(Float_t z, Float_t x, AliITSsegmentationSDD *seg); |
46 | static Int_t GetNBinsAnode() {return fgkNAnodPts;} | |
47 | static Int_t GetNBinsDrift() {return fgkNDrifPts;} | |
d97eb3fe | 48 | |
efb451bf | 49 | TH2F* GetMapHisto() const; |
50 | TH1F* GetResidualDistr(Float_t dmin=-300., Float_t dmax=300.) const; | |
51 | ||
52 | protected: | |
53 | static const Int_t fgkNAnodPts = 256; // number of map points along anodes | |
54 | static const Int_t fgkNDrifPts = 72; // number of map points along anodes | |
55 | Float_t fMap[fgkNAnodPts][fgkNDrifPts]; // map of deviations | |
56 | ||
57 | ClassDef(AliITSMapSDD,1); | |
58 | }; | |
59 | #endif |