CMS 3D CMS Logo

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() : NParticles_(0), NInteractions_(0) {}
00011   virtual ~NUEvent() {}
00012   void reset() {
00013     NUParticles_.clear();
00014     NUInteractions_.clear();
00015     NParticles_ = 0;
00016     NInteractions_ = 0;  
00017   }
00018 
00019   class NUParticle {
00020   public:
00021     NUParticle() : px(0.), py(0.), pz(0.),mass(0.),id(0) {}
00022     virtual ~NUParticle() {}
00023     float px; 
00024     float py;
00025     float pz;
00026     float mass;
00027     int id;
00028   };   
00029 
00030 
00031   class NUInteraction {
00032   public:
00033     NUInteraction() : first(0), last(0) {}
00034     virtual ~NUInteraction() {}
00035     unsigned first; 
00036     unsigned last;
00037   };   
00038 
00039 
00040   void addNUParticle( const NUParticle& ptc ) {
00041     NUParticles_.push_back(ptc);
00042     ++NParticles_;
00043   }
00044 
00045   void addNUInteraction( const NUInteraction& idx ) {
00046     NUInteractions_.push_back(idx);
00047     ++NInteractions_;
00048   }
00049 
00050   const std::vector<NUEvent::NUParticle>& theNUParticles() 
00051     {return NUParticles_;}
00052 
00053   const std::vector<NUEvent::NUInteraction>& theNUInteractions() 
00054     {return NUInteractions_;}
00055 
00056   const unsigned nParticles() const { return NParticles_; }
00057 
00058   const unsigned nInteractions() const { return NInteractions_; }
00059 
00060  private:
00061 
00062   std::vector<NUEvent::NUParticle> NUParticles_;
00063   std::vector<NUEvent::NUInteraction> NUInteractions_;
00064   unsigned NParticles_;
00065   unsigned NInteractions_;
00066   
00067 };
00068 
00069 #endif

Generated on Tue Jun 9 17:35:00 2009 for CMSSW by  doxygen 1.5.4