CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FSimEvent Class Reference

#include <FSimEvent.h>

Inheritance diagram for FSimEvent:
FBaseSimEvent

Public Member Functions

void fill (const HepMC::GenEvent &hev, edm::EventID &Id)
 fill the FBaseSimEvent from the current HepMC::GenEvent More...
 
void fill (const std::vector< SimTrack > &simTracks, const std::vector< SimVertex > &simVertices)
 fill the FBaseSimEvent from the SimTrack's and SimVert'ices More...
 
 FSimEvent (const edm::ParameterSet &kine)
 Default constructor. More...
 
edm::EventID id () const
 Method to return the EventId. More...
 
void load (edm::SimTrackContainer &c, edm::SimTrackContainer &m) const
 Load containers of tracks (and muons) and vertices for the edm::Event. More...
 
void load (edm::SimVertexContainer &c) const
 
void load (FSimVertexTypeCollection &c) const
 
unsigned int nGenParts () const
 Number of MC particles. More...
 
unsigned int nTracks () const
 Number of tracks. More...
 
unsigned int nVertices () const
 Number of vertices. More...
 
float weight () const
 Method to return the event weight. More...
 
virtual ~FSimEvent ()
 usual virtual destructor More...
 
- Public Member Functions inherited from FBaseSimEvent
void addChargedTrack (int id)
 Add an id in the vector of charged tracks id's. More...
 
void addParticles (const HepMC::GenEvent &hev)
 Add the particles and their vertices to the list. More...
 
int addSimTrack (const RawParticle *p, int iv, int ig=-1, const HepMC::GenVertex *ev=nullptr)
 Add a new track to the Event and to the various lists. More...
 
int addSimVertex (const XYZTLorentzVector &decayVertex, int im=-1, FSimVertexType::VertexType type=FSimVertexType::ANY)
 Add a new vertex to the Event and to the various lists. More...
 
int chargedTrack (int id) const
 return "reconstructed" charged tracks index. More...
 
void clear ()
 clear the FBaseSimEvent content before the next event More...
 
const HepMC::GenParticle * embdGenpart (int i) const
 return MC track with a given id More...
 
const SimTrackembdTrack (int i) const
 return embedded track with given id More...
 
const SimVertexembdVertex (int i) const
 return embedded vertex with given id More...
 
const FSimVertexTypeembdVertexType (int i) const
 return embedded vertex type with given id More...
 
 FBaseSimEvent (const edm::ParameterSet &kine)
 Default constructor. More...
 
void fill (const HepMC::GenEvent &hev)
 fill the FBaseSimEvent from the current HepMC::GenEvent More...
 
void fill (const std::vector< SimTrack > &, const std::vector< SimVertex > &)
 fill the FBaseSimEvent from SimTrack's and SimVert'ices More...
 
const KineParticleFilterfilter () const
 
void initializePdt (const HepPDT::ParticleDataTable *aPdt)
 Initialize the particle data table. More...
 
unsigned int nChargedTracks () const
 Number of "reconstructed" charged tracks. More...
 
unsigned int nGenParts () const
 Number of generator particles. More...
 
unsigned int nTracks () const
 Number of tracks. More...
 
unsigned int nVertices () const
 Number of vertices. More...
 
void print () const
 print the FBaseSimEvent in an intelligible way More...
 
void printMCTruth (const HepMC::GenEvent &hev)
 print the original MCTruth event More...
 
const HepPDT::ParticleDataTabletheTable () const
 Get the pointer to the particle data table. More...
 
FSimTracktrack (int id) const
 Return track with given Id. More...
 
FSimVertexvertex (int id) const
 Return vertex with given Id. More...
 
FSimVertexTypevertexType (int id) const
 Return vertex with given Id. More...
 
 ~FBaseSimEvent ()
 usual virtual destructor More...
 

Private Attributes

edm::EventID id_
 
double weight_
 

Additional Inherited Members

- Protected Member Functions inherited from FBaseSimEvent
std::vector< HepMC::GenParticle * > * genparts () const
 The pointer to the vector of GenParticle's. More...
 
std::vector< FSimTrack > * tracks () const
 The pointer to the vector of FSimTrack's. More...
 
std::vector< FSimVertex > * vertices () const
 The pointer to the vector of FSimVertex's. More...
 

Detailed Description

The FAMOS SimEvent: inherits from FBaseSimEvent, where the latter provides FAMOS-specific event features (splitting proposed by Maya STAVRIANAKOU)

An FSimEvent contains, at filling time, only particles from the GenEvent it is being filled with. Material Effects then update its content, so that it resembles the output of Geant at the end of the material effect processing.

Important : All distances are in mm

Author
Patrick Janot, CERN
Date
: 9-Dec-2003

Definition at line 29 of file FSimEvent.h.

Constructor & Destructor Documentation

◆ FSimEvent()

FSimEvent::FSimEvent ( const edm::ParameterSet kine)

Default constructor.

Definition at line 6 of file FSimEvent.cc.

6 : FBaseSimEvent(kine), id_(edm::EventID(0, 0, 0)), weight_(0) {}

◆ ~FSimEvent()

FSimEvent::~FSimEvent ( )
virtual

usual virtual destructor

Definition at line 8 of file FSimEvent.cc.

8 {}

Member Function Documentation

◆ fill() [1/2]

void FSimEvent::fill ( const HepMC::GenEvent hev,
edm::EventID Id 
)

fill the FBaseSimEvent from the current HepMC::GenEvent

Definition at line 10 of file FSimEvent.cc.

10  {
12  id_ = Id;
13 }

References FBaseSimEvent::fill(), and id_.

Referenced by FamosManager::reconstruct().

◆ fill() [2/2]

void FSimEvent::fill ( const std::vector< SimTrack > &  simTracks,
const std::vector< SimVertex > &  simVertices 
)

fill the FBaseSimEvent from the SimTrack's and SimVert'ices

Definition at line 15 of file FSimEvent.cc.

15  {
17  id_ = edm::EventID();
18 }

References FBaseSimEvent::fill(), id_, TrackCandidateProducer_cfi::simTracks, and HGCalValidator_cfi::simVertices.

◆ id()

edm::EventID FSimEvent::id ( void  ) const

Method to return the EventId.

Definition at line 20 of file FSimEvent.cc.

20 { return id_; }

References id_.

Referenced by CalorimetryManager::reconstruct().

◆ load() [1/3]

void FSimEvent::load ( edm::SimTrackContainer c,
edm::SimTrackContainer m 
) const

Load containers of tracks (and muons) and vertices for the edm::Event.

Definition at line 30 of file FSimEvent.cc.

30  {
31  for (unsigned int i = 0; i < nTracks(); ++i) {
32  // SimTrack t = SimTrack(ip,p,iv,ig);
33  const SimTrack& t = embdTrack(i);
34  // Save all tracks
35  c.push_back(t);
36  // Save also some muons for later parameterization
37  if (abs(t.type()) == 13 && t.momentum().perp2() > 1.0 && fabs(t.momentum().eta()) < 3.0 && track(i).noEndVertex()) {
38  // Actually save the muon mother (and the attached muon) in case
39  if (!track(i).noMother() && track(i).mother().closestDaughterId() == (int)i) {
40  const SimTrack& T = embdTrack(track(i).mother().id());
41  m.push_back(T);
42  }
43  m.push_back(t);
44  }
45  }
46 }

References funct::abs(), HltBtagPostValidation_cff::c, FSimTrack::closestDaughterId(), FBaseSimEvent::embdTrack(), mps_fire::i, createfilelist::int, visualization-live-secondInstance_cfg::m, FSimTrack::mother(), FSimTrack::noEndVertex(), FSimTrack::noMother(), nTracks(), submitPVValidationJobs::t, and FBaseSimEvent::track().

Referenced by FamosProducer::produce().

◆ load() [2/3]

void FSimEvent::load ( edm::SimVertexContainer c) const

Definition at line 48 of file FSimEvent.cc.

48  {
49  for (unsigned int i = 0; i < nVertices(); ++i) {
50  // SimTrack t = SimTrack(ip,p,iv,ig);
51  c.push_back(embdVertex(i));
52  }
53 }

References HltBtagPostValidation_cff::c, FBaseSimEvent::embdVertex(), mps_fire::i, and nVertices().

◆ load() [3/3]

void FSimEvent::load ( FSimVertexTypeCollection c) const

Definition at line 55 of file FSimEvent.cc.

55  {
56  for (unsigned int i = 0; i < nVertices(); ++i) {
57  c.push_back(embdVertexType(i));
58  }
59 }

References HltBtagPostValidation_cff::c, FBaseSimEvent::embdVertexType(), mps_fire::i, and nVertices().

◆ nGenParts()

unsigned int FSimEvent::nGenParts ( ) const

Number of MC particles.

Definition at line 28 of file FSimEvent.cc.

28 { return FBaseSimEvent::nGenParts(); }

References FBaseSimEvent::nGenParts().

Referenced by FamosManager::reconstruct().

◆ nTracks()

unsigned int FSimEvent::nTracks ( ) const

Number of tracks.

Definition at line 24 of file FSimEvent.cc.

24 { return FBaseSimEvent::nTracks(); }

References FBaseSimEvent::nTracks().

Referenced by load(), FamosManager::reconstruct(), CalorimetryManager::reconstruct(), and TrajectoryManager::reconstruct().

◆ nVertices()

unsigned int FSimEvent::nVertices ( ) const

Number of vertices.

Definition at line 26 of file FSimEvent.cc.

26 { return FBaseSimEvent::nVertices(); }

References FBaseSimEvent::nVertices().

Referenced by load(), and FamosManager::reconstruct().

◆ weight()

float FSimEvent::weight ( ) const

Method to return the event weight.

Definition at line 22 of file FSimEvent.cc.

22 { return weight_; }

References weight_.

Referenced by FamosManager::reconstruct().

Member Data Documentation

◆ id_

edm::EventID FSimEvent::id_
private

Definition at line 62 of file FSimEvent.h.

Referenced by fill(), and id().

◆ weight_

double FSimEvent::weight_
private

Definition at line 63 of file FSimEvent.h.

Referenced by weight().

mps_fire.i
i
Definition: mps_fire.py:428
FSimTrack::mother
const FSimTrack & mother() const
mother
FBaseSimEvent::fill
void fill(const HepMC::GenEvent &hev)
fill the FBaseSimEvent from the current HepMC::GenEvent
Definition: FBaseSimEvent.cc:82
FBaseSimEvent::nVertices
unsigned int nVertices() const
Number of vertices.
Definition: FBaseSimEvent.h:81
TrackCandidateProducer_cfi.simTracks
simTracks
Definition: TrackCandidateProducer_cfi.py:15
FSimEvent::nTracks
unsigned int nTracks() const
Number of tracks.
Definition: FSimEvent.cc:24
FBaseSimEvent::embdVertex
const SimVertex & embdVertex(int i) const
return embedded vertex with given id
FSimTrack::closestDaughterId
int closestDaughterId() const
Get the index of the closest charged daughter.
Definition: FSimTrack.h:206
FBaseSimEvent::track
FSimTrack & track(int id) const
Return track with given Id.
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
FSimEvent::weight_
double weight_
Definition: FSimEvent.h:63
FBaseSimEvent::nGenParts
unsigned int nGenParts() const
Number of generator particles.
Definition: FBaseSimEvent.h:84
createfilelist.int
int
Definition: createfilelist.py:10
FSimEvent::id_
edm::EventID id_
Definition: FSimEvent.h:62
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
FSimTrack::noEndVertex
bool noEndVertex() const
no end vertex
FBaseSimEvent::embdVertexType
const FSimVertexType & embdVertexType(int i) const
return embedded vertex type with given id
SimTrack
Definition: SimTrack.h:6
T
long double T
Definition: Basic3DVectorLD.h:48
FSimEvent::nVertices
unsigned int nVertices() const
Number of vertices.
Definition: FSimEvent.cc:26
FBaseSimEvent::nTracks
unsigned int nTracks() const
Number of tracks.
Definition: FBaseSimEvent.h:78
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalValidator_cfi.simVertices
simVertices
Definition: HGCalValidator_cfi.py:43
FSimTrack::noMother
bool noMother() const
no mother particle
edm::EventID
Definition: EventID.h:31
FBaseSimEvent::embdTrack
const SimTrack & embdTrack(int i) const
return embedded track with given id
FBaseSimEvent::FBaseSimEvent
FBaseSimEvent(const edm::ParameterSet &kine)
Default constructor.
Definition: FBaseSimEvent.cc:32
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644