45 {
46
47
49
50
51 if( argc < 2 ) {
54 return 1;
55 }
56
57
59
60
63 std::unique_ptr< TFile >
ifile( TFile::Open( fileName,
"READ" ) );
65
66
67
71 static_cast< int >(
event.getEntries() ) );
72
73
74
75 Long64_t
entries =
event.getEntries();
76 if( argc > 2 ) {
77 const Long64_t
e = atoll( argv[ 2 ] );
80 }
81 }
82
83
85
86 CHECK( m_isoCorrTool.setProperty(
"IsMC",
true) );
87
89 CHECK(m_isoCorrTool.setProperty(
"CorrFile",file_unc));
90
91 if(!m_isoCorrTool.initialize()){
92 std::cout <<"Failed to initialize the tool, check for errors"<<std::endl;
93 return 0;
94 }
95
96
97
98 std::cout <<
"loop on " <<
entries <<
" entries"<<std::endl;
100
101
102 event.getEntry( entry );
103
104
107
108
109
111 CHECK(
event.retrieve( photons,
"Photons" ) );
112
113
115
116
120
122 for( ; ph_itr != ph_end; ++ph_itr, ++
i ) {
124
125
126 if(ph->
pt()<10000.0)
continue;
127 if( fabs(ph->
eta())>2.47)
continue;
130
131
132 CHECK(m_isoCorrTool.applyCorrection(*ph));
134
135
136 }
137
138 }
139 CHECK(m_isoCorrTool.finalize());
140
141
142 return 1;
143}
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
DataModel_detail::iterator< DataVector > iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
Error
The different types of error that can be flagged in the L1TopoRDO.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, const EventContext &ctx)
Function making a shallow copy of a constant container.
Photon_v1 Photon
Definition of the current "egamma version".