|
ATLAS Offline Software
|
#include <Hijing.h>
|
| Hijing (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~Hijing ()=default |
|
virtual StatusCode | genInitialize () override |
| For initializing the generator, if required. More...
|
|
virtual StatusCode | callGenerator () override |
| For calling the generator on each iteration of the event loop. More...
|
|
virtual StatusCode | genFinalize () override |
| For finalising the generator, if required. More...
|
|
virtual StatusCode | fillEvt (HepMC::GenEvent *evt) override |
| For filling the HepMC event object. More...
|
|
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 |
|
|
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 |
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc"} |
| Data members. More...
|
|
ServiceHandle< IIncidentSvc > | m_incidentSvc {this, "IncidentSvc", "IncidentSvc"} |
| Handle on the incident service. More...
|
|
Definition at line 43 of file Hijing.h.
◆ StoreGateSvc_t
◆ Hijing()
Hijing::Hijing |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~Hijing()
virtual Hijing::~Hijing |
( |
| ) |
|
|
virtualdefault |
◆ 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 Hijing::callGenerator |
( |
| ) |
|
|
overridevirtual |
For calling the generator on each iteration of the event loop.
Reimplemented from GenModule.
Definition at line 153 of file Hijing.cxx.
160 const EventContext& ctx = Gaudi::Hive::currentContext();
162 p_Engine->setSeeds(seeds, 0);
168 const char* frame =
m_frame.c_str();
174 if (errorStatus != 0) {
175 ATH_MSG_ERROR(
"Error returned from HIJING, value = " << errorStatus );
176 return StatusCode::FAILURE;
197 event_params = std::make_unique<HijingEventParams>(
np,
nt, n0, n01, n10, n11, natt, jatt,
b, bphi);
199 ATH_MSG_INFO(
"\n=================================================\n"
200 <<
" HIJING event description: \n"
201 <<
" b = " <<
b <<
" fm \n"
202 <<
" # proj participants = " <<
np <<
"\n"
203 <<
" # targ participants = " <<
nt <<
"\n"
204 <<
" # final particles = " << natt <<
"\n"
205 <<
"=================================================\n" );
208 return StatusCode::SUCCESS;
◆ 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);
◆ 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]
◆ 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 Hijing::fillEvt |
( |
HepMC::GenEvent * |
evt | ) |
|
|
overridevirtual |
For filling the HepMC event object.
Implements GenModule.
Definition at line 219 of file Hijing.cxx.
250 HepMC::GenHeavyIonPtr ion= std::make_shared<HepMC::GenHeavyIon>();
251 ion->Ncoll_hard=
static_cast<int>(jatt);
252 ion->Npart_proj=
static_cast<int>(
np);
253 ion->Npart_targ=
static_cast<int>(
nt);
254 ion->Ncoll=
static_cast<int>(n0+n10+n01+n11);
255 ion->N_Nwounded_collisions=
static_cast<int>(n01);
256 ion->Nwounded_N_collisions=
static_cast<int>(n10);
257 ion->Nwounded_Nwounded_collisions=
static_cast<int>(n11);
258 ion->spectator_neutrons=-1;
259 ion->spectator_protons=-1;
260 ion->impact_parameter=
b;
261 ion->event_plane_angle=bphi;
262 ion->event_plane_angle=-1;
263 ion->sigma_inel_NN=sigmainel;
267 static_cast<int>(jatt),
268 static_cast<int>(
np),
269 static_cast<int>(
nt),
270 static_cast<int>(n0+n10+n01+n11),
271 static_cast<int>(-1),
272 static_cast<int>(-1),
273 static_cast<int>(n01),
274 static_cast<int>(n10),
275 static_cast<int>(n11),
281 evt->set_heavy_ion(ion);
282 std::cout <<
" heavy ion " <<
evt->heavy_ion() << std::endl;
295 std::vector<int> partOriginVertex_vec(numHijingPart, 0);
296 std::vector<int> partDecayVertex_vec(numHijingPart, -1);
297 std::vector<HepMC::GenParticlePtr> particleHepPartPtr_vec(numHijingPart,
nullptr);
301 std::vector<HepMC::GenVertexPtr> vertexPtrVec;
305 CLHEP::HepLorentzVector newVertex;
306 newVertex = CLHEP::HepLorentzVector(0.,0.,0.,0.);
309 else if(
m_sel) newVertex = CLHEP::HepLorentzVector(
m_x,
m_y,
m_z, 0.);
314 vertexPtrVec.push_back(v1);
317 if (
m_frame ==
"CMS " ) eproj = eproj / 2.;
320 if (
m_proj ==
"PBAR " ) {
322 }
else if (
m_proj ==
"N " ) {
324 }
else if (
m_proj ==
"NBAR " ) {
326 }
else if (
m_proj ==
"PI+ " ) {
328 }
else if (
m_proj ==
"PI- " ) {
330 }
else if (
m_proj ==
"A " ) {
331 proj_id = 3000000 +
m_iap;
334 v1->add_particle_in( part_p );
340 if (
m_targ ==
"PBAR " ) {
342 }
else if (
m_targ ==
"N " ) {
344 }
else if (
m_targ ==
"NBAR " ) {
346 }
else if (
m_targ ==
"PI+ " ) {
348 }
else if (
m_targ ==
"PI- " ) {
350 }
else if (
m_targ ==
"A " ) {
351 targ_id = 3000000 +
m_iat;
354 v1->add_particle_in( part_t );
356 evt->set_beam_particles(part_p,part_t);
367 bool inconsistency =
false;
380 int parentOriginIndex = 0;
381 int parentDecayIndex = -1;
385 if (parentIndex >= 0)
387 parentOriginIndex = partOriginVertex_vec[parentIndex];
388 parentDecayIndex = partDecayVertex_vec[parentIndex];
403 << std::setw(5) <<
i <<
","
420 int particleVertexIndex = 0;
429 if (parentDecayIndex != -1)
433 HepGeom::Point3D<double> vertex_pos(vertexPtrVec[parentDecayIndex]->position().
x(),
434 vertexPtrVec[parentDecayIndex]->position().
y(),
435 vertexPtrVec[parentDecayIndex]->position().
z());
436 double distance = vertex_pos.distance(particleStart.vect());
443 ATH_MSG_WARNING(
" Inconsistency in Hijing particle vertexing, particle # " <<
i
444 <<
" starting point (x,y,z) = ("
445 << particleStart.x() <<
", "
446 << particleStart.y() <<
", "
447 << particleStart.z() <<
") "
448 <<
" a distance " <<
distance <<
" away from parent decay point " );
453 log << MSG::WARNING <<
" Parent decay vertex: (x,y,z) = " << vertexPtrVec[parentDecayIndex]->position().x()
454 <<
", " << vertexPtrVec[parentDecayIndex]->position().y()
455 <<
", " << vertexPtrVec[parentDecayIndex]->position().z()
456 <<
", associated daughter IDs = ";
459 auto vertexPtrVec_particles_out_const_begin=vertexPtrVec[parentDecayIndex]->particles_out().begin();
460 auto vertexPtrVec_particles_out_const_end=vertexPtrVec[parentDecayIndex]->particles_out().end();
462 auto vertexPtrVec_particles_out_const_begin=vertexPtrVec[parentDecayIndex]->particles_out_const_begin();
463 auto vertexPtrVec_particles_out_const_end=vertexPtrVec[parentDecayIndex]->particles_out_const_end();
465 for (
auto iter = vertexPtrVec_particles_out_const_begin;
466 iter != vertexPtrVec_particles_out_const_end;
469 log << (*iter) <<
", ";
473 inconsistency =
true;
478 particleVertexIndex = parentDecayIndex;
485 HepGeom::Point3D<double> vertex_pos(vertexPtrVec[parentOriginIndex]->position().
x(),
486 vertexPtrVec[parentOriginIndex]->position().
y(),
487 vertexPtrVec[parentOriginIndex]->position().
z());
488 double distance = vertex_pos.distance(particleStart.vect());
496 ATH_MSG_WARNING(
"HIJING BUG:: Particle found with displaced vertex but no parent " );
497 ATH_MSG_WARNING(
" Particle parameters: " << std::fixed << std::setprecision(2)
498 << std::setw(5) <<
i <<
","
512 particleVertexIndex = parentOriginIndex;
520 evt->add_vertex(newVertex_p);
521 vertexPtrVec.push_back(newVertex_p);
522 particleVertexIndex = vertexPtrVec.size() - 1;
526 partDecayVertex_vec[parentIndex] = particleVertexIndex;
531 newVertex_p->add_particle_in(particleHepPartPtr_vec[parentIndex]);
536 particleVertexIndex = parentOriginIndex;
545 for (
unsigned int ivert = 0; ivert < vertexPtrVec.size(); ivert++)
548 HepGeom::Point3D<double> vertex_pos(vertexPtrVec[ivert]->position().
x(),
549 vertexPtrVec[ivert]->position().
y(),
550 vertexPtrVec[ivert]->position().
z());
551 double distance = vertex_pos.distance(particleStart.vect());
565 evt->add_vertex(newVertex_p);
566 vertexPtrVec.push_back(newVertex_p);
567 particleVertexIndex = vertexPtrVec.size() - 1;
571 particleVertexIndex = foundVert;
579 int particleStatus = 1;
596 particleHepPartPtr_vec[
i-1] = newParticle_p;
600 vertexPtrVec[particleVertexIndex]->add_particle_out(newParticle_p);
601 partOriginVertex_vec[
i-1] = particleVertexIndex;
615 ATH_MSG_WARNING(
" Hijing.cxx inconsistency: " << std::fixed << std::setprecision(2)
617 << std::setw(5) <<
i <<
","
642 for (
int jparton = 1; jparton <=
m_hijjet2.
njsg(isg); jparton++)
651 double mt = std::sqrt(ptsq +
mass*
mass);
652 double pt = std::sqrt(ptsq);
663 <<
", eta = " << pseud );
677 for (
int iproj = 1; iproj <= iap; iproj++)
679 for (
int jparton = 1; jparton <=
m_hijjet1.
npj(iproj); jparton++)
688 double mt = std::sqrt(ptsq +
mass*
mass);
689 double pt = std::sqrt(ptsq);
700 <<
", eta = " << pseud );
711 for (
int itarg = 1; itarg <= iat; itarg++)
713 for (
int jparton = 1; jparton <=
m_hijjet1.
ntj(itarg); jparton++)
722 double mt = std::sqrt(ptsq +
mass*
mass);
723 double pt = std::sqrt(ptsq);
734 <<
", eta = " << pseud );
749 HepMC::FourVector tmpmom(0.,0.,0.,0.);
750 double ranz = CLHEP::RandFlat::shoot(p_Engine);
754 for(
auto pitr: *
evt){
755 tmpmom= pitr->momentum();
756 tmpmom.setX(-tmpmom.x());
757 tmpmom.setY(-tmpmom.y());
758 tmpmom.setZ(-tmpmom.z());
759 tmpmom.setT(tmpmom.t());
760 pitr->set_momentum(tmpmom);
770 const std::vector <HepMC::GenParticlePtr> allParticles=
evt->particles();
771 for(
auto p : allParticles)
774 if(
p->status() == 2 && !end_v)
evt->remove_particle(
p);
782 if (
p->status() == 2 && !end_v)
delete p->production_vertex()->remove_particle(
p);
786 return StatusCode::SUCCESS;
◆ finalize()
StatusCode GenModule::finalize |
( |
| ) |
|
|
inlineinherited |
◆ genFinalize()
StatusCode Hijing::genFinalize |
( |
| ) |
|
|
overridevirtual |
For finalising the generator, if required.
Reimplemented from GenModule.
Definition at line 212 of file Hijing.cxx.
215 return StatusCode::SUCCESS;
◆ genInitialize()
StatusCode Hijing::genInitialize |
( |
| ) |
|
|
overridevirtual |
For initializing the generator, if required.
Reimplemented from GenModule.
Definition at line 85 of file Hijing.cxx.
90 std::cout <<
"MetaData: generator = Hijing "
91 << HIJINGVERSION << std::endl;
97 ATH_MSG_INFO(
"===> Vertex rand covers whole beampipe." );
102 else ATH_MSG_INFO(
"===> NOT keeping all decay vertices" );
112 hijing_stream =
"HIJING";
117 const char* frame =
m_frame.c_str();
119 const char* targ =
m_targ.c_str();
122 strlen(frame), strlen(
proj), strlen(targ) );
124 ATH_MSG_INFO(
"\n=================================================\n"
125 <<
" HIJING initialization results: \n"
129 <<
"=================================================\n" );
150 return StatusCode::SUCCESS;
◆ genuserInitialize()
virtual StatusCode GenModule::genuserInitialize |
( |
| ) |
|
|
inlinevirtualinherited |
For initialization of user code, if required. Called after genInitialize.
Reimplemented in Pythia8B_i.
Definition at line 64 of file GenModule.h.
64 {
return StatusCode::SUCCESS; }
◆ 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.
◆ 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.
◆ 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.
◆ pdt()
const HepPDT::ParticleDataTable& GenBase::pdt |
( |
| ) |
const |
|
inlineinherited |
Shorter alias to get a particle data table.
Definition at line 123 of file GenBase.h.
◆ randomizeVertex()
CLHEP::HepLorentzVector Hijing::randomizeVertex |
( |
CLHEP::HepRandomEngine * |
engine | ) |
|
|
protectedvirtual |
Definition at line 790 of file Hijing.cxx.
798 double ranz = CLHEP::RandFlat::shoot(engine, -
Zmax,
Zmax);
800 if( std::abs(ranz) <
Start1 ) {
803 }
else if( std::abs(ranz) <
Start2 ) {
806 }
else if( std::abs(ranz) <
Start3 ) {
809 }
else if ( std::abs(ranz) <=
Envelope ){
813 ATH_MSG_ERROR(
"**** Hijing::randomizeVertex() " << ranz <<
" (z) is outside the detector (units of mm). Returning a centered event." );
814 return CLHEP::HepLorentzVector(0.,0.,0.,0.);
817 ATH_MSG_INFO(
"New Coordinates: x=0., y=0., z=" << ranz );
818 return CLHEP::HepLorentzVector(0., 0., ranz, 0);
820 ranx = CLHEP::RandFlat::shoot(engine, -
xmax,
xmax);
821 rany = CLHEP::RandFlat::shoot(engine, -
ymax,
ymax);
823 ATH_MSG_INFO(
"New Coordinates: x=" << ranx <<
", y=" << rany <<
", z=" << ranz );
825 return CLHEP::HepLorentzVector(ranx, rany, ranz, 0);
◆ renounce()
◆ renounceArray()
◆ set_user_params()
void Hijing::set_user_params |
( |
void |
| ) |
|
|
protected |
Definition at line 829 of file Hijing.cxx.
849 std::string myparam = mystring.piece<std::string>(1);
850 if (myparam ==
"efrm")
852 m_efrm = mystring.piece<
double>(2);
854 else if (myparam ==
"frame")
856 m_frame = mystring.piece<std::string>(2);
859 unsigned nbl = 8 -
m_frame.size();
860 for (
unsigned i = 0;
i < nbl; ++
i)
m_frame +=
' ';
863 else if (myparam ==
"proj")
865 m_proj = mystring.piece<std::string>(2);
868 unsigned nbl = 8 -
m_proj.size();
869 for (
unsigned i = 0;
i < nbl; ++
i)
m_proj +=
' ';
872 else if (myparam ==
"targ")
874 m_targ = mystring.piece<std::string>(2);
877 unsigned nbl = 8 -
m_targ.size();
878 for (
unsigned i = 0;
i < nbl; ++
i)
m_targ +=
' ';
881 else if (myparam ==
"iap")
883 m_iap = mystring.piece<
int>(2);
885 else if (myparam ==
"izp")
887 m_izp = mystring.piece<
int>(2);
889 else if (myparam ==
"iat")
891 m_iat = mystring.piece<
int>(2);
893 else if (myparam ==
"izt")
895 m_izt = mystring.piece<
int>(2);
897 else if (myparam ==
"bmin")
899 m_bmin = mystring.piece<
double>(2);
901 else if (myparam ==
"bmax")
903 m_bmax = mystring.piece<
double>(2);
905 else if (myparam ==
"nseed")
909 else if (myparam ==
"hipr1")
911 int myelem = mystring.piece<
int>(2);
914 else if (myparam ==
"ihpr2")
916 int myelem = mystring.piece<
int>(2);
919 else if (myparam ==
"hint1")
921 int myelem = mystring.piece<
int>(2);
924 else if (myparam ==
"ihnt2")
926 int myelem = mystring.piece<
int>(2);
931 ATH_MSG_ERROR(
" ERROR in HIJING INITIALIZATION PARAMETERS " << myparam <<
" is an invalid parameter !" );
◆ 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()
◆ m_bmax
float Hijing::m_bmax {0.} |
|
protected |
◆ m_bmin
float Hijing::m_bmin {0.} |
|
protected |
◆ m_detStore
◆ m_dsid
IntegerProperty Hijing::m_dsid {this, "Dsid", 999999} |
|
protected |
◆ m_efrm
float Hijing::m_efrm {0.} |
|
protected |
◆ m_event_paramsKey
◆ m_events
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_frame
std::string Hijing::m_frame |
|
protected |
◆ m_hijcrdn
◆ m_hijjet1
◆ m_hijjet2
◆ m_hijjet4
◆ m_himain1
◆ m_himain2
◆ m_hiparnt
◆ m_histrng
◆ m_iap
◆ m_iat
◆ 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_InitializeVector
◆ 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_izp
◆ m_izt
◆ m_keepAllDecayVertices
bool Hijing::m_keepAllDecayVertices {true} |
|
protected |
◆ 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_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_partonStoreMinPt
double Hijing::m_partonStoreMinPt {5.0} |
|
protected |
◆ 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_prand
bool Hijing::m_prand {false} |
|
protected |
◆ m_proj
std::string Hijing::m_proj |
|
protected |
◆ m_rand
bool Hijing::m_rand {false} |
|
protected |
◆ 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_randomseed
int Hijing::m_randomseed {0} |
|
protected |
◆ m_ranseed
◆ m_rndmSvc
◆ m_seeds
std::vector<long int> Hijing::m_seeds |
|
protected |
◆ m_sel
bool Hijing::m_sel {false} |
|
protected |
◆ m_spec
bool Hijing::m_spec {true} |
|
protected |
◆ m_targ
std::string Hijing::m_targ |
|
protected |
◆ m_varHandleArraysDeclared
◆ m_vertexOffsetCut
double Hijing::m_vertexOffsetCut {1.0E-7} |
|
protected |
◆ m_vhka
◆ m_wide
bool Hijing::m_wide {false} |
|
protected |
◆ m_x
◆ m_y
◆ m_z
The documentation for this class was generated from the following files:
HepMC::GenVertex * GenVertexPtr
JetConstituentVector::iterator iterator
float & pjtz(int i, int j)
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Utility object for parsing a string into tokens and returning them as a variety of types.
const_pointer_type cptr()
Dereference the pointer.
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
void GeVToMeV(HepMC::GenEvent *evt)
Scale event energies/momenta by x 1000.
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
GenParticle * GenParticlePtr
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
float & pjpz(int i, int j)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
GenEvent * newGenEvent(const int a, const int b)
SG::WriteHandleKey< HijingEventParams > m_event_paramsKey
const std::string & key() const
Return the StoreGate ID for the referenced object.
float & pjty(int i, int j)
void fillBarcodesAttribute(GenEvent *)
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
CommandVector m_InitializeVector
virtual void setOwner(IDataHandleHolder *o)=0
float & pjtx(int i, int j)
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.
float & pmsg(int i, int j)
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.
virtual StatusCode genInitialize()
For initializing the generator, if required.
void set_signal_process_vertex(GenEvent *e, T v)
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual CLHEP::HepLorentzVector randomizeVertex(CLHEP::HepRandomEngine *engine)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
msgSvc
Provide convenience handles for various services.
float & patt(int i, int j)
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
::StatusCode StatusCode
StatusCode definition for legacy code.
float & pxsg(int i, int j)
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
virtual StatusCode genFinalize()
For finalising the generator, if required.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::vector< long int > m_seeds
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
float & pysg(int i, int j)
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
float & pjpy(int i, int j)
A wrapper class for event-slot-local random engines.
float & vatt(int i, int j)
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
bool m_keepAllDecayVertices
DataObjIDColl m_extendedExtraObjects
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
double m_partonStoreMinPt
void hijset_(float *, const char *, const char *, const char *, int *, int *, int *, int *, long int, long int, long int)
float & pjpm(int i, int j)
#define ATH_MSG_WARNING(x)
IntegerProperty m_randomSeed
Seed for random number engine.
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.
const HepMC::GenVertex * ConstGenVertexPtr
float & pzsg(int i, int j)
void set_signal_process_id(GenEvent *e, const int i)
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
float & pjtm(int i, int j)
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
float & pjpx(int i, int j)
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
void set_user_params(void)
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
void hijing_(const char *, float *, float *, long int)
void set_random_states(GenEvent *e, std::vector< T > a)