ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4CollisionInitialState.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4CollisionInitialState.hh
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 //
28 // -----------------------------------------------------------------------------
29 // GEANT 4 class header file
30 //
31 // History: first implementation, A. Feliciello, 30th June 1998
32 
33 // -----------------------------------------------------------------------------
34 
35 #ifndef G4CollisionInitialState_hh
36 #define G4CollisionInitialState_hh
37 
38 #include "G4KineticTrack.hh"
39 #include "G4KineticTrackVector.hh"
40 #include "G4HadTmpUtil.hh"
41 
42 class G4BCAction;
43 
45 {
46 
47 public:
50  G4KineticTrack * aTarget);
52  const G4KineticTrackVector & aTarget,
53  G4BCAction * aFSGenerator);
54 
56 
59 
61  {return (theCollisionTime < right.theCollisionTime);}
62 
64  {return (theCollisionTime == right.theCollisionTime);}
65 
66 
68  {return thePrimary;}
69  void SetPrimary(G4KineticTrack * aPrimary)
70  {thePrimary = aPrimary;}
71 
73  {return theTarget;}
74  void SetTarget(G4KineticTrack * aTarget)
75  {theTarget = aTarget;}
76 
77  void AddTarget(G4KineticTrack * aTarget)
78  {theTs.push_back(aTarget);}
80  {return theTs;}
83  {
84  G4double result=0;
85  for(size_t i=0; i<theTs.size(); i++)
86  {
87  result += theTs[i]->GetDefinition()->GetBaryonNumber();
88  }
89  return G4lrint(result);
90  }
92  {
93  G4double result=0;
94  for(size_t i=0; i<theTs.size(); i++)
95  {
96  result += theTs[i]->GetDefinition()->GetPDGCharge();
97  }
98  return G4lrint(result);
99  }
100 
101 // -new interface post pion:
102 
104  {return theCollisionTime;}
107 
108 // for debugging only
110  {
111  return theFSGenerator;
112  }
113 
114 
115  void Print() const;
116 
117 // friend std::ostream& operator<<(std::ostream & out, const G4CollisionInitialState & collision){
118 // out=1;
119 // return out;
120 // }
121 
122 
123 private:
124 
130 };
131 
132 #endif
133 
134