File indexing completed on 2024-09-28 07:02:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "eicsmear/erhic/EventGmcTrans.h"
0011
0012 #include <cmath>
0013 #include <sstream>
0014 #include <string>
0015
0016 namespace erhic {
0017
0018 EventGmcTrans::EventGmcTrans(const std::string& s)
0019
0020 : mStruckQuark(0)
0021 , mQSquared(NAN)
0022 , mBjorkenX(NAN)
0023 , mInelasticity(NAN)
0024 , mWSquared(NAN)
0025 , mNu(NAN)
0026 , mS(NAN)
0027 , mZ(NAN)
0028 , mHadronPt(NAN)
0029 , mLeptonTheta(NAN)
0030 , mLeptonPhi(NAN)
0031 , mPhiSpin(NAN)
0032 , mPhiHadron(NAN)
0033 , mF1(NAN)
0034 , mG1(NAN)
0035 , mH1(NAN)
0036 , mD1(NAN)
0037 , mF1TPerp(NAN)
0038 , mF1TPerp1(NAN)
0039 , mF1TPerp12(NAN)
0040 , mH1Perp(NAN)
0041 , mH1Perp1(NAN)
0042 , mH1Perp12(NAN)
0043 , mAutSiv(NAN)
0044 , mAutWtSiv(NAN)
0045 , mAutSivAllQ(NAN)
0046 , mAutWtSivAllQ(NAN)
0047 , mAutSivPiDiff(NAN)
0048 , mAutWtSivPiDiff(NAN)
0049 , mAutCol(NAN)
0050 , mAutWtCol(NAN)
0051 , mAutTw3Col(NAN)
0052 , mAutWtTw3Col(NAN)
0053 , mAutColAllQ(NAN)
0054 , mAutWtColAllQ(NAN)
0055 , mXUnpolarised(NAN)
0056 , mXSivers(NAN)
0057 , mXCollins(NAN) {
0058
0059 if (!s.empty()) {
0060 Parse(s);
0061 }
0062 }
0063
0064 bool EventGmcTrans::Parse(const std::string& line) {
0065
0066 static std::stringstream stream;
0067
0068 stream.str("");
0069 stream.clear();
0070
0071 stream << line;
0072 stream
0073
0074
0075 >> mStruckQuark >> mStruckQuark
0076 >> mBjorkenX
0077 >> mQSquared
0078 >> mNu
0079 >> mInelasticity
0080 >> mWSquared
0081 >> mZ
0082 >> mHadronPt
0083 >> mLeptonTheta
0084 >> mLeptonPhi
0085 >> mPhiSpin
0086 >> mPhiHadron
0087 >> mF1 >> mG1 >> mH1 >> mD1
0088 >> mF1TPerp >> mF1TPerp1 >> mF1TPerp12
0089 >> mH1Perp >> mH1Perp1 >> mH1Perp12
0090 >> mAutSiv >> mAutWtSiv >> mAutSivAllQ >> mAutWtSivAllQ
0091 >> mAutSivPiDiff >> mAutWtSivPiDiff
0092 >> mAutCol >> mAutWtCol >> mAutTw3Col >> mAutWtTw3Col
0093 >> mAutColAllQ >> mAutWtColAllQ
0094 >> mXUnpolarised >> mXSivers >> mXCollins;
0095
0096 process = 99;
0097
0098
0099 return !stream.fail();
0100 }
0101
0102 }