COHElasticPXSec.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2019, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author:
8 
9  For the class documentation see the corresponding header file.
10 
11  Important revisions after version 2.0.0 :
12  @ Feb 09, 2009 - CA
13  Moved into the new Coherent package from its previous location (Elastic
14  package)
15 
16 */
17 //____________________________________________________________________________
18 
19 #include <TMath.h>
20 
32 
33 using namespace genie;
34 using namespace genie::utils;
35 using namespace genie::constants;
36 
37 //____________________________________________________________________________
39 XSecAlgorithmI("genie::COHElasticPXSec")
40 {
41 
42 }
43 //____________________________________________________________________________
45 XSecAlgorithmI("genie::COHElasticPXSec", config)
46 {
47 
48 }
49 //____________________________________________________________________________
51 {
52 
53 }
54 //____________________________________________________________________________
56  const Interaction * interaction, KinePhaseSpace_t kps) const
57 {
58  if(! this -> ValidProcess (interaction) ) return 0.;
59  if(! this -> ValidKinematics (interaction) ) return 0.;
60 
61  const InitialState & init_state = interaction -> InitState();
62  const Kinematics & kinematics = interaction -> Kine();
63  const Target & target = init_state.Tgt();
64 
65  if(!target.IsNucleus()) return 0;
66 
67  double E = init_state.ProbeE(kRfLab);
68  double Q2 = kinematics.Q2();
69  int Z = target.Z();
70  int N = target.N();
71 
72  // ...
73  // ...
74  // ...
75 
76  double xsec = (0.25*kGF2/kPi2) *
77  TMath::Power(N - (1-4*fSin2thw)*Z, 2) /* * ... */;
78 
79  LOG("COHEl", pDEBUG)
80  << "dXSec[vA,COHEl]/dQ2 (Ev = "<< E<< ", Q2 = "<< Q2 << ") = "<< xsec;
81 
82  //-- The algorithm computes dxsec/dQ2
83  // Check whether variable tranformation is needed
84  if(kps!=kPSQ2fE) {
85  double J = utils::kinematics::Jacobian(interaction,kPSQ2fE,kps);
86  xsec *= J;
87  }
88 
89  return xsec;
90 }
91 //____________________________________________________________________________
92 double COHElasticPXSec::Integral(const Interaction * interaction) const
93 {
94  double xsec = fXSecIntegrator->Integrate(this,interaction);
95  return xsec;
96 }
97 //____________________________________________________________________________
98 bool COHElasticPXSec::ValidProcess(const Interaction * interaction) const
99 {
100  if(interaction->TestBit(kISkipProcessChk)) return true;
101 
102  const ProcessInfo & proc_info = interaction->ProcInfo();
103  if(!proc_info.IsCoherentElas()) return false;
104 
105  const InitialState & init_state = interaction->InitState();
106  const Target & target = init_state.Tgt();
107  if(!target.IsNucleus()) return false;
108 
109  return true;
110 }
111 //____________________________________________________________________________
113 {
114  Algorithm::Configure(config);
115  this->LoadConfig();
116 }
117 //____________________________________________________________________________
119 {
120  Algorithm::Configure(config);
121  this->LoadConfig();
122 }
123 //____________________________________________________________________________
125 {
126  double thw ;
127  GetParam( "WeinbergAngle", thw );
128  fSin2thw = TMath::Power(TMath::Sin(thw), 2);
129 
131  dynamic_cast<const XSecIntegratorI *> (this->SubAlg("XSec-Integrator"));
133 }
134 //____________________________________________________________________________
Cross Section Calculation Interface.
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
Basic constants.
const XML_Char * target
Definition: expat.h:268
double J(double q0, double q3, double Enu, double ml)
Definition: MECUtils.cxx:141
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
Cross Section Integrator Interface.
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:991
bool IsNucleus(void) const
Definition: Target.cxx:289
Generated/set kinematical variables for an event.
Definition: Kinematics.h:40
Definition: config.py:1
double fSin2thw
sin^2(weinberg angle)
enum genie::EKinePhaseSpace KinePhaseSpace_t
double Integral(const Interaction *i) const
Float_t Z
Definition: plot.C:38
Summary information for an interaction.
Definition: Interaction.h:56
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:97
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
const XSecIntegratorI * fXSecIntegrator
cross section integrator
Float_t E
Definition: plot.C:20
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:44
void Configure(const Registry &config)
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:41
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:70
int Z(void) const
Definition: Target.h:69
Double_t xsec[nknots]
Definition: testXsec.C:47
int N(void) const
Definition: Target.h:70
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
virtual double Integrate(const XSecAlgorithmI *model, const Interaction *interaction) const =0
assert(nhit_max >=nhit_nbins)
double Jacobian(const Interaction *const i, KinePhaseSpace_t f, KinePhaseSpace_t t)
Definition: KineUtils.cxx:128
const InitialState & InitState(void) const
Definition: Interaction.h:69
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
double Q2(bool selected=false) const
Definition: Kinematics.cxx:135
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
Definition: InitialState.h:67
bool IsCoherentElas(void) const
static const double kGF2
Definition: Constants.h:60
void kinematics()
Definition: kinematics.C:10
double ProbeE(RefFrame_t rf) const
static const double kPi2
Definition: Constants.h:39
Root of GENIE utility namespaces.
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition: Interaction.h:47
Initial State information.
Definition: InitialState.h:49
#define pDEBUG
Definition: Messenger.h:64
const Algorithm * SubAlg(const RgKey &registry_key) const
Definition: Algorithm.cxx:353