StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtGenPlotter.cxx
1 #include "StFgtGenPlotter.h"
3 #include "StRoot/StEvent/StFgtCollection.h"
4 #include "StRoot/StEvent/StFgtHitCollection.h"
5 #include "StRoot/StEvent/StFgtHit.h"
6 #include "StRoot/StFgtUtil/geometry/StFgtGeom.h"
7 #include "StRoot/StEvent/StEvent.h"
8 #include "StRoot/StEvent/StEventInfo.h"
9 #include "StRoot/StFgtUtil/geometry/StFgtGeom.h"
10 #include <TH2D.h>
11 #include <TROOT.h>
12 #include <TStyle.h>
13 #include <TCanvas.h>
14 #include <utility>
15 #include <TArc.h>
16 #include <TLine.h>
17 #include <set>
18 
19 
20 #include "StRoot/StFgtUtil/geometry/StFgtGeom.h"
21 
22 #include "StRoot/StEvent/StEvent.h"
23 #include "StRoot/StEvent/StFgtCollection.h"
24 
25 #define MAX_DIST 0.5
26 #define MIN_NUM_POINTS 4
27 
32 {
33  cout <<"gen plot make " <<endl;
34  Int_t ierr = kStOk;
35  cout <<"general make " <<endl;
37  cout <<" making cluster plotter " <<endl;
38  Int_t realEvtNr=0;
39 
40  Float_t x;
41  Float_t y;
42  Int_t prvGeoId=-1;
43  for(int iDx=0;iDx<kFgtNumDiscs;iDx++)
44  {
45 
46  for(int iQ=0;iQ<2;iQ++)
47  {
48  vector<generalStrip> &stripVec=(pStrips[iDx*2+iQ]);
49  vector<generalStrip>::iterator stripIter;
50  cout <<"got strips" <<endl;
51  Int_t seed1R=0;
52  Int_t seed2R=0;
53  Int_t seed3R=0;
54  Int_t seedDeadR=0;
55 
56  Int_t seed1P=0;
57  Int_t seed2P=0;
58  Int_t seed3P=0;
59  Int_t seedDeadP=0;
60 
61  for(stripIter=stripVec.begin();stripIter != stripVec.end();stripIter++)
62  {
63  Short_t tDisc, tQuad,tStrip;
64  Char_t tLayer;
65  Int_t geoId=stripIter->geoId;
66  cout <<" looking at strip with geo : " << stripIter->geoId<<endl;
67  //get strip id from the geo id
68  StFgtGeom::decodeGeoId(geoId,tDisc,tQuad,tLayer,tStrip);
69  // cout <<"seed is : " << stripIter->seedType <<endl;
70  if(stripIter->seedType==kFgtSeedType1)
71  {
72  if(tLayer=='R')
73  seed1R++;
74  else
75  seed1P++;
76  }
77  if(stripIter->seedType==kFgtSeedType2)
78  {
79  if(tLayer=='R')
80  seed2R++;
81  else
82  seed2P++;
83 
84  }
85  if(stripIter->seedType==kFgtSeedType3)
86  {
87  if(tLayer=='R')
88  seed3R++;
89  else
90  seed3P++;
91  }
92 
93 
94  if(stripIter->seedType==kFgtDeadStrip)
95  {
96  if(tLayer=='R')
97  seedDeadR++;
98  else
99  seedDeadP++;
100  }
101 
102  }
103  cout <<"filling seed etc .. " <<endl;
104  cout << " seed1R: " << seed1R <<" 2R: " << seed2R <<" dead: " << seedDeadR << endl;
105  cout << " seed1R: " << seed3R <<" 2R: " << seed3P <<" dead: " << seed3P << endl;
106  seedsPerDiscR[iDx*2+iQ]->Fill(kFgtSeedType1,seed1R);
107  seedsPerDiscR[iDx*2+iQ]->Fill(kFgtSeedType2,seed2R);
108  seedsPerDiscR[iDx*2+iQ]->Fill(kFgtSeedType3,seed3R);
109  seedsPerDiscR[iDx*2+iQ]->Fill(kFgtDeadStrip,seedDeadR);
110  seedsPerDiscP[iDx*2+iQ]->Fill(kFgtSeedType1,seed1P);
111  seedsPerDiscP[iDx*2+iQ]->Fill(kFgtSeedType2,seed2P);
112  seedsPerDiscP[iDx*2+iQ]->Fill(kFgtSeedType3,seed3P);
113  seedsPerDiscP[iDx*2+iQ]->Fill(kFgtDeadStrip,seedDeadP);
114  cout <<"done .." <<endl;
115  }
116 
117  vector<float> vPhi[4];
118  vector<float> vR[4];
119 
120  vector<float> vPhiCharge[4];
121  vector<float> vRCharge[4];
122 
123  vector<float> vPhiClusSize[4];
124  vector<float> vRClusSize[4];
125 
126  cout <<"trying to get clusters in disc " << iDx << endl;
127 
128  /* const TArrayI& geoIdArray = clusterPtr->getStripGeoIdArray();
129  const TArrayF& weightArray = clusterPtr->getStripWeightArray();
130 
131  Int_t n = geoIdArray.GetSize();
132  if( n != weightArray.GetSize() ){
133  // something weird happened
134  };
135 
136  for( Int_t i=0; i<n; ++i ){
137  Int_t geoId = geoIdArray[i];
138  Float_t w = weightArray[i];
139 
140  // do what you want here
141  };
142  */
143 
144  vector<generalCluster> &hitVec=*(pClusters[iDx]);
145  cout <<"got collection, looking at " << hitVec.size() << " hits .. " <<endl;
146  vector<generalCluster>::iterator hitIter;
147  Int_t multQ1R=0;
148  Int_t multQ2R=0;
149  Int_t multQ1P=0;
150  Int_t multQ2P=0;
151  cout <<"hit iter " <<endl;
152  for(hitIter=hitVec.begin();hitIter != hitVec.end();hitIter++)
153  {
154  Int_t iq=hitIter->quad;
155  Float_t phi=hitIter->posPhi;
156  Float_t r=hitIter->posR;
157  Int_t geoId=hitIter->centralStripGeoId;
158  Float_t charge=hitIter->clusterCharge;
159  Int_t clusSize=hitIter->clusterSize;
160 
161  Int_t numStrips=hitIter->clusterSize;
163  Short_t quad, disc, strip;
164  Char_t layer;
165  Bool_t containsSeed=true; // just take all clusters
166 
167  if(hitIter->layer=='R')
168  {
169  if(iq==0)
170  multQ1R++;
171  else
172  multQ2R++;
173  cout <<"push " <<endl;
174  vR[iq].push_back(r);
175  vRCharge[iq].push_back(charge);
176  vRClusSize[iq].push_back(clusSize);
177  }
178  else
179  {
180  if(iq==0)
181  multQ1P++;
182  else
183  multQ2P++;
184  cout <<"pushP " <<endl;
185  vPhi[iq].push_back(phi);
186  vPhiCharge[iq].push_back(charge);
187  vPhiClusSize[iq].push_back(clusSize);
188  }
189  cout <<"push done" <<endl;
190  Short_t tDisc, tQuad,tStrip;
191  Char_t tLayer;
192  //get strip id from the geo id
193  StFgtGeom::decodeGeoId(geoId,tDisc,tQuad,tLayer,tStrip);
194  cout <<" filling" <<endl;
195  hCChargePosSpacePhi[iDx*kFgtNumQuads+iq]->Fill(phi,charge);
196  hCChargePosSpaceR[iDx*kFgtNumQuads+iq]->Fill(r,charge);
197  hClusSizePhi[iDx*kFgtNumQuads+iq]->Fill(phi,numStrips);
198  hClusSizePhi[iDx*kFgtNumQuads+iq]->Fill(phi,numStrips);
199  hClusSizeR[iDx*kFgtNumQuads+iq]->Fill(r,numStrips);
200  hCChargeElecSpace[iDx*kFgtNumQuads+iq]->Fill(tStrip,charge);
201  hClusSizeElecSpace[iDx*kFgtNumQuads+iq]->Fill(tStrip,numStrips);
202  }
203  cout <<"done " <<endl;
204  multPerDiscR[iDx*2]->Fill(multQ1R);
205  multPerDiscR[iDx*2+1]->Fill(multQ2R);
206  multPerDiscP[iDx*2]->Fill(multQ1P);
207  multPerDiscP[iDx*2+1]->Fill(multQ2P);
208 
209  cout <<"going on " <<endl;
210  for(int iQ=0;iQ<4;iQ++)
211  {
212  int rCount=0;
213  for(vector<float>::iterator itR=vR[iQ].begin();itR!=vR[iQ].end();itR++)
214  {
215  float chargeR=(vRCharge[iQ])[rCount];
216  float clusSizeR=(vRClusSize[iQ])[rCount];
217  rCount++;
218  int phiCount=0;
219  for(vector<float>::iterator itP=vPhi[iQ].begin();itP!=vPhi[iQ].end();itP++)
220  {
221  float chargePhi=(vPhiCharge[iQ])[phiCount];
222  float clusSizePhi=(vPhiClusSize[iQ])[phiCount];
223  // cout <<" chargePhi: " << chargePhi <<" clussize: " << clusSizePhi << " counter: " << phiCount <<endl;
224  phiCount++;
225  x=(*itR)*cos(*itP);
226  y=(*itR)*sin(*itP);
227  radioPlots[iDx]->Fill(x,y);
228  radioRatio[iDx]->Fill(x,y);
229  radioChargeR[iDx]->Fill(x,y,chargeR);
230  radioChargePhi[iDx]->Fill(x,y,chargePhi);
231  radioClusSizeR[iDx]->Fill(x,y,clusSizeR);
232  radioClusSizePhi[iDx]->Fill(x,y,clusSizePhi);
233  }
234  }
235 
236  for(vector<float>::iterator itR=vRCharge[iQ].begin();itR!=vRCharge[iQ].end();itR++)
237  {
238  for(vector<float>::iterator itP=vPhiCharge[iQ].begin();itP!=vPhiCharge[iQ].end();itP++)
239  {
240  corrPlots[iDx*kFgtNumQuads+iQ]->Fill(*itR,*itP);
241  }
242  }
243 
244  vPhi[iQ].clear();
245  vR[iQ].clear();
246  vPhiCharge[iQ].clear();
247  vRCharge[iQ].clear();
248  vPhiClusSize[iQ].clear();
249  vRClusSize[iQ].clear();
250  }
251 
252  }
253 
254 
255  runningEvtNr++;
256  return ierr;
257 
258 };
259 
260 StFgtGenPlotter::StFgtGenPlotter( const Char_t* name): StFgtGeneralBase( name ),runningEvtNr(0),hitCounter(0),hitCounterR(0)
261 {
262 
263 
264 };
265 
266 StFgtGenPlotter::~StFgtGenPlotter()
267 {
268 
269  //delete histogram arrays
270 };
271 
272 
274  cout <<"genPlotter finish" <<endl;
275  gStyle->SetPalette(1);
276  cout <<"cluster plotter finish funciton " <<endl;
277  Int_t ierr = kStOk;
278  TCanvas* cChargePhi=new TCanvas("chargePhi","chargePhi",850,1100);
279  TCanvas* cChargePhiBig=new TCanvas("chargePhiBig","chargePhiBig",850,1100);
280  cChargePhi->SetLogz();
281  cChargePhi->Divide(kFgtNumDiscs,kFgtNumQuads);
282  TCanvas* cChargeR=new TCanvas("chargeR","chargeR",850,1100);
283  TCanvas* cChargeRBig=new TCanvas("chargeRBig","chargeRBig",850,1100);
284  cChargeR->SetLogz();
285  cChargeR->Divide(kFgtNumDiscs,kFgtNumQuads);
286  TCanvas* cClusSizePhi=new TCanvas("clusSizePhi","clusSizePhi",850,1100);
287  TCanvas* cClusSizePhiBig=new TCanvas("clusSizePhiBig","clusSizePhiBig",850,1100);
288  cClusSizePhi->Divide(kFgtNumDiscs,kFgtNumQuads);
289  TCanvas* cClusSizeR=new TCanvas("clusSizeR","clusSizeR",850,1100);
290  TCanvas* cClusSizeRBig=new TCanvas("clusSizeRBig","clusSizeRBig",850,1100);
291  cClusSizeR->Divide(kFgtNumDiscs,kFgtNumQuads);
292  TCanvas* cChargeElecSpace=new TCanvas("cChargeElecSpace","cChargeEledId",850,1100);
293  TCanvas* cChargeElecSpaceBig=new TCanvas("cChargeElecSpaceBig","cChargeEledIdBig",850,1100);
294 
295  TCanvas* cDiscQ=new TCanvas("cDiscQ","cDiscQ",850,1100);
296  // cDiscQ->Divide(kFgtNumDiscs,2);
297 
298  cChargeElecSpace->SetLogz();
299  cChargeElecSpace->Divide(kFgtNumDiscs,kFgtNumQuads);
300  TCanvas* cClusSizeElecSpace=new TCanvas("clusSizeElecSpace","clusSizeEledId",850,1100);
301  TCanvas* cClusSizeElecSpaceBig=new TCanvas("clusSizeElecSpaceBig","clusSizeEledIdBig",850,1100);
302  cClusSizeElecSpace->Divide(kFgtNumDiscs,kFgtNumQuads);
303 
304  TCanvas* cRadio=new TCanvas("radioPlots","radioPlot",1000,1500);
305  cRadio->Divide(2,3); //6 discs
306 
307  TCanvas* cRadioChargeR=new TCanvas("radioPlotsChargeR","radioPlotChargeR",1000,1500);
308  cRadioChargeR->Divide(2,3); //6 discs
309  TCanvas* cRadioChargePhi=new TCanvas("radioPlotsChargePhi","radioPlotChargePhi",1000,1500);
310  cRadioChargePhi->Divide(2,3); //6 discs
311 
312  TCanvas* cRadioClusSizeR=new TCanvas("radioPlotsClusSizeR","radioPlotClusSizeR",1000,1500);
313  cRadioClusSizeR->Divide(2,3); //6 discs
314  TCanvas* cRadioClusSizePhi=new TCanvas("radioPlotsClusSizePhi","radioPlotClusSizePhi",1000,1500);
315  cRadioClusSizePhi->Divide(2,3); //6 discs
316 
317  TCanvas* cRadioRatio=new TCanvas("radioRatio","radioRatio",1000,1500);
318  cRadioRatio->Divide(2,3); //6 discs
319 
320  TCanvas* cCorr=new TCanvas("correlationPlots","correlationPlot",1000,1500);
321  TCanvas* cCorrBig=new TCanvas("correlationPlotsBig","correlationPlotBig",1000,1500);
322  cCorr->Divide(kFgtNumDiscs,kFgtNumQuads);
323 
324  for(Int_t iD=0;iD<kFgtNumDiscs;iD++)
325  {
326  for(int nx=0;nx<radioRatio[iD]->GetNbinsX();nx++)
327  {
328  for(int ny=0;ny<radioRatio[iD]->GetNbinsY();ny++)
329  {
330  Double_t denom=radioRatio[iD]->GetBinContent(nx,ny);
331  if(denom>0)
332  {
333  radioChargeR[iD]->SetBinContent(nx,ny,radioChargeR[iD]->GetBinContent(nx,ny)/denom);
334  // cout <<" radioChargePhi content is :" << radioChargePhi[iD]->GetBinContent(nx,ny) <<" dividing by " << denom <<endl;
335  radioChargePhi[iD]->SetBinContent(nx,ny,radioChargePhi[iD]->GetBinContent(nx,ny)/denom);
336 
337 
338  radioClusSizeR[iD]->SetBinContent(nx,ny,radioClusSizeR[iD]->GetBinContent(nx,ny)/denom);
339  radioClusSizePhi[iD]->SetBinContent(nx,ny,radioClusSizePhi[iD]->GetBinContent(nx,ny)/denom);
340  }
341  else
342  {
343  radioChargeR[iD]->SetBinContent(nx,ny,0.0);
344  radioChargePhi[iD]->SetBinContent(nx,ny,0.0);
345  radioClusSizeR[iD]->SetBinContent(nx,ny,0.0);
346  radioClusSizePhi[iD]->SetBinContent(nx,ny,0.0);
347  }
349  // cout <<"radioratio: " << radioRatio[iD]->GetBinContent(nx,ny) <<" div by : " << runningEvtNr << " is: " << (radioRatio[iD]->GetBinContent(nx,ny))/(double)runningEvtNr <<endl;
350  radioRatio[iD]->SetBinContent(nx,ny,((double)(radioRatio[iD]->GetBinContent(nx,ny)))/(double)runningEvtNr);
351  }
352  }
353 
354  char buffer[200];
355  for(Int_t iQ=0;iQ<2;iQ++)
356  {
357  cDiscQ->cd();
358  multPerDiscR[iD*2+iQ]->Draw();
359  sprintf(buffer,"multPerDiscR_%d_%d.png",iD,iQ);
360  cDiscQ->SaveAs(buffer);
361 
362  // cDiscQ->cd(iD*2+iQ+1);
363  multPerDiscP[iD*2+iQ]->Draw();
364  sprintf(buffer,"multPerDiscP_%d_%d.png",iD,iQ);
365  cDiscQ->SaveAs(buffer);
366 
367  // cDiscQ->cd(iD*2+iQ+1);
368  seedsPerDiscR[iD*2+iQ]->Draw();
369  sprintf(buffer,"seedPerDiscR_%d_%d.png",iD,iQ);
370  cDiscQ->SaveAs(buffer);
371 
372  // cDiscQ->cd(iD*2+iQ+1);
373  seedsPerDiscP[iD*2+iQ]->Draw();
374  sprintf(buffer,"seedPerDiscP_%d_%d.png",iD,iQ);
375  cDiscQ->SaveAs(buffer);
376  }
377 
378  for(Int_t iQ=0;iQ<kFgtNumQuads;iQ++)
379  {
380  cout <<"drawing disc " << iD <<" quad " << iQ <<endl;
381  cChargePhi->cd(iD*kFgtNumQuads+iQ+1)->SetLogz();
382  hCChargePosSpacePhi[iD*kFgtNumQuads+iQ]->Draw("colz");
383  cChargePhiBig->cd()->SetLogz();
384  hCChargePosSpacePhi[iD*kFgtNumQuads+iQ]->Draw("colz");
385  cChargePhiBig->Print("cChargePhiBig.pdf");
386 
387  cChargeR->cd(iD*kFgtNumQuads+iQ+1)->SetLogz();
388  hCChargePosSpaceR[iD*kFgtNumQuads+iQ]->Draw("colz");
389 
390  cChargeRBig->cd()->SetLogz();
391  hCChargePosSpaceR[iD*kFgtNumQuads+iQ]->Draw("colz");
392  cChargeRBig->Print("cChargeRBig.pdf");
393 
394 
395  cClusSizePhi->cd(iD*kFgtNumQuads+iQ+1)->SetLogz();
396  hClusSizePhi[iD*kFgtNumQuads+iQ]->Draw("colz");
397 
398  cClusSizePhiBig->cd()->SetLogz();
399  hClusSizePhi[iD*kFgtNumQuads+iQ]->Draw("colz");
400  cClusSizePhiBig->Print("cClusSizePhiBig.pdf");
401 
402  cClusSizeR->cd(iD*kFgtNumQuads+iQ+1)->SetLogz();
403  hClusSizeR[iD*kFgtNumQuads+iQ]->Draw("colz");
404 
405  cClusSizeRBig->cd()->SetLogz();
406  hClusSizeR[iD*kFgtNumQuads+iQ]->Draw("colz");
407  cClusSizeRBig->Print("cClusSizeRBig.pdf");
408 
409 
410  cChargeElecSpace->cd(iD*kFgtNumQuads+iQ+1)->SetLogz();
411  hCChargeElecSpace[iD*kFgtNumQuads+iQ]->Draw("colz");
412 
413  cChargeElecSpaceBig->cd()->SetLogz();
414  hCChargeElecSpace[iD*kFgtNumQuads+iQ]->Draw("colz");
415  cChargeElecSpaceBig->Print("cChargeElecSpaceBig.pdf");
416 
417 
418  cClusSizeElecSpace->cd(iD*kFgtNumQuads+iQ+1)->SetLogz();
419  hClusSizeElecSpace[iD*kFgtNumQuads+iQ]->Draw("colz");
420 
421 
422  cClusSizeElecSpace->cd()->SetLogz();
423  hClusSizeElecSpace[iD*kFgtNumQuads+iQ]->Draw("colz");
424  cClusSizeElecSpaceBig->Print("cClusSizeElecCooBig.pdf");
425 
426 
427  cCorr->cd(iD*kFgtNumQuads+iQ+1)->SetLogz();
428  corrPlots[iD*kFgtNumQuads+iQ]->Draw("colz");
429 
430  cCorrBig->cd()->SetLogz();
431  corrPlots[iD*kFgtNumQuads+iQ]->Draw("colz");
432  cCorrBig->Print("r_phi_correlationsBig.pdf");
433 
434  }
435  cRadio->cd(iD+1)->SetLogz();
436  radioPlots[iD]->Draw("colz");
437 
438  // cRadioChargeR->cd(iD+1)->SetLogz();
439  cRadioChargeR->cd(iD+1);
440  radioChargeR[iD]->Draw("colz");
441 
442  // cRadioChargePhi->cd(iD+1)->SetLogz();
443  cRadioChargePhi->cd(iD+1);
444  radioChargePhi[iD]->Draw("colz");
445 
446  // cRadioClusSizeR->cd(iD+1)->SetLogz();
447  cRadioClusSizeR->cd(iD+1);
448  radioClusSizeR[iD]->Draw("colz");
449 
450  // cRadioClusSizePhi->cd(iD+1)->SetLogz();
451  cRadioClusSizePhi->cd(iD+1);
452  radioClusSizePhi[iD]->Draw("colz");
453 
454  //cRadioRatio->cd(iD+1)->SetLogz();
455  cRadioRatio->cd(iD+1);
456  radioRatio[iD]->Draw("colz");
457 
458  }
459 
460 
461  cout <<"saving .." <<endl;
462  cChargePhi->SaveAs("cChargePhi.pdf");
463  cChargePhi->SaveAs("cChargePhi.png");
464 
465  cChargeR->SaveAs("cChargeR.pdf");
466  cChargeR->SaveAs("cChargeR.png");
467 
468  cClusSizePhi->SaveAs("cClusSizePhi.pdf");
469  cClusSizePhi->SaveAs("cClusSizePhi.png");
470 
471  cClusSizeR->SaveAs("cClusSizeR.pdf");
472  cClusSizeR->SaveAs("cClusSizeR.png");
473 
474 
475  cChargeElecSpace->SaveAs("cClusSizeElecSpace.pdf");
476  cChargeElecSpace->SaveAs("cClusSizeElecSpace.png");
477 
478  cClusSizeElecSpace->SaveAs("cClusSizeElecSpace.pdf");
479  cClusSizeElecSpace->SaveAs("cClusSizeElecSpace.png");
480 
481  cRadio->SaveAs("radioPlots.png");
482  cRadio->SaveAs("radioPlots.pdf");
483 
484 
485  cRadioChargeR->SaveAs("radioChargeR.png");
486  cRadioChargePhi->SaveAs("radioChargePhi.png");
487 
488  cRadioClusSizeR->SaveAs("radioClusSizeR.png");
489  cRadioClusSizePhi->SaveAs("radioClusSizePhi.png");
490 
491  cRadioRatio->SaveAs("radioRatio.png");
492 
493 
494  cCorr->SaveAs("corrPlots.png");
495  cCorr->SaveAs("corrPlots.pdf");
496 
497  myRootFile->Write();
498  myRootFile->Close();
499 
500 
501  return ierr;
502 };
503 
504 
510  cout <<"gen plotter init" <<endl;
511  Int_t ierr=kStOk;
512 
513  myRootFile=new TFile("clusterPlotter.root","RECREATE");
514  // outTxtFile=new ofstream;
515  // outTxtFile->open("clusters.txt");
516 
517  outTxtFileP=new ofstream;
518  outTxtFileP->open("clustersP.txt");
519  outTxtFileR=new ofstream;
520  outTxtFileR->open("clustersR.txt");
521 
522  multPerDiscR=new TH1I*[kFgtNumDiscs*4];
523  multPerDiscP=new TH1I*[kFgtNumDiscs*5];
524 
525  seedsPerDiscR=new TH1I*[kFgtNumDiscs*4];
526  seedsPerDiscP=new TH1I*[kFgtNumDiscs*4];
527 
528 
529 
530  hClusterCharge=new TH1D("clusterCharge","clusterCharge",100, 0, 1000);
531  char buffer[100];
532  hCChargePosSpacePhi=new TH2D*[kFgtNumDiscs*kFgtNumQuads];
533  hCChargePosSpaceR=new TH2D*[kFgtNumDiscs*kFgtNumQuads];
534  hClusSizePhi=new TH2D*[kFgtNumDiscs*kFgtNumQuads];
535  hClusSizeR=new TH2D*[kFgtNumDiscs*kFgtNumQuads];
536  hCChargeElecSpace=new TH2D*[kFgtNumDiscs*kFgtNumQuads];
537  hClusSizeElecSpace=new TH2D*[kFgtNumDiscs*kFgtNumQuads];
538 
539  radioPlots=new TH2D*[kFgtNumDiscs];
540  radioRatio=new TH2D*[kFgtNumDiscs];
541 
542  radioChargeR=new TH2D*[kFgtNumDiscs];
543  radioChargePhi=new TH2D*[kFgtNumDiscs];
544 
545  radioClusSizeR=new TH2D*[kFgtNumDiscs];
546  radioClusSizePhi=new TH2D*[kFgtNumDiscs];
547  cout <<"1" <<endl;
548 
549  corrPlots=new TH2D*[kFgtNumDiscs*kFgtNumQuads];
550 
551 
552  for(int iD=0;iD<kFgtNumDiscs;iD++)
553  {
554  for(int iQ=0;iQ<4;iQ++)
555  {
556  sprintf(buffer,"clusterMult%d_QuadR%d_phi",iD,iQ);
557  multPerDiscR[iD*2+iQ]=new TH1I(buffer,buffer,10,0,10);
558  multPerDiscR[iD*2+iQ]->SetFillColor(kYellow);
559  sprintf(buffer,"clusterMult%d_QuadP%d_phi",iD,iQ);
560  multPerDiscP[iD*2+iQ]=new TH1I(buffer,buffer,10,0,10);
561  multPerDiscP[iD*2+iQ]->SetFillColor(kYellow);
562  sprintf(buffer,"seeds%d_QuadR%d_phi",iD,iQ);
563  seedsPerDiscR[iD*2+iQ]=new TH1I(buffer,buffer,10,0,10);
564  seedsPerDiscR[iD*2+iQ]->SetFillColor(kYellow);
565  sprintf(buffer,"seeds%d_QuadP%d_phi",iD,iQ);
566  seedsPerDiscP[iD*2+iQ]=new TH1I(buffer,buffer,10,0,10);
567  seedsPerDiscP[iD*2+iQ]->SetFillColor(kYellow);
568  }
569  cout <<"2" <<endl;
570  for(int iQ=0;iQ<kFgtNumQuads;iQ++)
571  {
572  sprintf(buffer,"clusterChargeDisk%d_Quad%d_phi",iD,iQ);
573  hCChargePosSpacePhi[iD*kFgtNumQuads+iQ]=new TH2D(buffer,buffer,200,-4,4, 200, 0, 2000);
574  sprintf(buffer,"clusterChargeDisk%d_Quad%d_R",iD,iQ);
575  hCChargePosSpaceR[iD*kFgtNumQuads+iQ]=new TH2D(buffer,buffer,200,10,35, 200, 0, 2000);
576  sprintf(buffer,"clusterSizeDisk%d_Quad%d_phi",iD,iQ);
577  hClusSizePhi[iD*kFgtNumQuads+iQ]=new TH2D(buffer,buffer,1000,-4,4, 20, 0, 20);
578  // hClusSizePhi[iD*kFgtNumQuads+iQ]->SetFillColor(kYellow);
579  sprintf(buffer,"clusterSizeDisk%d_Quad%d_R",iD,iQ);
580  hClusSizeR[iD*kFgtNumQuads+iQ]=new TH2D(buffer,buffer,1000,10,35, 20, 0, 20);
581  // hClusSizeR[iD*kFgtNumQuads+iQ]->SetFillColor(kYellow);
582  sprintf(buffer,"clusterSizeDisk%d_Quad%d_ElecSpace",iD,iQ);
583  hClusSizeElecSpace[iD*kFgtNumQuads+iQ]=new TH2D(buffer,buffer,100,0,1000, 20, 0, 20);
584  sprintf(buffer,"clusterChargeDisk%d_Quad%d_ElecSpace",iD,iQ);
585  hCChargeElecSpace[iD*kFgtNumQuads+iQ]=new TH2D(buffer,buffer,100,0,1000, 100, 0, 2000);
586  sprintf(buffer,"radioDisk%d_Quad_%d",iD,iQ);
587  radioPlots[iD]=new TH2D(buffer,buffer,100,-50,50,100,-50,50);
588 
589  sprintf(buffer,"radioRatio_%d_Quad_%d",iD,iQ);
590  radioRatio[iD]=new TH2D(buffer,buffer,30,-50,50,30,-50,50);
591 
592  sprintf(buffer,"radioChargeR_%d_Quad_%d",iD,iQ);
593  radioChargeR[iD]=new TH2D(buffer,buffer,30,-50,50,30,-50,50);
594  sprintf(buffer,"radioChargePhi_%d_Quad_%d",iD,iQ);
595  radioChargePhi[iD]=new TH2D(buffer,buffer,30,-50,50,30,-50,50);
596 
597  sprintf(buffer,"radioClusSizeR_%d_Quad_%d",iD,iQ);
598  radioClusSizeR[iD]=new TH2D(buffer,buffer,30,-50,50,30,-50,50);
599  sprintf(buffer,"radioClusSizePhi_%d_Quad_%d",iD,iQ);
600  radioClusSizePhi[iD]=new TH2D(buffer,buffer,30,-50,50,30,-50,50);
601 
602 
603  sprintf(buffer,"r_phi_ChargeCorr%d_Quad_%d",iD,iQ);
604 
605 
606  corrPlots[iD*kFgtNumQuads+iQ]=new TH2D(buffer,buffer,100,0,2000,100,0,2000);
607  }
608  }
609  cout <<"4" <<endl;
610  return ierr;
611 };
612 ClassImp(StFgtGenPlotter);
Definition: Stypes.h:41