]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSMapSDD.h
Avoiding geometry lock/unlock (R. Grosso)
[u/mrichter/AliRoot.git] / ITS / AliITSMapSDD.h
CommitLineData
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// //
ba0a07bf 10// Mother 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"
efb451bf 17#include<TNamed.h>
d97eb3fe 18#include "AliLog.h"
efb451bf 19class TH1F;
20class TH2F;
21
22class AliITSMapSDD : public TNamed {
23
24 public:
25 AliITSMapSDD();
26 AliITSMapSDD(Char_t *mapname);
27 virtual ~AliITSMapSDD(){};
28
ba0a07bf 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));
c9a38d3d 43 return kFALSE;
d97eb3fe 44 }
c9a38d3d 45 return kTRUE;
46 }
ba0a07bf 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;
efb451bf 53 }
c9a38d3d 54
ba0a07bf 55 virtual void Set1DMap(TH1F* /*hmap*/){
56 AliError("Not implemented");
d97eb3fe 57 }
ba0a07bf 58 virtual void Set2DMap(TH2F* /*hmap*/){
59 AliError("Not implemented");
60 }
61
62 virtual void ResetMap() = 0;
63 virtual void SetCellContent(Int_t iAn, Int_t iTb, Float_t devMicron) = 0;
64 virtual Float_t GetCellContent(Int_t iAn, Int_t iTb) const = 0;
d97eb3fe 65
ba0a07bf 66 Float_t GetCorrection(Float_t z, Float_t x, AliITSsegmentationSDD *seg);
efb451bf 67 TH2F* GetMapHisto() const;
68 TH1F* GetResidualDistr(Float_t dmin=-300., Float_t dmax=300.) const;
69
ba0a07bf 70
efb451bf 71 protected:
ba0a07bf 72 enum {kMaxNAnodePts=256};// max number of map points along anodes
73 enum {kMaxNDriftPts=291};// max number of map points along drift
74
75 static const Int_t fgkNAnodePtsDefault; // default value for fNAnodePts
76 static const Int_t fgkNDriftPtsDefault; // default value for fNDriftPts
77
78 Int_t fNAnodePts; // number of map points along anodes
79 Int_t fNDriftPts; // number of map points along anodes
80
81 ClassDef(AliITSMapSDD,3);
efb451bf 82};
83#endif