Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:12

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MAIN_PHG4USERPRIMARYPARTICLEINFORMATION_H
0004 #define G4MAIN_PHG4USERPRIMARYPARTICLEINFORMATION_H
0005 
0006 #include <Geant4/G4VUserPrimaryParticleInformation.hh>
0007 #include <iostream>
0008 
0009 class PHG4UserPrimaryParticleInformation : public G4VUserPrimaryParticleInformation
0010 {
0011  public:
0012   PHG4UserPrimaryParticleInformation(const int emb)
0013     : embed(emb)
0014     , usertrackid(0)
0015     , uservtxid(0)
0016     , barcode(-1)
0017   {
0018   }
0019 
0020   void Print() const override
0021   {
0022     std::cout << "Embedding = " << embed << std::endl;
0023     std::cout << "User Track ID = " << usertrackid << std::endl;
0024     std::cout << "User Vertex ID = " << uservtxid << std::endl;
0025   }
0026   int get_embed() const { return embed; }
0027 
0028   void set_user_track_id(int val) { usertrackid = val; }
0029   int get_user_track_id() const { return usertrackid; }
0030 
0031   void set_user_vtx_id(int val) { uservtxid = val; }
0032   int get_user_vtx_id() const { return uservtxid; }
0033 
0034   void set_user_barcode(int bcd) { barcode = bcd; }
0035   int get_user_barcode() const { return barcode; }
0036 
0037  private:
0038   int embed;
0039   int usertrackid;
0040   int uservtxid;
0041   int barcode;
0042 };
0043 
0044 #endif