Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Generator
src
Physics
DeepInelastic
EventGen
DISPrimaryLeptonGenerator.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
13
#include "
Physics/DeepInelastic/EventGen/DISPrimaryLeptonGenerator.h
"
14
#include "
Framework/EventGen/EVGThreadException.h
"
15
#include "
Framework/GHEP/GHepRecord.h
"
16
#include "
Framework/GHEP/GHepParticle.h
"
17
#include "
Framework/GHEP/GHepFlags.h
"
18
#include "
Framework/Messenger/Messenger.h
"
19
20
using namespace
genie
;
21
22
//___________________________________________________________________________
23
DISPrimaryLeptonGenerator::DISPrimaryLeptonGenerator
() :
24
PrimaryLeptonGenerator
(
"genie::DISPrimaryLeptonGenerator"
)
25
{
26
27
}
28
//___________________________________________________________________________
29
DISPrimaryLeptonGenerator::DISPrimaryLeptonGenerator
(
string
config
) :
30
PrimaryLeptonGenerator
(
"genie::DISPrimaryLeptonGenerator"
, config)
31
{
32
33
}
34
//___________________________________________________________________________
35
DISPrimaryLeptonGenerator::~DISPrimaryLeptonGenerator
()
36
{
37
38
}
39
//___________________________________________________________________________
40
void
DISPrimaryLeptonGenerator::ProcessEventRecord
(
GHepRecord
* evrec)
const
41
{
42
// This method generates the final state primary lepton in DIS events
43
44
// no modification is required to the std implementation
45
PrimaryLeptonGenerator::ProcessEventRecord
(evrec);
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
);
51
genie::exceptions::EVGThreadException
exception
;
52
exception.
SetReason
(
"E<m for final state lepton"
);
53
exception.
SwitchOnFastForward
();
54
throw
exception
;
55
}
56
}
57
//___________________________________________________________________________
EVGThreadException.h
genie
THE MAIN GENIE PROJECT NAMESPACE
Definition:
AlgCmp.h:25
pERROR
#define pERROR
Definition:
Messenger.h:59
genie::DISPrimaryLeptonGenerator::ProcessEventRecord
void ProcessEventRecord(GHepRecord *event_rec) const
Definition:
DISPrimaryLeptonGenerator.cxx:40
GHepRecord.h
genie::DISPrimaryLeptonGenerator::DISPrimaryLeptonGenerator
DISPrimaryLeptonGenerator()
Definition:
DISPrimaryLeptonGenerator.cxx:23
genie::exceptions::EVGThreadException
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
Definition:
EVGThreadException.h:35
LOG
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition:
Messenger.h:96
genie::PrimaryLeptonGenerator::ProcessEventRecord
virtual void ProcessEventRecord(GHepRecord *evrec) const
Definition:
PrimaryLeptonGenerator.cxx:57
config
static Config * config
Definition:
config.cpp:1054
GHepParticle.h
genie::GHepRecord::FinalStatePrimaryLepton
virtual GHepParticle * FinalStatePrimaryLepton(void) const
Definition:
GHepRecord.cxx:326
GHepFlags.h
genie::PrimaryLeptonGenerator
Abstract class. Is used to pass common implementation to concrete implementations of the EventRecordV...
Definition:
PrimaryLeptonGenerator.h:30
genie::kLeptoGenErr
Definition:
GHepFlags.h:33
Messenger.h
genie::DISPrimaryLeptonGenerator::~DISPrimaryLeptonGenerator
~DISPrimaryLeptonGenerator()
Definition:
DISPrimaryLeptonGenerator.cxx:35
genie::GHepParticle::IsOffMassShell
bool IsOffMassShell(void) const
Definition:
GHepParticle.cxx:303
genie::exceptions::EVGThreadException::SwitchOnFastForward
void SwitchOnFastForward(void)
Definition:
EVGThreadException.h:44
genie::exceptions::EVGThreadException::SetReason
void SetReason(string reason)
Definition:
EVGThreadException.h:43
genie::GHepRecord::EventFlags
virtual TBits * EventFlags(void) const
Definition:
GHepRecord.h:117
DISPrimaryLeptonGenerator.h
genie::GHepRecord
GENIE's GHEP MC event record.
Definition:
GHepRecord.h:45
fhicl::exception
cet::coded_exception< error, detail::translate > exception
Definition:
exception.h:33
Generated by
1.8.11