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
9
11#include "xAODMuon/Muon.h"
13
14#include "TTree.h"
15
16#include <vector>
17#include <memory>
18
19namespace Muon{
20
21 class MuonTree:public PlotBase {
22 public:
23 MuonTree(PlotBase* pParent, const std::string& sDir, bool mcFlag);
24 MuonTree(PlotBase* pParent, const std::string& sDir);
25 ~MuonTree();
26
27 void initializePlots();
28 void fillEventBranches(const xAOD::EventInfo* eventInfo, bool isData);
29 void fillRecoMuonBranches(const xAOD::Muon& mu);
30 void fillTruthMuonBranches(const xAOD::TruthParticle &truthMu, bool isGoodTruthTrack);
31 void fillTruthMuonBranches(const xAOD::TruthParticle &truthMu, const xAOD::Muon& mu, const xAOD::TrackParticleContainer* MSTracks, bool isGoodTruthTrack);
33 TTree* getTree();
34
35 private:
36
37 std::unique_ptr<TTree> m_tree;
38
39 //steering flag
40 bool m_isMC;
41
42 // Event info variables
43 uint32_t m_runNumber;
44 uint32_t m_lumiBlock;
45 unsigned long long m_eventNumber;
48 //
49 //Reco variables
50 //
51
52 //general properties
53 std::vector<float > m_pt;
54 std::vector<float > m_eta;
55 std::vector<float > m_phi;
56 std::vector<float > m_e;
57 std::vector<float > m_rapidity;
58
59 //authors and types
60 std::vector<uint16_t > m_allAuthors;
61 std::vector<int > m_muonType;
62
63 //summary values
64 std::vector<int8_t > m_innerSmallHits;
65 std::vector<int8_t > m_innerLargeHits;
66 std::vector<int8_t > m_innerSmallHoles;
67 std::vector<int8_t > m_innerLargeHoles;
68
69 //parameters
70 std::vector<float > m_msInnerMatchChi2;
71 std::vector<int > m_msInnerMatchDOF;
72 std::vector<float > m_msOuterMatchChi2;
73 std::vector<int > m_msOuterMatchDOF;
74 std::vector<float > m_CaloLRLikelihood;
75 std::vector<int > m_CaloMuonIDTag;
76 std::vector<float > m_EnergyLoss;
77
78 //quality
79 std::vector<int > m_Quality;
80
81 //isolation
82 std::vector<float > m_iso_etcone20;
83 std::vector<float > m_iso_ptcone20;
84 std::vector<float > m_iso_topoetcon20;
85 std::vector<float > m_iso_ptvarcon20;
86 std::vector<float > m_iso_neflowisol20;
87
88 //associated TrackParticle
89 std::vector<float > m_trkp_d0;
90 std::vector<float > m_trkp_z0;
91 std::vector<float > m_trkp_qOverP;
92 std::vector<float > m_trkp_chiSquared;
93 std::vector<float > m_trkp_numberDoF;
94
95 //used MuonSegments
96 std::vector<size_t > m_nMuonSegments;
97 std::vector<std::vector<float> > m_museg_x;
98 std::vector<std::vector<float> > m_museg_y;
99 std::vector<std::vector<float> > m_museg_z;
100 std::vector<std::vector<int> > m_museg_sector;
101 std::vector<std::vector<unsigned int> > m_museg_chamberIndex;
102 std::vector<std::vector<unsigned int> > m_museg_technology;
103 std::vector<std::vector<int> > m_museg_nPrecisionHits;
104 std::vector<std::vector<int> > m_museg_nPhiLayers;
105 std::vector<std::vector<int> > m_museg_nTrigEtaLayers;
106
107 //
108 //Truth variables
109 //
110
111 //Trk::Param
112 // all TruthTrack
113 std::vector<bool > m_th_isGoodTruthTrack;
114
115 std::vector<double > m_th_pt;
116 std::vector<double > m_th_eta;
117 std::vector<double > m_th_phi;
118
119 //Trk::TruthInfo
120 // all TruthTrack
121 std::vector<int > m_th_truthType;
122 std::vector<int > m_th_truthOrigin;
123
124 //Trk::TruthTrkExtrapolation
125 // all TruthTrack
126 std::vector<float > m_th_CaloEntry_p;
127 std::vector<float > m_th_MuonEntry_p;
128 std::vector<float > m_th_MuonExit_p;
129
130 //Trk::MSHit
131 // all TruthTrack
132 std::vector<int8_t > m_th_nprecLayers;
133 std::vector<int8_t > m_th_nphiLayers;
134 std::vector<int8_t > m_th_ntrigEtaLayers;
135 };
136
137}
138
139#endif
std::vector< float > m_iso_ptvarcon20
Definition MuonTree.h:85
std::vector< std::vector< float > > m_museg_z
Definition MuonTree.h:99
std::vector< int > m_th_truthType
Definition MuonTree.h:121
std::unique_ptr< TTree > m_tree
Definition MuonTree.h:37
std::vector< bool > m_th_isGoodTruthTrack
Definition MuonTree.h:113
void postFillTreeActions()
Definition MuonTree.cxx:350
unsigned long long m_eventNumber
Definition MuonTree.h:45
std::vector< float > m_msInnerMatchChi2
Definition MuonTree.h:70
std::vector< float > m_trkp_z0
Definition MuonTree.h:90
std::vector< std::vector< unsigned int > > m_museg_technology
Definition MuonTree.h:102
void initializePlots()
Definition MuonTree.cxx:39
std::vector< int8_t > m_innerSmallHoles
Definition MuonTree.h:66
std::vector< float > m_iso_topoetcon20
Definition MuonTree.h:84
void fillEventBranches(const xAOD::EventInfo *eventInfo, bool isData)
Definition MuonTree.cxx:139
std::vector< float > m_th_MuonExit_p
Definition MuonTree.h:128
std::vector< float > m_CaloLRLikelihood
Definition MuonTree.h:74
std::vector< int > m_msOuterMatchDOF
Definition MuonTree.h:73
std::vector< int > m_Quality
Definition MuonTree.h:79
std::vector< std::vector< int > > m_museg_nPhiLayers
Definition MuonTree.h:104
std::vector< float > m_iso_ptcone20
Definition MuonTree.h:83
std::vector< double > m_th_eta
Definition MuonTree.h:116
std::vector< float > m_th_CaloEntry_p
Definition MuonTree.h:126
std::vector< double > m_th_phi
Definition MuonTree.h:117
std::vector< std::vector< int > > m_museg_sector
Definition MuonTree.h:100
uint32_t m_lumiBlock
Definition MuonTree.h:44
std::vector< std::vector< int > > m_museg_nTrigEtaLayers
Definition MuonTree.h:105
std::vector< std::vector< float > > m_museg_x
Definition MuonTree.h:97
void fillTruthMuonBranches(const xAOD::TruthParticle &truthMu, bool isGoodTruthTrack)
Definition MuonTree.cxx:246
std::vector< int > m_CaloMuonIDTag
Definition MuonTree.h:75
std::vector< int8_t > m_th_nprecLayers
Definition MuonTree.h:132
std::vector< float > m_msOuterMatchChi2
Definition MuonTree.h:72
std::vector< int8_t > m_innerLargeHoles
Definition MuonTree.h:67
std::vector< float > m_pt
Definition MuonTree.h:53
uint32_t m_mcChannelNumber
Definition MuonTree.h:46
std::vector< float > m_trkp_chiSquared
Definition MuonTree.h:92
MuonTree(PlotBase *pParent, const std::string &sDir, bool mcFlag)
Definition MuonTree.cxx:13
std::vector< int8_t > m_th_ntrigEtaLayers
Definition MuonTree.h:134
uint32_t m_runNumber
Definition MuonTree.h:43
Float_t m_mcBeamSpotWeight
Definition MuonTree.h:47
std::vector< double > m_th_pt
Definition MuonTree.h:115
std::vector< float > m_trkp_qOverP
Definition MuonTree.h:91
std::vector< std::vector< int > > m_museg_nPrecisionHits
Definition MuonTree.h:103
std::vector< float > m_trkp_d0
Definition MuonTree.h:89
void fillRecoMuonBranches(const xAOD::Muon &mu)
Definition MuonTree.cxx:155
std::vector< int8_t > m_th_nphiLayers
Definition MuonTree.h:133
std::vector< float > m_iso_neflowisol20
Definition MuonTree.h:86
std::vector< float > m_th_MuonEntry_p
Definition MuonTree.h:127
std::vector< float > m_rapidity
Definition MuonTree.h:57
std::vector< float > m_eta
Definition MuonTree.h:54
std::vector< int > m_msInnerMatchDOF
Definition MuonTree.h:71
std::vector< size_t > m_nMuonSegments
Definition MuonTree.h:96
std::vector< std::vector< float > > m_museg_y
Definition MuonTree.h:98
std::vector< int > m_th_truthOrigin
Definition MuonTree.h:122
std::vector< float > m_phi
Definition MuonTree.h:55
std::vector< int > m_muonType
Definition MuonTree.h:61
std::vector< float > m_iso_etcone20
Definition MuonTree.h:82
std::vector< float > m_EnergyLoss
Definition MuonTree.h:76
TTree * getTree()
Definition MuonTree.cxx:440
std::vector< int8_t > m_innerSmallHits
Definition MuonTree.h:64
std::vector< int8_t > m_innerLargeHits
Definition MuonTree.h:65
std::vector< std::vector< unsigned int > > m_museg_chamberIndex
Definition MuonTree.h:101
std::vector< float > m_e
Definition MuonTree.h:56
std::vector< uint16_t > m_allAuthors
Definition MuonTree.h:60
std::vector< float > m_trkp_numberDoF
Definition MuonTree.h:93
PlotBase(PlotBase *parent, const std::string &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: