HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hshowerdigipar.h
Go to the documentation of this file.
1 #ifndef HSHOWERDIGIPAR_H
2 #define HSHOWERDIGIPAR_H
3 
4 #include "hparcond.h"
5 #include "TH1D.h"
6 #include "TH2D.h"
7 #include "TArrayF.h"
8 #include "TArrayD.h"
9 #include "TObjArray.h"
10 
11 class HShowerDigiPar : public HParCond {
12 private:
13  TArrayF gain; // gain of the 18 chambers
14  TArrayF threshold; // charge threshold for efficiency determination for 18 chambers
15 
16  TArrayF effScaleMap; // efficiency mapping sector, module, row, col [6*3*32*32]
17  TArrayD globalEff; // global function - Efficiency (Beta) scaled up & down
18  TArrayD chargeVsBeta[6][3]; // charge arrays per Beta
19 
20  Float_t fThickDet; // thickness of gas chamber
21  Int_t nMatrixRange; // size of pfChargeMatrix = 2*nMatrixRange+1
22  Float_t fBoxSize; // size of element of charge density matrix
23  Float_t fChargeSlope; // charge distribution slope parameter
24  Float_t fPlaneDist; // plane cathod to sense wires plane distance
25  Float_t fPadThreshold; // charge threshold for a pad
26  Float_t fUpdatePadThreshold; // charge threshold for track updating
27 
28  Int_t chargeMatrixSize; //! size of pfChargeMatrix = 2*nMatrixRange+1
29  Float_t *pfChargeMatrix; //! charge density matrix
30 
31  Int_t nGlobalEffBins; //! number of bins in efficiency histograms
32  Int_t nQvBxbins[6][3]; //! number of Q bins in Q(beta) propability histogram
33 
34  TH1D *phEff; //! efficiency(beta) histogram
35  TH2D *ph2QvB[6][3]; //! Q(beta) propability histogram
36  TObjArray *pArrayQvB[6][3]; //! array of 1-dim Q histograms
37 
38 public:
39  HShowerDigiPar(const Char_t* name="ShowerDigiPar",
40  const Char_t* title="Digitisation parameters for Shower",
41  const Char_t* context="ShowerStandardDigiPar");
43 
44  void clear(void);
45  Bool_t init(HParIo*, Int_t*);
46  void putParams(HParamList*);
47  Bool_t getParams(HParamList*);
48 
49  Float_t getGain(Int_t sec, Int_t mod) { return gain.At(sec*3+mod); }
50  Float_t getThreshold(Int_t sec, Int_t mod) { return threshold.At(sec*3+mod); }
51 
52  Float_t getThickDet() { return fThickDet; }
53  Int_t getMatrixRange() { return nMatrixRange; }
54  Float_t getBoxSize() { return fBoxSize; }
55  Float_t getChargeSlope() { return fChargeSlope; }
56  Float_t getPlaneDist() { return fPlaneDist; }
57  Float_t getPadThreshold() { return fPadThreshold; }
59 
60  void setGain(Int_t sec, Int_t mod, Float_t fGain) { gain.AddAt(fGain,sec*3+mod); }
61  void setThreshold(Int_t sec, Int_t mod, Float_t fThres) { threshold.AddAt(fThres,sec*3+mod); }
62 
63  void setThickDet(Float_t fThick) { fThickDet = fThick; }
64  void setMatrixRange(Int_t iRange) { nMatrixRange = iRange; }
65  void setBoxSize(Float_t fSize) { fBoxSize = fSize; }
66  void setChargeSlope(Float_t fSlope) { fChargeSlope = fSlope; }
67  void setPlaneDist(Float_t fDist) { fPlaneDist = fDist; }
68  void setPadThreshold(Float_t fThres) { fPadThreshold = fThres; }
69  void setUpdatePadThreshold(Float_t fThres) { fUpdatePadThreshold = fThres; }
70 
71  void setEffScaleMap(TArrayF&);
72  TArrayF& getEffScaleMap() { return effScaleMap;}
73  void setGlobalEff(TArrayD&);
74  void setChargeVsBeta(Int_t, Int_t, TArrayD&);
75  Bool_t recreateHistograms();
76 
77  const Float_t* getChargeMatrix() { return pfChargeMatrix; }
78  const TH1D* getEfficiencyHist() { return phEff; }
79  const TH2D* getQvBHist(Int_t sec, Int_t mod) { return ph2QvB[sec][mod]; }
80 
81  Float_t getEfficiency(Int_t sec,Int_t mod,Int_t row,Int_t col, Float_t fBeta);
82  Bool_t checkEfficiency(Int_t sec,Int_t mod,Int_t row,Int_t col, Float_t fBeta);
83  Float_t getCharge(Int_t sec,Int_t mod, Float_t fBeta);
84 
85  //private:
86  void removeHistograms(void);
87  void removeChargeHistograms(void);
88  void removeEfficiencyHistograms(void);
89  void removeQvBHistograms(void);
90  Float_t calcCharge(Float_t fCharge, Float_t fDist, Float_t fXd,
91  Float_t fYd, Float_t fXu, Float_t fYu);
92  void setChargeMatrix(Int_t nRange, const Float_t *pMatrix = NULL);
93  Bool_t initChargeMatrix(void);
94  Bool_t initEffHistogram(void);
95  Bool_t initSumVersBetaHistograms(void);
96  Int_t padIndex(Int_t sec,Int_t mod,Int_t row,Int_t col) {
97  return sec*3072 + mod*1024 + row*32 + col;
98  } // 3*32*32=3072, 32*32=1024
99 
100  ClassDef(HShowerDigiPar,1) //ROOT extension
101 };
102 #endif
void clear(void)
Float_t getCharge(Int_t sec, Int_t mod, Float_t fBeta)
Float_t getPadThreshold()
const Float_t * getChargeMatrix()
TArrayF & getEffScaleMap()
void setChargeSlope(Float_t fSlope)
Bool_t initChargeMatrix(void)
Int_t getMatrixRange()
Bool_t getParams(HParamList *)
void setEffScaleMap(TArrayF &)
TArrayD chargeVsBeta[6][3]
Float_t fPadThreshold
Float_t getChargeSlope()
void removeQvBHistograms(void)
TH1D * phEff
number of Q bins in Q(beta) propability histogram
Float_t getEfficiency(Int_t sec, Int_t mod, Int_t row, Int_t col, Float_t fBeta)
void setPlaneDist(Float_t fDist)
Int_t nGlobalEffBins
charge density matrix
void removeEfficiencyHistograms(void)
void setGlobalEff(TArrayD &)
Float_t fPlaneDist
Bool_t initSumVersBetaHistograms(void)
void setGain(Int_t sec, Int_t mod, Float_t fGain)
Float_t getThreshold(Int_t sec, Int_t mod)
const TH2D * getQvBHist(Int_t sec, Int_t mod)
Float_t calcCharge(Float_t fCharge, Float_t fDist, Float_t fXd, Float_t fYd, Float_t fXu, Float_t fYu)
TObjArray * pArrayQvB[6][3]
Q(beta) propability histogram.
Definition: hpario.h:11
Bool_t initEffHistogram(void)
void removeChargeHistograms(void)
void setUpdatePadThreshold(Float_t fThres)
Int_t padIndex(Int_t sec, Int_t mod, Int_t row, Int_t col)
void removeHistograms(void)
Float_t getPlaneDist()
void setChargeVsBeta(Int_t, Int_t, TArrayD &)
Float_t getBoxSize()
TH2D * ph2QvB[6][3]
efficiency(beta) histogram
const TH1D * getEfficiencyHist()
Float_t fUpdatePadThreshold
Int_t nQvBxbins[6][3]
number of bins in efficiency histograms
void setPadThreshold(Float_t fThres)
void setBoxSize(Float_t fSize)
Bool_t recreateHistograms()
Bool_t checkEfficiency(Int_t sec, Int_t mod, Int_t row, Int_t col, Float_t fBeta)
Float_t getGain(Int_t sec, Int_t mod)
void setMatrixRange(Int_t iRange)
Float_t getUpdatePadThreshold()
Float_t fChargeSlope
void setThreshold(Int_t sec, Int_t mod, Float_t fThres)
void putParams(HParamList *)
void setThickDet(Float_t fThick)
TArrayF effScaleMap
Float_t * pfChargeMatrix
size of pfChargeMatrix = 2*nMatrixRange+1
void setChargeMatrix(Int_t nRange, const Float_t *pMatrix=NULL)
HShowerDigiPar(const Char_t *name="ShowerDigiPar", const Char_t *title="Digitisation parameters for Shower", const Char_t *context="ShowerStandardDigiPar")
array of 1-dim Q histograms
Int_t chargeMatrixSize
Float_t getThickDet()
virtual Bool_t init(void)
Definition: hparset.h:21