12 #include "StEStructRQMD.h"
14 #include "StEStructPool/AnalysisMaker/StEStructEventCuts.h"
15 #include "StEStructPool/AnalysisMaker/StEStructTrackCuts.h"
16 #include "StEStructPool/EventMaker/StEStructEvent.h"
17 #include "StEStructPool/EventMaker/StEStructTrack.h"
19 StEStructRQMD::StEStructRQMD(): meventCount(0), meventsToDo(0), mAmDone(false) {
23 mFileDir =
"/aztera/estruct/aya/simulations/RQMD/AuAu200/with_rescattering/out/";
32 mFileDir =
"/aztera/estruct/aya/simulations/RQMD/AuAu200/with_rescattering/out/";
40 bool StEStructRQMD::hasGenerator() {
return true; };
46 if(meventCount==meventsToDo){
50 return generateEvent();
61 retVal->SetCentrality( (
float) mnumTracks );
62 if (!mECuts->goodCentrality(retVal->Centrality())) {
66 retVal->FillChargeCollections();
75 int skip[] = { 2, 244, 368, 440, 520, 698, 826, 934, 1060,
76 1061, 1108, 1143, 1292, 1458, 1495, 1585, 1710, 1766,
77 1857, 2015, 2065, 2101, 2147, 2158, 2344, 2448};
80 const int kKMinus = 12;
81 const int kKPlus = 11;
82 const int kLambda = 18;
83 const int kLambdaBar = 26;
84 const int kProton = 14;
87 const int kPiMinus = 9;
88 const int kPiPlus = 8;
91 const int kXiMinus = 23;
92 const int kAntiXi0 = 30;
93 const int kAntiXiPlus = 31;
94 const int kOmega = 24;
95 const int kOmegaBar = 32;
96 const int kSigmaPlus = 19;
97 const int kSigma0 = 20;
98 const int kSigmaMinus = 21;
99 const int kAntiSigmaPlus = 27;
100 const int kAntiSigma0 = 28;
101 const int kAntiSigmaMinus = 29;
113 if (mIFile >= mMaxFiles) {
119 for (
int i=0;i<nSkip;i++) {
120 if (skip[i] == mNFile) {
125 sprintf(buf,
"%s%s%d", mFileDir,
"file9_", mNFile);
126 cout <<
"opening file " << buf << endl;
127 mFile =
new ifstream(buf);
129 if (mFile->is_open() == 0) {
130 cout <<
"file not found, trying next one. " << buf << endl;
136 *mFile >> tDum; mLine++;
138 cout <<
"Failed to read first line of file????, going on to next file" << endl;
145 int mNFreezeOutPart = 0;
148 *mFile >> tDum >> tDum >> tDum; mLine++;
149 int tNucleonTarget = atoi(tDum);
150 *mFile >> tDum >> tDum >> tDum; mLine++;
151 *mFile >> tDum >> tDum >> tDum; mLine++;
152 int tNucleonProj = atoi(tDum);
153 *mFile >> tDum >> tDum >> tDum; mLine++;
154 *mFile >> tDum >> tDum >> tDum; mLine++;
155 *mFile >> tDum >> tDum >> tDum; mLine++;
156 *mFile >> tDum >> tDum >> tDum; mLine++;
157 *mFile >> tDum >> tDum >> tDum; mLine++;
158 *mFile >> mNFreezeOutPart >> tDum >> tDum >> tDum; mLine++;
159 mNFreezeOutPart += (tNucleonTarget+tNucleonProj);
160 *mFile >> tDum >> tDum >> tDum >> tDum >> tDum; mLine++;
162 if ((mNFreezeOutPart < 394) || (15000 < mNFreezeOutPart)) {
163 cout <<
"An unusual number of tracks in this event?? ";
164 cout << mNFreezeOutPart <<
" tracks at line " << mLine << endl;
168 int tPid1,tPid2,tCharge,tNClnt,tlastcl;
169 float tt,tx,ty,tz,tE,tPx,tPy,tPz,tM,tDecay;
171 while (mNFreezeOutPart) {
172 eTrack->SetInComplete();
174 *mFile >> tPid1 >> tPid2 >> tt >> tx >> ty >> tz
175 >> tE >> tPx >> tPy >> tPz >> tM
176 >> tDecay >> tNClnt >> tlastcl ; mLine++;
178 float pt = sqrt(pow(tPx,2)+pow(tPy,2));
179 float eta = getPseudoRapidity(pt, tPz);
180 float phi = atan2(tPy, tPx);
184 if (tPid1 == 14 && tPid2 == -2) {
188 if (tPid1 == 14 && tPid2 == 2) {
192 if (tPid1 == 13 && tPid2 == 0) {
196 if (tPid1 == 99 && tPid2 == -57) {
200 if (tPid1 == 2 && tPid2 == 0) {
204 if (tPid1 == 15 && tPid2 == 1) {
208 if (tPid1 == 15 && tPid2 == 0) {
212 if (tPid1 == 15 && tPid2 == -1) {
216 if (tPid1 == 99 && tPid2 == -43) {
217 gPID = kAntiSigmaPlus;
220 if (tPid1 == 99 && tPid2 == -44) {
224 if (tPid1 == 99 && tPid2 == -45) {
225 gPID = kAntiSigmaMinus;
228 if (tPid1 == 99 && tPid2 == -41) {
232 if (tPid1 == 99 && tPid2 == 35) {
236 if (tPid1 == 7 && tPid2 == 0) {
240 if (tPid1 == 9 && tPid2 == 0) {
244 if (tPid1 == 8 && tPid2 == 0) {
248 if (tPid1 == 99 && tPid2 == 46) {
252 if (tPid1 == 99 && tPid2 == 47) {
256 if (tPid1 == 99 && tPid2 == -46) {
260 if (tPid1 == 99 && tPid2 == -47) {
264 if (tPid1 == 99 && tPid2 == 70) {
268 if (tPid1 == 99 && tPid2 == -70) {
276 bool useTrack =
true;
277 useTrack = (mTCuts->goodEta(eta) && useTrack);
278 useTrack = (mTCuts->goodPhi(phi) && useTrack);
280 if (pt<0.15)
continue;
282 useTrack = (mTCuts->goodPt(pt) && useTrack);
284 float yt=log(sqrt(1+_r*_r)+_r);
285 useTrack = (mTCuts->goodYt(yt) && useTrack);
286 mTCuts->fillHistograms(useTrack);
287 if (!useTrack)
continue;
293 eTrack->SetBxGlobal(0);
294 eTrack->SetByGlobal(0);
295 eTrack->SetBzGlobal(0);
303 eTrack->SetCharge(tCharge);
305 estructEvent->AddTrack(eTrack);
310 *mFile >> tDum; mLine++;
312 cout <<
"End of file. Closing it." << endl;
321 float StEStructRQMD::getRapidity(
float E,
float pz) {
322 float y = 0.5*log((E + pz)/(E - pz));
327 float StEStructRQMD::getPseudoRapidity(
float pt,
float pz) {
328 float theta = fabs(atan(pt/pz));
329 float eta = -log(tan(theta/2.));