Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef Forward_TotemG4Hit_h
0002 #define Forward_TotemG4Hit_h 1
0003 // -*- C++ -*-
0004 //
0005 // Package:     Forward
0006 // Class  :     TotemG4Hit
0007 //
0008 /**\class TotemG4Hit TotemG4Hit.h SimG4CMS/Forward/interface/TotemG4Hit.h
0009  
0010  Description: Transient Hit class for Totem taken from those for Calorimeters
0011  
0012  Usage: One Hit object should be created
0013    -for each new particle entering the calorimeter
0014    -for each detector unit (= cristal or fiber or scintillator layer)
0015    -for each nanosecond of the shower development
0016 
0017    This implies that all hit objects created for a given shower
0018    have the same value for
0019    - Entry (= local coordinates of the entrance point of the particle
0020               in the unit where the shower starts) 
0021    - the TrackID (= Identification number of the incident particle)
0022    - the IncidentEnergy (= energy of that particle)
0023  
0024 */
0025 //
0026 // Original Author:
0027 //         Created:  Tue May 16 10:14:34 CEST 2006
0028 //
0029 
0030 // system include files
0031 
0032 // user include files
0033 
0034 #include "G4VHit.hh"
0035 #include "DataFormats/Math/interface/Point3D.h"
0036 #include <cstdint>
0037 #include <iostream>
0038 
0039 class TotemG4Hit : public G4VHit {
0040 public:
0041   // ---------- Constructor and destructor -----------------
0042   TotemG4Hit();
0043   ~TotemG4Hit() override;
0044   TotemG4Hit(const TotemG4Hit& right);
0045 
0046   // ---------- operators ----------------------------------
0047   const TotemG4Hit& operator=(const TotemG4Hit& right);
0048   int operator==(const TotemG4Hit&) { return 0; }
0049 
0050   // ---------- member functions ---------------------------
0051   void Draw() override {}
0052   void Print() override;
0053 
0054   math::XYZPoint getEntry() const;
0055   void setEntry(double x, double y, double z) { entry.SetCoordinates(x, y, z); }
0056 
0057   double getEM() const;
0058   void setEM(double e);
0059 
0060   double getHadr() const;
0061   void setHadr(double e);
0062 
0063   double getIncidentEnergy() const;
0064   void setIncidentEnergy(double e);
0065 
0066   int getTrackID() const;
0067   void setTrackID(int i);
0068 
0069   uint32_t getUnitID() const;
0070   void setUnitID(uint32_t i);
0071 
0072   double getTimeSlice() const;
0073   void setTimeSlice(double d);
0074   int getTimeSliceID() const;
0075 
0076   void addEnergyDeposit(double em, double hd);
0077   void addEnergyDeposit(const TotemG4Hit& aHit);
0078 
0079   double getEnergyDeposit() const;
0080 
0081   float getPabs() const;
0082   float getTof() const;
0083   float getEnergyLoss() const;
0084   int getParticleType() const;
0085 
0086   void setPabs(float e);
0087   void setTof(float e);
0088   void setEnergyLoss(float e);
0089   void setParticleType(short i);
0090 
0091   float getThetaAtEntry() const;
0092   float getPhiAtEntry() const;
0093 
0094   void setThetaAtEntry(float t);
0095   void setPhiAtEntry(float f);
0096 
0097   float getX() const;
0098   float getY() const;
0099   float getZ() const;
0100   void setX(float t);
0101   void setY(float t);
0102   void setZ(float t);
0103 
0104   int getParentId() const;
0105   float getVx() const;
0106   float getVy() const;
0107   float getVz() const;
0108 
0109   void setParentId(int p);
0110   void setVx(float p);
0111   void setVy(float p);
0112   void setVz(float p);
0113 
0114 private:
0115   math::XYZPoint entry;      //Entry point
0116   double elem;               //EnergyDeposit of EM particles
0117   double hadr;               //EnergyDeposit of HD particles
0118   double theIncidentEnergy;  //Energy of the primary particle
0119   int theTrackID;            //Identification number of the primary
0120                              //particle
0121   uint32_t theUnitID;        //Totem Unit Number
0122   double theTimeSlice;       //Time Slice Identification
0123 
0124   float theX;
0125   float theY;
0126   float theZ;
0127   float thePabs;
0128   float theTof;
0129   float theEnergyLoss;
0130   int theParticleType;
0131 
0132   float theThetaAtEntry;
0133   float thePhiAtEntry;
0134   math::XYZPoint theEntryPoint;
0135   math::XYZPoint theExitPoint;
0136 
0137   int theParentId;
0138   float theVx;
0139   float theVy;
0140   float theVz;
0141 };
0142 
0143 std::ostream& operator<<(std::ostream&, const TotemG4Hit&);
0144 
0145 #endif