]>
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 | // // | |
54af1add | 10 | // Class for SDD maps used to correct for // |
efb451bf | 11 | // voltage divider shape and doping fluctuations // |
12 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
13 | // // | |
14 | /////////////////////////////////////////////////////////////////// | |
15 | ||
c9a38d3d | 16 | #include "AliITSsegmentationSDD.h" |
54af1add | 17 | #include "AliITSCorrMapSDD.h" |
efb451bf | 18 | #include<TNamed.h> |
d97eb3fe | 19 | #include "AliLog.h" |
efb451bf | 20 | class TH1F; |
21 | class TH2F; | |
22 | ||
23 | class AliITSMapSDD : public TNamed { | |
24 | ||
25 | public: | |
26 | AliITSMapSDD(); | |
27 | AliITSMapSDD(Char_t *mapname); | |
28 | virtual ~AliITSMapSDD(){}; | |
29 | ||
54af1add | 30 | void SetMap(TH2F* hmap); |
31 | Bool_t CheckBounds(Int_t iAn, Int_t iTb) const { | |
32 | if(iAn<0 || iAn>=fgkNAnodPts || iTb<0 || iTb >= fgkNDrifPts){ | |
33 | AliWarning(Form("Cell out of bounds, anode=%d time-bin=%d",iAn,iTb)); | |
c9a38d3d | 34 | return kFALSE; |
d97eb3fe | 35 | } |
c9a38d3d | 36 | return kTRUE; |
37 | } | |
54af1add | 38 | void SetCellContent(Int_t iAn, Int_t iTb, Float_t devMicron){ |
39 | if(CheckBounds(iAn,iTb)) fMap[iAn][iTb]=(Short_t)(devMicron*10.+0.5); | |
efb451bf | 40 | } |
c9a38d3d | 41 | |
54af1add | 42 | Float_t GetCellContent(Int_t iAn, Int_t iTb) const { |
43 | if(CheckBounds(iAn,iTb)) return (Float_t)fMap[iAn][iTb]/10.; | |
44 | else return 0.; | |
ba0a07bf | 45 | } |
ba0a07bf | 46 | Float_t GetCorrection(Float_t z, Float_t x, AliITSsegmentationSDD *seg); |
54af1add | 47 | static Int_t GetNBinsAnode() {return fgkNAnodPts;} |
48 | static Int_t GetNBinsDrift() {return fgkNDrifPts;} | |
49 | AliITSCorrMapSDD* ConvertToNewFormat() const; | |
50 | ||
efb451bf | 51 | TH2F* GetMapHisto() const; |
52 | TH1F* GetResidualDistr(Float_t dmin=-300., Float_t dmax=300.) const; | |
53 | ||
54 | protected: | |
54af1add | 55 | static const Int_t fgkNAnodPts = 256; // number of map points along anodes |
56 | static const Int_t fgkNDrifPts = 72; // number of map points along anodes | |
57 | Short_t fMap[fgkNAnodPts][fgkNDrifPts]; // map of deviations | |
58 | // stored as Short_t: integer | |
59 | // values from -32000 to 32000 | |
60 | // in the range -3.2 - 3.2 mm | |
ba0a07bf | 61 | |
54af1add | 62 | ClassDef(AliITSMapSDD,2); |
efb451bf | 63 | }; |
64 | #endif |