4 #include "StHbtMaker.h"
5 #include "StHbtManager.h"
6 #include "StHbtVertexAnalysis.h"
7 #include "franksTrackCut.h"
8 #include "trackCutMonitor_P_vs_Dedx.h"
9 #include "mikesEventCut.h"
10 #include "mikesPairCut.h"
11 #include "StHbtAsciiReader.h"
12 #include "StHbtBinaryReader.h"
13 #include "QinvCorrFctn.h"
16 for (
int i=0; i<n*1e6; i++) { }
18 void mess(
const char* c=
"alive") {
19 for (
int i=0; i<10; i++) { cout << c << endl; }
25 int hbt(
int argc,
char* argv[]) {
27 int main(
int argc,
char* argv[]) {
36 nevents = atoi(argv[1]);
41 cout <<
"usage: hbt nevents asc/bin filename" << endl;
44 cout <<
" nevents = " << nevents << endl;
45 cout <<
" fileType = " << fileType << endl;
46 cout <<
" fileName = " << fileName << endl;
48 char* fileAppendix = fileName+strlen(fileName) -4 ;
49 cout <<
" fileAppendix = " << fileAppendix << endl;
54 cout <<
"StHbtMaker instantiated"<<endl;
56 cout <<
"StHbtMaker::Init - setting up Reader and Analyses..." << endl;
64 if ( !strcmp(fileType,
"asc") ) {
66 ascReader->SetFileName(fileName);
67 TheManager->SetEventReader(ascReader);
69 else if ( !strcmp(fileType,
"bin") ) {
71 cout <<
" now parse files " << endl;
82 TheManager->SetEventReader(binReader);
85 cout <<
"unknown fileType : " << fileType << endl;
88 cout <<
"READER SET UP.... " << endl;
93 aParticleCut->SetNSigmaPion(-2.0,+2.0);
94 aParticleCut->SetNSigmaAntiElectron(-2.0,+2.0);
95 aParticleCut->SetNHits(5,50);
96 aParticleCut->SetP(0.23,1.0);
97 aParticleCut->SetPt(0.0,2.0);
98 aParticleCut->SetRapidity(-1.5,1.5);
99 aParticleCut->SetDCA(0,2.);
100 aParticleCut->SetCharge(+1);
101 aParticleCut->SetMass(0.494);
104 100,0.,1.2,100,0.,1e-5);
106 100,0.,1.2,100,0.,1e-5);
117 phiEvcut->SetEventMult(000,100000);
118 phiEvcut->SetVertZPos(-40.0,40.0);
120 phiAnal->SetEventCut(phiEvcut);
126 kaonTrkcut->AddCutMonitor( dedxMoniPosPass, dedxMoniPosFail);
127 phiAnal->SetFirstParticleCut(kaonTrkcut);
128 phiAnal->SetSecondParticleCut(kaonTrkcut);
132 phiAnal->SetPairCut(phiPairCut);
134 phiAnal->SetNumEventsToMix(10);
140 phiAnal->AddCorrFctn(QinvCF);
142 TheManager->AddAnalysis(phiAnal);
146 iret = hbtMaker->Init();
147 for (
int iev=0;iev<nevents; iev++) {
149 iret = hbtMaker->Make();
150 cout <<
"StHbtExample -- Working on eventNumber " << iev << endl;
152 iret = hbtMaker->Finish();