Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:27

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // File: CaloG4Hit.h
0003 // Date: 10.02 Taken from CMSCaloHit
0004 //
0005 // Hit class for Calorimeters (Ecal, Hcal, ...)
0006 //
0007 // One Hit object should be created
0008 // -for each new particle entering the calorimeter
0009 // -for each detector unit (= cristal or fiber or scintillator layer)
0010 // -for each nanosecond of the shower development
0011 //
0012 // This implies that all hit objects created for a given shower
0013 // have the same value for
0014 // - Entry (= local coordinates of the entrance point of the particle
0015 //            in the unit where the shower starts)
0016 // - the TrackID (= Identification number of the incident particle)
0017 // - the IncidentEnergy (= energy of that particle)
0018 //
0019 // Modified:
0020 //
0021 ///////////////////////////////////////////////////////////////////////////////
0022 #ifndef PPS_TotemRPG4Hit_h
0023 #define PPS_TotemRPG4Hit_h 1
0024 
0025 #include "G4VHit.hh"
0026 #include "G4ThreeVector.hh"
0027 #include "DataFormats/Math/interface/Point3D.h"
0028 #include <iostream>
0029 
0030 class TotemRPG4Hit : public G4VHit {
0031 public:
0032   TotemRPG4Hit();
0033   ~TotemRPG4Hit() override = default;
0034   TotemRPG4Hit(const TotemRPG4Hit &right);
0035   const TotemRPG4Hit &operator=(const TotemRPG4Hit &right);
0036   int operator==(const TotemRPG4Hit &) { return 0; }
0037 
0038   void Draw() override {}
0039   void Print() override;
0040 
0041 public:
0042   G4ThreeVector entry() const;
0043   void setEntry(G4ThreeVector xyz);
0044   G4ThreeVector exit() const;
0045   void setExit(G4ThreeVector xyz);
0046 
0047   void setLocalEntry(const G4ThreeVector &theLocalEntryPoint);
0048   void setLocalExit(const G4ThreeVector &theLocalExitPoint);
0049   G4ThreeVector localEntry() const;
0050   G4ThreeVector localExit() const;
0051 
0052   double incidentEnergy() const;
0053   void setIncidentEnergy(double e);
0054 
0055   unsigned int trackID() const;
0056   void setTrackID(int i);
0057 
0058   int unitID() const;
0059   void setUnitID(unsigned int i);
0060 
0061   double timeSlice() const;
0062   void setTimeSlice(double d);
0063   int timeSliceID() const;
0064 
0065   double p() const;
0066   double tof() const;
0067   double energyLoss() const;
0068   int particleType() const;
0069 
0070   void setP(double e);
0071   void setTof(double e);
0072   void setEnergyLoss(double e);
0073   void setParticleType(short i);
0074 
0075   void addEnergyLoss(double e);
0076 
0077   double thetaAtEntry() const;
0078   double phiAtEntry() const;
0079 
0080   void setThetaAtEntry(double t);
0081   void setPhiAtEntry(double f);
0082 
0083   double x() const;
0084   void setX(double t);
0085   double y() const;
0086   double z() const;
0087   void setY(double t);
0088   void setZ(double t);
0089 
0090   int parentId() const;
0091   double vx() const;
0092   double vy() const;
0093   double vz() const;
0094 
0095   void setParentId(int p);
0096   void setVx(double p);
0097   void setVy(double p);
0098   void setVz(double p);
0099 
0100   void setPx(double p);
0101   void setPy(double p);
0102   void setPz(double p);
0103 
0104   double px() const;
0105   double py() const;
0106   double pz() const;
0107 
0108 private:
0109   G4ThreeVector entry_;        //Entry point
0110   G4ThreeVector exit_;         //Exit point
0111   G4ThreeVector local_entry_;  //local entry point
0112   G4ThreeVector local_exit_;   //local exit point
0113   double theIncidentEnergy_;   //Energy of the primary particle
0114   int theTrackID_;             //Identification number of the primary
0115                                //particle
0116   uint32_t theUnitID_;         //Totem Unit Number
0117   double theTimeSlice_;        //Time Slice Identification
0118 
0119   double theX_;
0120   double theY_;
0121   double theZ_;
0122   double thePabs_;
0123   double theTof_;
0124   double theEnergyLoss_;
0125   int theParticleType_;
0126 
0127   double theThetaAtEntry_;
0128   double thePhiAtEntry_;
0129   G4ThreeVector theEntryPoint_;
0130   G4ThreeVector theExitPoint_;
0131 
0132   int theParentId_;
0133   double theVx_;
0134   double theVy_;
0135   double theVz_;
0136 
0137   double thePx_, thePy_, thePz_;
0138 };
0139 
0140 std::ostream &operator<<(std::ostream &, const TotemRPG4Hit &);
0141 
0142 #endif  //PPS_TotemRPG4Hit_h