GENIEGenerator
Loading...
Searching...
No Matches
XSecAlgorithmI.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, The GENIE Collaboration
4 For the full text of the license visit http://copyright.genie-mc.org
5
6 Costas Andreopoulos <c.andreopoulos \at cern.ch>
7 University of Liverpool
8*/
9//____________________________________________________________________________
10
13
14using namespace genie;
15
16//___________________________________________________________________________
22//___________________________________________________________________________
24Algorithm(name)
25{
26
27}
28//___________________________________________________________________________
29XSecAlgorithmI::XSecAlgorithmI(string name, string config) :
30Algorithm(name, config)
31{
32
33}
34//___________________________________________________________________________
39//___________________________________________________________________________
40bool XSecAlgorithmI::ValidKinematics(const Interaction* interaction) const
41{
42// can offer common implementation for all concrete x-section models because
43// the input interaction is aware of its kinematic limits
44
45 if ( interaction->TestBit(kISkipKinematicChk) ) return true;
46
47 const KPhaseSpace& kps = interaction->PhaseSpace();
48
49 if ( ! kps.IsAboveThreshold() ) {
50 LOG("XSecBase", pINFO) << "*** Below energy threshold";
51 return false;
52 }
53 if ( ! kps.IsAllowed() ) {
54 LOG("XSecBase", pINFO) << "*** Not in allowed kinematical space";
55 return false;
56 }
57 return true;
58}
59//___________________________________________________________________________
#define pINFO
Definition Messenger.h:62
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
Summary information for an interaction.
Definition Interaction.h:56
const KPhaseSpace & PhaseSpace(void) const
Definition Interaction.h:73
Kinematical phase space.
Definition KPhaseSpace.h:33
bool IsAllowed(void) const
Check whether the current kinematics is in the allowed phase space.
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
virtual bool ValidKinematics(const Interaction *i) const
Is the input kinematical point a physically allowed one?
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition Interaction.h:48