ATLAS Offline Software
MuonTree.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 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 
18 namespace Muon{
19 
20  class MuonTree:public PlotBase {
21  public:
22  MuonTree(PlotBase* pParent, const std::string& sDir, bool mcFlag);
23  MuonTree(PlotBase* pParent, const std::string& sDir);
24  ~MuonTree();
25 
26  void initializePlots();
27  void fillEventBranches(const xAOD::EventInfo* eventInfo, bool isData);
28  void fillRecoMuonBranches(const xAOD::Muon& mu);
29  void fillTruthMuonBranches(const xAOD::TruthParticle &truthMu, bool isGoodTruthTrack);
30  void fillTruthMuonBranches(const xAOD::TruthParticle &truthMu, const xAOD::Muon& mu, const xAOD::TrackParticleContainer* MSTracks, bool isGoodTruthTrack);
31  void postFillTreeActions();
32  TTree* getTree();
33 
34  private:
35 
36  TTree* m_tree;
37 
38  //steering flag
39  bool m_isMC;
40 
41  // Event info variables
44  unsigned long long m_eventNumber;
47  //
48  //Reco variables
49  //
50 
51  //general properties
52  std::vector<float > m_pt;
53  std::vector<float > m_eta;
54  std::vector<float > m_phi;
55  std::vector<float > m_e;
56  std::vector<float > m_rapidity;
57 
58  //authors and types
59  std::vector<uint16_t > m_allAuthors;
60  std::vector<int > m_muonType;
61 
62  //summary values
63  std::vector<int8_t > m_innerSmallHits;
64  std::vector<int8_t > m_innerLargeHits;
65  std::vector<int8_t > m_innerSmallHoles;
66  std::vector<int8_t > m_innerLargeHoles;
67 
68  //parameters
69  std::vector<float > m_msInnerMatchChi2;
70  std::vector<int > m_msInnerMatchDOF;
71  std::vector<float > m_msOuterMatchChi2;
72  std::vector<int > m_msOuterMatchDOF;
73  std::vector<float > m_CaloLRLikelihood;
74  std::vector<int > m_CaloMuonIDTag;
75  std::vector<float > m_EnergyLoss;
76 
77  //quality
78  std::vector<int > m_Quality;
79 
80  //isolation
81  std::vector<float > m_iso_etcone20;
82  std::vector<float > m_iso_ptcone20;
83  std::vector<float > m_iso_topoetcon20;
84  std::vector<float > m_iso_ptvarcon20;
85  std::vector<float > m_iso_neflowisol20;
86 
87  //associated TrackParticle
88  std::vector<float > m_trkp_d0;
89  std::vector<float > m_trkp_z0;
90  std::vector<float > m_trkp_qOverP;
91  std::vector<float > m_trkp_chiSquared;
92  std::vector<float > m_trkp_numberDoF;
93 
94  //used MuonSegments
95  std::vector<size_t > m_nMuonSegments;
96  std::vector<std::vector<float> > m_museg_x;
97  std::vector<std::vector<float> > m_museg_y;
98  std::vector<std::vector<float> > m_museg_z;
99  std::vector<std::vector<int> > m_museg_sector;
100  std::vector<std::vector<unsigned int> > m_museg_chamberIndex;
101  std::vector<std::vector<unsigned int> > m_museg_technology;
102  std::vector<std::vector<int> > m_museg_nPrecisionHits;
103  std::vector<std::vector<int> > m_museg_nPhiLayers;
104  std::vector<std::vector<int> > m_museg_nTrigEtaLayers;
105 
106  //
107  //Truth variables
108  //
109 
110  //Trk::Param
111  // all TruthTrack
112  std::vector<bool > m_th_isGoodTruthTrack;
113 
114  std::vector<double > m_th_pt;
115  std::vector<double > m_th_eta;
116  std::vector<double > m_th_phi;
117 
118  //Trk::TruthInfo
119  // all TruthTrack
120  std::vector<int > m_th_truthType;
121  std::vector<int > m_th_truthOrigin;
122 
123  //Trk::TruthTrkExtrapolation
124  // all TruthTrack
125  std::vector<float > m_th_CaloEntry_p;
126  std::vector<float > m_th_MuonEntry_p;
127  std::vector<float > m_th_MuonExit_p;
128 
129  //Trk::MSHit
130  // all TruthTrack
131  std::vector<int8_t > m_th_nprecLayers;
132  std::vector<int8_t > m_th_nphiLayers;
133  std::vector<int8_t > m_th_ntrigEtaLayers;
134  };
135 
136 }
137 
138 #endif
Muon::MuonTree::m_rapidity
std::vector< float > m_rapidity
Definition: MuonTree.h:56
Muon::MuonTree::m_th_isGoodTruthTrack
std::vector< bool > m_th_isGoodTruthTrack
Definition: MuonTree.h:112
Muon::MuonTree::m_th_truthOrigin
std::vector< int > m_th_truthOrigin
Definition: MuonTree.h:121
Muon::MuonTree::m_museg_chamberIndex
std::vector< std::vector< unsigned int > > m_museg_chamberIndex
Definition: MuonTree.h:100
Muon::MuonTree::m_th_ntrigEtaLayers
std::vector< int8_t > m_th_ntrigEtaLayers
Definition: MuonTree.h:133
PlotBase
Definition: PlotBase.h:33
Muon::MuonTree::initializePlots
void initializePlots()
Definition: MuonTree.cxx:42
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Muon.h
Muon::MuonTree::m_museg_technology
std::vector< std::vector< unsigned int > > m_museg_technology
Definition: MuonTree.h:101
Muon::MuonTree::m_trkp_chiSquared
std::vector< float > m_trkp_chiSquared
Definition: MuonTree.h:91
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
Muon::MuonTree::m_innerSmallHits
std::vector< int8_t > m_innerSmallHits
Definition: MuonTree.h:63
Muon::MuonTree::m_eventNumber
unsigned long long m_eventNumber
Definition: MuonTree.h:44
Muon::MuonTree::m_th_nphiLayers
std::vector< int8_t > m_th_nphiLayers
Definition: MuonTree.h:132
Muon::MuonTree::m_iso_ptvarcon20
std::vector< float > m_iso_ptvarcon20
Definition: MuonTree.h:84
Muon::MuonTree::m_museg_y
std::vector< std::vector< float > > m_museg_y
Definition: MuonTree.h:97
Muon::MuonTree::m_mcChannelNumber
uint32_t m_mcChannelNumber
Definition: MuonTree.h:45
Muon::MuonTree::m_iso_etcone20
std::vector< float > m_iso_etcone20
Definition: MuonTree.h:81
Muon::MuonTree::fillTruthMuonBranches
void fillTruthMuonBranches(const xAOD::TruthParticle &truthMu, bool isGoodTruthTrack)
Definition: MuonTree.cxx:249
Muon::MuonTree::m_isMC
bool m_isMC
Definition: MuonTree.h:39
Muon::MuonTree::m_museg_sector
std::vector< std::vector< int > > m_museg_sector
Definition: MuonTree.h:99
Muon::MuonTree::getTree
TTree * getTree()
Definition: MuonTree.cxx:443
Muon::MuonTree::m_th_phi
std::vector< double > m_th_phi
Definition: MuonTree.h:116
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::MuonTree::m_museg_nTrigEtaLayers
std::vector< std::vector< int > > m_museg_nTrigEtaLayers
Definition: MuonTree.h:104
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
Muon::MuonTree::m_iso_neflowisol20
std::vector< float > m_iso_neflowisol20
Definition: MuonTree.h:85
Muon::MuonTree::m_nMuonSegments
std::vector< size_t > m_nMuonSegments
Definition: MuonTree.h:95
Muon::MuonTree::MuonTree
MuonTree(PlotBase *pParent, const std::string &sDir, bool mcFlag)
Definition: MuonTree.cxx:13
Muon::MuonTree::m_innerLargeHits
std::vector< int8_t > m_innerLargeHits
Definition: MuonTree.h:64
Muon::MuonTree::m_e
std::vector< float > m_e
Definition: MuonTree.h:55
Muon::MuonTree::m_trkp_d0
std::vector< float > m_trkp_d0
Definition: MuonTree.h:88
Muon::MuonTree::fillRecoMuonBranches
void fillRecoMuonBranches(const xAOD::Muon &mu)
Definition: MuonTree.cxx:158
Muon::MuonTree::m_museg_nPrecisionHits
std::vector< std::vector< int > > m_museg_nPrecisionHits
Definition: MuonTree.h:102
Muon::MuonTree::postFillTreeActions
void postFillTreeActions()
Definition: MuonTree.cxx:353
Muon::MuonTree::m_museg_z
std::vector< std::vector< float > > m_museg_z
Definition: MuonTree.h:98
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
Muon::MuonTree::m_trkp_qOverP
std::vector< float > m_trkp_qOverP
Definition: MuonTree.h:90
Muon::MuonTree::m_museg_nPhiLayers
std::vector< std::vector< int > > m_museg_nPhiLayers
Definition: MuonTree.h:103
Muon::MuonTree::m_museg_x
std::vector< std::vector< float > > m_museg_x
Definition: MuonTree.h:96
Muon::MuonTree::m_th_MuonExit_p
std::vector< float > m_th_MuonExit_p
Definition: MuonTree.h:127
Muon::MuonTree::m_th_truthType
std::vector< int > m_th_truthType
Definition: MuonTree.h:120
Muon::MuonTree::m_th_nprecLayers
std::vector< int8_t > m_th_nprecLayers
Definition: MuonTree.h:131
Muon::MuonTree::m_pt
std::vector< float > m_pt
Definition: MuonTree.h:52
DataVector< xAOD::TrackParticle_v1 >
Muon::MuonTree::m_msOuterMatchChi2
std::vector< float > m_msOuterMatchChi2
Definition: MuonTree.h:71
Muon::MuonTree::m_lumiBlock
uint32_t m_lumiBlock
Definition: MuonTree.h:43
Muon::MuonTree::m_eta
std::vector< float > m_eta
Definition: MuonTree.h:53
Muon::MuonTree::m_tree
TTree * m_tree
Definition: MuonTree.h:36
Muon::MuonTree::m_msInnerMatchDOF
std::vector< int > m_msInnerMatchDOF
Definition: MuonTree.h:70
Muon::MuonTree::m_allAuthors
std::vector< uint16_t > m_allAuthors
Definition: MuonTree.h:59
Muon::MuonTree::m_msOuterMatchDOF
std::vector< int > m_msOuterMatchDOF
Definition: MuonTree.h:72
Muon::MuonTree::m_trkp_z0
std::vector< float > m_trkp_z0
Definition: MuonTree.h:89
Muon::MuonTree::m_iso_ptcone20
std::vector< float > m_iso_ptcone20
Definition: MuonTree.h:82
Muon::MuonTree::m_th_eta
std::vector< double > m_th_eta
Definition: MuonTree.h:115
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
Muon::MuonTree::m_phi
std::vector< float > m_phi
Definition: MuonTree.h:54
Muon::MuonTree::m_msInnerMatchChi2
std::vector< float > m_msInnerMatchChi2
Definition: MuonTree.h:69
Muon::MuonTree::m_th_pt
std::vector< double > m_th_pt
Definition: MuonTree.h:114
Muon::MuonTree::m_th_CaloEntry_p
std::vector< float > m_th_CaloEntry_p
Definition: MuonTree.h:125
Muon::MuonTree::m_runNumber
uint32_t m_runNumber
Definition: MuonTree.h:42
python.grid.isData
def isData(dataset)
Definition: grid.py:491
Muon::MuonTree::m_innerLargeHoles
std::vector< int8_t > m_innerLargeHoles
Definition: MuonTree.h:66
Muon::MuonTree::m_EnergyLoss
std::vector< float > m_EnergyLoss
Definition: MuonTree.h:75
Muon::MuonTree::m_muonType
std::vector< int > m_muonType
Definition: MuonTree.h:60
Muon::MuonTree::m_trkp_numberDoF
std::vector< float > m_trkp_numberDoF
Definition: MuonTree.h:92
Muon::MuonTree::m_CaloMuonIDTag
std::vector< int > m_CaloMuonIDTag
Definition: MuonTree.h:74
TruthParticle.h
PlotBase.h
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
Muon::MuonTree::m_iso_topoetcon20
std::vector< float > m_iso_topoetcon20
Definition: MuonTree.h:83
Muon::MuonTree
Definition: MuonTree.h:20
Muon::MuonTree::fillEventBranches
void fillEventBranches(const xAOD::EventInfo *eventInfo, bool isData)
Definition: MuonTree.cxx:142
Muon::MuonTree::m_innerSmallHoles
std::vector< int8_t > m_innerSmallHoles
Definition: MuonTree.h:65
Muon::MuonTree::m_mcBeamSpotWeight
Float_t m_mcBeamSpotWeight
Definition: MuonTree.h:46
Muon::MuonTree::m_CaloLRLikelihood
std::vector< float > m_CaloLRLikelihood
Definition: MuonTree.h:73
Muon::MuonTree::m_th_MuonEntry_p
std::vector< float > m_th_MuonEntry_p
Definition: MuonTree.h:126
Muon::MuonTree::m_Quality
std::vector< int > m_Quality
Definition: MuonTree.h:78
Muon::MuonTree::~MuonTree
~MuonTree()
Definition: MuonTree.cxx:37