MillRecoTree.cxx
Go to the documentation of this file.
1 /*
2  * MillRecoTree.cxx
3  *
4  * Created on: Feb 13, 2021
5  * Author: chilgenb
6  */
7 
9 
10 #include <TTree.h>
11 
12 #include <map>
13 #include <iostream>
14 
15 using std::vector;
16 
17 using namespace garana;
18 
19 
20 MillRecoTree::MillRecoTree(TTree* treeIn, TTree* treeOut)
21 {
22  fRecoIn = new StructuredRecoTree(treeIn);
23  fTreeIn = treeOut;
24  fOpt='w';
25  this->VerifyBranches();
26  this->SetVecs();
27  this->SetBranchAddresses();
28  this->MillTrees();
29 
30 }//constructor()
31 
32 //Fill branches but do not fill
34 
35  if(!IsVerified()){
36  std::cerr << "WARNING(MillRecoTree::MillTrees): "
37  << "trying to mill trees that have not been verified"
38  << std::endl;
39  return;
40  }
41 
42  std::cout << "MillRecoTree: loop over " << fRecoIn->NEntries() << " gen entries" << std::endl;
43 
44  //loop over input genTree events (entries)
45  for(size_t ientry=0; ientry<fRecoIn->NEntries(); ientry++){
46 
47  ClearVecs(); //clear previous entry's data (if any)
48  fRecoIn->GetEntry(ientry);
49 
51  fEvent = fRecoIn->Event();
52  }
53 
54  if(branchToDrawOpt[kTracks]) {
55  FillTrack();
56  }
57 
59  FillVertex();
60  }
61 
62  if(branchToDrawOpt[kVees]) {
63  FillVee();
64  }
65 
68  }
69 
70  fTreeIn->Fill(); //actually our fTreeOut, but it's called fTreeIn in FlatRecoTree.h, fill once per event
71  }//for genTree entries
72 
73  fTreeIn->Write();
74 
75 }//Mill()
76 
78 
79  // get list of branches and check it matches what we expect
80  const TObjArray* branches = fRecoIn->GetBranchList();
81  std::cout << "got ObjArray of branches from fTreeIn" << std::endl;
82  try {
83  if(!branches || branches->GetEntries()==0 )
84  throw branches;
85  }
86  catch(TObjArray* branches){
87  std::cerr << "ERROR(MillRecoTree::VerifyBranches): no branches found in passed input tree"
88  << std::endl;
89  return false;
90  }
91 
92  if(branches->GetEntriesFast() != (Int_t)nameToRecoBranch.size())
93  std::cout << "WARNING(MillRecoTree::VerifyBranches): Mismatch in number of branches (expected "
94  << nameToRecoBranch.size() << " but found " << branches->GetEntriesFast()
95  << ")" << std::endl;
96  else
97  std::cout << "found genTree with " << branches->GetEntriesFast() << " branches" << std::endl;
98 
99  // loop over branches
100  TIter next(branches);
101  TBranch* branch = nullptr;
102  while( (branch=(TBranch*)next())) {
103 
104  // check if branch is expected
105  if(nameToRecoBranch.find(CharStarToString(branch->GetFullName()))!=nameToRecoBranch.end()) {
106 
107  std::cout << " chopping branch '" << branch->GetFullName() << "'" << std::endl;
108 
109  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kEvent)
110  branchToDrawOpt[kEvent] = true;
111 
112  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kTracks)
113  branchToDrawOpt[kTracks] = true;
114 
115  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kVertices)
116  branchToDrawOpt[kVertices] = true;
117 
118  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kVees)
119  branchToDrawOpt[kVees] = true;
120 
121  if(nameToRecoBranch[CharStarToString(branch->GetFullName())] == kCalClusters)
123 
124  }//endif known branch
125 
126  else{
127  std::cout << "WARNING(MillRecoTree): ignoring unknown branch '"
128  << branch->GetFullName() << "'" << std::endl;
129  }//else
130 
131  }//for branches
132 
133  fIsVerified = true;
134  return true;
135 
136 }//VerifyBranches()
137 
138 
140  for(size_t itrk=0; itrk<fRecoIn->NTrack(); itrk++){
141 
142  fTrkLenFwd ->push_back(fRecoIn->TrackLenFwd(itrk));
143  fTrkLenBac ->push_back(fRecoIn->TrackLenBkd(itrk));
144  fTrkMomBeg ->push_back(fRecoIn->TrackMomBeg(itrk)->Mag());
145  fTrkMomEnd ->push_back(fRecoIn->TrackMomEnd(itrk)->Mag());
146 
147  fTrkVtxX ->push_back(fRecoIn->TrackVertex(itrk)->X());
148  fTrkVtxY ->push_back(fRecoIn->TrackVertex(itrk)->Y());
149  fTrkVtxZ ->push_back(fRecoIn->TrackVertex(itrk)->Z());
150  fTrkVtxT ->push_back(fRecoIn->TrackVertex(itrk)->T());
151  fTrkEndX ->push_back(fRecoIn->TrackEnd(itrk)->X());
152  fTrkEndY ->push_back(fRecoIn->TrackEnd(itrk)->Y());
153  fTrkEndZ ->push_back(fRecoIn->TrackEnd(itrk)->Z());
154  fTrkEndT ->push_back(fRecoIn->TrackEnd(itrk)->T());
155 
156  fTrkVtxDirX ->push_back(fRecoIn->TrackVtxDirectionX(itrk));
157  fTrkVtxDirY ->push_back(fRecoIn->TrackVtxDirectionY(itrk));
158  fTrkVtxDirZ ->push_back(fRecoIn->TrackVtxDirectionZ(itrk));
159  fTrkEndDirX ->push_back(fRecoIn->TrackEndDirectionX(itrk));
160  fTrkEndDirY ->push_back(fRecoIn->TrackEndDirectionY(itrk));
161  fTrkEndDirZ ->push_back(fRecoIn->TrackEndDirectionZ(itrk));
162 
163  fTrkChiFwd ->push_back(fRecoIn->TrackChiSqrFwd(itrk) );
164  fTrkChiBac ->push_back(fRecoIn->TrackChiSqrBkd(itrk));
165  fTrkNHits ->push_back(fRecoIn->NTrackHit(itrk));
166 
167  float trackpars[5], trackcovar[15];
168  fRecoIn->TrackParBeg(itrk,trackpars);
169 
170  fTrackXBeg ->push_back(fRecoIn->TrackVertex(itrk)->X());
171  fTrackYBeg ->push_back(trackpars[0]);
172  fTrackZBeg ->push_back(trackpars[1]);
173  fTrackCurvBeg->push_back(trackpars[2]);
174  fTrackPhiBeg ->push_back(trackpars[3]);
175  fTrackLambBeg->push_back(trackpars[4]);
176 
177  fRecoIn->TrackParEnd(itrk,trackpars);
178  fTrackXEnd ->push_back(fRecoIn->TrackEnd(itrk)->X());
179  fTrackYEnd ->push_back(trackpars[0]);
180  fTrackZEnd ->push_back(trackpars[1]);
181  fTrackCurvEnd ->push_back(trackpars[2]);
182  fTrackPhiEnd ->push_back(trackpars[3]);
183  fTrackLambEnd ->push_back(trackpars[4]);
184 
185  fRecoIn->TrackCovarBeg(itrk,trackcovar);
186  fTrkCovMat1Beg ->push_back(trackcovar[0]);
187  fTrkCovMat2Beg ->push_back(trackcovar[1]);
188  fTrkCovMat3Beg ->push_back(trackcovar[2]);
189  fTrkCovMat4Beg ->push_back(trackcovar[3]);
190  fTrkCovMat5Beg ->push_back(trackcovar[4]);
191  fTrkCovMat6Beg ->push_back(trackcovar[5]);
192  fTrkCovMat7Beg ->push_back(trackcovar[6]);
193  fTrkCovMat8Beg ->push_back(trackcovar[7]);
194  fTrkCovMat9Beg ->push_back(trackcovar[8]);
195  fTrkCovMat10Beg->push_back(trackcovar[9]);
196  fTrkCovMat11Beg->push_back(trackcovar[10]);
197  fTrkCovMat12Beg->push_back(trackcovar[11]);
198  fTrkCovMat13Beg->push_back(trackcovar[12]);
199  fTrkCovMat14Beg->push_back(trackcovar[13]);
200  fTrkCovMat15Beg->push_back(trackcovar[14]);
201 
202  fRecoIn->TrackCovarEnd(itrk,trackcovar);
203  fTrkCovMat1End ->push_back(trackcovar[0]);
204  fTrkCovMat2End ->push_back(trackcovar[1]);
205  fTrkCovMat3End ->push_back(trackcovar[2]);
206  fTrkCovMat4End ->push_back(trackcovar[3]);
207  fTrkCovMat5End ->push_back(trackcovar[4]);
208  fTrkCovMat6End ->push_back(trackcovar[5]);
209  fTrkCovMat7End ->push_back(trackcovar[6]);
210  fTrkCovMat8End ->push_back(trackcovar[7]);
211  fTrkCovMat9End ->push_back(trackcovar[8]);
212  fTrkCovMat10End->push_back(trackcovar[9]);
213  fTrkCovMat11End->push_back(trackcovar[10]);
214  fTrkCovMat12End->push_back(trackcovar[11]);
215  fTrkCovMat13End->push_back(trackcovar[12]);
216  fTrkCovMat14End->push_back(trackcovar[13]);
217  fTrkCovMat15End->push_back(trackcovar[14]);
218 
219  fTrkIonizFwd->push_back(fRecoIn->TrackIonizFwd(itrk));
220  fTrkIonizBac->push_back(fRecoIn->TrackIonizBkd(itrk));
221  fTrkChgFwd->push_back(fRecoIn->TrackChgFwd(itrk));
222  fTrkChgBac->push_back(fRecoIn->TrackChgBkd(itrk));
223 
224  //FixMe fill associations
225  //fRecoIn->GetTrackG4PIndices(itrk,fTrackG4PIndices);
226 
227  }//for track entries
228 }
229 
231 
232  for(size_t ivtx=0; ivtx<fRecoIn->NVertex(); ivtx++) {
233  fVtxX->push_back(fRecoIn->GetVertex(ivtx)->X());
234  fVtxY->push_back(fRecoIn->GetVertex(ivtx)->Y());
235  fVtxZ->push_back(fRecoIn->GetVertex(ivtx)->Z());
236  fVtxT->push_back(fRecoIn->GetVertex(ivtx)->T());
237 
238  float covar[3][3];
239  fRecoIn->VertexCovariance(ivtx,covar);
240  fVtxCovar11->push_back(covar[0][0]);
241  fVtxCovar12->push_back(covar[0][1]);
242  fVtxCovar13->push_back(covar[0][2]);
243  fVtxCovar21->push_back(covar[1][0]);
244  fVtxCovar22->push_back(covar[1][1]);
245  fVtxCovar23->push_back(covar[1][2]);
246  fVtxCovar31->push_back(covar[2][0]);
247  fVtxCovar32->push_back(covar[2][1]);
248  fVtxCovar33->push_back(covar[2][2]);
249  }
250 }
251 
253 
254  for(size_t ivee=0; ivee<fRecoIn->NVee(); ivee++){
255 
256  fVeeVtxX->push_back(fRecoIn->VeeVertex(ivee)->X());
257  fVeeVtxY->push_back(fRecoIn->VeeVertex(ivee)->Y());
258  fVeeVtxZ->push_back(fRecoIn->VeeVertex(ivee)->Z());
259  fVeeVtxT->push_back(fRecoIn->VeeVertex(ivee)->T());
260  fVeeChisqr->push_back(fRecoIn->VeeChiSquared(ivee));
261 
262  float covar[3][3];
263  fRecoIn->VeeCovariance(ivee,covar);
264  fVeeVtxCovar11->push_back(covar[0][0]);
265  fVeeVtxCovar12->push_back(covar[0][1]);
266  fVeeVtxCovar13->push_back(covar[0][2]);
267  fVeeVtxCovar21->push_back(covar[1][0]);
268  fVeeVtxCovar22->push_back(covar[1][1]);
269  fVeeVtxCovar23->push_back(covar[1][2]);
270  fVeeVtxCovar31->push_back(covar[2][0]);
271  fVeeVtxCovar32->push_back(covar[2][1]);
272  fVeeVtxCovar33->push_back(covar[2][2]);
273 
274  fVeePxKshort->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).Px());
275  fVeePyKshort->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).Py());
276  fVeePzKshort->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).Pz());
277  fVeeEKshort ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(0).E());
278 
279  fVeePxLamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).Px());
280  fVeePyLamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).Py());
281  fVeePzLamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).Pz());
282  fVeeELamb1 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(1).E());
283 
284  fVeePxLamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).Px());
285  fVeePyLamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).Py());
286  fVeePzLamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).Pz());
287  fVeeELamb2 ->push_back(fRecoIn->VeeMomentumPerHypothesis(ivee)->at(2).E());
288 
289  }
290 }
291 
293 
294  for(size_t iclust=0; iclust<fRecoIn->NCalCluster(); iclust++){
295  fCalClustX->push_back(fRecoIn->CalClustPosition(iclust)->X());
296  fCalClustY->push_back(fRecoIn->CalClustPosition(iclust)->Y());
297  fCalClustZ->push_back(fRecoIn->CalClustPosition(iclust)->Z());
298  fCalClustT->push_back(fRecoIn->CalClustPosition(iclust)->T());
299  fCalClustEnergy->push_back(fRecoIn->CalClustEnergy(iclust));
300  fCalClustEnergyError->push_back(fRecoIn->CalClustEnergyError(iclust));
301  fCalClustTdiff->push_back(fRecoIn->CalClustTimeDifference(iclust));
302  fCalClustEllip->push_back(fRecoIn->CalClustShape(iclust)[0]);
303  fCalClustR1->push_back(fRecoIn->CalClustShape(iclust)[1]);
304  fCalClustR2->push_back(fRecoIn->CalClustShape(iclust)[2]);
305  fCalClustR3->push_back(fRecoIn->CalClustShape(iclust)[3]);
306  fCalClustVol->push_back(fRecoIn->CalClustShape(iclust)[4]);
307  fCalClustWidth->push_back(fRecoIn->CalClustShape(iclust)[5]);
308  fCalClustTheta->push_back(fRecoIn->CalClustTheta(iclust));
309  fCalClustPhi->push_back(fRecoIn->CalClustPhi(iclust));
310  fCalClustEigen1X->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(0).X());
311  fCalClustEigen1Y->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(0).Y());
312  fCalClustEigen1Z->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(0).Z());
313  fCalClustEigen2X->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(1).X());
314  fCalClustEigen2Y->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(1).Y());
315  fCalClustEigen2Z->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(1).Z());
316  fCalClustEigen3X->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(2).X());
317  fCalClustEigen3Y->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(2).Y());
318  fCalClustEigen3Z->push_back(fRecoIn->CalClustEigenVecs(iclust)->at(2).Z());
319  }
320 }
321 
322 
323 
324 /* MillRecoTree.cxx */
const float TrackIonizBkd(const size_t &itrack) const override
track average ionization rate from backward fit
vector< float > * fTrkVtxDirZ
Definition: FlatRecoTree.h:119
const float TrackVtxDirectionZ(const size_t &itrack) const override
z-direction cosine at track vertex
vector< float > * fTrkLenBac
length of the track in cm from backwards fit
Definition: FlatRecoTree.h:105
vector< float > * fCalClustEigen1X
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: FlatRecoTree.h:236
vector< float > * fTrkCovMat8Beg
Definition: FlatRecoTree.h:146
vector< float > * fTrkIonizBac
Definition: FlatRecoTree.h:171
vector< float > * fTrkCovMat7End
Definition: FlatRecoTree.h:160
vector< float > * fTrkVtxDirY
Definition: FlatRecoTree.h:118
vector< float > * fVtxY
y-position of vertex [cm]
Definition: FlatRecoTree.h:207
vector< float > * fTrackPhiBeg
Track phi (par[3]) at beginning of track [rad].
Definition: FlatRecoTree.h:131
vector< float > * fVtxZ
z-position of vertex [cm]
Definition: FlatRecoTree.h:208
const float TrackEndDirectionZ(const size_t &itrack) const override
z-direction cosine at track end
vector< float > * fVtxCovar31
Definition: FlatRecoTree.h:216
vector< float > * fCalClustZ
z-position of the cluster [cm]
Definition: FlatRecoTree.h:223
vector< size_t > * fTrkNHits
number of hits
Definition: FlatRecoTree.h:125
vector< float > * fCalClustEigen3X
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: FlatRecoTree.h:242
vector< float > * fTrkCovMat10Beg
Definition: FlatRecoTree.h:148
vector< float > * fCalClustEigen2X
Eigenvectors of the cluster in ascending order (principal axis with smallest inertial mass) normalise...
Definition: FlatRecoTree.h:239
vector< float > * fVeeVtxZ
z-position of vertex [cm]
Definition: FlatRecoTree.h:179
void MillTrees() override
main method
vector< float > * fTrkCovMat1Beg
covariance matrix at beginning of track – assuming symmetry
Definition: FlatRecoTree.h:139
vector< float > * fCalClustR3
cluster shape parameter r3
Definition: FlatRecoTree.h:231
vector< float > * fTrkVtxZ
Definition: FlatRecoTree.h:110
vector< float > * fVeeEKshort
Definition: FlatRecoTree.h:194
const float CalClustTheta(const size_t &icluster) const override
vector< float > * fTrkChiFwd
chisquared forward fit
Definition: FlatRecoTree.h:123
vector< float > * fTrkCovMat3Beg
Definition: FlatRecoTree.h:141
vector< float > * fCalClustEigen3Y
Definition: FlatRecoTree.h:243
vector< float > * fVeePzLamb1
Definition: FlatRecoTree.h:197
vector< float > * fTrackYEnd
Track y-coord (par[0]) at end of track [cm].
Definition: FlatRecoTree.h:134
vector< float > * fTrkVtxY
Definition: FlatRecoTree.h:109
vector< float > * fTrkVtxX
track vertex position 4-vector cm,ns
Definition: FlatRecoTree.h:108
vector< int > * fTrkChgBac
Definition: FlatRecoTree.h:173
const float TrackVtxDirectionX(const size_t &itrack) const override
x-direction cosine at track vertex
vector< float > * fTrkCovMat14End
Definition: FlatRecoTree.h:167
vector< float > * fTrackXBeg
Track x-coord at beginning of track [cm].
Definition: FlatRecoTree.h:127
const float TrackLenFwd(const size_t &itrack) const override
track length from forward fit
vector< float > * fTrkVtxT
Definition: FlatRecoTree.h:111
vector< float > * fVtxX
x-position of vertex [cm]
Definition: FlatRecoTree.h:206
struct vector vector
vector< float > * fTrkCovMat10End
Definition: FlatRecoTree.h:163
vector< float > * fTrkCovMat4Beg
Definition: FlatRecoTree.h:142
vector< float > * fCalClustX
x-position of the cluster [cm]
Definition: FlatRecoTree.h:221
StructuredRecoTree * fRecoIn
points to input structured recoTree we are flattening
Definition: MillRecoTree.h:33
vector< float > * fTrkEndY
Definition: FlatRecoTree.h:113
vector< float > * fCalClustEllip
cluster shape parameter ellipsoid
Definition: FlatRecoTree.h:228
TTree * fTreeIn
pointer to the analyzed TTree or TChain
Definition: TreeReader.h:51
vector< float > * fVtxCovar21
Definition: FlatRecoTree.h:213
vector< float > * fVeeVtxY
y-position of vertex [cm]
Definition: FlatRecoTree.h:178
vector< float > * fTrkEndDirX
track end direction
Definition: FlatRecoTree.h:120
vector< float > * fVeeELamb1
Definition: FlatRecoTree.h:198
vector< float > * fTrkCovMat7Beg
Definition: FlatRecoTree.h:145
vector< float > * fVeePxLamb1
four-momentum of vee, for Kshort hypothesis [GeV]
Definition: FlatRecoTree.h:195
vector< float > * fVeeVtxCovar31
Definition: FlatRecoTree.h:187
vector< float > * fTrkCovMat4End
Definition: FlatRecoTree.h:157
vector< float > * fTrkCovMat9End
Definition: FlatRecoTree.h:162
vector< float > * fTrkChiBac
chisquared backward fit
Definition: FlatRecoTree.h:124
vector< float > * fTrkCovMat15Beg
Definition: FlatRecoTree.h:153
const size_t NVertex() const override
number of vertices in this event
vector< float > * fTrkCovMat12End
Definition: FlatRecoTree.h:165
vector< float > * fCalClustEigen1Z
Definition: FlatRecoTree.h:238
vector< float > * fTrkVtxDirX
track vertex direction
Definition: FlatRecoTree.h:117
vector< float > * fCalClustTheta
intrasic direction of the cluster theta
Definition: FlatRecoTree.h:234
vector< float > * fTrkMomEnd
momentum of the track at the end in GeV/c
Definition: FlatRecoTree.h:107
vector< float > * fVeeELamb2
Definition: FlatRecoTree.h:202
vector< float > * fTrkCovMat11Beg
Definition: FlatRecoTree.h:149
const vector< TLorentzVector > * VeeMomentumPerHypothesis(const size_t &ivee) const override
4-momentum for vee if it matches {Kshort, Lambda1, Lambda2}
vector< float > * fCalClustEigen2Y
Definition: FlatRecoTree.h:240
vector< float > * fTrkCovMat9Beg
Definition: FlatRecoTree.h:147
const float * CalClustShape(const size_t &icluster) const override
const size_t NTrackHit(const size_t &itrack) const override
number of reconstructed hits used in track fit
vector< float > * fTrackPhiEnd
Track phi (par[3]) at end of track [rad].
Definition: FlatRecoTree.h:137
vector< float > * fTrkCovMat13End
Definition: FlatRecoTree.h:166
vector< float > * fTrkLenFwd
length of the track in cm from forwards fit
Definition: FlatRecoTree.h:104
vector< float > * fTrkCovMat5End
Definition: FlatRecoTree.h:158
const float TrackVtxDirectionY(const size_t &itrack) const override
y-direction cosine at track vertex
vector< float > * fTrkCovMat8End
Definition: FlatRecoTree.h:161
std::map< std::string, RecoBranch > nameToRecoBranch
Definition: MillRecoTree.h:47
std::string CharStarToString(const char *cstr)
Definition: Mill.cxx:12
void TrackCovarBeg(const size_t &itrack, float pars[15]) const override
track fit covariance matrix (assume symmetry) at track&#39;s assumed start
vector< float > * fVtxT
time of vertex [ns]
Definition: FlatRecoTree.h:209
vector< float > * fVtxCovar13
Definition: FlatRecoTree.h:212
std::map< RecoBranch, bool > branchToDrawOpt
Definition: MillRecoTree.h:57
const TLorentzVector * CalClustPosition(const size_t &icluster) const override
vector< float > * fTrkEndX
track end position 4-vector cm,ns
Definition: FlatRecoTree.h:112
const int TrackChiSqrBkd(const size_t &itrack) const override
chi-squared of track fit in backward direction
vector< float > * fTrackZEnd
Track z-coord (par[1]) at end of track [cm].
Definition: FlatRecoTree.h:135
bool SetBranchAddresses() override
void VertexCovariance(const size_t &ivertex, float covar[][3]) const override
given a vertex index, fill given position covariance matrix
vector< float > * fVeeVtxCovar13
Definition: FlatRecoTree.h:183
const TVector3 * TrackMomEnd(const size_t &itrack) const override
momentum 3-vector as track&#39;s assumed end point
bool VerifyBranches() override
vector< float > * fTrkCovMat5Beg
Definition: FlatRecoTree.h:143
vector< float > * fTrkEndDirZ
Definition: FlatRecoTree.h:122
vector< float > * fTrackXEnd
Track x-coord at end of track [cm].
Definition: FlatRecoTree.h:133
bool fIsVerified
Definition: Mill.h:33
const size_t NTrack() const override
number of tracks in this event
vector< float > * fCalClustTdiff
time difference between the first and last layer of the cluster [ns]
Definition: FlatRecoTree.h:227
vector< float > * fTrackCurvEnd
Track curvature (par[2]) at end of track [cm^-1].
Definition: FlatRecoTree.h:136
void TrackParBeg(const size_t &itrack, float pars[5]) const override
track fit parameters at the track&#39;s assumed start
vector< float > * fTrackYBeg
Track y-coord (par[0]) at beginning of track [cm].
Definition: FlatRecoTree.h:128
vector< float > * fTrkCovMat3End
Definition: FlatRecoTree.h:156
const size_t NCalCluster() const override
number of ECal clusters in this event
vector< float > * fCalClustEigen3Z
Definition: FlatRecoTree.h:244
vector< float > * fTrkCovMat6Beg
Definition: FlatRecoTree.h:144
vector< float > * fVeeVtxCovar11
uncertainties in vertex position [cm]
Definition: FlatRecoTree.h:181
void TrackParEnd(const size_t &itrack, float pars[5]) const override
track fit parameters at the track&#39;s assumed end
const vector< TVector3 > * CalClustEigenVecs(const size_t &icluster) const override
const TLorentzVector * VeeVertex(const size_t &ivee) const override
=============== Vee =======================
vector< float > * fCalClustWidth
cluster shape parameter width
Definition: FlatRecoTree.h:233
bool IsVerified() const
Definition: Mill.h:28
const TLorentzVector * TrackEnd(const size_t &itrack) const override
4-position of track&#39;s assumed end point
vector< float > * fVeePzKshort
Definition: FlatRecoTree.h:193
vector< float > * fCalClustR2
cluster shape parameter r2
Definition: FlatRecoTree.h:230
const float CalClustEnergy(const size_t &icluster) const override
reconstructed ECal cluster energy
vector< float > * fVeePxLamb2
four-momentum of vee, for Kshort hypothesis [GeV]
Definition: FlatRecoTree.h:199
vector< float > * fTrkIonizFwd
Definition: FlatRecoTree.h:170
Int_t Event() const
Definition: TreeReader.cxx:30
vector< float > * fTrkEndZ
Definition: FlatRecoTree.h:114
vector< float > * fTrkEndDirY
Definition: FlatRecoTree.h:121
vector< float > * fVtxCovar32
Definition: FlatRecoTree.h:217
vector< float > * fCalClustPhi
intrasic direction of the cluster phi
Definition: FlatRecoTree.h:235
void TrackCovarEnd(const size_t &itrack, float pars[15]) const override
track fit covariance matrix (assume symmetry) at track&#39;s assumed end
vector< float > * fTrkCovMat15End
Definition: FlatRecoTree.h:168
vector< int > * fTrkChgFwd
Definition: FlatRecoTree.h:172
vector< float > * fCalClustEigen2Z
Definition: FlatRecoTree.h:241
vector< float > * fVeeVtxCovar22
Definition: FlatRecoTree.h:185
vector< float > * fTrkCovMat13Beg
Definition: FlatRecoTree.h:151
vector< float > * fVeePzLamb2
Definition: FlatRecoTree.h:201
vector< float > * fTrkCovMat2Beg
Definition: FlatRecoTree.h:140
vector< float > * fTrackLambEnd
Track lambda (par[4]) at end of track [rad].
Definition: FlatRecoTree.h:138
const float CalClustTimeDifference(const size_t &icluster) const override
vector< float > * fTrkCovMat12Beg
Definition: FlatRecoTree.h:150
vector< float > * fTrkCovMat1End
covariance matrix at end of track – assuming symmetry
Definition: FlatRecoTree.h:154
vector< float > * fVeeVtxX
x-position of vertex [cm]
Definition: FlatRecoTree.h:177
const TObjArray * GetBranchList() const
Definition: TreeReader.cxx:47
vector< float > * fVeeVtxCovar32
Definition: FlatRecoTree.h:188
vector< float > * fVtxCovar23
Definition: FlatRecoTree.h:215
vector< float > * fTrackCurvBeg
Track curvature (par[2]) at beginning of track [cm^-1].
Definition: FlatRecoTree.h:130
vector< float > * fTrkCovMat14Beg
Definition: FlatRecoTree.h:152
vector< float > * fVeeVtxCovar33
Definition: FlatRecoTree.h:189
const TLorentzVector * GetVertex(const size_t &ivertex) const override
vertex 4-position for vertex with index ivertex
const float VeeChiSquared(const size_t &ivee) const override
vector< float > * fTrkCovMat2End
Definition: FlatRecoTree.h:155
const size_t NVee() const override
number of vees in this event
const TVector3 * TrackMomBeg(const size_t &itrack) const override
momentum 3-vector as track&#39;s assumed start point
vector< float > * fTrkMomBeg
momentum of the track at the vertex in GeV/c
Definition: FlatRecoTree.h:106
vector< float > * fCalClustEnergy
energy of the ECal cluster [GeV]
Definition: FlatRecoTree.h:225
vector< float > * fVeePxKshort
four-momentum of vee, for Kshort hypothesis [GeV]
Definition: FlatRecoTree.h:191
void VeeCovariance(const size_t &ivee, float covar[][3]) const override
given a vee index, fill given position covariance matrix
vector< float > * fVeeVtxCovar21
Definition: FlatRecoTree.h:184
vector< float > * fVtxCovar12
Definition: FlatRecoTree.h:211
const TLorentzVector * TrackVertex(const size_t &itrack) const override
4-position of track&#39;s assumed start point
const float CalClustEnergyError(const size_t &icluster) const override
const int TrackChgBkd(const size_t &itrack) const override
charge sign of track if current hypothesis wrong
vector< float > * fVtxCovar22
Definition: FlatRecoTree.h:214
vector< float > * fCalClustT
time of the cluster [ns]
Definition: FlatRecoTree.h:224
vector< float > * fVeeVtxCovar23
Definition: FlatRecoTree.h:186
vector< float > * fVeeVtxCovar12
Definition: FlatRecoTree.h:182
vector< float > * fTrackZBeg
Track z-coord (par[1]) at beginning of track [cm].
Definition: FlatRecoTree.h:129
vector< float > * fCalClustEnergyError
uncertainty of the cluster energy [GeV]
Definition: FlatRecoTree.h:226
virtual void GetEntry(const UInt_t &ientry)
Definition: TreeReader.cxx:39
vector< float > * fVeePyKshort
Definition: FlatRecoTree.h:192
Int_t fEvent
event number for tree entry
Definition: TreeReader.h:55
const float TrackEndDirectionY(const size_t &itrack) const override
y-direction cosine at track end
vector< float > * fTrkCovMat11End
Definition: FlatRecoTree.h:164
vector< float > * fTrackLambBeg
Track lambda (par[4]) at beginning of track [rad].
Definition: FlatRecoTree.h:132
const float CalClustPhi(const size_t &icluster) const override
vector< float > * fCalClustEigen1Y
Definition: FlatRecoTree.h:237
const float TrackLenBkd(const size_t &itrack) const override
track length from backward fit
vector< float > * fVeeChisqr
chi-squared
Definition: FlatRecoTree.h:203
vector< float > * fVtxCovar11
uncertainties in vertex position [cm]
Definition: FlatRecoTree.h:210
vector< float > * fCalClustVol
cluster shape parameter volume
Definition: FlatRecoTree.h:232
vector< float > * fTrkCovMat6End
Definition: FlatRecoTree.h:159
const float TrackEndDirectionX(const size_t &itrack) const override
x-direction cosine at track end
const int TrackChiSqrFwd(const size_t &itrack) const override
chi-squared of track fit in forward direction
vector< float > * fVeePyLamb1
Definition: FlatRecoTree.h:196
vector< float > * fCalClustY
y-position of the cluster [cm]
Definition: FlatRecoTree.h:222
size_t NEntries() const
Definition: TreeReader.cxx:35
QTextStream & endl(QTextStream &s)
vector< float > * fVeeVtxT
time of vertex [ns]
Definition: FlatRecoTree.h:180
vector< float > * fTrkEndT
Definition: FlatRecoTree.h:115
vector< float > * fCalClustR1
cluster shape parameter r1
Definition: FlatRecoTree.h:229
const float TrackIonizFwd(const size_t &itrack) const override
track average ionization rate from forward fit
vector< float > * fVtxCovar33
Definition: FlatRecoTree.h:218
const int TrackChgFwd(const size_t &itrack) const override
charge sign of track if current hypothesis correct
vector< float > * fVeePyLamb2
Definition: FlatRecoTree.h:200