Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/cascade/cascade/include/G4CollisionOutput.hh

    r1337 r1340  
    2424// ********************************************************************
    2525//
    26 // $Id: G4CollisionOutput.hh,v 1.20.2.1 2010/06/25 09:43:06 gunter Exp $
    27 // Geant4 tag: $Name: geant4-09-04-beta-01 $
     26// $Id: G4CollisionOutput.hh,v 1.29 2010/09/26 04:06:03 mkelsey Exp $
     27// Geant4 tag: $Name: hadr-casc-V09-03-85 $
    2828//
    2929// 20100114  M. Kelsey -- Remove G4CascadeMomentum, use G4LorentzVector directly
     
    3232// 20100418  M. Kelsey -- Add function to boost output lists to lab frame
    3333// 20100520  M. Kelsey -- Add function to rotate Z axis, from G4Casc.Interface
     34// 20100620  M. Kelsey -- Add setVerboseLevel() function
     35// 20100715  M. Kelsey -- Add total charge and baryon number functions, and a
     36//              combined "add()" function to put two of these together.
     37// 20100716  M. Kelsey -- Add interface to handle G4CascadParticles
     38// 20100924  M. Kelsey -- Use "OutgoingNuclei" name consistently, replacing
     39//              old "TargetFragment".  Add new (reusable) G4Fragment buffer
     40//              and access functions for initial post-cascade processing.
     41//              Move implementation of add() to .cc file.
     42// 20100925  M. Kelsey -- Add function to process G4ReactionProduct list
    3443
    3544#ifndef G4COLLISION_OUTPUT_HH
    3645#define G4COLLISION_OUTPUT_HH
    3746
     47#include "G4Fragment.hh"
    3848#include "G4InuclElementaryParticle.hh"
    3949#include "G4InuclNuclei.hh"
    4050#include "G4LorentzRotation.hh"
     51#include "G4ReactionProductVector.hh"
    4152#include <algorithm>
    4253#include <vector>
    4354
     55class G4CascadParticle;
    4456class G4LorentzConvertor;
    4557
     58
    4659class G4CollisionOutput {
    47 
    4860public:
    49 
    5061  G4CollisionOutput();
    51 
    5262  G4CollisionOutput& operator=(const G4CollisionOutput& right);
    5363
    54   void reset();
     64  void setVerboseLevel(G4int verbose) { verboseLevel = verbose; };
     65
     66  // ===== Accumulate contents of lists =====
     67
     68  void reset();         // Empties lists for new event
     69
     70  void add(const G4CollisionOutput& right);     // Merge complete objects
    5571
    5672  void addOutgoingParticle(const G4InuclElementaryParticle& particle) {
     
    6076  void addOutgoingParticles(const std::vector<G4InuclElementaryParticle>& particles);
    6177
    62   void addTargetFragment(const G4InuclNuclei& nuclei) {
    63     nucleiFragments.push_back(nuclei);
     78  void addOutgoingNucleus(const G4InuclNuclei& nuclei) {
     79    outgoingNuclei.push_back(nuclei);
    6480  };
    6581
    66   void addTargetFragments(const std::vector<G4InuclNuclei>& nuclea);
     82  void addOutgoingNuclei(const std::vector<G4InuclNuclei>& nuclea);
    6783
     84  // These are primarily for G4IntraNucleiCascader internal checks
     85  void addOutgoingParticle(const G4CascadParticle& cparticle);
     86  void addOutgoingParticles(const std::vector<G4CascadParticle>& cparticles);
     87
     88  void addOutgoingParticles(const G4ReactionProductVector* rproducts);
     89
     90  // Special buffer for initial, possible unstable fragment from cascade
     91  void addRecoilFragment(const G4Fragment* aFragment) {
     92    if (aFragment) addRecoilFragment(*aFragment);
     93  }
     94
     95  void addRecoilFragment(const G4Fragment& aFragment) {
     96    theRecoilFragment = aFragment;
     97  }
     98
     99  // ===== Access contents of lists =====
     100
     101  G4int numberOfOutgoingParticles() const { return outgoingParticles.size(); }
     102   
    68103  const std::vector<G4InuclElementaryParticle>& getOutgoingParticles() const {
    69104    return outgoingParticles;
    70105  };
    71106
    72   G4int numberOfNucleiFragments() const {
    73     return nucleiFragments.size();
    74   };
     107  G4int numberOfOutgoingNuclei() const { return outgoingNuclei.size(); };
    75108 
    76   const std::vector<G4InuclNuclei>& getNucleiFragments() const {
    77     return nucleiFragments;
     109  const std::vector<G4InuclNuclei>& getOutgoingNuclei() const {
     110    return outgoingNuclei;
    78111  };
    79112
     113  const G4Fragment& getRecoilFragment() const { return theRecoilFragment; }
     114
     115  // ===== Get event totals for conservation checking, recoil, etc. ======
     116
    80117  G4LorentzVector getTotalOutputMomentum() const;
     118  G4int getTotalCharge() const;                 // NOTE:  No fractional charges!
     119  G4int getTotalBaryonNumber() const;
    81120
    82121  void printCollisionOutput() const;
    83122
     123  // ===== Manipulate final-state particles for kinematics =====
     124
    84125  void boostToLabFrame(const G4LorentzConvertor& convertor);
    85 
    86126  void rotateEvent(const G4LorentzRotation& rotate);
    87 
    88   void trivialise(G4InuclParticle* bullet,
    89                   G4InuclParticle* target);
    90 
    91   void setOnShell(G4InuclParticle* bullet,
    92                   G4InuclParticle* target);
    93 
     127  void trivialise(G4InuclParticle* bullet, G4InuclParticle* target);
     128  void setOnShell(G4InuclParticle* bullet, G4InuclParticle* target);
    94129  void setRemainingExitationEnergy();
    95130
    96   double getRemainingExitationEnergy() const {
    97     return eex_rest;
    98   };
    99 
    100   G4bool acceptable() const {
    101     return on_shell;
    102   };
     131  double getRemainingExitationEnergy() const { return eex_rest; };
     132  G4bool acceptable() const { return on_shell; };
    103133
    104134private:
    105135  G4int verboseLevel;
     136
    106137  std::vector<G4InuclElementaryParticle> outgoingParticles;
    107   std::vector<G4InuclNuclei> nucleiFragments;
    108   G4double eex_rest;
     138  std::vector<G4InuclNuclei> outgoingNuclei;
     139  G4Fragment theRecoilFragment;
     140
     141  G4double eex_rest;            // Used by setOnShell() for kinematics
    109142
    110143  std::pair<std::pair<G4int,G4int>, G4int> selectPairToTune(G4double de) const;
    111144
    112145  G4bool on_shell;
    113 
    114146};       
    115147
Note: See TracChangeset for help on using the changeset viewer.