DFRPrimaryLeptonGenerator.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2020, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7  University of Liverpool & STFC Rutherford Appleton Laboratory
8 */
9 //____________________________________________________________________________
10 
11 #include <TMath.h>
12 
19 
20 using namespace genie;
21 
22 //___________________________________________________________________________
24 PrimaryLeptonGenerator("genie::DFRPrimaryLeptonGenerator")
25 {
26 
27 }
28 //___________________________________________________________________________
30 PrimaryLeptonGenerator("genie::DFRPrimaryLeptonGenerator", config)
31 {
32 
33 }
34 //___________________________________________________________________________
36 {
37 
38 }
39 //___________________________________________________________________________
41 {
42 // This method generates the final state primary lepton in DIS events
43 
44  // no modification is required to the std implementation
46 
47  if(evrec->FinalStatePrimaryLepton()->IsOffMassShell()) {
48  LOG("LeptonicVertex", pERROR)
49  << "*** Selected kinematics lead to off mass shell lepton!";
50  evrec->EventFlags()->SetBitNumber(kLeptoGenErr, true);
52  exception.SetReason("E<m for final state lepton");
53  exception.SwitchOnFastForward();
54  throw exception;
55  }
56 }
57 //___________________________________________________________________________
void ProcessEventRecord(GHepRecord *event_rec) const
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
#define pERROR
Definition: Messenger.h:59
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
virtual void ProcessEventRecord(GHepRecord *evrec) const
static Config * config
Definition: config.cpp:1054
virtual GHepParticle * FinalStatePrimaryLepton(void) const
Definition: GHepRecord.cxx:326
Abstract class. Is used to pass common implementation to concrete implementations of the EventRecordV...
bool IsOffMassShell(void) const
virtual TBits * EventFlags(void) const
Definition: GHepRecord.h:117
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33