ATLAS Offline Software
eFEXNtupleWriter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
16 #ifndef EFEXTUPLEWRITER_H
17 #define EFEXTUPLEWRITER_H
19 #include "TTree.h"
20 #include "GaudiKernel/ITHistSvc.h"
22 #include <memory>
24 
25 namespace LVL1 {
27 {
32 public:
34  eFEXNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator);
35 
38 
41 
44 
47 
48 private:
50  SG::ReadHandleKey<LVL1::eFEXOutputCollection> m_eFEXOutputCollectionSGKey {this, "MyOutputs", "eFEXOutputCollection", "MyOutputs"};
51 
52  int m_eg_nTOBs;
54 
55  // values from the e-gamma algorithm
56  std::vector<float> m_em;
57  std::vector<float> m_had;
58  std::vector<float> m_truth_e_eta;
59  std::vector<float> m_truth_e_phi;
60  std::vector<float> m_truth_e_ET;
61  std::vector<float> m_truth_jet_eta;
62  std::vector<float> m_truth_jet_phi;
63  std::vector<float> m_truth_jet_ET;
64  std::vector<float> m_truth_tauvisible_eta;
65  std::vector<float> m_truth_tauvisible_phi;
66  std::vector<float> m_truth_tauvisible_ET;
67  std::vector<float> m_eg_haveseed;
68  std::vector<float> m_eg_eta;
69  std::vector<float> m_eg_phi;
70  std::vector<float> m_eg_ET;
71  std::vector<float> m_eg_WstotNum;
72  std::vector<float> m_eg_WstotDen;
73  std::vector<float> m_eg_RetaNum;
74  std::vector<float> m_eg_RetaDen;
75  std::vector<float> m_eg_RhadNum;
76  std::vector<float> m_eg_RhadDen;
77 
78  // values from the tau algorithm
79  std::vector<float> m_tau_realRCore;
80  std::vector<float> m_tau_rCoreCore;
81  std::vector<float> m_tau_rCoreEnv;
82  std::vector<float> m_tau_rCoreWP;
83  std::vector<float> m_tau_realRHad;
84  std::vector<float> m_tau_rHadCore;
85  std::vector<float> m_tau_rHadEnv;
86  std::vector<float> m_tau_rHadWP;
87  std::vector<float> m_tau_seed;
88  std::vector<float> m_tau_und;
89  std::vector<float> m_tau_Et;
90  std::vector<float> m_tau_Eta;
91  std::vector<float> m_tau_Phi;
92  std::vector<float> m_tau_floatEta;
93  std::vector<float> m_tau_floatPhi;
94  std::vector<float> m_tau_isCentralTowerSeed;
95  std::vector<float> m_tau_CenterTowerEt;
96  std::vector<float> m_tau_OneOffEtaTowerEt;
97  std::vector<float> m_tau_OneBelowEtaTowerEt;
98  std::vector<float> m_tau_eFEXID;
99  std::vector<float> m_tau_FPGAID;
100 
101  std::vector<int> m_eFex_number;
102  std::vector<uint32_t> m_eg_tob;
103 
104  // variables in eg TOB
105  std::vector<float> m_eg_TOB_FP;
106  std::vector<float> m_eg_TOB_Eta;
107  std::vector<float> m_eg_TOB_Phi;
108  std::vector<float> m_eg_TOB_ha;
109  std::vector<float> m_eg_TOB_f3;
110  std::vector<float> m_eg_TOB_Re;
111  std::vector<float> m_eg_TOB_Sd;
112  std::vector<float> m_eg_TOB_UnD;
113  std::vector<float> m_eg_TOB_Max;
114  std::vector<float> m_eg_TOB_zeros;
115  std::vector<float> m_eg_TOB_energy;
116 
117  std::string m_jet_container_name = "AntiKt10TruthJets";
118  TTree *m_myTree;
119 
122 
125 
128 
131 
134 
137 
139  std::unique_ptr<TLorentzVector> visibleTauP4(const xAOD::TruthParticle*);
140 
142  std::unique_ptr<TLorentzVector> invisibleTauP4(const xAOD::TruthParticle*);
143 
146 
157  uint32_t getbits(uint32_t in, int start, int end);
158 };
159 }
160 #endif
LVL1::eFEXNtupleWriter::m_eg_TOB_Max
std::vector< float > m_eg_TOB_Max
Definition: eFEXNtupleWriter.h:113
LVL1::eFEXNtupleWriter::m_em
std::vector< float > m_em
Definition: eFEXNtupleWriter.h:56
LVL1::eFEXNtupleWriter::loadegAlgoVariables
StatusCode loadegAlgoVariables(SG::ReadHandle< LVL1::eFEXOutputCollection >)
save variables related to the e-gamma algorithm
Definition: eFEXNtupleWriter.cxx:185
LVL1::eFEXNtupleWriter::loadegAlgoTOBs
StatusCode loadegAlgoTOBs(SG::ReadHandle< LVL1::eFEXOutputCollection >)
save variables in the e-gamma TOB word
Definition: eFEXNtupleWriter.cxx:220
LVL1::eFEXNtupleWriter::getbits
uint32_t getbits(uint32_t in, int start, int end)
extract bits from a 32-bit TOB words
Definition: eFEXNtupleWriter.cxx:413
eFEXOutputCollection.h
create ntuples output
LVL1::eFEXNtupleWriter::m_tau_rHadEnv
std::vector< float > m_tau_rHadEnv
Definition: eFEXNtupleWriter.h:85
LVL1::eFEXNtupleWriter::m_tau_seed
std::vector< float > m_tau_seed
Definition: eFEXNtupleWriter.h:87
LVL1::eFEXNtupleWriter::m_eg_eta
std::vector< float > m_eg_eta
Definition: eFEXNtupleWriter.h:68
LVL1::eFEXNtupleWriter::m_truth_tauvisible_ET
std::vector< float > m_truth_tauvisible_ET
Definition: eFEXNtupleWriter.h:66
LVL1::eFEXNtupleWriter::m_truth_e_eta
std::vector< float > m_truth_e_eta
Definition: eFEXNtupleWriter.h:58
LVL1::eFEXNtupleWriter::loadTruthJets
StatusCode loadTruthJets()
save variables related to truth jets
Definition: eFEXNtupleWriter.cxx:291
LVL1::eFEXNtupleWriter::m_tau_rCoreCore
std::vector< float > m_tau_rCoreCore
Definition: eFEXNtupleWriter.h:80
LVL1::eFEXNtupleWriter::m_tau_CenterTowerEt
std::vector< float > m_tau_CenterTowerEt
Definition: eFEXNtupleWriter.h:95
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::eFEXNtupleWriter::m_eg_haveseed
std::vector< float > m_eg_haveseed
Definition: eFEXNtupleWriter.h:67
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LVL1::eFEXNtupleWriter::m_eFEXOutputCollectionSGKey
SG::ReadHandleKey< LVL1::eFEXOutputCollection > m_eFEXOutputCollectionSGKey
readhandle key for eFEXOutputCollection
Definition: eFEXNtupleWriter.h:50
LVL1::eFEXNtupleWriter::m_truth_tauvisible_eta
std::vector< float > m_truth_tauvisible_eta
Definition: eFEXNtupleWriter.h:64
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
LVL1::eFEXNtupleWriter::m_tau_rHadCore
std::vector< float > m_tau_rHadCore
Definition: eFEXNtupleWriter.h:84
LVL1::eFEXNtupleWriter::m_truth_jet_ET
std::vector< float > m_truth_jet_ET
Definition: eFEXNtupleWriter.h:63
LVL1::eFEXNtupleWriter::loadTruthTau
StatusCode loadTruthTau()
save variables related to truth taus
Definition: eFEXNtupleWriter.cxx:316
LVL1::eFEXNtupleWriter::loadTruthElectron
StatusCode loadTruthElectron()
save variables related to truth electrons
Definition: eFEXNtupleWriter.cxx:263
LVL1::eFEXNtupleWriter::m_eg_TOB_Eta
std::vector< float > m_eg_TOB_Eta
Definition: eFEXNtupleWriter.h:106
SG::ReadHandleKey< LVL1::eFEXOutputCollection >
LVL1::eFEXNtupleWriter::m_jet_container_name
std::string m_jet_container_name
truth jet type
Definition: eFEXNtupleWriter.h:117
LVL1::eFEXNtupleWriter::m_truth_e_phi
std::vector< float > m_truth_e_phi
Definition: eFEXNtupleWriter.h:59
LVL1::eFEXNtupleWriter::m_tau_FPGAID
std::vector< float > m_tau_FPGAID
Definition: eFEXNtupleWriter.h:99
LVL1::eFEXNtupleWriter::m_tau_eFEXID
std::vector< float > m_tau_eFEXID
Definition: eFEXNtupleWriter.h:98
LVL1::eFEXNtupleWriter::m_eg_phi
std::vector< float > m_eg_phi
Definition: eFEXNtupleWriter.h:69
LVL1::eFEXNtupleWriter::m_eg_WstotNum
std::vector< float > m_eg_WstotNum
Definition: eFEXNtupleWriter.h:71
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::eFEXNtupleWriter::loadtauAlgoVariables
StatusCode loadtauAlgoVariables(SG::ReadHandle< LVL1::eFEXOutputCollection >)
save variables related to the tau algorithm
Definition: eFEXNtupleWriter.cxx:136
LVL1::eFEXNtupleWriter::m_tau_und
std::vector< float > m_tau_und
Definition: eFEXNtupleWriter.h:88
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
LVL1::eFEXNtupleWriter::m_eg_TOB_Phi
std::vector< float > m_eg_TOB_Phi
Definition: eFEXNtupleWriter.h:107
LVL1::eFEXNtupleWriter::m_eg_RhadNum
std::vector< float > m_eg_RhadNum
Definition: eFEXNtupleWriter.h:75
LVL1::eFEXNtupleWriter::~eFEXNtupleWriter
~eFEXNtupleWriter()
Destructor.
Definition: eFEXNtupleWriter.cxx:29
LVL1::eFEXNtupleWriter::m_tau_Et
std::vector< float > m_tau_Et
Definition: eFEXNtupleWriter.h:89
LVL1::eFEXNtupleWriter::m_tau_isCentralTowerSeed
std::vector< float > m_tau_isCentralTowerSeed
Definition: eFEXNtupleWriter.h:94
LVL1::eFEXNtupleWriter::m_eg_ET
std::vector< float > m_eg_ET
Definition: eFEXNtupleWriter.h:70
AthAlgorithm.h
LVL1::eFEXNtupleWriter::m_tau_rCoreEnv
std::vector< float > m_tau_rCoreEnv
Definition: eFEXNtupleWriter.h:81
LVL1::eFEXNtupleWriter::m_tau_floatEta
std::vector< float > m_tau_floatEta
Definition: eFEXNtupleWriter.h:92
LVL1::eFEXNtupleWriter::visibleTauP4
std::unique_ptr< TLorentzVector > visibleTauP4(const xAOD::TruthParticle *)
calculate the 4-vector of all the visible decay products of the tau
Definition: eFEXNtupleWriter.cxx:343
LVL1::eFEXNtupleWriter::m_eg_TOB_f3
std::vector< float > m_eg_TOB_f3
Definition: eFEXNtupleWriter.h:109
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
LVL1::eFEXNtupleWriter::m_had
std::vector< float > m_had
Definition: eFEXNtupleWriter.h:57
LVL1::eFEXNtupleWriter::execute
StatusCode execute()
execute the Algorithm
Definition: eFEXNtupleWriter.cxx:107
LVL1::eFEXNtupleWriter::m_truth_jet_eta
std::vector< float > m_truth_jet_eta
Definition: eFEXNtupleWriter.h:61
LVL1::eFEXNtupleWriter
Definition: eFEXNtupleWriter.h:27
LVL1::eFEXNtupleWriter::m_truth_e_ET
std::vector< float > m_truth_e_ET
Definition: eFEXNtupleWriter.h:60
LVL1::eFEXNtupleWriter::getMother
const xAOD::TruthParticle * getMother(const xAOD::TruthParticle *, int)
find the nearest mother particle in the decay chain with the specified particle id.
Definition: eFEXNtupleWriter.cxx:401
LVL1::eFEXNtupleWriter::finalize
StatusCode finalize()
finalize the Algorithm
Definition: eFEXNtupleWriter.cxx:131
LVL1::eFEXNtupleWriter::m_load_truth_jet
bool m_load_truth_jet
if load truth jets
Definition: eFEXNtupleWriter.h:53
LVL1::eFEXNtupleWriter::m_eg_TOB_energy
std::vector< float > m_eg_TOB_energy
Definition: eFEXNtupleWriter.h:115
LVL1::eFEXNtupleWriter::m_eg_WstotDen
std::vector< float > m_eg_WstotDen
Definition: eFEXNtupleWriter.h:72
AthAlgorithm
Definition: AthAlgorithm.h:47
LVL1::eFEXNtupleWriter::m_eg_tob
std::vector< uint32_t > m_eg_tob
e-gamma TOB words
Definition: eFEXNtupleWriter.h:102
TrigConf::name
Definition: HLTChainList.h:35
LVL1::eFEXNtupleWriter::m_eg_TOB_zeros
std::vector< float > m_eg_TOB_zeros
Definition: eFEXNtupleWriter.h:114
LVL1::eFEXNtupleWriter::m_eg_TOB_ha
std::vector< float > m_eg_TOB_ha
Definition: eFEXNtupleWriter.h:108
LVL1::eFEXNtupleWriter::m_eg_TOB_UnD
std::vector< float > m_eg_TOB_UnD
Definition: eFEXNtupleWriter.h:112
LVL1::eFEXNtupleWriter::invisibleTauP4
std::unique_ptr< TLorentzVector > invisibleTauP4(const xAOD::TruthParticle *)
calculate the 4-vector of all the invisible decay products of the tau
Definition: eFEXNtupleWriter.cxx:373
LVL1::eFEXNtupleWriter::m_tau_Eta
std::vector< float > m_tau_Eta
Definition: eFEXNtupleWriter.h:90
LVL1::eFEXNtupleWriter::m_tau_rCoreWP
std::vector< float > m_tau_rCoreWP
Definition: eFEXNtupleWriter.h:82
LVL1::eFEXNtupleWriter::eFEXNtupleWriter
eFEXNtupleWriter(const std::string &name, ISvcLocator *pSvcLocator)
this is a standard algorithm constructor
Definition: eFEXNtupleWriter.cxx:27
LVL1::eFEXNtupleWriter::m_myTree
TTree * m_myTree
Definition: eFEXNtupleWriter.h:118
LVL1::eFEXNtupleWriter::initialize
StatusCode initialize()
initialize the Algorithm
Definition: eFEXNtupleWriter.cxx:33
LVL1::eFEXNtupleWriter::m_tau_rHadWP
std::vector< float > m_tau_rHadWP
Definition: eFEXNtupleWriter.h:86
LVL1::eFEXNtupleWriter::m_truth_tauvisible_phi
std::vector< float > m_truth_tauvisible_phi
Definition: eFEXNtupleWriter.h:65
LVL1::eFEXNtupleWriter::m_tau_OneOffEtaTowerEt
std::vector< float > m_tau_OneOffEtaTowerEt
Definition: eFEXNtupleWriter.h:96
LVL1::eFEXNtupleWriter::m_tau_Phi
std::vector< float > m_tau_Phi
Definition: eFEXNtupleWriter.h:91
LVL1::eFEXNtupleWriter::m_eg_RetaDen
std::vector< float > m_eg_RetaDen
Definition: eFEXNtupleWriter.h:74
LVL1::eFEXNtupleWriter::m_tau_OneBelowEtaTowerEt
std::vector< float > m_tau_OneBelowEtaTowerEt
Definition: eFEXNtupleWriter.h:97
LVL1::eFEXNtupleWriter::m_truth_jet_phi
std::vector< float > m_truth_jet_phi
Definition: eFEXNtupleWriter.h:62
LVL1::eFEXNtupleWriter::m_tau_floatPhi
std::vector< float > m_tau_floatPhi
Definition: eFEXNtupleWriter.h:93
LVL1::eFEXNtupleWriter::m_eFex_number
std::vector< int > m_eFex_number
eFex number
Definition: eFEXNtupleWriter.h:101
LVL1::eFEXNtupleWriter::m_eg_RetaNum
std::vector< float > m_eg_RetaNum
Definition: eFEXNtupleWriter.h:73
LVL1::eFEXNtupleWriter::m_eg_RhadDen
std::vector< float > m_eg_RhadDen
Definition: eFEXNtupleWriter.h:76
TruthParticle.h
LVL1::eFEXNtupleWriter::m_eg_TOB_Re
std::vector< float > m_eg_TOB_Re
Definition: eFEXNtupleWriter.h:110
LVL1::eFEXNtupleWriter::m_eg_nTOBs
int m_eg_nTOBs
number of e-gamma tobs
Definition: eFEXNtupleWriter.h:52
LVL1::eFEXNtupleWriter::m_tau_realRCore
std::vector< float > m_tau_realRCore
Definition: eFEXNtupleWriter.h:79
LVL1::eFEXNtupleWriter::m_eg_TOB_FP
std::vector< float > m_eg_TOB_FP
Definition: eFEXNtupleWriter.h:105
LVL1::eFEXNtupleWriter::m_tau_realRHad
std::vector< float > m_tau_realRHad
Definition: eFEXNtupleWriter.h:83
LVL1::eFEXNtupleWriter::m_eg_TOB_Sd
std::vector< float > m_eg_TOB_Sd
Definition: eFEXNtupleWriter.h:111