CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
InitialState Class Referenceabstract

#include <InitialState.h>

Inheritance diagram for InitialState:
gen::Hydjet2Hadronizer

Public Member Functions

virtual void Evolve (List_t &secondaries, ParticleAllocator &allocator, double weakDecayLimit)
 
virtual double GetWeakDecayLimit ()=0
 
 InitialState ()
 
virtual bool RunDecays ()=0
 
virtual ~InitialState () noexcept(false)
 

Protected Attributes

DatabasePDGfDatabase
 

Detailed Description

Definition at line 14 of file InitialState.h.

Constructor & Destructor Documentation

◆ InitialState()

InitialState::InitialState ( )
inline

Definition at line 19 of file InitialState.h.

19  {
20  fDatabase = new DatabasePDG();
22  fDatabase->SetMassRange(0.0, 200.);
23  fDatabase->SetWidthRange(0., 10.);
24  };

References fDatabase, DatabasePDG::LoadData(), DatabasePDG::SetMassRange(), and DatabasePDG::SetWidthRange().

◆ ~InitialState()

virtual InitialState::~InitialState ( )
inlinevirtualnoexcept

Definition at line 25 of file InitialState.h.

25 { delete fDatabase; };

References fDatabase.

Member Function Documentation

◆ Evolve()

void InitialState::Evolve ( List_t secondaries,
ParticleAllocator allocator,
double  weakDecayLimit 
)
virtual

Definition at line 13 of file InitialState.cc.

13  {
14  // Particle indexes are set for primaries already from InitialStateHydjet::Initialize()
15 
16  // particle list iterators
17  LPIT_t it;
18  LPIT_t e;
19 
20  // Decay loop
21  // Note that the decay products are always added at the end of list so the unstable products are
22  // decayed when the iterator reaches them (used for cascade decays)
23  for (it = secondaries.begin(), e = secondaries.end(); it != e; ++it) {
24  // if the decay procedure was applied already skip ... (e.g. particles from pythia history information)
25  if (it->GetDecayed()) {
26  continue;
27  }
28 
29  // generate the decay time; if particle is stable or set to stable decayTime=0
30  double decayTime = GetDecayTime(*it, weakDecayLimit);
31  it->SetLastInterTime(it->T() + decayTime);
32  TVector3 shift(it->Mom().BoostVector());
33  shift *= decayTime;
34  it->SetDecayed();
35 
36  // if decayTime>0 then apply the decay procedure (only 2 or 3 body decays)
37  if (decayTime > 0.) {
38  it->Pos(it->Pos() += TLorentzVector(shift, 0.));
39  it->T(it->T() + decayTime);
40  Decay(secondaries, *it, allocator, fDatabase);
41  }
42  // if particle is stable just continue
43  }
44 }

References Decay(), MillePedeFileConverter_cfg::e, fDatabase, GetDecayTime(), and edm::shift.

Referenced by gen::Hydjet2Hadronizer::generatePartonsAndHadronize().

◆ GetWeakDecayLimit()

virtual double InitialState::GetWeakDecayLimit ( )
pure virtual

Implemented in gen::Hydjet2Hadronizer.

◆ RunDecays()

virtual bool InitialState::RunDecays ( )
pure virtual

Implemented in gen::Hydjet2Hadronizer.

Member Data Documentation

◆ fDatabase

DatabasePDG* InitialState::fDatabase
protected
DatabasePDG::SetMassRange
void SetMassRange(double min, double max)
Definition: DatabasePDG.cc:527
Decay
void Decay(List_t &output, Particle &p, ParticleAllocator &allocator, DatabasePDG *database)
Definition: HadronDecayer.cc:56
DatabasePDG::SetWidthRange
void SetWidthRange(double min, double max)
Definition: DatabasePDG.cc:480
InitialState::fDatabase
DatabasePDG * fDatabase
Definition: InitialState.h:16
DatabasePDG::LoadData
bool LoadData()
Definition: DatabasePDG.cc:61
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
DatabasePDG
Definition: DatabasePDG.h:34
GetDecayTime
double GetDecayTime(const Particle &p, double weakDecayLimit)
Definition: HadronDecayer.cc:34
LPIT_t
std::list< Particle >::iterator LPIT_t
Definition: Particle.h:175
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37