ATLAS Offline Software
TFCSVoxelHistoLateralCovarianceFluctuations.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TFCSVoxelHistoLateralCovarianceFluctuations_h
6 #define TFCSVoxelHistoLateralCovarianceFluctuations_h
7 
10 
11 #include "TVectorD.h"
12 #include "TMatrixD.h"
13 #include "TH2.h"
14 
15 class TFCS1DFunction;
16 class TFile;
17 
20 public:
22  const char *title = nullptr);
24 
25  virtual void set_geometry(ICaloGeometry *geo) override { m_geo = geo; };
27 
28  bool initialize(TFile *inputfile, const std::string &folder);
29 
32  virtual FCSReturnCode
33  simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth,
34  const TFCSExtrapolationState *extrapol) const override;
35 
38  virtual FCSReturnCode
39  simulate_hit(Hit &hit, TFCSSimulationState &simulstate,
40  const TFCSTruthState *truth,
41  const TFCSExtrapolationState *extrapol) override;
42 
43 protected:
45 
46  static const std::uint32_t
48  static const std::uint32_t
50 
51  typedef std::vector<std::vector<float>> weight_t;
52 
53  std::vector<std::vector<std::vector<TFCS1DFunction *>>> m_transform;
54 
55  // For a 5*5 cell grid, nDim should be 5
56  int m_nDim_x{};
57  int m_nDim_y{};
58  std::vector<TH2 *> m_voxel_template;
59  std::vector<TVectorD> m_parMeans;
60  std::vector<TMatrixD> m_EigenVectors; // Eigen-vectors of covariance
61  std::vector<TVectorD> m_EigenValues; // Eigen-values of covariance
62 
63  void MultiGaus(TFCSSimulationState &simulstate, TVectorD &genPars) const;
64 
66  1) // TFCSVoxelHistoLateralCovarianceFluctuations
67 };
68 
69 #endif
TFCSVoxelHistoLateralCovarianceFluctuations::simulate_hit
virtual FCSReturnCode simulate_hit(Hit &hit, TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) override
weight the energy of one hit by the fluctuation calculated in simulate(...)
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.cxx:278
FCSReturnCode
FCSReturnCode
Base class for all FastCaloSim parametrizations Functionality in derivde classes is provided through ...
Definition: TFCSParametrizationBase.h:41
TFCSVoxelHistoLateralCovarianceFluctuations::s_layer_hash_geo
static const std::uint32_t s_layer_hash_geo[CaloCell_ID_FCS::MaxSample]
do not persistify
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:49
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TFCSVoxelHistoLateralCovarianceFluctuations::set_geometry
virtual void set_geometry(ICaloGeometry *geo) override
Method to set the geometry access pointer.
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:25
TFCSVoxelHistoLateralCovarianceFluctuations::m_EigenValues
std::vector< TVectorD > m_EigenValues
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:61
TFCSVoxelHistoLateralCovarianceFluctuations::simulate
virtual FCSReturnCode simulate(TFCSSimulationState &simulstate, const TFCSTruthState *truth, const TFCSExtrapolationState *extrapol) const override
create one fluctuated shape for a shower to be applied as scale factor to the average shape Store the...
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.cxx:184
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:91
TFCSLateralShapeParametrizationHitBase
Definition: TFCSLateralShapeParametrizationHitBase.h:13
Hit
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:16
TFCSVoxelHistoLateralCovarianceFluctuations::s_layer_hash
static const std::uint32_t s_layer_hash[CaloCell_ID_FCS::MaxSample]
do not persistify
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:47
TFCSLateralShapeParametrizationHitBase.h
CaloCell_ID_FCS::MaxSample
@ MaxSample
Definition: FastCaloSim_CaloCell_ID.h:47
TFCSVoxelHistoLateralCovarianceFluctuations::get_geometry
ICaloGeometry * get_geometry()
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:26
TFCSVoxelHistoLateralCovarianceFluctuations::m_transform
std::vector< std::vector< std::vector< TFCS1DFunction * > > > m_transform
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:53
TFCSVoxelHistoLateralCovarianceFluctuations::m_voxel_template
std::vector< TH2 * > m_voxel_template
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:58
ICaloGeometry
Definition: ICaloGeometry.h:14
covarianceTool.title
title
Definition: covarianceTool.py:542
TFCSVoxelHistoLateralCovarianceFluctuations::m_geo
ICaloGeometry * m_geo
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:44
TFCSVoxelHistoLateralCovarianceFluctuations::initialize
bool initialize(TFile *inputfile, const std::string &folder)
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.cxx:62
TFCSVoxelHistoLateralCovarianceFluctuations::m_nDim_y
int m_nDim_y
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:57
TFCSVoxelHistoLateralCovarianceFluctuations
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:19
TFCSVoxelHistoLateralCovarianceFluctuations::m_nDim_x
int m_nDim_x
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:56
TFCSVoxelHistoLateralCovarianceFluctuations::MultiGaus
void MultiGaus(TFCSSimulationState &simulstate, TVectorD &genPars) const
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.cxx:159
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TFCSVoxelHistoLateralCovarianceFluctuations::m_parMeans
std::vector< TVectorD > m_parMeans
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:59
LArCellConditions.geo
bool geo
Definition: LArCellConditions.py:46
FullCPAlgorithmsTest_CA.inputfile
dictionary inputfile
Definition: FullCPAlgorithmsTest_CA.py:62
TFCSVoxelHistoLateralCovarianceFluctuations::~TFCSVoxelHistoLateralCovarianceFluctuations
virtual ~TFCSVoxelHistoLateralCovarianceFluctuations()
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.cxx:60
TFCSVoxelHistoLateralCovarianceFluctuations::TFCSVoxelHistoLateralCovarianceFluctuations
TFCSVoxelHistoLateralCovarianceFluctuations(const char *name=nullptr, const char *title=nullptr)
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.cxx:55
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
TFCSVoxelHistoLateralCovarianceFluctuations::weight_t
std::vector< std::vector< float > > weight_t
do not persistify
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:51
FastCaloSim_CaloCell_ID.h
TFCS1DFunction
Definition: TFCS1DFunction.h:17
TFCSVoxelHistoLateralCovarianceFluctuations::m_EigenVectors
std::vector< TMatrixD > m_EigenVectors
Definition: TFCSVoxelHistoLateralCovarianceFluctuations.h:60
TFCSTruthState
Definition: TFCSTruthState.h:13
TFCSSimulationState
Definition: TFCSSimulationState.h:32