1 TString input_dir =
"./fcs2022";
2 TString output_dir =
".";
3 TString input_chain =
"sdt20211016.120000,dev2021,fzin,geant,FieldOn,logger,MakeEvent,ReverseField,agml,usexgeom,bigbig,fstFastSim,fttFastSim,fcsSim,fcsWFF,fcsCluster,fwdTrack";
5 void runSimBfc( Int_t nEvents=1000, Int_t run=1,
const char* pid=
"JPsi",
float vz=0.0,
6 TString myDir=input_dir, TString myOutDir=output_dir,
8 int debug=0,
int e=0,
float pt=1.5,
9 char* epdmask=
"0.0100",
12 TString myChain=input_chain,
14 std::string configFile =
"sim/fast_track.xml",
15 bool SiIneff =
false){
17 gSystem->Load(
"libStarRoot.so" );
18 gROOT->SetMacroPath(
".:/star-sw/StRoot/macros/:./StRoot/macros:./StRoot/macros/graphics:./StRoot/macros/analysis:./StRoot/macros/test:./StRoot/macros/examples:./StRoot/macros/html:./StRoot/macros/qa:./StRoot/macros/calib:./StRoot/macros/mudst:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/graphics:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/analysis:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/test:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/examples:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/html:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/qa:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/calib:/afs/rhic.bnl.gov/star/packages/DEV/StRoot/macros/mudst:/afs/rhic.bnl.gov/star/ROOT/36/5.34.38/.sl73_x8664_gcc485/rootdeb/macros:/afs/rhic.bnl.gov/star/ROOT/36/5.34.38/.sl73_x8664_gcc485/rootdeb/tutorials");
19 gROOT->LoadMacro(
"bfc.C");
21 TString myDat, subDir, infile, outfile;
23 if(proc.Contains(
"dy") || proc.Contains(
"JPsi") || proc.Contains(
"mb") || proc.Contains(
"jet") || proc.Contains(
"dybg")){
24 subDir=Form(
"pythia_%s_vz%d",pid,(
int)vz);
25 myDat=Form(
"pythia_%s_vz%d_run%i.fzd",pid,(
int)vz,run);
27 myDat=Form(
"%s.e%d.vz%d.run%i.fzd",pid,e,(
int)vz,run);
29 myDat=Form(
"%s.pt%3.1f.vz%d.run%i.fzd",pid,pt,(
int)vz,run);
31 if(myDir.EqualTo(
".")) {infile = myDir +
"/" + myDat;}
32 else {infile = myDir +
"/" + subDir +
"/" + myDat;}
33 outfile = myOutDir +
"/" + myDat.ReplaceAll(
".fzd",
".root");
34 cout <<
"Input file=" << infile << endl;
35 cout <<
"Output file=" << outfile << endl;
37 bfc( -1, myChain, infile);
38 chain->SetOutputFile(outfile);
41 dbMk->SetAttr(
"blacklist",
"tpc");
42 dbMk->SetAttr(
"blacklist",
"svt");
43 dbMk->SetAttr(
"blacklist",
"ssd");
44 dbMk->SetAttr(
"blacklist",
"ist");
45 dbMk->SetAttr(
"blacklist",
"pxl");
46 dbMk->SetAttr(
"blacklist",
"pp2pp");
47 dbMk->SetAttr(
"blacklist",
"ftpc");
48 dbMk->SetAttr(
"blacklist",
"emc");
49 dbMk->SetAttr(
"blacklist",
"eemc");
50 dbMk->SetAttr(
"blacklist",
"mtd");
51 dbMk->SetAttr(
"blacklist",
"pmd");
52 dbMk->SetAttr(
"blacklist",
"tof");
53 dbMk->SetAttr(
"blacklist",
"etof");
54 dbMk->SetAttr(
"blacklist",
"rhicf");
55 dbMk->SetAttr(
"blacklist",
"Calibrations_rich");
58 cout <<
"fcsdbmkr="<<fcsdbmkr<<endl;
59 fcsdbmkr->setDbAccess(1);
62 cout <<
"fcsdb="<<fcsdb<<endl;
69 fcssim->setDebug(debug);
74 wff->setEnergySelect(0);
115 if (SiIneff) fstFastSim->SetInEfficiency(0.1);
119 cout <<
"Running FwdTracking with config: " << configFile << endl;
120 fwdTrack->SetConfigFile( configFile );
125 gSystem->Load(
"StFcsTrackMatchMaker");
127 TString matchfile(outfile); matchfile.ReplaceAll(
".root",
".match.root");
128 match->setFileName(matchfile.Data());
129 match->SetDebug(debug);
131 gSystem->Load(
"StFcsDiLeptonMaker");
132 StFcsDiLeptonMaker *dilep =
new StFcsDiLeptonMaker;
133 TString dilepfile(outfile); dilepfile.ReplaceAll(
".root",
".dilep.root");
134 dilep->setFileName(dilepfile.Data());
137 gSystem->Load(
"StEpdUtil");
138 gSystem->Load(
"StFcsEventDisplay");
140 fcsed->setMaxEvents(eventDisplay);
141 outfile.ReplaceAll(
".root",
".eventDisplay.png");
142 fcsed->setFileName(outfile.Data());
147 StMaker::lsMakers(chain);
148 chain->EventLoop(mnEvents,nEvents);
void setLeakyHcal(int v=1)
backward compatibility
void forceUniformGain(float ecal, float hcal=0.0053, float pres=0.01)
fixed default gaincorr
void forceUniformGainCorrection(float ecal, float hcal=1.0, float pres=0.5)