Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:40

0001 #ifndef CastorShowerEvent_h
0002 #define CastorShowerEvent_h
0003 
0004 #include "TROOT.h"
0005 #include "Rtypes.h"
0006 #include "TObject.h"
0007 #include "TClass.h"
0008 #include "TDictionary.h"
0009 
0010 #include "DataFormats/Math/interface/Point3D.h"
0011 #include <vector>
0012 #include <string>
0013 
0014 // class CastorShowerEvent {
0015 class CastorShowerEvent : public TObject {
0016 public:
0017   /// point in the space
0018   typedef math::XYZPoint Point;
0019 
0020   CastorShowerEvent();
0021   ~CastorShowerEvent() override;
0022   void Clear(Option_t* option = "") override;
0023 
0024   //  private:
0025 
0026   // Data members
0027   unsigned int nhit;
0028   std::vector<unsigned int> detID;
0029   std::vector<Point> hitPosition;
0030   std::vector<float> nphotons;
0031   std::vector<float> time;
0032   float primaryEnergy;
0033   float primEta, primPhi;
0034   float primX, primY, primZ;
0035 
0036   // Setters
0037   void setNhit(unsigned int i) { nhit = i; };
0038   void setDetID(unsigned int id) { detID.push_back(id); };
0039   void setHitPosition(const Point& p) { hitPosition.push_back(p); };
0040   void setNphotons(float np) { nphotons.push_back(np); };
0041   void setTime(float t) { time.push_back(t); };
0042   void setPrimE(float e) { primaryEnergy = e; };
0043   void setPrimEta(float eta) { primEta = eta; };
0044   void setPrimPhi(float phi) { primPhi = phi; };
0045   void setPrimX(float x) { primX = x; };
0046   void setPrimY(float y) { primY = y; };
0047   void setPrimZ(float z) { primZ = z; };
0048 
0049   // Accessors
0050   unsigned int getNhit() { return nhit; };
0051   unsigned int getDetID(int i) { return detID[i]; };
0052   Point getHitPosition(int i) { return hitPosition[i]; };
0053   float getNphotons(int i) { return nphotons[i]; };
0054   float getTime(int i) { return time[i]; };
0055   float getPrimE() { return primaryEnergy; };
0056   float getPrimEta() { return primEta; };
0057   float getPrimPhi() const { return primPhi; };
0058   float getPrimX() { return primX; };
0059   float getPrimY() { return primY; };
0060   float getPrimZ() { return primZ; };
0061 
0062   ClassDefOverride(CastorShowerEvent, 2)
0063 };
0064 
0065 #endif