ATLAS Offline Software
Functions
wmain.cxx File Reference
#include <iostream>
#include <TFile.h>
#include <TTree.h>
#include "TrigInDetAnalysis/TIDAEvent.h"
#include <map>
Include dependency graph for wmain.cxx:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Author
mark sutton
Date
Fri 11 Jan 2019 07:41:26 CET

Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration

Definition in file wmain.cxx.

Function Documentation

◆ main()

int main ( )

getCoefficientMap(label, EigenIdxList)

input value:

  1. label: falvor label in std::string format, could be one of B, C, T, Light
  2. EigenIdxList is user defined vector containing all eigenvector index that user interested in. output: Map of format map<string, map<string, float>> containing decomposition coefficient of the list of eigenvectors defined by EigenIdxList.

getCoefficients(label, evIdx)

input value:

  1. label: falvor label in std::string format, could be one of B, C, T, Light
  2. evIdx: The index of eigenvector user interested in. output value: vector of coefficient values. The order is the same as output given by getListOfOriginalNuisanceParameters()

getListOfOriginalNuisanceParameters(label)

input value:

  1. label: falvor label in std::string format, could be one of B, C, T, Light output value: List of original nuisance parameter names.

getNumEigenVectors(label)

input value:

  1. label: falvor label in std::string format, could be one of B, C, T, Light return value: number of eigen vectors used for chosen label. Return 0 if error occured.

Definition at line 24 of file wmain.cxx.

25 {
26 
27 
28  {
29  TIDA::Event* h = new TIDA::Event();
30 
31  std::cout << "\n\nconstructing ..." << std::endl;
32 
33  TFile f("tree.root", "recreate");
34  TTree *tree = new TTree("tree","tree");
35 
36  // tree->Branch("Track","Int",&t,6400);
37  tree->Branch("TIDA::Event", "TIDA::Event",&h,6400, 1);
38 
39  std::string ars[3] = { "ars0", "ars1", "ars2" };
40 
41  std::cout << "\n\nfilling ..." << std::endl;
42 
43  for ( int i=0; i<3 ; i++ ) {
44 
45  h->clear();
46 
47  h->run_number(10);
48  h->event_number(i);
49 
50  std::cout << "\n\nEvent " << i << std::endl;
51 
52  for ( int j=0 ; j<2 ; j++ ) {
53 
54  std::cout << "\n\tRoi " << j << std::endl;
55 
56  h->addChain( ars[j] );
57 
58  TIDA::Chain& tc = h->back();
59  // tc.addCombination();
60 
61  // TrackCombination& c = h->back().back();
62 
63  TIDARoiDescriptor roi1( j+1., j+1-2., j+1+2.,
64  j+3., j+3-1.1, j+3+1.1,
65  j+2.1, j+2.1-100, j+2.1+100 );
66 
67  for ( int ij=0 ; ij<j+1 ; ij++ ) roi1.push_back( TIDARoiDescriptor( ij, ij-0.2, ij+0.2,
68  ij, ij-0.2, ij+0.2,
69  ij, ij-0.2, ij+0.2 ) );
70 
71  std::cout << "Roi " << roi1 << std::endl;
72 
73  TIDARoiDescriptor roi2( j+1., j+1-2., j+1+2.,
74  j+3., j+3-1.1, j+3+1.1,
75  j+2.1, j+2.1-100, j+2.1+100 );
76 
77  tc.addRoi( roi1 );
78 
79  tc.addRoi( roi2 );
80 
81  }
82 
83  cout << "TIDA::Event " << *h << endl;
84 
85  tree->Fill();
86 
87  }
88 
89  std::cout << "\n\nwriting ..." << std::endl;
90 
91 
92  f.Write();
93  f.Close();
94 
95  }
96 
97 
98  {
99  std::cout << "\n\nreading ..." << std::endl;
100 
101  TIDA::Event* hh = new TIDA::Event();
102 
103  TFile f("tree.root");
104  TTree *tree = (TTree*)f.Get("tree");
105 
106  // tree->Branch("Track","Int",&t,6400);
107  tree->SetBranchAddress("TIDA::Event", &hh );
108 
109  for ( int i=0; i<tree->GetEntries() ; i++ ) {
110 
111  tree->GetEntry(i);
112 
113  cout << "TIDA::Event " << i << " " << *hh << endl;
114 
115  }
116 
117  f.Close();
118 
119  }
120 
121  return 0;
122 }
DiTauMassTools::TauTypes::hh
@ hh
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:53
tree
TChain * tree
Definition: tile_monitor.h:30
JiveXML::Event
struct Event_t Event
Definition: ONCRPCServer.h:65
TIDARoiDescriptor
Describes the Region of Ineterest geometry It has basically 8 parameters.
Definition: TIDARoiDescriptor.h:42
TIDA::Event
Definition: TIDAEvent.h:33
TIDA::Chain::addRoi
void addRoi(TIDA::Roi &roi)
add and roi by root dictionary class
Definition: TIDAChain.h:44
python.MuonSegmentFindingConfig.ars
ars
Definition: MuonSegmentFindingConfig.py:637
lumiFormat.i
int i
Definition: lumiFormat.py:85
h
hist_file_dump.f
f
Definition: hist_file_dump.py:135
TIDA::Chain
Definition: TIDAChain.h:28