ATLAS Offline Software
writeNtuple.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // This class has been automatically generated on
7 // Wed Jul 20 23:04:22 2011 by ROOT version 5.28/00e
8 // from TTree NNinput/NNtraining
9 // found on file: root://castoratlas//castor/cern.ch/grid/atlas/atlasscratchdisk/user.lorenzi/user.lorenzi.T1.TRKVAL.NNtrain.clustersOnTrack.110701122007_sub022943841/user.lorenzi.000160.TRKVAL._00027.root
11 
12 #ifndef writeNtuple_h
13 #define writeNtuple_h
14 
15 #include <TROOT.h>
16 #include <TSystem.h>
17 #include <TChain.h>
18 #include <TFile.h>
19 #include "RIOs.h"
20 #include <TString.h>
21 #include <vector>
22 #include <iostream>
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <TChainElement.h>
26 
27 using namespace std;
28 
29 
30 #pragma link C++ class vector<int> +;
31 #pragma link C++ class vector<double> +;
32 #pragma link C++ class vector<float> +; Loader
33 
34 
35 
36 
37 class writeNtuple {
38 public :
39  TTree *fChain;
40  TChain *tree2;
41  Int_t fCurrent;
43  // Declaration of leaf types
44  vector<int> *NN_sizeX;
45  vector<int> *NN_sizeY;
46  vector<vector<float> > *NN_matrixOfToT;
47  vector<vector<float> > *NN_vectorOfPitchesY;
48  vector<int> *NN_ClusterPixLayer;
49  vector<int> *NN_ClusterPixBarrelEC;
50  vector<float> *NN_phiBS;
51  vector<float> *NN_thetaBS;
52  vector<float> *NN_etaModule;
53  vector<bool> *NN_useTrackInfo;
55  vector<int> *NN_rowWeightedPosition;
57  vector<double> *NN_localRowWeightedPosition;
58  vector<vector<float> > *NN_positionX;
59  vector<vector<float> > *NN_positionY;
60  vector<vector<float> > *NN_position_idX;
61  vector<vector<float> > *NN_position_idY;
62  vector<vector<float> > *NN_theta;
63  vector<vector<float> > *NN_phi;
64 
65  // List of branches
66  TBranch *b_NN_sizeX;
67  TBranch *b_NN_sizeY;
68  TBranch *b_NN_matrixOfToT;
72  TBranch *b_NN_phiBS;
73  TBranch *b_NN_thetaBS;
74  TBranch *b_NN_etaModule;
75  TBranch *b_NN_useTrackInfo;
80  TBranch *b_NN_positionX;
81  TBranch *b_NN_positionY;
82  TBranch *b_NN_position_idX;
83  TBranch *b_NN_position_idY;
84  TBranch *b_NN_theta;
85  TBranch *b_NN_phi;
86 
87  // --- ntuple items. Please document here so they can be automatically parsed for doxygen/wiki tables ---
88  mutable std::vector<int>* m_PixDetType;
89  mutable std::vector<int>* m_PixHasGanged;
90  mutable std::vector<int>* m_PixIsFake;
91  mutable std::vector<int>* m_PixLVL1A;
92  mutable std::vector<int>* m_PixToT;
93  mutable std::vector<float>* m_PixCharge;
94  mutable std::vector<float>* m_PixTLorPhi;
95  mutable std::vector<float>* m_PixTLorEta;
96  mutable std::vector<float>* m_PixBiasVolt;
97  mutable std::vector<float>* m_PixTemp;
98  mutable std::vector<float>* m_PixDepVolt;
99  mutable std::vector<float>* m_PixDigResPhi;
100  mutable std::vector<float>* m_PixDigResEta;
101  mutable std::vector<float>* m_PixResPhi;
102  mutable std::vector<float>* m_PixResEta;
103  mutable std::vector<float>* m_PixErrPhi;
104  mutable std::vector<float>* m_PixErrEta;
105  mutable std::vector<float>* m_PixEta_t;
106  mutable std::vector<float>* m_PixGloX;
107  mutable std::vector<float>* m_PixGloY;
108  mutable std::vector<float>* m_PixGloZ;
109  mutable std::vector<float>* m_PixLocX;
110  mutable std::vector<float>* m_PixLocY;
111  mutable std::vector<int>* m_PixEtaModule_t;
112  mutable std::vector<int>* m_PixPhiModule_t;
113  mutable std::vector<float>* m_PixFirstRow;
114  mutable std::vector<float>* m_PixFirstCol;
115  mutable std::vector<float>* m_PixDeltaPhi_t;
116  mutable std::vector<float>* m_PixDeltaEta_t;
117  mutable std::vector<int>* m_PixDeltaRow_t;
118  mutable std::vector<int>* m_PixDeltaCol_t;
119  mutable std::vector<float>* m_PixOmegaPhi_t;
120  mutable std::vector<float>* m_PixOmegaEta_t;
121  mutable std::vector<float>* m_PixTrkAngle;
122  mutable std::vector<float>* m_PixTrkThetaI;
123  mutable std::vector<float>* m_PixTrkEta;
124  mutable std::vector<float>* m_PixTrkPt;
125  mutable std::vector<float>* m_PixTrkQ;
126  mutable std::vector<float>* m_PixTrkClusGroupSize;
127  mutable std::vector<std::vector<float> >* m_PixChargeList;
128  /* mutable std::vector<std::vector<int> >* m_PixToTList; //!< Time over Threshold of the pixel
129  mutable std::vector<std::vector<int> >* m_PixLVL1AList; //!< Level 1 accept of the pixel
130  mutable std::vector<std::vector<int> >* m_PixEtaIndex; //!< Cluster position converted into pixel column index (eta direction) UNIT:index
131  mutable std::vector<std::vector<int> >* m_PixPhiIndex; //!< Cluster position converted into pixel row index (phi direction) UNIT:index
132  */
133  mutable int m_nPixelHits;
134  mutable int m_nTRTHits;
135  mutable int m_nSCTHits;
136  mutable std::vector<float>* m_PixPullPhi;
137  mutable std::vector<float>* m_PixPullEta;
138 
141 
142  writeNtuple(TTree *tree=0);
143  writeNtuple (const writeNtuple&) = delete;
144  writeNtuple& operator= (const writeNtuple&) = delete;
145  virtual ~writeNtuple();
146  virtual Int_t Cut(Long64_t entry);
147  virtual Int_t GetEntry(Long64_t entry);
148  virtual Long64_t LoadTree(Long64_t entry);
149  void Init(TTree *tree);
150  virtual void Loop(int nParticlesTraining, bool useTrackEstimate, TString outFileName);
151  Bool_t Notify();
152  virtual void Show(Long64_t entry = -1);
153  virtual void FillClusterInfo(int clus);
154  virtual void InitializeVectors();
155  virtual void ResetVectors();
156 
157 };
158 
159 #endif
160 
161 #ifdef writeNtuple_cxx
162 /*
163 writeNtuple::writeNtuple(TTree *tree)
164 {
165 // if parameter tree is not specified (or zero), connect the file
166 // used to generate this class and read the Tree.
167 
168 
169  TString fName = "dummy.root";//"root://castoratlas//castor/cern.ch/grid/atlas/atlasscratchdisk/user.lorenzi/user.lorenzi.T1.TRKVAL.NNtrain.clustersOnTrack.110701122007_sub022943841/user.lorenzi.000160.TRKVAL._00027.root";
170 
171  if (tree == 0) {
172  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("dummy.root");
173  if (!f) {
174  f = TFile::Open(fName);
175 
176  }
177  tree = (TTree*)gDirectory->Get("Validation/NNinput");
178  tree2=0;
179  }
180  Init(tree);
181 
182  if (tree2 == 0) {
183  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("dummy.root");
184  if (!f) {
185  f = TFile::Open(fName);
186  }
187  tree2 = (TTree*)gDirectory->Get("Validation/PixelRIOs");
188  fOther = new RIOs( tree2 );
189 
190 
191  }else{
192 
193  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("dummy.root");
194  if (!f) {
195  f = tree->GetCurrentFile();
196  }
197  tree2 = (TTree*)gDirectory->Get("Validation/PixelRIOs");
198  fOther = new RIOs( tree2 );
199 
200  }
201 
202 
203 
204 
205 
206 
207 }
208 
209 
210 */
211 
213  : m_PixChargeList(nullptr),
214  m_nPixelHits(0),
215  m_nTRTHits(0),
216  m_nSCTHits(0)
217 {
218 // if parameter tree is not specified (or zero), connect the file
219 // used to generate this class and read the Tree.
220  if (tree == 0) {
221  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("AnalysisSkeleton.aan.root");
222  if (!f) {
223  f = new TFile("AnalysisSkeleton.aan.root");
224  }
225  tree = (TTree*)f->Get("Validation/NNinput");
226  }
227  Init(tree);
228 
229  /*
230  if (tree->IsA() == TChain::Class()) {
231  tree2 = (TTree*)tree->Clone("Validation/PixelRIOs"); // Create a copy of the TChain with a different name but the same list of files.
232  } else {
233  TFile *f = tree->GetTree()->GetCurrentFile();
234  tree2 = (TTree*)f->Get("Validation/PixelRIOs");
235  if (tree2 == 0) {
236  f = (TFile*)gROOT->GetListOfFiles()->FindObject("AnalysisSkeleton.aan.root");
237  if (!f) {
238  f = new TFile("AnalysisSkeleton.aan.root");
239  }
240  tree2 = (TTree*)f->Get("Validation/PixelRIOs");
241  }
242  }*/
243 /*
244  TFile *f1 = tree->GetTree()->GetCurrentFile();
245  tree2 = (TTree*)f1->Get("Validation/PixelRIOs");
246 
247  tree2 = (TTree*)tree->Clone("Validation/PixelRIOs");
248 */
249 
250 /*
251  if (tree->IsA() == TChain::Class()) {
252  // Make a copy of the TChain with a new name to point to the other set of TTree.
253  tree2 = (TTree*)tree->Clone("Validation/PixelRIOs");
254 // tree2= new TChain("Validation/PixelRIOs");
255  } else {
256  // We have a real TTree.
257  TFile *f = tree->GetCurrentFile();
258  if (f == 0) {
259  cout << "Error in constructor" << endl;
260  // Fatal("Constructor","The TTree we are being passed in not disk resident");
261  }
262  // This assumes that the other TTree (Photon) is located in the top level directory of the TFile.
263  tree2 = (TTree*)f->Get("Validation/PixelRIOs");
264  }
265  // Create the secondary MakeClass/MakeSelector object pointing to the secondary TTree.
266  */
267 
268 
269  tree2 = new TChain("Validation/PixelRIOs");
270  TIter next( ((TChain*)tree)->GetListOfFiles());
271  TObject *obj;
272  while( ( obj = (TChainElement*) next() ) ) {
273  tree2->Add(obj->GetTitle());
274  }
275 
276 
277  // tree2->Print();
278 
279  fOther = new RIOs( tree2 );
280  // fOther->fChain->Print();
281 
282 }
283 
284 
285 
286 
287 
289 {
290  if (!fChain) return;
291  delete fChain->GetCurrentFile();
292 }
293 
294 Int_t writeNtuple::GetEntry(Long64_t entry)
295 {
296 // Read contents of entry.
297  if (!fChain) return 0;
298  return fChain->GetEntry(entry);
299 }
300 Long64_t writeNtuple::LoadTree(Long64_t entry)
301 {
302 // Set the environment to read one entry
303  if (!fChain) return -5;
304  Long64_t centry = fChain->LoadTree(entry);
305  if (centry < 0) return centry;
306  if (!fChain->InheritsFrom(TChain::Class())) return centry;
307  TChain *chain = (TChain*)fChain;
308  if (chain->GetTreeNumber() != fCurrent) {
309  fCurrent = chain->GetTreeNumber();
310  Notify();
311  }
312  return centry;
313 }
314 
315 void writeNtuple::Init(TTree *tree)
316 {
317  // The Init() function is called when the selector needs to initialize
318  // a new tree or chain. Typically here the branch addresses and branch
319  // pointers of the tree will be set.
320  // It is normally not necessary to make changes to the generated
321  // code, but the routine can be extended by the user if needed.
322  // Init() will be called many times when running on PROOF
323  // (once per file to be processed).
324 
325  // Set object pointer
326  NN_sizeX = 0;
327  NN_sizeY = 0;
328  NN_matrixOfToT = 0;
330  NN_ClusterPixLayer = 0;
332  NN_phiBS = 0;
333  NN_thetaBS = 0;
334  NN_etaModule = 0;
335  NN_useTrackInfo = 0;
340  NN_positionX = 0;
341  NN_positionY = 0;
342  NN_position_idX = 0;
343  NN_position_idY = 0;
344  NN_theta = 0;
345  NN_phi = 0;
346  // Set branch addresses and branch pointers
347  if (!tree) return;
348  fChain = tree;
349  fCurrent = -1;
350 
351  fChain->SetMakeClass(1);
352 
353  fChain->SetBranchAddress("NN_sizeX", &NN_sizeX, &b_NN_sizeX);
354  fChain->SetBranchAddress("NN_sizeY", &NN_sizeY, &b_NN_sizeY);
355  fChain->SetBranchAddress("NN_matrixOfToT", &NN_matrixOfToT, &b_NN_matrixOfToT);
356  fChain->SetBranchAddress("NN_vectorOfPitchesY", &NN_vectorOfPitchesY, &b_NN_vectorOfPitchesY);
357  fChain->SetBranchAddress("NN_ClusterPixLayer", &NN_ClusterPixLayer, &b_NN_ClusterPixLayer);
358  fChain->SetBranchAddress("NN_ClusterPixBarrelEC", &NN_ClusterPixBarrelEC, &b_NN_ClusterPixBarrelEC);
359  fChain->SetBranchAddress("NN_phiBS", &NN_phiBS, &b_NN_phiBS);
360  fChain->SetBranchAddress("NN_thetaBS", &NN_thetaBS, &b_NN_thetaBS);
361  fChain->SetBranchAddress("NN_etaModule", &NN_etaModule, &b_NN_etaModule);
362  fChain->SetBranchAddress("NN_useTrackInfo", &NN_useTrackInfo, &b_NN_useTrackInfo);
363  fChain->SetBranchAddress("NN_columnWeightedPosition", &NN_columnWeightedPosition, &b_NN_columnWeightedPosition);
364  fChain->SetBranchAddress("NN_rowWeightedPosition", &NN_rowWeightedPosition, &b_NN_rowWeightedPosition);
365  fChain->SetBranchAddress("NN_localColumnWeightedPosition", &NN_localColumnWeightedPosition, &b_NN_localColumnWeightedPosition);
366  fChain->SetBranchAddress("NN_localRowWeightedPosition", &NN_localRowWeightedPosition, &b_NN_localRowWeightedPosition);
367  fChain->SetBranchAddress("NN_positionX", &NN_positionX, &b_NN_positionX);
368  fChain->SetBranchAddress("NN_positionY", &NN_positionY, &b_NN_positionY);
369  fChain->SetBranchAddress("NN_position_idX", &NN_position_idX, &b_NN_position_idX);
370  fChain->SetBranchAddress("NN_position_idY", &NN_position_idY, &b_NN_position_idY);
371  fChain->SetBranchAddress("NN_theta", &NN_theta, &b_NN_theta);
372  fChain->SetBranchAddress("NN_phi", &NN_phi, &b_NN_phi);
373 
374 
375  //InitializeVectors();
376 
377  m_PixDetType = new std::vector<int>();
378  m_PixHasGanged = new std::vector<int>();
379  m_PixIsFake = new std::vector<int>();
380  m_PixLVL1A = new std::vector<int>();
381  m_PixToT = new std::vector<int>();
382  m_PixCharge = new std::vector<float>();
383  m_PixTLorPhi = new std::vector<float>();
384  m_PixTLorEta = new std::vector<float>();
385  m_PixBiasVolt = new std::vector<float>();
386  m_PixTemp = new std::vector<float>();
387  m_PixDepVolt = new std::vector<float>();
388  m_PixLocX = new std::vector<float>();
389  m_PixLocY = new std::vector<float>();
390  m_PixEtaModule_t= new std::vector<int>();
391  m_PixPhiModule_t= new std::vector<int>();
392  m_PixGloX = new std::vector<float>();
393  m_PixGloY = new std::vector<float>();
394  m_PixGloZ = new std::vector<float>();
395  m_PixEta_t = new std::vector<float>();
396  m_PixFirstRow = new std::vector<float>();
397  m_PixFirstCol = new std::vector<float>();
398  m_PixDigResPhi = new std::vector<float>();
399  m_PixDigResEta = new std::vector<float>();
400  m_PixResPhi = new std::vector<float>();
401  m_PixResEta = new std::vector<float>();
402  m_PixErrPhi = new std::vector<float>();
403  m_PixErrEta = new std::vector<float>();
404  m_PixDeltaRow_t = new std::vector<int>();
405  m_PixDeltaCol_t = new std::vector<int>();
406  m_PixDeltaPhi_t = new std::vector<float>();
407  m_PixDeltaEta_t = new std::vector<float>();
408  m_PixOmegaPhi_t = new std::vector<float>();
409  m_PixOmegaEta_t = new std::vector<float>();
410  /* m_PixChargeList = new std::vector<std::vector<float> >();
411  m_PixToTList = new std::vector<std::vector<int> >();
412  m_PixLVL1AList = new std::vector<std::vector<int> >();
413  m_PixEtaIndex = new std::vector<std::vector<int> >();
414  m_PixPhiIndex = new std::vector<std::vector<int> >();
415  */
416  m_PixTrkAngle = new std::vector<float>();
417  m_PixTrkThetaI = new std::vector<float>();
418  m_PixTrkEta = new std::vector<float>();
419  m_PixTrkPt = new std::vector<float>();
420  m_PixTrkQ = new std::vector<float>();
421  m_PixTrkClusGroupSize = new std::vector<float>();
422 
423  m_PixPullPhi = new std::vector<float>();
424  m_PixPullEta = new std::vector<float>();
425 
426  Notify();
427 }
428 
429 Bool_t writeNtuple::Notify()
430 {
431  // The Notify() function is called when a new file is opened. This
432  // can be either for a new TTree in a TChain or when when a new TTree
433  // is started when using PROOF. It is normally not necessary to make changes
434  // to the generated code, but the routine can be extended by the
435  // user if needed. The return value is currently not used.
436 
437  return kTRUE;
438 }
439 
440 void writeNtuple::Show(Long64_t entry)
441 {
442 // Print contents of entry.
443 // If entry is not specified, print current entry
444  if (!fChain) return;
445  fChain->Show(entry);
446 }
447 Int_t writeNtuple::Cut(Long64_t entry)
448 {
449 // This function may be called from Loop.
450 // returns 1 if entry is accepted.
451 // returns -1 otherwise.
452  return 1;
453 }
454 
455 
457  /*
458  m_PixDetType = new std::vector<int>();
459  m_PixHasGanged = new std::vector<int>();
460  m_PixIsFake = new std::vector<int>();
461  m_PixLVL1A = new std::vector<int>();
462  m_PixToT = new std::vector<int>();
463  m_PixCharge = new std::vector<float>();
464  m_PixTLorPhi = new std::vector<float>();
465  m_PixTLorEta = new std::vector<float>();
466  m_PixBiasVolt = new std::vector<float>();
467  m_PixTemp = new std::vector<float>();
468  m_PixDepVolt = new std::vector<float>();
469  m_PixLocX = new std::vector<float>();
470  m_PixLocY = new std::vector<float>();
471  m_PixEtaModule_t= new std::vector<int>();
472  m_PixPhiModule_t= new std::vector<int>();
473  m_PixGloX = new std::vector<float>();
474  m_PixGloY = new std::vector<float>();
475  m_PixGloZ = new std::vector<float>();
476  m_PixEta_t = new std::vector<float>();
477  m_PixFirstRow = new std::vector<float>();
478  m_PixFirstCol = new std::vector<float>();
479  m_PixDigResPhi = new std::vector<float>();
480  m_PixDigResEta = new std::vector<float>();
481  m_PixErrPhi = new std::vector<float>();
482  m_PixErrEta = new std::vector<float>();
483  m_PixDeltaRow_t = new std::vector<int>();
484  m_PixDeltaCol_t = new std::vector<int>();
485  m_PixDeltaPhi_t = new std::vector<float>();
486  m_PixDeltaEta_t = new std::vector<float>();
487  m_PixOmegaPhi_t = new std::vector<float>();
488  m_PixOmegaEta_t = new std::vector<float>();
489  */
490 /* m_PixChargeList = new std::vector<std::vector<float> >();
491  m_PixToTList = new std::vector<std::vector<int> >();
492  m_PixLVL1AList = new std::vector<std::vector<int> >();
493  m_PixEtaIndex = new std::vector<std::vector<int> >();
494  m_PixPhiIndex = new std::vector<std::vector<int> >();
495  */
496  /* m_PixTrkAngle = new std::vector<float>();
497  m_PixTrkThetaI = new std::vector<float>();
498  m_PixTrkEta = new std::vector<float>();
499  m_PixTrkPt = new std::vector<float>();
500  m_PixTrkQ = new std::vector<float>();
501  m_PixTrkClusGroupSize = new std::vector<float>();
502  */
503 
504 
505  return;
506 
507 }
508 
510 
511  m_PixDetType->clear();
512  m_PixHasGanged->clear();
513  m_PixIsFake->clear();
514  m_PixLVL1A->clear();
515  m_PixToT->clear();
516  m_PixCharge->clear();
517  m_PixTLorPhi->clear();
518  m_PixTLorEta->clear();
519  m_PixBiasVolt->clear();
520  m_PixTemp->clear();
521  m_PixDepVolt->clear();
522  m_PixDigResPhi->clear();
523  m_PixDigResEta->clear();
524  m_PixResPhi->clear();
525  m_PixResEta->clear();
526  m_PixErrPhi->clear();
527  m_PixErrEta->clear();
528  m_PixEta_t->clear();
529  m_PixGloX->clear();
530  m_PixGloY->clear();
531  m_PixGloZ->clear();
532  m_PixLocX->clear();
533  m_PixLocY->clear();
534  m_PixEtaModule_t->clear();
535  m_PixPhiModule_t->clear();
536  m_PixFirstRow->clear();
537  m_PixFirstCol->clear();
538  m_PixDeltaPhi_t->clear();
539  m_PixDeltaEta_t->clear();
540  m_PixDeltaRow_t->clear();
541  m_PixDeltaCol_t->clear();
542  m_PixOmegaPhi_t->clear();
543  m_PixOmegaEta_t->clear();
544 
545 /* m_PixChargeList->clear(); */
546 /* m_PixToTList->clear(); */
547 /* m_PixLVL1AList->clear(); */
548 /* m_PixEtaIndex->clear(); */
549 /* m_PixPhiIndex->clear(); */
550 
551  m_PixTrkAngle->clear();
552  m_PixTrkThetaI->clear();
553  m_PixTrkEta->clear();
554  m_PixTrkPt->clear();
555  m_PixTrkQ->clear();
556  m_PixTrkClusGroupSize->clear();
557 
558  m_PixPullPhi->clear();
559  m_PixPullEta->clear();
560 
561  m_nPixelHits=0;
562  m_nSCTHits=0;
563  m_nTRTHits=0;
564 
565  return;
566 
567 }
568 
569 
570 void writeNtuple::FillClusterInfo(int clus)
571 {
572 
573 
574 
575 
576 
577  m_PixEta_t->push_back( fOther->PixClusEta->at(clus) );
578  m_PixGloX->push_back( fOther->PixClusGloX->at(clus) );
579  m_PixGloY->push_back( fOther->PixClusGloY->at(clus) );
580  m_PixGloZ->push_back( fOther->PixClusGloZ->at(clus) );
581 
582 
583 
584  m_PixEtaModule_t->push_back( fOther->PixEtaModule->at(clus));
585  m_PixPhiModule_t->push_back( fOther->PixPhiModule->at(clus));
586 
587 
588 
589  m_PixDeltaRow_t->push_back(fOther->PixDeltaRow->at(clus));
590  m_PixDeltaCol_t->push_back(fOther->PixDeltaCol->at(clus));
591 
592 /* m_PixDeltaPhi->push_back(fOther->PixDeltaPhi); */
593 /* m_PixDeltaEta->push_back(fOther->PixDeltaEta); */
594 
595  m_PixOmegaPhi_t->push_back(fOther->PixOmegaPhi->at(clus));
596  m_PixOmegaEta_t->push_back(fOther->PixOmegaEta->at(clus));
597 
598  float PixTLorPhi = 0.;
599  float PixTLorEta = -1000.;
600  float PixBiasVolt = -1000.;
601  float PixTemp = -1000.;
602  float PixDepVolt = -1000.;
603 
604 
605  m_PixTLorPhi->push_back(PixTLorPhi);
606  m_PixTLorEta->push_back(PixTLorEta);
607  m_PixBiasVolt->push_back(PixBiasVolt);
608  m_PixTemp->push_back(PixTemp);
609  m_PixDepVolt->push_back(PixDepVolt);
610 
611 
612  m_PixHasGanged->push_back(fOther->PixClusGanged->at(clus));
613  m_PixIsFake->push_back(fOther->PixClusFake->at(clus));
614  m_PixLVL1A->push_back(fOther->PixClusLvl1->at(clus));
615  m_PixToT->push_back(fOther->PixClusToT->at(clus));
616  m_PixCharge->push_back(fOther->PixClusCharge->at(clus));
617 
618 
619  int PixDetType = 0;
620 
621 
623 
624  int ECBarrel = fOther->PixECBarrel->at(clus);
625  int Layer = fOther->PixClusLayer->at(clus);
626 
627 //PixDetType = 100*ECBarrel/2+Layer ;
628 
629  if( ECBarrel == 0 ){
630  PixDetType = Layer;
631  }
632 
633  if( ECBarrel == 2 ){
634  PixDetType = 100+Layer;
635  }
636 
637  if( ECBarrel == -2 ){
638  PixDetType = -100-Layer;
639  }
640 
641 
642  m_PixDetType->push_back(PixDetType);
643 
644 
645  return;
646 
647 }
648 
649 #endif // #ifdef writeNtuple_cxx
RIOs::PixOmegaEta
vector< float > * PixOmegaEta
Definition: RIOs.h:50
writeNtuple::NN_sizeX
vector< int > * NN_sizeX
Definition: writeNtuple.h:44
writeNtuple::NN_localRowWeightedPosition
vector< double > * NN_localRowWeightedPosition
Definition: writeNtuple.h:57
writeNtuple::b_NN_ClusterPixLayer
TBranch * b_NN_ClusterPixLayer
Definition: writeNtuple.h:70
writeNtuple::m_PixDeltaRow_t
std::vector< int > * m_PixDeltaRow_t
Pixel cluster size phi or row UNIT:mm.
Definition: writeNtuple.h:117
writeNtuple::NN_useTrackInfo
vector< bool > * NN_useTrackInfo
Definition: writeNtuple.h:53
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
RIOs::PixClusFake
vector< int > * PixClusFake
Definition: RIOs.h:55
writeNtuple::NN_thetaBS
vector< float > * NN_thetaBS
Definition: writeNtuple.h:51
writeNtuple::NN_matrixOfToT
vector< vector< float > > * NN_matrixOfToT
Definition: writeNtuple.h:46
writeNtuple::b_NN_sizeX
TBranch * b_NN_sizeX
Definition: writeNtuple.h:66
writeNtuple::m_PixLVL1A
std::vector< int > * m_PixLVL1A
lower level1 accept among the pixel of the cluster
Definition: writeNtuple.h:91
writeNtuple::b_NN_positionX
TBranch * b_NN_positionX
Definition: writeNtuple.h:80
writeNtuple::m_pathWeightsWithoutTracks
TString m_pathWeightsWithoutTracks
Definition: writeNtuple.h:140
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
RIOs::PixPhiModule
vector< float > * PixPhiModule
Definition: RIOs.h:43
writeNtuple::m_PixFirstRow
std::vector< float > * m_PixFirstRow
lower row of the pixels contained in the cluster UNIT:index
Definition: writeNtuple.h:113
writeNtuple::m_PixTLorEta
std::vector< float > * m_PixTLorEta
tangent of the lorentz angle (local y direction - should be 0!) UNIT:1
Definition: writeNtuple.h:95
writeNtuple::b_NN_matrixOfToT
TBranch * b_NN_matrixOfToT
Definition: writeNtuple.h:68
writeNtuple::m_PixPullEta
std::vector< float > * m_PixPullEta
Definition: writeNtuple.h:137
RIOs::PixEtaModule
vector< float > * PixEtaModule
Definition: RIOs.h:42
writeNtuple::m_PixTrkEta
std::vector< float > * m_PixTrkEta
track incidence pseudorapidity in local module reference frame
Definition: writeNtuple.h:123
writeNtuple::m_PixDigResEta
std::vector< float > * m_PixDigResEta
local eta residual obtained from using the cluster digital coords UNIT:mm
Definition: writeNtuple.h:100
writeNtuple::Init
void Init(TTree *tree)
tree
TChain * tree
Definition: tile_monitor.h:30
writeNtuple::m_PixChargeList
std::vector< std::vector< float > > * m_PixChargeList
Charge of the pixel UNIT:electrons.
Definition: writeNtuple.h:127
writeNtuple::m_PixDetType
std::vector< int > * m_PixDetType
Layer information (0, 1, 2 for barrel, 100, 101, 102 for endcap A side, -100, -101,...
Definition: writeNtuple.h:88
writeNtuple::b_NN_position_idX
TBranch * b_NN_position_idX
Definition: writeNtuple.h:82
writeNtuple::NN_columnWeightedPosition
vector< int > * NN_columnWeightedPosition
Definition: writeNtuple.h:54
writeNtuple::NN_etaModule
vector< float > * NN_etaModule
Definition: writeNtuple.h:52
writeNtuple::m_PixOmegaPhi_t
std::vector< float > * m_PixOmegaPhi_t
Pixel charge sharing variable, phi clustering UNIT:1.
Definition: writeNtuple.h:119
writeNtuple::m_PixOmegaEta_t
std::vector< float > * m_PixOmegaEta_t
Pixel charge sharing variable, eta clustering UNIT:1.
Definition: writeNtuple.h:120
writeNtuple::m_PixDeltaEta_t
std::vector< float > * m_PixDeltaEta_t
Pixel cluster size eta, in cell units UNIT:cells.
Definition: writeNtuple.h:116
writeNtuple::m_PixErrEta
std::vector< float > * m_PixErrEta
PixelCluster position error (local y) UNIT:mm.
Definition: writeNtuple.h:104
RIOs::PixOmegaPhi
vector< float > * PixOmegaPhi
Definition: RIOs.h:49
writeNtuple::m_PixEta_t
std::vector< float > * m_PixEta_t
pseudorapidity calculated from module position
Definition: writeNtuple.h:105
writeNtuple::b_NN_position_idY
TBranch * b_NN_position_idY
Definition: writeNtuple.h:83
writeNtuple::writeNtuple
writeNtuple(const writeNtuple &)=delete
writeNtuple::m_PixCharge
std::vector< float > * m_PixCharge
total charge of the cluster UNIT:??
Definition: writeNtuple.h:93
writeNtuple::b_NN_positionY
TBranch * b_NN_positionY
Definition: writeNtuple.h:81
writeNtuple::b_NN_phiBS
TBranch * b_NN_phiBS
Definition: writeNtuple.h:72
writeNtuple::m_PixLocX
std::vector< float > * m_PixLocX
local x coordinate of the cluster UNIT:mm
Definition: writeNtuple.h:109
writeNtuple::NN_position_idX
vector< vector< float > > * NN_position_idX
Definition: writeNtuple.h:60
writeNtuple::b_NN_sizeY
TBranch * b_NN_sizeY
Definition: writeNtuple.h:67
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
writeNtuple::InitializeVectors
virtual void InitializeVectors()
writeNtuple::NN_sizeY
vector< int > * NN_sizeY
Definition: writeNtuple.h:45
RIOs::PixDeltaRow
vector< int > * PixDeltaRow
Definition: RIOs.h:47
writeNtuple::b_NN_localColumnWeightedPosition
TBranch * b_NN_localColumnWeightedPosition
Definition: writeNtuple.h:78
DumpGeoConfig.outFileName
string outFileName
Definition: DumpGeoConfig.py:238
writeNtuple::NN_ClusterPixBarrelEC
vector< int > * NN_ClusterPixBarrelEC
Definition: writeNtuple.h:49
writeNtuple::m_PixResEta
std::vector< float > * m_PixResEta
local eta residual obtained from using the cluster digital coords UNIT:mm
Definition: writeNtuple.h:102
RIOs::PixClusLvl1
vector< int > * PixClusLvl1
Definition: RIOs.h:53
writeNtuple::m_PixTrkClusGroupSize
std::vector< float > * m_PixTrkClusGroupSize
total size of the cluster UNIT:cells
Definition: writeNtuple.h:126
writeNtuple::Loop
virtual void Loop(int nParticlesTraining, bool useTrackEstimate, TString outFileName)
writeNtuple::m_PixDeltaPhi_t
std::vector< float > * m_PixDeltaPhi_t
Pixel cluster size phi, in cell units UNIT:cells.
Definition: writeNtuple.h:115
writeNtuple::m_PixEtaModule_t
std::vector< int > * m_PixEtaModule_t
eta index of the module associated to the cluster
Definition: writeNtuple.h:111
writeNtuple::m_nTRTHits
int m_nTRTHits
Definition: writeNtuple.h:134
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
RIOs::PixClusLayer
vector< float > * PixClusLayer
Definition: RIOs.h:41
writeNtuple::NN_positionX
vector< vector< float > > * NN_positionX
Definition: writeNtuple.h:58
RIOs::PixClusGloX
vector< float > * PixClusGloX
Definition: RIOs.h:35
writeNtuple::b_NN_vectorOfPitchesY
TBranch * b_NN_vectorOfPitchesY
Definition: writeNtuple.h:69
writeNtuple::NN_positionY
vector< vector< float > > * NN_positionY
Definition: writeNtuple.h:59
writeNtuple::m_PixGloX
std::vector< float > * m_PixGloX
global X position of the cluster UNIT:mm
Definition: writeNtuple.h:106
writeNtuple::writeNtuple
writeNtuple(TTree *tree=0)
writeNtuple::Show
virtual void Show(Long64_t entry=-1)
writeNtuple::fChain
TTree * fChain
Definition: writeNtuple.h:39
writeNtuple::m_PixDepVolt
std::vector< float > * m_PixDepVolt
Depletion voltage (from conditions service) UNIT:kV?
Definition: writeNtuple.h:98
writeNtuple::FillClusterInfo
virtual void FillClusterInfo(int clus)
RIOs::PixClusEta
vector< float > * PixClusEta
Definition: RIOs.h:38
writeNtuple::m_PixTrkPt
std::vector< float > * m_PixTrkPt
track transverse momentum at module
Definition: writeNtuple.h:124
writeNtuple::m_PixTLorPhi
std::vector< float > * m_PixTLorPhi
tangent of the lorentz angle (local x direction) UNIT:1
Definition: writeNtuple.h:94
writeNtuple::fCurrent
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: writeNtuple.h:41
writeNtuple::NN_phiBS
vector< float > * NN_phiBS
Definition: writeNtuple.h:50
writeNtuple::tree2
TChain * tree2
pointer to the analyzed TTree or TChain
Definition: writeNtuple.h:40
writeNtuple::m_PixPullPhi
std::vector< float > * m_PixPullPhi
Definition: writeNtuple.h:136
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
RIOs.h
writeNtuple::m_PixErrPhi
std::vector< float > * m_PixErrPhi
PixelCluster position error (local x) UNIT:mm.
Definition: writeNtuple.h:103
RIOs::PixDeltaCol
vector< int > * PixDeltaCol
Definition: RIOs.h:48
writeNtuple::NN_phi
vector< vector< float > > * NN_phi
Definition: writeNtuple.h:63
writeNtuple::m_PixHasGanged
std::vector< int > * m_PixHasGanged
if the cluster contains ganged pixels UNIT:1:yes
Definition: writeNtuple.h:89
writeNtuple::NN_position_idY
vector< vector< float > > * NN_position_idY
Definition: writeNtuple.h:61
writeNtuple::m_PixPhiModule_t
std::vector< int > * m_PixPhiModule_t
phi index of the module associated to the cluster
Definition: writeNtuple.h:112
writeNtuple::b_NN_useTrackInfo
TBranch * b_NN_useTrackInfo
Definition: writeNtuple.h:75
writeNtuple::m_PixTrkAngle
std::vector< float > * m_PixTrkAngle
track incidence angle on the module (rphi plane) in local reference frame UNIT:rad
Definition: writeNtuple.h:121
RIOs::PixClusCharge
vector< float > * PixClusCharge
Definition: RIOs.h:52
writeNtuple::m_PixResPhi
std::vector< float > * m_PixResPhi
local phi residual obtained using the cluster digital coordinates UNIT:mm
Definition: writeNtuple.h:101
writeNtuple::NN_ClusterPixLayer
vector< int > * NN_ClusterPixLayer
Definition: writeNtuple.h:48
writeNtuple::m_PixIsFake
std::vector< int > * m_PixIsFake
if the cluster is marked as fake UNIT:1:yes
Definition: writeNtuple.h:90
writeNtuple::m_PixTrkQ
std::vector< float > * m_PixTrkQ
charge of the associated track UNIT:+/-1
Definition: writeNtuple.h:125
writeNtuple::b_NN_etaModule
TBranch * b_NN_etaModule
Definition: writeNtuple.h:74
writeNtuple::m_PixToT
std::vector< int > * m_PixToT
ToTal time over threshold (ToT) of the cluster UNIT:??
Definition: writeNtuple.h:92
writeNtuple::b_NN_ClusterPixBarrelEC
TBranch * b_NN_ClusterPixBarrelEC
Definition: writeNtuple.h:71
writeNtuple::m_PixTemp
std::vector< float > * m_PixTemp
Temperature (from conditions service) UNIT:K ?
Definition: writeNtuple.h:97
writeNtuple::m_PixGloZ
std::vector< float > * m_PixGloZ
global Z position of the cluster UNIT:mm
Definition: writeNtuple.h:108
writeNtuple::m_nSCTHits
int m_nSCTHits
Definition: writeNtuple.h:135
writeNtuple::b_NN_thetaBS
TBranch * b_NN_thetaBS
Definition: writeNtuple.h:73
writeNtuple::ResetVectors
virtual void ResetVectors()
writeNtuple::NN_localColumnWeightedPosition
vector< double > * NN_localColumnWeightedPosition
Definition: writeNtuple.h:56
writeNtuple
Definition: writeNtuple.h:37
writeNtuple::m_nPixelHits
int m_nPixelHits
Definition: writeNtuple.h:133
writeNtuple::LoadTree
virtual Long64_t LoadTree(Long64_t entry)
writeNtuple::NN_rowWeightedPosition
vector< int > * NN_rowWeightedPosition
Definition: writeNtuple.h:55
writeNtuple::GetEntry
virtual Int_t GetEntry(Long64_t entry)
writeNtuple::b_NN_columnWeightedPosition
TBranch * b_NN_columnWeightedPosition
Definition: writeNtuple.h:76
RIOs::PixECBarrel
vector< float > * PixECBarrel
Definition: RIOs.h:40
writeNtuple::~writeNtuple
virtual ~writeNtuple()
writeNtuple::m_PixFirstCol
std::vector< float > * m_PixFirstCol
lower column of the pixels contained in the cluster UNIT:index
Definition: writeNtuple.h:114
RIOs::PixClusToT
vector< int > * PixClusToT
Definition: RIOs.h:51
writeNtuple::b_NN_phi
TBranch * b_NN_phi
Definition: writeNtuple.h:85
python.PyAthena.obj
obj
Definition: PyAthena.py:135
writeNtuple::m_PixLocY
std::vector< float > * m_PixLocY
local y coordinate of the cluster UNIT:mm
Definition: writeNtuple.h:110
writeNtuple::m_PixDigResPhi
std::vector< float > * m_PixDigResPhi
local phi residual obtained using the cluster digital coordinates UNIT:mm
Definition: writeNtuple.h:99
writeNtuple::NN_theta
vector< vector< float > > * NN_theta
Definition: writeNtuple.h:62
RIOs::PixClusGloY
vector< float > * PixClusGloY
Definition: RIOs.h:36
writeNtuple::fOther
RIOs * fOther
current Tree number in a TChain
Definition: writeNtuple.h:42
writeNtuple::Notify
Bool_t Notify()
writeNtuple::NN_vectorOfPitchesY
vector< vector< float > > * NN_vectorOfPitchesY
Definition: writeNtuple.h:47
RIOs
Definition: RIOs.h:21
writeNtuple::b_NN_theta
TBranch * b_NN_theta
Definition: writeNtuple.h:84
writeNtuple::b_NN_localRowWeightedPosition
TBranch * b_NN_localRowWeightedPosition
Definition: writeNtuple.h:79
writeNtuple::m_PixBiasVolt
std::vector< float > * m_PixBiasVolt
Bias voltage (from conditions service) UNIT:V ?
Definition: writeNtuple.h:96
writeNtuple::m_PixGloY
std::vector< float > * m_PixGloY
global Y position of the cluster UNIT:mm
Definition: writeNtuple.h:107
writeNtuple::m_pathWeightsWithTracks
TString m_pathWeightsWithTracks
Definition: writeNtuple.h:139
writeNtuple::Cut
virtual Int_t Cut(Long64_t entry)
writeNtuple::m_PixDeltaCol_t
std::vector< int > * m_PixDeltaCol_t
Pixel cluster size eta or column UNIT:mm.
Definition: writeNtuple.h:118
RIOs::PixClusGloZ
vector< float > * PixClusGloZ
Definition: RIOs.h:37
writeNtuple::m_PixTrkThetaI
std::vector< float > * m_PixTrkThetaI
track incidence angle on the module (eta-normal plane) in local reference frame UNIT:rad
Definition: writeNtuple.h:122
writeNtuple::b_NN_rowWeightedPosition
TBranch * b_NN_rowWeightedPosition
Definition: writeNtuple.h:77
RIOs::PixClusGanged
vector< int > * PixClusGanged
Definition: RIOs.h:54