23 #include "StIOMaker/StIOMaker.h"
24 #include "StMessMgr.h"
25 #include "StPrepEmbedMaker.h"
26 #include "StEvtHddr.h"
28 #include "StGenericVertexMaker/StGenericVertexMaker.h"
29 #include "StGenericVertexMaker/StGenericVertexFinder.h"
31 #include "tables/St_vertexSeed_Table.h"
56 static const Int_t nTriggerId = 32 ;
57 Int_t ReqTrgId[nTriggerId];
62 const Double_t StPrepEmbedMaker::mRapidityMaximumCut = 10.0 ;
77 mSettings->vzlow = -200.0 ;
78 mSettings->vzhigh = 200.0 ;
84 mSettings->temperature=0.3;
87 mSettings->NReqTrg = 0 ;
88 for(Int_t itrg=0; itrg<mSettings->nTriggerId; itrg++){
89 mSettings->ReqTrgId[itrg] = 0 ;
93 mSettings->mode =
"flatpt";
100 mSpreadMode = kFALSE;
101 mOpenFzFile = kFALSE;
105 mVpdVzCutMode = kFALSE;
106 mPVRankCutMode = kFALSE;
107 mRapidityMode = kTRUE;
110 StPrepEmbedMaker::~StPrepEmbedMaker() {
115 Int_t StPrepEmbedMaker::Init()
117 srand((
unsigned)time(0));
120 TString jobName = gSystem->Getenv(
"SUMS_name");
121 if (jobName.Contains(
"FixRandomSeeds") ||
122 jobName ==
"DevTest" ||
123 jobName ==
"EvalTest" ||
124 jobName ==
"NewTest") {
125 LOG_WARN <<
"StPrepEmbedMaker::Init Using fixed random number generator seeds!" << endm;
126 mSettings->rnd1 = 12345;
127 mSettings->rnd2 = 67890;
129 mSettings->rnd1 = abs(
int(rand()*10000)+getpid());
130 mSettings->rnd2 = abs(
int(rand()*10000)+getpid());
133 if (mSettings->mode.CompareTo(
"strange", TString::kIgnoreCase) == 0)
136 LOG_INFO <<
"StPrepEmbedMaker::Init Setting spreader mode for embedding mode "<<mSettings->mode <<endm;
139 return StMaker::Init();
143 Int_t StPrepEmbedMaker::InitRun(
const int runnum)
147 mGeant3 = TGiant3::Geant3();
150 LOG_ERROR <<
"StPrepEmbedMaker::InitRun Geant3 pointer not found. exiting."<<endm;
156 if (mTagFile.IsWhitespace()){
157 LOG_ERROR <<
"StPrepEmbedMaker::InitRun TagFile has not been defined" << endm;
162 mFile = TFile::Open(mTagFile);
164 LOG_ERROR <<
"StPrepEmbedMaker::Init TagFile : " << mTagFile <<
" cannot be opened" << endm;
169 mTree = (TTree *) mFile->Get(
"Tag");
171 LOG_ERROR <<
"StPrepEmbedMaker::Init In TagFile : " << mTagFile <<
" cannot find TTree \"Tag\"" << endm;
177 LOG_INFO <<
"StPrepEmbedMaker::Init Spreader mode set. Looking for MoreTags file ..."<<endm;
178 mMoreTagsFile = mTagFile;
179 const int indx1 = mMoreTagsFile.Index(
".tags",0);
180 const int indx2 = mMoreTagsFile.Last(
'.');
181 if (indx1!=indx2) mMoreTagsFile.Remove(indx1+1,(indx2-indx1));
182 mMoreTagsFile.Insert(indx1+1,
"moretags.");
183 mMoreFile = TFile::Open(mMoreTagsFile);
186 mMoreTree = (TTree *) mMoreFile->Get(
"MoreTags");
188 LOG_ERROR <<
"StPrepEmbedMaker::Init In MoreTagsFile : " << mMoreTagsFile <<
" cannot find TTree \"MoreTags\"" << endm;
193 LOG_INFO <<
"StPrepEmbedMaker::Init File moretags.root not found. If this embedding is for years 2007 through 2009, this will most likely cause the embedding to quit prematurely."<<endm;
201 if(mSettings->mode.CompareTo(
"Spectrum", TString::kIgnoreCase) == 0)
209 cmd = Form(
"root4star -q \'~starofl/embedding/getVerticiesFromTags.C\(1000,\"./\",\"%s\")\'",
211 cmd = Form(
"~starofl/embedding/GENTX/gentx %s %s %i %i %f %f %f %i %f %f %f %i",
212 mTagFile.Data(),
"temp.fz",
213 1000,mSettings->mult,mSettings->etalow, mSettings->etahigh,
214 0.0,0,mSettings->ptlow, mSettings->pthigh,mSettings->temperature,
216 gSystem->Exec(cmd.Data());
218 Do(
"gfile p temp.fz");
227 if (
const Char_t* daqfile = ioMaker->GetFile()) {
228 LOG_DEBUG <<
"StPrepEmbedMaker::InitRun daq file: " << daqfile << endm;
229 mFzFile = gSystem->BaseName(daqfile);
230 mFzFile.ReplaceAll(
".daq",
".fz");
233 LOG_INFO <<
"StPrepEmbedMaker::InitRun Open FZ file: " << mFzFile << endm;
234 Do(
"user/output o " + mFzFile);
240 gSystem->Load(
"libgstar");
244 TString cmd(
"rndm ");
245 cmd+=mSettings->rnd1; cmd+=
" "; cmd+=mSettings->rnd2;
257 LOG_ERROR <<
"StPrepEmbedMaker::Make EvtHddr has not been found" << endm;
260 Int_t nFound = mTree->Draw(
"uncorrectedNumberOfPrimaries:primaryVertexFlag",
261 Form(
"mRunNumber==%i&&mEventNumber==%i",EvtHddr->GetRunNumber(),EvtHddr->GetEventNumber()),
264 LOG_ERROR <<
"StPrepEmbedMaker::Make Run/Event = " << EvtHddr->GetRunNumber() <<
"/" << EvtHddr->GetEventNumber()
265 <<
" has been found in tag file" << nFound <<
" times" << endm;
268 LOG_INFO <<
"StPrepEmbedMaker::Make Run/Event = " << EvtHddr->GetRunNumber()
269 <<
"/" << EvtHddr->GetEventNumber()
270 <<
" has been found with uncorrectedNumberOfPrimaries = " << mTree->GetV1()[0]
271 <<
" and primaryVertexFlag = " << mTree->GetV2()[0] << endm;
273 if (mTree->GetV1()[0] <= 0 || mTree->GetV2()[0] )
275 LOG_ERROR <<
"StPrepEmbedMaker::Make reject this event" << endm;
281 nFound = mMoreTree->Draw(
"nRefMult",
282 Form(
"RunId==%i&&EvtId==%i",EvtHddr->GetRunNumber(),EvtHddr->GetEventNumber()),
285 LOG_ERROR <<
"StPrepEmbedMaker::Make Run/Event = " << EvtHddr->GetRunNumber() <<
"/" << EvtHddr->GetEventNumber()
286 <<
" has been found in moretag file" << nFound <<
" times" << endm;
289 LOG_INFO <<
"StPrepEmbedMaker::Make Run/Event = " << EvtHddr->GetRunNumber()
290 <<
"/" << EvtHddr->GetEventNumber()
291 <<
" has been found (in moretags) with uncorrectedNumberOfPrimaries = " << mMoreTree->GetV1()[0] << endm;
293 if (mMoreTree->GetV1()[0] <= 0 )
295 LOG_ERROR <<
"StPrepEmbedMaker::Make reject this event" << endm;
298 if ( fabs(mMoreTree->GetV1()[0]- mTree->GetV1()[0]) > 0.1 )
300 LOG_INFO <<
"StPrepEmbedMaker::Make Run/Event = " << EvtHddr->GetRunNumber()
301 <<
"/" << EvtHddr->GetEventNumber()
302 <<
" has different uncorrectedNumberOfPrimaries from tags and moretags" << endm;
307 const Int_t numberOfPrimaryTracks = mMoreTree ? mMoreTree->GetV1()[0] : mTree->GetV1()[0];
308 const Int_t npart = getMultiplicity( *EvtHddr, numberOfPrimaryTracks ) ;
310 nFound = (Int_t) mTree->Draw(
"primaryVertexX:primaryVertexY:primaryVertexZ:TriggerId",
311 Form(
"mRunNumber==%i&&mEventNumber==%i",
312 EvtHddr->GetRunNumber(),
313 EvtHddr->GetEventNumber()),
318 nFound = (Int_t) mMoreTree->Draw(
"VX:VY:VZ",
319 Form(
"RunId==%i&&EvtId==%i",
320 EvtHddr->GetRunNumber(),
321 EvtHddr->GetEventNumber()),
328 xyztmp[0] = mMoreTree->GetV1()[0];
329 xyztmp[1] = mMoreTree->GetV2()[0];
330 xyztmp[2] = mMoreTree->GetV3()[0];
334 xyztmp[0] = mTree->GetV1()[0];
335 xyztmp[1] = mTree->GetV2()[0];
336 xyztmp[2] = mTree->GetV3()[0];
339 const Double_t xyz[3] = {xyztmp[0],xyztmp[1],xyztmp[2]};
342 if (fabs(xyz[0])<1e-7 && fabs(xyz[1])<1e-7 && fabs(xyz[2])<1e-7 ){
343 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
344 <<
" has tags with vertex approx at (0,0,0) - probably no PV, skipping."
352 if (mSkipMode == kTRUE){
353 const Double_t vr = sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]);
354 if (xyz[2]<mSettings->vzlow || xyz[2]>mSettings->vzhigh || vr>=mSettings->vr ){
355 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
356 <<
" has tags with vertex at (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2]
358 <<
" - out of Vz or Vr range, skipping." << endm;
362 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
363 <<
" has tags with vertex at (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2]
365 <<
" - within requested Vz and Vr range !" << endm;
369 if (mSkipMode == kTRUE){
370 LOG_INFO <<
"StPrepEmbedMaker::Event " << EvtHddr->GetEventNumber()
371 <<
" has Triggers: " << endm;
372 for (Int_t iTrg=0 ; iTrg<mSettings->nTriggerId ; iTrg++){
373 LOG_INFO << mTree->GetV4()[iTrg] <<
" ";
377 Bool_t fired = kFALSE;
378 for (Int_t iTrg=0 ; iTrg<mSettings->nTriggerId ; iTrg++){
379 for (Int_t iReqTrg=0; iReqTrg<mSettings->NReqTrg ; iReqTrg++) {
380 if (mTree->GetV4()[iTrg] == mSettings->ReqTrgId[iReqTrg]){
381 LOG_INFO <<
"StPrepEmbedMaker::Requested trigger " << mSettings->ReqTrgId[iReqTrg] <<
" is fired!" << endm;
387 if (!fired && mSettings->NReqTrg>0) {
388 LOG_INFO <<
"StPrepEmbedMaker::No requested triggers are fired in this event, skipping." << endm;
395 if(mSkipMode == kTRUE && mVpdVzCutMode == kTRUE)
399 nFound = (Int_t) mTree->Draw(
"VpdVz",
400 Form(
"mRunNumber==%i&&mEventNumber==%i",
401 EvtHddr->GetRunNumber(),
402 EvtHddr->GetEventNumber()),
"goff");
405 if(nFound == -1 && mMoreTree) {
406 nFound = (Int_t) mMoreTree->Draw(
"VpdVz",
407 Form(
"RunId==%i&&EvtId==%i",
408 EvtHddr->GetRunNumber(),
409 EvtHddr->GetEventNumber()),
412 LOG_INFO <<
"StPrepEmbedMaker::Make Use moretags file to extract VpdVz, nFound =" << nFound << endm ;
416 LOG_ERROR <<
"StPrepEmbedMaker::Make Run/Event = " << EvtHddr->GetRunNumber() <<
"/" << EvtHddr->GetEventNumber()
417 <<
" has been found in moretags file " << nFound <<
" times" << endm;
420 vpdvz = mMoreTree->GetV1()[0];
421 LOG_INFO << vpdvz << endm;
424 if( fabs(vpdvz) < 1e-7 ) {
425 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
426 <<
" has tags with vertex at (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2]
427 <<
"), VpdVz = " << vpdvz
428 <<
" - VpdVz is too small (i.e. no BTOF in this run), skipping." << endm;
431 if( fabs(vpdvz) >= 100. ) {
432 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
433 <<
" has tags with vertex at (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2]
434 <<
"), VpdVz = " << vpdvz
435 <<
" - VpdVz is too large, skipping." << endm;
438 if( fabs(xyz[2]-vpdvz) > mSettings->vpdvz ) {
439 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
440 <<
" has tags with vertex at (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2]
441 <<
"), VpdVz = " << vpdvz
442 <<
" - out of |Vz-VpdVz| range, skipping." << endm;
450 if(mSkipMode == kTRUE && mPVRankCutMode == kTRUE)
454 nFound = (Int_t) mTree->Draw(
"PVRank",
455 Form(
"mRunNumber==%i&&mEventNumber==%i",
456 EvtHddr->GetRunNumber(),
457 EvtHddr->GetEventNumber()),
"goff");
460 if(nFound == -1 && mMoreTree) {
461 nFound = (Int_t) mMoreTree->Draw(
"PVRank",
462 Form(
"RunId==%i&&EvtId==%i",
463 EvtHddr->GetRunNumber(),
464 EvtHddr->GetEventNumber()),
467 LOG_INFO <<
"StPrepEmbedMaker::Make Use moretags file to extract PVRank, nFound =" << nFound << endm ;
471 LOG_ERROR <<
"StPrepEmbedMaker::Make Run/Event = " << EvtHddr->GetRunNumber() <<
"/" << EvtHddr->GetEventNumber()
472 <<
" has been found in moretags file " << nFound <<
" times" << endm;
475 pvrank = mMoreTree->GetV1()[0];
476 LOG_INFO << pvrank << endm;
479 if( pvrank <= mSettings->pvrank ) {
480 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
481 <<
" has tags with vertex at (" << xyz[0] <<
"," << xyz[1] <<
"," << xyz[2]
482 <<
"), PVRank = " << pvrank
483 <<
" - PVRank is < = " << mSettings->pvrank <<
", skipping." << endm;
494 Double_t xyzerr[3] = {0.,0.,0.};
497 if(EvtHddr->GetRunNumber()>10311000){
499 nFound = (Int_t) mTree->Draw(
"sigmaPVX:sigmaPVY:sigmaPVZ",
500 Form(
"mRunNumber==%i&&mEventNumber==%i",
501 EvtHddr->GetRunNumber(),
502 EvtHddr->GetEventNumber()),
"goff");
503 xyzerr[0] = mTree->GetV1()[0];
504 xyzerr[1] = mTree->GetV2()[0];
505 xyzerr[2] = mTree->GetV3()[0];
510 nFound = (Int_t) mMoreTree->Draw(
"VXsigma:VYsigma:VZsigma",
511 Form(
"RunId==%i&&EvtId==%i",
512 EvtHddr->GetRunNumber(),
513 EvtHddr->GetEventNumber()),
516 LOG_INFO <<
"StPrepEmbedMaker::Make Use moretags file to extract vertex errors, nFound =" << nFound << endm ;
518 xyzerr[0] = mMoreTree->GetV1()[0];
519 xyzerr[1] = mMoreTree->GetV2()[0];
520 xyzerr[2] = mMoreTree->GetV3()[0];
523 LOG_INFO <<
"StPrepEmbedMaker::Make Event " << EvtHddr->GetEventNumber()
524 <<
" has tags with vertex errors of (" << xyzerr[0] <<
"," << xyzerr[1] <<
"," << xyzerr[2]
530 if((vfinder) && (vfinder->IsFixed())){
531 vfinder->SetVertexPosition(xyz[0],xyz[1],xyz[2]);
532 vfinder->SetVertexError(xyzerr[0],xyzerr[1],xyzerr[2]);
535 LOG_WARN <<
"StPrepEmbedMaker::Make a fixed vertex finder is not in the chain, vertex position and errors are not set!" << endm;
538 if( mPrimeMode && !mPrimed ) {
539 mSavePid = mSettings->pid;
544 gkine(npart, xyz[2], xyz[2]);
549 Do(Form(
"gvertex %f %f %f",xyz[0],xyz[1],xyz[2]));
550 if( mSettings->mode.CompareTo(
"strange", TString::kIgnoreCase) == 0 )
554 Do(Form(
"gspread %f %f %f", xyzerr[0],xyzerr[1],xyzerr[2]));
562 if( mSettings->mode.CompareTo(
"Spectrum", TString::kIgnoreCase) == 0 ){
564 if ( mSettings->temperature > 0.0 ){
570 LOG_INFO <<
"StPrepEmbedMaker::Make Generate sloped momentum distribution with T="
571 << mSettings->temperature <<
" GeV !"
575 Do(Form(
"detp mick miky.np=%d code=%d mult=%d slope=%f dy=%f",
576 1, mSettings->pid, -npart, 1.0/mSettings->temperature, -mSettings->etahigh));
578 Do(Form(
"user/input please my.micky"));
582 LOG_ERROR <<
"StPrepEmbedMaker::Make Input temperature <= 0, T=" << mSettings->temperature
583 <<
", skip to generate sloped momentum distribution"
590 if( mPrimeMode && !mPrimed ){
591 mSettings->pid = mSavePid;
603 LOG_INFO <<
"StPrepEmbedMaker::Finish Write and close fz file: " << mFzFile << endm;
604 Do(
"user/output c " + mFzFile);
610 void StPrepEmbedMaker::Do(
const Char_t *job)
614 LOG_INFO <<
"StPrepEmbedMaker::Do(" << job <<
");" << endm;
615 mGeant3->Kuexel(job);
620 void StPrepEmbedMaker::SetPartOpt(
const Int_t pid,
const Double_t mult)
622 mSettings->mult=mult; mSettings->pid=pid;
623 LOG_INFO <<
"StPrepEmbedMaker::SetPartOpt mult = " << mSettings->mult
624 <<
" pid = " << mSettings->pid << endm;
629 const Double_t etalow,
const Double_t etahigh,
const Double_t philow,
630 const Double_t phihigh,
const TString type)
632 mSettings->ptlow=ptlow; mSettings->pthigh=pthigh;
633 mSettings->etalow=etalow; mSettings->etahigh=etahigh;
634 mSettings->philow=philow; mSettings->phihigh=phihigh;
635 mSettings->mode=type;
636 LOG_INFO <<
"StPrepEmbedMaker::SetOpt ptlow = " << mSettings->ptlow <<
" pthigh = " << mSettings->pthigh
637 <<
" etalow = " << mSettings->etalow <<
" etahigh = " << mSettings->etahigh
638 <<
" philow = " << mSettings->philow <<
" phihigh = " << mSettings->phihigh
639 <<
" Mode: "<< type.Data() << endm;
643 void StPrepEmbedMaker::SetTemp(
const double t)
645 mSettings->temperature=t;
646 LOG_INFO <<
"StPrepEmbedMaker::SetTemp set temperature= " << mSettings->temperature << endm;
650 void StPrepEmbedMaker::SetTagFile(
const Char_t *file)
653 LOG_INFO <<
"StPrepEmbedMaker::SetTagFile set tags file= " << mTagFile << endm;
657 void StPrepEmbedMaker::SetSkipMode(
const Bool_t flag)
659 LOG_INFO <<
"StPrepEmbedMaker::SetSkipMode set skip mode= ";
663 LOG_INFO <<
" ON" << endm ;
666 LOG_INFO <<
" OFF" << endm ;
671 void StPrepEmbedMaker::SetSpreadMode(
const Bool_t flag)
675 LOG_INFO <<
"StPrepEmbedMaker::SetSpreadMode set spread mode= ";
678 LOG_INFO <<
" ON" << endm ;
681 LOG_INFO <<
" OFF" << endm ;
690 LOG_INFO <<
"StPrepEmbedMaker::SetPrimeMode set prime mode= ";
693 LOG_INFO <<
" ON" << endm ;
696 LOG_INFO <<
" OFF" << endm ;
701 void StPrepEmbedMaker::SetRapidityMode(
const Bool_t flag)
705 LOG_INFO <<
"StPrepEmbedMaker::SetRapidityMode set rapidity mode= ";
708 LOG_INFO <<
" Rapidity" << endm ;
711 LOG_INFO <<
" Pseudo-rapidity" << endm ;
716 void StPrepEmbedMaker::SetVpdVzCutMode(
const Bool_t flag)
721 LOG_INFO <<
"StPrepEmbedMaker::SetVpdVzCutMode set VpdVz cut mode= ";
724 LOG_INFO <<
" ON" << endm ;
727 LOG_INFO <<
" OFF" << endm ;
737 void StPrepEmbedMaker::SetPVRankCutMode(
const Bool_t flag)
742 LOG_INFO <<
"StPrepEmbedMaker::SetPVRankCutMode set PVRank cut mode= ";
744 if( mPVRankCutMode ){
745 LOG_INFO <<
" ON" << endm ;
748 LOG_INFO <<
" OFF" << endm ;
758 Int_t StPrepEmbedMaker::getMultiplicity(
const StEvtHddr& EvtHddr,
const Int_t nprimarytracks)
const
763 if(mSettings->mult < 1.)
765 npart=int(mSettings->mult * nprimarytracks);
768 LOG_INFO <<
"StPrepEmbedMaker::Event " << EvtHddr.GetEventNumber()
769 <<
" has too small numberOfPrimaryTracks " << nprimarytracks <<
" for the mult fraction requested. Forcing npart to 5." << endm;
776 npart = int (mSettings->mult);
783 void StPrepEmbedMaker::SetTrgOpt(
const Int_t TrgId)
787 LOG_ERROR <<
"StPrepEmbedMaker::SetTrgOpt Input trigger id = 0. Skip" << endm;
791 if(mSettings->NReqTrg >= mSettings->nTriggerId) {
792 LOG_ERROR <<
"StPrepEmbedMaker::SetTrgOpt too many triggers are requested!" <<endm;
796 mSettings->ReqTrgId[mSettings->NReqTrg] = TrgId ;
797 mSettings->NReqTrg ++ ;
798 LOG_INFO <<
"StPrepEmbedMaker::SetTrgOpt trigger " << mSettings->ReqTrgId[mSettings->NReqTrg-1] <<
" requested" << endm;
802 void StPrepEmbedMaker::SetZVertexCut(
const Double_t vzlow,
const Double_t vzhigh)
805 if( (vzlow > vzhigh) || (vzlow == 0.0 && vzhigh == 0.0) ){
806 LOG_ERROR <<
"StPrepEmbedMaker::SetZVertexCut input vzlow > vzhigh or vzlow = vzhigh = 0" << endm;
810 mSettings->vzlow = vzlow ;
811 mSettings->vzhigh = vzhigh ;
812 LOG_INFO <<
"StPrepEmbedMaker::SetZVertexCut Cut z-vertex in " << mSettings->vzlow
819 void StPrepEmbedMaker::SetVrCut(
const Double_t vr)
823 LOG_ERROR <<
"StPrepEmbedMaker::SetVrCut input vr = 0" << endm;
828 LOG_INFO <<
"StPrepEmbedMaker::SetVrCut Cut vr in " << mSettings->vr
833 void StPrepEmbedMaker::SetVpdVzCut(
const Double_t vpdvz)
837 LOG_ERROR <<
"StPrepEmbedMaker::SetVpdVzCut input |vpdvz-vz| <= 0" << endm;
841 mSettings->vpdvz = vpdvz ;
842 LOG_INFO <<
"StPrepEmbedMaker::SetVpdVzCut Cut |vpdvz-vz| in " << mSettings->vpdvz
847 void StPrepEmbedMaker::SetPVRankCut(
const Double_t pvrank)
849 mSettings->pvrank = pvrank ;
850 LOG_INFO <<
"StPrepEmbedMaker::SetPVRankCut Cut P.V. ranking larger than " << mSettings->pvrank
855 void StPrepEmbedMaker::OpenFzFile()
858 mOpenFzFile = kTRUE ;
859 LOG_INFO <<
"StPrepEmbedMaker::OpenFzFile Write .fz file. File basename will be taken "
860 <<
"from daq file basename" << endm;
867 Double_t rapidityMin = mSettings->etalow ;
868 Double_t rapidityMax = mSettings->etahigh ;
871 if( mSettings->mode.CompareTo(
"Spectrum", TString::kIgnoreCase) == 0 ){
872 rapidityMin = -mRapidityMaximumCut ;
873 rapidityMax = mRapidityMaximumCut ;
876 Do( Form(
"phasespace %i %i %f %f %f %f;",
877 mult, mSettings->pid,
878 mSettings->ptlow, mSettings->pthigh,
879 rapidityMin, rapidityMax)
886 Double_t rapidityMin = mSettings->etalow ;
887 Double_t rapidityMax = mSettings->etahigh ;
890 if( mSettings->mode.CompareTo(
"Spectrum", TString::kIgnoreCase) == 0 ){
891 rapidityMin = -mRapidityMaximumCut ;
892 rapidityMax = mRapidityMaximumCut ;
895 Do( Form(
"gkine %i %i %f %f %f %f %f %f %f %f;",
896 mult, mSettings->pid,
897 mSettings->ptlow, mSettings->pthigh,
898 rapidityMin, rapidityMax,
899 mSettings->philow, mSettings->phihigh,
Prepare GEANT Maker with input from embedding settings and DAQ event.
void phasespace(const Int_t mult)
StPrepEmbedMaker(const Char_t *name="PrepEmbed")
void SetOpt(const Double_t ptlow, const Double_t pthigh, const Double_t etalow, const Double_t etahigh, const Double_t philow, const Double_t phihigh, const TString type="FlatPt")
Set geantid(pid) and multiplicity.
void SetPrimeMode(const Bool_t flag=kFALSE)
Switch to enable writing .fz file.
void gkine(const Int_t mult, const Double_t vzmin, const Double_t vzmax)