Geant4-11
G4CRCoalescence.hh
Go to the documentation of this file.
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// ClassName: G4CRCoalescence ("CR" stands for "Cosmic Ray")
30//
31// Author: 2020 Alberto Ribon , based on code written by
32// Diego Mauricio Gomez Coral for the GAPS Collaboration
33//
34// Description: This class can be optionally used in the method:
35//
36// G4TheoFSGenerator::ApplyYourself
37//
38// to coalesce pairs of proton-neutron and antiproton-antineutron
39// into deuterons and antideuterons, respectively, from the list
40// of secondaries produced by a string model.
41// This class can be useful in particular for Cosmic Ray (CR)
42// applications.
43// By default, this class is not used.
44// However, it can be enabled via the UI command:
45//
46// /process/had/enableCRCoalescence true
47//
48// It is assumed that the candidate proton-neutron and
49// antiproton-antideuteron pairs originate from the same
50// spatial position, so the condition for coalescence takes
51// into account only their closeness in momentum space.
52//
53// This class is based entirely on code written by
54// Diego Mauricio Gomez Coral for the GAPS Collaboration.
55// The main application of this work is for cosmic ray physics.
56//
57// Notes:
58// - In its current version, coalescence can occur only for
59// proton projectile (because the coalescence parameters
60// for deuteron and antideuteron are set to non-null values
61// only for the case of proton projectile).
62// - This class is not meant be used for secondaries produces
63// by intranuclear cascade models - such as BERT, BIC and
64// INCL - which should have already a coalescence phase.
65//
66// Modified:
67//
68//----------------------------------------------------------------------------
69//
70#ifndef G4CRCoalescence_h
71#define G4CRCoalescence_h 1
72
74#include "G4HadProjectile.hh"
76
78 public:
79
80 explicit G4CRCoalescence();
81 ~G4CRCoalescence() override;
82 G4CRCoalescence( const G4CRCoalescence &right ) = delete;
83 const G4CRCoalescence & operator=( const G4CRCoalescence &right ) = delete;
84 G4bool operator==( const G4CRCoalescence &right ) const = delete;
85 G4bool operator!=( const G4CRCoalescence &right ) const = delete;
86
87 // Set the parameter used in the coalescence condition
88 void SetP0Coalescence( const G4HadProjectile &thePrimary, G4String /* model */ );
89
90 // Main method: form deuterons and antideuterons by coalescence of, respectively,
91 // proton-neutron and antiproton-antineutron pairs with close momenta
93
94 private:
95
96 // Utility methods
97 void PushDeuteron( const G4ThreeVector &p1, const G4ThreeVector &p2, G4int charge,
100 std::vector< std::pair< G4int, G4ThreeVector > > &neutron,
101 G4double m2, G4int charge );
103 const G4ThreeVector &p2, G4double m2, G4int charge );
105 G4double p2x, G4double p2y, G4double p2z, G4double m2, G4int charge );
106 G4double GetPcm( const G4ThreeVector& p1, G4double m1,
107 const G4ThreeVector& p2, G4double m2 );
109 G4double p2x, G4double p2y, G4double p2z, G4double m2 );
110 G4double GetS( G4double p1x, G4double p1y, G4double p1z, G4double m1,
111 G4double p2x, G4double p2y, G4double p2z, G4double m2 );
112
113 G4double fP0_d; // Coalescence parameter for deuterons
114 G4double fP0_dbar; // Coalescence parameter for antideuterons
115
116 G4int secID; // Creator model ID for the secondaries created by this model
117};
118
119#endif
std::vector< G4ReactionProduct * > G4ReactionProductVector
static constexpr double m2
Definition: G4SIunits.hh:110
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4bool operator==(const G4CRCoalescence &right) const =delete
void GenerateDeuterons(G4ReactionProductVector *result)
~G4CRCoalescence() override
G4bool operator!=(const G4CRCoalescence &right) const =delete
G4CRCoalescence(const G4CRCoalescence &right)=delete
G4double GetS(G4double p1x, G4double p1y, G4double p1z, G4double m1, G4double p2x, G4double p2y, G4double p2z, G4double m2)
const G4CRCoalescence & operator=(const G4CRCoalescence &right)=delete
G4bool Coalescence(const G4ThreeVector &p1, G4double m1, const G4ThreeVector &p2, G4double m2, G4int charge)
G4double GetPcm(const G4ThreeVector &p1, G4double m1, const G4ThreeVector &p2, G4double m2)
G4int FindPartner(const G4ThreeVector &p1, G4double m1, std::vector< std::pair< G4int, G4ThreeVector > > &neutron, G4double m2, G4int charge)
void PushDeuteron(const G4ThreeVector &p1, const G4ThreeVector &p2, G4int charge, G4ReactionProductVector *result)
void SetP0Coalescence(const G4HadProjectile &thePrimary, G4String)