Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // File: BscG4Hit.h
0003 // Date: 02.2006
0004 //
0005 // Package:     Bsc
0006 // Class  :     BscG4Hit
0007 //
0008 ///////////////////////////////////////////////////////////////////////////////
0009 #ifndef BscG4Hit_h
0010 #define BscG4Hit_h
0011 
0012 #include "G4VHit.hh"
0013 #include "G4ThreeVector.hh"
0014 #include <cstdint>
0015 #include <iostream>
0016 
0017 class BscG4Hit : public G4VHit {
0018 public:
0019   BscG4Hit();
0020   ~BscG4Hit() override;
0021   BscG4Hit(const BscG4Hit& right);
0022   const BscG4Hit& operator=(const BscG4Hit& right);
0023   int operator==(const BscG4Hit&) { return 0; }
0024 
0025   void Draw() override {}
0026   void Print() override;
0027 
0028 public:
0029   const G4ThreeVector& getEntry() const { return entry; };
0030   void setEntry(const G4ThreeVector& xyz);
0031 
0032   const G4ThreeVector& getEntryLocalP() const { return entrylp; };
0033   void setEntryLocalP(const G4ThreeVector& xyz) { entrylp = xyz; };
0034 
0035   const G4ThreeVector& getExitLocalP() const { return exitlp; };
0036   void setExitLocalP(const G4ThreeVector& xyz) { exitlp = xyz; };
0037 
0038   float getEM() const { return elem; };
0039   void setEM(float e) {
0040     elem = e;
0041     theEnergyLoss = elem + hadr;
0042   };
0043 
0044   float getHadr() const { return hadr; };
0045   void setHadr(float e) {
0046     hadr = e;
0047     theEnergyLoss = elem + hadr;
0048   };
0049 
0050   float getIncidentEnergy() const { return theIncidentEnergy; };
0051   void setIncidentEnergy(float e) { theIncidentEnergy = e; };
0052 
0053   int getTrackID() const { return theTrackID; };
0054   void setTrackID(int id) { theTrackID = id; };
0055 
0056   uint32_t getUnitID() const { return theUnitID; };
0057   void setUnitID(uint32_t id) { theUnitID = id; };
0058 
0059   double getTimeSlice() const { return theTimeSlice; };
0060   void setTimeSlice(double d) { theTimeSlice = d; };
0061   int getTimeSliceID() const { return (int)theTimeSlice; };
0062   void addEnergyDeposit(float em, float hd);
0063   void addEnergyDeposit(const BscG4Hit& aHit);
0064 
0065   float getEnergyDeposit() const { return theEnergyLoss; };
0066 
0067   float getPabs() const { return thePabs; };
0068   float getTof() const { return theTof; };
0069   float getEnergyLoss() const { return theEnergyLoss; };
0070   int getParticleType() const { return theParticleType; };
0071 
0072   void setPabs(float e) { thePabs = e; };
0073   void setTof(float e) { theTof = e; };
0074   void setEnergyLoss(float e) { theEnergyLoss = e; };
0075   void setParticleType(int i) { theParticleType = i; };
0076 
0077   float getThetaAtEntry() const { return theThetaAtEntry; };
0078   float getPhiAtEntry() const { return thePhiAtEntry; };
0079 
0080   void setThetaAtEntry(float t) { theThetaAtEntry = t; };
0081   void setPhiAtEntry(float f) { thePhiAtEntry = f; };
0082 
0083   float getX() const { return theX; };
0084   void setX(float t) { theX = t; };
0085   float getY() const { return theY; };
0086   float getZ() const { return theZ; };
0087   void setY(float t) { theY = t; };
0088   void setZ(float t) { theZ = t; };
0089 
0090   void setHitPosition(const G4ThreeVector&);
0091   void setVertexPosition(const G4ThreeVector&);
0092 
0093   int getParentId() const { return theParentId; };
0094   int getProcessId() const { return theProcessId; };
0095   float getVx() const { return theVx; };
0096   float getVy() const { return theVy; };
0097   float getVz() const { return theVz; };
0098 
0099   void setParentId(int p) { theParentId = p; };
0100   void setProcessId(int p) { theProcessId = p; };
0101   void setVx(float p) { theVx = p; };
0102   void setVy(float p) { theVy = p; };
0103   void setVz(float p) { theVz = p; };
0104 
0105 private:
0106   G4ThreeVector entry;      //Entry point
0107   G4ThreeVector entrylp;    //Entry  local point
0108   G4ThreeVector exitlp;     //Exit  local point
0109   float elem;               //EnergyDeposit of EM particles
0110   float hadr;               //EnergyDeposit of HD particles
0111   float theIncidentEnergy;  //Energy of the primary particle
0112   int theTrackID;           //Geant4 track ID
0113   double theTimeSlice;      //Time Slice Identification
0114 
0115   int theUnitID;  // Unit Number
0116 
0117   float theX;
0118   float theY;
0119   float theZ;
0120   float thePabs;
0121   float theTof;
0122   float theEnergyLoss;
0123   int theParticleType;
0124 
0125   float theThetaAtEntry;
0126   float thePhiAtEntry;
0127 
0128   int theParentId;
0129   int theProcessId;
0130   float theVx;
0131   float theVy;
0132   float theVz;
0133 };
0134 
0135 std::ostream& operator<<(std::ostream&, const BscG4Hit&);
0136 
0137 #endif