Functions
gtestKPhaseSpace.cxx File Reference
#include <TFile.h>
#include <TTree.h>
#include "Framework/Interaction/Interaction.h"
#include "Framework/Messenger/Messenger.h"
#include "Framework/ParticleData/PDGCodes.h"

Go to the source code of this file.

Functions

void PrintLimits (const Interaction *interaction)
 
int main (int, char **)
 

Function Documentation

int main ( int  ,
char **   
)

Definition at line 31 of file gtestKPhaseSpace.cxx.

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 }
const int kPdgNuMu
Definition: PDGCodes.h:30
Summary information for an interaction.
Definition: Interaction.h:56
void PrintLimits(const Interaction *interaction)
const int kPdgTgtFe56
Definition: PDGCodes.h:205
const int kPdgProton
Definition: PDGCodes.h:81
void PrintLimits ( const Interaction interaction)

Definition at line 51 of file gtestKPhaseSpace.cxx.

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 }
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Range1D_t Limits(KineVar_t kvar) const
Return the kinematical variable limits.
#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
double max
Definition: Range1.h:53
double min
Definition: Range1.h:52
#define pNOTICE
Definition: Messenger.h:61