ATLAS Offline Software
Loading...
Searching...
No Matches
LArMinBiasAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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 stop() override;
49
50
51 private:
52
53 void fillNtuple();
54 void addCell(int index, double e1, double e2, double wt=1. );
55
56 //---------------------------------------------------
57 // Member variables
58 //---------------------------------------------------
59 Gaudi::Property<int> m_datasetID_lowPt{this, "datasetID_lowPt", 119995};
60 Gaudi::Property<int> m_datasetID_highPt{this, "datasetID_highPt", 119996};
61 Gaudi::Property<double> m_weight_lowPt{this, "weight_highPt", 39.8606};
62 Gaudi::Property<double> m_weight_highPt{this, "weight_lowPt", 0.138128};
64 { this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object" };
65 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
66
68 , "CaloDetDescrManager"
69 , "CaloDetDescrManager"
70 , "SG Key for CaloDetDescrManager in the Condition Store" };
71
73 , "CaloSuperCellDetDescrManager"
74 , "CaloSuperCellDetDescrManager"
75 , "SG Key for CaloSuperCellDetDescrManager in the Condition Store" };
76
77 const CaloCell_Base_ID* m_calo_id = nullptr;
78
79 std::vector<double> m_eCell;
80
81
82 ServiceHandle<ITHistSvc> m_thistSvc{this,"THistSvc","THistSvc"};
83 TTree* m_tree = nullptr;
84 int m_nevt_total = 0;
85 int m_n1 = 0;
86 int m_n2 = 0;
87
88// FIXME Total maximum array size for ntuple hardcoded... not very nice
89 int m_nsymcell = 0;
100
101
102 struct CellInfo {
103 int layer;
105 int ieta;
106 float eta;
107 float phi;
109 double nevt;
110 double average;
111 double rms;
112 double offset;
113 };
114 std::vector<CellInfo> m_CellList;
115 std::vector<int> m_symCellIndex;
116 float m_first{true};
117 int m_ncell = 0;
118 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EvtInfo", "EventInfo", "EventInfo name"};
119 StringArrayProperty m_inputKeys{this, "InputHitContainers", {"LArHitEMB", "LArHitEMEC", "LArHitHEC", "LArHitFCAL"},
120 "Name of input hit vectors (default=[LArHitEMB, LArHitEMEC, LArHitHEC, LArHitFCAL])" };
122 BooleanProperty m_isSC {this, "SuperCell", false, "Creating for SC ?"};
123 ToolHandle<ICaloSuperCellIDTool> m_scidtool{this, "CaloSuperCellIDTool", "CaloSuperCellIDTool", "Offline / SuperCell ID mapping tool"};
124 };
125#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 initialize() override
Gaudi::Property< int > m_datasetID_lowPt
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]
Gaudi::Property< double > m_weight_lowPt
Gaudi::Property< int > m_datasetID_highPt
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
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.
Gaudi::Property< double > m_weight_highPt
~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]
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