Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:10

0001 #ifndef _PPS_PixelG4Hit_h
0002 #define _PPS_PixelG4Hit_h 1
0003 // -*- C++ -*-
0004 //
0005 // Package:     PPS
0006 // Class  :     PPSPixelG4Hit
0007 //
0008 /**\class PPSPixelG4Hit PPSPixelG4Hit.h SimG4CMS/PPS/interface/PPSPixelG4Hit.h
0009  
0010  Description: Transient Hit class for PPS 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 "G4ThreeVector.hh"
0036 #include <iostream>
0037 
0038 class PPSPixelG4Hit : public G4VHit {
0039 public:
0040   // ---------- Constructor and destructor -----------------
0041   PPSPixelG4Hit();
0042   ~PPSPixelG4Hit() override = default;
0043   PPSPixelG4Hit(const PPSPixelG4Hit& right);
0044 
0045   // ---------- operators ----------------------------------
0046   const PPSPixelG4Hit& operator=(const PPSPixelG4Hit& right);
0047   int operator==(const PPSPixelG4Hit&) { return 0; }
0048 
0049   // ---------- member functions ---------------------------
0050   void Draw() override {}
0051   void Print() override;
0052 
0053   const G4ThreeVector& meanPosition() const { return MeanPosition_; };
0054   void setMeanPosition(const G4ThreeVector& a) { MeanPosition_ = a; };
0055 
0056   const G4ThreeVector& entryPoint() const;
0057   void setEntryPoint(const G4ThreeVector&);
0058   const G4ThreeVector& exitPoint() const;
0059   void setExitPoint(const G4ThreeVector&);
0060 
0061   double eM() const;
0062   void setEM(double e);
0063 
0064   double hadr() const;
0065   void setHadr(double e);
0066 
0067   double incidentEnergy() const;
0068   void setIncidentEnergy(double e);
0069 
0070   int trackID() const;
0071   void setTrackID(int i);
0072 
0073   uint32_t unitID() const;
0074   void setUnitID(uint32_t i);
0075 
0076   double timeSlice() const;
0077   void setTimeSlice(double d);
0078   int timeSliceID() const;
0079 
0080   void addEnergyDeposit(double em, double hd);
0081   void addEnergyDeposit(const PPSPixelG4Hit& aHit);
0082 
0083   double energyDeposit() const;
0084 
0085   float p() const;
0086   float tof() const;
0087   float energyLoss() const;
0088   int particleType() const;
0089 
0090   void setP(float e);
0091   void setTof(float e);
0092   void setEnergyLoss(float e);
0093   void setParticleType(short i);
0094 
0095   float thetaAtEntry() const;
0096   float phiAtEntry() const;
0097 
0098   void setThetaAtEntry(float t);
0099   void setPhiAtEntry(float f);
0100   float px() const;
0101   float py() const;
0102   float pz() const;
0103   float vPx() const;
0104   float vPy() const;
0105   float vPz() const;
0106 
0107   void setPx(float e);
0108   void setPy(float e);
0109   void setPz(float e);
0110   void setVPx(float e);
0111   void setVPy(float e);
0112   void setVPz(float e);
0113   float x() const;
0114   float y() const;
0115   float z() const;
0116   void setX(float t);
0117   void setY(float t);
0118   void setZ(float t);
0119 
0120   int parentId() const;
0121   float vx() const;
0122   float vy() const;
0123   float vz() const;
0124 
0125   void setParentId(int p);
0126   void setVx(float p);
0127   void setVy(float p);
0128   void setVz(float p);
0129 
0130 private:
0131   G4ThreeVector MeanPosition_;
0132   double elem_;               //EnergyDeposit of EM particles
0133   double hadr_;               //EnergyDeposit of HD particles
0134   double theIncidentEnergy_;  //Energy of the primary particle
0135   int theTrackID_;            //Identification number of the primary
0136                               //particle
0137   uint32_t theUnitID_;        //PPS Unit Number
0138   double theTimeSlice_;       //Time Slice Identification
0139 
0140   float theX_;
0141   float theY_;
0142   float theZ_;
0143   float thePabs_;
0144   float theTof_;
0145   float theEnergyLoss_;
0146   int theParticleType_;
0147 
0148   float theThetaAtEntry_;
0149   float thePhiAtEntry_;
0150   G4ThreeVector theEntryPoint_;
0151   G4ThreeVector theExitPoint_;
0152   float thePx_, thePy_, thePz_, theVPx_, theVPy_, theVPz_;
0153   int theParentId_;
0154   float theVx_;
0155   float theVy_;
0156   float theVz_;
0157 };
0158 
0159 std::ostream& operator<<(std::ostream&, const PPSPixelG4Hit&);
0160 
0161 #endif