ATLAS Offline Software
Generators
TruthIO
src
PrintHijingPars.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 "
TruthIO/PrintHijingPars.h
"
6
7
#include "
GeneratorObjects/HijingEventParams.h
"
8
9
PrintHijingPars::PrintHijingPars
(
const
std::string&
name
, ISvcLocator* pSvcLocator) :
10
GenBase
(
name
, pSvcLocator)
11
{
12
// Set users' request
13
declareProperty
(
"HijingParamsKey"
,
m_key
=
"Hijing_event_params"
);
14
declareProperty
(
"VerboseOutput"
,
m_VerboseOutput
=
true
);
15
declareProperty
(
"FirstEvent"
,
m_firstEvt
=1);
16
declareProperty
(
"LastEvent"
,
m_lastEvt
=100000000);
17
}
18
19
StatusCode
PrintHijingPars::initialize
(){
20
21
ATH_CHECK
(
GenBase::initialize
() );
22
23
ATH_MSG_INFO
(
">>> PrintHijingPars from Initialize"
);
24
std::cout <<
"----- PrintHijingPars From initialize"
<< std::endl;
25
26
if
(
m_lastEvt
<
m_firstEvt
) {
m_lastEvt
=
m_firstEvt
; }
27
28
// Initialization terminated
29
return
StatusCode::SUCCESS;
30
}
31
32
StatusCode
PrintHijingPars::execute
()
33
{
34
35
const
HijingEventParams
*hijing_pars;
36
const
StatusCode
sc
=
evtStore
()->retrieve(hijing_pars,
m_key
);
37
if
(!
sc
.isSuccess()) {
38
ATH_MSG_ERROR
(
"Could not retrieve Hijing_event_params"
);
39
return
StatusCode::FAILURE;
40
}
41
42
// printout hijing event params
43
// ----------------------------
44
std::cout <<
"----- PrintHijingPars -----"
<< std::endl;
45
std::cout <<
"np: "
<< hijing_pars->
get_np
() << std::endl;
46
std::cout <<
"nt: "
<< hijing_pars->
get_nt
() << std::endl;
47
std::cout <<
"n0: "
<< hijing_pars->
get_n0
() << std::endl;
48
std::cout <<
"n01: "
<< hijing_pars->
get_n01
() << std::endl;
49
std::cout <<
"n10: "
<< hijing_pars->
get_n10
() << std::endl;
50
std::cout <<
"n11: "
<< hijing_pars->
get_n11
() << std::endl;
51
std::cout <<
"natt: "
<< hijing_pars->
get_natt
() << std::endl;
52
std::cout <<
"jatt: "
<< hijing_pars->
get_jatt
() << std::endl;
53
std::cout <<
"b: "
<< hijing_pars->
get_b
() << std::endl;
54
std::cout <<
"bphi: "
<< hijing_pars->
get_bphi
() << std::endl;
55
std::cout <<
"---------------------------"
<< std::endl;
56
57
// End of execution for each event
58
return
StatusCode::SUCCESS;
59
}
60
61
StatusCode
PrintHijingPars::finalize
() {
62
63
ATH_MSG_INFO
(
">>> PrintHijingPars from finalize"
);
64
std::cout <<
"----- PrintHijingPars From finalize"
<< std::endl;
65
66
// End of finalization step
67
return
StatusCode::SUCCESS;
68
}
PrintHijingPars::m_firstEvt
int m_firstEvt
Definition:
PrintHijingPars.h:22
HijingEventParams::get_natt
int get_natt() const
Definition:
HijingEventParams.h:89
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition:
AthMsgStreamMacros.h:31
HijingEventParams.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition:
AthCommonDataStore.h:145
PrintHijingPars::finalize
StatusCode finalize()
Definition:
PrintHijingPars.cxx:61
HijingEventParams::get_np
int get_np() const
Definition:
HijingEventParams.h:83
PrintHijingPars::m_VerboseOutput
bool m_VerboseOutput
Definition:
PrintHijingPars.h:21
HijingEventParams::get_n10
int get_n10() const
Definition:
HijingEventParams.h:87
AthenaPoolTestRead.sc
sc
Definition:
AthenaPoolTestRead.py:27
PrintHijingPars::m_lastEvt
int m_lastEvt
Definition:
PrintHijingPars.h:23
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition:
AthCommonDataStore.h:85
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition:
AthMsgStreamMacros.h:33
GenBase
Base class for common behaviour of MC truth algorithms.
Definition:
GenBase.h:47
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HijingEventParams
Definition:
HijingEventParams.h:23
HijingEventParams::get_n11
int get_n11() const
Definition:
HijingEventParams.h:88
HijingEventParams::get_n0
int get_n0() const
Definition:
HijingEventParams.h:85
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
HijingEventParams::get_n01
int get_n01() const
Definition:
HijingEventParams.h:86
HijingEventParams::get_bphi
float get_bphi() const
Definition:
HijingEventParams.h:92
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
PrintHijingPars::execute
StatusCode execute()
Definition:
PrintHijingPars.cxx:32
HijingEventParams::get_b
float get_b() const
Definition:
HijingEventParams.h:91
PrintHijingPars::initialize
StatusCode initialize()
Definition:
PrintHijingPars.cxx:19
PrintHijingPars::m_key
std::string m_key
Definition:
PrintHijingPars.h:20
PrintHijingPars.h
GenBase::initialize
virtual StatusCode initialize() override
Definition:
GenBase.cxx:17
HijingEventParams::get_jatt
int get_jatt() const
Definition:
HijingEventParams.h:90
HijingEventParams::get_nt
int get_nt() const
Definition:
HijingEventParams.h:84
PrintHijingPars::PrintHijingPars
PrintHijingPars(const std::string &name, ISvcLocator *pSvcLocator)
Definition:
PrintHijingPars.cxx:9
Generated on Sun Dec 22 2024 21:16:42 for ATLAS Offline Software by
1.8.18