|
ATLAS Offline Software
|
Authors: James Catmore and Maria Smizanska James.nosp@m..Cat.nosp@m.more@.nosp@m.cern.nosp@m..ch / Maria.nosp@m..Smi.nosp@m.zansk.nosp@m.a@ce.nosp@m.rn.ch Inherits from Pythia8_i by James Monk.
More...
#include <Pythia8B_i.h>
|
| Pythia8B_i (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~Pythia8B_i () |
|
virtual StatusCode | genInitialize () |
| For initializing the generator, if required. More...
|
|
virtual StatusCode | genuserInitialize () |
| For initialization of user code, if required. Called after genInitialize. More...
|
|
virtual StatusCode | callGenerator () |
| For calling the generator on each iteration of the event loop. More...
|
|
virtual StatusCode | genFinalize () |
| For finalising the generator, if required. More...
|
|
virtual StatusCode | fillEvt (HepMC::GenEvent *) |
| For filling the HepMC event object. More...
|
|
bool | leptonSelect (Pythia8::Event &, const std::vector< double > &, double, const std::vector< int > &, int, double, bool) |
|
bool | cleanUndecayed (Pythia8::Event &, const std::vector< int > &) |
|
bool | pairProperties (Pythia8::Event &, const std::vector< int > &, double, bool) |
|
void | descendThroughDecay (Pythia8::Event &, std::vector< Pythia8::Particle > &, int) const |
|
std::vector< int > | getCodes (const std::vector< Pythia8::Particle > &) const |
|
bool | compare (std::vector< int >, std::vector< int >) const |
|
bool | passesPTCuts (const std::vector< Pythia8::Particle > &) const |
|
bool | passesEtaCuts (const std::vector< Pythia8::Particle > &) const |
|
bool | signalAccept (Pythia8::Event &, const std::vector< int > &, unsigned int) const |
|
bool | userSelection (Pythia8::Event &, std::string, std::vector< double >) |
|
void | printSignalSelections (const std::vector< int > &, const std::vector< double > &, const std::vector< double > &, unsigned int) const |
|
virtual StatusCode | fillWeights (HepMC::GenEvent *evt) |
|
double | pythiaVersion () const |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
std::unique_ptr< Pythia8::Pythia > | m_pythia {} |
|
HepMC::Pythia8ToHepMC | m_pythiaToHepMC |
|
UnsignedIntegerProperty | m_maxFailures {this, "MaxFailures", 10} |
|
BooleanProperty | m_useRndmGenSvc {this, "useRndmGenSvc", true, "the max number of consecutive failures"} |
|
std::shared_ptr< customRndm > | m_atlasRndmEngine {} |
|
BooleanProperty | m_useReseed {this,"useReseed", false} |
|
IntegerProperty | m_dsid {this, "Dsid", 999999, "Dataset ID number"} |
|
StringArrayProperty | m_userHooks {this, "UserHooks", {} } |
|
DoubleProperty | m_pt0timesMPI {this,"pT0timesMPI", 1.0} |
|
DoubleProperty | m_numberAlphaS {this,"numberAlphaS", 3.0} |
|
BooleanProperty | m_sameAlphaSAsMPI {this,"useSameAlphaSasMPI", false} |
|
|
unsigned int | m_had |
|
unsigned int | m_dec |
|
int | m_trigCode |
|
unsigned int | m_nSignalRequired |
|
std::vector< int > | m_bcodes |
|
std::vector< int > | m_sigCodes |
|
std::vector< int > | m_cutCount |
|
std::vector< double > | m_trigPtCut |
|
std::vector< double > | m_sigPtCuts |
|
std::vector< double > | m_sigEtaCuts |
|
int | m_totalPythiaCalls |
|
int | m_totalBQuark |
|
int | m_totalCQuark |
|
int | m_totalBBarQuark |
|
int | m_totalCBarQuark |
|
int | m_totalClone |
|
int | m_passingTriggerCuts |
|
int | m_internal_event_number |
|
int | m_totalHard |
|
int | m_atLeastOneAcc |
|
std::map< int, int > | m_speciesCount |
|
std::vector< long int > | m_seeds |
|
bool | m_and |
|
bool | m_oppCharges |
|
bool | m_vetoDoubleB |
|
bool | m_vetoDoubleC |
|
bool | m_selectBQuarks |
|
bool | m_selectCQuarks |
|
double | m_qPtCut |
|
double | m_aqPtCut |
|
double | m_qEtaCut |
|
double | m_aqEtaCut |
|
double | m_invMass |
|
double | m_trigEtaCut |
|
std::string | m_userString |
|
std::vector< double > | m_userVar |
|
std::vector< Pythia8::Event > | m_BEventBuffer |
|
std::vector< int > | m_internalEventNumbers |
|
bool | m_doSuppressSmallPT |
|
Pythia8::SuppressSmallPT * | m_SuppressSmallPT |
|
unsigned int | m_failureCount |
|
double | m_version {-1.} |
|
StringArrayProperty | m_commands {this, "Commands", {} } |
|
std::vector< std::string > | m_userParams |
|
std::vector< std::string > | m_userModes |
|
DoubleProperty | m_collisionEnergy {this, "CollisionEnergy", 14000.0} |
|
StringProperty | m_beam1 {this, "Beam1", "PROTON"} |
|
StringProperty | m_beam2 {this, "Beam2", "PROTON"} |
|
bool | m_override_transform_beamenergy {false} |
|
StringProperty | m_lheFile {this, "LHEFile", ""} |
|
BooleanProperty | m_doCKKWLAcceptance {this, "CKKWLAcceptance", false} |
|
BooleanProperty | m_doFxFxXS {this, "FxFxXS", false} |
|
BooleanProperty | m_computeEfficiency {this, "computeEfficiency", false} |
|
double | m_nAccepted {0.} |
|
double | m_nMerged {0.} |
|
double | m_sigmaTotal {0.} |
|
double | m_conversion {1.} |
|
std::map< std::string, PDGID > | m_particleIDs |
|
StringProperty | m_userProcess {this, "UserProcess", ""} |
|
std::shared_ptr< Pythia8::Sigma2Process > | m_procPtr {} |
|
std::vector< UserHooksPtrType > | m_userHooksPtrs {} |
|
StringProperty | m_userResonances {this, "UserResonances", ""} |
|
std::vector< std::shared_ptr< Pythia8::ResonanceWidths > > | m_userResonancePtrs |
|
BooleanProperty | m_useLHAPDF {this, "UseLHAPDF", true} |
|
StringProperty | m_particleDataFile {this, "ParticleData", ""} |
|
StringProperty | m_outputParticleDataFile {this, "OutputParticleData", "ParticleData.local.xml"} |
|
double | m_mergingWeight {1.0} |
|
double | m_enhanceWeight {1.0} |
|
std::vector< std::string > | m_weightIDs {} |
|
std::vector< std::string > | m_weightNames {} |
|
bool | m_doLHE3Weights {false} |
|
std::vector< std::string > | m_weightCommands {} |
|
std::vector< std::string > | m_showerWeightNames {"nominal"} |
|
StringArrayProperty | m_showerWeightNamesProp {this, "ShowerWeightNames", {} } |
|
PublicToolHandle< IPythia8Custom > | m_athenaTool {this, "CustomInterface", ""} |
|
BooleanProperty | m_saveLHE {this, "SaveLHERecord", false} |
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc"} |
| Data members. More...
|
|
ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
| Handle on the incident service. More...
|
|
IntegerProperty | m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"} |
| Seed for random number engine. More...
|
|
BooleanProperty | m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"} |
| Flag for normal vs. afterburner generators. More...
|
|
CLHEP::HepRandomEngine * | getRandomEngine (const std::string &streamName, const EventContext &ctx) const |
|
CLHEP::HepRandomEngine * | getRandomEngine (const std::string &streamName, unsigned long int randomSeedOffset, const EventContext &ctx) const |
|
CLHEP::HepRandomEngine * | getRandomEngineDuringInitialize (const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const |
|
◆ StoreGateSvc_t
◆ PDGID
Enumerator |
---|
PROTON | |
ANTIPROTON | |
LEAD | |
NEUTRON | |
ANTINEUTRON | |
MUON | |
ANTIMUON | |
ELECTRON | |
POSITRON | |
INVALID | |
Definition at line 120 of file Pythia8_i.h.
◆ Pythia8B_i()
Pythia8B_i::Pythia8B_i |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Definition at line 27 of file Pythia8B_i.cxx.
73 m_runinfo = std::make_shared<HepMC3::GenRunInfo>();
74 std::vector<std::string>
names = {
"Default"};
75 m_runinfo->set_weight_names(
names);
◆ ~Pythia8B_i()
Pythia8B_i::~Pythia8B_i |
( |
| ) |
|
◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/2]
HepMC::GenEvent* event GenBase::ATLAS_NOT_CONST_THREAD_SAFE |
( |
| ) |
|
|
inlineinherited |
Access the current signal event (first in the McEventCollection)
- Note
- This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.
Definition at line 76 of file GenBase.h.
78 ATH_MSG_ERROR(
"McEventCollection is empty during first event access");
79 return *(
events()->begin());
◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]
◆ callGenerator()
StatusCode Pythia8B_i::callGenerator |
( |
| ) |
|
|
virtual |
For calling the generator on each iteration of the event loop.
Reimplemented from Pythia8_i.
Definition at line 150 of file Pythia8B_i.cxx.
157 ATH_MSG_DEBUG(
"BEventBuffer not empty; skipping callGenerator");
158 return StatusCode::SUCCESS;
164 const EventContext& ctx = Gaudi::Hive::currentContext();
184 return StatusCode::FAILURE;
190 ATH_MSG_ERROR(
"Exceeded the max number of consecutive event failures.");
191 return StatusCode::FAILURE;
202 int nbBeforeSelection(0);
203 int nbbarBeforeSelection(0);
204 int ncBeforeSelection(0);
205 int ncbarBeforeSelection(0);
211 for (
int i = 0;
i <
event.size(); ++
i) {
212 stat =
event[
i].statusAbs();
213 bool isBQuark(
false);
214 bool isCQuark(
false);
215 bool isAntiBQuark(
false);
216 bool isAntiCQuark(
false);
218 if (
event[
i].
id() == 5 && (
stat == 62 ||
stat == 63)) {isBQuark=
true; ++nbBeforeSelection;}
219 if (
event[
i].
id() == 4 && (
stat == 62 ||
stat == 63)) {isCQuark=
true; ++ncBeforeSelection;}
221 bool passesPtCut(
false);
bool passesEtaCut(
false);
222 std::string accString =
" : REJECTED";
223 double qpt =
event[
i].pT();
double qeta = std::abs(
event[
i].
eta());
226 if (passesPtCut && passesEtaCut) {
227 if (isBQuark) ++nbQuark;
228 if (isCQuark) ++ncQuark;
229 accString =
" : ACCEPTED";
231 if (isBQuark)
ATH_MSG_DEBUG(
"bQuark pt/eta = " << qpt <<
"/" << qeta << accString);
232 if (isCQuark)
ATH_MSG_DEBUG(
"cQuark pt/eta = " << qpt <<
"/" << qeta << accString);
235 if (
event[
i].
id() == -5 && (
stat == 62 ||
stat == 63)) {isAntiBQuark=
true; ++nbbarBeforeSelection;}
236 if (
event[
i].
id() == -4 && (
stat == 62 ||
stat == 63)) {isAntiCQuark=
true; ++ncbarBeforeSelection;}
238 bool passesPtCut(
false);
bool passesEtaCut(
false);
239 std::string accString =
" : REJECTED";
240 double aqpt =
event[
i].pT();
double aqeta = std::abs(
event[
i].
eta());
243 if (passesPtCut && passesEtaCut) {
244 if (isAntiBQuark) ++nbbarQuark;
245 if (isAntiCQuark) ++ncbarQuark;
246 accString =
" : ACCEPTED";
248 if (isAntiBQuark)
ATH_MSG_DEBUG(
"bbarQuark pt/eta = " << aqpt <<
"/" << aqeta << accString);
249 if (isAntiCQuark)
ATH_MSG_DEBUG(
"ccbarQuark pt/eta = " << aqpt <<
"/" << aqeta << accString);
252 if (nbBeforeSelection+nbbarBeforeSelection>=4 &&
m_vetoDoubleB) {
253 ATH_MSG_DEBUG(
"At user request, rejecting double b-bbar event; throwing dice again");
256 if (ncBeforeSelection+ncbarBeforeSelection>=4 &&
m_vetoDoubleC) {
257 ATH_MSG_DEBUG(
"At user request, rejecting double c-cbar event; throwing dice again");
260 bool rejectBBbar(
false);
261 bool rejectCCbar(
false);
268 ATH_MSG_DEBUG(
"No b- or c- quarks accepted; throwing the dice again");
272 ATH_MSG_DEBUG(
"No b-quarks accepted; throwing the dice again");
276 ATH_MSG_DEBUG(
"No c-quarks accepted; throwing the dice again");
286 bool doRepeatedDecays(
false);
if (
m_dec>1) doRepeatedDecays=
true;
287 if (doRepeatedDecays) {
294 std::vector<Pythia8::Event> repeatHadronizedEvents;
298 for (
unsigned int iRepeat = 0; iRepeat <
m_had; ++iRepeat) {
301 if (iRepeat > 0)
event = eventCopy;
304 repeatHadronizedEvents.push_back(
event);
308 std::vector<Pythia8::Event> savedEvents;
309 if (doRepeatedDecays) {
313 for (eventItr=repeatHadronizedEvents.begin(); eventItr!=repeatHadronizedEvents.end(); ++eventItr) {
314 for (
unsigned int iRepeat = 0; iRepeat <
m_dec; ++iRepeat) {
317 savedEvents.push_back(
event);
321 if (!doRepeatedDecays) savedEvents = std::move(repeatHadronizedEvents);
326 std::vector<Pythia8::Event> finalEvents;
327 bool signalSelect(
false);
329 for (eventItr=savedEvents.begin(); eventItr!=savedEvents.end(); ++eventItr) {
342 finalEvents.push_back(*eventItr);
349 for (eventItr=finalEvents.begin(); eventItr!=finalEvents.end(); ++eventItr) {
350 for (
int i = 0;
i < (*eventItr).size(); ++
i) {
351 int id = (*eventItr)[
i].id();
◆ cleanUndecayed()
bool Pythia8B_i::cleanUndecayed |
( |
Pythia8::Event & |
theEvent, |
|
|
const std::vector< int > & |
bCodes |
|
) |
| |
Definition at line 554 of file Pythia8B_i.cxx.
556 bool cleanEvent(
true);
557 std::string accString(
" : ACCEPTED");
558 for (
int i = 0;
i<theEvent.size(); ++
i) {
560 int id = theParticle.id();
561 int status = theParticle.status();
562 for (
auto iItr = bCodes.begin(); iItr!=bCodes.end(); ++iItr) {
563 if ( (
id == *iItr) && (
status>0) ) {accString=
" : REJECTED"; cleanEvent =
false;}
566 ATH_MSG_DEBUG(
"Check event for undecayed signal particles" << accString);
◆ cmTomm()
void GenBase::cmTomm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 10.
Definition at line 78 of file GenBase.cxx.
79 for (HepMC::GenEvent::vertex_iterator vtx =
evt->vertices_begin(); vtx !=
evt->vertices_end(); ++vtx) {
80 const HepMC::FourVector fv((*vtx)->position().x() * 10,
81 (*vtx)->position().y() * 10,
82 (*vtx)->position().z() * 10,
83 (*vtx)->position().t() * 10);
84 (*vtx)->set_position(fv);
◆ compare()
bool Pythia8B_i::compare |
( |
std::vector< int > |
vect1, |
|
|
std::vector< int > |
vect2 |
|
) |
| const |
Definition at line 646 of file Pythia8B_i.cxx.
648 if (vect1.size()!=vect2.size())
return false;
650 bool isTheSame(
true);
651 int size = vect1.size();
655 if (vect1[
i] != vect2[
i]) {isTheSame =
false;
break;}
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ descendThroughDecay()
void Pythia8B_i::descendThroughDecay |
( |
Pythia8::Event & |
theEvent, |
|
|
std::vector< Pythia8::Particle > & |
list, |
|
|
int |
i |
|
) |
| const |
Definition at line 617 of file Pythia8B_i.cxx.
619 list.push_back(theEvent[
i]);
620 std::vector<int> childrenIndices = theEvent.daughterList(
i);
622 for (iItr = childrenIndices.begin(); iItr != childrenIndices.end(); ++iItr) {
◆ detStore()
◆ event_const()
const HepMC::GenEvent* GenBase::event_const |
( |
| ) |
const |
|
inlineinherited |
Access the current signal event (const)
Definition at line 83 of file GenBase.h.
85 ATH_MSG_ERROR(
"Const McEventCollection is empty during first event access");
◆ events_const() [1/2]
◆ events_const() [2/2]
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode GenModule::execute |
( |
| ) |
|
|
virtualinherited |
- Todo:
- Remove hard-coded alg name checking (already incomplete)
Reimplemented from GenBase.
Definition at line 70 of file GenModule.cxx.
105 if (
name() ==
"ParticleDecayer") {
112 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ fillEvt()
StatusCode Pythia8B_i::fillEvt |
( |
HepMC::GenEvent * |
evt | ) |
|
|
virtual |
For filling the HepMC event object.
Reimplemented from Pythia8_i.
Definition at line 373 of file Pythia8B_i.cxx.
378 ATH_MSG_DEBUG(
"BEventBuffer now empty - going to next Pythia event");
379 return StatusCode::SUCCESS;
393 if (!
evt->run_info())
evt->set_run_info(m_runinfo);
413 return StatusCode::SUCCESS;
◆ fillWeights()
StatusCode Pythia8_i::fillWeights |
( |
HepMC::GenEvent * |
evt | ) |
|
|
virtualinherited |
mismatch in weight name!
Definition at line 486 of file Pythia8_i.cxx.
492 #ifndef PYTHIA8_304SERIES
495 if (hook->canEnhanceEmission()) {
499 #endif // not PYTHIA8_304SERIES
504 std::map<std::string,double> fWeights;
508 size_t atlas_specific_weights = 1;
509 fWeights[
"Default"]=eventWeight;
533 std::vector<std::string>::const_iterator
id =
m_weightIDs.begin()+atlas_specific_weights;
536 if(
m_pythia->info.getWeightsDetailedSize() != 0){
537 for(std::map<std::string, Pythia8::LHAwgt>::const_iterator wgt =
m_pythia->info.rwgt->wgts.begin();
538 wgt !=
m_pythia->info.rwgt->wgts.end(); ++wgt){
543 if(*
id != wgt->first){
544 ATH_MSG_ERROR(
"Mismatch in LHE3 weight id. Found "<<wgt->first<<
", expected "<<*
id);
545 return StatusCode::FAILURE;
550 std::map<std::string, Pythia8::LHAweight>::const_iterator weightName =
m_pythia->info.init_weights->find(wgt->first);
551 if(weightName !=
m_pythia->info.init_weights->end()){
564 for(
int iw = 1; iw <
m_pythia->info.PYTHIA8_NWEIGHTS(); ++iw){
580 fWeights[
"AUX_bare_not_for_analyses"]=(-10.0)*
m_pythia->info.eventWeightLHEF;
589 std::map<std::string, Pythia8::LHAweight>::const_iterator
weight =
m_pythia->info.init_weights->find(
id);
598 ATH_MSG_ERROR(
"Something wrong when building list of weight names: " <<
m_weightNames.size() <<
" vs "<< fWeights.size() <<
", exiting ...");
599 return StatusCode::FAILURE;
605 if (!
evt->run_info()) {
606 evt->set_run_info(m_runinfo);
612 evt->weights().push_back(1.0);
618 evt->weights().resize(fWeights.size(), 1.0);
619 for (
auto w: fWeights) {
620 evt->weight(
w.first)=
w.second;
623 auto beams=
evt->beams();
631 evt->weights().clear();
633 auto beams=
evt->beam_particles();
634 ATH_MSG_DEBUG(
" Energy of the beams " << beams.first->momentum().e() );
641 return StatusCode::SUCCESS;
◆ finalize()
StatusCode GenModule::finalize |
( |
| ) |
|
|
inlineinherited |
◆ findValue()
static std::string Pythia8_i::findValue |
( |
const std::string & |
command, |
|
|
const std::string & |
key |
|
) |
| |
|
staticprivateinherited |
◆ genFinalize()
StatusCode Pythia8B_i::genFinalize |
( |
| ) |
|
|
virtual |
For finalising the generator, if required.
Reimplemented from Pythia8_i.
Definition at line 418 of file Pythia8B_i.cxx.
425 double xs =
info.sigmaGen();
428 std::cout <<
"MetaData: cross-section (nb)= " << xs << std::endl;
430 std::cout <<
"Number of accepted b quarks = " <<
m_totalBQuark<< std::endl;
431 std::cout <<
"Number of accepted bbar quarks = " <<
m_totalBBarQuark<< std::endl;
432 std::cout <<
"Number of accepted c quarks = " <<
m_totalCQuark<< std::endl;
433 std::cout <<
"Number of accepted cbar quarks = " <<
m_totalCBarQuark<< std::endl;
434 std::cout <<
"Number of accepted b/c events before hadronization = " <<
m_totalHard<< std::endl;
435 std::cout <<
"Number of hadronization loops per b/c-event = " <<
m_had<< std::endl;
436 std::cout <<
"Total number of hadronization loops = " <<
m_totalClone<< std::endl;
437 std::cout <<
"Number of accepted b/c events yielding at least one finally accepted event = " <<
m_atLeastOneAcc<< std::endl;
441 std::cout <<
"Summary of cuts: " << std::endl;
443 if (
m_selectBQuarks) std::cout <<
"Quarks cuts apply to b-quarks" << std::endl;
444 if (
m_selectCQuarks) std::cout <<
"Quarks cuts apply to c-quarks" << std::endl;
445 std::cout <<
"Quark pt > " <<
m_qPtCut << std::endl;
446 std::cout <<
"Antiquark pt > " <<
m_aqPtCut << std::endl;
447 std::cout <<
"Quark eta < " <<
m_qEtaCut << std::endl;
448 std::cout <<
"Antiquark eta < " <<
m_aqEtaCut << std::endl;
449 if (
m_and) std::cout <<
"Require quark and anti-quark pass cuts" << std::endl;
451 std::cout <<
"Trigger lepton type = " <<
m_trigCode << std::endl;
452 std::cout <<
"Trigger lepton pt cuts: ";
453 for (
unsigned int prCntr=0; prCntr<
m_trigPtCut.size(); ++prCntr) {std::cout <<
m_trigPtCut[prCntr] <<
" ";}
454 std::cout << std::endl;
455 std::cout <<
"Trigger lepton eta cut: " <<
m_trigEtaCut << std::endl;
456 std::cout <<
"Required number of leptons passing each trigger cut = ";
457 for (
unsigned int prCntr=0; prCntr<
m_cutCount.size(); ++prCntr) {std::cout <<
m_cutCount[prCntr] <<
" ";}
458 std::cout << std::endl;
459 std::cout <<
"Invariant mass of trigger leptons > " <<
m_invMass << std::endl;
460 if (
m_oppCharges) std::cout <<
"Trigger leptons required to have opposite charges" << std::endl;
465 std::cout <<
"\nSpecies\tCount\n"<< std::endl;
468 std::cout << iter->first <<
'\t' << iter->second <<
'\n'<< std::endl;
470 if (
m_dec>1) std::cout <<
"Number of times each of these states were copied and decayed: " <<
m_dec << std::endl;
475 std::cout <<
" I===================================================================================== " << std::endl;
476 std::cout <<
" I CROSSSECTION OF YOUR B-CHANNEL IS I " << std::endl;
477 std::cout <<
" I BX= PX*NB/AC/MHAD= I " << finalXS <<
" nb" << std::endl;
478 std::cout <<
" I I " << std::endl;
479 std::cout <<
" I IN CASE YOU FORCED ANY DECAY YOU SHOULD I " << std::endl;
480 std::cout <<
" I CORRECT CROSS SECTION BX FURTHER, MULTIPLYING I " << std::endl;
481 std::cout <<
" I BX BY BRANCHING RATIO(S) OF YOUR FORCED I " << std::endl;
482 std::cout <<
" I DECAY(S) AND BY A FACTOR OF 2 FOR SYMMETRY I " << std::endl;
483 std::cout <<
" I I " << std::endl;
484 std::cout <<
" I MORE DETAILS ON CROSS SECTION I " << std::endl;
485 std::cout <<
" I PYTHIA CROSS SECTION IS PX= I " << xs <<
" nb" << std::endl;
486 std::cout <<
" I NUMBER OF ACCEPTED HARD EVENTS AC= I " <<
m_totalPythiaCalls << std::endl;
488 std::cout <<
" I REPEATED HADRONIZATIONS IN EACH EVENT MHAD= I " <<
m_had << std::endl;
489 std::cout <<
" I AVERAGE NUM OF ACCEPTED EVTS IN HADRONIZATION LOOP I " << cloningFactor << std::endl;
490 std::cout <<
" I IN CASE YOU FORCED ANY DECAY YOU SHOULD I " << std::endl;
491 std::cout <<
" I CORRECT CROSS SECTION BX FURTHER, MULTIPLYING I " << std::endl;
492 std::cout <<
" I BX BY BRANCHING RATIO(S) OF YOUR FORCED I " << std::endl;
493 std::cout <<
" I DECAY(S) AND BY A FACTOR OF 2 FOR SYMMETRY I " << std::endl;
494 std::cout <<
" I I " << std::endl;
495 std::cout <<
" I===================================================================================== " << std::endl;
496 std::cout <<
"" << std::endl;
497 std::cout <<
"MetaData: cross-section (nb)= " << finalXS << std::endl;
499 return StatusCode::SUCCESS;
◆ genInitialize()
StatusCode Pythia8B_i::genInitialize |
( |
| ) |
|
|
virtual |
For initializing the generator, if required.
Reimplemented from Pythia8_i.
Definition at line 84 of file Pythia8B_i.cxx.
89 ATH_MSG_ERROR(
"You are requesting " << trigPtCutsSize <<
" trigger-like pt cuts but are providing required counts for " <<
m_cutCount.size() <<
" cuts. This doesn't make sense.");
90 return StatusCode::FAILURE;
105 return StatusCode::FAILURE;
116 ATH_MSG_FATAL(
"Unable to retrieve HepRandomEngine. Bailing out.");
117 return StatusCode::FAILURE;
120 return StatusCode::SUCCESS;
◆ genuserInitialize()
StatusCode Pythia8B_i::genuserInitialize |
( |
| ) |
|
|
virtual |
For initialization of user code, if required. Called after genInitialize.
Reimplemented from GenModule.
Definition at line 125 of file Pythia8B_i.cxx.
146 return StatusCode::SUCCESS;
◆ getCodes()
std::vector< int > Pythia8B_i::getCodes |
( |
const std::vector< Pythia8::Particle > & |
theParticles | ) |
const |
Definition at line 632 of file Pythia8B_i.cxx.
634 std::vector<int>
codes;
635 codes.reserve(theParticles.size());
636 for (
auto pItr = theParticles.begin(); pItr!=theParticles.end(); ++pItr ) {
637 codes.push_back( (*pItr).id() );
◆ getRandomEngine() [1/2]
CLHEP::HepRandomEngine * GenModule::getRandomEngine |
( |
const std::string & |
streamName, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
protectedinherited |
◆ getRandomEngine() [2/2]
CLHEP::HepRandomEngine * GenModule::getRandomEngine |
( |
const std::string & |
streamName, |
|
|
unsigned long int |
randomSeedOffset, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
protectedinherited |
◆ getRandomEngineDuringInitialize()
CLHEP::HepRandomEngine * GenModule::getRandomEngineDuringInitialize |
( |
const std::string & |
streamName, |
|
|
unsigned long int |
randomSeedOffset, |
|
|
unsigned int |
conditionsRun = 1 , |
|
|
unsigned int |
lbn = 1 |
|
) |
| const |
|
protectedinherited |
Definition at line 53 of file GenModule.cxx.
58 ctx.setEventID (EventIDBase (conditionsRun,
59 EventIDBase::UNDEFEVT,
60 EventIDBase::UNDEFNUM,
61 EventIDBase::UNDEFNUM,
◆ GeVToMeV()
void GenBase::GeVToMeV |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event energies/momenta by x 1000.
- Todo:
- Add HepMC units awareness and do it differently when HepMC provides this functionality directly (and reference-based FourVector accessors)
Definition at line 58 of file GenBase.cxx.
59 for (HepMC::GenEvent::particle_iterator
p =
evt->particles_begin();
p !=
evt->particles_end(); ++
p) {
60 const HepMC::FourVector fv((*p)->momentum().px() * 1000,
61 (*p)->momentum().py() * 1000,
62 (*p)->momentum().pz() * 1000,
63 (*p)->momentum().e() * 1000);
64 (*p)->set_momentum(fv);
65 (*p)->set_generated_mass(1000 * (*p)->generated_mass());
◆ initialize()
StatusCode GenModule::initialize |
( |
| ) |
|
|
virtualinherited |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ leptonSelect()
bool Pythia8B_i::leptonSelect |
( |
Pythia8::Event & |
theEvent, |
|
|
const std::vector< double > & |
ptCut, |
|
|
double |
etaCut, |
|
|
const std::vector< int > & |
counts, |
|
|
int |
type_id, |
|
|
double |
massCut, |
|
|
bool |
opposite |
|
) |
| |
Definition at line 508 of file Pythia8B_i.cxx.
510 if (type_id==0)
return true;
512 std::string accString(
" : REJECTED");
514 std::vector<int> leptonIDs;
515 int nCuts=ptCut.size();
516 std::vector<int> countGood(nCuts, 0);
518 for (
int i = 0;
i<theEvent.size(); ++
i) {
520 int id = theParticle.idAbs();
521 if (
id == type_id ) {
522 double pt = theParticle.pT();
523 double eta = theParticle.eta();
525 for (
int cutCntr=0; cutCntr<nCuts; ++cutCntr) {
526 if ( (
pt>ptCut[cutCntr]) && (std::abs(
eta)<etaCut) ) {
527 countGood[cutCntr] += 1;
528 leptonIDs.push_back(
i);
534 for (
int cutCntr=0; cutCntr<nCuts; ++cutCntr) {
535 if (countGood[cutCntr] >= counts[cutCntr]) ++nPassed;
537 if (nPassed==nCuts)
break;
542 for (
int cutCntr=0; cutCntr<nCuts; ++cutCntr) {
543 if (countGood[cutCntr] >= counts[cutCntr]) ++nPassed;
545 if (nPassed >= nCuts && nCuts==1) {accString=
" : ACCEPTED";
passed =
true;}
546 if (nPassed >= nCuts && nCuts>1 &&
pairProperties(theEvent,leptonIDs,massCut,opposite)) {accString=
" : ACCEPTED";
passed =
true;}
◆ MeVToGeV()
void GenBase::MeVToGeV |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event energies/momenta by x 1/1000.
Definition at line 68 of file GenBase.cxx.
69 for (HepMC::GenEvent::particle_iterator
p =
evt->particles_begin();
p !=
evt->particles_end(); ++
p) {
70 const HepMC::FourVector fv((*p)->momentum().px() / 1000,
71 (*p)->momentum().py() / 1000,
72 (*p)->momentum().pz() / 1000,
73 (*p)->momentum().e() / 1000);
74 (*p)->set_momentum(fv);
75 (*p)->set_generated_mass((*p)->generated_mass() / 1000);
◆ mmTocm()
void GenBase::mmTocm |
( |
HepMC::GenEvent * |
evt | ) |
|
|
protectedinherited |
Scale event lengths by x 1/10.
Definition at line 87 of file GenBase.cxx.
88 for (HepMC::GenEvent::vertex_iterator vtx =
evt->vertices_begin(); vtx !=
evt->vertices_end(); ++vtx) {
89 const HepMC::FourVector fv((*vtx)->position().x() / 10,
90 (*vtx)->position().y() / 10,
91 (*vtx)->position().z() / 10,
92 (*vtx)->position().t() / 10);
93 (*vtx)->set_position(fv);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ pairProperties()
bool Pythia8B_i::pairProperties |
( |
Pythia8::Event & |
theEvent, |
|
|
const std::vector< int > & |
leptonIDs, |
|
|
double |
massCut, |
|
|
bool |
opposite |
|
) |
| |
Definition at line 578 of file Pythia8B_i.cxx.
580 bool passesCuts(
false);
581 std::string accString(
" : REJECTED");
582 for (
auto iit = leptonIDs.begin(); iit!=leptonIDs.end(); ++iit) {
583 for (
auto iit2 = iit+1; iit2!=leptonIDs.end(); ++iit2) {
584 int q1=theEvent[*iit].charge();
585 int q2=theEvent[*iit2].charge();
586 if (opposite && (q1*q2>0))
continue;
587 double px1=theEvent[*iit].px();
588 double py1=theEvent[*iit].py();
589 double pz1=theEvent[*iit].pz();
590 double mass1=theEvent[*iit].mSel();
591 double e1=std::sqrt(px1*px1+py1*py1+pz1*pz1+mass1*mass1);
592 double px2=theEvent[*iit2].px();
593 double py2=theEvent[*iit2].py();
594 double pz2=theEvent[*iit2].pz();
595 double mass2=theEvent[*iit2].mSel();
596 double e2=std::sqrt(px2*px2+py2*py2+pz2*pz2+mass2*mass2);
598 double pxSum=px1+px2;
599 double pySum=py1+py2;
600 double pzSum=pz1+pz2;
601 double M=std::sqrt(eSum*eSum-pxSum*pxSum-pySum*pySum-pzSum*pzSum);
604 ATH_MSG_DEBUG(
"Acceptable lepton pair with invariant mass : " << M);
608 if (passesCuts) {accString=
" : ACCEPTED";
break;}
◆ particleData()
const HepPDT::ParticleData* GenBase::particleData |
( |
int |
pid | ) |
const |
|
inlineinherited |
Access an element in the particle data table.
Definition at line 126 of file GenBase.h.
◆ particleTable()
const HepPDT::ParticleDataTable& GenBase::particleTable |
( |
| ) |
const |
|
inlineinherited |
Get a particle data table.
Definition at line 118 of file GenBase.h.
◆ partPropSvc()
Access the particle property service.
Definition at line 113 of file GenBase.h.
◆ passesEtaCuts()
bool Pythia8B_i::passesEtaCuts |
( |
const std::vector< Pythia8::Particle > & |
theParticles | ) |
const |
Definition at line 677 of file Pythia8B_i.cxx.
681 for (
auto pItr=theParticles.cbegin(); pItr!=theParticles.cend(); ++pItr,++
i) {
◆ passesPTCuts()
bool Pythia8B_i::passesPTCuts |
( |
const std::vector< Pythia8::Particle > & |
theParticles | ) |
const |
Definition at line 665 of file Pythia8B_i.cxx.
669 for (
auto pItr=theParticles.cbegin(); pItr!=theParticles.cend(); ++pItr,++
i) {
◆ pdt()
const HepPDT::ParticleDataTable& GenBase::pdt |
( |
| ) |
const |
|
inlineinherited |
Shorter alias to get a particle data table.
Definition at line 123 of file GenBase.h.
◆ printSignalSelections()
void Pythia8B_i::printSignalSelections |
( |
const std::vector< int > & |
signalProcess, |
|
|
const std::vector< double > & |
ptCuts, |
|
|
const std::vector< double > & |
etaCuts, |
|
|
unsigned int |
nRequired |
|
) |
| const |
Definition at line 760 of file Pythia8B_i.cxx.
761 std::cout <<
"Signal PDG codes required: ";
762 for (
unsigned int k=0;
k<
m_sigCodes.size(); ++
k) std::cout << signalProcess[
k] <<
" ";
763 if (signalProcess.size()==ptCuts.size()) {
764 std::cout <<
"Cuts on the pt of the signal states: " << std::endl;
765 for (
unsigned int l=0;
l<ptCuts.size(); ++
l) std::cout << ptCuts[
l] <<
" ";
767 if (signalProcess.size()==etaCuts.size()) {
768 std::cout <<
"Cuts on the eta of the signal states: " << std::endl;
769 for (
unsigned int l=0;
l<etaCuts.size(); ++
l) std::cout << etaCuts[
l] <<
" ";
771 std::cout <<
"Number of such decays required per event: " << nRequired << std::endl;
772 std::cout << std::endl;
◆ pythia_stream()
const std::string & Pythia8_i::pythia_stream |
( |
| ) |
|
|
staticinherited |
◆ pythiaVersion()
double Pythia8_i::pythiaVersion |
( |
| ) |
const |
|
inherited |
◆ renounce()
◆ renounceArray()
◆ s_allowedTunes()
static int Pythia8_i::s_allowedTunes |
( |
double |
version | ) |
|
|
staticprivateinherited |
◆ signalAccept()
bool Pythia8B_i::signalAccept |
( |
Pythia8::Event & |
theEvent, |
|
|
const std::vector< int > & |
requiredDecay, |
|
|
unsigned int |
nRequired |
|
) |
| const |
Definition at line 693 of file Pythia8B_i.cxx.
696 bool acceptEvent(
false);
697 std::vector<int> parentsIndices;
698 for (
int i = 0;
i<theEvent.size(); ++
i) {
700 int id = theParticle.id();
701 if (
id==requiredDecay[0]) parentsIndices.push_back(
i);
706 if ( (requiredDecay.size()==1) && (parentsIndices.size()>0) ) {
711 unsigned int goodDecayCounter(0);
713 std::vector<Pythia8::Particle> decayMembers;
715 std::vector<int> pdgCodes =
getCodes(decayMembers);
716 if (!
compare(requiredDecay,pdgCodes)) {
717 ATH_MSG_DEBUG(
"Signal event REJECTED as does not contain required decay chain");
724 ATH_MSG_DEBUG(
"Signal event REJECTED as signal chain does not pass pt cuts");
731 ATH_MSG_DEBUG(
"Signal event REJECTED as signal chain does not pass eta cuts");
740 else {++goodDecayCounter;}
743 if (goodDecayCounter>=nRequired) {
744 ATH_MSG_DEBUG(nRequired <<
"signal decays required; " << goodDecayCounter <<
" found; event ACCEPTED");
747 else if (goodDecayCounter<nRequired) {
748 ATH_MSG_DEBUG(nRequired <<
"signal decays required; " << goodDecayCounter <<
" found; event REJECTED");
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ useReseed()
bool Pythia8_i::useReseed |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ useRndmGenSvc()
bool Pythia8_i::useRndmGenSvc |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ userSelection()
bool Pythia8B_i::userSelection |
( |
Pythia8::Event & |
event, |
|
|
std::string |
userString, |
|
|
std::vector< double > |
userVars |
|
) |
| |
Definition at line 236 of file UserSelections.h.
239 using CLHEP::HepLorentzVector;
245 if (userString ==
"EXAMPLE" &&
event.size() > 0 && userVars.size() > 0) {
257 else if (userString ==
"BJPSIINCLUSIVE" &&
event.size() > 0) {
259 if (userVars.size()==0) {
260 ATH_MSG_INFO(
"User selection BJPSIINCLUSIVE with B-state");
262 if (userVars.size()>0) {
263 if (userVars.size()>1)
ATH_MSG_WARNING(
"User selection BJPSIINCLUSIVE with more than one argument! Check job options");
264 if (userVars.at(0)>0)
ATH_MSG_DEBUG(
"User selection BJPSIINCLUSIVE with B-state");
265 if (userVars.at(0)<0) {
ATH_MSG_DEBUG(
"User selection BJPSIINCLUSIVE with anti-B-state"); chargeConj = -1;}
269 std::vector<int> bToCharmoniaCodes;
270 bToCharmoniaCodes.push_back(511*chargeConj);
271 bToCharmoniaCodes.push_back(521*chargeConj);
272 bToCharmoniaCodes.push_back(531*chargeConj);
273 bToCharmoniaCodes.push_back(541*chargeConj);
274 bToCharmoniaCodes.push_back(-5122*chargeConj);
275 bToCharmoniaCodes.push_back(-5132*chargeConj);
276 bToCharmoniaCodes.push_back(-5232*chargeConj);
277 bToCharmoniaCodes.push_back(-5332*chargeConj);
279 int eventSize =
event.size();
281 bool isBtoJpsi(
false);
282 bool containsB(
false);
284 for (
int i = 0;
i < eventSize;
i++) {
285 int pdgID =
event[
i].id();
286 std::vector < Pythia8::Particle > decayMembers;
289 for (
unsigned int k = 0;
k < bToCharmoniaCodes.size(); ++
k) {
290 if (pdgID == bToCharmoniaCodes[
k]) {
299 std::vector<int> pdgCodes =
getCodes(decayMembers);
300 for (
unsigned int k = 0;
k < pdgCodes.size(); ++
k) {
301 if (pdgCodes[
k] == 443)
308 if (containsB && isBtoJpsi)
310 if (containsB && !isBtoJpsi)
321 else if ((userString ==
"BJPSIPHI_TRANS" || userString ==
"BJPSIPHI_HEL")
322 &&
event.size() > 0) {
324 const bool debug =
false;
342 if (userVars.size() < 13) {
344 "REQUIRED userVARs not provided for BsJpsiPhi pdf defaulting to flat");
347 flat = userVars[0] == 0.0;
366 bool isBsJpsiPhi =
false;
367 int eventSize =
event.size();
368 for (
int i = 0;
i < eventSize;
i++) {
370 int pID =
event[
i].id();
371 if (std::abs(pID) == 531) {
373 std::vector<int> daughterlist =
event.daughterList(
i);
375 if (daughterlist.size() != 2)
379 if (
event[daughterlist[0]].
id() == 443) {
381 i_Jpsi = daughterlist[0];
383 if (
event[daughterlist[1]].
id() == 443) {
385 i_Jpsi = daughterlist[1];
387 if (
event[daughterlist[0]].
id() == 333) {
389 i_Phi = daughterlist[0];
391 if (
event[daughterlist[1]].
id() == 333) {
393 i_Phi = daughterlist[1];
395 if (!isphi || !isjpsi)
397 std::vector<int> daughterlistJpsi =
event.daughterList(i_Jpsi);
398 std::vector<int> daughterlistPhi =
event.daughterList(i_Phi);
399 if (daughterlistJpsi.size() != 2 || daughterlistPhi.size() != 2)
403 if (
event[daughterlistJpsi[0]].
id() == 13)
404 i_Muminus = daughterlistJpsi[0];
405 else if (
event[daughterlistJpsi[1]].
id() == 13)
406 i_Muminus = daughterlistJpsi[1];
410 if (
event[daughterlistJpsi[0]].
id() == -13)
411 i_Muplus = daughterlistJpsi[0];
412 else if (
event[daughterlistJpsi[1]].
id() == -13)
413 i_Muplus = daughterlistJpsi[1];
417 if (
event[daughterlistPhi[0]].
id() == 321)
418 i_Kplus = daughterlistPhi[0];
419 else if (
event[daughterlistPhi[1]].
id() == 321)
420 i_Kplus = daughterlistPhi[1];
424 if (
event[daughterlistPhi[0]].
id() == -321)
425 i_Kminus = daughterlistPhi[0];
426 else if (
event[daughterlistPhi[1]].
id() == -321)
427 i_Kminus = daughterlistPhi[1];
430 if (i_Muminus == 0 || i_Muplus == 0 || i_Kminus == 0 || i_Kplus
436 "found entire Bs->Jpsi(mumu)phi(KK) decay ");
473 const double correctionfactor = 0.299792458;
474 const double gentauCorrect = gentau / correctionfactor;
479 const double Bstau = p_Bs.tau() / correctionfactor;
483 if (userString ==
"BJPSIPHI_TRANS") {
486 x[1] = angles.thetatrfix();
487 x[2] = angles.thetaKfix();
488 x[3] = angles.phitrfix();
492 }
else if (userString ==
"BJPSIPHI_HEL") {
495 x[1] = angles.thetaLfix();
496 x[2] = angles.thetaKfix();
497 x[3] = angles.chifix();
503 const double prob2 =
exp(Bstau / gentauCorrect) * gentauCorrect;
506 const double prob_norm = userVars[1];
511 double rand = Rdmengine->flat() * prob_norm;
512 if (prob1 * prob2 > prob_norm) {
514 "Max prob exceeded, too many of these indicates a problem, a few is fine");
517 std::cout <<
"totalprob " << prob1 * prob2 << std::endl;
518 if (
rand < (prob1 * prob2)) {
530 else if(userString ==
"BD_BPLUS_TAUCUT"){
531 const double correctionfactor = 0.299792458;
533 int eventSize =
event.size();
535 for (
int i = 0;
i < eventSize;
i++) {
536 int pID =
event[
i].id();
538 const double Bdtau =
event[
i].tau() / correctionfactor;
539 pass &= Bdtau > userVars[0] && Bdtau < userVars[1];
543 const double Bptau =
event[
i].tau() / correctionfactor;
544 pass &= Bptau > userVars[0] && Bptau < userVars[1];
548 accept = (foundcount > 0) & pass;
551 else if ((userString ==
"BDJPSIKSTAR_TRANS") &&
event.size() > 0) {
552 const bool debug =
false;
554 if (userVars.size() < 13) {
556 "REQUIRED userVARs not provided for BdJpsiKstar pdf defaulting to flat");
559 flat = userVars[0] == 0.0;
570 bool isBsJpsiKstar =
false;
571 const int eventSize =
event.size();
572 for (
int i = 0;
i < eventSize;
i++) {
574 const int pID =
event[
i].id();
575 if (std::abs(pID) == 511) {
577 std::vector<int> daughterlist =
event.daughterList(
i);
579 if (daughterlist.size() != 2)
582 bool iskstar =
false;
583 if (
event[daughterlist[0]].
id() == 443) {
585 i_Jpsi = daughterlist[0];
587 if (
event[daughterlist[1]].
id() == 443) {
589 i_Jpsi = daughterlist[1];
591 if (std::abs(
event[daughterlist[0]].
id()) == 313) {
593 i_Kstar = daughterlist[0];
595 if (std::abs(
event[daughterlist[1]].
id()) == 313) {
597 i_Kstar = daughterlist[1];
599 if (!iskstar || !isjpsi)
601 std::vector<int> daughterlistJpsi =
event.daughterList(i_Jpsi);
602 std::vector<int> daughterlistKstar =
event.daughterList(i_Kstar);
603 if (daughterlistJpsi.size() != 2 || daughterlistKstar.size() != 2)
607 if (
event[daughterlistJpsi[0]].
id() == 13)
608 i_Muminus = daughterlistJpsi[0];
609 else if (
event[daughterlistJpsi[1]].
id() == 13)
610 i_Muminus = daughterlistJpsi[1];
614 if (
event[daughterlistJpsi[0]].
id() == -13)
615 i_Muplus = daughterlistJpsi[0];
616 else if (
event[daughterlistJpsi[1]].
id() == -13)
617 i_Muplus = daughterlistJpsi[1];
621 if (std::abs(
event[daughterlistKstar[0]].
id()) == 321)
622 i_Kplus = daughterlistKstar[0];
623 else if (std::abs(
event[daughterlistKstar[1]].
id()) == 321)
624 i_Kplus = daughterlistKstar[1];
628 if (std::abs(
event[daughterlistKstar[0]].
id()) == 211)
629 i_piminus = daughterlistKstar[0];
630 else if (std::abs(
event[daughterlistKstar[1]].
id()) == 211)
631 i_piminus = daughterlistKstar[1];
635 if (i_Muminus == 0 || i_Muplus == 0 || i_piminus == 0 || i_Kplus
641 "found entire Bd->Jpsi(mumu)Kstar(KPi) decay ");
642 isBsJpsiKstar =
true;
678 const double correctionfactor = 0.299792458;
679 const double gentauCorrect = gentau / correctionfactor;
684 const double Bdtau = p_Bd.tau() / correctionfactor;
691 x[1] = angles.thetatrfix();
692 x[2] = angles.thetaKfix();
693 x[3] = angles.phitrfix();
698 const double prob2 =
exp(Bdtau / gentauCorrect) * gentauCorrect;
701 const double prob_norm = userVars[1];
706 const double rand = Rdmengine->flat() * prob_norm;
707 if (prob1 * prob2 > prob_norm) {
709 "Max prob exceeded, too many of these indicates a problem, a few is fine");
712 std::cout <<
"totalprob " << prob1 * prob2 << std::endl;
713 if (
rand < (prob1 * prob2)) {
◆ xmlpath()
std::string Pythia8_i::xmlpath |
( |
| ) |
|
|
staticinherited |
◆ m_and
◆ m_aqEtaCut
double Pythia8B_i::m_aqEtaCut |
|
private |
◆ m_aqPtCut
double Pythia8B_i::m_aqPtCut |
|
private |
◆ m_athenaTool
PublicToolHandle<IPythia8Custom> Pythia8_i::m_athenaTool {this, "CustomInterface", ""} |
|
privateinherited |
◆ m_atlasRndmEngine
std::shared_ptr<customRndm> Pythia8_i::m_atlasRndmEngine {} |
|
protectedinherited |
◆ m_atLeastOneAcc
int Pythia8B_i::m_atLeastOneAcc |
|
private |
◆ m_bcodes
std::vector<int> Pythia8B_i::m_bcodes |
|
private |
◆ m_beam1
StringProperty Pythia8_i::m_beam1 {this, "Beam1", "PROTON"} |
|
privateinherited |
◆ m_beam2
StringProperty Pythia8_i::m_beam2 {this, "Beam2", "PROTON"} |
|
privateinherited |
◆ m_BEventBuffer
std::vector<Pythia8::Event> Pythia8B_i::m_BEventBuffer |
|
private |
◆ m_collisionEnergy
DoubleProperty Pythia8_i::m_collisionEnergy {this, "CollisionEnergy", 14000.0} |
|
privateinherited |
◆ m_commands
StringArrayProperty Pythia8_i::m_commands {this, "Commands", {} } |
|
privateinherited |
◆ m_computeEfficiency
BooleanProperty Pythia8_i::m_computeEfficiency {this, "computeEfficiency", false} |
|
privateinherited |
◆ m_conversion
double Pythia8_i::m_conversion {1.} |
|
privateinherited |
◆ m_cutCount
std::vector<int> Pythia8B_i::m_cutCount |
|
private |
◆ m_dec
unsigned int Pythia8B_i::m_dec |
|
private |
◆ m_detStore
◆ m_doCKKWLAcceptance
BooleanProperty Pythia8_i::m_doCKKWLAcceptance {this, "CKKWLAcceptance", false} |
|
privateinherited |
◆ m_doFxFxXS
BooleanProperty Pythia8_i::m_doFxFxXS {this, "FxFxXS", false} |
|
privateinherited |
◆ m_doLHE3Weights
bool Pythia8_i::m_doLHE3Weights {false} |
|
privateinherited |
◆ m_doSuppressSmallPT
bool Pythia8B_i::m_doSuppressSmallPT |
|
private |
◆ m_dsid
IntegerProperty Pythia8_i::m_dsid {this, "Dsid", 999999, "Dataset ID number"} |
|
protectedinherited |
◆ m_enhanceWeight
double Pythia8_i::m_enhanceWeight {1.0} |
|
privateinherited |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_failureCount
unsigned int Pythia8B_i::m_failureCount |
|
private |
◆ m_had
unsigned int Pythia8B_i::m_had |
|
private |
◆ m_incidentSvc
ServiceHandle<IIncidentSvc> GenModule::m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
|
privateinherited |
Handle on the incident service.
Definition at line 101 of file GenModule.h.
◆ m_internal_event_number
int Pythia8B_i::m_internal_event_number |
|
private |
◆ m_internalEventNumbers
std::vector<int> Pythia8B_i::m_internalEventNumbers |
|
private |
◆ m_invMass
double Pythia8B_i::m_invMass |
|
private |
◆ m_isAfterburner
BooleanProperty GenModule::m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"} |
|
protectedinherited |
Flag for normal vs. afterburner generators.
Definition at line 87 of file GenModule.h.
◆ m_lheFile
StringProperty Pythia8_i::m_lheFile {this, "LHEFile", ""} |
|
privateinherited |
◆ m_maxFailures
UnsignedIntegerProperty Pythia8_i::m_maxFailures {this, "MaxFailures", 10} |
|
protectedinherited |
◆ m_mcEventKey
std::string GenBase::m_mcEventKey {} |
|
protectedinherited |
StoreGate key for the MC event collection (defaults to GEN_EVENT)
Definition at line 137 of file GenBase.h.
◆ m_mcevents_const
Const handle to the MC event collection.
Definition at line 163 of file GenBase.h.
◆ m_mergingWeight
double Pythia8_i::m_mergingWeight {1.0} |
|
privateinherited |
◆ m_mkMcEvent
BooleanProperty GenBase::m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"} |
|
protectedinherited |
Flag to determine if a new MC event collection should be made if it doesn't exist.
Definition at line 139 of file GenBase.h.
◆ m_nAccepted
double Pythia8_i::m_nAccepted {0.} |
|
privateinherited |
◆ m_nMerged
double Pythia8_i::m_nMerged {0.} |
|
privateinherited |
◆ m_nSignalRequired
unsigned int Pythia8B_i::m_nSignalRequired |
|
private |
◆ m_numberAlphaS
DoubleProperty Pythia8_i::m_numberAlphaS {this,"numberAlphaS", 3.0} |
|
protectedinherited |
◆ m_oppCharges
bool Pythia8B_i::m_oppCharges |
|
private |
◆ m_outputParticleDataFile
StringProperty Pythia8_i::m_outputParticleDataFile {this, "OutputParticleData", "ParticleData.local.xml"} |
|
privateinherited |
◆ m_override_transform_beamenergy
bool Pythia8_i::m_override_transform_beamenergy {false} |
|
privateinherited |
◆ m_particleDataFile
StringProperty Pythia8_i::m_particleDataFile {this, "ParticleData", ""} |
|
privateinherited |
◆ m_particleIDs
std::map<std::string, PDGID> Pythia8_i::m_particleIDs |
|
privateinherited |
◆ m_passingTriggerCuts
int Pythia8B_i::m_passingTriggerCuts |
|
private |
◆ m_ppSvc
ServiceHandle<IPartPropSvc> GenBase::m_ppSvc {this, "PartPropSvc", "PartPropSvc"} |
|
privateinherited |
Handle on the particle property service.
Definition at line 160 of file GenBase.h.
◆ m_procPtr
std::shared_ptr<Pythia8::Sigma2Process> Pythia8_i::m_procPtr {} |
|
privateinherited |
◆ m_pt0timesMPI
DoubleProperty Pythia8_i::m_pt0timesMPI {this,"pT0timesMPI", 1.0} |
|
protectedinherited |
◆ m_pythia
std::unique_ptr<Pythia8::Pythia> Pythia8_i::m_pythia {} |
|
protectedinherited |
◆ m_pythiaToHepMC
HepMC::Pythia8ToHepMC Pythia8_i::m_pythiaToHepMC |
|
protectedinherited |
◆ m_qEtaCut
double Pythia8B_i::m_qEtaCut |
|
private |
◆ m_qPtCut
double Pythia8B_i::m_qPtCut |
|
private |
◆ m_randomSeed
IntegerProperty GenModule::m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"} |
|
protectedinherited |
Seed for random number engine.
Definition at line 84 of file GenModule.h.
◆ m_rndmSvc
◆ m_sameAlphaSAsMPI
BooleanProperty Pythia8_i::m_sameAlphaSAsMPI {this,"useSameAlphaSasMPI", false} |
|
protectedinherited |
◆ m_saveLHE
BooleanProperty Pythia8_i::m_saveLHE {this, "SaveLHERecord", false} |
|
privateinherited |
◆ m_seeds
std::vector<long int> Pythia8B_i::m_seeds |
|
private |
◆ m_selectBQuarks
bool Pythia8B_i::m_selectBQuarks |
|
private |
◆ m_selectCQuarks
bool Pythia8B_i::m_selectCQuarks |
|
private |
◆ m_showerWeightNames
std::vector<std::string> Pythia8_i::m_showerWeightNames {"nominal"} |
|
privateinherited |
◆ m_showerWeightNamesProp
StringArrayProperty Pythia8_i::m_showerWeightNamesProp {this, "ShowerWeightNames", {} } |
|
privateinherited |
◆ m_sigCodes
std::vector<int> Pythia8B_i::m_sigCodes |
|
private |
◆ m_sigEtaCuts
std::vector<double> Pythia8B_i::m_sigEtaCuts |
|
private |
◆ m_sigmaTotal
double Pythia8_i::m_sigmaTotal {0.} |
|
privateinherited |
◆ m_sigPtCuts
std::vector<double> Pythia8B_i::m_sigPtCuts |
|
private |
◆ m_speciesCount
std::map<int,int> Pythia8B_i::m_speciesCount |
|
private |
◆ m_SuppressSmallPT
Pythia8::SuppressSmallPT* Pythia8B_i::m_SuppressSmallPT |
|
private |
◆ m_totalBBarQuark
int Pythia8B_i::m_totalBBarQuark |
|
private |
◆ m_totalBQuark
int Pythia8B_i::m_totalBQuark |
|
private |
◆ m_totalCBarQuark
int Pythia8B_i::m_totalCBarQuark |
|
private |
◆ m_totalClone
int Pythia8B_i::m_totalClone |
|
private |
◆ m_totalCQuark
int Pythia8B_i::m_totalCQuark |
|
private |
◆ m_totalHard
int Pythia8B_i::m_totalHard |
|
private |
◆ m_totalPythiaCalls
int Pythia8B_i::m_totalPythiaCalls |
|
private |
◆ m_trigCode
int Pythia8B_i::m_trigCode |
|
private |
◆ m_trigEtaCut
double Pythia8B_i::m_trigEtaCut |
|
private |
◆ m_trigPtCut
std::vector<double> Pythia8B_i::m_trigPtCut |
|
private |
◆ m_useLHAPDF
BooleanProperty Pythia8_i::m_useLHAPDF {this, "UseLHAPDF", true} |
|
privateinherited |
◆ m_useReseed
BooleanProperty Pythia8_i::m_useReseed {this,"useReseed", false} |
|
protectedinherited |
◆ m_userHooks
StringArrayProperty Pythia8_i::m_userHooks {this, "UserHooks", {} } |
|
protectedinherited |
◆ m_userHooksPtrs
◆ m_userModes
std::vector<std::string> Pythia8_i::m_userModes |
|
privateinherited |
◆ m_useRndmGenSvc
BooleanProperty Pythia8_i::m_useRndmGenSvc {this, "useRndmGenSvc", true, "the max number of consecutive failures"} |
|
protectedinherited |
◆ m_userParams
std::vector<std::string> Pythia8_i::m_userParams |
|
privateinherited |
◆ m_userProcess
StringProperty Pythia8_i::m_userProcess {this, "UserProcess", ""} |
|
privateinherited |
◆ m_userResonancePtrs
std::vector<std::shared_ptr<Pythia8::ResonanceWidths> > Pythia8_i::m_userResonancePtrs |
|
privateinherited |
◆ m_userResonances
StringProperty Pythia8_i::m_userResonances {this, "UserResonances", ""} |
|
privateinherited |
◆ m_userString
std::string Pythia8B_i::m_userString |
|
private |
◆ m_userVar
std::vector<double> Pythia8B_i::m_userVar |
|
private |
◆ m_varHandleArraysDeclared
◆ m_version
double Pythia8_i::m_version {-1.} |
|
privateinherited |
◆ m_vetoDoubleB
bool Pythia8B_i::m_vetoDoubleB |
|
private |
◆ m_vetoDoubleC
bool Pythia8B_i::m_vetoDoubleC |
|
private |
◆ m_vhka
◆ m_weightCommands
std::vector<std::string> Pythia8_i::m_weightCommands {} |
|
privateinherited |
◆ m_weightIDs
std::vector<std::string> Pythia8_i::m_weightIDs {} |
|
privateinherited |
◆ m_weightNames
std::vector<std::string> Pythia8_i::m_weightNames {} |
|
privateinherited |
◆ p_rndmEngine
CLHEP::HepRandomEngine * Pythia8B_i::p_rndmEngine = nullptr |
|
static |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
std::vector< long int > m_seeds
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
UnsignedIntegerProperty m_maxFailures
std::vector< Pythia8::Event > m_BEventBuffer
std::vector< int > m_bcodes
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
std::vector< double > m_trigPtCut
bool passesPTCuts(const std::vector< Pythia8::Particle > &) const
const_pointer_type cptr()
Dereference the pointer.
std::vector< std::string > m_weightNames
BooleanProperty m_useReseed
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Scalar eta() const
pseudorapidity method
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
bool passesEtaCuts(const std::vector< Pythia8::Particle > &) const
std::vector< int > m_internalEventNumbers
std::vector< int > m_sigCodes
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode accept(const xAOD::Muon *mu)
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
unsigned int m_failureCount
std::map< int, int > m_speciesCount
GenEvent * newGenEvent(const int a, const int b)
StringArrayProperty m_userHooks
int m_internal_event_number
CLHEP::HepLorentzVector convertVector(const Pythia8::Vec4 v)
std::vector< int > getCodes(const std::vector< Pythia8::Particle > &) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
double BsJpsiPhi_PDF(double *params, double *x, bool useHelicity)
void fillBarcodesAttribute(GenEvent *)
Particle_v1 Particle
Define the latest version of the particle class.
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
bool userSelection(Pythia8::Event &, std::string, std::vector< double >)
std::vector< UserHooksPtrType > m_userHooksPtrs
virtual void setOwner(IDataHandleHolder *o)=0
std::string PathResolverFindCalibDirectory(const std::string &logical_file_name)
std::vector< double > m_sigPtCuts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
dictionary codes
helper to get a human-readable string
virtual StatusCode genInitialize()
For initializing the generator, if required.
virtual StatusCode sysInitialize() override
Override sysInitialize.
void descendThroughDecay(Pythia8::Event &, std::vector< Pythia8::Particle > &, int) const
POOL::TEvent event(POOL::TEvent::kClassAccess)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
bool signalAccept(Pythia8::Event &, const std::vector< int > &, unsigned int) const
std::vector< std::string > m_showerWeightNames
::StatusCode StatusCode
StatusCode definition for legacy code.
std::shared_ptr< customRndm > m_atlasRndmEngine
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
std::vector< double > m_userVar
virtual StatusCode genFinalize()
For finalising the generator, if required.
#define CHECK(...)
Evaluate an expression and check for errors.
std::vector< int > m_cutCount
bool leptonSelect(Pythia8::Event &, const std::vector< double > &, double, const std::vector< int > &, int, double, bool)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
unsigned int m_nSignalRequired
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual void renounce()=0
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::vector< std::string > m_weightIDs
A wrapper class for event-slot-local random engines.
std::string to_string(const DetectorType &type)
std::vector< double > m_sigEtaCuts
bool compare(std::vector< int >, std::vector< int >) const
static CLHEP::HepRandomEngine * p_rndmEngine
Pythia8::SuppressSmallPT * m_SuppressSmallPT
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Pythia8_i(const std::string &name, ISvcLocator *pSvcLocator)
DataObjIDColl m_extendedExtraObjects
bool useRndmGenSvc() const
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
void printSignalSelections(const std::vector< int > &, const std::vector< double > &, const std::vector< double > &, unsigned int) const
IntegerProperty m_randomSeed
Seed for random number engine.
bool cleanUndecayed(Pythia8::Event &, const std::vector< int > &)
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void calculateSeedsMC21(long *seeds, const std::string &algName, uint64_t ev, uint64_t run, uint64_t offset=0)
Set the random seed using a string (e.g.
BooleanProperty m_useRndmGenSvc
bool pairProperties(Pythia8::Event &, const std::vector< int > &, double, bool)
const HepPDT::ParticleData * particleData(int pid) const
Access an element in the particle data table.
virtual StatusCode genInitialize()
For initializing the generator, if required.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
virtual StatusCode initialize() override
int m_internal_event_number
std::unique_ptr< Pythia8::Pythia > m_pythia
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
HepMC::Pythia8ToHepMC m_pythiaToHepMC
void set_random_states(GenEvent *e, std::vector< T > a)