XSecAlgorithmI.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: Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
8  University of Liverpool & STFC Rutherford Appleton Lab
9 
10  For the class documentation see the corresponding header file.
11 
12  Important revisions after version 2.0.0 :
13 
14 */
15 //____________________________________________________________________________
16 
19 
20 using namespace genie;
21 
22 //___________________________________________________________________________
24 Algorithm()
25 {
26 
27 }
28 //___________________________________________________________________________
30 Algorithm(name)
31 {
32 
33 }
34 //___________________________________________________________________________
36 Algorithm(name, config)
37 {
38 
39 }
40 //___________________________________________________________________________
42 {
43 
44 }
45 //___________________________________________________________________________
46 bool XSecAlgorithmI::ValidKinematics(const Interaction* interaction) const
47 {
48 // can offer common implementation for all concrete x-section models because
49 // the input interaction is aware of its kinematic limits
50 
51  if ( interaction->TestBit(kISkipKinematicChk) ) return true;
52 
53  const KPhaseSpace& kps = interaction->PhaseSpace();
54 
55  if ( ! kps.IsAboveThreshold() ) {
56  LOG("XSecBase", pINFO) << "*** Below energy threshold";
57  return false;
58  }
59  if ( ! kps.IsAllowed() ) {
60  LOG("XSecBase", pINFO) << "*** Not in allowed kinematical space";
61  return false;
62  }
63  return true;
64 }
65 //___________________________________________________________________________
66 
const XML_Char * name
Definition: expat.h:151
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
Algorithm abstract base class.
Definition: Algorithm.h:54
Definition: config.py:1
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
Kinematical phase space.
Definition: KPhaseSpace.h:34
#define pINFO
Definition: Messenger.h:63
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
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.