46 R__LOAD_LIBRARY(./StEpdTrivialEventGenerator_cxx.so)
47 R__LOAD_LIBRARY(../StEpdGeom_cxx.so)
48 R__LOAD_LIBRARY(../../
StPicoEvent/StPicoEpdHit_cxx.so)
49 R__LOAD_LIBRARY(./StEpdFastSim_cxx.so)
63 double etaMin(2.0),etaMax(5.2);
65 double dNdetaValue(500.0),v1Value(0.3),v2Value(0.1);
66 TH1D* dNdeta =
new TH1D(
"dNdeta",
"dNdeta",nbins,-etaMax,etaMax);
67 TH1D* v1 =
new TH1D(
"v1",
"v1",nbins,-etaMax,etaMax);
68 TH1D* v2 =
new TH1D(
"v2",
"v2",nbins,-etaMax,etaMax);
69 for (
int i=1; i<=nbins; i++){
70 double eta = dNdeta->GetXaxis()->GetBinCenter(i);
71 if (fabs(eta)>etaMin){
72 dNdeta->SetBinContent(i,dNdetaValue);
73 double v1Here = (eta<0.0)?-v1Value:v1Value;
74 v1->SetBinContent(i,v1Here);
75 v2->SetBinContent(i,v2Value);
111 TH2D*
EtaPhi =
new TH2D(
"EtaPhi",
"Eta-Phi from generator",50,-5.5,5.5,50,-4.0,4.0);
112 TH1D* nmip =
new TH1D(
"Nmip",
"Nmip of all tiles",50,0.0,10.0);
113 TH2D* EastWheel =
new TH2D(
"East",
"East EPD",100,-100.0,100.0,100,-100.0,100.0);
114 TH2D* WestWheel =
new TH2D(
"West",
"West EPD",100,-100.0,100.0,100,-100.0,100.0);
115 TH2D* EastWheelADC =
new TH2D(
"EastADC",
"East EPD - ADC weighted",100,-100.0,100.0,100,-100.0,100.0);
116 TH2D* WestWheelADC =
new TH2D(
"WestADC",
"West EPD - ADC weighted",100,-100.0,100.0,100,-100.0,100.0);
119 TRandom3* ran =
new TRandom3;
122 for (
int iev=0; iev<Nevents; iev++){
124 TClonesArray* momenta = eg->Momenta();
125 if (momenta==0) cout <<
"No event!!\n";
126 for (
int itrk=0; itrk<momenta->GetEntries(); itrk++){TVector3* mom = (TVector3*)momenta->At(itrk); EtaPhi->Fill(mom->Eta(),mom->Phi());}
136 TVector3 PrimaryVertex(0.0,0.0,0.0);
137 TClonesArray* picoHits = efs->GetPicoHits(momenta,PrimaryVertex);
140 for (
int i=0; i<picoHits->GetEntries(); i++){
142 nmip->Fill(ph->
nMIP());
143 TVector3 point = eGeom->RandomPointOnTile(ph->
id());
145 EastWheel->Fill(point.X(),point.Y());
146 EastWheelADC->Fill(point.X(),point.Y(),ph->
nMIP());
149 WestWheel->Fill(point.X(),point.Y());
150 WestWheelADC->Fill(point.X(),point.Y(),ph->
nMIP());
153 cout <<
"Event " << iev <<
" has " << momenta->GetEntries() <<
" particles,"
154 <<
" and the StPicoEpdHit list has " << picoHits->GetEntries() <<
"entries\n";
160 TCanvas* tc =
new TCanvas(
"diagnostics",
"diag",700,1200);
162 tc->cd(1); EtaPhi->Draw(
"colz");
163 tc->cd(2); nmip->Draw();
164 tc->cd(3)->SetLogz(); EastWheel->Draw(
"colz");
165 tc->cd(4)->SetLogz(); WestWheel->Draw(
"colz");
166 tc->cd(5)->SetLogz(); EastWheelADC->Draw(
"colz");
167 tc->cd(6)->SetLogz(); WestWheelADC->Draw(
"colz");
Stores global information about the event.