CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/FastSimDataFormats/PileUpEvents/interface/PUEvent.h

Go to the documentation of this file.
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() {}
00011   void reset() {
00012     PUParticles_.clear();
00013     PUMinBiasEvts_.clear();
00014   }
00015 
00016   class PUParticle {
00017   public:
00018     PUParticle() : px(0.), py(0.), pz(0.),mass(0.),id(0) {}
00019     float px; 
00020     float py;
00021     float pz;
00022     float mass;
00023     int id;
00024   };   
00025 
00026 
00027   class PUMinBiasEvt {
00028   public:
00029     PUMinBiasEvt() : first(0), size(0) {}
00030     unsigned first; 
00031     unsigned size;
00032   };   
00033 
00034 
00035   void addPUParticle( const PUParticle& ptc ) {
00036     PUParticles_.push_back(ptc);
00037   }
00038 
00039   void addPUMinBiasEvt( const PUMinBiasEvt& idx ) {
00040     PUMinBiasEvts_.push_back(idx);
00041   }
00042 
00043   const std::vector<PUEvent::PUParticle>& thePUParticles() 
00044     {return PUParticles_;}
00045 
00046   const std::vector<PUEvent::PUMinBiasEvt>& thePUMinBiasEvts() 
00047     {return PUMinBiasEvts_;}
00048 
00049   unsigned nParticles() const { return PUParticles_.size(); }
00050 
00051   unsigned nMinBias() const { return PUMinBiasEvts_.size(); }
00052 
00053  private:
00054 
00055   std::vector<PUEvent::PUParticle> PUParticles_;
00056   std::vector<PUEvent::PUMinBiasEvt> PUMinBiasEvts_;
00057   
00058 };
00059 
00060 #endif