1 TH1 *btow_adc, *bprs_adc, *smde_adc, *smdp_adc;
2 TH1 *btow_energy, *bprs_energy, *smde_energy, *smdp_energy;
5 void testSimulatorMaker(
int nEvents=1000,
const char *geantFile =
"/star/institutions/mit/common/simu/photon_5_7_09.geant.root") {
6 gROOT->Macro(
"LoadLogger.C");
7 gROOT->Macro(
"loadMuDst.C");
8 gSystem->Load(
"StDetectorDbMaker");
9 gSystem->Load(
"StDbUtilities");
10 gSystem->Load(
"StEEmcUtil");
11 gSystem->Load(
"StMcEvent");
12 gSystem->Load(
"StMcEventMaker");
13 gSystem->Load(
"StDbBroker");
14 gSystem->Load(
"St_db_Maker");
15 gSystem->Load(
"StDaqLib");
16 gSystem->Load(
"StEmcSimulatorMaker");
21 ioMaker->SetFile(geantFile);
23 ioMaker->SetBranch(
"*",0,
"0");
24 ioMaker->SetBranch(
"geantBranch",0,
"r");
31 dbMaker->SetDateTime(20050506,214129);
34 dbMaker->SetFlavor(
"sim",
"bprsCalib");
53 btow_adc =
new TH1F(
"btow_adc",
"",200,0.,2000.);
54 btow_energy =
new TH1F(
"btow_energy",
"",200,0.,60.);
56 bprs_adc =
new TH1F(
"bprs_adc",
"",200,0.,1200.);
57 bprs_energy =
new TH1F(
"bprs_energy",
"",200,0.,30.);
59 smde_adc =
new TH1F(
"smde_adc",
"",200,0.,1200.);
60 smde_energy =
new TH1F(
"smde_energy",
"",200,0.,30.);
62 smdp_adc =
new TH1F(
"smdp_adc",
"",200,0.,1200.);
63 smdp_energy =
new TH1F(
"smdp_energy",
"",200,0.,30.);
66 while(i<nEvents && chain->Make() ==
kStOk) {
74 for(
int m=1; m<=120; m++) {
75 StSPtrVecEmcRawHit btow_hits = btow->module(m)->hits();
76 StSPtrVecEmcRawHit bprs_hits = bprs->module(m)->hits();
77 StSPtrVecEmcRawHit smde_hits = smde->module(m)->hits();
78 StSPtrVecEmcRawHit smdp_hits = smdp->module(m)->hits();
80 for(
int j=0; j<btow_hits.size(); j++) {
81 btow_adc->Fill( (btow_hits[j])->adc() );
82 btow_energy->Fill( (btow_hits[j])->energy() );
85 for(
int j=0; j<bprs_hits.size(); j++) {
86 bprs_adc->Fill( (bprs_hits[j])->adc() );
87 bprs_energy->Fill( (bprs_hits[j])->energy() );
90 for(
int j=0; j<smde_hits.size(); j++) {
91 smde_adc->Fill( (smde_hits[j])->adc() );
92 smde_energy->Fill( (smde_hits[j])->energy() );
95 for(
int j=0; j<smdp_hits.size(); j++) {
96 smdp_adc->Fill( (smdp_hits[j])->adc() );
97 smdp_energy->Fill( (smdp_hits[j])->energy() );
107 c =
new TCanvas(
"c",
"",600,800);
110 TVirtualPad *pad = c->cd(1);
void setMaximumAdc(StDetectorId det, float adc)
maximum possible ADC for a channel. Defaults are 4095 (TOW), 1023 (PRS), 1023 (SMDs) ...
virtual void SetIOMode(Option_t *iomode="w")
number of transactions
virtual void Clear(Option_t *option="")
User defined functions.
StEmcCollection * getEmcCollection()
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
virtual void ls(Option_t *option="") const
void setMaximumAdcSpread(StDetectorId det, float spread)
maximum possible ADC will be calculated by sampling Gaussian with this spread. Default is 0 for all d...