G4CollisionInitialState.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4CollisionInitialState.hh 69856 2013-05-16 13:32:36Z gcosmo $
00028 // GEANT4 tag $Name: not supported by cvs2svn $
00029 //
00030 // $Id: G4CollisionInitialState.hh,v 1.0 1998/06/30
00031 // -----------------------------------------------------------------------------
00032 //      GEANT 4 class header file
00033 //
00034 //      History: first implementation, A. Feliciello, 30th June 1998
00035 
00036 // -----------------------------------------------------------------------------
00037 
00038 #ifndef G4CollisionInitialState_hh
00039 #define G4CollisionInitialState_hh
00040 
00041 #include "G4KineticTrack.hh"
00042 #include "G4KineticTrackVector.hh"
00043 #include "G4HadTmpUtil.hh"
00044 
00045 class G4BCAction;
00046 
00047 class G4CollisionInitialState
00048 {
00049 
00050 public:
00051   G4CollisionInitialState();
00052   G4CollisionInitialState(G4double time, G4KineticTrack * aPrimary,
00053                           G4KineticTrack * aTarget);
00054   G4CollisionInitialState(G4double time, G4KineticTrack * aPrimary,
00055                           const G4KineticTrackVector & aTarget,
00056                           G4BCAction * aFSGenerator);
00057 
00058   ~G4CollisionInitialState() { }
00059 
00060   G4CollisionInitialState(const G4CollisionInitialState & right);
00061   G4CollisionInitialState & operator=(const G4CollisionInitialState & right);
00062 
00063   int operator<(const G4CollisionInitialState & right) const
00064     {return (theCollisionTime < right.theCollisionTime);}
00065 
00066   int operator==(const G4CollisionInitialState& right) const
00067     {return (theCollisionTime == right.theCollisionTime);}
00068 
00069 
00070   G4KineticTrack * GetPrimary(void)
00071     {return thePrimary;}
00072   void SetPrimary(G4KineticTrack * aPrimary)
00073     {thePrimary = aPrimary;}
00074 
00075   G4KineticTrack * GetTarget(void)
00076     {return theTarget;}
00077   void SetTarget(G4KineticTrack * aTarget)
00078     {theTarget = aTarget;}
00079 
00080   void AddTarget(G4KineticTrack * aTarget)
00081     {theTs.push_back(aTarget);}
00082   G4KineticTrackVector  & GetTargetCollection(void)
00083     {return theTs;}
00084   G4KineticTrackVector * GetFinalState();
00085   G4int GetTargetBaryonNumber()
00086   {
00087     G4double result=0;
00088     for(size_t i=0; i<theTs.size(); i++)
00089     {
00090       result += theTs[i]->GetDefinition()->GetBaryonNumber();
00091     }
00092     return G4lrint(result);
00093   }
00094   G4int GetTargetCharge()
00095   {
00096     G4double result=0;
00097     for(size_t i=0; i<theTs.size(); i++)
00098     {
00099       result += theTs[i]->GetDefinition()->GetPDGCharge();
00100     }
00101     return G4lrint(result);
00102   }
00103 
00104 // -new interface post pion:
00105 
00106   G4double GetCollisionTime(void)
00107     {return theCollisionTime;}
00108   void SetCollisionTime(G4double value)
00109     {theCollisionTime = value;}
00110 
00111 // for debugging only
00112   G4BCAction * GetGenerator()
00113   {
00114     return theFSGenerator;
00115   }
00116 
00117 
00118   void Print() const;
00119 
00120 //  friend std::ostream& operator<<(std::ostream & out, const G4CollisionInitialState & collision){
00121 //  out=1;
00122 //  return out;
00123 //  }
00124 
00125 
00126 private:
00127 
00128   G4double theCollisionTime;
00129   G4KineticTrack * thePrimary;
00130   G4KineticTrack * theTarget;
00131   G4KineticTrackVector theTs;
00132   G4BCAction * theFSGenerator;
00133 };
00134 
00135 #endif
00136 
00137 

Generated on Mon May 27 17:47:54 2013 for Geant4 by  doxygen 1.4.7