Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:48

0001 #ifndef SimDataFormatsCaloTestParticleFlux_h
0002 #define SimDataFormatsCaloTestParticleFlux_h
0003 
0004 #include <string>
0005 #include <vector>
0006 #include <memory>
0007 
0008 #include "DataFormats/Math/interface/Point3D.h"
0009 #include "DataFormats/Math/interface/Vector3D.h"
0010 
0011 class ParticleFlux {
0012 public:
0013   ParticleFlux(std::string name = "", int id = 0) : detName_(name), detId_(id) {}
0014   virtual ~ParticleFlux() {}
0015 
0016   struct flux {
0017     int pdgId, vxType;
0018     float tof;
0019     math::GlobalPoint vertex, hitPoint;
0020     math::GlobalVector momentum;
0021     flux(int id = 0, int typ = 0, float t = 0) : pdgId(id), vxType(typ), tof(t) {}
0022   };
0023 
0024   std::string const& getName() const { return detName_; }
0025   int getId() const { return detId_; }
0026   unsigned int getComponents() const { return fluxVector_.size(); }
0027   std::vector<ParticleFlux::flux> getFlux() const& { return fluxVector_; }
0028   void setName(const std::string nm) { detName_ = nm; }
0029   void setId(const int id) { detId_ = id; }
0030   void addFlux(const ParticleFlux::flux f);
0031   void clear();
0032 
0033 private:
0034   std::string detName_;
0035   int detId_;
0036   std::vector<flux> fluxVector_;
0037 };
0038 
0039 #endif