|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #ifndef CPANALYSISEXAMPLES_ERRORCHECK_H
7 #define CPANALYSISEXAMPLES_ERRORCHECK_H
11 const bool result = ARG; \
13 ::Error( APP_NAME, "Failed to execute: \"%s\"", \
19 #endif // CPANALYSISEXAMPLES_ERRORCHECK_H
59 const float GeV = 1000.;
61 const float PI = 3.1416;
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";
77 const TString
tag =
"t2_";
79 std::unique_ptr< TFile >
ifile( TFile::Open(
fileName,
"READ" ) );
87 selTool.setProperty(
"maxZ0SinTheta", 3.);
88 selTool.setProperty(
"minPt", 1000.);
89 selTool.setProperty(
"CutLevel",
"Loose");
95 m_trkIsoTool.setProperty(
"TrackSelectionTool", ToolHandle< InDet::IInDetTrackSelectionTool >(selTool.name()) );
98 Info(
APP_NAME,
"m_caloIsoTool.initialize() failed");
102 Info(
APP_NAME,
"selTool.initialize() failed");
106 Info(
APP_NAME,
"m_trkIsoTool.initialize() failed");
109 vector<xAOD::Iso::IsolationType> isoTypes;
116 vector<xAOD::Iso::IsolationType> isoTypesCalo;
124 vector<xAOD::Iso::IsolationType> isoTypesPFlow;
138 Long64_t maxEVT = -1;
139 Long64_t
entries =
event.getEntries();
140 if((
entries < maxEVT) || (maxEVT <= 0)) {
143 Info(
APP_NAME,
"%lld events found, %lld events will be processed.",
entries, maxEVT);
144 const int INTERVAL = maxEVT > 20000? 10000: maxEVT/10;
146 event.getEntry(
entry );
151 if(
entry%INTERVAL==0){
168 for(
auto muon: *muons){
169 Info(
APP_NAME,
"---------NEW MUON -------");
172 for(
unsigned int i=0;
i<isoTypes.size();
i++){
174 float isoV =
result.ptvarcones_10GeVDivPt[
i];
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);
182 for(
unsigned int i=0;
i<isoTypesCalo.size();
i++){
185 Info(
APP_NAME,
"Muon topo isolation %d is %f (=%f?)",
i, result2.
etcones[
i], value0);
190 for(
unsigned int i=0;
i<isoTypesPFlow.size();
i++){
192 if(!m_helperTool->
isolation(value0, *
muon, isoTypesPFlow[
i])) Info(
APP_NAME,
"Muon default pflow iso not got.");
193 Info(
APP_NAME,
"Muon neflow isolation %d is %f (=%f?)",
i, result3.
etcones[
i], value0);
199 Info(
APP_NAME,
"---------NEW ELECTRON -------");
202 for(
unsigned int i=0;
i<isoTypes.size();
i++){
204 float isoV =
result.ptvarcones_10GeVDivPt[
i];
207 Info(
APP_NAME,
"Electron track isolation %d is %f and %f (=%f?)",
i, iso, isoV, value0);
212 for(
unsigned int i=0;
i<isoTypesCalo.size();
i++){
215 Info(
APP_NAME,
"Electron topo isolation %d is %f (=%f?)",
i, result2.
etcones[
i], value0);
221 for(
auto photon: *photons){
222 Info(
APP_NAME,
"---------NEW photon -------");
225 for(
unsigned int i=0;
i<isoTypes.size();
i++){
227 float isoV =
result.ptvarcones_10GeVDivPt[
i];
230 Info(
APP_NAME,
"Photon track isolation %d is %f and %f (=%f?)",
i, iso, isoV, value0);
235 for(
unsigned int i=0;
i<isoTypesCalo.size();
i++){
238 Info(
APP_NAME,
"Photon topo isolation %d is %f (=%f?)",
i, result2.
etcones[
i], value0);
246 Info(
APP_NAME,
"Finished successfully!");
@ topoetcone20
Topo-cluster ET-sum.
@ neflowisol20
Neutral eflow isolation.
uint64_t eventNumber() const
The current event's event number.
@ coreTrackPtr
tracks pointer
bool isolation(float &value, const xAOD::IParticle &par, xAOD::Iso::IsolationType type) const
Iso::IsolationTrackCorrectionBitset trackbitset
@ ptcone20
Track isolation.
@ kClassAccess
Access auxiliary data using the aux containers.
uint32_t runNumber() const
The current event's run number.
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
std::vector< float > etcones
@ coreCone
core energy (in dR<0.1).
Class describing the basic event information.
StatusCode retrieve(const T *&obj)
Tool for accessing xAOD files outside of Athena.
Iso::IsolationCaloCorrectionBitset calobitset
@ pileupCorrection
fully corrected
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.