ATLAS Offline Software
Loading...
Searching...
No Matches
LArMinBiasAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#ifndef CALOCONDPHYSALGS_LARMINBIASALG_H
10#define CALOCONDPHYSALGS_LARMINBIASALG_H
11
12#include <string>
13
14// Gaudi includes
15
17#include "GaudiKernel/ToolHandle.h"
20
23
25
28
29
30class TTree;
31class LArEM_ID;
32class CaloCell_ID;
33class ITHistSvc;
34
35
36#define MAX_SYM_CELLS 3000
37
38 class LArMinBiasAlg : public AthAlgorithm {
39 public:
40 //Gaudi style constructor and execution methods
42 LArMinBiasAlg(const std::string& name, ISvcLocator* pSvcLocator);
45
46 virtual StatusCode initialize() override;
47 virtual StatusCode execute() override;
48 virtual StatusCode finalize() override;
49 virtual StatusCode stop() override;
50
51
52 private:
53
54 void fillNtuple();
55 void addCell(int index, double e1, double e2, double wt=1. );
56
57 //---------------------------------------------------
58 // Member variables
59 //---------------------------------------------------
65 { this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object" };
66 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
67
69 , "CaloDetDescrManager"
70 , "CaloDetDescrManager"
71 , "SG Key for CaloDetDescrManager in the Condition Store" };
72
74 , "CaloSuperCellDetDescrManager"
75 , "CaloSuperCellDetDescrManager"
76 , "SG Key for CaloSuperCellDetDescrManager in the Condition Store" };
77
78 const CaloCell_Base_ID* m_calo_id = nullptr;
79
80 std::vector<double> m_eCell;
81
82
83 ServiceHandle<ITHistSvc> m_thistSvc{this,"THistSvc","THistSvc"};
84 TTree* m_tree = nullptr;
85 int m_nevt_total = 0;
86 int m_n1 = 0;
87 int m_n2 = 0;
88
89// FIXME Total maximum array size for ntuple hardcoded... not very nice
90 int m_nsymcell = 0;
101
102
103 struct CellInfo {
104 int layer;
106 int ieta;
107 float eta;
108 float phi;
110 double nevt;
111 double average;
112 double rms;
113 double offset;
114 };
115 std::vector<CellInfo> m_CellList;
116 std::vector<int> m_symCellIndex;
117 float m_first;
118 int m_ncell = 0;
119 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EvtInfo", "EventInfo", "EventInfo name"};
120 StringArrayProperty m_inputKeys{this, "InputHitContainers", {"LArHitEMB", "LArHitEMEC", "LArHitHEC", "LArHitFCAL"},
121 "Name of input hit vectors (default=[LArHitEMB, LArHitEMEC, LArHitHEC, LArHitFCAL])" };
123 BooleanProperty m_isSC {this, "SuperCell", false, "Creating for SC ?"};
124 ToolHandle<ICaloSuperCellIDTool> m_scidtool{this, "CaloSuperCellIDTool", "CaloSuperCellIDTool", "Offline / SuperCell ID mapping tool"};
125 };
126#endif
Definition of CaloDetDescrManager.
#define MAX_SYM_CELLS
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Helper base class for offline cell identifiers.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
std::vector< CellInfo > m_CellList
double m_average[MAX_SYM_CELLS]
virtual StatusCode finalize() override
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
double m_rms[MAX_SYM_CELLS]
SG::ReadHandleKeyArray< LArHitContainer > m_larHitKeys
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
double m_offset[MAX_SYM_CELLS]
int m_region[MAX_SYM_CELLS]
std::vector< int > m_symCellIndex
double m_nevt[MAX_SYM_CELLS]
int m_layer[MAX_SYM_CELLS]
virtual StatusCode execute() override
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
ToolHandle< ICaloSuperCellIDTool > m_scidtool
StringArrayProperty m_inputKeys
SG::ReadCondHandleKey< LArMCSym > m_mcSymKey
std::vector< double > m_eCell
double m_weight_highPt
float m_eta[MAX_SYM_CELLS]
virtual StatusCode stop() override
BooleanProperty m_isSC
const CaloCell_Base_ID * m_calo_id
LArMinBiasAlg(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
~LArMinBiasAlg()
Default Destructor.
float m_phi[MAX_SYM_CELLS]
ServiceHandle< ITHistSvc > m_thistSvc
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSCMgrKey
void addCell(int index, double e1, double e2, double wt=1.)
int m_ieta[MAX_SYM_CELLS]
double m_weight_lowPt
int m_identifier[MAX_SYM_CELLS]
Property holding a SG store/key/clid from which a ReadHandle is made.
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition index.py:1