8 TString jetTreeDir =
"";
11 void readWtree(
const Char_t *fileList=
"./R13104003.lis",
int etaBin=8,
int maxEvents=1e8,
bool spinSort=
true)
14 if(etaBin==8) isZ=
true;
17 gROOT -> LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
18 loadSharedLibraries();
19 assert( !gSystem->Load(
"StDetectorDbMaker"));
20 assert( !gSystem->Load(
"StTpcDb"));
21 assert( !gSystem->Load(
"StDbUtilities"));
22 assert( !gSystem->Load(
"StDbBroker"));
23 assert( !gSystem->Load(
"St_db_Maker"));
24 assert( !gSystem->Load(
"StEEmcUtil"));
25 assert( !gSystem->Load(
"StWalgo2011"));
26 assert( !gSystem->Load(
"StSpinDbMaker"));
27 assert( !gSystem->Load(
"StJets"));
28 assert( !gSystem->Load(
"StJetEvent"));
32 TObjArray* HListZ=
new TObjArray;
33 TObjArray* HListEta=
new TObjArray;;
36 float etaLow[9] = {-1.1,-0.5, 0.0, 0.5, 1.0, -2.0, 0.7,-1.5,-1.5};
37 float etaHigh[9] = {-0.5, 0.0, 0.5, 1.1, 2.0, -1.0, 2.5, 2.0, 2.0};
41 wTreeMk->setJetTreeBranch(
"AntiKtR060NHits12",
"AntiKtR060NHits12_noEEMC");
44 wTreeMk->setWbosonCuts(25., 0.88, 14., etaLow[etaBin-1], etaHigh[etaBin-1]);
45 wTreeMk->setE_WbosonCuts(25., 0.85, 20., etaLow[etaBin-1], etaHigh[etaBin-1]);
46 wTreeMk->setHList(HListEta);
47 wTreeMk->setMaxDisplayEve(1e6);
54 lumiMk->setHList(HListEta);
55 lumiMk->attachWalgoMaker(wTreeMk);
60 for(
int kk=0;kk<mxSM;kk++) {
61 char ttx[100]; sprintf(ttx,
"%cEta%dspin",
'A'+kk,etaBin);
62 printf(
"add spinMaker %s %d \n",ttx,kk);
64 spinMkA[kk]->attachWalgoMaker(wTreeMk);
65 spinMkA[kk]->setHList(HListEta);
67 spinMkA[kk]->setEta(etaLow[etaBin-1],etaHigh[etaBin-1]);
68 spinMkA[kk]->setEtaE(etaLow[etaBin-1],etaHigh[etaBin-1]);
69 if(kk==1) spinMkA[kk]->setQPT(
false);
73 spinMkA[kk]->setEta(999.,999.);
76 spinMkA[kk]->setEta(-1.,1.);
77 spinMkA[kk]->setEtaE(999.,999.);
85 ZMk->attachWalgoMaker(wTreeMk);
86 ZMk->setHList(HListZ);
87 ZMk->setNearEtFrac(0.88);
88 ZMk->setClusterMinEt(14);
89 ZMk->setPhi12Min(3.1416/2.);
90 ZMk->setMinZMass(70.);
91 ZMk->setMaxZMass(110.);
100 Int_t nevents = wTreeMk->getNumberOfEvents();
101 cout<<nevents<<
" events in chain"<<endl;
102 if(nevents<1) {cout<<
"No events in chain, check your list file"<<endl;
return; }
104 Int_t stat = 0; Int_t
event = 0;
108 if ( event>=nevents || event > maxEvents)
break;
110 stat = chain->Make();
114 char *file1=fileList;
115 printf(
"file1=%s=%s=\n",file1);
116 TString outFile=
""; outFile+=file1;
117 outFile.ReplaceAll(
".lis",Form(
"_Eta%d.wana.hist.root",etaBin));
118 outFile.ReplaceAll(
"lists/treeReader/",
"");
119 TFile *outF=
new TFile(outFile,
"RECREATE");
121 TDirectory *Eta = outF->mkdir(Form(
"Eta%d",etaBin));
125 TDirectory *Z = outF->mkdir(
"Z");
129 cout<<endl<<
" Histo saved -->"<<outFile<<endl;
132 cout<<endl<<
" Couldn't open file "<<outFile<<endl;
140 void chainFiles(
const Char_t *fileList)
143 cout <<
"chaining files from list: " << fileList << endl;
145 ifstream f(fileList);
149 if ( name.Contains(
"root") )
150 wTreeMk->chainFile(name);
153 TString jetName=jetTreeDir;
154 jetName+=name.ReplaceAll(
"wtree/",
"jets/jets_");
155 jetName.ReplaceAll(
".Wtree",
"");
156 wTreeMk->chainJetFile(jetName);
muDst based extraction of W-signal from pp500 data from 2011
accumulates alternative rel lumi monitors based on jet events
uses tree from W-algo to find Zs