eic-smear  1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
EventGmcTrans.cxx
Go to the documentation of this file.
1 
11 
12 #include <cmath>
13 #include <sstream>
14 #include <string>
15 
16 namespace erhic {
17 
18 EventGmcTrans::EventGmcTrans(const std::string& s)
19 // Initialise all floats to NAN for consistency with EventDis
20 : mStruckQuark(0)
21 , mQSquared(NAN)
22 , mBjorkenX(NAN)
23 , mInelasticity(NAN)
24 , mWSquared(NAN)
25 , mNu(NAN)
26 , mS(NAN)
27 , mZ(NAN)
28 , mHadronPt(NAN)
29 , mLeptonTheta(NAN)
30 , mLeptonPhi(NAN)
31 , mPhiSpin(NAN)
32 , mPhiHadron(NAN)
33 , mF1(NAN)
34 , mG1(NAN)
35 , mH1(NAN)
36 , mD1(NAN)
37 , mF1TPerp(NAN)
38 , mF1TPerp1(NAN)
39 , mF1TPerp12(NAN)
40 , mH1Perp(NAN)
41 , mH1Perp1(NAN)
42 , mH1Perp12(NAN)
43 , mAutSiv(NAN)
44 , mAutWtSiv(NAN)
45 , mAutSivAllQ(NAN)
46 , mAutWtSivAllQ(NAN)
47 , mAutSivPiDiff(NAN)
48 , mAutWtSivPiDiff(NAN)
49 , mAutCol(NAN)
50 , mAutWtCol(NAN)
51 , mAutTw3Col(NAN)
52 , mAutWtTw3Col(NAN)
53 , mAutColAllQ(NAN)
54 , mAutWtColAllQ(NAN)
55 , mXUnpolarised(NAN)
56 , mXSivers(NAN)
57 , mXCollins(NAN) {
58  // Initialise from a string if provided.
59  if (!s.empty()) {
60  Parse(s);
61  } // if
62 }
63 
64 bool EventGmcTrans::Parse(const std::string& line) {
65  // Save ourselves the overhead of a new stringstream with each event read.
66  static std::stringstream stream;
67  // Clear the stream contents and flags from any previous use.
68  stream.str("");
69  stream.clear();
70  // Read values from the input line.
71  stream << line;
72  stream
73  // The first integer is always 0 (indicating start of event record)
74  // so skip that and read the next int, which is the struck quark.
76  >> mBjorkenX
77  >> mQSquared
78  >> mNu
79  >> mInelasticity
80  >> mWSquared
81  >> mZ
82  >> mHadronPt
83  >> mLeptonTheta
84  >> mLeptonPhi
85  >> mPhiSpin
86  >> mPhiHadron
87  >> mF1 >> mG1 >> mH1 >> mD1
89  >> mH1Perp >> mH1Perp1 >> mH1Perp12
95  // Inherits process from EventMC. Always set this equal to 99 for DIS
96  process = 99;
97  // The stream state should still be good if processing
98  // the string went OK.
99  return !stream.fail();
100 }
101 
102 } // namespace erhic
EventGmcTrans.h
erhic::EventGmcTrans::mF1
Double32_t mF1
Definition: EventGmcTrans.h:159
erhic::EventGmcTrans::mXCollins
Double32_t mXCollins
Cross sections.
Definition: EventGmcTrans.h:183
erhic
Definition: EventDis.cxx:14
erhic::EventGmcTrans::mNu
Double32_t mNu
Energy of the exchanged boson in the hadron rest frame.
Definition: EventGmcTrans.h:150
erhic::EventGmcTrans::mD1
Double32_t mD1
Definition: EventGmcTrans.h:162
erhic::EventGmcTrans::mPhiSpin
Double32_t mPhiSpin
Azimuthal angle of spin vector in gamma*-proton centre-of-mass frame.
Definition: EventGmcTrans.h:156
erhic::EventGmcTrans::EventGmcTrans
EventGmcTrans(const std::string &="")
Constructor.
Definition: EventGmcTrans.cxx:18
erhic::EventGmcTrans::mPhiHadron
Double32_t mPhiHadron
Definition: EventGmcTrans.h:158
erhic::EventMC::process
Int_t process
PYTHIA code for the physics process producing the event.
Definition: erhic/EventMC.h:204
erhic::EventGmcTrans::mF1TPerp
Double32_t mF1TPerp
Definition: EventGmcTrans.h:163
erhic::EventGmcTrans::mH1Perp12
Double32_t mH1Perp12
Definition: EventGmcTrans.h:168
erhic::EventGmcTrans::mF1TPerp12
Double32_t mF1TPerp12
Definition: EventGmcTrans.h:165
erhic::EventGmcTrans::mAutCol
Double32_t mAutCol
Definition: EventGmcTrans.h:175
erhic::EventGmcTrans::mXUnpolarised
Double32_t mXUnpolarised
Definition: EventGmcTrans.h:181
erhic::EventGmcTrans::mInelasticity
Double32_t mInelasticity
Definition: EventGmcTrans.h:148
erhic::EventGmcTrans::mAutWtSivAllQ
Double32_t mAutWtSivAllQ
Definition: EventGmcTrans.h:172
erhic::EventGmcTrans::mLeptonTheta
Double32_t mLeptonTheta
Polar angle of the scattered lepton.
Definition: EventGmcTrans.h:154
erhic::EventGmcTrans::mStruckQuark
Int_t mStruckQuark
Flavour of struck quark.
Definition: EventGmcTrans.h:143
erhic::EventGmcTrans::mAutWtCol
Double32_t mAutWtCol
Definition: EventGmcTrans.h:176
erhic::EventGmcTrans::mWSquared
Double32_t mWSquared
Invariant mass of the hadronic final state.
Definition: EventGmcTrans.h:149
erhic::EventGmcTrans::Parse
virtual bool Parse(const std::string &)
Set the event properties from a string.
Definition: EventGmcTrans.cxx:64
erhic::EventGmcTrans::mBjorkenX
Double32_t mBjorkenX
Longitudinal momentum fraction in the infinite momentum frame.
Definition: EventGmcTrans.h:146
erhic::EventGmcTrans::mAutTw3Col
Double32_t mAutTw3Col
Definition: EventGmcTrans.h:177
erhic::EventGmcTrans::mAutSivAllQ
Double32_t mAutSivAllQ
Definition: EventGmcTrans.h:171
erhic::EventGmcTrans::mAutWtSivPiDiff
Double32_t mAutWtSivPiDiff
Definition: EventGmcTrans.h:174
erhic::EventGmcTrans::mAutSiv
Double32_t mAutSiv
Definition: EventGmcTrans.h:169
erhic::EventGmcTrans::mAutSivPiDiff
Double32_t mAutSivPiDiff
Definition: EventGmcTrans.h:173
erhic::EventGmcTrans::mHadronPt
Double32_t mHadronPt
pT of the produced hadron
Definition: EventGmcTrans.h:153
erhic::EventGmcTrans::mG1
Double32_t mG1
Definition: EventGmcTrans.h:160
erhic::EventGmcTrans::mAutColAllQ
Double32_t mAutColAllQ
Definition: EventGmcTrans.h:179
erhic::EventGmcTrans::mF1TPerp1
Double32_t mF1TPerp1
Definition: EventGmcTrans.h:164
erhic::EventGmcTrans::mAutWtTw3Col
Double32_t mAutWtTw3Col
Definition: EventGmcTrans.h:178
erhic::EventGmcTrans::mH1Perp
Double32_t mH1Perp
Definition: EventGmcTrans.h:166
erhic::EventGmcTrans::mH1Perp1
Double32_t mH1Perp1
Definition: EventGmcTrans.h:167
erhic::EventGmcTrans::mAutWtColAllQ
Double32_t mAutWtColAllQ
Definition: EventGmcTrans.h:180
erhic::EventGmcTrans::mZ
Double32_t mZ
z of the produced hadron
Definition: EventGmcTrans.h:152
erhic::EventGmcTrans::mLeptonPhi
Double32_t mLeptonPhi
Azimuthal angle of the scattered lepton.
Definition: EventGmcTrans.h:155
erhic::EventGmcTrans::mH1
Double32_t mH1
Definition: EventGmcTrans.h:161
erhic::EventGmcTrans::mXSivers
Double32_t mXSivers
Definition: EventGmcTrans.h:182
erhic::EventGmcTrans::mAutWtSiv
Double32_t mAutWtSiv
Definition: EventGmcTrans.h:170
erhic::EventGmcTrans::mQSquared
Double32_t mQSquared
Negative squared four-momentum of the exchanged boson.
Definition: EventGmcTrans.h:144