GENIEGenerator
Loading...
Searching...
No Matches
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 <c.andreopoulos \at cern.ch>
9 University of Liverpool
10
11\created June 20, 2004
12
13\cpright Copyright (c) 2003-2025, 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
26using namespace genie;
27
28void PrintLimits(const Interaction * interaction);
29
30//__________________________________________________________________________
31int 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//__________________________________________________________________________
51void PrintLimits(const Interaction * interaction)
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//__________________________________________________________________________
#define pNOTICE
Definition Messenger.h:61
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
int main()
Summary information for an interaction.
Definition Interaction.h:56
static Interaction * RESCC(int tgt, int nuc, int probe, double E=0)
static Interaction * QELCC(int tgt, int nuc, int probe, double E=0)
static Interaction * DISCC(int tgt, int nuc, int probe, double E=0)
const KPhaseSpace & PhaseSpace(void) const
Definition Interaction.h:73
Kinematical phase space.
Definition KPhaseSpace.h:33
Range1D_t Limits(KineVar_t kvar) const
Return the kinematical variable limits.
A simple [min,max] interval for doubles.
Definition Range1.h:43
void PrintLimits(const Interaction *interaction)
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
const int kPdgProton
Definition PDGCodes.h:81
const int kPdgTgtFe56
Definition PDGCodes.h:205
@ kKVQ2
Definition KineVar.h:33
@ kKVx
Definition KineVar.h:31
@ kKVy
Definition KineVar.h:32
@ kKVW
Definition KineVar.h:35
const int kPdgNuMu
Definition PDGCodes.h:30