00001 #ifndef FastSimulation_PileUpProducer_PUEvent_h 00002 #define FastSimulation_PileUpProducer_PUEvent_h 00003 00004 #include <vector> 00005 00006 class PUEvent { 00007 00008 00009 public: 00010 PUEvent() : NParticles_(0), NMinBias_(0) {} 00011 virtual ~PUEvent() {} 00012 void reset() { 00013 PUParticles_.clear(); 00014 PUMinBiasEvts_.clear(); 00015 NParticles_ = 0; 00016 NMinBias_ = 0; 00017 } 00018 00019 class PUParticle { 00020 public: 00021 PUParticle() : px(0.), py(0.), pz(0.),mass(0.),id(0) {} 00022 virtual ~PUParticle() {} 00023 float px; 00024 float py; 00025 float pz; 00026 float mass; 00027 int id; 00028 }; 00029 00030 00031 class PUMinBiasEvt { 00032 public: 00033 PUMinBiasEvt() : first(0), size(0) {} 00034 virtual ~PUMinBiasEvt() {} 00035 unsigned first; 00036 unsigned size; 00037 }; 00038 00039 00040 void addPUParticle( const PUParticle& ptc ) { 00041 PUParticles_.push_back(ptc); 00042 ++NParticles_; 00043 } 00044 00045 void addPUMinBiasEvt( const PUMinBiasEvt& idx ) { 00046 PUMinBiasEvts_.push_back(idx); 00047 ++NMinBias_; 00048 } 00049 00050 const std::vector<PUEvent::PUParticle>& thePUParticles() 00051 {return PUParticles_;} 00052 00053 const std::vector<PUEvent::PUMinBiasEvt>& thePUMinBiasEvts() 00054 {return PUMinBiasEvts_;} 00055 00056 const unsigned nParticles() const { return NParticles_; } 00057 00058 const unsigned nMinBias() const { return NMinBias_; } 00059 00060 private: 00061 00062 std::vector<PUEvent::PUParticle> PUParticles_; 00063 std::vector<PUEvent::PUMinBiasEvt> PUMinBiasEvts_; 00064 unsigned NParticles_; 00065 unsigned NMinBias_; 00066 00067 }; 00068 00069 #endif