]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSCorrMapSDD.h
added the fragmentation function task to the train
[u/mrichter/AliRoot.git] / ITS / AliITSCorrMapSDD.h
1 #ifndef ALIITSCORRMAPSDD_H
2 #define ALIITSCORRMAPSDD_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 // Mother 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
16 #include "AliITSsegmentationSDD.h"
17 #include<TNamed.h>
18 #include "AliLog.h"
19 class TH1F;
20 class TH2F;
21
22 class AliITSCorrMapSDD : public TNamed {
23
24  public:
25   AliITSCorrMapSDD();
26   AliITSCorrMapSDD(Char_t *mapname);
27   virtual ~AliITSCorrMapSDD(){};
28
29   Int_t GetNBinsAnode() const {return fNAnodePts;}
30   Int_t GetNBinsDrift() const {return fNDriftPts;}
31   void SetNBinsAnode(Int_t nbins) {
32     if(nbins<=kMaxNAnodePts) fNAnodePts=nbins;
33     else AliError(Form("Max. number of anode bins = %d",kMaxNAnodePts));
34   }
35   void SetNBinsDrift(Int_t nbins) {
36     if(nbins<=kMaxNDriftPts) fNDriftPts=nbins;
37     else AliError(Form("Max. number of drift bins = %d",kMaxNDriftPts));
38   }
39
40   Bool_t CheckAnodeBounds(Int_t iAn) const {
41     if(iAn<0 || iAn>=fNAnodePts){
42       AliWarning(Form("Cell out of bounds, anode=%d",iAn));
43       return kFALSE;
44     }
45     return kTRUE;
46   }
47   Bool_t CheckDriftBounds(Int_t iTb) const {
48     if(iTb<0 || iTb >= fNDriftPts){ 
49       AliWarning(Form("Cell out of bounds, time-bin=%d",iTb));
50       return kFALSE;
51     }
52     return kTRUE;
53   }
54
55   virtual void Set1DMap(TH1F* /*hmap*/){
56     AliError("Not implemented");
57   }
58   virtual void Set2DMap(TH2F* /*hmap*/){
59     AliError("Not implemented");
60   }
61
62   virtual void ResetMap(){
63     AliError("Not implemented");
64   }
65   virtual void SetCellContent(Int_t /*iAn*/, Int_t /*iTb*/, Float_t /*devMicron*/){
66     AliError("Not implemented");
67   }
68   virtual Float_t GetCellContent(Int_t /*iAn*/, Int_t /*iTb*/) const {
69     AliError("Not implemented");
70     return -99999.;
71   }
72
73   Float_t GetCorrection(Float_t z, Float_t x, AliITSsegmentationSDD *seg);
74   TH2F* GetMapHisto() const;
75   TH1F* GetMapProfile() const;
76   TH1F* GetResidualDistr(Float_t dmin=-300., Float_t dmax=300.) const;
77
78
79  protected:
80
81   enum {kMaxNAnodePts=256};// max number of map points along anodes
82   enum {kMaxNDriftPts=291};// max number of map points along drift
83
84   static const Int_t fgkNAnodePtsDefault; // default value for fNAnodePts
85   static const Int_t fgkNDriftPtsDefault; // default value for fNDriftPts
86   Int_t fNAnodePts; // number of map points along anodes
87   Int_t fNDriftPts; // number of map points along anodes
88
89   ClassDef(AliITSCorrMapSDD,1);
90 };
91 #endif