ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTree.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONHISTUTILS_MUONTREE_H
6#define MUONHISTUTILS_MUONTREE_H
7
8#include <memory>
9#include <vector>
10
11#include "TTree.h"
14#include "xAODMuon/Muon.h"
16
17namespace Muon {
18
19class MuonTree : public PlotBase {
20 public:
21 MuonTree(PlotBase* pParent, const std::string& sDir, bool mcFlag);
22 MuonTree(PlotBase* pParent, const std::string& sDir);
23 ~MuonTree();
24
25 void initializePlots();
26 void fillEventBranches(const xAOD::EventInfo* eventInfo, bool isData);
27 void fillRecoMuonBranches(const xAOD::Muon& mu);
29 bool isGoodTruthTrack);
31 const xAOD::Muon& mu,
32 const xAOD::TrackParticleContainer* MSTracks,
33 bool isGoodTruthTrack);
35 TTree* getTree();
36
37 private:
38 std::unique_ptr<TTree> m_tree;
39
40 // steering flag
41 bool m_isMC;
42
43 // Event info variables
44 uint32_t m_runNumber;
45 uint32_t m_lumiBlock;
46 unsigned long long m_eventNumber;
49 //
50 // Reco variables
51 //
52
53 // general properties
54 std::vector<float> m_pt;
55 std::vector<float> m_eta;
56 std::vector<float> m_phi;
57 std::vector<float> m_e;
58 std::vector<float> m_rapidity;
59
60 // authors and types
61 std::vector<uint16_t> m_allAuthors;
62 std::vector<int> m_muonType;
63
64 // summary values
65 std::vector<int8_t> m_innerSmallHits;
66 std::vector<int8_t> m_innerLargeHits;
67 std::vector<int8_t> m_innerSmallHoles;
68 std::vector<int8_t> m_innerLargeHoles;
69
70 // parameters
71 std::vector<float> m_msInnerMatchChi2;
72 std::vector<int> m_msInnerMatchDOF;
73 std::vector<float> m_msOuterMatchChi2;
74 std::vector<int> m_msOuterMatchDOF;
75 std::vector<float> m_CaloLRLikelihood;
76 std::vector<int> m_CaloMuonIDTag;
77 std::vector<float> m_EnergyLoss;
78
79 // quality
80 std::vector<int> m_Quality;
81
82 // isolation
83 std::vector<float> m_iso_etcone20;
84 std::vector<float> m_iso_ptcone20;
85 std::vector<float> m_iso_topoetcon20;
86 std::vector<float> m_iso_ptvarcon20;
87 std::vector<float> m_iso_neflowisol20;
88
89 // associated TrackParticle
90 std::vector<float> m_trkp_d0;
91 std::vector<float> m_trkp_z0;
92 std::vector<float> m_trkp_qOverP;
93 std::vector<float> m_trkp_chiSquared;
94 std::vector<float> m_trkp_numberDoF;
95
96 // used MuonSegments
97 std::vector<size_t> m_nMuonSegments;
98 std::vector<std::vector<float> > m_museg_x;
99 std::vector<std::vector<float> > m_museg_y;
100 std::vector<std::vector<float> > m_museg_z;
101 std::vector<std::vector<int> > m_museg_sector;
102 std::vector<std::vector<unsigned int> > m_museg_chamberIndex;
103 std::vector<std::vector<unsigned int> > m_museg_technology;
104 std::vector<std::vector<int> > m_museg_nPrecisionHits;
105 std::vector<std::vector<int> > m_museg_nPhiLayers;
106 std::vector<std::vector<int> > m_museg_nTrigEtaLayers;
107
108 //
109 // Truth variables
110 //
111
112 // Trk::Param
113 // all TruthTrack
114 std::vector<bool> m_th_isGoodTruthTrack;
115
116 std::vector<double> m_th_pt;
117 std::vector<double> m_th_eta;
118 std::vector<double> m_th_phi;
119
120 // Trk::TruthInfo
121 // all TruthTrack
122 std::vector<int> m_th_truthType;
123 std::vector<int> m_th_truthOrigin;
124
125 // Trk::TruthTrkExtrapolation
126 // all TruthTrack
127 std::vector<float> m_th_CaloEntry_p;
128 std::vector<float> m_th_MuonEntry_p;
129 std::vector<float> m_th_MuonExit_p;
130
131 // Trk::MSHit
132 // all TruthTrack
133 std::vector<int8_t> m_th_nprecLayers;
134 std::vector<int8_t> m_th_nphiLayers;
135 std::vector<int8_t> m_th_ntrigEtaLayers;
136};
137
138} // namespace Muon
139
140#endif
std::vector< std::vector< float > > m_museg_z
Definition MuonTree.h:100
std::unique_ptr< TTree > m_tree
Definition MuonTree.h:38
void postFillTreeActions()
Definition MuonTree.cxx:409
std::vector< float > m_iso_neflowisol20
Definition MuonTree.h:87
std::vector< int > m_th_truthOrigin
Definition MuonTree.h:123
std::vector< float > m_iso_etcone20
Definition MuonTree.h:83
unsigned long long m_eventNumber
Definition MuonTree.h:46
std::vector< float > m_trkp_chiSquared
Definition MuonTree.h:93
std::vector< std::vector< unsigned int > > m_museg_technology
Definition MuonTree.h:103
void initializePlots()
Definition MuonTree.cxx:34
std::vector< size_t > m_nMuonSegments
Definition MuonTree.h:97
std::vector< int > m_msOuterMatchDOF
Definition MuonTree.h:74
void fillEventBranches(const xAOD::EventInfo *eventInfo, bool isData)
Definition MuonTree.cxx:135
std::vector< int8_t > m_innerLargeHits
Definition MuonTree.h:66
std::vector< double > m_th_eta
Definition MuonTree.h:117
std::vector< int8_t > m_innerLargeHoles
Definition MuonTree.h:68
std::vector< int8_t > m_th_ntrigEtaLayers
Definition MuonTree.h:135
std::vector< float > m_trkp_d0
Definition MuonTree.h:90
std::vector< float > m_iso_ptvarcon20
Definition MuonTree.h:86
std::vector< std::vector< int > > m_museg_nPhiLayers
Definition MuonTree.h:105
std::vector< float > m_trkp_qOverP
Definition MuonTree.h:92
std::vector< int > m_muonType
Definition MuonTree.h:62
std::vector< int8_t > m_innerSmallHits
Definition MuonTree.h:65
std::vector< float > m_eta
Definition MuonTree.h:55
std::vector< std::vector< int > > m_museg_sector
Definition MuonTree.h:101
std::vector< float > m_th_MuonExit_p
Definition MuonTree.h:129
uint32_t m_lumiBlock
Definition MuonTree.h:45
std::vector< std::vector< int > > m_museg_nTrigEtaLayers
Definition MuonTree.h:106
std::vector< float > m_CaloLRLikelihood
Definition MuonTree.h:75
std::vector< std::vector< float > > m_museg_x
Definition MuonTree.h:98
void fillTruthMuonBranches(const xAOD::TruthParticle &truthMu, bool isGoodTruthTrack)
Definition MuonTree.cxx:277
std::vector< int > m_Quality
Definition MuonTree.h:80
std::vector< int8_t > m_th_nprecLayers
Definition MuonTree.h:133
std::vector< int > m_msInnerMatchDOF
Definition MuonTree.h:72
std::vector< int8_t > m_th_nphiLayers
Definition MuonTree.h:134
std::vector< float > m_trkp_numberDoF
Definition MuonTree.h:94
std::vector< int > m_CaloMuonIDTag
Definition MuonTree.h:76
uint32_t m_mcChannelNumber
Definition MuonTree.h:47
MuonTree(PlotBase *pParent, const std::string &sDir, bool mcFlag)
Definition MuonTree.cxx:14
std::vector< double > m_th_phi
Definition MuonTree.h:118
uint32_t m_runNumber
Definition MuonTree.h:44
std::vector< bool > m_th_isGoodTruthTrack
Definition MuonTree.h:114
std::vector< float > m_iso_topoetcon20
Definition MuonTree.h:85
std::vector< float > m_msOuterMatchChi2
Definition MuonTree.h:73
std::vector< float > m_e
Definition MuonTree.h:57
std::vector< float > m_th_MuonEntry_p
Definition MuonTree.h:128
std::vector< int > m_th_truthType
Definition MuonTree.h:122
Float_t m_mcBeamSpotWeight
Definition MuonTree.h:48
std::vector< std::vector< int > > m_museg_nPrecisionHits
Definition MuonTree.h:104
void fillRecoMuonBranches(const xAOD::Muon &mu)
Definition MuonTree.cxx:151
std::vector< float > m_iso_ptcone20
Definition MuonTree.h:84
std::vector< uint16_t > m_allAuthors
Definition MuonTree.h:61
std::vector< double > m_th_pt
Definition MuonTree.h:116
std::vector< float > m_trkp_z0
Definition MuonTree.h:91
std::vector< float > m_pt
Definition MuonTree.h:54
std::vector< std::vector< float > > m_museg_y
Definition MuonTree.h:99
std::vector< int8_t > m_innerSmallHoles
Definition MuonTree.h:67
std::vector< float > m_msInnerMatchChi2
Definition MuonTree.h:71
std::vector< float > m_rapidity
Definition MuonTree.h:58
std::vector< float > m_th_CaloEntry_p
Definition MuonTree.h:127
TTree * getTree()
Definition MuonTree.cxx:499
std::vector< float > m_phi
Definition MuonTree.h:56
std::vector< float > m_EnergyLoss
Definition MuonTree.h:77
std::vector< std::vector< unsigned int > > m_museg_chamberIndex
Definition MuonTree.h:102
PlotBase(PlotBase *parent, std::string_view sDir)
Definition PlotBase.cxx:29
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
EventInfo_v1 EventInfo
Definition of the latest event info version.
TruthParticle_v1 TruthParticle
Typedef to implementation.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version: