PandaRoot
PndEmcClusterCalibrationPar.h
Go to the documentation of this file.
1 // PndEmcClusterCalibrationPar
3 //
4 // Container class for parametrization of EMC cluster energy correction
5 // class is inherited from FairParGenericSet
6 //
7 // Parametrization of EMC energy correction is a function of energy and polar angle and has different parameters in each of 4 regions:
8 // barrel, forward and backward endcap, shashlyk. Two different parameters set are used in barrel for energy below and above 1 GeV
9 // For the barrel , forward and backward endcap the following function is used with 10 parameters
10 // eout1=e* exp(factor1);
11 // factor1=
12 // p0
13 // +p1*log(e1)
14 // +p2*log(e1)*log(e1)
15 // +p3*log(e1)*log(e1)*log(e1)
16 // +p4*cos(theta1)
17 // +p5*cos(theta1)*cos(theta1)
18 // +p6*cos(theta1)*cos(theta1)*cos(theta1)
19 // +p7*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
20 // +p8*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
21 // +p9*log(e1)*cos(theta1);
22 // For shashlyk the following parametrization is used with 5 parameters:
23 // eout=(3.31694-0.0183379/sqrt(e1)+0.0327113/e1+0.00040156/(e1*e1)
24 // -0.00641305/(e1*sqrt(e1)))*e1;
25 //
26 // The index for parameter set within
27 // map<Int_t,std::vector<Double_t> > fClusterCalibrationPars
28 // are: 1 - barrel (below 1 GeV), 2 - barrel (above 1 GeV)
29 // 3 - forward endcap, 4 -backward endcap, 5 - shashlyk
31 
32 //#pragma once
33 #ifndef PNDEMCCLUSTERCALIBRATIONPAR_H
34 #define PNDEMCCLUSTERCALIBRATIONPAR_H
35 
36 #include "FairParGenericSet.h"
37 #include "FairParamList.h"
38 #include <cstdlib>
39 #include <map>
40 #include <vector>
41 
42 class PndEmcClusterCalibrationParObject : public TObject {
43  public:
44  void SetCalibrationPar(Int_t iParSet, Double_t *pars);
45  void GetCalibrationPar(Int_t iParSet, Double_t *pars);
46 
47  PndEmcClusterCalibrationParObject() : fClusterCalibrationPars() { fClusterCalibrationPars.clear(); };
49 
50  private:
51  std::map<Int_t, std::vector<Double_t>> fClusterCalibrationPars;
53 };
54 
55 class PndEmcClusterCalibrationPar : public FairParGenericSet {
56  public:
57  void GetClusterCalibrationParameters(Int_t iParSet, Double_t *pars);
58  void SetClusterCalibrationObject(PndEmcClusterCalibrationParObject *ParObject) { fParObject = ParObject; };
60  PndEmcClusterCalibrationPar(const char *name = "PndEmcClusterCalibrationPar", const char *title = "Emc cluster calibration parameter",
61  const char *context = "TestDefaultContext");
63 
64  Bool_t IsValid();
65 
66  void clear(void){};
67 
68  void putParams(FairParamList *list);
69  Bool_t getParams(FairParamList *list);
70 
71  private:
74  PndEmcClusterCalibrationPar &operator=(const PndEmcClusterCalibrationPar &) { return *this; };
75  ClassDef(PndEmcClusterCalibrationPar, 1);
76 };
77 
78 #endif
void GetCalibrationPar(Int_t iParSet, Double_t *pars)
void SetClusterCalibrationObject(PndEmcClusterCalibrationParObject *ParObject)
void SetCalibrationPar(Int_t iParSet, Double_t *pars)
PndEmcClusterCalibrationParObject * GetParObject()