3 int runqa( Int_t runnumber = 14032027, Int_t ped=0, Int_t nevents = 9999999,
int zs=1,
4 const Char_t *evpdir =
"/evp/a/",
5 Float_t chargrms=1.0, Float_t thr=4.0, Float_t thr2add=3.0,
6 Bool_t useSeed5=
true, Bool_t cutShortEvents = 0){
8 int day=runnumber/1000;
13 cout <<
"Constructing the chain" << endl;
16 TString dir0 =
"MySQL:StarDb";
17 TString dir1 =
"$STAR/StarDb";
20 cout <<
"Constructing StFgtDbMaker" << endl;
24 cout <<
"Constructing the FGT raw daq reader" << endl;
26 sprintf(filename,
"%s/%d",evpdir,runnumber);
29 daqRdr->setIsCosmic(
false );
30 daqRdr->cutShortEvents( cutShortEvents );
33 if(zs>0){daqRdr->setZSdataOnly();}
36 daqRdr->setNoneZSdataOnly();
37 cout <<
"Loading and Constructing the StFgtPedMaker" << endl;
38 gSystem->Load(
"StFgtPedMaker");
40 pedMkr->setFgtDbMkrName(
"fgtDb");
41 pedMkr->setTimeBinMask(0x0);
42 pedMkr->setNumBins(4200);
43 pedMkr->setMaxAdc(4200);
44 pedMkr->setNumSmooth(0);
45 sprintf(filename,
"%d/ped/ped.%d.txt",day,runnumber);
46 pedMkr->setToSaveToFile(filename);
48 cout <<
"Loading and Constructing the Status Maker" << endl;
49 gSystem->Load(
"StFgtStatusMaker");
51 sprintf(filename,
"%d/status/status.%d.txt",day,runnumber);
52 statMkr->setToSaveToFile(filename);
53 statMkr->setTimeBin(0);
54 statMkr->setPedRange(200,1000);
55 statMkr->setRmsRange(15,200);
56 statMkr->setFracRange(0.0,1.0);
57 statMkr->setMaxDeadPerApv(128);
59 cout <<
"Loading and Constructing the StFgtA2CMaker" << endl;
60 gSystem->Load(
"StFgtA2CMaker");
62 a2cMkr->
setFgtDb(fgtDbMkr->getDbTables());
63 a2cMkr ->setAbsThres( -5000 );
72 a2cMkr->setClusterThreshold(thr/5.0);
73 a2cMkr->setPedSigFactor4Charge(chargrms);
74 a2cMkr->useLeastRestrictiveSeed(useSeed5);
78 a2cMkr->setPedestalFile(
"ped.txt");
79 a2cMkr->setStatusFile(
"status.txt");
81 gSystem->Load(
"StFgtClusterMaker");
82 Char_t *myMaker =
"StFgtClusterMaker";
84 clusterMk->SetDEBUG();
87 seededClusAlgo->setJumpSingleStrip(
true);
88 seededClusAlgo->setThreshold2AddStrip(thr2add);
91 gSystem->Load(
"StFgtPointMaker");
94 pointMk->setPointAlgo( simplePointAlgo );
95 simplePointAlgo->setMaxChargeAsym(0.2);
97 gSystem->Load(
"StFgtClusterTools");
99 fgtGenBase->fillFromEvent();
101 fgtStraightTrackMaker->setMinNumFitPoints(3);
102 fgtStraightTrackMaker->setMaxClusters(30);
105 gSystem->Load(
"libMinuit");
106 gSystem->Load(
"StFgtAlignmentMaker");
108 algMk->setTrackType(0);
109 algMk->setDataSource(2);
110 algMk->setRunNumber(runnumber);
111 sprintf(filename,
"%d/alignment_trkout.%d.root",day,runnumber);
112 algMk->setWriteTree(filename);
114 gSystem->Load(
"StFgtQAMaker");
116 qaMkr->setRunNumber(runnumber);
119 cout <<
"Initializing" << endl;
120 ierr = analysisChain->Init();
123 cout <<
"Error initializing" << endl;
130 cout <<
"max nevents = " << nevents << endl;
131 for(
int i=0; i<nevents && !ierr; ++i ){
132 if( i+1 % 100 == 1 ) cout <<
"\t on event number **************" << i << endl;
134 analysisChain->
Clear();
136 ierr = analysisChain->
Make();
144 cout <<
"finish" << endl;
161 bool doOutputPdf=
false;
164 cout <<
"converting ps to pdf" << endl;
165 gSystem->Exec(( std::string(
"ps2pdf -dAutoRotatePages=/None ") + pdfFile ).
data());
168 cout <<
"\tall done" << endl;
175 gROOT->Macro(
"loadMuDst.C");
176 gSystem->Load(
"libPhysics");
177 gSystem->Load(
"St_base");
178 gSystem->Load(
"StChain");
179 gSystem->Load(
"StUtilities");
180 gSystem->Load(
"StEvent");
181 gSystem->Load(
"libStDb_Tables.so");
182 gSystem->Load(
"StDbLib.so");
183 gSystem->Load(
"St_db_Maker");
184 gSystem->Load(
"StDbBroker");
185 gSystem->Load(
"RTS");
186 gSystem->Load(
"StFgtUtil");
187 gSystem->Load(
"StFgtDbMaker");
188 gSystem->Load(
"StFgtRawDaqReader");
void acceptLongPulses(Bool_t accept)
set status mask to some other value
void setRelThres(Float_t thres)
set to below -kFgtMaxAdc (-4096) to skip cut
virtual void Clear(Option_t *option="")
User defined functions.
A typical Analysis Class.
Int_t setClusterAlgo(StFgtIClusterAlgo *)
clear function is empty at the moment
void doCutBadStatus()
set pointer to StFgtDb
void setFgtDb(StFgtDb *fgtDb)
set to zero to skip cut
A typical Analysis Class.