CMS 3D CMS Logo

ParticleFlux.h
Go to the documentation of this file.
1 #ifndef SimDataFormatsCaloTestParticleFlux_h
2 #define SimDataFormatsCaloTestParticleFlux_h
3 
4 #include <string>
5 #include <vector>
6 #include <memory>
7 
10 
11 class ParticleFlux {
12 public:
13  ParticleFlux(std::string name = "", int id = 0) : detName_(name), detId_(id) {}
14  virtual ~ParticleFlux() {}
15 
16  struct flux {
17  int pdgId, vxType;
18  float tof;
21  flux(int id = 0, int typ = 0, float t = 0) : pdgId(id), vxType(typ), tof(t) {}
22  };
23 
24  std::string const& getName() const { return detName_; }
25  int getId() const { return detId_; }
26  unsigned int getComponents() const { return fluxVector_.size(); }
27  std::vector<ParticleFlux::flux> getFlux() const& { return fluxVector_; }
28  void setName(const std::string nm) { detName_ = nm; }
29  void setId(const int id) { detId_ = id; }
30  void addFlux(const ParticleFlux::flux f);
31  void clear();
32 
33 private:
35  int detId_;
36  std::vector<flux> fluxVector_;
37 };
38 
39 #endif
unsigned int getComponents() const
Definition: ParticleFlux.h:26
virtual ~ParticleFlux()
Definition: ParticleFlux.h:14
flux(int id=0, int typ=0, float t=0)
Definition: ParticleFlux.h:21
void setId(const int id)
Definition: ParticleFlux.h:29
void addFlux(const ParticleFlux::flux f)
Definition: ParticleFlux.cc:3
std::string const & getName() const
Definition: ParticleFlux.h:24
math::GlobalVector momentum
Definition: ParticleFlux.h:20
math::GlobalPoint vertex
Definition: ParticleFlux.h:19
ParticleFlux(std::string name="", int id=0)
Definition: ParticleFlux.h:13
double f[11][100]
std::string detName_
Definition: ParticleFlux.h:34
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:28
void setName(const std::string nm)
Definition: ParticleFlux.h:28
math::GlobalPoint hitPoint
Definition: ParticleFlux.h:19
std::vector< ParticleFlux::flux > getFlux() const &
Definition: ParticleFlux.h:27
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
std::vector< flux > fluxVector_
Definition: ParticleFlux.h:36
void clear()
Definition: ParticleFlux.cc:5
int getId() const
Definition: ParticleFlux.h:25