CMS 3D CMS Logo

Public Member Functions | Private Attributes

FSimEvent Class Reference

#include <FSimEvent.h>

Inheritance diagram for FSimEvent:
FBaseSimEvent

List of all members.

Public Member Functions

void fill (const HepMC::GenEvent &hev, edm::EventID &Id)
 fill the FBaseSimEvent from the current HepMC::GenEvent
void fill (const reco::GenParticleCollection &parts, edm::EventID &Id)
 fill the FBaseSimEvent from the current reco::GenParticleCollection
void fill (const std::vector< SimTrack > &simTracks, const std::vector< SimVertex > &simVertices)
 fill the FBaseSimEvent from the SimTrack's and SimVert'ices
 FSimEvent (const edm::ParameterSet &vtx, const edm::ParameterSet &kine, const RandomEngine *engine)
 FSimEvent (const edm::ParameterSet &kine)
 Default constructor.
edm::EventID id () const
 Method to return the EventId.
void load (FSimVertexTypeCollection &c) const
void load (edm::SimTrackContainer &c, edm::SimTrackContainer &m) const
 Load containers of tracks (and muons) and vertices for the edm::Event.
void load (edm::SimVertexContainer &c) const
unsigned int nGenParts () const
 Number of MC particles.
unsigned int nTracks () const
 Number of tracks.
unsigned int nVertices () const
 Number of vertices.
float weight () const
 Method to return the event weight.
virtual ~FSimEvent ()
 usual virtual destructor

Private Attributes

edm::EventID id_
double weight_

Detailed Description

Definition at line 31 of file FSimEvent.h.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 6 of file FSimEvent.cc.

    : FBaseSimEvent(kine), id_(edm::EventID(0,0,0)), weight_(0)
{}
FSimEvent::FSimEvent ( const edm::ParameterSet vtx,
const edm::ParameterSet kine,
const RandomEngine engine 
)

Definition at line 10 of file FSimEvent.cc.

    : FBaseSimEvent(vtx,kine,engine), id_(edm::EventID(0,0,0)), weight_(0)
{}
FSimEvent::~FSimEvent ( ) [virtual]

usual virtual destructor

Definition at line 16 of file FSimEvent.cc.

{}

Member Function Documentation

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

fill the FBaseSimEvent from the current HepMC::GenEvent

Definition at line 26 of file FSimEvent.cc.

References id_.

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

                                                        { 
  FBaseSimEvent::fill(hev); 
  id_ = Id;
}
void FSimEvent::fill ( const reco::GenParticleCollection parts,
edm::EventID Id 
)

fill the FBaseSimEvent from the current reco::GenParticleCollection

Definition at line 20 of file FSimEvent.cc.

References fill(), and id_.

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

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

Reimplemented from FBaseSimEvent.

Definition at line 32 of file FSimEvent.cc.

References fill(), and id_.

                                                         {
  FBaseSimEvent::fill(simTracks,simVertices);
  id_ = edm::EventID();
} 
edm::EventID FSimEvent::id ( void  ) const

Method to return the EventId.

Definition at line 39 of file FSimEvent.cc.

References id_.

Referenced by CalorimetryManager::reconstruct().

                    { 
  return id_; 
}
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 63 of file FSimEvent.cc.

References abs, FSimTrack::closestDaughterId(), FBaseSimEvent::embdTrack(), i, CoreSimTrack::momentum(), FSimTrack::mother(), FSimTrack::noEndVertex(), nTracks(), lumiQTWidget::t, FBaseSimEvent::track(), and CoreSimTrack::type().

{
  for (unsigned int i=0; i<nTracks(); ++i) {
    //    SimTrack t = SimTrack(ip,p,iv,ig);
    const SimTrack& t = embdTrack(i);
    // Save all tracks
    c.push_back(t);
    // Save also some muons for later parameterization
    if ( abs(t.type()) == 13 && 
         t.momentum().perp2() > 1.0 &&
         fabs(t.momentum().eta()) < 3.0 &&
         track(i).noEndVertex() ) {
      // Actually save the muon mother (and the attached muon) in case
      if ( track(i).mother().closestDaughterId() == (int)i ) {
        const SimTrack& T = embdTrack(track(i).mother().id());
        m.push_back(T);
      } 
      m.push_back(t);
    }
  }
}
void FSimEvent::load ( FSimVertexTypeCollection c) const

Definition at line 96 of file FSimEvent.cc.

References FBaseSimEvent::embdVertexType(), i, and nVertices().

{

  for (unsigned int i=0; i<nVertices(); ++i) {
    c.push_back(embdVertexType(i));
  }
}
void FSimEvent::load ( edm::SimVertexContainer c) const

Definition at line 86 of file FSimEvent.cc.

References FBaseSimEvent::embdVertex(), i, and nVertices().

{
  for (unsigned int i=0; i<nVertices(); ++i) {
    //    SimTrack t = SimTrack(ip,p,iv,ig);
    c.push_back(embdVertex(i));
  }
}
unsigned int FSimEvent::nGenParts ( ) const

Number of MC particles.

Reimplemented from FBaseSimEvent.

Definition at line 58 of file FSimEvent.cc.

Referenced by FamosManager::reconstruct().

                           {
  return FBaseSimEvent::nGenParts();
}
unsigned int FSimEvent::nTracks ( ) const

Number of tracks.

Reimplemented from FBaseSimEvent.

Definition at line 48 of file FSimEvent.cc.

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

                         {
  return FBaseSimEvent::nTracks();
}
unsigned int FSimEvent::nVertices ( ) const

Number of vertices.

Reimplemented from FBaseSimEvent.

Definition at line 53 of file FSimEvent.cc.

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

                           { 
  return FBaseSimEvent::nVertices();
}
float FSimEvent::weight ( void  ) const

Method to return the event weight.

Definition at line 43 of file FSimEvent.cc.

References weight_.

Referenced by FamosManager::reconstruct().

                              { 
  return weight_; 
}

Member Data Documentation

Definition at line 75 of file FSimEvent.h.

Referenced by fill(), and id().

double FSimEvent::weight_ [private]

Definition at line 76 of file FSimEvent.h.

Referenced by weight().