ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Hijing Class Reference

#include <Hijing.h>

Inheritance diagram for Hijing:
Collaboration diagram for Hijing:

Public Member Functions

 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
 

Protected Member Functions

virtual CLHEP::HepLorentzVector randomizeVertex (CLHEP::HepRandomEngine *engine)
 
void set_user_params (void)
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

IntegerProperty m_dsid {this, "Dsid", 999999}
 
float m_efrm {0.}
 
std::string m_frame
 
std::string m_proj
 
std::string m_targ
 
int m_iap {0}
 
int m_iat {0}
 
int m_izp {0}
 
int m_izt {0}
 
float m_bmin {0.}
 
float m_bmax {0.}
 
float m_x {0.}
 
float m_y {0.}
 
float m_z {0.}
 
bool m_sel {false}
 
bool m_spec {true}
 
bool m_rand {false}
 
bool m_wide {false}
 
bool m_prand {false}
 
bool m_keepAllDecayVertices {true}
 
double m_partonStoreMinPt {5.0}
 
double m_vertexOffsetCut {1.0E-7}
 
int m_randomseed {0}
 
std::vector< long int > m_seeds
 
int m_events {0}
 
CommandVector m_InitializeVector
 
HiParnt m_hiparnt
 
RanSeed m_ranseed
 
HiMain1 m_himain1
 
HiMain2 m_himain2
 
HijJet1 m_hijjet1
 
HijJet2 m_hijjet2
 
HijJet4 m_hijjet4
 
HiStrng m_histrng
 
HijCrdn m_hijcrdn
 
SG::WriteHandleKey< HijingEventParamsm_event_paramsKey {this, "HijingOutputKey", "Hijing_event_params"}
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

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
 

Utility event-mangling functions

Todo:
Replace with HepMC units when available
void GeVToMeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1000. More...
 
void MeVToGeV (HepMC::GenEvent *evt)
 Scale event energies/momenta by x 1/1000. More...
 
void cmTomm (HepMC::GenEvent *evt)
 Scale event lengths by x 10. More...
 
void mmTocm (HepMC::GenEvent *evt)
 Scale event lengths by x 1/10. More...
 
ServiceHandle< IPartPropSvc > m_ppSvc {this, "PartPropSvc", "PartPropSvc"}
 Handle on the particle property service. More...
 
SG::ReadHandleKey< McEventCollectionm_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
 Const handle to the MC event collection. More...
 

Features for derived classes to use internally

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< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
 Data members. More...
 
ServiceHandle< IIncidentSvc > m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
 Handle on the incident service. More...
 

Detailed Description

Definition at line 43 of file Hijing.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ Hijing()

Hijing::Hijing ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 68 of file Hijing.cxx.

69  : GenModule(name,pSvcLocator)
70 {
71  declareProperty("Initialize", m_InitializeVector);
72  declareProperty("partonStoreMinPt", m_partonStoreMinPt);
73  declareProperty("vertexOffsetCut", m_vertexOffsetCut);
74  declareProperty("randomizeVertices", m_rand); // Randomize for beam gas
75  declareProperty("selectVertex", m_sel); // Select vertex location (off for random)
76  declareProperty("wide", m_wide); // Allow randoms off the beamline (out to the pipe)
77  declareProperty("x", m_x);
78  declareProperty("y", m_y);
79  declareProperty("z", m_z);
80  declareProperty("keepSpectators", m_spec);
81  declareProperty("randomizeP", m_prand); //BPK randomizes the left<->right direction by mirroring momenta for beam gas
82  declareProperty("keepAllDecayVertices", m_keepAllDecayVertices);
83 }

◆ ~Hijing()

virtual Hijing::~Hijing ( )
virtualdefault

Member Function Documentation

◆ 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.

76  {
77  if (events()->empty())
78  ATH_MSG_ERROR("McEventCollection is empty during first event access");
79  return *(events()->begin());
80  }

◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]

McEventCollection* events GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inherited

Access the current event's McEventCollection.

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

◆ 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.

154 {
155  ATH_MSG_INFO( " HIJING generating. \n" );
156 
157  // Save the random number seeds in the event
158  //Re-seed the random number stream
159  long seeds[7];
160  const EventContext& ctx = Gaudi::Hive::currentContext();
161  ATHRNG::calculateSeedsMC21(seeds, hijing_stream, ctx.eventID().event_number(), m_dsid, m_randomSeed);
162  p_Engine->setSeeds(seeds, 0); // NOT THREAD-SAFE
163  m_seeds.clear();
164  m_seeds.push_back(seeds[0]);
165  m_seeds.push_back(seeds[1]);
166 
167  // Generate event
168  const char* frame = m_frame.c_str();
169  hijing_(frame, &m_bmin, &m_bmax, strlen(frame));
170 
171  // Check for error using the new (custom) error return
172  //
173  int errorStatus = m_himain1.ierrstat();
174  if (errorStatus != 0) {
175  ATH_MSG_ERROR( "Error returned from HIJING, value = " << errorStatus );
176  return StatusCode::FAILURE;
177  }
178 
179  // update event counter
180  ++m_events;
181 
182  // store hijing event parameters
183  // -----------------------------
184  ATH_MSG_DEBUG( "New HijingEventParams" );
185  int np = m_himain1.np();
186  int nt = m_himain1.nt();
187  int n0 = m_himain1.n0();
188  int n01 = m_himain1.n01();
189  int n10 = m_himain1.n10();
190  int n11 = m_himain1.n11();
191  int natt = m_himain1.natt();
192  int jatt = m_himain1.jatt();
193  float b = m_hiparnt.hint1(19);
194  float bphi = m_hiparnt.hint1(20);
195 
197  event_params = std::make_unique<HijingEventParams>(np, nt, n0, n01, n10, n11, natt, jatt, b, bphi);
198 
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" );
206 
207  ATH_MSG_DEBUG( " HIJING generating done. \n" );
208  return StatusCode::SUCCESS;
209 }

◆ cmTomm()

void GenBase::cmTomm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 10.

Definition at line 78 of file GenBase.cxx.

78  {
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);
85  }
86 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_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.

83  {
84  if (events_const()->empty())
85  ATH_MSG_ERROR("Const McEventCollection is empty during first event access");
86  return *(events_const()->begin());
87  }

◆ events_const() [1/2]

const McEventCollection* GenBase::events_const ( ) const
inlineinherited

Access the current event's McEventCollection (const)

Definition at line 96 of file GenBase.h.

96  {
97  return events_const( getContext() );
98  }

◆ events_const() [2/2]

const McEventCollection* GenBase::events_const ( const EventContext &  ctx) const
inlineinherited

Definition at line 99 of file GenBase.h.

99  {
101  if (!ret.isValid())
102  ATH_MSG_ERROR("No McEventCollection found in StoreGate with key " << m_mcevents_const.key());
103  return ret.cptr();
104  }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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.

70  {
71  // Examples of how to retrieve the random number engine for a given
72  // stream.
73  // NB getRandomEngine should only be called once per event for a
74  // given stream, as it causes the stream to be re-seeded each time
75  // it is called.
76 
77  // Example 1 - seeded based on the current event number (+ slot, run, streamName)
78  //const EventContext& ctx = Gaudi::Hive::currentContext();
79  //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", ctx);
80 
81  // Example 2 - seeded based on the m_randomSeed property (+ slot, run, streamName)
82  //const EventContext& ctx = Gaudi::Hive::currentContext();
83  //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", m_randomSeed.value(), ctx);
84 
85  // Call the code that generates an event
86  CHECK(this->callGenerator());
87 
88  // Create the MC event and send the GeneratorEvent stored in it to fillEvt
89  HepMC::GenEvent* evt = HepMC::newGenEvent(1,1);
90  CHECK(this->fillEvt(evt));
92 
93  // Add the event to the MC event collection
94  if (events()) {
95  // If this is an "afterburner" generator, replace the last event rather than add a new one
97  if (m_isAfterburner.value() || name() == "Tauola" || name() == "Photos") {
98  events()->pop_back();
99  }
100  // Add the event to the end of the collection
101  events()->push_back(evt);
102  ATH_MSG_DEBUG("MC event added to McEventCollection");
103 
104  // remove the empty event in case of ParticleDecayer
105  if (name() == "ParticleDecayer") {
106  events()->pop_back();
107  }
108  }
109 
110  // Call the incident service to notify that an event has been made
111  m_incidentSvc->fireIncident( Incident(name(), "McEventGenerated") );
112  return StatusCode::SUCCESS;
113 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

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.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ fillEvt()

StatusCode Hijing::fillEvt ( HepMC::GenEvent *  evt)
overridevirtual

For filling the HepMC event object.

Implements GenModule.

Definition at line 219 of file Hijing.cxx.

220 {
221  // These two parameters need to be made user settable (done - AS)
222  //
223  MsgStream log(msgSvc(), name());
224  ATH_MSG_INFO( " HIJING Filing. \n" );
225 
226  // Set the event number
227  evt->set_event_number( m_events );
228 
229  // Set the random generator seeds
231 
232  // Set the generator id
234 
235  // Store collision parameters
236  int np = m_himain1.np();
237  int nt = m_himain1.nt();
238  int n0 = m_himain1.n0();
239  int n01 = m_himain1.n01();
240  int n10 = m_himain1.n10();
241  int n11 = m_himain1.n11();
242  //int natt = m_himain1.natt();
243  int jatt = m_himain1.jatt();
244  float b = m_hiparnt.hint1(19);
245  float bphi = m_hiparnt.hint1(20);
246 
247  float sigmainel = m_hiparnt.hint1(12);
248 
249  #ifdef HEPMC3
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;
264 #else
265  HepMC::HeavyIon ion
266  (
267  static_cast<int>(jatt), // Ncoll_hard
268  static_cast<int>(np), // Npart_proj
269  static_cast<int>(nt), // Npart_targ
270  static_cast<int>(n0+n10+n01+n11), // Ncoll
271  static_cast<int>(-1), // spectator_neutrons
272  static_cast<int>(-1), // spectator_protons
273  static_cast<int>(n01), // N_Nwounded_collisions
274  static_cast<int>(n10), // Nwounded_N_collisions
275  static_cast<int>(n11), // Nwounded_Nwounded_collisions
276  b, // impact_parameter
277  bphi, // event_plane_angle
278  -1, // eccentricity
279  sigmainel ); // sigma_inel_NN
280 
281  evt->set_heavy_ion(ion);
282  std::cout << " heavy ion " << evt->heavy_ion() << std::endl;
283 #endif
284 
285  // Did we keep decay history?
286  //
287  bool keptHistory = (m_hiparnt.ihpr2(21) == 1);
288 
289  // The number of particles in the hijing output
290  //
291  int numHijingPart = m_himain1.natt();
292 
293  // Vectors that will keep track of where particles originate from and die
294  //
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);
298 
299  // Vector that will keep pointers to generated vertices
300  //
301  std::vector<HepMC::GenVertexPtr> vertexPtrVec;
302 
303  // Create the event vertex
304  //
305  CLHEP::HepLorentzVector newVertex;
306  newVertex = CLHEP::HepLorentzVector(0.,0.,0.,0.);
307 
308  if( m_rand )newVertex = randomizeVertex(p_Engine); // Create a random vertex along the pipe
309  else if(m_sel) newVertex = CLHEP::HepLorentzVector(m_x, m_y, m_z, 0.); // Create vertex at selected point - preempted by m_rand
310 
311  HepMC::GenVertexPtr v1 = HepMC::newGenVertexPtr(HepMC::FourVector(newVertex.x(),newVertex.y(),newVertex.z(),newVertex.t()));
312 
314  vertexPtrVec.push_back(v1);
315 
316  double eproj = (double) m_efrm;
317  if ( m_frame == "CMS " ) eproj = eproj / 2.;
318 
319  int proj_id = 2212;
320  if ( m_proj == "PBAR " ) {
321  proj_id = -2212;
322  } else if ( m_proj == "N " ) {
323  proj_id = 2112;
324  } else if ( m_proj == "NBAR " ) {
325  proj_id = -2112;
326  } else if ( m_proj == "PI+ " ) {
327  proj_id = 211;
328  } else if ( m_proj == "PI- " ) {
329  proj_id = -211;
330  } else if ( m_proj == "A " ) {
331  proj_id = 3000000 + m_iap;
332  }
333  HepMC::GenParticlePtr part_p = HepMC::newGenParticlePtr(HepMC::FourVector(0., 0., eproj, eproj), proj_id, 101 );
334  v1->add_particle_in( part_p );
335 
336  double etarg = 0.;
337  if ( m_frame == "CMS " ) etarg = ( (double) m_efrm ) / 2.;
338 
339  int targ_id = 2212;
340  if ( m_targ == "PBAR " ) {
341  targ_id = -2212;
342  } else if ( m_targ == "N " ) {
343  targ_id = 2112;
344  } else if ( m_targ == "NBAR " ) {
345  targ_id = -2112;
346  } else if ( m_targ == "PI+ " ) {
347  targ_id = 211;
348  } else if ( m_targ == "PI- " ) {
349  targ_id = -211;
350  } else if ( m_targ == "A " ) {
351  targ_id = 3000000 + m_iat;
352  }
353  HepMC::GenParticlePtr part_t = HepMC::newGenParticlePtr(HepMC::FourVector(0., 0., -etarg, etarg), targ_id, 102 );
354  v1->add_particle_in( part_t );
355 
356  evt->set_beam_particles(part_p,part_t);
357 
358  ATH_MSG_DEBUG( "Hijing particles for event # " << m_events << ":\n"
359  << " px, "
360  << " py, "
361  << " pz, "
362  << " Id, "
363  << " Source, "
364  << " Parent, "
365  << " Status, " );
366 
367  bool inconsistency = false;
368 
369  // Loop on all Hijing particles and put them all as outgoing from the event vertex
370  //
371  for (int i = 1; i <= m_himain1.natt(); ++i)
372  {
373  // Skip non-interacting projectile and target nucleons
374  //
375  if (!m_spec && ((m_himain2.katt(i, 2) == 0) || (m_himain2.katt(i, 2)) == 10)) continue;
376 
377  // Find the vertex of the parent particle
378  //
379  int parentIndex = m_himain2.katt(i, 3) - 1;
380  int parentOriginIndex = 0;
381  int parentDecayIndex = -1;
382 
383  // If the particle has a true parent, record its vertex info
384  //
385  if (parentIndex >= 0)
386  {
387  parentOriginIndex = partOriginVertex_vec[parentIndex];
388  parentDecayIndex = partDecayVertex_vec[parentIndex];
389  }
390 
391  // A CLHEP vector containing the particle start point
392  //
393  // If the particle has been shifted, offset the particleStart accordingly
394  //
395  if( m_rand || m_sel ){ // Either way, we need to shift the particle vertex
396  m_himain2.vatt(i,1) += newVertex(0);
397  m_himain2.vatt(i,2) += newVertex(1);
398  m_himain2.vatt(i,3) += newVertex(2);
399  m_himain2.vatt(i,4) += newVertex(3);
400  }
401 
402  ATH_MSG_DEBUG( std::fixed << std::setprecision(2)
403  << std::setw(5) << i << ","
404  << std::setw(7) << m_himain2.patt(i, 1) << ", "
405  << std::setw(7) << m_himain2.patt(i, 2) << ", "
406  << std::setw(7) << m_himain2.patt(i, 3) << ", "
407  << std::setw(7) << m_himain2.katt(i, 1) << ", "
408  << std::setw(7) << m_himain2.katt(i, 2) << ", "
409  << std::setw(7) << m_himain2.katt(i, 3) << ", "
410  << std::setw(7) << m_himain2.katt(i, 4) << ", "
411  << std::setw(7) << m_himain2.vatt(i, 1) << ", "
412  << std::setw(7) << m_himain2.vatt(i, 2) << ", "
413  << std::setw(7) << m_himain2.vatt(i, 3) );
414 
415  CLHEP::HepLorentzVector particleStart(m_himain2.vatt(i, 1), m_himain2.vatt(i, 2),
416  m_himain2.vatt(i, 3), m_himain2.vatt(i, 4));
417 
418  // By default, the particle originates from the primary vertex
419  //
420  int particleVertexIndex = 0;
421 
422  // Have we kept the history?
423  //
424  if (keptHistory)
425  {
426  // Check to see if we've already generated a decay vertex for this parent
427  //
428  // std::cout << "ML-> keptHistory == True" << std::endl;
429  if (parentDecayIndex != -1)
430  {
431  // Make sure it is consistent with this track origin
432  //
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());
437 
438  //std::cout << "ML-> distance = " << distance <<" parentDecayIndex = "<<parentDecayIndex<< std::endl;
440  {
441  // We have an inconsistency, print a message
442  //
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 " );
449 
450 
451  // Dump the parent decay vertex
452  //
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 = ";
457 
458 #ifdef HEPMC3
459  auto vertexPtrVec_particles_out_const_begin=vertexPtrVec[parentDecayIndex]->particles_out().begin();
460  auto vertexPtrVec_particles_out_const_end=vertexPtrVec[parentDecayIndex]->particles_out().end();
461 #else
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();
464 #endif
465  for (auto iter = vertexPtrVec_particles_out_const_begin;
466  iter != vertexPtrVec_particles_out_const_end;
467  iter++)
468  {
469  log << (*iter) << ", ";
470  }
471 
472  log << endmsg;
473  inconsistency = true;
474  }
475 
476  // Nonetheless set the parent decay vertex to be this particle's vertex
477  //
478  particleVertexIndex = parentDecayIndex;
479  }
480  else
481  {
482  // Now compare the distance between the vertex FROM which the parent originates and the
483  // start of this particle
484  //
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());
489 
490  if (distance > m_vertexOffsetCut && parentIndex == -1)
491  {
492  // *** Explicitly handle Hijing bug which generates particle with displaced vertex
493  // *** but no parent ????
494  //
495 
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 << ","
499  << std::setw(7) << m_himain2.patt(i, 1) << ", "
500  << std::setw(7) << m_himain2.patt(i, 2) << ", "
501  << std::setw(7) << m_himain2.patt(i, 3) << ", "
502  << std::setw(7) << m_himain2.katt(i, 1) << ", "
503  << std::setw(7) << m_himain2.katt(i, 2) << ", "
504  << std::setw(7) << m_himain2.katt(i, 3) << ", "
505  << std::setw(7) << m_himain2.katt(i, 4) << ", "
506  << std::setw(7) << m_himain2.vatt(i, 1) << ", "
507  << std::setw(7) << m_himain2.vatt(i, 2) << ", "
508  << std::setw(7) << m_himain2.vatt(i, 3) );
509 
510  // Assign the particle to its parent's vertex
511  //
512  particleVertexIndex = parentOriginIndex;
513  //std::cout << "ML-> case 2 distane = " << distance <<" particleVertexIndex = "<<particleVertexIndex<< std::endl;
514  }
515  if( parentIndex!=-1 && ((distance > m_vertexOffsetCut || parentOriginIndex !=0) || m_keepAllDecayVertices ) )
516  {
517  // We need to create a new vertex
518  //
519  HepMC::GenVertexPtr newVertex_p = HepMC::newGenVertexPtr(HepMC::FourVector(particleStart.x(),particleStart.y(),particleStart.z(),particleStart.t()));
520  evt->add_vertex(newVertex_p);
521  vertexPtrVec.push_back(newVertex_p);
522  particleVertexIndex = vertexPtrVec.size() - 1;
523 
524  // Now we indicate that the parent has a decay vertex
525  //
526  partDecayVertex_vec[parentIndex] = particleVertexIndex;
527 
528  // Now tell the vertex about the particle that created it
529  //
530 
531  newVertex_p->add_particle_in(particleHepPartPtr_vec[parentIndex]);
532  }
533  else {
534  // Assign the particle to its parent's vertex
535  //
536  particleVertexIndex = parentOriginIndex;
537  }
538  }
539  }
540  else
541  {
542  // We have to brute-force search for a vertex that might match this particle
543  //
544  int foundVert = -1;
545  for (unsigned int ivert = 0; ivert < vertexPtrVec.size(); ivert++)
546  {
547 
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());
553  {
554  foundVert = ivert;
555  break;
556  }
557  }
558 
559  if (foundVert == -1)
560  {
561  // We need to create a new vertex
562  //
563  HepMC::GenVertexPtr newVertex_p = HepMC::newGenVertexPtr(HepMC::FourVector(particleStart.x(),particleStart.y(),particleStart.z(),particleStart.t()));
564 
565  evt->add_vertex(newVertex_p);
566  vertexPtrVec.push_back(newVertex_p);
567  particleVertexIndex = vertexPtrVec.size() - 1;
568  }
569  else
570  {
571  particleVertexIndex = foundVert;
572  }
573  //std::cout << "ML-> case 3 particleVertexIndex = "<<particleVertexIndex<< std::endl;
574  }
575 
576  // If the Hijing particle has decayed, set the status appropriately
577  //
578  int particleId = m_himain2.katt(i, 1);
579  int particleStatus = 1;
580  if (m_himain2.katt(i, 4) == 11) particleStatus = 2;
581 
582  // Create the new particle
583  //
584  HepMC::FourVector particleP4(m_himain2.patt(i, 1),
585  m_himain2.patt(i, 2),
586  m_himain2.patt(i, 3),
587  m_himain2.patt(i, 4));
588 
589  HepMC::GenParticlePtr newParticle_p = HepMC::newGenParticlePtr(particleP4, particleId,
590  particleStatus);
591 
592  // Record the particle in the vector of pointers
593  // (ostensibly we only need this when we have the
594  // history but for simplicity always do it)
595  //
596  particleHepPartPtr_vec[i-1] = newParticle_p;
597 
598  // Now add the particle to its vertex
599  //
600  vertexPtrVec[particleVertexIndex]->add_particle_out(newParticle_p);
601  partOriginVertex_vec[i-1] = particleVertexIndex;
602 
603  //std::cout << "ML-> particleId = " << particleId << " particleStatus = " << particleStatus
604  // << " particleVertexIndex = " << particleVertexIndex << std::endl;
605  }
606 
607  if (inconsistency)
608  {
609  for (int i = 1; i <= m_himain1.natt(); ++i)
610  {
611  // Skip non-interacting projectile and target nucleons
612  //
613  if (!m_spec && ((m_himain2.katt(i, 2) == 0) || (m_himain2.katt(i, 2)) == 10)) continue;
614 
615  ATH_MSG_WARNING( " Hijing.cxx inconsistency: " << std::fixed << std::setprecision(2)
616  // std::cout << std::fixed << std::setprecision(2)
617  << std::setw(5) << i << ","
618  << std::setw(7) << m_himain2.patt(i, 1) << ", "
619  << std::setw(7) << m_himain2.patt(i, 2) << ", "
620  << std::setw(7) << m_himain2.patt(i, 3) << ", "
621  << std::setw(7) << m_himain2.katt(i, 1) << ", "
622  << std::setw(7) << m_himain2.katt(i, 2) << ", "
623  << std::setw(7) << m_himain2.katt(i, 3) << ", "
624  << std::setw(7) << m_himain2.katt(i, 4) << ", "
625  << std::setw(7) << m_himain2.vatt(i, 1) << ", "
626  << std::setw(7) << m_himain2.vatt(i, 2) << ", "
627  << std::setw(7) << m_himain2.vatt(i, 3) );
628  }
629  }
630 
631  // Now loop over all vertices and add them to the event
632  //
633  // for (unsigned int ivertex = 0; ivertex < vertexPtrVec.size(); ivertex++)
634  //{
635  // evt->add_vertex(vertexPtrVec[ivertex]);
636  //}
637 
638  // Generate documentation lines for high-pt partons
639  //
640  for (int isg = 1; isg <= m_hijjet2.nsg(); isg++)
641  {
642  for (int jparton = 1; jparton <= m_hijjet2.njsg(isg); jparton++)
643  {
644  double px = m_hijjet2.pxsg(isg, jparton);
645  double py = m_hijjet2.pysg(isg, jparton);
646  double pz = m_hijjet2.pzsg(isg, jparton);
647  double mass = m_hijjet2.pmsg(isg, jparton);
648 
649  double ptsq = px*px + py*py;
650  double e = std::sqrt(ptsq + pz*pz + mass*mass);
651  double mt = std::sqrt(ptsq + mass*mass);
652  double pt = std::sqrt(ptsq);
653 
654  double pseud = 0.5*std::log((e + pz)/(e - pz));
655 
656  int partonId = m_hijjet2.k2sg(isg, jparton);
657 
658  if (mt > m_partonStoreMinPt)
659  {
660  ATH_MSG_DEBUG( "hijjet2 entry: isg = " << isg
661  << ", pt = " << pt
662  << ", mt = " << mt
663  << ", eta = " << pseud );
664 
665  // Add aaa non-tracked entry in the hepmc event with status code 103 (temporary)
666  //
667  v1->add_particle_out( HepMC::newGenParticlePtr( HepMC::FourVector(px, py, pz, e), partonId, 103 ) );
668  }
669  }
670  }
671 
672  // Generate documentation lines for high-pt partons
673  //
674  int iap = m_hiparnt.ihnt2(1); // # of projectile nucleons
675  int iat = m_hiparnt.ihnt2(3); // # of target nucleons
676 
677  for (int iproj = 1; iproj <= iap; iproj++)
678  {
679  for (int jparton = 1; jparton <= m_hijjet1.npj(iproj); jparton++)
680  {
681  double px = m_hijjet1.pjpx(iproj, jparton);
682  double py = m_hijjet1.pjpy(iproj, jparton);
683  double pz = m_hijjet1.pjpz(iproj, jparton);
684  double mass = m_hijjet1.pjpm(iproj, jparton);
685 
686  double ptsq = px*px + py*py;
687  double e = std::sqrt(ptsq + pz*pz + mass*mass);
688  double mt = std::sqrt(ptsq + mass*mass);
689  double pt = std::sqrt(ptsq);
690 
691  double pseud = 0.5*std::log((e + pz)/(e - pz));
692 
693  int partonId = m_hijjet1.kfpj(iproj, jparton);
694 
695  if (mt > m_partonStoreMinPt)
696  {
697  ATH_MSG_DEBUG( "hijjet1 entry: iproj = " << iproj
698  << ", pt = " << pt
699  << ", mt = " << mt
700  << ", eta = " << pseud );
701 
702  // Add aaa non-tracked entry in the hepmc event with status code 103 (temporary)
703  //
704  v1->add_particle_out( HepMC::newGenParticlePtr( HepMC::FourVector(px, py, pz, e), partonId, 103 ) );
705  }
706  }
707  }
708 
709  // Now for target nucleons
710  //
711  for (int itarg = 1; itarg <= iat; itarg++)
712  {
713  for (int jparton = 1; jparton <= m_hijjet1.ntj(itarg); jparton++)
714  {
715  double px = m_hijjet1.pjtx(itarg, jparton);
716  double py = m_hijjet1.pjty(itarg, jparton);
717  double pz = m_hijjet1.pjtz(itarg, jparton);
718  double mass = m_hijjet1.pjtm(itarg, jparton);
719 
720  double ptsq = px*px + py*py;
721  double e = std::sqrt(ptsq + pz*pz + mass*mass);
722  double mt = std::sqrt(ptsq + mass*mass);
723  double pt = std::sqrt(ptsq);
724 
725  double pseud = 0.5*std::log((e + pz)/(e - pz));
726 
727  int partonId = m_hijjet1.kftj(itarg, jparton);
728 
729  if (mt > m_partonStoreMinPt)
730  {
731  ATH_MSG_DEBUG( "hijjet1 entry: itarg = " << itarg
732  << ", pt = " << pt
733  << ", mt = " << mt
734  << ", eta = " << pseud );
735 
736  // Add aaa non-tracked entry in the hepmc event with status code 103 (temporary)
737  //
738  v1->add_particle_out( HepMC::newGenParticlePtr( HepMC::FourVector(px, py, pz, e), partonId, 103 ) );
739  }
740  }
741  }
742 
743  // Convert CLHEP::cm->CLHEP::mm and CLHEP::GeV->CLHEP::MeV
744  //
745  GeVToMeV(evt);
746 
747  //BPK-> Loop over the particles in the event, if p needs to be mirrored:
748  if( m_prand ){
749  HepMC::FourVector tmpmom(0.,0.,0.,0.);
750  double ranz = CLHEP::RandFlat::shoot(p_Engine);
751  // std::cout <<"random="<<ranz <<std::endl;
752  if (ranz < 0.5) {
753  // std::cout <<"flip="<<ranz <<std::endl;
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);
761  }
762  }
763  }
764  //BPK-<
765 
766  //ARA -- ATLHI-483, clean up unstable particles with no decay vertex
767 #ifdef HEPMC3
769  {
770  const std::vector <HepMC::GenParticlePtr> allParticles=evt->particles();
771  for(auto p : allParticles)
772  {
773  HepMC::ConstGenVertexPtr end_v=p->end_vertex();
774  if(p->status() == 2 && !end_v) evt->remove_particle(p);
775  }
776  }
777 #else
779  {
780  for (HepMC::GenParticle* p : *evt) {
781  HepMC::ConstGenVertexPtr end_v = p->end_vertex();
782  if (p->status() == 2 && !end_v) delete p->production_vertex()->remove_particle(p);
783  }
784  }
785 #endif
786  return StatusCode::SUCCESS;
787 }

◆ finalize()

StatusCode GenModule::finalize ( )
inlineinherited

Definition at line 55 of file GenModule.h.

55 { return genFinalize(); }

◆ genFinalize()

StatusCode Hijing::genFinalize ( )
overridevirtual

For finalising the generator, if required.

Reimplemented from GenModule.

Definition at line 212 of file Hijing.cxx.

213 {
214  ATH_MSG_INFO( " HIJING Ending. \n" );
215  return StatusCode::SUCCESS;
216 }

◆ genInitialize()

StatusCode Hijing::genInitialize ( )
overridevirtual

For initializing the generator, if required.

Reimplemented from GenModule.

Definition at line 85 of file Hijing.cxx.

86 {
88 
89  // Initialisation of input parameters
90  std::cout << "MetaData: generator = Hijing "
91  << HIJINGVERSION << std::endl;
92  ATH_MSG_INFO( "===> Hijing initialising \n" );
93  if( m_rand ){
94  ATH_MSG_INFO( "===> Vertex randomization ON." );
95  }
96  if( m_wide ){
97  ATH_MSG_INFO( "===> Vertex rand covers whole beampipe." );
98  }
99  //BPK
100  if( m_prand ) ATH_MSG_INFO( "===> Random Momentum Mirroring enabled" );
101  if( m_keepAllDecayVertices ) ATH_MSG_INFO( "===> Keeping all decay vertices" );
102  else ATH_MSG_INFO( "===> NOT keeping all decay vertices" );
103 
104 #ifdef HEPMC3
105  ATH_MSG_INFO( "===> HEPMC3 is used" );
106 #else
107  ATH_MSG_INFO( "===> HEPMC3 is not used" );
108 #endif
109 
110  //CLHEP::HepRandomEngine* engine
111  p_Engine = getRandomEngineDuringInitialize(hijing_stream, m_randomSeed, m_dsid); // NOT THREAD-SAFE
112  hijing_stream = "HIJING";
113 
114  // Set the users' initialisation parameters choices
115  set_user_params();
116 
117  const char* frame = m_frame.c_str();
118  const char* proj = m_proj.c_str();
119  const char* targ = m_targ.c_str();
120 
121  hijset_( &m_efrm, frame, proj, targ, &m_iap, &m_izp, &m_iat, &m_izt,
122  strlen(frame), strlen(proj), strlen(targ) );
123 
124  ATH_MSG_INFO( "\n=================================================\n"
125  << " HIJING initialization results: \n"
126  << " Total sigma = " << m_hiparnt.hint1(13) << " mb\n"
127  << " Inelastic sigma = " << m_hiparnt.hint1(12) << " mb\n"
128  << " Jet sigma = " << m_hiparnt.hint1(11) << " mb\n"
129  << "=================================================\n" );
130 
131 // std::cout << " PRINTING HIPR1 " << std::endl;
132 // for (int i = 1; i <= m_hiparnt.lenHipr1(); ++i)
133 // std::cout << i << ":" << m_hiparnt.hipr1(i) << ", ";
134 // std::cout << std::endl;
135 // std::cout << " PRINTING IHPR2 " << std::endl;
136 // for (int i = 1; i <= m_hiparnt.lenIhpr2(); ++i)
137 // std::cout << i << ":" << m_hiparnt.ihpr2(i) << ", ";
138 // std::cout << std::endl;
139 // std::cout << " PRINTING HINT1 " << std::endl;
140 // for (int i = 1; i <= m_hiparnt.lenHint1(); ++i)
141 // std::cout << i << ":" << m_hiparnt.hint1(i) << ", ";
142 // std::cout << std::endl;
143 // std::cout << " PRINTING IHNT2 " << std::endl;
144 // for (int i = 1; i <= m_hiparnt.lenIhnt2(); ++i)
145 // std::cout << i << ":" << m_hiparnt.ihnt2(i) << ", ";
146 // std::cout << std::endl;
147 
148 // std::cout << " NSEED = " << m_ranseed.nseed() << std::endl;
149 
150  return StatusCode::SUCCESS;
151 }

◆ 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

Definition at line 34 of file GenModule.cxx.

36 {
37  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
38  std::string rngName = name()+streamName;
39  rngWrapper->setSeed( rngName, ctx );
40  return rngWrapper->getEngine(ctx);
41 }

◆ getRandomEngine() [2/2]

CLHEP::HepRandomEngine * GenModule::getRandomEngine ( const std::string &  streamName,
unsigned long int  randomSeedOffset,
const EventContext &  ctx 
) const
protectedinherited

Definition at line 44 of file GenModule.cxx.

46 {
47  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
48  rngWrapper->setSeed( streamName, ctx.slot(), randomSeedOffset, ctx.eventID().run_number() );
49  return rngWrapper->getEngine(ctx);
50 }

◆ 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.

54 {
55  const size_t slot=0;
56  EventContext ctx;
57  ctx.setSlot( slot );
58  ctx.setEventID (EventIDBase (conditionsRun,
59  EventIDBase::UNDEFEVT, // event
60  EventIDBase::UNDEFNUM, // timestamp
61  EventIDBase::UNDEFNUM, // timestamp ns
62  lbn));
64  Atlas::ExtendedEventContext( evtStore()->hiveProxyDict(),
65  conditionsRun) );
66  return getRandomEngine(streamName, randomSeedOffset, ctx);
67 }

◆ 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.

58  {
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());
66  }
67 }

◆ initialize()

StatusCode GenModule::initialize ( )
virtualinherited

Reimplemented from GenBase.

Definition at line 21 of file GenModule.cxx.

21  {
22  // Base class initializations
24  // Get the random number service
25  CHECK(m_rndmSvc.retrieve());
26  // Get the incident service
27  CHECK(m_incidentSvc.retrieve());
30  return StatusCode::SUCCESS;
31 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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.

68  {
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);
76  }
77 }

◆ mmTocm()

void GenBase::mmTocm ( HepMC::GenEvent *  evt)
protectedinherited

Scale event lengths by x 1/10.

Definition at line 87 of file GenBase.cxx.

87  {
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);
94  }
95 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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.

126  {
127  return pdt().particle(HepPDT::ParticleID(std::abs(pid)));
128  }

◆ particleTable()

const HepPDT::ParticleDataTable& GenBase::particleTable ( ) const
inlineinherited

Get a particle data table.

Definition at line 118 of file GenBase.h.

118  {
119  return *(m_ppSvc->PDT());
120  }

◆ partPropSvc()

const ServiceHandle<IPartPropSvc> GenBase::partPropSvc ( ) const
inlineinherited

Access the particle property service.

Definition at line 113 of file GenBase.h.

113  {
114  return m_ppSvc;
115  }

◆ pdt()

const HepPDT::ParticleDataTable& GenBase::pdt ( ) const
inlineinherited

Shorter alias to get a particle data table.

Definition at line 123 of file GenBase.h.

123 { return particleTable(); }

◆ randomizeVertex()

CLHEP::HepLorentzVector Hijing::randomizeVertex ( CLHEP::HepRandomEngine *  engine)
protectedvirtual

Definition at line 790 of file Hijing.cxx.

791 {
792  // Check the range in Z for the correct pipe diameter
793  // Definitions of constants are in VertexShift.h
794 
795  using namespace VertexShift;
796 
797  double ranx, rany, xmax, ymax;
798  double ranz = CLHEP::RandFlat::shoot(engine, -Zmax, Zmax);
799  if( m_wide ){ // Allow the whole pipe
800  if( std::abs(ranz) < Start1 ) {
801  xmax = Xmin + Delta1;
802  ymax = xmax;
803  } else if( std::abs(ranz) < Start2 ) {
804  xmax = Xmin + Delta2;
805  ymax = xmax;
806  } else if( std::abs(ranz) < Start3 ) {
807  xmax = Xmin + Delta3;
808  ymax = xmax;
809  } else if ( std::abs(ranz) <= Envelope ){
810  xmax = Xmin;
811  ymax = xmax;
812  } else {
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.);
815  }
816  } else {
817  ATH_MSG_INFO( "New Coordinates: x=0., y=0., z=" << ranz );
818  return CLHEP::HepLorentzVector(0., 0., ranz, 0); // Allow distribution just along the beam (no "width", m_wide is false (default))
819  }
820  ranx = CLHEP::RandFlat::shoot(engine, -xmax, xmax);
821  rany = CLHEP::RandFlat::shoot(engine, -ymax, ymax);
822 
823  ATH_MSG_INFO( "New Coordinates: x=" << ranx << ", y=" << rany << ", z=" << ranz );
824 
825  return CLHEP::HepLorentzVector(ranx, rany, ranz, 0);
826 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ set_user_params()

void Hijing::set_user_params ( void  )
protected

Definition at line 829 of file Hijing.cxx.

830 {
831  // set up the DEFAULT input parameters to hijset: these can be changed by the user ...
832  m_efrm = 14000.;
833  m_frame = "CMS ";
834  m_proj = "P ";
835  m_targ = "P ";
836  m_iap = 1;
837  m_iat = 1;
838  m_izp = 1;
839  m_izt = 1;
840  // ... and to hijing
841  m_bmin = 0.;
842  m_bmax = 0.;
843 
844  // Set user Initialization parameters
846  {
847  ATH_MSG_INFO( " Hijing init. Command is: " << *i );
848  StringParse mystring(*i);
849  std::string myparam = mystring.piece<std::string>(1);
850  if (myparam == "efrm")
851  {
852  m_efrm = mystring.piece<double>(2);
853  }
854  else if (myparam == "frame")
855  {
856  m_frame = mystring.piece<std::string>(2);
857  if (m_frame.size() < 8)
858  {
859  unsigned nbl = 8 - m_frame.size();
860  for (unsigned i = 0; i < nbl; ++i) m_frame += ' ';
861  }
862  }
863  else if (myparam == "proj")
864  {
865  m_proj = mystring.piece<std::string>(2);
866  if (m_proj.size() < 8)
867  {
868  unsigned nbl = 8 - m_proj.size();
869  for (unsigned i = 0; i < nbl; ++i) m_proj += ' ';
870  }
871  }
872  else if (myparam == "targ")
873  {
874  m_targ = mystring.piece<std::string>(2);
875  if (m_targ.size() < 8)
876  {
877  unsigned nbl = 8 - m_targ.size();
878  for (unsigned i = 0; i < nbl; ++i) m_targ += ' ';
879  }
880  }
881  else if (myparam == "iap")
882  {
883  m_iap = mystring.piece<int>(2);
884  }
885  else if (myparam == "izp")
886  {
887  m_izp = mystring.piece<int>(2);
888  }
889  else if (myparam == "iat")
890  {
891  m_iat = mystring.piece<int>(2);
892  }
893  else if (myparam == "izt")
894  {
895  m_izt = mystring.piece<int>(2);
896  }
897  else if (myparam == "bmin")
898  {
899  m_bmin = mystring.piece<double>(2);
900  }
901  else if (myparam == "bmax")
902  {
903  m_bmax = mystring.piece<double>(2);
904  }
905  else if (myparam == "nseed")
906  {
907  m_ranseed.nseed() = mystring.piece<int>(2);
908  }
909  else if (myparam == "hipr1")
910  {
911  int myelem = mystring.piece<int>(2);
912  m_hiparnt.hipr1(myelem) = mystring.piece<double>(3);
913  }
914  else if (myparam == "ihpr2")
915  {
916  int myelem = mystring.piece<int>(2);
917  m_hiparnt.ihpr2(myelem) = mystring.piece<int>(3);
918  }
919  else if (myparam == "hint1")
920  {
921  int myelem = mystring.piece<int>(2);
922  m_hiparnt.hint1(myelem) = mystring.piece<double>(3);
923  }
924  else if (myparam == "ihnt2")
925  {
926  int myelem = mystring.piece<int>(2);
927  m_hiparnt.ihnt2(myelem) = mystring.piece<int>(3);
928  }
929  else
930  {
931  ATH_MSG_ERROR( " ERROR in HIJING INITIALIZATION PARAMETERS " << myparam << " is an invalid parameter !" );
932  }
933  }
934 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_bmax

float Hijing::m_bmax {0.}
protected

Definition at line 70 of file Hijing.h.

◆ m_bmin

float Hijing::m_bmin {0.}
protected

Definition at line 69 of file Hijing.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dsid

IntegerProperty Hijing::m_dsid {this, "Dsid", 999999}
protected

Definition at line 57 of file Hijing.h.

◆ m_efrm

float Hijing::m_efrm {0.}
protected

Definition at line 60 of file Hijing.h.

◆ m_event_paramsKey

SG::WriteHandleKey<HijingEventParams> Hijing::m_event_paramsKey {this, "HijingOutputKey", "Hijing_event_params"}
protected

Definition at line 117 of file Hijing.h.

◆ m_events

int Hijing::m_events {0}
protected

Definition at line 95 of file Hijing.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_frame

std::string Hijing::m_frame
protected

Definition at line 61 of file Hijing.h.

◆ m_hijcrdn

HijCrdn Hijing::m_hijcrdn
protected

Definition at line 113 of file Hijing.h.

◆ m_hijjet1

HijJet1 Hijing::m_hijjet1
protected

Definition at line 109 of file Hijing.h.

◆ m_hijjet2

HijJet2 Hijing::m_hijjet2
protected

Definition at line 110 of file Hijing.h.

◆ m_hijjet4

HijJet4 Hijing::m_hijjet4
protected

Definition at line 111 of file Hijing.h.

◆ m_himain1

HiMain1 Hijing::m_himain1
protected

Definition at line 107 of file Hijing.h.

◆ m_himain2

HiMain2 Hijing::m_himain2
protected

Definition at line 108 of file Hijing.h.

◆ m_hiparnt

HiParnt Hijing::m_hiparnt
protected

Definition at line 101 of file Hijing.h.

◆ m_histrng

HiStrng Hijing::m_histrng
protected

Definition at line 112 of file Hijing.h.

◆ m_iap

int Hijing::m_iap {0}
protected

Definition at line 64 of file Hijing.h.

◆ m_iat

int Hijing::m_iat {0}
protected

Definition at line 65 of file Hijing.h.

◆ 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

CommandVector Hijing::m_InitializeVector
protected

Definition at line 98 of file Hijing.h.

◆ 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

int Hijing::m_izp {0}
protected

Definition at line 66 of file Hijing.h.

◆ m_izt

int Hijing::m_izt {0}
protected

Definition at line 67 of file Hijing.h.

◆ m_keepAllDecayVertices

bool Hijing::m_keepAllDecayVertices {true}
protected

Definition at line 84 of file Hijing.h.

◆ 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

SG::ReadHandleKey<McEventCollection> GenBase::m_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
privateinherited

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

Definition at line 87 of file Hijing.h.

◆ 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

Definition at line 83 of file Hijing.h.

◆ m_proj

std::string Hijing::m_proj
protected

Definition at line 62 of file Hijing.h.

◆ m_rand

bool Hijing::m_rand {false}
protected

Definition at line 81 of file Hijing.h.

◆ 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

Definition at line 91 of file Hijing.h.

◆ m_ranseed

RanSeed Hijing::m_ranseed
protected

Definition at line 104 of file Hijing.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> GenModule::m_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
privateinherited

Data members.

Definition at line 99 of file GenModule.h.

◆ m_seeds

std::vector<long int> Hijing::m_seeds
protected

Definition at line 92 of file Hijing.h.

◆ m_sel

bool Hijing::m_sel {false}
protected

Definition at line 77 of file Hijing.h.

◆ m_spec

bool Hijing::m_spec {true}
protected

Definition at line 78 of file Hijing.h.

◆ m_targ

std::string Hijing::m_targ
protected

Definition at line 63 of file Hijing.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexOffsetCut

double Hijing::m_vertexOffsetCut {1.0E-7}
protected

Definition at line 88 of file Hijing.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_wide

bool Hijing::m_wide {false}
protected

Definition at line 82 of file Hijing.h.

◆ m_x

float Hijing::m_x {0.}
protected

Definition at line 74 of file Hijing.h.

◆ m_y

float Hijing::m_y {0.}
protected

Definition at line 75 of file Hijing.h.

◆ m_z

float Hijing::m_z {0.}
protected

Definition at line 76 of file Hijing.h.


The documentation for this class was generated from the following files:
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Envelope
Definition: IDetectorGeometryTool.h:17
Hijing::m_efrm
float m_efrm
Definition: Hijing.h:60
HijJet1::pjtz
float & pjtz(int i, int j)
Definition: HijJet1.h:201
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
Hijing::m_iap
int m_iap
Definition: Hijing.h:64
VertexShift::Zmax
const float Zmax
Definition: VertexShift.h:26
StringParse
Utility object for parsing a string into tokens and returning them as a variety of types.
Definition: StringParse.h:33
Hijing::m_frame
std::string m_frame
Definition: Hijing.h:61
HiMain1::n10
int & n10(void)
Definition: HiMain1.h:139
test_pyathena.px
px
Definition: test_pyathena.py:18
HiParnt::hint1
float & hint1(int n)
Definition: HiParnt.h:94
VertexShift::Start1
const float Start1
Definition: VertexShift.h:36
HiMain2::katt
int & katt(int i, int j)
Definition: HiMain2.h:82
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
Hijing::m_targ
std::string m_targ
Definition: Hijing.h:63
Hijing::m_bmin
float m_bmin
Definition: Hijing.h:69
VertexShift::Start3
const float Start3
Definition: VertexShift.h:38
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
GenModule::fillEvt
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
VertexShift::Xmin
const float Xmin
Definition: VertexShift.h:25
GenModule::callGenerator
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition: GenModule.h:66
GenBase::GeVToMeV
void GeVToMeV(HepMC::GenEvent *evt)
Scale event energies/momenta by x 1000.
Definition: GenBase.cxx:58
GenBase::events_const
const McEventCollection * events_const() const
Access the current event's McEventCollection (const)
Definition: GenBase.h:96
SG::ReadHandle< McEventCollection >
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
HijJet2::njsg
int & njsg(int i)
Definition: HijJet2.h:98
VertexShift::Delta3
const float Delta3
Definition: VertexShift.h:31
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
HiParnt::hipr1
float & hipr1(int n)
Definition: HiParnt.h:78
Hijing::m_proj
std::string m_proj
Definition: Hijing.h:62
GenModule::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
Definition: GenModule.h:101
HijJet1::pjpz
float & pjpz(int i, int j)
Definition: HijJet1.h:133
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Hijing::m_iat
int m_iat
Definition: Hijing.h:65
HepMC::newGenEvent
GenEvent * newGenEvent(const int a, const int b)
Definition: GenEvent.h:624
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
VertexShift
Definition: VertexShift.h:23
Hijing::m_spec
bool m_spec
Definition: Hijing.h:78
HiMain1::n0
int & n0(void)
Definition: HiMain1.h:125
Hijing::m_event_paramsKey
SG::WriteHandleKey< HijingEventParams > m_event_paramsKey
Definition: Hijing.h:117
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
PlotPulseshapeFromCool.np
np
Definition: PlotPulseshapeFromCool.py:64
HijJet1::pjty
float & pjty(int i, int j)
Definition: HijJet1.h:191
x
#define x
HepMC::fillBarcodesAttribute
void fillBarcodesAttribute(GenEvent *)
Definition: GenEvent.h:626
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
python.DataFormatRates.events
events
Definition: DataFormatRates.py:105
GenModule::getRandomEngine
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
Definition: GenModule.cxx:34
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Hijing::m_y
float m_y
Definition: Hijing.h:75
Hijing::m_InitializeVector
CommandVector m_InitializeVector
Definition: Hijing.h:98
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
HijJet1::pjtx
float & pjtx(int i, int j)
Definition: HijJet1.h:181
Hijing::m_hijjet1
HijJet1 m_hijjet1
Definition: Hijing.h:109
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
HiMain1::natt
int & natt(void)
Definition: HiMain1.h:90
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
Hijing::m_wide
bool m_wide
Definition: Hijing.h:82
VertexShift::Delta2
const float Delta2
Definition: VertexShift.h:30
GenModule::genuserInitialize
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
Definition: GenModule.h:64
HijJet2::pmsg
float & pmsg(int i, int j)
Definition: HijJet2.h:176
Hijing::m_events
int m_events
Definition: Hijing.h:95
GenModule::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
Definition: GenModule.h:99
GenBase::m_ppSvc
ServiceHandle< IPartPropSvc > m_ppSvc
Handle on the particle property service.
Definition: GenBase.h:160
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
GenModule::genInitialize
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition: GenModule.h:62
HepMC::set_signal_process_vertex
void set_signal_process_vertex(GenEvent *e, T v)
Definition: GenEvent.h:650
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Hijing::m_rand
bool m_rand
Definition: Hijing.h:81
AthCommonDataStore
Definition: AthCommonDataStore.h:52
HijJet1::ntj
int & ntj(int i)
Definition: HijJet1.h:163
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
RanSeed::nseed
int & nseed(void)
Definition: RanSeed.h:51
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Hijing::randomizeVertex
virtual CLHEP::HepLorentzVector randomizeVertex(CLHEP::HepRandomEngine *engine)
Definition: Hijing.cxx:790
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
HiMain2::patt
float & patt(int i, int j)
Definition: HiMain2.h:92
HijJet2::nsg
int & nsg(void)
Definition: HijJet2.h:91
Hijing::m_hiparnt
HiParnt m_hiparnt
Definition: Hijing.h:101
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
Hijing::m_bmax
float m_bmax
Definition: Hijing.h:70
Atlas::ExtendedEventContext
Definition: ExtendedEventContext.h:23
Hijing::m_prand
bool m_prand
Definition: Hijing.h:83
HijJet1::kftj
int & kftj(int i, int j)
Definition: HijJet1.h:171
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
HijJet2::pxsg
float & pxsg(int i, int j)
Definition: HijJet2.h:136
GenBase::m_mcevents_const
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition: GenBase.h:163
GenModule::m_isAfterburner
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
Definition: GenModule.h:87
ParticleGun_EoverP_Config.pid
pid
Definition: ParticleGun_EoverP_Config.py:62
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
HiMain1::jatt
int & jatt(void)
Definition: HiMain1.h:104
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
Hijing::m_himain2
HiMain2 m_himain2
Definition: Hijing.h:108
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
GenModule::genFinalize
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition: GenModule.h:70
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
HiMain1::ierrstat
int & ierrstat(void)
Definition: HiMain1.h:153
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Hijing::m_seeds
std::vector< long int > m_seeds
Definition: Hijing.h:92
Hijing::m_sel
bool m_sel
Definition: Hijing.h:77
HijJet1::kfpj
int & kfpj(int i, int j)
Definition: HijJet1.h:103
make_coralServer_rep.proj
proj
Definition: make_coralServer_rep.py:48
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
GenBase::particleTable
const HepPDT::ParticleDataTable & particleTable() const
Get a particle data table.
Definition: GenBase.h:118
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Hijing::m_vertexOffsetCut
double m_vertexOffsetCut
Definition: Hijing.h:88
HijJet2::pysg
float & pysg(int i, int j)
Definition: HijJet2.h:146
GenModule::GenModule
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: GenModule.cxx:14
Amg::py
@ py
Definition: GeoPrimitives.h:39
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
HiParnt::ihpr2
int & ihpr2(int n)
Definition: HiParnt.h:86
HijJet1::pjpy
float & pjpy(int i, int j)
Definition: HijJet1.h:123
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VertexShift::Start2
const float Start2
Definition: VertexShift.h:37
HiMain2::vatt
float & vatt(int i, int j)
Definition: HiMain2.h:102
Hijing::m_izt
int m_izt
Definition: Hijing.h:67
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
HiMain1::n11
int & n11(void)
Definition: HiMain1.h:146
Hijing::m_keepAllDecayVertices
bool m_keepAllDecayVertices
Definition: Hijing.h:84
SG::WriteHandle< HijingEventParams >
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
AthenaPoolExample_Copy.streamName
string streamName
Definition: AthenaPoolExample_Copy.py:39
a
TList * a
Definition: liststreamerinfos.cxx:10
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
HiMain1::nt
int & nt(void)
Definition: HiMain1.h:111
y
#define y
h
Hijing::m_partonStoreMinPt
double m_partonStoreMinPt
Definition: Hijing.h:87
hijset_
void hijset_(float *, const char *, const char *, const char *, int *, int *, int *, int *, long int, long int, long int)
HijJet1::pjpm
float & pjpm(int i, int j)
Definition: HijJet1.h:153
Hijing::m_izp
int m_izp
Definition: Hijing.h:66
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
GenModule::m_randomSeed
IntegerProperty m_randomSeed
Seed for random number engine.
Definition: GenModule.h:84
GenBase::pdt
const HepPDT::ParticleDataTable & pdt() const
Shorter alias to get a particle data table.
Definition: GenBase.h:123
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
xmax
double xmax
Definition: listroot.cxx:61
HiMain1::np
int & np(void)
Definition: HiMain1.h:118
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
ATHRNG::calculateSeedsMC21
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.
Definition: RNGWrapper.cxx:37
Hijing::m_x
float m_x
Definition: Hijing.h:74
Hijing::m_hijjet2
HijJet2 m_hijjet2
Definition: Hijing.h:110
Hijing::m_z
float m_z
Definition: Hijing.h:76
Hijing::m_himain1
HiMain1 m_himain1
Definition: Hijing.h:107
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
HiParnt::ihnt2
int & ihnt2(int n)
Definition: HiParnt.h:103
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
beamspotnt.nt
def nt
Definition: bin/beamspotnt.py:1063
VertexShift::Delta1
const float Delta1
Definition: VertexShift.h:29
HijJet2::k2sg
int & k2sg(int i, int j)
Definition: HijJet2.h:126
HijJet2::pzsg
float & pzsg(int i, int j)
Definition: HijJet2.h:156
HepMC::set_signal_process_id
void set_signal_process_id(GenEvent *e, const int i)
Definition: GenEvent.h:641
HiMain1::n01
int & n01(void)
Definition: HiMain1.h:132
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
HijJet1::pjtm
float & pjtm(int i, int j)
Definition: HijJet1.h:221
Hijing::m_ranseed
RanSeed m_ranseed
Definition: Hijing.h:104
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
HijJet1::npj
int & npj(int i)
Definition: HijJet1.h:95
Atlas::setExtendedEventContext
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.
Definition: ExtendedEventContext.cxx:50
GenBase::initialize
virtual StatusCode initialize() override
Definition: GenBase.cxx:17
HijJet1::pjpx
float & pjpx(int i, int j)
Definition: HijJet1.h:113
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Hijing::set_user_params
void set_user_params(void)
Definition: Hijing.cxx:829
fitman.k
k
Definition: fitman.py:528
GenModule::getRandomEngineDuringInitialize
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
Definition: GenModule.cxx:53
hijing_
void hijing_(const char *, float *, float *, long int)
GenParticle
@ GenParticle
Definition: TruthClasses.h:30
ymax
double ymax
Definition: listroot.cxx:64
Hijing::m_dsid
IntegerProperty m_dsid
Definition: Hijing.h:57
HepMC::set_random_states
void set_random_states(GenEvent *e, std::vector< T > a)
Definition: GenEvent.h:647
ServiceHandle< ICondSvc >