00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 #ifndef ST_PYTHIA_EVENT
00059 #define ST_PYTHIA_EVENT
00060
00061 #include "TParticle.h"
00062 #include "TClonesArray.h"
00063
00064 class StPythiaEvent : public TObject {
00065 public:
00066 StPythiaEvent();
00067 virtual ~StPythiaEvent();
00068 StPythiaEvent(const StPythiaEvent& other);
00069 StPythiaEvent& operator=(const StPythiaEvent& rhs);
00070 enum { NPDF=31 };
00071 enum PDF { LO=0, NLO=1, STD=1, ZERO=2, MAX=3, MIN=4, M015=5, M030=6, M045=7, M060=8, M075=9, M090=10, M105=11, P030=12, P045=13, P060=14, P070=15, GS_NLOA=16, GS_NLOB=17, GS_NLOC=18, DSSV=19, LSS1=20, LSS2=21, LSS3=22, AAC1=23, AAC2=24, AAC3=25, BB1=26, BB2=27, DNS1=28, DNS2=29, DSSV2009a=30 };
00072 int runId() const;
00073 int eventId() const;
00074 int processId() const;
00075 int tune() const;
00076 const TVector3& vertex() const;
00077 float s() const;
00078 float t() const;
00079 float u() const;
00080 float pt() const;
00081 float cosTheta() const;
00082 float x1() const;
00083 float x2() const;
00084 int mstu72() const;
00085 int mstu73() const;
00086 int mstp111() const;
00087 float Q2() const;
00088 float partonALL() const;
00089 float dF1(PDF scenario = STD) const;
00090 float dF2(PDF scenario = STD) const;
00091 float f1(PDF scenario = STD) const;
00092 float f2(PDF scenario = STD) const;
00093 float ALL(PDF scenario = STD) const;
00094
00095 const TClonesArray* particles() const;
00096 int numberOfParticles() const;
00097 const TParticle* particle(int i) const;
00098
00099 void Clear(Option_t* option = "");
00100 void setRunId(int id);
00101 void setEventId(int id);
00102 void setProcessId(int id);
00103 void setTune(int tune);
00104 void setVertex(const TVector3& v);
00105 void setS(float s);
00106 void setT(float t);
00107 void setU(float u);
00108 void setPt(float pt);
00109 void setCosTheta(float cosTheta);
00110 void setX1(float x1);
00111 void setX2(float x2);
00112 void setMstu72(int mstu72);
00113 void setMstu73(int mstu73);
00114 void setMstp111(int mstp111);
00115 void setPartonALL(float a);
00116 void setDF1(PDF scenario, float val);
00117 void setDF2(PDF scenario, float val);
00118 void setF1(PDF scenario, float val);
00119 void setF2(PDF scenario, float val);
00120
00121 void addParticle(const TParticle& particle);
00122
00123 private:
00124 int mRunId;
00125 int mEventId;
00126 int mProcessId;
00127 int mTune;
00128 TVector3 mVertex;
00129 float mS;
00130 float mT;
00131 float mU;
00132 float mPt;
00133 float mCosTheta;
00134 float mX1;
00135 float mX2;
00136 int mMstu72;
00137 int mMstu73;
00138 int mMstp111;
00139 float mPartonALL;
00140 float mDF1[NPDF];
00141 float mDF2[NPDF];
00142 float mF1[2];
00143 float mF2[2];
00144
00145 TClonesArray* mParticles;
00146
00147 ClassDef(StPythiaEvent,6);
00148 };
00149
00150 inline int StPythiaEvent::runId() const { return mRunId; }
00151 inline int StPythiaEvent::eventId() const { return mEventId; }
00152 inline int StPythiaEvent::processId() const { return mProcessId; }
00153 inline int StPythiaEvent::tune() const { return mTune; }
00154 inline const TVector3& StPythiaEvent::vertex() const { return mVertex; }
00155 inline float StPythiaEvent::s() const { return mS; }
00156 inline float StPythiaEvent::t() const { return mT; }
00157 inline float StPythiaEvent::u() const { return mU; }
00158 inline float StPythiaEvent::pt() const { return mPt; }
00159 inline float StPythiaEvent::cosTheta() const { return mCosTheta; }
00160 inline float StPythiaEvent::x1() const { return mX1; }
00161 inline float StPythiaEvent::x2() const { return mX2; }
00162 inline int StPythiaEvent::mstu72() const { return mMstu72; }
00163 inline int StPythiaEvent::mstu73() const { return mMstu73; }
00164 inline int StPythiaEvent::mstp111() const { return mMstp111; }
00165 inline float StPythiaEvent::Q2() const { return mPt * mPt; }
00166 inline float StPythiaEvent::partonALL() const { return mPartonALL; }
00167 inline float StPythiaEvent::dF1(PDF scenario) const { return mDF1[scenario]; }
00168 inline float StPythiaEvent::dF2(PDF scenario) const { return mDF2[scenario]; }
00169
00170 inline float StPythiaEvent::f1(PDF scenario) const
00171 {
00172 if(scenario == LO) return mF1[0];
00173 return mF1[1];
00174 }
00175
00176 inline float StPythiaEvent::f2(PDF scenario) const
00177 {
00178 if(scenario == LO) return mF2[0];
00179 return mF2[1];
00180 }
00181
00182 inline float StPythiaEvent::ALL(PDF scenario) const
00183 {
00184 switch(scenario)
00185 {
00186 case(LO): return (mDF1[0]*mDF2[0]*mPartonALL) / (mF1[0]*mF2[0]);
00187 case(NLO): return (mDF1[1]*mDF2[1]*mPartonALL) / (mF1[1]*mF2[1]);
00188 case(ZERO): return (mDF1[2]*mDF2[2]*mPartonALL) / (mF1[1]*mF2[1]);
00189 case(MAX): return (mDF1[3]*mDF2[3]*mPartonALL) / (mF1[1]*mF2[1]);
00190 case(MIN): return (mDF1[4]*mDF2[4]*mPartonALL) / (mF1[1]*mF2[1]);
00191 case(M015): return (mDF1[5]*mDF2[5]*mPartonALL) / (mF1[1]*mF2[1]);
00192 case(M030): return (mDF1[6]*mDF2[6]*mPartonALL) / (mF1[1]*mF2[1]);
00193 case(M045): return (mDF1[7]*mDF2[7]*mPartonALL) / (mF1[1]*mF2[1]);
00194 case(M060): return (mDF1[8]*mDF2[8]*mPartonALL) / (mF1[1]*mF2[1]);
00195 case(M075): return (mDF1[9]*mDF2[9]*mPartonALL) / (mF1[1]*mF2[1]);
00196 case(M090): return (mDF1[10]*mDF2[10]*mPartonALL) / (mF1[1]*mF2[1]);
00197 case(M105): return (mDF1[11]*mDF2[11]*mPartonALL) / (mF1[1]*mF2[1]);
00198 case(P030): return (mDF1[12]*mDF2[12]*mPartonALL) / (mF1[1]*mF2[1]);
00199 case(P045): return (mDF1[13]*mDF2[13]*mPartonALL) / (mF1[1]*mF2[1]);
00200 case(P060): return (mDF1[14]*mDF2[14]*mPartonALL) / (mF1[1]*mF2[1]);
00201 case(P070): return (mDF1[15]*mDF2[15]*mPartonALL) / (mF1[1]*mF2[1]);
00202 case(GS_NLOA): return (mDF1[16]*mDF2[16]*mPartonALL) / (mF1[1]*mF2[1]);
00203 case(GS_NLOB): return (mDF1[17]*mDF2[17]*mPartonALL) / (mF1[1]*mF2[1]);
00204 case(GS_NLOC): return (mDF1[18]*mDF2[18]*mPartonALL) / (mF1[1]*mF2[1]);
00205 case(DSSV): return (mDF1[19]*mDF2[19]*mPartonALL) / (mF1[1]*mF2[1]);
00206 case(LSS1): return (mDF1[20]*mDF2[20]*mPartonALL) / (mF1[1]*mF2[1]);
00207 case(LSS2): return (mDF1[21]*mDF2[21]*mPartonALL) / (mF1[1]*mF2[1]);
00208 case(LSS3): return (mDF1[22]*mDF2[22]*mPartonALL) / (mF1[1]*mF2[1]);
00209 case(AAC1): return (mDF1[23]*mDF2[23]*mPartonALL) / (mF1[1]*mF2[1]);
00210 case(AAC2): return (mDF1[24]*mDF2[24]*mPartonALL) / (mF1[1]*mF2[1]);
00211 case(AAC3): return (mDF1[25]*mDF2[25]*mPartonALL) / (mF1[1]*mF2[1]);
00212 case(BB1): return (mDF1[26]*mDF2[26]*mPartonALL) / (mF1[1]*mF2[1]);
00213 case(BB2): return (mDF1[27]*mDF2[27]*mPartonALL) / (mF1[1]*mF2[1]);
00214 case(DNS1): return (mDF1[28]*mDF2[28]*mPartonALL) / (mF1[1]*mF2[1]);
00215 case(DNS2): return (mDF1[29]*mDF2[29]*mPartonALL) / (mF1[1]*mF2[1]);
00216 case(DSSV2009a): return (mDF1[DSSV2009a]/mF1[1])*(mDF2[DSSV2009a]/mF2[1])*mPartonALL;
00217 default: return -999;
00218 }
00219 }
00220
00221 inline const TClonesArray* StPythiaEvent::particles() const { return mParticles; }
00222 inline int StPythiaEvent::numberOfParticles() const { return mParticles->GetEntriesFast(); }
00223 inline const TParticle* StPythiaEvent::particle(int i) const { return (TParticle*)mParticles->At(i); }
00224
00225 inline void StPythiaEvent::addParticle(const TParticle& particle)
00226 {
00227 new ((*mParticles)[mParticles->GetEntriesFast()]) TParticle(particle);
00228 }
00229
00230 inline void StPythiaEvent::Clear(Option_t* option)
00231 {
00232 mRunId = 0;
00233 mEventId = 0;
00234 mProcessId = 0;
00235 mTune = 0;
00236 mVertex.SetXYZ(0, 0, 0);
00237 mS = 0;
00238 mT = 0;
00239 mU = 0;
00240 mPt = 0;
00241 mCosTheta = 0;
00242 mX1 = 0;
00243 mX2 = 0;
00244 mMstu72 = 0;
00245 mMstu73 = 0;
00246 mMstp111 = 0;
00247 mPartonALL = 0;
00248 for (int ii=0; ii<30; ii++) {
00249 mDF1[ii] = 0;
00250 mDF2[ii] = 0;
00251 }
00252 mF1[0] = 0; mF1[1] = 0;
00253 mF2[0] = 0; mF2[1] = 0;
00254
00255 if (mParticles) mParticles->Clear(option);
00256 }
00257
00258 inline void StPythiaEvent::setRunId(int id) { mRunId = id; }
00259 inline void StPythiaEvent::setEventId(int id) { mEventId = id; }
00260 inline void StPythiaEvent::setProcessId(int id) { mProcessId = id; }
00261 inline void StPythiaEvent::setTune(int tune) { mTune = tune; }
00262 inline void StPythiaEvent::setVertex(const TVector3& v) { mVertex = v; }
00263 inline void StPythiaEvent::setS(float s) { mS = s; }
00264 inline void StPythiaEvent::setT(float t) { mT = t; }
00265 inline void StPythiaEvent::setU(float u) { mU = u; }
00266 inline void StPythiaEvent::setPt(float pt) { mPt = pt; }
00267 inline void StPythiaEvent::setCosTheta(float cosTheta) { mCosTheta = cosTheta; }
00268 inline void StPythiaEvent::setX1(float x1) { mX1 = x1; }
00269 inline void StPythiaEvent::setX2(float x2) { mX2 = x2; }
00270 inline void StPythiaEvent::setMstu72(int mstu72) { mMstu72 = mstu72; }
00271 inline void StPythiaEvent::setMstu73(int mstu73) { mMstu73 = mstu73; }
00272 inline void StPythiaEvent::setMstp111(int mstp111) { mMstp111 = mstp111; }
00273 inline void StPythiaEvent::setPartonALL(float a) { mPartonALL = a; }
00274 inline void StPythiaEvent::setDF1(PDF scenario, float val) { mDF1[scenario] = val; }
00275 inline void StPythiaEvent::setDF2(PDF scenario, float val) { mDF2[scenario] = val; }
00276
00277 inline void StPythiaEvent::setF1(PDF scenario, float val)
00278 {
00279 if(scenario == LO) mF1[0] = val;
00280 mF1[1] = val;
00281 }
00282
00283 inline void StPythiaEvent::setF2(PDF scenario, float val)
00284 {
00285 if(scenario == LO) mF2[0] = val;
00286 mF2[1] = val;
00287 }
00288
00289 #endif