Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Jetscape::JetScapeParticleBase Class Reference

#include <JETSCAPE/blob/main/src/framework/JetScapeParticles.h>

+ Inheritance diagram for Jetscape::JetScapeParticleBase:
+ Collaboration diagram for Jetscape::JetScapeParticleBase:

Public Member Functions

void reset_momentum (const double px, const double py, const double pz, const double e)
 
void reset_momentum (const FourVector &p)
 
fjcore::PseudoJet GetPseudoJet () const
 No implicit cast to PseudoJet is allowed, provide a conversion.
 
 JetScapeParticleBase ()
 
 JetScapeParticleBase (int label, int id, int stat, const FourVector &p, const FourVector &x)
 
 JetScapeParticleBase (int label, int id, int stat, double pt, double eta, double phi, double e, double *x=0)
 
 JetScapeParticleBase (int label, int id, int stat, const FourVector &p, const FourVector &x, double mass)
 
 JetScapeParticleBase (const JetScapeParticleBase &srp)
 
virtual ~JetScapeParticleBase ()
 
void clear ()
 
void set_label (int label)
 
void set_id (int id)
 
void set_stat (int stat)
 
void set_x (double x[4])
 
void init_jet_v ()
 
void set_jet_v (double v[4])
 
void set_jet_v (FourVector j)
 
bool SetController (string controller="")
 
void UnsetController ()
 
const int pid () const
 
const int pstat () const
 
const int plabel () const
 
const double time () const
 
std::vector< JetScapeParticleBaseparents ()
 
const FourVector p_in () const
 
const FourVectorx_in () const
 
const FourVectorjet_v () const
 
const double restmass ()
 
const double p (int i)
 
double pl ()
 
const double nu ()
 
const double t_max ()
 
virtual JetScapeParticleBaseoperator= (JetScapeParticleBase &c)
 
virtual JetScapeParticleBaseoperator= (const JetScapeParticleBase &c)
 
string GetController () const
 
bool GetControlled () const
 

Static Public Attributes

static Pythia8::Pythia InternalHelperPythia
 

Protected Member Functions

void set_restmass (double mass_input)
 shouldn't be called from the outside, needs to be consistent with PID
 

Protected Attributes

int pid_
 particle id
 
int pstat_
 status of particle
 
int plabel_
 the line number in the event record
 
double mass_
 rest mass of the particle
 
FourVector x_in_
 position of particle
 
FourVector jet_v_
 jet four vector, without gamma factor (so not really a four vector)
 
bool controlled_ = false
 check whether a module claimed responsibility of this particle
 
string controller_ = ""
 

Friends

class fjcore::PseudoJet
 

Detailed Description

Provides JetScapeParticleBase and derived classes Parton, Hadron

A JetScapeParticleBase derives PRIVARTELY from FastJet PseudoJet and has additional information:

  • PID (from PDG) and rest mass (these should eventually be coupled and only PID kept track of internally)
  • A location (creation point) 4-vector
  • a label and a status
  • currently additional information that should be moved to derived classes or only used as UserInfo

The design choice of protected inheritance is due to a disconnect between available packages. The overwhelming majority of the theory community expects the 0 component to be time/energy, whereas FastJet (and others, like ROOT) prefer t,e to be the fourth component. Private inheritance means we can inherit and make accessible safe methods (with C++11 using), while protecting users from unsafe (explicit component access) ones. Note that this is only necessary because otherwise it's impossible to disallow constructors and getters that explicitly assume indices! IF we could get rid of those or change to the fastjet convention, we could derive publicly and get a true Is_A relationship. Alas.

You can in principle use the base class directly, but it's recommended to use the derived classes Parton and/or (todo) Hadron, Lepton, ...

Warning
PseudoJet doesn't have a concept of rest mass, any mass related functions literally assume $M^2 = E^2 - p*p.$ Especially in the case of off-shell partons, the correct interpretation is $"M^2" = E^2 - p^2 == M0^2 + Q^2 == M0^2 + t$ Therefore, there is the dangerous possibility that functions like mass(), reset_PtYPhiM(...) can be used by unwitting users and display unexpected behavior. For protection against this possibility, "mass"-related functions in PseudoJet are not made available

Future considerations:

  • We should consider making a Pythia8 installation mandatory; with pythia guaranteed to be present, the rest mass lookup could be automatically done using PDG data.
  • If ROOT were a mandatory part, TLorentzVector would be a good replacement for the homebrewed FourVector
  • If HepMc were a mandatory part, HepMc::FourVector would be a good replacement for the homebrewed FourVector

Definition at line 87 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 87 of file JetScapeParticles.h

Constructor & Destructor Documentation

Jetscape::JetScapeParticleBase::JetScapeParticleBase ( )
inline

Definition at line 205 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 205 of file JetScapeParticles.h

Jetscape::JetScapeParticleBase::JetScapeParticleBase ( int  label,
int  id,
int  stat,
const FourVector p,
const FourVector x 
)

Definition at line 71 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 71 of file JetScapeParticles.cc

References assert, init_jet_v(), InternalHelperPythia, pid(), reset_momentum(), set_id(), set_label(), set_restmass(), set_stat(), ambiguity_solver_full_chain::x, and x_in_.

+ Here is the call graph for this function:

Jetscape::JetScapeParticleBase::JetScapeParticleBase ( int  label,
int  id,
int  stat,
double  pt,
double  eta,
double  phi,
double  e,
double x = 0 
)

Definition at line 45 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 45 of file JetScapeParticles.cc

References assert, init_jet_v(), InternalHelperPythia, reset_momentum(), set_id(), set_label(), set_restmass(), set_stat(), set_x(), and x0.

+ Here is the call graph for this function:

Jetscape::JetScapeParticleBase::JetScapeParticleBase ( int  label,
int  id,
int  stat,
const FourVector p,
const FourVector x,
double  mass 
)

Definition at line 91 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 91 of file JetScapeParticles.cc

References init_jet_v(), reset_momentum(), set_id(), set_label(), set_stat(), ambiguity_solver_full_chain::x, and x_in_.

+ Here is the call graph for this function:

Jetscape::JetScapeParticleBase::JetScapeParticleBase ( const JetScapeParticleBase srp)

Definition at line 35 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 35 of file JetScapeParticles.cc

References jet_v_, mass_, pid_, plabel_, pstat_, and x_in_.

Jetscape::JetScapeParticleBase::~JetScapeParticleBase ( )
virtual

Definition at line 33 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 33 of file JetScapeParticles.cc

References VERBOSESHOWER.

Member Function Documentation

void Jetscape::JetScapeParticleBase::clear ( )

Definition at line 103 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 103 of file JetScapeParticles.cc

References mass_, pid_, plabel_, and pstat_.

bool Jetscape::JetScapeParticleBase::GetControlled ( ) const
inline

Check whether we have a responsible (Eloss) module

Definition at line 269 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 269 of file JetScapeParticles.h

Referenced by Jetscape::JetEnergyLossModule< AdSCFT >::TakeResponsibilityFor().

+ Here is the caller graph for this function:

string Jetscape::JetScapeParticleBase::GetController ( ) const
inline

Check id of responsible (Eloss) module

Definition at line 267 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 267 of file JetScapeParticles.h

References controller_.

Referenced by Jetscape::JetEnergyLossModule< AdSCFT >::TakeResponsibilityFor().

+ Here is the caller graph for this function:

fjcore::PseudoJet Jetscape::JetScapeParticleBase::GetPseudoJet ( ) const
inline

No implicit cast to PseudoJet is allowed, provide a conversion.

Definition at line 135 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 135 of file JetScapeParticles.h

References fjcore::PseudoJet.

void Jetscape::JetScapeParticleBase::init_jet_v ( )

Definition at line 127 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 127 of file JetScapeParticles.cc

References jet_v_.

Referenced by JetScapeParticleBase().

+ Here is the caller graph for this function:

const FourVector & Jetscape::JetScapeParticleBase::jet_v ( ) const

Definition at line 150 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 150 of file JetScapeParticles.cc

References jet_v_.

const double Jetscape::JetScapeParticleBase::nu ( )

Definition at line 193 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 193 of file JetScapeParticles.cc

References Acts::UnitConstants::e, and pl().

Referenced by __example_6.f__(), f2pyth(), pygrvd(), pygrvl(), pygrvm(), pyhistfe(), and radgen_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

JetScapeParticleBase & Jetscape::JetScapeParticleBase::operator= ( JetScapeParticleBase c)
virtual

Definition at line 197 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 197 of file JetScapeParticles.cc

References mass_, operator=(), pid(), pid_, plabel(), plabel_, pstat(), pstat_, x_in(), and x_in_.

Referenced by Jetscape::Parton::operator=(), and Jetscape::Hadron::operator=().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

JetScapeParticleBase & Jetscape::JetScapeParticleBase::operator= ( const JetScapeParticleBase c)
virtual

Definition at line 211 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 211 of file JetScapeParticles.cc

References mass_, operator=(), pid_, plabel_, pstat_, and x_in_.

+ Here is the call graph for this function:

const double Jetscape::JetScapeParticleBase::p ( int  i)

Deprecated. Prefer explicit component access

Definition at line 154 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 154 of file JetScapeParticles.cc

References Acts::UnitConstants::e.

const FourVector Jetscape::JetScapeParticleBase::p_in ( ) const

Definition at line 144 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 144 of file JetScapeParticles.cc

References Acts::UnitConstants::e.

Referenced by HybridHadronization::HHparton::pDif2().

+ Here is the caller graph for this function:

std::vector<JetScapeParticleBase> Jetscape::JetScapeParticleBase::parents ( )
const int Jetscape::JetScapeParticleBase::pid ( ) const

Definition at line 136 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 136 of file JetScapeParticles.cc

References pid_.

Referenced by Jetscape::JetScapeWriterHepMC::castHadronToHepMC(), Jetscape::JetScapeWriterRootHepMC::castHadronToHepMC(), Jetscape::JetScapeWriterRootHepMC::castPartonToHepMC(), Jetscape::JetScapeWriterHepMC::castPartonToHepMC(), JetScapeParticleBase(), main(), Jetscape::operator<<(), operator=(), and Jetscape::HadronPrinter::PrintFinalHadron().

+ Here is the caller graph for this function:

double Jetscape::JetScapeParticleBase::pl ( )

Definition at line 172 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 172 of file JetScapeParticles.cc

References Jetscape::FourVector::comp(), Acts::UnitConstants::e, jet_v_, Jetscape::FourVector::x(), Jetscape::FourVector::y(), and Jetscape::FourVector::z().

Referenced by bornin(), dokinematics(), mpolrad(), nu(), and podinl().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const int Jetscape::JetScapeParticleBase::plabel ( ) const

Definition at line 140 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 140 of file JetScapeParticles.cc

References plabel_.

Referenced by Jetscape::operator<<(), and operator=().

+ Here is the caller graph for this function:

const int Jetscape::JetScapeParticleBase::pstat ( ) const

Definition at line 138 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 138 of file JetScapeParticles.cc

References pstat_.

Referenced by Jetscape::JetScapeWriterHepMC::castHadronToHepMC(), Jetscape::JetScapeWriterRootHepMC::castHadronToHepMC(), Jetscape::JetScapeWriterHepMC::castPartonToHepMC(), Jetscape::JetScapeWriterRootHepMC::castPartonToHepMC(), main(), Jetscape::operator<<(), operator=(), and Jetscape::HadronPrinter::PrintFinalHadron().

+ Here is the caller graph for this function:

void Jetscape::JetScapeParticleBase::reset_momentum ( const double  px,
const double  py,
const double  pz,
const double  e 
)
inline

Definition at line 102 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 102 of file JetScapeParticles.h

Referenced by JetScapeParticleBase(), Jetscape::Parton::reset_p(), and Jetscape::Parton::set_t().

+ Here is the caller graph for this function:

void Jetscape::JetScapeParticleBase::reset_momentum ( const FourVector p)
inline

Definition at line 107 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 107 of file JetScapeParticles.h

References Jetscape::FourVector::t(), Jetscape::FourVector::x(), Jetscape::FourVector::y(), and Jetscape::FourVector::z().

+ Here is the call graph for this function:

const double Jetscape::JetScapeParticleBase::restmass ( )

Definition at line 152 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 152 of file JetScapeParticles.cc

References mass_.

Referenced by Jetscape::Parton::set_t(), and Jetscape::Parton::t().

+ Here is the caller graph for this function:

void Jetscape::JetScapeParticleBase::set_id ( int  id)

Definition at line 112 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 112 of file JetScapeParticles.cc

References train_ambiguity_solver::id, and pid_.

Referenced by JetScapeParticleBase().

+ Here is the caller graph for this function:

void Jetscape::JetScapeParticleBase::set_jet_v ( double  v[4])

Definition at line 129 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 129 of file JetScapeParticles.cc

References jet_v_.

void Jetscape::JetScapeParticleBase::set_jet_v ( FourVector  j)

Definition at line 131 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 131 of file JetScapeParticles.cc

References j, and jet_v_.

void Jetscape::JetScapeParticleBase::set_label ( int  label)

Definition at line 110 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 110 of file JetScapeParticles.cc

References CKF_timing_vs_mu::label, and plabel_.

Referenced by JetScapeParticleBase().

+ Here is the caller graph for this function:

void Jetscape::JetScapeParticleBase::set_restmass ( double  mass_input)
protected

shouldn't be called from the outside, needs to be consistent with PID

Definition at line 116 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 116 of file JetScapeParticles.cc

References mass_.

Referenced by Jetscape::Hadron::Hadron(), and JetScapeParticleBase().

+ Here is the caller graph for this function:

void Jetscape::JetScapeParticleBase::set_stat ( int  stat)

Definition at line 114 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 114 of file JetScapeParticles.cc

References pstat_.

Referenced by JetScapeParticleBase().

+ Here is the caller graph for this function:

void Jetscape::JetScapeParticleBase::set_x ( double  x[4])

Definition at line 122 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 122 of file JetScapeParticles.cc

References Jetscape::FourVector::Set(), and x_in_.

Referenced by JetScapeParticleBase().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Jetscape::JetScapeParticleBase::SetController ( string  controller = "")
inline

Set a new responsible (Eloss) module

Returns
false if we already had one

Definition at line 230 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 230 of file JetScapeParticles.h

References controlled_, and controller_.

Referenced by Jetscape::JetEnergyLossModule< AdSCFT >::TakeResponsibilityFor().

+ Here is the caller graph for this function:

const double Jetscape::JetScapeParticleBase::t_max ( )
const double Jetscape::JetScapeParticleBase::time ( ) const

Definition at line 142 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 142 of file JetScapeParticles.cc

References Jetscape::FourVector::t(), and x_in_.

+ Here is the call graph for this function:

void Jetscape::JetScapeParticleBase::UnsetController ( )
inline

Relinquish responsibility of an (Eloss) module

Definition at line 237 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 237 of file JetScapeParticles.h

References controlled_, and controller_.

const FourVector & Jetscape::JetScapeParticleBase::x_in ( ) const

Definition at line 148 of file JetScapeParticles.cc.

View newest version in sPHENIX GitHub at line 148 of file JetScapeParticles.cc

References x_in_.

Referenced by Martini::isCoherent(), Jetscape::operator<<(), operator=(), and HybridHadronization::HHparton::posDif2().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class fjcore::PseudoJet
friend

Definition at line 88 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 88 of file JetScapeParticles.h

Referenced by GetPseudoJet().

Member Data Documentation

bool Jetscape::JetScapeParticleBase::controlled_ = false
protected

check whether a module claimed responsibility of this particle

Definition at line 299 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 299 of file JetScapeParticles.h

Referenced by SetController(), and UnsetController().

string Jetscape::JetScapeParticleBase::controller_ = ""
protected

Definition at line 300 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 300 of file JetScapeParticles.h

Referenced by GetController(), SetController(), and UnsetController().

Pythia8::Pythia Jetscape::JetScapeParticleBase::InternalHelperPythia
static

Definition at line 269 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 269 of file JetScapeParticles.h

Referenced by Jetscape::Hadron::CheckOrForceHadron(), JetScapeParticleBase(), and Jetscape::Parton::Parton().

FourVector Jetscape::JetScapeParticleBase::jet_v_
protected

jet four vector, without gamma factor (so not really a four vector)

Definition at line 290 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 290 of file JetScapeParticles.h

Referenced by init_jet_v(), jet_v(), JetScapeParticleBase(), pl(), set_jet_v(), and Jetscape::Parton::set_t().

double Jetscape::JetScapeParticleBase::mass_
protected

rest mass of the particle

Definition at line 286 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 286 of file JetScapeParticles.h

Referenced by clear(), JetScapeParticleBase(), operator=(), restmass(), and set_restmass().

int Jetscape::JetScapeParticleBase::pid_
protected

particle id

Definition at line 282 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 282 of file JetScapeParticles.h

Referenced by clear(), JetScapeParticleBase(), operator=(), pid(), and set_id().

int Jetscape::JetScapeParticleBase::plabel_
protected

the line number in the event record

Definition at line 284 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 284 of file JetScapeParticles.h

Referenced by clear(), JetScapeParticleBase(), operator=(), plabel(), and set_label().

int Jetscape::JetScapeParticleBase::pstat_
protected

status of particle

Definition at line 283 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 283 of file JetScapeParticles.h

Referenced by clear(), JetScapeParticleBase(), operator=(), pstat(), and set_stat().

FourVector Jetscape::JetScapeParticleBase::x_in_
protected

position of particle

Definition at line 288 of file JetScapeParticles.h.

View newest version in sPHENIX GitHub at line 288 of file JetScapeParticles.h

Referenced by Jetscape::Hadron::has_no_position(), JetScapeParticleBase(), operator=(), set_x(), time(), and x_in().


The documentation for this class was generated from the following files: