PandaRoot
PndEmcErrorMatrixPar.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 // PndEmcErrorMatrixPar
15 //
16 // Container class for EMC error matrix parameter
17 // class is inherited from FairParGenericSet
18 //
19 // Parametrization of EMC error matrix
20 // functions used for parameterization
21 // Energy: Delta(E)/E = (a^2/E^power) + const^2 + (quadr/E)^2
22 // position: Delta(x)=(a*a/E^power) + const^2
23 // There are 10 parameters (engParA, engPower, engConst, engQuadr, pos1ParA, pos1Power,
24 // pos1Const, pos2ParA, pos2Power, pos2Const) for each component of EMC (barrel,
25 // fwd endcap, bwd endcap, shashlyk)
27 
28 //#pragma once
29 #ifndef PNDEMCERRORMATRIXPAR_H
30 #define PNDEMCERRORMATRIXPAR_H
31 
32 #include "FairParGenericSet.h"
33 #include "FairParamList.h"
34 #include <cstdlib>
35 #include <map>
36 #include <vector>
37 
50 class PndEmcErrorMatrixParObject : public TObject {
51  public:
52  void SetErrorMatrix(Int_t detectorComponent, Double_t *pars);
53  void GetErrorMatrix(Int_t detectorComponent, Double_t *pars);
54 
55  PndEmcErrorMatrixParObject() : fErrorMatrixPars() { fErrorMatrixPars.clear(); };
57 
58  private:
59  std::map<Int_t, std::vector<Double_t>> fErrorMatrixPars;
60  ClassDef(PndEmcErrorMatrixParObject, 1);
61 };
62 
63 class PndEmcErrorMatrixPar : public FairParGenericSet {
64  public:
65  void GetErrorMatrixParameters(Int_t detectorComponent, Double_t *pars);
66  void SetErrorMatrixObject(PndEmcErrorMatrixParObject *ParObject) { fParObject = ParObject; };
67  PndEmcErrorMatrixParObject *GetParObject() { return fParObject; };
68  PndEmcErrorMatrixPar(const char *name = "PndEmcErrorMatrixPar", const char *title = "Emc error matrix parameter", const char *context = "TestDefaultContext");
70 
71  Bool_t IsValid();
72 
73  void clear(void){};
74 
75  void putParams(FairParamList *list);
76  Bool_t getParams(FairParamList *list);
77 
78  private:
79  PndEmcErrorMatrixParObject *fParObject;
80  ClassDef(PndEmcErrorMatrixPar, 1);
81 
82  PndEmcErrorMatrixPar(const PndEmcErrorMatrixPar &L) : FairParGenericSet(L){};
83  PndEmcErrorMatrixPar &operator=(const PndEmcErrorMatrixPar &) { return *this; };
84 };
85 
86 #endif
void GetErrorMatrix(Int_t detectorComponent, Double_t *pars)
Container class for EMC error matrix parameter class is inherited from FairParGenericSet.
void SetErrorMatrixObject(PndEmcErrorMatrixParObject *ParObject)
PndEmcErrorMatrixParObject * GetParObject()
void SetErrorMatrix(Int_t detectorComponent, Double_t *pars)