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