StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
runTrgsim.C
1 TString input_dir = "./";
2 //TString input_chain = "sdt20120601,fzin,geant,evout,y2013,FieldOn,logger,MakeEvent,McEvout,IdTruth,ReverseField,db,fmsDB,-tpcDB";
3 //TString input_chain = "sdt20130312,fzin,geant,evout,y2013,FieldOn,logger,MakeEvent,McEvout,IdTruth,ReverseField,db,fmsDB,-tpcDB";
4 TString input_chain = "sdt20150101,fzin,geant,evout,y2013,FieldOn,logger,MakeEvent,McEvout,IdTruth,ReverseField,db,fmsDB,-tpcDB";
5 
7 
8 void runTrgsim( Int_t nEvents=1000, Int_t run=1000, const char* pid="gamma",
9  TString myDir=input_dir, TString myChain=input_chain, Int_t mnEvents=1){
10 
11  gROOT->LoadMacro("bfc.C");
12  gROOT->Macro("loadMuDst.C");
13  TString myDat=Form("test_%s_run%i.fzd",pid,run);
14  bfc( -1, myChain, myDir+myDat );
15  {
16  TString outfile = chain->GetFileOut();
17  outfile.Prepend("reco_");
18  chain->SetOutputFile(outfile);
19  }
20 
21  StFmsDbMaker* fmsdb = (StFmsDbMaker*) chain->GetMaker("fmsDb");
22  fmsdb->forceUniformGainCorrection(1.0);
23  //fmsdb->forceUniformGain(0.038);
24  fmsdb->setDebug(2);
25 
26  gSystem->Load("StFmsFastSimulatorMaker");
28  fmssim->SetDebug();
29 
30  gSystem->Load("StFmsTriggerMaker");
31  //StFmsTriggerMaker *fmstrg = new StFmsTriggerMaker();
32  //fmstrg->useStEvent();
33  //fmstrg->forceRunNumber(16000000);
34  //fmstrg->overwriteThr("FMS-JP2",30);
35 
36  /*
37  gSystem->Load("StFmsTrgEvalMaker");
38  StFmsTrgEvalMaker* evl = new StFmsTrgEvalMaker();
39  chain->GetFileOut();
40  {
41  TString outfile = chain->GetFileOut();
42  outfile.ReplaceAll(".root","");
43  evl->setFileName(outfile.Data());
44  }
45  */
46 
47  chain->Init();
48  StMaker::lsMakers(chain);
49  chain->EventLoop(mnEvents,nEvents);
50  chain->Finish();
51 }
void setDebug(Int_t debug)
debug mode, 0 for minimal message, >0 for more debug messages
virtual Int_t Finish()
Definition: StChain.cxx:85
void forceUniformGainCorrection(float v)
force gain to be specified value
Definition: StFmsDbMaker.h:223