63 {
64
68
69 TString
fileName =
"root://eosatlas.cern.ch//eos/atlas/atlastier0/tzero/prod/valid1/PowhegPythia8_AU2CT10_Zmumu/147807/valid1.147807.PowhegPythia8_AU2CT10_Zmumu.recon.AOD.e2658_s1967_s1964_r5787_v114/valid1.147807.PowhegPythia8_AU2CT10_Zmumu.recon.AOD.e2658_s1967_s1964_r5787_v114._000187.1";
70
71
72
73 if(argc>1) {
75 }
76
77 const TString
tag =
"t2_";
79 std::unique_ptr< TFile >
ifile( TFile::Open( fileName,
"READ" ) );
80
82
84
85
87 selTool.setProperty("maxZ0SinTheta", 3.);
88 selTool.setProperty("minPt", 1000.);
89 selTool.setProperty("CutLevel", "Loose");
90
91
93
94
95 m_trkIsoTool.setProperty( "TrackSelectionTool", ToolHandle< InDet::IInDetTrackSelectionTool >(selTool.name()) );
96
97 if(!m_caloIsoTool.initialize().isSuccess()){
99 }
100
101 if(!selTool.initialize().isSuccess()){
103 }
104
105 if(!m_trkIsoTool.initialize().isSuccess()){
107 }
108
109 vector<xAOD::Iso::IsolationType> isoTypes;
115
116 vector<xAOD::Iso::IsolationType> isoTypesCalo;
123
124 vector<xAOD::Iso::IsolationType> isoTypesPFlow;
131
132
135
136
137
138 Long64_t maxEVT = -1;
139 Long64_t
entries =
event.getEntries();
140 if((
entries < maxEVT) || (maxEVT <= 0)) {
142 }
144 const int INTERVAL = maxEVT > 20000? 10000: maxEVT/10;
145 for( Long64_t entry = 0;
entry < maxEVT; ++
entry ) {
146 event.getEntry( entry );
149
150
151 if(entry%INTERVAL==0){
153 }
154
155
156
159
160
162 CHECK(
event.retrieve( electrons,
"Electrons" ) );
163
164
166 CHECK(
event.retrieve( photons,
"Photons" ) );
167
168 for(auto muon: *muons){
171 if(m_trkIsoTool.trackIsolation(
result, *muon, isoTypes, corrlist)){
172 for(
unsigned int i=0;
i<isoTypes.size();
i++){
174 float isoV =
result.ptvarcones_10GeVDivPt[
i];
175 float value0 = -999;
176 if(!m_helperTool->
isolation(value0, *muon, isoTypes[i]))
Info(
APP_NAME,
"Muon default track iso not got.");
177 Info(
APP_NAME,
"Muon track isolation %d is %f and %f (=%f?)", i, iso, isoV, value0);
178 }
179 }
181 if(m_caloIsoTool.caloTopoClusterIsolation(result2, *muon, isoTypesCalo, corrlist2)){
182 for(
unsigned int i=0;
i<isoTypesCalo.size();
i++){
183 float value0 = -999;
186 }
187 }
189 if(m_caloIsoTool.neutralEflowIsolation(result3, *muon, isoTypesPFlow, corrlist3)){
190 for(
unsigned int i=0;
i<isoTypesPFlow.size();
i++){
191 float value0 = -999;
192 if(!m_helperTool->
isolation(value0, *muon, isoTypesPFlow[i]))
Info(
APP_NAME,
"Muon default pflow iso not got.");
194 }
195 }
196 }
197
198 for(auto electron: *electrons){
201 if(m_trkIsoTool.trackIsolation(
result, *electron, isoTypes, corrlist)){
202 for(
unsigned int i=0;
i<isoTypes.size();
i++){
204 float isoV =
result.ptvarcones_10GeVDivPt[
i];
205 float value0 = -999;
206 if(!m_helperTool->
isolation(value0, *electron, isoTypes[i]))
Info(
APP_NAME,
"Electron default track iso not got.");
207 Info(
APP_NAME,
"Electron track isolation %d is %f and %f (=%f?)", i, iso, isoV, value0);
208 }
209 }
211 if(m_caloIsoTool.caloTopoClusterIsolation(result2, *electron, isoTypesCalo, corrlist2)){
212 for(
unsigned int i=0;
i<isoTypesCalo.size();
i++){
213 float value0 = -999;
216 }
217 }
219 }
220
221 for(auto photon: *photons){
224 if(m_trkIsoTool.trackIsolation(
result, *photon, isoTypes, corrlist)){
225 for(
unsigned int i=0;
i<isoTypes.size();
i++){
227 float isoV =
result.ptvarcones_10GeVDivPt[
i];
228 float value0 = -999;
229 if(!m_helperTool->
isolation(value0, *photon, isoTypes[i]))
Info(
APP_NAME,
"photon default track iso not got.");
230 Info(
APP_NAME,
"Photon track isolation %d is %f and %f (=%f?)", i, iso, isoV, value0);
231 }
232 }
234 if(m_caloIsoTool.caloTopoClusterIsolation(result2, *photon, isoTypesCalo, corrlist2)){
235 for(
unsigned int i=0;
i<isoTypesCalo.size();
i++){
236 float value0 = -999;
239 }
240 }
242
243 }
244 }
245
247
248
249
250 delete m_helperTool;
251
252 return 0;
253
254}
bool isolation(float &value, const xAOD::IParticle &par, xAOD::Iso::IsolationType type) const
uint32_t runNumber() const
The current event's run number.
uint64_t eventNumber() const
The current event's event number.
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
@ neflowisol20
Neutral eflow isolation.
@ topoetcone20
Topo-cluster ET-sum.
@ ptcone20
Track isolation.
@ coreTrackPtr
tracks pointer
@ pileupCorrection
fully corrected
@ coreCone
core energy (in dR<0.1).
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
EventInfo_v1 EventInfo
Definition of the latest event info version.
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".
Iso::IsolationCaloCorrectionBitset calobitset
std::vector< float > etcones
Iso::IsolationTrackCorrectionBitset trackbitset