00001
00002
00003
00004
00005 #include <TVector3.h>
00006 #include <TH2.h>
00007 #include <TF1.h>
00008 #include <TFile.h>
00009 #include <TLine.h>
00010 #include <TPolyLine.h>
00011 #include <TCrown.h>
00012 #include <TRandom3.h>
00013
00014 #include "StFgtSlowSimuMaker.h"
00015 #include "StFgtGeom.h"
00016
00017
00018
00019 void
00020 StFgtSlowSimuMaker::InitHisto1(){
00021
00022
00023
00024
00025
00026 int digNx=2000, digNy=digNx;
00027 float maxR=40.;
00028 digXY=new TH2F("digXY"," 2D digitization response of FGT quart; local X(cm); local Y (cm)",digNx,0.,maxR,digNy,0.,maxR); HList->Add(digXY);
00029
00030 digRad=new TH1F("digRad","rad-strips response of FGT disk; radial-strip ID",geom->radStripGBLId_number(),0.,geom->radStripGBLId_number()); HList->Add(digRad);
00031 digPhi=new TH1F("digPhi","phi-strips response of FGT disk; phi-strip ID",geom->phiStripGBLId_number(),0.,geom->phiStripGBLId_number()); HList->Add(digPhi);
00032
00033
00034 digXYAll=new TH2F("digXYAll"," 2D digitization response of all FGT quart; local X(cm); local Y (cm)",digNx,0.,maxR,digNy,0.,maxR); HList->Add(digXYAll);
00035
00036 digRadAll=new TH1F("digRadAll","rad-strips response of all FGT disks; radial-strip ID",geom->radStripGBLId_number(),0.,geom->radStripGBLId_number()); HList->Add(digRadAll);
00037 digPhiAll=new TH1F("digPhiAll","phi-strips response of all FGT disks; phi-strip ID",geom->phiStripGBLId_number(),0.,geom->phiStripGBLId_number()); HList->Add(digPhiAll);
00038
00039
00040 }
00041
00042
00043 void
00044 StFgtSlowSimuMaker::InitHisto2(){
00045
00046
00047 hA[0]=new TH1F("ss_inDE","g2t DE of hit; Elos (keV)",600,0.,5.);
00048 hA[1]=new TH1F("ss_inDS","g2t path length of hit; DS (cm)",60,0.,9.);
00049 hA[2]=new TH1F("ss_inZ","g2t Z of hit (entrance); Z(cm)",1000,50.,250.);
00050
00051
00052 hA[3]=new TH1F("ss_hitStat","Where hits are lost, 1-10 general; x=10+5*disk+quad",75, 0.5,75.5);
00053 hA[4]=new TH2F("ss_inXY","Entrance X-Y , accepted hits, all disks",90,-45.,45.,90,-45.,45.);
00054
00055 float maxRb=45.;
00056 hA[5]=new TH1F("ss_cTof","g2t TOF of hit (before cut); TOF(ns)",1000,0.,200.);
00057 hA[6]=new TH1F("ss_inR","g2t Rxy of hit, w=1.; Rxy (cm)",10*(int)maxRb,0.,maxRb);
00058 hA[7]=new TH1F("ss_cPmag","g2t P.Mag of hit (before cut); log10(momentum/MeV)",160,-2,6.);
00059
00060
00061
00062
00063
00064 int i;
00065 for(i=0;i<kFgtMxDisk;i++) {
00066 char tt1[100], tt2[500];
00067 sprintf(tt1,"ss_gXY%d",i);
00068 sprintf(tt2," hits accepted in Disk=%d; LAB X (cm) ; LAB Y (cm) ",i);
00069 hA[11+i]=new TH2F(tt1,tt2,25,-maxRb,maxRb,25,-maxRb,maxRb);
00070 }
00071 hA[20]=new TH1F("fr_pairEne", "Energy of pair per collision; Energy Loss per collision [eV]", 100, 0, 100);
00072 hA[21]=new TH1F("fr_nPrimPair", "No. of prim pairs per track; # of pairs", 35, -0.5, 34.5);
00073 hA[22]= new TH1F("fr_totEne", "Total energy deposit per track; Energy Loss [keV]", 250, 0, 5.);
00074
00075 hA[23]= new TH1F("fr_nTotPair", "Total No. of pairs per track; # of pairs", 250, -0.5, 249.5);
00076 hA[24]= new TH1F("fr_pathL", "Total path length in gas per track; path (mm)",50, 0., 10.);
00077 hA[25]= new TH1F("fr_avrPath", "Average path length , w=nAnyEle; path (mm)",50, 0., 10.);
00078 hA[26]= new TH1F("fr_avrTPath", "Average transverse path length , w=nAnyEle; path (mm)",250, 0., 10.);
00079 hA[27]=new TH1F("fr_Zdrf","Zdrift of prim ele ; Z(mm)",100,0.,5.);
00080 hA[28]=new TH2F("fr_Rdiff","Transverse diffusion; relative X(um); relative Y(um)",50,-250,250,50,-250,250);
00081
00082
00083
00084 TList *Lx; TCrown *cr;
00085
00086
00087 Lx=hA[4]->GetListOfFunctions(); assert(Lx);
00088 int iq=0;
00089 for(iq=0;iq<kFgtMxQuad;iq++) {
00090 float phi1=geom->phiQuadXaxis(iq)/3.1416*180.;
00091 cr=new TCrown(0.,0.,geom->Rin(),geom->Rout(),phi1,phi1+90);
00092 cr->SetLineColor(kRed); Lx->Add(cr);
00093 }
00094 cr=new TCrown(0.,0.,geom->Rmid(),geom->Rmid(),0,360);
00095 cr->SetLineColor(kMagenta); Lx->Add(cr); cr->SetLineStyle(2);
00096
00097
00098
00099
00100 for(i=0;i<mxH;i++)
00101 if(hA[i]) HList->Add(hA[i]);
00102
00103
00104 }
00105
00106
00107
00108
00109 void
00110 StFgtSlowSimuMaker::CloseHisto(){
00111
00112
00113 TList *Lx; TCrown *cr;
00114
00115
00116 Lx=digXY->GetListOfFunctions(); assert(Lx);
00117
00118 int iqq=0;
00119 for(iqq=0;iqq<2;iqq++) {
00120 float phi1=0;
00121 if(iqq<1)
00122 cr=new TCrown(0.,0.,geom->Rmid(),geom->Rout(),phi1,phi1+90);
00123 else
00124 cr=new TCrown(0.,0.,geom->Rin(),geom->Rmid(),phi1,phi1+90);
00125 cr->SetLineColor(kGreen);
00126 Lx->Add(cr);
00127 }
00128
00129 cr=new TCrown(0.,0.,geom->Rmid(),geom->Rmid(),0,90);
00130 Lx->Add(cr);
00131
00132 TList *Lx1;
00133 Lx1=digXYAll->GetListOfFunctions(); assert(Lx1);
00134
00135 for(iqq=0;iqq<2;iqq++) {
00136 float phi1=0;
00137 if(iqq<1)
00138 cr=new TCrown(0.,0.,geom->Rmid(),geom->Rout(),phi1,phi1+90);
00139 else
00140 cr=new TCrown(0.,0.,geom->Rin(),geom->Rmid(),phi1,phi1+90);
00141 cr->SetLineColor(kGreen);
00142 Lx1->Add(cr);
00143 }
00144
00145 cr=new TCrown(0.,0.,geom->Rmid(),geom->Rmid(),0,90);
00146 Lx1->Add(cr);
00147 }
00148
00149
00150
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162