FSimEvent

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
#ifndef FastSimulation_Event_FSimEvent_H
#define FastSimulation_Event_FSimEvent_H

// CMSSW Headers
#include "DataFormats/Provenance/interface/EventID.h"
#include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
#include "SimDataFormats/Track/interface/SimTrackContainer.h"
#include "SimDataFormats/Vertex/interface/SimVertexContainer.h"

// FAMOS Headers
#include "FastSimulation/Event/interface/FBaseSimEvent.h"

/** 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
 *
 */

class FSimEvent : public FBaseSimEvent {
public:
  /// Default constructor
  FSimEvent(const edm::ParameterSet& kine);

  ///  usual virtual destructor
  virtual ~FSimEvent();

  /// fill the FBaseSimEvent from the current HepMC::GenEvent
  void fill(const HepMC::GenEvent& hev, edm::EventID& Id);

  /// fill the FBaseSimEvent from the SimTrack's and SimVert'ices
  void fill(const std::vector<SimTrack>& simTracks, const std::vector<SimVertex>& simVertices);

  ///Method to return the EventId
  edm::EventID id() const;

  ///Method to return the event weight
  float weight() const;

  /// Number of tracks
  unsigned int nTracks() const;
  /// Number of vertices
  unsigned int nVertices() const;
  /// Number of MC particles
  unsigned int nGenParts() const;

  /// Load containers of tracks (and muons) and vertices for the edm::Event
  void load(edm::SimTrackContainer& c, edm::SimTrackContainer& m) const;
  void load(edm::SimVertexContainer& c) const;
  void load(FSimVertexTypeCollection& c) const;

private:
  edm::EventID id_;
  double weight_;
};

#endif  // FSIMEVENT_H