CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/FastSimDataFormats/NuclearInteractions/interface/NUEvent.h

Go to the documentation of this file.
00001 #ifndef FastSimulation_MaterialEffects_NUEvent_h
00002 #define FastSimulation_MaterialEffects_NUEvent_h
00003 
00004 #include <vector>
00005 
00006 class NUEvent {
00007   
00008   
00009  public:
00010   NUEvent() {}
00011   void reset() {
00012     NUParticles_.clear();
00013     NUInteractions_.clear();
00014   }
00015 
00016   class NUParticle {
00017   public:
00018     NUParticle() : 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 NUInteraction {
00028   public:
00029     NUInteraction() : first(0), last(0) {}
00030     unsigned first; 
00031     unsigned last;
00032   };   
00033 
00034 
00035   void addNUParticle( const NUParticle& ptc ) {
00036     NUParticles_.push_back(ptc);
00037   }
00038 
00039   void addNUInteraction( const NUInteraction& idx ) {
00040     NUInteractions_.push_back(idx);
00041   }
00042 
00043   const std::vector<NUEvent::NUParticle>& theNUParticles() 
00044     {return NUParticles_;}
00045 
00046   const std::vector<NUEvent::NUInteraction>& theNUInteractions() 
00047     {return NUInteractions_;}
00048 
00049   unsigned nParticles() const { return NUParticles_.size(); }
00050 
00051   unsigned nInteractions() const { return NUInteractions_.size(); }
00052 
00053  private:
00054 
00055   std::vector<NUEvent::NUParticle> NUParticles_;
00056   std::vector<NUEvent::NUInteraction> NUInteractions_;
00057   
00058 };
00059 
00060 #endif