eic-smear
1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
|
Go to the documentation of this file.
17 #include <TCollection.h>
18 #include <TDatabasePDG.h>
19 #include <TDirectory.h>
20 #include <TParticlePDG.h>
40 , particles(
"erhic::ParticleMC", 100) {
50 TObject* object(NULL);
52 while ((
object = next())) {
53 tracks.push_back(
static_cast<ParticleMC*
>(
object));
64 std::list<const VirtualParticle*> plist(final_.begin(),
77 while ((p =
static_cast<ParticleMC*
>(next()))) {
89 mom += (*i)->Get4Vector();
100 mom += (*i)->Get4Vector();
110 TDatabasePDG* pdg = TDatabasePDG::Instance();
112 TParticlePDG* part = pdg->GetParticle((*i)->Id());
114 charge += part->Charge() / 3.;
116 std::cout <<
"Unknown particle: " << (*i)->Id() << std::endl;
162 if (gDirectory) gDirectory->GetObject(treeName.c_str(),
mTree);
Double32_t WSquared
Invariant mass of the hadronic system.
virtual const ParticleMC * ExchangeBoson() const
Returns a pointer to the exchanged boson.
Double32_t QSquared
Q2 calculated from scattered electron.
EventMC * mEvent
The last event read.
Int_t process
PYTHIA code for the physics process producing the event.
virtual void Clear(Option_t *="")
Clears event contents.
TLorentzVector FinalStateMomentum() const
Returns the total momentum of the final state in GeV/c.
EventMC * Read(Long64_t number)
Read and return the numbered event from the tree.
virtual UShort_t GetStatus() const
Returns the status of the particle.
TTree * mTree
The tree being read.
virtual const ParticleMC * ScatteredLepton() const
Returns a pointer to the lepton beam particle after scattering.
void FinalState(ParticlePtrList &particles) const
Stores pointers to all final state particles in the list.
virtual const ParticleMC * BeamHadron() const
Returns a pointer to the incident hadron beam particle.
Double32_t ELeptonOutNucl
Scattered lepton energy in the nuclear rest frame.
Double32_t ELeptonInNucl
Incident lepton energy in the nuclear rest frame.
virtual const ParticleMC * BeamLepton() const
Returns a pointer to the incident lepton beam particle.
Double32_t nu
Energy transfer from the electron.
TrackVector::const_iterator TrackVectorCIter
Double32_t x
Bjorken scaling variable.
std::vector< const VirtualParticle * > TrackVector
Int_t number
Event number.
TrackVector::iterator TrackVectorIter
Reader(const std::string &treeName="EICTree")
Construct a Reader for the named TTree.
virtual void AddLast(ParticleMC *track)
Add a copy of a track argument to the end of the track list.
Int_t nTracks
Number of Particles in the event (intermediate + final)
Double32_t y
Inelasticity.
virtual const ParticleMC * GetTrack(UInt_t) const
Returns the nth track.
void HadronicFinalState(ParticlePtrList &) const
Yields all particles that belong to the hadronic final state.
TClonesArray particles
Particle list.
TLorentzVector HadronicFinalStateMomentum() const
Returns the total momentum of the hadronic final state in GeV/c.
Double_t FinalStateCharge() const
Returns the total charge of the final state in units of e.
std::vector< const VirtualParticle * > GetTracks() const
Returns pointers to all tracks in the event.
Abstract base class for DIS Monte Carlo events.
virtual ~EventMC()
Destructor.
virtual void Reset()
Resets event properties to defaults.