7 void RunLuminosityMaker(
int nevents=10,
8 const char* file =
"test.list",
10 const char* dir =
"./",
11 const char *filter =
"")
13 cout <<
"MuDst chain file:\t"<<file<<endl;
15 gROOT->Macro(
"LoadLogger.C");
16 gROOT->Macro(
"loadMuDst.C");
17 gSystem->Load(
"StDaqLib");
18 gSystem->Load(
"StDbBroker");
19 gSystem->Load(
"StDetectorDbMaker");
20 gSystem->Load(
"St_db_Maker");
21 gSystem->Load(
"StTriggerFilterMaker");
22 gSystem->Load(
"StEmcRawMaker");
23 gSystem->Load(
"StEmcADCtoEMaker");
24 gSystem->Load(
"StTriggerUtilities");
25 gSystem->Load(
"StLuminosityMaker");
28 double pi = atan(1.0)*4.0;
29 cout <<
" loading done " << endl;
59 trigsim->bemc->setConfig(StBemcTriggerSimu::kOffline);
73 lum->setVertexCutcm(60);
81 lum->setCrossSectionNB(26.1e6);
86 lum->addTrigger(117001);
87 lum->addTrigger(137221);
88 lum->addTrigger(137222);
89 lum->addTrigger(137822);
90 lum->addTrigger(117300);
91 lum->addTrigger(137571);
92 lum->addTrigger(137575);
93 lum->addTrigger(137585);
94 lum->addTrigger(137586);
95 lum->addTrigger(137611);
96 lum->addTrigger(137501);
97 lum->addTrigger(137622);
104 for (Int_t iev=0;iev<nevents; iev++) {
111 int iret = chain->
Make(iev);
115 cout <<
"Bad return code!" <<iret<< endl;
122 cout <<
"****************************************** " << endl;
123 cout <<
"total number of events " << total << endl;
124 cout <<
"****************************************** " << endl;
127 TClonesArray* holder = lum->getHolder();
130 for(
int i = 0; i < holder->GetEntries(); i++){
133 int run1 = dumlum->getRunNumber();
134 sprintf(name,
"lum%i.data",run1);
135 ofstream lumout(name);
136 vector<unsigned int> triggers = dumlum->getTriggers();
137 vector<unsigned int> NTotal = dumlum->getNTotal();
138 vector<unsigned int> NCuts = dumlum->getNCuts();
139 vector<unsigned int> NVert = dumlum->getNVertex();
140 vector<unsigned int> NTrig = dumlum->getNSoftTrig();
141 vector<float> LumTotal = dumlum->getLumTotal();
142 vector<float> LumCuts = dumlum->getLumCuts();
143 vector<float> LumVert = dumlum->getLumVertex();
144 vector<float> LumTrig = dumlum->getLumSoftTrig();
145 vector<float> Prescales = dumlum->getPrescales();
146 for(
unsigned int j = 0; j < dumlum->getTriggers().size(); j++){
147 lumout<<run1<<
"\t"<<triggers[j]<<
"\t"<<Prescales[j]<<
"\t"<<NTotal[j]<<
"\t"<<NCuts[j]<<
"\t"<<NVert[j]<<
"\t"<<NTrig[j]<<
"\t"<<LumTotal[j]<<
"\t"<<LumCuts[j]<<
"\t"<<LumVert[j]<<
"\t"<<LumTrig[j]<<endl;
virtual void Clear(Option_t *option="")
User defined functions.
static void setLevel(unsigned int level)
sets the debug level