StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
bfcMixer_P07ib.C
1 //
3 // Macro for running chain with different inputs
4 //
5 // Owner: Yuri Fisyak
6 //
7 // $Id: bfcMixer_P07ib.C,v 1.9 2013/04/28 14:41:31 fisyak Exp $
8 //
10 
11 class StChain;
12 StChain *Chain=0;
13 class StBFChain;
14 StBFChain *chain1, *chain2, *chain3;
15 //_____________________________________________________________________
16 void bfcMixer_P07ib(const Int_t Nevents=1,
17  const Char_t *daqfile="/star/rcf/test/daq/2005/051/st_physics_adc_6051006_raw_1050001.daq",
18  const Char_t *tagfile="/star/rcf/test/embedding/cuProductionMinBias/FullField/P07ic/2005/051/st_physics_adc_6051006_raw_1050001.tags.root",
19  const Float_t zvertex_low=-175.0,
20  const Float_t zvertex_high=175.0,
21  const Char_t *mode="strange",
22  const Char_t *acc_mode="off" ) {
23  // production chain for P07ib
24  TString prodP07ib("P2005b DbV20070518 MakeEvent ITTF Iana ToF ssddat spt SsdIt SvtIt pmdRaw SCEbyE OGridLeak OShortR OSpaceZ2");// KeepSvtHit hitfilt skip1row");
25  TString geomP07ib("ry2005f");
26  TString chain1Opt("in magF tpcDb NoDefault -ittf NoOutput");
27  TString chain2Opt("NoInput PrepEmbed gen_T geomT sim_T trs -ittf -tpc_daq nodefault");
28  chain2Opt += " "; chain2Opt += geomP07ib;
29  TString chain3Opt = prodP07ib;
30  chain3Opt += " TpcMixer Embedding onlraw GeantOut MiniMcMk McAna -in NoInput,useInTracker,EmbeddingShortCut";
31  chain3Opt += " "; chain3Opt += geomP07ib;
32  // Dynamically link some shared libs
33  gROOT->LoadMacro("bfc.C");
34  if (gClassTable->GetID("StBFChain") < 0) Load();
35  //______________Create the main chain object______________________________________
36  Chain = new StChain("Embedding");
37  //________________________________________________________________________________
38  bfc(-1,chain1Opt,daqfile);
39  chain1 = chain;
40  chain1->SetName("One");
41  Chain->cd();
42  //________________________________________________________________________________
43  bfc(-1,chain2Opt);
44  chain2 = chain;
45  chain2->SetName("Two");
46  Chain->cd();
47  if (chain2->GetOption("TRS")){
48  StTrsMaker *trsMk = (StTrsMaker *) chain2->GetMaker("Trs");
49  if (! trsMk) {
50  cout << "Cannot find Trs in chain2" << endl;
51  return;
52  }
53  trsMk->setNormalFactor(2.67);
54  }
55  //________________________________________________________________________________
56  // gSystem->Load("StFtpcMixerMaker");
57  // StFtpcMixerMaker *ftpcmixer = new StFtpcMixerMaker("FtpcMixer","daq","trs");
58  //________________________________________________________________________________
59  TString OutputFileName(gSystem->BaseName(daqfile));
60  OutputFileName.ReplaceAll("*","");
61  OutputFileName.ReplaceAll(".daq","");
62  OutputFileName.Append("_emb.root");
63  bfc(-1,chain3Opt,0,OutputFileName);
64  chain3 = chain;
65  chain3->SetName("Three");
66  Chain->cd();
67  Chain->cd();
68  //________________________________________________________________________________
69  {
70  TDatime t;
71  gMessMgr->QAInfo() << Form("Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm;
72  }
73  gMessMgr->QAInfo() << Form("Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm;
74  gMessMgr->QAInfo() << Form("with %s", Chain->GetCVS()) << endm;
75  // embedded particle set
76  StPrepEmbedMaker *embMk = (StPrepEmbedMaker *) Chain->Maker("PrepEmbed");
77  if (! embMk) return;
78  embMk->SetTagFile(tagfile);
79  // pTlow,ptHigh,etaLow,etaHigh,phiLow,phiHigh
80  embMk->SetOpt( 0.1, 5., -1.3, 1.3, 0., 6.28);
81  // pid, mult
82  embMk->SetPartOpt( 8,0.05);
83  TAttr::SetDebug(0);
84  Chain->SetAttr(".Privilege",0,"*" ); //All makers are NOT priviliged
85  Chain->SetAttr(".Privilege",1,"StBFChain::*" ); //StBFChain is priviliged
86  Chain->SetAttr(".Privilege",1,"StIOInterFace::*" ); //All IO makers are priviliged
87  Chain->SetAttr(".Privilege",1,"St_geant_Maker::*"); //It is also IO maker
88  Chain->SetAttr(".Privilege",1,"StPrepEmbedMaker::*"); //It is also IO maker
89  // Chain->SetDEBUG(0);
90  if (Nevents < 0) return;
91  Int_t iInit = Chain->Init();
92  if (iInit >= kStEOF) {Chain->FatalErr(iInit,"on init"); return;}
93  StMaker *treeMk = Chain->GetMaker("outputStream");
94  Chain->EventLoop(Nevents,treeMk);
95  gMessMgr->QAInfo() << "Run completed " << endm;
96  gSystem->Exec("date");
97 }
98 
99 
Prepare GEANT Maker with input from embedding settings and DAQ event.
Definition: Stypes.h:43
virtual Int_t Load()
Routine handling library loading depending on chain options.
Definition: StBFChain.cxx:117