//_____________________________________________________________________ void bfcMixer_pythia(const Int_t Nevents = 1000, const Char_t *daqfile = "@run10148002.list", const Char_t *fzdfile = "eliza14/SL11d_embed/10148002/pt11_15_10148002_1.fzd", const Char_t *prodName = "P11idpp200RFF", const Char_t *DbVoption = "DbV20120908,DbV20120908_EMC_Calibrations,DbV20120908_EEMC_Calibrations", const Char_t *flag = "W") { // Production chains for P08ic - p+p, Au+Au 9 GeV and d+Au TString prodP08iepp("DbV20081117 B2008a ITTF IAna ppOpt l3onl emcDY2 fpd ftpc trgd ZDCvtx NosvtIT NossdIT Corr4 OSpaceZ2 OGridLeak3D VFMCE -hitfilt"); TString prodP08iedAu("DbV20090213 P2008 ITTF OSpaceZ2 OGridLeak3D beamLine VFMCE TpxClu -VFMinuit -hitfilt"); TString prodP10iapp("DbV20091001 pp2009c TpcRS ITTF OSpaceZ2 OGridLeak3D beamLine, VFMCE TpcRS -VFMinuit -hitfilt"); // BES Run10 chains TString prodP10ihAuAu39("DbV20100909 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt"); TString prodP10ihAuAu11("DbV20100821 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt"); TString prodP10ihAuAu7("DbV20100821 P2010a,btof,BEmcChkStat,Corr4,OSpaceZ2,OGridLeak3D,VFMCE TpxClu -VFMinuit -hitfilt"); // Run 9 500 GeV chain for W from Jan Balewski TString prodP09igpp500("DbV20101215 OGGVoltErr pp2009c ITTF VFPPVnoCTB BEmcChkStat beamLine Corr4 OSpaceZ2 OGridLeak3D -dstout -evout"); // Run 9 200 GeV chain for jet embedding TString prodP10icpp200("pp2009c ITTF VFPPVnoCTB beamLine BEmcChkStat btof fmsdat Corr4 OSpaceZ2 OGridLeak3D"); // Run 9 200 GeV FF chain // NOTE: "Sti" needs to be added for this chain to work !!! TString prodP11idpp200FF("DbV20120622 pp2009d ITTF Sti VFPPVnoCTB beamLine BEmcChkStat btof fmsdat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // Run 9 pp200 RFF chain // Added "Sti" just in case TString prodP11idpp200RFF("DbV20120908 pp2009d ITTF Sti VFPPVnoCTB beamLine BEmcChkStat btof fmsdat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // Run 11 500 GeV chain for jet embedding TString prodP11idpp500("DbV20110923 pp2011a Sti btof mtddat fmsdat VFPPVnoCTB beamline -evout BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // Added "Sti" to fix ppv error and remove AgML to fix the VMC error? TString prodP12icpp510("DbV20120816 pp2012b Sti VFPPVnoCTB beamline BEmcChkStat mtdDat btof fmsDat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // Run 12 pp510 chain for W "preview" production TString prodP13ibpp510("DbV20130502 pp2012b Sti btof fmsDat VFPPVnoCTB beamline BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // Run 12 pp510 chain for W final production // TString prodP14iapp510("DbV20140222 pp2013a mtd btof fmsDat fgt fgtPoint VFPPVnoCTB beamline BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // Run 13 pp510 chain exactly as listed on webpage TString prodP14iapp510("DbV20140222 pp2013a btof fmsDat fgt fgtPoint KFVertex BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // chain for KFvertex from Lidia // Construct our embedding option list based on official production chain for // pp 500GeV run 2013 production for days129-161 (part 2) with HFT inserted in STAR detector: // DbV20140905 pp2013b mtd btof fmsDat fgt fgtPoint VFPPVnoCTB beamline StiHftP BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D -hitfilt TString prodP14igpp510("DbV20140905 pp2013b mtd btof fmsDat fgt fgtPoint VFPPVnoCTB beamline StiHftP BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D -hitfilt -evout IdTruth"); //added by S.F. 2013; Sti added by J.D. 20130729 TString prodP11idpp500("DbV20110923 pp2011a Sti btof mtddat fmsdat VFPPVnoCTB beamline -evout BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D -hitfilt"); // TString prodP11idpp500("DbV20110923 pp2011a btof mtddat fmsdat BEmcChkStat Corr4 OSpaceZ2 OGridLeak3D VFMCE TpxClu -hitfilt"); // from Lidia // Additional tags needed for embedding prodP09igpp500 += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP10icpp200 += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP11idpp200FF += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP11idpp200RFF += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP11idpp500 += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP12icpp510 += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP13ibpp510 += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP14iapp510 += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; prodP14igpp510 += " TpxClu -VFMinuit VFPPVnoCTB beamLine -hitfilt"; TString geomP08ic("ry2008"); TString geomP10ih("ry2010"); TString geomP09ig("ry2009a"); TString geomP10ic("ry2009a"); TString geomP11id("ry2009d"); TString geomP11idpp500("ry2011"); TString geomP12ic("ry2012a"); TString geomP13ib("ry2012a"); TString geomP14ia("ry2013_2c"); TString geomP14ig("ry2013_1c"); TString chain1Opt("in,magF,tpcDb,NoDefault,TpxRaw,-ittf,NoOutput"); TString chain2Opt("fzin,gen_T,geomT,sim_T,TpcRS,-ittf,-tpc_daq,nodefault"); chain2Opt += " "; TString chain3Opt; if (prodName == "P08icpp") { chain3Opt = prodP08icpp; chain2Opt += geomP08ic; } else if (prodName == "P08iepp") { chain3Opt = prodP08iepp; chain2Opt += geomP08ic; } else if (prodName == "P08icAuAu9") { chain3Opt = prodP08icAuAu9; chain2Opt += geomP08ic; } else if (prodName == "P08icdAu") { chain3Opt = prodP08icdAu; chain2Opt += geomP08ic; } else if (prodName == "P08iedAu") { chain3Opt = prodP08iedAu; chain2Opt += geomP08ic; } else if (prodName == "P08icAuAu200") { chain3Opt = prodP08icAuAu200; chain2Opt += geomP08ic; } else if (prodName == "P10iapp") { chain3Opt = prodP10iapp; chain2Opt += geomP10ih; } else if (prodName == "P10ihAuAu39") { chain3Opt = prodP10ihAuAu39; chain2Opt += geomP10ih; } else if (prodName == "P10ihAuAu11") { chain3Opt = prodP10ihAuAu11; chain2Opt += geomP10ih; } else if (prodName == "P10ihAuAu7") { chain3Opt = prodP10ihAuAu7; chain2Opt += geomP10ih; } else if (prodName == "P09igpp500") { chain3Opt = prodP09igpp500; chain2Opt += geomP09ig; } else if (prodName == "P10icpp200") { chain3Opt = prodP10icpp200; chain2Opt += geomP10ic; } else if (prodName == "P11idpp200FF") { chain3Opt = prodP11idpp200FF; chain2Opt += geomP11id; } else if (prodName == "P11idpp200RFF") { chain3Opt = prodP11idpp200RFF; chain2Opt += geomP11id; } else if (prodName == "P12icpp510") { chain3Opt = prodP12icpp510; chain2Opt += geomP12ic; } else if (prodName == "P13ibpp510") { chain3Opt = prodP13ibpp510; chain2Opt += geomP13ib; } else if (prodName == "P11idpp500") { chain3Opt = prodP11idpp500; chain2Opt += geomP11id; } // S.F. else if (prodName == "P14iapp510") { chain3Opt = prodP14iapp510; chain2Opt += geomP14ia; } // JLD else if (prodName == "P14iapp500RFF"){ chain3Opt = prodP14iapp500RFF; chain2Opt += geomP14ia; } else if (prodName == "P14igpp510") { chain3Opt = prodP14igpp510; chain2Opt += geomP14ig; chain1Opt += ",useXgeom"; } else if (prodName == "P11idpp500") { chain3Opt = prodP11idpp500; chain2Opt += geomP11idpp500; } else { cout << "Choice prodName " << prodName << " does not correspond to known chain. Processing impossible." << endl; return; } chain3Opt.Prepend(DbVoption); chain3Opt += ",Embedding,TpcMixer,GeantOut,McAna,-in,NoInput,useInTracker"; chain3Opt += ","; //chain3Opt += " "; if (prodName == "P08icpp") { chain3Opt += geomP08ic; } else if (prodName == "P08iepp") { chain3Opt += geomP08ic; } else if (prodName == "P08icAuAu9") { chain3Opt += geomP08ic; } else if (prodName == "P08icdAu") { chain3Opt += geomP08ic; } else if (prodName == "P08iedAu") { chain3Opt += geomP08ic; } else if (prodName == "P08icAuAu200") { chain3Opt += geomP08ic; } else if (prodName == "P10iapp") { chain3Opt += geomP10ih; } else if (prodName == "P10ihAuAu39") { chain3Opt += geomP10ih; } else if (prodName == "P10ihAuAu11") { chain3Opt += geomP10ih; } else if (prodName == "P10ihAuAu7") { chain3Opt += geomP10ih; } else if (prodName == "P09igpp500") { chain3Opt += geomP09ig; } else if (prodName == "P10icpp200") { chain3Opt += geomP10ic; } else if (prodName == "P11idpp200FF") { chain3Opt += geomP11id; } else if (prodName == "P11idpp200RFF") { chain3Opt += geomP11id; } else if (prodName == "P11idpp500") { chain3Opt += geomP11idpp500; } else if (prodName == "P12icpp510") { chain3Opt += geomP12ic; } else if (prodName == "P13ibpp510") { chain3Opt += geomP13ib; } else if (prodName == "P11idpp500") { chain3Opt += geomP11id; } // S.F. else if (prodName == "P14iapp510") { chain3Opt += geomP14ia; } // S.F. else if (prodName == "P14igpp510") { chain3Opt += ""; } else { cout << "Choice prodName " << prodName << " does not correspond to known chain. Processing impossible. " << endl; return; } // Add BEMC simulators to chain chain3Opt += ",emcSim"; // Add EEMC fast simulator to chain chain3Opt += ",EEfs"; EmbeddingReco(Nevents, daqfile, fzdfile, chain1Opt.Data(), chain2Opt.Data(), chain3Opt.Data(), flag); }
//_____________________________________________________________________ void bfcMixer_TpcSvtSsd(const Int_t Nevents=500,Int_t isSvtIn=1, Int_t isSsdIn=1, const Char_t *daqfile="/star/rcf/test/daq/2007/113/8113044/st_physics_8113044_raw_1040042.daq", const Char_t *tagfile="/star/rcf/test/embedding/2007ProductionMinBias/FullField/P08if/2007/113/8113044/st_physics_8113044_raw_1040042.tags.root", const Double_t pt_low=0.1, const Double_t pt_high=5.0, const Double_t eta_low=-1.1, const Double_t eta_high=1.1, const Double_t vzlow=-175.0, const Double_t vzhigh=175.0, const Int_t pid=8, const Double_t mult = 100., const std::vector<Int_t> triggers = 0, const Char_t* prodName = "P08icAuAu", const Char_t* mode="flatpt" ) { // Separate DB timestamp to add it in both chain1 and chain3 TString DbVP06idpp("DbV20060729 "); TString DbVP07icCuCu("DbV20070518 "); TString DbVP08icAuAu("DbV20080418 "); // production chains for P06id - p+p 200 GeV (Run6) TString prodP06idpp("pp2006b ITTF OSpaceZ2 OGridLeak3D VFMCE -VFPPVnoCTB -hitfilt"); // production chain for P07ib // TString prodP07ib("P2005b DbV20070518 MakeEvent ITTF Iana ToF spt SsdIt SvtIt pmdRaw SCEbyE OGridLeak OShortR OSpaceZ2 ssd_daq");// KeepSvtHit hitfilt skip1row"); // production chain for P07ic - Cu+Cu 200 GeV (Run5) TString prodP07icCuCu("P2005b DbV20070518 MakeEvent ITTF ToF ssddat spt SsdIt SvtIt pmdRaw OGridLeak OShortR OSpaceZ2 KeepSvtHit skip1row VFMCE -VFMinuit -hitfilt"); // production chain for P08if // TString prodP08if("B2007g DbV20080418 adcOnly MakeEvent ITTF Iana ToF spt SsdIt SvtIt pmdRaw SCEbyE OShortR trgd Corr5 OSpaceZ2 ssd_daq KeepSvtHit -hitfilt VFMCE");// KeepSvtHit hitfilt skip1row"); // Production chain for P08ic Au+Au 200 GeV (Run7) TString prodP08icAuAu("B2007g ITTF adcOnly IAna KeepSvtHit VFMCE -hitfilt l3onl emcDY2 fpd ftpc trgd ZDCvtx svtIT ssdIT Corr5 -dstout"); TString geomP06id("ry2006"); TString geomP07ic("ry2005f"); TString geomP08ic("ry2007g"); // TString chain1Opt("in magF tpcDb adcOnly NoDefault -ittf NoOutput"); TString chain1Opt("in magF tpcDb NoDefault -ittf NoOutput"); TString chain2Opt("NoInput PrepEmbed gen_T geomT sim_T trs -ittf -tpc_daq nodefault"); TString chain3Opt(""); if( prodName == "P06idpp") { chain1Opt.Prepend(DbVP06idpp); chain2Opt += " "; chain2Opt += geomP06id; chain3Opt = prodP06idpp ; } else if( prodName == "P07ic" ){ chain1Opt.Prepend(DbVP07icCuCu); chain2Opt += " "; chain2Opt += geomP07ic; chain3Opt = prodP07icCuCu; } else if ( prodName == "P08icAuAu" ){ chain1Opt.Prepend(DbVP08icAuAu); chain2Opt += " "; chain2Opt += geomP08ic; chain3Opt = prodP08icAuAu ; } else{ cout << "Choice prodName does not correspond to known chain. Processing impossible. " << endl; return; } // chain3Opt += " Embedding onlraw GeantOut MiniMcMk McAna IdTruth -in NoInput,useInTracker EmbeddingShortCut"; // chain3Opt += " Embedding onlraw McEvent McEvOut GeantOut MiniMcMk McAna IdTruth -in NoInput,useInTracker -hitfilt EmbeddingShortCut"; chain3Opt += " TpcMixer Embedding onlraw McEvent McEvOut GeantOut MiniMcMk McAna IdTruth -in NoInput,useInTracker -hitfilt -TrsPileUp -TrsToF"; // chain3Opt += " Embedding onlraw McEvent McEvOut GeantOut IdTruth -in NoInput -hitfilt EmbeddingShortCut"; if (isSvtIn) chain3Opt += " SvtEmbed"; if (isSsdIn) { chain1Opt += ",ssddat"; chain2Opt += ",ssd,McEvent,-spt"; chain3Opt += ",SsdEmbed"; } if( prodName == "P06idpp") { chain3Opt.Prepend(DbVP06idpp); chain3Opt += " "; chain3Opt += geomP06id; } else if( prodName == "P07ic" ){ chain3Opt.Prepend(DbVP07icCuCu); chain3Opt += " "; chain3Opt += geomP07ic; } else if ( prodName == "P08icAuAu" ){ chain3Opt.Prepend(DbVP08icAuAu); chain3Opt += " "; chain3Opt += geomP08ic; } else{ cout << "Choice prodName does not correspond to known chain. Processing impossible. " << endl; return; } // Dynamically link some shared libs gROOT->LoadMacro("bfc.C"); if (gClassTable->GetID("StBFChain") < 0) Load(); //______________Create the main chain object______________________________________ Chain = new StChain("Embedding"); //________________________________________________________________________________ bfc(-1,chain1Opt,daqfile); chain1 = chain; chain1->SetName("One"); Chain->cd(); //________________________________________________________________________________ bfc(-1,chain2Opt); chain2 = chain; chain2->SetName("Two"); Chain->cd(); if (chain2->GetOption("TRS")){ StTrsMaker *trsMk = (StTrsMaker *) chain2->GetMaker("Trs"); if (! trsMk) { cout << "Cannot find Trs in chain2" << endl; return; } trsMk->setNormalFactor(1.05); trsMk->SetMode(0); } //________________________________________________________________________________ // gSystem->Load("StFtpcMixerMaker"); // StFtpcMixerMaker *ftpcmixer = new StFtpcMixerMaker("FtpcMixer","daq","trs"); //________________________________________________________________________________ TString OutputFileName(gSystem->BaseName(daqfile)); OutputFileName.ReplaceAll("*",""); OutputFileName.ReplaceAll(".daq",""); // OutputFileName.Append("_emb.root"); OutputFileName.Append(".root"); bfc(-1,chain3Opt,0,OutputFileName); chain3 = chain; chain3->SetName("Three"); Chain->cd(); Chain->cd(); //________________________________________________________________________________ { TDatime t; gMessMgr->QAInfo() << Form("Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm; } gMessMgr->QAInfo() << Form("Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm; gMessMgr->QAInfo() << Form("with %s", Chain->GetCVS()) << endm; // embedded particle set StPrepEmbedMaker *embMk = (StPrepEmbedMaker *) Chain->Maker("PrepEmbed"); if (! embMk) return; embMk->SetTagFile(tagfile); // pTlow,ptHigh,etaLow,etaHigh,phiLow,phiHigh embMk->SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185, mode); // pid, mult embMk->SetPartOpt( pid,mult); // Set Skip mode (default is OFF) embMk->SetSkipMode(kFALSE) ; // Make trigger and z-vertex cuts (only if SkipMode is true) // Trigger cut // Can put multiple trigger id's if ( !triggers.empty() ){ for(std::vector<Int_t>::iterator iter = triggers.begin(); iter != triggers.end(); iter++){ embMk->SetTrgOpt((*iter)) ; } } // z-vertex cuts embMk->SetZVertexCut(vzlow, vzhigh) ; TAttr::SetDebug(0); Chain->SetAttr(".Privilege",0,"*" ); //All makers are NOT priviliged Chain->SetAttr(".Privilege",1,"StBFChain::*" ); //StBFChain is priviliged Chain->SetAttr(".Privilege",1,"StIOInterFace::*" ); //All IO makers are priviliged Chain->SetAttr(".Privilege",1,"St_geant_Maker::*"); //It is also IO maker Chain->SetAttr(".Privilege",1,"StPrepEmbedMaker::*"); //It is also IO maker StMaker *SsdEmbed = Chain->Maker("SsdEmbed"); if (SsdEmbed) { cout << "SsdEmbed has been found ----------------------------------------" << endl; SsdEmbed->SetInput("SsdRealData","One/.make/SpaStrip/.data/spa_strip"); SsdEmbed->SetInput("SsdSimuData","Two/.make/SpaStrip/.data/spa_strip"); StMaker *SsdPoint = Chain->Maker("SsdPoint"); if (SsdPoint) { cout << "SsdPoint has been found----------------------------------------" << endl; SsdPoint->SetInput("SpaStrip","SsdEmbed"); } } // Chain->SetDEBUG(0); if (Nevents < 0) return; Int_t iInit = Chain->Init(); if (iInit >= kStEOF) {Chain->FatalErr(iInit,"on init"); return;} StMaker *treeMk = Chain->GetMaker("outputStream"); Chain->EventLoop(Nevents,treeMk); gMessMgr->QAInfo() << "Run completed " << endm; gSystem->Exec("date"); }
//_____________________________________________________________________ void bfcMixer_Ftpc(const Int_t Nevents=20, const Char_t *daqfile="/star/rcf/test/daq/2008/emb/st_fmsslow_adc_9069059_raw_1520001.daq", const Char_t *tagfile="/star/rcf/test/daq/2008/emb/daqtags/st_fmsslow_adc_9069059_raw_1520001.tags.root", const Double_t pt_low=0.2, const Double_t pt_high=0.5, const Double_t eta_low=2.25, const Double_t eta_high=4.45, const Double_t vzlow = -50.0, const Double_t vzhigh = 50.0, const Int_t pid=8, const Double_t mult=1, const std::vector<Int_t> triggers = 0, const Char_t *prodName = "P08iepp", const Char_t* type = "FlatPt") { // production chains for P08ic - p+p, Au+Au 9 GeV and d+Au TString prodP08iepp("DbV20081117 B2008a ITTF IAna ppOpt l3onl emcDY2 fpd ftpc trgd ZDCvtx NosvtIT NossdIT Corr4 OSpaceZ2 OGridLeak3D VFMCE -hitfilt"); // TString prodP08icpp("DbV20080712,pp2008,ITTF,OSpaceZ2,OGridLeak3D,beamLine,VFMCE,TpxClu -VFPPV -hitfilt"); // TString prodP08icAuAu9("DbV20080709 P2008 ITTF VFMCE -hitfilt"); // TString prodP08icAuAu200("DbV20070101 P2008 ITTF VFMCE -hitfilt"); // TString prodP08icdAu("DbV20080712 P2008 ITTF OSpaceZ2 OGridLeak3D beamLine, VFMCE TpxClu -VFMinuit -hitfilt"); TString prodP08iedAu("DbV20090213 P2008 ITTF OSpaceZ2 OGridLeak3D beamLine VFMCE TpxClu -VFMinuit -hitfilt"); TString prodP10iapp("DbV20091001 pp2009c TpcRS ITTF OSpaceZ2 OGridLeak3D beamLine, VFMCE TpcRS -VFMinuit -hitfilt"); TString geomP08ic("ry2008"); TString chain1Opt("in,magF,tpcDb,NoDefault,TpxRaw,-ittf,NoOutput"); // TString chain2Opt("NoInput,PrepEmbed,gen_T,geomT,sim_T,TpcRS,-ittf,-tpc_daq,nodefault"); TString chain2Opt("NoInput,PrepEmbed,gen_T,geomT,sim_T,ftpcT,trs,fss,-ittf,-tpc_daq,nodefault"); chain2Opt += " "; chain2Opt += geomP08ic; TString chain3Opt(""); if (prodName == "P08icpp") { chain3Opt = prodP08icpp; } else if (prodName == "P08iepp") { chain3Opt = prodP08iepp; } else if (prodName == "P08icAuAu9") { chain3Opt = prodP08icAuAu9; } else if (prodName == "P08icdAu") { chain3Opt = prodP08icdAu; } else if (prodName == "P08iedAu") { chain3Opt = prodP08iedAu; } else if (prodName == "P08icAuAu200") { chain3Opt = prodP08icAuAu200; } else if (prodName == "P10iapp") { chain3opt = prodP10iapp; } else { cout << "Choice prodName does not correspond to known chain. Processing impossible. " << endl; return; } chain3Opt += ",Embedding,TpcMixer,GeantOut,MiniMcMk,McAna,-in,NoInput,useInTracker"; chain3Opt += ","; chain3Opt += geomP08ic; // Dynamically link some shared libs gROOT->LoadMacro("bfc.C"); if (gClassTable->GetID("StBFChain") < 0) Load(); //______________Create the main chain object______________________________________ Chain = new StChain("Embedding"); //________________________________________________________________________________ bfc(-1,chain1Opt,daqfile); chain1 = chain; chain1->SetName("One"); Chain->cd(); //________________________________________________________________________________ bfc(-1,chain2Opt); chain2 = chain; chain2->SetName("Two"); Chain->cd(); #if 1 if (chain2->GetOption("TRS")) { StTrsMaker *trsMk = (StTrsMaker *) chain2->GetMaker("Trs"); if (! trsMk) { cout << "Cannot find Trs in chain2" << endl; return; } trsMk->setNormalFactor(1.32); trsMk->SetMode(0); } #endif //________________________________________________________________________________ gSystem->Load("StFtpcMixerMaker"); StFtpcMixerMaker *ftpcmixer = new StFtpcMixerMaker("FtpcMixer","daq","fss"); ftpcmixer->SetInput("Input1","StDAQReader"); ftpcmixer->SetInput("Input2","Event"); //________________________________________________________________________________ TString OutputFileName(gSystem->BaseName(daqfile)); OutputFileName.ReplaceAll("*",""); OutputFileName.ReplaceAll(".daq",""); // OutputFileName.Append("_emb.root"); OutputFileName.Append(".root"); bfc(-1,chain3Opt,0,OutputFileName); chain3 = chain; chain3->SetName("Three"); Chain->cd(); //________________________________________________________________________________ StTpcMixerMaker *mixer = (StTpcMixerMaker *) chain3->Maker("TpcMixer"); if( prodName == "P08icAuAu200") { mixer->SetInput("Input1","MixerEvent"); } else { mixer->SetInput("Input1","TpxRaw/.data/Event"); } mixer->SetInput("Input2","Trs/.const/Event"); Chain->cd(); #if 0 //............. begin of EMC embedding makers................ //.............. Add BEmc stuff here .................... gSystem->Load("StEmcSimulatorMaker"); gSystem->Load("StEmcMixerMaker"); gSystem->Load("StEEmcSimulatorMaker"); StMcEventMaker* mcEventMaker = new StMcEventMaker(); StEmcSimulatorMaker *bemcSim = new StEmcSimulatorMaker(); StEmcMixerMaker *bemcMixer = new StEmcMixerMaker(); chain3->AddAfter("emcRaw",bemcMixer); chain3->AddAfter("emcRaw",bemcSim); chain3->AddAfter("emcRaw",mcEventMaker); bemcMixer->SetDebug(0); // set it to 1 for more printouts // note, Barrel slow sim is always ON, said Adam //........... Add EEmc Stuff ( Simu, and Mixer) here .............. StEEmcFastMaker *eemcFastSim = new StEEmcFastMaker(); StEEmcMixerMaker *eemcMixer = new StEEmcMixerMaker(); /* position B+E EMC makers in the chain (order is reverse because 'After' is used - looks funny but is right) */ chain3->AddAfter("emcRaw",eemcMixer); chain3->AddAfter("emcRaw",eemcFastSim); eemcFastSim->SetEmbeddingMode(); // eemcFastSim->SetDebug(); // eemcMixer->SetDebug(); bool useEndcapSlowSim = true; if(useEndcapSlowSim) { // turn Endcap slow simu On/Off StEEmcSlowMaker *slowSim=new StEEmcSlowMaker(); chain3->AddAfter("EEmcFastSim",slowSim); slowSim->setEmbeddingMode(); } #endif //________________________________________________________________________________ { TDatime t; gMessMgr->QAInfo() << Form("Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm; } gMessMgr->QAInfo() << Form("Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm; gMessMgr->QAInfo() << Form("with %s", Chain->GetCVS()) << endm; // embedded particle set StPrepEmbedMaker *embMk = (StPrepEmbedMaker *) Chain->Maker("PrepEmbed"); if (! embMk) return; cout << "bfcMixer: Setting PID: "<<pid<<endl; embMk->SetTagFile(tagfile); // pTlow,ptHigh,etaLow,etaHigh,phiLow,phiHigh embMk->SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185, type); // pid, mult embMk->SetPartOpt( pid,mult); // Default is no event selections embMk->SetSkipMode(kTRUE); // Make trigger and z-vertex cuts (only if SkipMode is true) // Trigger cut // Can put multiple trigger id's if ( !triggers.empty() ) { for(std::vector<Int_t>::iterator iter = triggers.begin(); iter != triggers.end(); iter++) { embMk->SetTrgOpt((*iter)) ; } } // z-vertex cuts embMk->SetZVertexCut(vzlow, vzhigh) ; TAttr::SetDebug(0); Chain->SetAttr(".Privilege",0,"*" ); //All makers are NOT priviliged Chain->SetAttr(".Privilege",1,"StBFChain::*" ); //StBFChain is priviliged Chain->SetAttr(".Privilege",1,"StIOInterFace::*" ); //All IO makers are priviliged Chain->SetAttr(".Privilege",1,"St_geant_Maker::*"); //It is also IO maker Chain->SetAttr(".Privilege",1,"StPrepEmbedMaker::*"); //It is also IO maker // Chain->SetDEBUG(0); if (Nevents < 0) return; Int_t iInit = Chain->Init(); if (iInit >= kStEOF) { Chain->FatalErr(iInit,"on init"); return; } StMaker *treeMk = Chain->GetMaker("outputStream"); Chain->EventLoop(Nevents,treeMk); gMessMgr->QAInfo() << "Run completed " << endm; gSystem->Exec("date"); }
//_____________________________________________________________________ void bfcMixer_TpcSvtSsd2005(const Int_t Nevents=100,Int_t isSvtIn=1, Int_t isSsdIn=1, const Char_t *daqfile="/star/rcf/test/daq/2005/051/st_physics_adc_6051006_raw_1050001.daq", const Char_t *tagfile="/star/rcf/test/embedding/cuProductionMinBias/FullField/P07ic/2005/051/st_physics_adc_6051006_raw_1050001.tags.root", const Double_t pt_low=0.1, const Double_t pt_high=5.0, const Double_t eta_low=-1.0, const Double_t eta_high=1.0, const Int_t pid=9, const Double_t mult = 0.1) { // production chain for P07ib TString prodP07ib("P2005b DbV20070518 MakeEvent ITTF Iana ToF spt SsdIt SvtIt pmdRaw SCEbyE OGridLeak OShortR OSpaceZ2 ssd_daq");// KeepSvtHit hitfilt skip1row"); TString geomP07ib("ry2005f"); TString chain1Opt("in magF tpcDb NoDefault -ittf NoOutput"); TString chain2Opt("NoInput PrepEmbed gen_T geomT sim_T trs -ittf -tpc_daq nodefault"); chain2Opt += " "; chain2Opt += geomP07ib; TString chain3Opt = prodP07ib; chain3Opt += " TpcMixer Embedding onlraw GeantOut MiniMcMk McAna IdTruth -in NoInput,useInTracker EmbeddingShortCut"; if (isSvtIn) chain3Opt += " SvtEmbed"; if (isSsdIn) { chain1Opt += ",ssddat"; chain2Opt += ",ssd,McEvent,-spt"; chain3Opt += ",SsdEmbed"; } chain3Opt += " "; chain3Opt += geomP07ib; // Dynamically link some shared libs gROOT->LoadMacro("bfc.C"); if (gClassTable->GetID("StBFChain") < 0) Load(); //______________Create the main chain object______________________________________ Chain = new StChain("Embedding"); //________________________________________________________________________________ bfc(-1,chain1Opt,daqfile); chain1 = chain; chain1->SetName("One"); Chain->cd(); //________________________________________________________________________________ bfc(-1,chain2Opt); chain2 = chain; chain2->SetName("Two"); Chain->cd(); if (chain2->GetOption("TRS")){ StTrsMaker *trsMk = (StTrsMaker *) chain2->GetMaker("Trs"); if (! trsMk) { cout << "Cannot find Trs in chain2" << endl; return; } trsMk->setNormalFactor(2.67); } //________________________________________________________________________________ // gSystem->Load("StFtpcMixerMaker"); // StFtpcMixerMaker *ftpcmixer = new StFtpcMixerMaker("FtpcMixer","daq","trs"); //________________________________________________________________________________ TString OutputFileName(gSystem->BaseName(daqfile)); OutputFileName.ReplaceAll("*",""); OutputFileName.ReplaceAll(".daq",""); // OutputFileName.Append("_emb.root"); OutputFileName.Append(".root"); bfc(-1,chain3Opt,0,OutputFileName); chain3 = chain; chain3->SetName("Three"); Chain->cd(); Chain->cd(); //________________________________________________________________________________ { TDatime t; gMessMgr->QAInfo() << Form("Run is started at Date/Time %i/%i",t.GetDate(),t.GetTime()) << endm; } gMessMgr->QAInfo() << Form("Run on %s in %s",gSystem->HostName(),gSystem->WorkingDirectory()) << endm; gMessMgr->QAInfo() << Form("with %s", Chain->GetCVS()) << endm; // embedded particle set StPrepEmbedMaker *embMk = (StPrepEmbedMaker *) Chain->Maker("PrepEmbed"); if (! embMk) return; embMk->SetTagFile(tagfile); // pTlow,ptHigh,etaLow,etaHigh,phiLow,phiHigh embMk->SetOpt( pt_low, pt_high, eta_low, eta_high, 0., 6.283185); // pid, mult embMk->SetPartOpt( pid,mult); TAttr::SetDebug(0); Chain->SetAttr(".Privilege",0,"*" ); //All makers are NOT priviliged Chain->SetAttr(".Privilege",1,"StBFChain::*" ); //StBFChain is priviliged Chain->SetAttr(".Privilege",1,"StIOInterFace::*" ); //All IO makers are priviliged Chain->SetAttr(".Privilege",1,"St_geant_Maker::*"); //It is also IO maker Chain->SetAttr(".Privilege",1,"StPrepEmbedMaker::*"); //It is also IO maker StMaker *SsdEmbed = Chain->Maker("SsdEmbed"); if (SsdEmbed) { cout << "SsdEmbed has been found ----------------------------------------" << endl; SsdEmbed->SetInput("SsdRealData","One/.make/SpaStrip/.data/spa_strip"); SsdEmbed->SetInput("SsdSimuData","Two/.make/SpaStrip/.data/spa_strip"); StMaker *SsdPoint = Chain->Maker("SsdPoint"); if (SsdPoint) { cout << "SsdPoint has been found----------------------------------------" << endl; SsdPoint->SetInput("SpaStrip","SsdEmbed"); } } // Chain->SetDEBUG(0); if (Nevents < 0) return; Int_t iInit = Chain->Init(); if (iInit >= kStEOF) {Chain->FatalErr(iInit,"on init"); return;} StMaker *treeMk = Chain->GetMaker("outputStream"); Chain->EventLoop(Nevents,treeMk); gMessMgr->QAInfo() << "Run completed " << endm; gSystem->Exec("date"); }