ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4PolarizedGammaConversionModel.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4PolarizedGammaConversionModel.cc
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 // GEANT4 Class file
30 //
31 //
32 // File name: G4PolarizedGammaConversionModel
33 //
34 // Author: Karim Laihem
35 //
36 // Creation date: 19.04.2005
37 //
38 // Modifications:
39 // 21-08-06 Modified to fit in g4.8.1 framework (A.Schaelicke)
40 // 19-03-07 Add initialisation of crossSectionCalculator (VI)
41 //
42 // Class Description:
43 //
44 // Implementation of gamma convertion to e+e- in the field of a nucleus
45 // including polarization transfer
46 
47 // -------------------------------------------------------------------
48 //
49 
50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
52 
54 #include "G4Electron.hh"
55 #include "G4Positron.hh"
56 #include "G4Gamma.hh"
57 #include "Randomize.hh"
58 #include "G4DataVector.hh"
59 #include "G4PhysicsLogVector.hh"
62 #include "G4PolarizationHelper.hh"
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
65 
66 
68  const G4String& nam)
69  : G4BetheHeitlerModel(pd,nam), crossSectionCalculator(nullptr)
70 {
71 }
72 
73 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
74 
76 {
78 }
79 
80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
81 
83  const G4DataVector& dv)
84 {
88 }
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
92 void G4PolarizedGammaConversionModel::SampleSecondaries(std::vector<G4DynamicParticle*>* vdp,
93  const G4MaterialCutsCouple* couple,
94  const G4DynamicParticle* dp,
95  G4double tmin,
96  G4double maxEnergy)
97 {
98  G4BetheHeitlerModel::SampleSecondaries(vdp, couple, dp, tmin, maxEnergy);
99 
100  if(vdp && vdp->size()>0) {
101  G4double gamEnergy0 = dp->GetKineticEnergy();
102  G4double lepEnergy1 = (*vdp)[0]->GetKineticEnergy();
103  G4double sintheta = dp->GetMomentumDirection().cross((*vdp)[0]->GetMomentumDirection()).mag();
104  if (sintheta>1.) sintheta=1.;
105 
106  G4StokesVector beamPol = dp->GetPolarization();
107  beamPol.SetPhoton();
108 
109  // determine interaction plane
110  G4ThreeVector nInteractionFrame =
112  (*vdp)[0]->GetMomentumDirection());
113 
114  // transform polarization into interaction frame
115  beamPol.InvRotateAz(nInteractionFrame,dp->GetMomentumDirection());
116 
117  // calulcate polarization transfer
118  crossSectionCalculator->SetMaterial(GetCurrentElement()->GetN(), // number of nucleons
119  GetCurrentElement()->GetZ(),
120  GetCurrentElement()->GetfCoulomb());
121  crossSectionCalculator->Initialize(gamEnergy0, lepEnergy1, sintheta,
122  beamPol, G4StokesVector::ZERO);
123 
124  // deterimine final state polarization
126  lep1Pol.RotateAz(nInteractionFrame,(*vdp)[0]->GetMomentumDirection());
127  (*vdp)[0]->SetPolarization(lep1Pol.p1(),
128  lep1Pol.p2(),
129  lep1Pol.p3());
130 
131  size_t num = vdp->size();
132  if (num!=2) G4cout<<" WARNING "<<num<<" secondaries in polarized pairproduction not supported!\n";
133  for (size_t i =1; i<num; ++i) {
135  lep2Pol.RotateAz(nInteractionFrame,(*vdp)[i]->GetMomentumDirection());
136  (*vdp)[i]->SetPolarization(lep2Pol.p1(),
137  lep2Pol.p2(),
138  lep2Pol.p3());
139 
140  }
141  }
142 }
143 
144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......