StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtSlowSimu_histo.cxx
1 // *-- Author : J.Balewski
2 //
3 // $Id: StFgtSlowSimu_histo.cxx,v 1.1 2012/06/06 20:35:09 jeromel Exp $
4 
5 #include <TVector3.h>
6 #include <TH2.h>
7 #include <TF1.h>
8 #include <TFile.h>
9 #include <TLine.h>
10 #include <TPolyLine.h>
11 #include <TCrown.h>
12 #include <TRandom3.h>
13 
14 #include "StFgtUtil/geometry/StFgtGeom.h"
15 
16 #include "StFgtSlowSimuMaker.h"
17 
18 //_______________________________________________
19 //________________________________________________
20 void
21 StFgtSlowSimuMaker::InitHisto1( ){
22  /* working arrays for slow simulator:
23  quadDigitizationXY,quadDigitizationRad, quadDigitizationPhi is reset for every quart (24 times per event)
24  */
25 
26  Int_t digNx=2000, digNy=digNx;
27  Float_t maxR=40.;
28  quadDigitizationXY=new TH2F("digXY"," 2D digitization, z=charge (a.u); quadrant local X(cm); quadrant local Y (cm)",digNx,0.,maxR,digNy,0.,maxR);
29 
30  quadDigitizationRad=new TH1F("digRad","rad-strips ADC; radial-strip ID",kFgtNumStrips,0.,kFgtNumStrips);
31  quadDigitizationPhi=new TH1F("digPhi","phi-strips ADC; phi-strip ID",kFgtNumStrips,0.,kFgtNumStrips);
32 
33 
34 #ifdef __FGT_QA_HISTO__
35  HList->Add(quadDigitizationXY);
36  HList->Add(quadDigitizationRad);
37  HList->Add(quadDigitizationPhi);
38 
39  // The next 4 histograms are not reset for debugging purpose WMZ
40  digXYAll=new TH2F("digXYAll"," 2D charge , sens vol; local X(cm); local Y (cm)",digNx,0.,maxR,digNy,0.,maxR); HList->Add(digXYAll);
41 
42  digPadcAll=new TH2F("digPadcAll"," 2D ADC/bin, P-plane; local X(cm); local Y (cm)",digNx,0.,maxR,digNy,0.,maxR); HList->Add(digPadcAll);
43  digRadcAll=new TH2F("digRadcAll"," 2D ADC/bin, R-plane; local X(cm); local Y (cm)",digNx,0.,maxR,digNy,0.,maxR); HList->Add(digRadcAll);
44 
45  digRAll=new TH1F("digRAll","rad-strips ADC, all events; radial-strip ID",kFgtNumStrips,0.,kFgtNumStrips); HList->Add(digRAll);
46  digPAll=new TH1F("digPAll","phi-strips ADC, all events; phi-strip ID",kFgtNumStrips,0.,kFgtNumStrips); HList->Add(digPAll);
47 #endif
48 
49 }
50 
51 #ifdef __FGT_QA_HISTO__
52 //________________________________________________
53 //________________________________________________
54 void
55 StFgtSlowSimuMaker::InitHisto2(){
56 
57  // QA-histos
58  hA[0]=new TH1F("ss_inDE","g2t DE of hit; Elos (keV)",100,0.,5.);
59  hA[1]=new TH1F("ss_inDS","g2t path length of hit; DS (cm)",60,0.,9.);
60  hA[2]=new TH1F("ss_inZ","g2t Z of hit (entrance); Z(cm)",100,50.,250.);
61 
62 
63  hA[3]=new TH1F("ss_hitStat","Where G-hits are lost, 1-10 general; x=10+5*disk+quad",45, 0.5,45.5);
64  hA[4]=new TH2F("ss_inXY","Entrance X-Y , accepted G-hits, all disks",450,-45.,45.,450,-45.,45.);
65 
66  Float_t maxRb=45.;
67  hA[5]=new TH1F("ss_cTof","g2t TOF of hit (before cut); TOF(ns)",1000,0.,200.);
68  hA[6]=new TH1F("ss_inR","g2t Rxy of hit, w=1.; Rxy (cm)",10*(int)maxRb,0.,maxRb);
69  hA[7]=new TH1F("ss_cPmag","g2t P.Mag of hit (before cut); log10(momentum/MeV)",160,-2,6.);
70 
71 
72 
73  // 8,9,10-free
74 
75  Int_t i;
76  for(i=0;i<kFgtNumDiscs;i++) { // uses histos ID=[11,18]
77  char tt1[100], tt2[500];
78  sprintf(tt1,"ss_gXY%d",i+1);
79  sprintf(tt2," G-hits accepted in Disk=%d; LAB X (cm) ; LAB Y (cm) ",i+1);
80  hA[11+i]=new TH2F(tt1,tt2,25,-maxRb,maxRb,25,-maxRb,maxRb);
81  }
82  hA[20]=new TH1F("fr_pairEne", "Energy of pair per collision; Energy Loss per collision [eV]", 100, 0, 100);
83  hA[21]=new TH1F("fr_nPrimPair", Form("No. of prim pairs per track, use %.1f ions/mm; # of pairs",par_pairsPerCm/10.), 35, -0.5, 34.5);
84  hA[22]= new TH1F("fr_totEne", "Total energy deposit per track,F.model; Energy Loss [keV]", 250, 0, 5.);
85 
86  hA[23]= new TH1F("fr_nTotPair", "Total No. of pairs per track; # of pairs", 250, -0.5, 249.5);
87  hA[24]= new TH1F("fr_pathL", "Total path length in gas per track; path (mm)",50, 0., 10.);
88  hA[25]= new TH1F("fr_avrPath", "Average path length , w=nAnyEle; path (mm)",50, 0., 10.);
89  hA[26]= new TH1F("fr_avrTPath", "Average transverse path length , w=nAnyEle; path (mm)",250, 0., 10.);
90  hA[27]=new TH1F("fr_Zdrf","Zdrift of prim ele ; Z(mm)",100,0.,5.);
91  hA[28]=new TH2F("fr_Rdiff","Transverse diffusion; relative X(um); relative Y(um)",50,-250,250,50,-250,250);
92 
93 
94  hA[29]=new TH1F("dg_Radc","R-plane ADC sum per quad per eve; ADC sum ",200,0,3000);
95  hA[30]=new TH1F("dg_Padc","P-plane ADC sum per quad per eve; ADC sum ",200,0,3000);
96  hA[31]=new TH2F("dg_PRadc","ADC sum per quad per eve; P-plane sum; R-plane sum", 100,0,2000,100,0,2000);
97 
98 
99  //..............add gadgets to histos
100  TList *Lx; TCrown *cr; //TLine *ln;
101 
102  //....inXY....
103  Lx=hA[4]->GetListOfFunctions(); //jjassert(Lx);
104  Int_t iq=0;
105 
106  for(iq=0;iq<kFgtNumQuads;iq++) {
107  Float_t phi1=StFgtGeom::phiQuadXaxis(iq)/3.1416*180.;
108  cr=new TCrown(0.,0.,StFgtGeom::rIn(),StFgtGeom::rOut(),phi1,phi1+90);
109  cr->SetLineColor(kRed); Lx->Add(cr);
110  }
111  cr=new TCrown(0.,0.,StFgtGeom::rMid(),StFgtGeom::rMid(),0,360);
112  Lx->Add(cr);
113 
114  for(i=0;i<mxH;i++)
115  if(hA[i]) HList->Add(hA[i]);
116 
117 
118 }
119 #endif
120 
121 
122 //_______________________________________________
123 //________________________________________________
124 void
125 StFgtSlowSimuMaker::CloseHisto(){
126 
127  //..............add gadgets to histos
128  TList *Lx; TCrown *cr; //TLine *ln;
129 
130  for(Int_t ih=0;ih<3;ih++) {
131 
132  if( ih==0) Lx=quadDigitizationXY->GetListOfFunctions();
133  if( ih==1) Lx=digXYAll->GetListOfFunctions();
134  if( ih==2) Lx=digPadcAll->GetListOfFunctions();
135  //jjassert(Lx);
136 
137  Int_t iqq=0;
138  for(iqq=0;iqq<2;iqq++) {
139  Float_t phi1=0;
140  if(iqq<1)
141  cr=new TCrown(0.,0.,StFgtGeom::rMid(),StFgtGeom::rOut(),phi1,phi1+90);
142  else
143  cr=new TCrown(0.,0.,StFgtGeom::rIn(),StFgtGeom::rMid(),phi1,phi1+90);
144  cr->SetLineStyle(2);
145  Lx->Add(cr);
146  }
147  cr=new TCrown(0.,0.,StFgtGeom::rMid(),StFgtGeom::rMid(),0,90);
148  Lx->Add(cr);
149 
150  TLine *ln=new TLine(0,0,30,30);
151  ln->SetLineStyle(2); Lx->Add(ln);
152 
153  }
154 }
155 
156 
157 
160 
161 // $Log: StFgtSlowSimu_histo.cxx,v $
162 // Revision 1.1 2012/06/06 20:35:09 jeromel
163 // Code review closed (requested Anselm/Jan; reviewed Jonathan/Jason)
164 //
165 // Revision 1.16 2012/05/08 16:40:26 avossen
166 // prepare for review
167 //
168 // Revision 1.15 2012/03/17 01:08:31 balewski
169 // works with Anselm's cluster finder
170 //
171 // Revision 1.14 2012/02/09 16:48:06 rfatemi
172 // Updated Rin, Rmin, Rout etc to conform with new names in StFgtGeom class
173 //
174 // Revision 1.13 2012/01/27 14:09:34 balewski
175 // switch to new consts
176 //
177 // Revision 1.12 2012/01/26 18:41:43 balewski
178 // fixing , new constants
179 //
180 // Revision 1.11 2012/01/04 16:33:10 balewski
181 // adjusted lables
182 //
183 // Revision 1.10 2011/12/01 00:58:01 avossen
184 // changed the use of the naive maker to use of StFgtDb, replaced geom-> with StFgtGeom::
185 //
186 // Revision 1.9 2011/11/08 21:43:25 balewski
187 // testing P-strips
188 //
189 // Revision 1.8 2011/11/02 20:53:07 balewski
190 // slow simu works for 6 discs, onlt R-plane
191 //
192 // Revision 1.7 2011/10/12 21:15:02 balewski
193 // half way
194 //
195 // Revision 1.6 2011/10/12 18:20:38 balewski
196 // after testing of R-strip ID mapping
197 //
198 // Revision 1.5 2011/10/07 19:45:33 balewski
199 // testing strip ID
200 //
201 // Revision 1.3 2011/10/05 18:04:33 balewski
202 // storing of FGT in StEvent is almost working
203 //
204 // Revision 1.2 2011/09/29 21:36:17 balewski
205 // now 2D distribution of charge & fiducial cuts are workimng properly
206 //
207 // Revision 1.1 2011/09/28 20:57:37 balewski
208 // merging private code
209 //
210 // Revision 1.1 2011/04/07 19:31:22 balewski
211 // start
212 //
213 
214 
215 
216 
217