4 #include "StHbtMaker.h"
5 #include "StHbtManager.h"
6 #include "StHbtAnalysis.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 "MinvCorrFctn.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(+3.0,1.e5);
94 aParticleCut->SetNSigmaKaon(-2.,2.);
95 aParticleCut->SetNSigmaProton(-1.e5,-1.0);
96 aParticleCut->SetNHits(5,50);
97 aParticleCut->SetP(0.23,1.0);
98 aParticleCut->SetPt(0.0,2.0);
99 aParticleCut->SetRapidity(-1.5,1.5);
100 aParticleCut->SetDCA(0,2.);
101 aParticleCut->SetCharge(+1);
102 aParticleCut->SetMass(0.494);
105 100,0.,1.2,100,0.,1e-5);
107 100,0.,1.2,100,0.,1e-5);
118 phiEvcut->SetEventMult(000,100000);
119 phiEvcut->SetVertZPos(-35.0,35.0);
123 phiAnal->SetEventCut(phiEvcut);
129 kaonTrkcut->AddCutMonitor( dedxMoniPosPass, dedxMoniPosFail);
130 phiAnal->SetFirstParticleCut(kaonTrkcut);
133 antikaonTrkcut->SetCharge(-1);
134 phiAnal->SetSecondParticleCut(antikaonTrkcut);
138 antikaonTrkcut->AddCutMonitor( dedxMoniNegPass, dedxMoniNegFail);
142 phiAnal->SetPairCut(phiPairCut);
144 phiAnal->SetNumEventsToMix(5);
150 phiAnal->AddCorrFctn(MinvCF);
152 TheManager->AddAnalysis(phiAnal);
156 iret = hbtMaker->Init();
157 for (
int iev=0;iev<nevents; iev++) {
159 iret = hbtMaker->Make();
160 cout <<
"StHbtExample -- Working on eventNumber " << iev << endl;
162 iret = hbtMaker->Finish();