24 class StFgtCosmicMaker;
25 class StFgtCorAdcMaker;
31 StFgtCosmicMaker *cosmicMkr = 0;
32 StFgtCorAdcMaker *adcCorrector = 0;
39 Int_t clusterChargePerAPV(
const Char_t *filename =
"testfile.sfs",
40 const Char_t *pedfilename =
"testfile.Ped.txt",
43 const Char_t *runname =
"testrun",
44 const Char_t *quadname =
"010",
47 Bool_t cutShortEvents = 1 ){
53 Int_t nBins_ChPerAPV = 160;
54 Float_t min_ChPerAPV = -512;
55 Float_t max_ChPerAPV = 2048;
58 Int_t canWidth = 850, canHeight = 1100;
60 Short_t timeBinMask = (1<<timeBin);
61 cout <<
"Constructing the chain" << endl;
62 analysisChain =
new StChain(
"eemcAnalysisChain");
64 cout <<
"Constructing the cosmic maker" << endl;
65 cosmicMkr =
new StFgtCosmicMaker(
"cosmicMaker", filename );
66 cosmicMkr->setNumDiscs( numDiscs );
68 cout <<
"Constructing the corrector" << endl;
69 adcCorrector =
new StFgtCorAdcMaker(
"adcCorrector",
"cosmicMaker" );
70 adcCorrector->setPedReaderFile( pedfilename );
71 adcCorrector->setTimeBinMask( timeBinMask );
72 adcCorrector->setAbsThres( -10000 );
73 adcCorrector->setRelThres( 5 );
74 adcCorrector->doSubtrPeds( 1 );
75 adcCorrector->doRemoveOtherTimeBins( 1 );
77 cout <<
"Constructing the cluster maker" << endl;
82 cout <<
"Constructing the histogram maker" << endl;
85 cout <<
"Initializing" << endl;
86 ierr = analysisChain->Init();
87 cout <<
"\t done initializing" << endl;
90 cout <<
"Error initializing" << endl;
97 cout <<
"Looping over events..." << endl;
98 for(
int i=0; i<nevents && !ierr; ++i ){
101 cout <<
"event number " << i << endl;
104 analysisChain->
Clear();
107 ierr = analysisChain->
Make();
114 cout <<
"finish" << endl;
117 cout <<
"Making plots..." << endl;
123 cout <<
"all done" << endl;
132 gSystem->Load(
"libPhysics");
133 gSystem->Load(
"St_base");
134 gSystem->Load(
"StChain");
135 gSystem->Load(
"StEvent");
136 gSystem->Load(
"StUtilities");
137 cout <<
"loaded StEvent library" << endl;
139 gSystem->Load(
"StFgtUtil");
140 gSystem->Load(
"StFgtRawMaker");
141 gSystem->Load(
"RTS");
142 gSystem->Load(
"StFgtPedMaker");
143 gSystem->Load(
"StFgtQaMakers");
144 gSystem->Load(
"StFgtPedPlotter");
145 gSystem->Load(
"StFgtCorAdcMaker");
146 gSystem->Load(
"StFgtClusterMaker");
virtual void Clear(Option_t *option="")
User defined functions.
Int_t setClusterAlgo(StFgtIClusterAlgo *)
clear function is empty at the moment