Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
blob
master
calibrations
generators
FermiMotionAfterburner
flowAfterburner
hijing
HIJINGFlipAfterburner
JETSCAPE
JEWEL
phhepmc
Fun4AllHepMCInputManager.cc
Fun4AllHepMCInputManager.h
Fun4AllHepMCOutputManager.cc
Fun4AllHepMCOutputManager.h
Fun4AllHepMCPileupInputManager.cc
Fun4AllHepMCPileupInputManager.h
Fun4AllOscarInputManager.cc
Fun4AllOscarInputManager.h
HepMCFlowAfterBurner.cc
HepMCFlowAfterBurner.h
PHGenIntegral.cc
PHGenIntegral.h
PHGenIntegralLinkDef.h
PHGenIntegralv1.cc
PHGenIntegralv1.h
PHGenIntegralv1LinkDef.h
PHHepMC_ioLinkDef.h
PHHepMCGenEvent.cc
PHHepMCGenEvent.h
PHHepMCGenEventLinkDef.h
PHHepMCGenEventMap.cc
PHHepMCGenEventMap.h
PHHepMCGenEventMapLinkDef.h
PHHepMCGenEventv1.cc
PHHepMCGenEventv1.h
PHHepMCGenEventv1LinkDef.h
PHHepMCGenHelper.cc
PHHepMCGenHelper.h
PHHepMCParticleSelectorDecayProductChain.cc
PHHepMCParticleSelectorDecayProductChain.h
PHPythia6
PHPythia8
PHSartre
ReactionPlaneAfterburner
sHEPGen
sHijing
offline
simulation
validation
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHGenIntegralv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHGenIntegralv1.cc
1
// $Id: $
2
11
#include "
PHGenIntegralv1.h
"
12
13
#include <
phool/PHObject.h
>
// for PHObject
14
15
#include <cstdlib>
16
#include <iostream>
17
18
using namespace
std;
19
20
PHGenIntegralv1::PHGenIntegralv1
()
21
: m_NProcessedEvent(0)
22
, m_NGeneratorAcceptedEvent(0)
23
, m_IntegratedLumi(0.)
24
, m_SumOfWeight(0.)
25
, m_Description(
"Source Not Provided"
)
26
{}
27
28
PHGenIntegralv1::PHGenIntegralv1
(
const
std::string
&
description
)
29
: m_NProcessedEvent(0)
30
, m_NGeneratorAcceptedEvent(0)
31
, m_IntegratedLumi(0.)
32
, m_SumOfWeight(0.)
33
, m_Description(description)
34
{}
35
36
void
PHGenIntegralv1::identify
(ostream&
os
)
const
37
{
38
os <<
"PHGenIntegralv1::identify: "
<<
get_Description
() << endl
39
<<
" N_Generator_Accepted_Event = "
<<
get_N_Generator_Accepted_Event
() <<
" @ "
<<
get_CrossSection_Generator_Accepted_Event
() <<
" pb"
<< endl
40
<<
" N_Processed_Event = "
<<
get_N_Processed_Event
() <<
" @ "
<<
get_CrossSection_Processed_Event
() <<
" pb"
<< endl
41
<<
" Sum_Of_Weight = "
<<
get_Sum_Of_Weight
() << endl
42
<<
" Integrated_Lumi = "
<<
get_Integrated_Lumi
() <<
" pb^-1"
<< endl;
43
}
44
45
void
PHGenIntegralv1::Reset
()
46
{
47
m_NProcessedEvent
= 0;
48
m_NGeneratorAcceptedEvent
= 0;
49
m_IntegratedLumi
= 0;
50
m_SumOfWeight
= 0;
51
m_Description
=
"Source Not Provided"
;
52
}
53
54
int
PHGenIntegralv1::Integrate
(
PHObject
* incoming_object)
55
{
56
const
PHGenIntegral
* in_gen =
dynamic_cast<
const
PHGenIntegral
*
>
(incoming_object);
57
58
if
(!in_gen)
59
{
60
cout <<
"PHGenIntegralv1::Integrate - Fatal Error - "
61
<<
"input object is not a PHGenIntegral: "
;
62
incoming_object->
identify
();
63
64
exit(EXIT_FAILURE);
65
}
66
67
if
(
m_IntegratedLumi
== 0 and
m_NProcessedEvent
== 0)
68
{
69
m_Description
= in_gen->
get_Description
();
70
}
71
else
if
(
m_Description
!= in_gen->
get_Description
())
72
{
73
m_Description
=
m_Description
+
", and "
+ in_gen->
get_Description
();
74
}
75
76
m_NProcessedEvent
+= in_gen->
get_N_Processed_Event
();
77
m_NGeneratorAcceptedEvent
+= in_gen->
get_N_Generator_Accepted_Event
();
78
m_IntegratedLumi
+= in_gen->
get_Integrated_Lumi
();
79
m_SumOfWeight
+= in_gen->
get_Sum_Of_Weight
();
80
81
return
m_NProcessedEvent
;
82
}
83
84
void
PHGenIntegralv1::CopyFrom
(
const
PHObject
* incoming_object)
85
{
86
const
PHGenIntegral
* in_gen =
dynamic_cast<
const
PHGenIntegral
*
>
(incoming_object);
87
88
if
(!in_gen)
89
{
90
cout <<
"PHGenIntegralv1::CopyFrom - Fatal Error - "
91
<<
"input object is not a PHGenIntegral: "
;
92
incoming_object->
identify
();
93
94
exit(EXIT_FAILURE);
95
}
96
97
m_NProcessedEvent
= in_gen->
get_N_Processed_Event
();
98
m_NGeneratorAcceptedEvent
= in_gen->
get_N_Generator_Accepted_Event
();
99
m_IntegratedLumi
= in_gen->
get_Integrated_Lumi
();
100
m_SumOfWeight
= in_gen->
get_Sum_Of_Weight
();
101
m_Description
= in_gen->
get_Description
();
102
}
coresoftware
blob
master
generators
phhepmc
PHGenIntegralv1.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:03
using
1.8.2 with
sPHENIX GitHub integration