ATLAS Offline Software
PhysicsAnalysis
PhysicsValidation
GeneratorPhysVal
src
GeneratorEventInfo.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
GeneratorEventInfo.h
"
6
7
namespace
GeneratorPhysVal
{
8
GeneratorEventInfo::GeneratorEventInfo
(
PlotBase
* pParent,
const
std::string&
sDir
,
9
const
std::string& sType)
10
:
PlotBase
(pParent,
sDir
), m_sType(sType) {
11
12
m_event_number
=
Book1D
(
"is_event_number"
,
"is_event_number"
, 2, -0.5, 1.5);
13
m_mc_ChannelNumber
=
14
Book1D
(
"is_mc_ChannelNumber"
,
"is_mc_ChannelNumber"
, 2, -0.5, 1.5);
15
}
16
void
GeneratorEventInfo::check_eventNumber
(
SG::ReadHandle<xAOD::EventInfo>
evt
) {
17
const
auto
eventNumber
=
evt
->eventNumber();
18
m_event_number
->Fill(
eventNumber
> 0 ? 1.0 : 0.0);
19
}
20
21
int
GeneratorEventInfo::check_mcChannelNumber
(
SG::ReadHandle<xAOD::EventInfo>
evt
,
22
int
ref
) {
23
int
mcChannelNumber
=
evt
->mcChannelNumber();
24
if
(
ref
== 0) {
25
ref
=
mcChannelNumber
;
26
m_mc_ChannelNumber
->Fill(1.);
27
}
else
{
28
m_mc_ChannelNumber
->Fill(
mcChannelNumber
==
ref
? 1.0 : 0.0);
29
}
30
return
ref
;
31
}
32
}
// namespace GeneratorPhysVal
GeneratorPhysVal::GeneratorEventInfo::check_eventNumber
void check_eventNumber(SG::ReadHandle< xAOD::EventInfo > evt)
Definition:
GeneratorEventInfo.cxx:16
PlotBase
Definition:
PlotBase.h:34
SG::ReadHandle
Definition:
StoreGate/StoreGate/ReadHandle.h:70
python.copyTCTOutput.sDir
sDir
Definition:
copyTCTOutput.py:60
LArG4FSStartPointFilter.evt
evt
Definition:
LArG4FSStartPointFilter.py:42
xAOD::mcChannelNumber
mcChannelNumber
Definition:
EventInfo_v1.cxx:197
GeneratorPhysVal::GeneratorEventInfo::GeneratorEventInfo
GeneratorEventInfo(PlotBase *pParent, const std::string &sDir, const std::string &sType="")
Definition:
GeneratorEventInfo.cxx:8
PlotBase::Book1D
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition:
PlotBase.cxx:94
GeneratorPhysVal::GeneratorEventInfo::check_mcChannelNumber
int check_mcChannelNumber(SG::ReadHandle< xAOD::EventInfo > evt, int ref)
Definition:
GeneratorEventInfo.cxx:21
xAOD::eventNumber
eventNumber
Definition:
EventInfo_v1.cxx:124
GeneratorPhysVal::GeneratorEventInfo::m_mc_ChannelNumber
TH1 * m_mc_ChannelNumber
Definition:
GeneratorEventInfo.h:24
GeneratorEventInfo.h
ref
const boost::regex ref(r_ef)
GeneratorPhysVal::GeneratorEventInfo::m_event_number
TH1 * m_event_number
Definition:
GeneratorEventInfo.h:23
GeneratorPhysVal
Definition:
GeneratorEventInfo.cxx:7
Generated on Fri Jan 10 2025 21:10:36 for ATLAS Offline Software by
1.8.18