gtestKPhaseSpace.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \program gtestKPhaseSpace
5 
6 \brief Program used for testing / debugging the kinematic phase space calc
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11 \created June 20, 2004
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 
16 */
17 //____________________________________________________________________________
18 
19 #include <TFile.h>
20 #include <TTree.h>
21 
25 
26 using namespace genie;
27 
28 void PrintLimits(const Interaction * interaction);
29 
30 //__________________________________________________________________________
31 int main(int /*argc*/, char ** /*argv*/)
32 {
33  // -- get a DIS interaction object & access its kinematics
34 
35  int tgt = kPdgTgtFe56;
36  int hit_nucleon = kPdgProton;
37  int neutrino = kPdgNuMu;
38  double Ev = 3;
39 
40  Interaction * qelcc = Interaction::QELCC(tgt,hit_nucleon,neutrino,Ev);
41  Interaction * rescc = Interaction::RESCC(tgt,hit_nucleon,neutrino,Ev);
42  Interaction * discc = Interaction::DISCC(tgt,hit_nucleon,neutrino,Ev);
43 
44  PrintLimits(qelcc);
45  PrintLimits(rescc);
46  PrintLimits(discc);
47 
48  return 0;
49 }
50 //__________________________________________________________________________
52 {
53  LOG("test", pNOTICE) << *interaction;
54 
55  const KPhaseSpace & phase_space = interaction->PhaseSpace();
56 
57  Range1D_t xl = phase_space.Limits(kKVx);
58  Range1D_t yl = phase_space.Limits(kKVy);
59  Range1D_t Q2l = phase_space.Limits(kKVQ2);
60  Range1D_t Wl = phase_space.Limits(kKVW);
61 
62  LOG("test", pNOTICE) << "x e [" << xl.min << ", " << xl.max << "]";
63  LOG("test", pNOTICE) << "y e [" << yl.min << ", " << yl.max << "]";
64  LOG("test", pNOTICE) << "Q2 e [" << Q2l.min << ", " << Q2l.max << "]";
65  LOG("test", pNOTICE) << "W e [" << Wl.min << ", " << Wl.max << "]";
66 }
67 //__________________________________________________________________________
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
A simple [min,max] interval for doubles.
Definition: Range1.h:42
const int kPdgNuMu
Definition: PDGCodes.h:30
static Interaction * QELCC(int tgt, int nuc, int probe, double E=0)
Range1D_t Limits(KineVar_t kvar) const
Return the kinematical variable limits.
int main(int, char **)
Summary information for an interaction.
Definition: Interaction.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
Kinematical phase space.
Definition: KPhaseSpace.h:33
void PrintLimits(const Interaction *interaction)
double max
Definition: Range1.h:53
static Interaction * DISCC(int tgt, int nuc, int probe, double E=0)
const int kPdgTgtFe56
Definition: PDGCodes.h:205
double min
Definition: Range1.h:52
const int kPdgProton
Definition: PDGCodes.h:81
#define pNOTICE
Definition: Messenger.h:61
static Interaction * RESCC(int tgt, int nuc, int probe, double E=0)
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...