![]() |
FairShip
|
#include <ParticleGunGenerator.h>
Classes | |
| struct | HistoEntry |
Public Member Functions | |
| ParticleGunGenerator () | |
| ParticleGunGenerator (Int_t pdgid, Int_t mult=1) | |
| ~ParticleGunGenerator () override | |
| void | SetPRange (Double32_t pmin=0, Double32_t pmax=10) |
| void | SetPtRange (Double32_t ptmin=0, Double32_t ptmax=10) |
| void | SetEkinRange (Double32_t kmin=0, Double32_t kmax=10) |
| void | SetPhiRange (Double32_t phimin=0, Double32_t phimax=360) |
| void | SetEtaRange (Double32_t etamin=-5, Double32_t etamax=7) |
| void | SetYRange (Double32_t ymin=-5, Double32_t ymax=7) |
| void | SetThetaRange (Double32_t thetamin=0, Double32_t thetamax=90) |
| void | SetCosTheta () |
| void | SetBothCharges (bool flag, Double32_t fraction=0.5) |
| void | SetPDGType (int pdgid) |
| void | SetMultiplicity (int mult) |
| void | SetCommonVertex (bool flag) |
| Give all particles of an event the same vertex, drawn once per event. | |
| int | GenPDGType () const |
| int | GetMultiplicity () |
| void | LoadHistoFromFile (const std::string &inFile, const std::string &inHisto, std::vector< std::string > varNames) |
| Double32_t | GetPDGMass () |
| void | SetDebug (Bool_t) |
| Bool_t | Init () override |
| Bool_t | Init (const char *inFile) override |
| Bool_t | Init (const char *inFile, int startEvent) override |
| Bool_t | ReadEvent (FairPrimaryGenerator *primGen) override |
| FairGenerator * | CloneGenerator () const override |
| void | SetVertexModel (const std::string &model, std::vector< Double32_t > pars) |
| void | SetMomentumModel (const int modelNo, std::vector< Double32_t > pars) |
| void | PrintMomentumModels () |
| void | PrintVertexModels () |
| virtual Bool_t | Init (const std::vector< std::string > &inFiles, int startNumber) |
| virtual Bool_t | Init (const std::vector< std::string > &inFiles) |
| Public Member Functions inherited from SHiP::Generator | |
| Generator ()=default | |
| ~Generator () override | |
| virtual void | UseExternalFile (std::string x, Int_t i) |
| virtual void | UseExternalFile (std::vector< std::string > &inFiles, Int_t i) |
| void | SetMaxTheta (Double_t thetaX, Double_t thetaY) |
| Int_t | nrOfGeoRejections () const |
| Long64_t | GetCounter (const std::string &name) const |
| void | SetCounter (const std::string &name, Long64_t value) |
| void | IncrementCounter (const std::string &name, Long64_t delta=1) |
Protected Member Functions | |
| ParticleGunGenerator (const ParticleGunGenerator &)=default | |
| ParticleGunGenerator & | operator= (const ParticleGunGenerator &)=default |
| Protected Member Functions inherited from SHiP::Generator | |
| bool | IsInVesselAcceptance (Double_t px, Double_t py, Double_t pz) const |
Private Member Functions | |
| void | GenVertexModel (ParticleGunParticle &p) |
| void | GenMomentumModel (ParticleGunParticle &p) |
| ParticleGunParticle | GenerateKinematics () |
| void | OverrideFromHistogram (ParticleGunParticle &p) |
| Double32_t & | GetVar (ParticleGunParticle &p, const std::string &name) |
| void | SetVar (ParticleGunParticle &p, const std::string &name, Double32_t value) |
Private Attributes | |
| Double32_t | fPtMin {0} |
| Double32_t | fPtMax {0} |
| Double32_t | fPhiMin {0} |
| Double32_t | fPhiMax {0} |
| Double32_t | fEtaMin {0} |
| Double32_t | fEtaMax {0} |
| Double32_t | fYMin {0} |
| Double32_t | fYMax {0} |
| Double32_t | fPMin {0} |
| Double32_t | fPMax {0} |
| Double32_t | fThetaMin {0} |
| Double32_t | fThetaMax {0} |
| Double32_t | fEkinMin {0} |
| Double32_t | fEkinMax {0} |
| Double32_t | fVx {0} |
| Double32_t | fVy {0} |
| Double32_t | fVz {0} |
| Double32_t | fVex {0} |
| Double32_t | fVey {0} |
| Double32_t | fVez {0} |
| Double32_t | fPDGMass {0} |
| bool | m_bothCharges {false} |
| Double32_t | m_chargeFraction {1.} |
| std::vector< HistoEntry > | fHistoEntries |
| Bool_t | fEtaRangeIsSet {false} |
| Bool_t | fYRangeIsSet {false} |
| Bool_t | fThetaRangeIsSet {false} |
| Bool_t | fCosThetaIsSet {false} |
| Bool_t | fPtRangeIsSet {false} |
| Bool_t | fPRangeIsSet {false} |
| Bool_t | fEkinRangeIsSet {false} |
| int | fMomentumModel {0} |
| std::string | fVertexModel = "gaussian" |
| std::vector< Double32_t > | fMomentumPars |
| std::vector< Double32_t > | fVertexPars |
| int | m_mult {1} |
| bool | m_commonVertex {false} |
| int | m_pdgid {0} |
Additional Inherited Members | |
| Protected Attributes inherited from SHiP::Generator | |
| std::optional< std::string > | fextFile |
| Int_t | firstEvent = 0 |
| Double_t | fMaxThetaX = 0 |
| Double_t | fMaxThetaY = 0 |
| bool | fUseVesselAcceptance = false |
| Int_t | fnGeoRejects = 0 |
| std::unordered_map< std::string, int64_t > | fCounters |
Definition at line 23 of file ParticleGunGenerator.h.
| ParticleGunGenerator::ParticleGunGenerator | ( | ) |
Default constructor.
Definition at line 86 of file ParticleGunGenerator.cxx.
|
explicit |
Constructor with PDG-ID, multiplicity
| pdgid | Particle type (PDG encoding) |
| mult | Multiplicity (default is 1) |
Definition at line 90 of file ParticleGunGenerator.cxx.
|
overridedefault |
Destructor
|
protecteddefault |
Copy constructor.
|
override |
Clone this object (used in MT mode only)
Definition at line 453 of file ParticleGunGenerator.cxx.
|
private |
Definition at line 280 of file ParticleGunGenerator.cxx.
|
private |
Definition at line 416 of file ParticleGunGenerator.cxx.
| int ParticleGunGenerator::GenPDGType | ( | ) | const |
Definition at line 251 of file ParticleGunGenerator.cxx.
|
private |
Definition at line 412 of file ParticleGunGenerator.cxx.
|
inline |
Definition at line 89 of file ParticleGunGenerator.h.
|
inline |
Definition at line 94 of file ParticleGunGenerator.h.
|
private |
Definition at line 434 of file ParticleGunGenerator.cxx.
|
override |
Definition at line 163 of file ParticleGunGenerator.cxx.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Implements SHiP::Generator.
Definition at line 108 of file ParticleGunGenerator.h.
|
inlinevirtual |
Initializer
Reimplemented from SHiP::Generator.
Definition at line 33 of file Generator.h.
|
inlinevirtual |
Initializer
Reimplemented from SHiP::Generator.
Definition at line 27 of file Generator.h.
| void ParticleGunGenerator::LoadHistoFromFile | ( | const std::string & | inFile, |
| const std::string & | inHisto, | ||
| std::vector< std::string > | varNames ) |
Definition at line 100 of file ParticleGunGenerator.cxx.
|
protecteddefault |
|
private |
Definition at line 331 of file ParticleGunGenerator.cxx.
| void ParticleGunGenerator::PrintMomentumModels | ( | ) |
Definition at line 427 of file ParticleGunGenerator.cxx.
| void ParticleGunGenerator::PrintVertexModels | ( | ) |
Definition at line 420 of file ParticleGunGenerator.cxx.
|
override |
Creates an event with given type and multiplicity.
| primGen | pointer to the FairPrimaryGenerator |
Definition at line 259 of file ParticleGunGenerator.cxx.
| void ParticleGunGenerator::SetBothCharges | ( | bool | flag, |
| Double32_t | fraction = 0.5 ) |
Definition at line 222 of file ParticleGunGenerator.cxx.
|
inline |
Give all particles of an event the same vertex, drawn once per event.
Definition at line 87 of file ParticleGunGenerator.h.
|
inline |
Definition at line 80 of file ParticleGunGenerator.h.
|
inline |
not used, for backward compatibility, please user FairLogger to set debug mode
Definition at line 101 of file ParticleGunGenerator.h.
|
inline |
Definition at line 51 of file ParticleGunGenerator.h.
|
inline |
Definition at line 62 of file ParticleGunGenerator.h.
| void ParticleGunGenerator::SetMomentumModel | ( | const int | modelNo, |
| std::vector< Double32_t > | pars ) |
Definition at line 356 of file ParticleGunGenerator.cxx.
|
inline |
Definition at line 85 of file ParticleGunGenerator.h.
|
inline |
Definition at line 84 of file ParticleGunGenerator.h.
|
inline |
Definition at line 57 of file ParticleGunGenerator.h.
|
inline |
Modifiers
Definition at line 39 of file ParticleGunGenerator.h.
|
inline |
Definition at line 45 of file ParticleGunGenerator.h.
|
inline |
Definition at line 74 of file ParticleGunGenerator.h.
|
private |
Definition at line 448 of file ParticleGunGenerator.cxx.
| void ParticleGunGenerator::SetVertexModel | ( | const std::string & | model, |
| std::vector< Double32_t > | pars ) |
Definition at line 382 of file ParticleGunGenerator.cxx.
|
inline |
Definition at line 68 of file ParticleGunGenerator.h.
|
private |
Definition at line 168 of file ParticleGunGenerator.h.
|
private |
Definition at line 150 of file ParticleGunGenerator.h.
|
private |
Definition at line 149 of file ParticleGunGenerator.h.
|
private |
Definition at line 172 of file ParticleGunGenerator.h.
|
private |
Definition at line 144 of file ParticleGunGenerator.h.
|
private |
Definition at line 144 of file ParticleGunGenerator.h.
|
private |
Definition at line 165 of file ParticleGunGenerator.h.
|
private |
Definition at line 163 of file ParticleGunGenerator.h.
|
private |
Definition at line 174 of file ParticleGunGenerator.h.
|
private |
Definition at line 176 of file ParticleGunGenerator.h.
|
private |
Definition at line 153 of file ParticleGunGenerator.h.
|
private |
Definition at line 143 of file ParticleGunGenerator.h.
|
private |
Definition at line 143 of file ParticleGunGenerator.h.
|
private |
Definition at line 146 of file ParticleGunGenerator.h.
|
private |
Definition at line 146 of file ParticleGunGenerator.h.
|
private |
Definition at line 171 of file ParticleGunGenerator.h.
|
private |
Definition at line 142 of file ParticleGunGenerator.h.
|
private |
Definition at line 142 of file ParticleGunGenerator.h.
|
private |
Definition at line 170 of file ParticleGunGenerator.h.
|
private |
Definition at line 148 of file ParticleGunGenerator.h.
|
private |
Definition at line 147 of file ParticleGunGenerator.h.
|
private |
Definition at line 167 of file ParticleGunGenerator.h.
|
private |
Definition at line 175 of file ParticleGunGenerator.h.
|
private |
Definition at line 177 of file ParticleGunGenerator.h.
|
private |
Definition at line 152 of file ParticleGunGenerator.h.
|
private |
Definition at line 152 of file ParticleGunGenerator.h.
|
private |
Definition at line 152 of file ParticleGunGenerator.h.
|
private |
Definition at line 151 of file ParticleGunGenerator.h.
|
private |
Definition at line 151 of file ParticleGunGenerator.h.
|
private |
Definition at line 151 of file ParticleGunGenerator.h.
|
private |
Definition at line 145 of file ParticleGunGenerator.h.
|
private |
Definition at line 145 of file ParticleGunGenerator.h.
|
private |
Definition at line 166 of file ParticleGunGenerator.h.
|
private |
Definition at line 155 of file ParticleGunGenerator.h.
|
private |
Definition at line 156 of file ParticleGunGenerator.h.
|
private |
Definition at line 179 of file ParticleGunGenerator.h.
|
private |
Definition at line 178 of file ParticleGunGenerator.h.
|
private |
Definition at line 180 of file ParticleGunGenerator.h.