2 #include "FairGeoNode.h"
18 fRichOffset = TVector3( 0, 0, 700-35-10 );
19 fAlBoxSize = TVector3( 600, 600, 100 );
20 fAlBoxWallThickness = 0.05;
21 fAerogelSize = TVector3( 0*590+1*290, 0*590+1*120, 4 );
22 fAerogelOffset = TVector3( 0, 0, 1 );
23 fnOpt = std::vector<Double_t>(1,1.05);
24 fAerogelLayers = std::vector<Double_t>(1,1);
25 fAngleExtansionInner = 1.0;
26 fAngleExtansionOuter = 1.0;
27 fMirrorCurvature = 20;
28 fAngleOfMirrorPosition = 50;
29 fMirrorThickness = 0.1;
37 fFlatMirrorZ = std::vector<Double_t>(2);
38 fFlatMirrorY = std::vector<Double_t>(2);
39 fFlatMirrorZGlob = std::vector<Double_t>(2);
40 fFlatMirrorYGlob = std::vector<Double_t>(2);
41 fPhDetZ = std::vector<Double_t>(2);
42 fPhDetY = std::vector<Double_t>(2);
45 fSensorsPerDevice = 1<<(fSenseLevel-1);
49 std::string workdir(getenv(
"VMCWORKDIR" ));
50 std::string effFileName = workdir;
54 effFileName +=
"/detectors/rich/pde_dpc3200_22.dat";
63 effFileName +=
"/detectors/rich/pde_h12700.dat";
70 std::ifstream from( effFileName.c_str() );
73 while( !from.eof() ) {
74 fWlPhoton.push_back(wli);
75 fPDE.push_back(pdei/100.0/keff);
78 fPhDetEff =
new TGraph(fWlPhoton.size(),fWlPhoton.data(),fPDE.data());
83 size_t nRefInd = (ver0%100000)/1000;
84 size_t nlayers = (ver0%1000)/100;
85 size_t ver = ver0%100;
86 nlayers = nlayers ? nlayers : 3;
98 alpha = alpha < 45 - beta ? alpha : 45 -beta;
102 double theta = atan(ya/za);
103 double alpha1 = 2*(alpha+beta) - ka1*thetaCh;
104 double alpha2 = 2*(alpha-beta) + ka2*thetaCh + theta;
105 double alpham = (alpha1+alpha2)/2;
106 double zm1 = zp1 + yp1/tan(alpha1);
108 double zm2 = (zm1+ya*tan(alpha))/(1-tan(theta+ka2*thetaCh)*tan(alpha));
109 double ym2 = (zm2-zm1)/tan(alpha);
110 double zp2 = ((ym2-yp1+zm2*tan(alpha2))*tan(alpham)+zp1)/(1+tan(alpha2)*tan(alpham));
111 double yp2 = yp1 + (zp2-zp1)/tan(alpham);
115 alpham = atan((zp2-zp1)/(yp2-yp1));
118 double zmc = (zm1+zm2)/2;
119 double ymc = (ym1+ym2)/2;
120 double wm =
sqrt((zm1-zm2)*(zm1-zm2)+(ym1-ym2)*(ym1-ym2));
121 double rm = wm/2/
sin(beta);
122 double hm = rm*
cos(beta);
125 double theta1 = 360-(alpha+beta)*180/M_PI;
126 double theta2 = 360-(alpha-beta)*180/M_PI;
141 theta1 -= theta1<180 ? 0 : 360;
142 theta2 -= theta2<180 ? 0 : 360;
159 dn = nRefInd ? (nRefInd-1)*0.00005 : 0.000817682;
160 fnOpt[0] = 1.05 - dn;
161 fnOpt[1] = 1.05 + dn;
168 dn = nRefInd ? (nRefInd-1)*0.00005 : 0.00108652;
169 fnOpt[0] = 1.05 - dn;
171 fnOpt[2] = 1.05 + dn;
179 dn = nRefInd ? (nRefInd-1)*0.00005 : 0.00122976;
180 fnOpt[0] = 1.05 - dn;
183 fnOpt[3] = 1.05 + dn;
240 for(UInt_t
i=0;
i<nm;
i++) {
265 for(UInt_t
i=0;
i<nm;
i++) {
293 for(UInt_t
i=0;
i<nm;
i++) {
323 for(UInt_t
i=0;
i<nm;
i++) {
355 for(UInt_t
i=0;
i<nm;
i++) {
389 for(UInt_t
i=0;
i<nm;
i++) {
425 for(UInt_t
i=0;
i<nm;
i++) {
463 for(UInt_t
i=0;
i<nm;
i++) {
503 for(UInt_t
i=0;
i<nm;
i++) {
589 xc[0] = 0.23; yc[0] = 0.195; dxc[0] = 0.16; dyc[0] = 0.19;
590 xc[1] = 0.56; yc[1] = 0.585; dxc[1] = 0.16; dyc[1] = 0.19;
591 xc[2] = 1.02; yc[2] = 0.975; dxc[2] = 0.16; dyc[2] = 0.19;
592 xc[3] = 1.35; yc[3] = 1.365; dxc[3] = 0.16; dyc[3] = 0.19;
594 xcl3[0] = 0.395; ycl3[0] = 0.39;
595 xcl3[1] = 1.185; ycl3[1] = 1.17;
603 gep = gRandom->Uniform()<=(cell?0.74:1);
610 xc[0] = 0.3; yc[0] = 0.3; dxc[0] = 0.3; dyc[0] = 0.3;
611 xc[1] = 0.9; yc[1] = 0.9; dxc[1] = 0.3; dyc[1] = 0.3;
612 xc[2] = 1.5; yc[2] = 1.5; dxc[2] = 0.3; dyc[2] = 0.3;
613 xc[3] = 2.1125; yc[3] = 2.1125; dxc[3] = 0.3125; dyc[3] = 0.3125;
615 xcl3[0] = 0.6; ycl3[0] = 0.6;
616 xcl3[1] = 1.8125; ycl3[1] = 1.8125;
626 Int_t sx = xl>0?1:-1;
627 Int_t sy = yl>0?1:-1;
628 UInt_t ix = (sx*xl)/dx;
629 UInt_t iy = (sy*yl)/dy;
687 UInt_t nsh = fSensorsPerDevice/2;
688 Int_t sx = ixl<nsh?-1:1;
689 Int_t sy = iyl<nsh?-1:1;
690 UInt_t ixm = ixl<nsh?nsh-ixl-1:ixl-nsh;
691 UInt_t iym = iyl<nsh?nsh-iyl-1:iyl-nsh;
709 xc[0] = 0.23; yc[0] = 0.195;
710 xc[1] = 0.56; yc[1] = 0.585;
711 xc[2] = 1.02; yc[2] = 0.975;
712 xc[3] = 1.35; yc[3] = 1.365;
714 xcl3[0] = 0.395; ycl3[0] = 0.39;
715 xcl3[1] = 1.185; ycl3[1] = 1.17;
725 xc[0] = 0.3; yc[0] = 0.3;
726 xc[1] = 0.9; yc[1] = 0.9;
727 xc[2] = 1.5; yc[2] = 1.5;
728 xc[3] = 2.1125; yc[3] = 2.1125;
730 xcl3[0] = 0.6; ycl3[0] = 0.6;
731 xcl3[1] = 1.8125; ycl3[1] = 1.8125;
774 if (x&&dX) x = ((int)(x/dX_) + x/
std::fabs(x)/2)*dX_;
775 if (y&&dY) y = ((int)(y/dY_) + y/
std::fabs(y)/2)*dY_;
776 if (z&&dZ) z = ((int)(z/dZ_) + z/
std::fabs(z)/2)*dZ_;
777 return TVector3(x,y,z);
798 return TVector3(x,y,0);
815 sprintf(
modName,
"rich0%i",m+1);
822 sprintf(
eleName,
"rich0%i",m+1);
Double_t mirrorCurvature()
std::vector< Double_t > fnOpt
refraction index of the aerogel
friend F32vec4 acos(const F32vec4 &a)
Double_t phDetQEff(Double_t wl)
friend F32vec4 cos(const F32vec4 &a)
std::vector< Double_t > fFlatMirrorY
No idea (SS)
double fAerogelEntrancePositionZ
UInt_t IndexY(TVector3 pos)
TVector3 PhDetPositionLocal(TVector3 pos)
friend F32vec4 sqrt(const F32vec4 &a)
std::vector< Double_t > fPhDetZ
No idea (SS)
friend F32vec4 sin(const F32vec4 &a)
TVector3 PositionDiscretization(TVector3 pos, bool cell=true)
Double_t angleOfMirrorPosition()
const char * getEleName(Int_t)
ClassImp(PndRichGeo) PndRichGeo
std::vector< Double_t > fFlatMirrorZGlob
No idea (SS)
std::vector< Double_t > fFlatMirrorYGlob
No idea (SS)
TVector3 PhDetPositionGlobal(TVector3 pos)
std::vector< Double_t > fFlatMirrorZ
No idea (SS)
UInt_t IndexX(TVector3 pos)
std::vector< Double_t > fWlPhoton
Double_t angleExtansionOuter()
friend F32vec4 fabs(const F32vec4 &a)
std::vector< Double_t > fAerogelLayers
No idea (SS)
TVector3 PixelPositionLocal(UInt_t ix, UInt_t iy)
TVector3 PixelPositionGlobal(UInt_t ix, UInt_t iy)
Double_t angleExtansionInner()
TVector3 LocalPositionDiscretization(TVector3 pos, Double_t dX=-1, Double_t dY=-1, Double_t dZ=-1)
std::vector< Double_t > fPhDetY
No idea (SS)
double fMirrorLength
Mirror length [cm].
const char * getModuleName(Int_t)
std::vector< Double_t > nOpt()
TVector3 PixelPosition(UInt_t ix, UInt_t iy)