ATLAS Offline Software
Loading...
Searching...
No Matches
MuonInsideOutValidationNtuple.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8namespace Muon {
9
11
12 // clear entries
13 for( const auto& entry : intBlocks ) entry.first.get()->clear();
14 for( const auto& entry : unsignedIntBlocks ) entry.first.get()->clear();
15 for( const auto& entry : floatBlocks ) entry.first.get()->clear();
16 for( auto entry : subBlocks ) entry.first->clear();
17
18 }
19
21 // delete entries
22 //for( auto entry : intBlocks ) delete entry.first.get();
23 //for( auto entry : floatBlocks ) delete entry.first.get();
24 }
25
26
27
28 void MuonValidationBlockBase::init( const std::string& prefix, TTree* tree, bool write ) {
29
30
31 for( const auto& entry : intBlocks ) {
32 if( tree ){
33 if( write ){
34 entry.first.get() = new std::vector<int>();
35 tree->Branch( (prefix + entry.second).c_str(), entry.first.get());
36 }else{
37 tree->SetBranchAddress( (prefix + entry.second).c_str(), &entry.first.get());
38 }
39 }
40 }
41
42 for( const auto& entry : unsignedIntBlocks ) {
43 if( tree ){
44 if( write ){
45 entry.first.get() = new std::vector<unsigned int>();
46 tree->Branch( (prefix + entry.second).c_str(), entry.first.get());
47 }else{
48 tree->SetBranchAddress( (prefix + entry.second).c_str(), &entry.first.get());
49 }
50 }
51 }
52
53 for( const auto& entry : floatBlocks ) {
54 if( tree ){
55 if( write ){
56 entry.first.get() = new std::vector<float>();
57 tree->Branch( (prefix + entry.second).c_str(), entry.first.get());
58 }else{
59 tree->SetBranchAddress( (prefix + entry.second).c_str(), &entry.first.get());
60 }
61 }
62 }
63
64 for( auto entry : subBlocks ) {
65 entry.first->init(prefix + entry.second, tree, write );
66 }
67
68 }
69
77
79 addBlock(&id,"");
80 addBlock(&track,"");
81 addBlock(&truth,"");
82 addBlock(type,"type");
83 addBlock(stage,"stage");
84 addBlock(gasgapId,"gasgapId");
85 addBlock(r,"r");
86 addBlock(z,"z");
87 addBlock(d,"d");
88 addBlock(time,"time");
89 addBlock(err,"err");
90 addBlock(timeProp,"timeProp");
91 addBlock(avTimeProp,"avTimeProp");
92 addBlock(tof,"tof");
93 addBlock(avTof,"avTof");
94 addBlock(timeCor,"timeCor");
95 }
96
97
99 addBlock(residual,"res");
100 addBlock(pull,"pull");
101 addBlock(pos,"pos");
102 addBlock(err,"err");
103 addBlock(expos,"expos");
104 addBlock(expos_err,"expos_err");
105 addBlock(expos_errstatus,"expos_errstatus");
106 }
107
112
116
122
124 addBlock(stage,"stage");
125 addBlock(quality,"quality");
126 addBlock(nmdtHits,"nmdtHits");
127 addBlock(ntrigEtaHits,"ntrigEtaHits");
128 addBlock(ntrigPhiHits,"ntrigPhiHits");
129 addBlock(r,"r");
130 addBlock(z,"z");
131 addBlock(t0,"t0");
132 addBlock(t0Error,"t0Error");
133 addBlock(t0Trig,"t0Trig");
134 addBlock(t0TrigError,"t0TrigError");
135 addBlock(&id,"");
136 addBlock(&track,"");
137 addBlock(&truth,"");
138 addBlock(&xresiduals,"x");
139 addBlock(&yresiduals,"y");
140 addBlock(&angleXZ,"angleXZ");
141 addBlock(&angleYZ,"angleYZ");
142 addBlock(&combinedYZ,"combYZ");
143 }
144
152
153
160
162 addBlock(ntimes,"ntimes");
163 addBlock(chi2ndof,"chi2ndof");
164 addBlock(beta,"beta");
165 addBlock(nseg,"nseg");
166 addBlock(nprec,"nprec");
167 addBlock(ntrigPhi,"ntrigPhi");
168 addBlock(ntrigEta,"ntrigEta");
169 addBlock(stage,"stage");
170 addBlock(&track,"");
171 }
172
181
182}
MuonValidationTrackParticleBlock trackParticleBlock
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
void init(const std::string &prefix, TTree *, bool write=true)
void addBlock(std::vector< int > *&block, std::string name)
std::vector< UnsignedIntBlock > unsignedIntBlocks
TChain * tree