![]() |
![]() |
#include <Geometry/EcalAlgo/interface/EcalPreshowerGeometry.h>
Definition at line 11 of file EcalPreshowerGeometry.h.
Definition at line 16 of file EcalPreshowerGeometry.h.
Definition at line 17 of file EcalPreshowerGeometry.h.
Definition at line 15 of file EcalPreshowerGeometry.h.
Definition at line 19 of file EcalPreshowerGeometry.h.
Definition at line 23 of file EcalPreshowerGeometry.h.
00023 { k_NumberOfCellsForCorners = 137216 } ;
EcalPreshowerGeometry::EcalPreshowerGeometry | ( | ) |
Definition at line 6 of file EcalPreshowerGeometry.cc.
References _act_w, _centre_gap, _inter_lad_gap, _intra_lad_gap, _pitch, _waf_w, and _zplane.
00006 : 00007 _nnwafers( 0 ) , 00008 _nnstrips( 0 ) 00009 { 00010 //PM 20060518 FOR THE MOMENT USING HARDCODED NUMBERS 00011 //TODO: TAKE THEM FOR XML GEOMETRY 00012 00013 // _zplane[0]=303.16; 00014 // _zplane[1]=307.13; 00015 _zplane[0]=303.353; 00016 _zplane[1]=307.838; 00017 _pitch = 0.190625; //strip pitch 00018 _waf_w = 6.3; // wafer width 00019 _act_w = 6.1; //wafer active area 00020 //new geometry 00021 _intra_lad_gap = 0.04; // gap between wafers in same ladder 00022 _inter_lad_gap = 0.05;// additional gap between wafers in adj ladders 00023 _centre_gap = 0.05; // gap at center 00024 }
EcalPreshowerGeometry::~EcalPreshowerGeometry | ( | ) | [virtual] |
The EcalPreshowerGeometry will delete all its cell geometries at destruction time.
Definition at line 27 of file EcalPreshowerGeometry.cc.
DetId EcalPreshowerGeometry::getClosestCell | ( | const GlobalPoint & | r | ) | const [virtual] |
Reimplemented from CaloSubdetectorGeometry.
Definition at line 31 of file EcalPreshowerGeometry.cc.
References getClosestCellInPlane().
00032 { 00033 return getClosestCellInPlane( point, 2 ); 00034 }
DetId EcalPreshowerGeometry::getClosestCellInPlane | ( | const GlobalPoint & | r, | |
int | plane | |||
) | const [virtual] |
Definition at line 37 of file EcalPreshowerGeometry.cc.
References _act_w, _centre_gap, _inter_lad_gap, _intra_lad_gap, _pitch, _waf_w, _zplane, parsecf::pyparsing::col(), e, prof2calltree::edge, int, CaloSubdetectorGeometry::present(), row, PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.
Referenced by PreshowerHitMaker::addHit(), and getClosestCell().
00039 { 00040 float x = point.x(); 00041 float y = point.y(); 00042 float z = point.z(); 00043 00044 if (z == 0.0) 00045 { 00046 return DetId(0); 00047 } 00048 00049 // extrapolate to plane on this side 00050 float xe = x * fabs(_zplane[plane-1]/z) ; 00051 float ye = y * fabs(_zplane[plane-1]/z) ; 00052 00053 float x0,y0; 00054 00055 if (plane == 1) { 00056 x0=xe; 00057 y0=ye; 00058 } 00059 else{ 00060 y0=xe; 00061 x0=ye; 00062 } 00063 00064 //find row 00065 00066 int imul = (y0 < 0.) ? +1 : -1 ; 00067 float yr = -(y0 + imul*_centre_gap )/_act_w; 00068 int row = (yr < 0.) ? (19 + int(yr) ) : (20 + int(yr)); 00069 row= 40 - row; 00070 00071 if (row < 1 || row > 40 ) { 00072 return DetId(0); 00073 } 00074 //find col 00075 int col = 40 ; 00076 int nlad = (col < 20 ) ? (20-col)/2 :(19-col)/2 ; 00077 float edge = (20-col) * (_waf_w + _intra_lad_gap)+ nlad * _inter_lad_gap; 00078 edge = -edge; 00079 while (x0 < edge && col > 0){ 00080 col--; 00081 nlad = (col < 20 ) ? (20-col)/2 :(19-col)/2 ; 00082 edge = (20-col) * (_waf_w + _intra_lad_gap) + // complete wafer 00083 nlad * _inter_lad_gap; // extra gap 00084 edge = -edge; 00085 } 00086 00087 col++; 00088 00089 00090 if ( col < 1 || col > 40 || x0 < edge) { 00091 return DetId(0); 00092 } 00093 00094 //Find strip 00095 float stredge = edge + (_waf_w + _intra_lad_gap)/2. - // + half a wafer 00096 _act_w/2. ; // - half active area 00097 00098 int istr = int((x0-stredge)/_pitch) + 1 ; 00099 if (istr > 32) istr=32; 00100 if (istr <1) istr=1; 00101 //Find zside 00102 int zside = ( z > 0.) ? +1 : -1; 00103 00104 if (plane == 1) 00105 { 00106 try 00107 { 00108 if (present(ESDetId(istr, col, row, 1, zside))) 00109 return DetId(ESDetId(istr, col, row, 1, zside)); 00110 } 00111 catch ( cms::Exception &e ) 00112 { 00113 return DetId(0); 00114 } 00115 } 00116 else if (plane == 2) 00117 { 00118 try 00119 { 00120 if (present(ESDetId(istr, row, col, 2, zside))) 00121 return DetId(ESDetId(istr, row, col, 2, zside)); 00122 } 00123 catch ( cms::Exception &e ) 00124 { 00125 return DetId(0); 00126 } 00127 } 00128 00129 return DetId(0); 00130 }
int EcalPreshowerGeometry::getNumberOfStripsPerWafer | ( | ) | const [inline] |
Definition at line 32 of file EcalPreshowerGeometry.h.
References _nnstrips.
00032 { return _nnstrips ; }
int EcalPreshowerGeometry::getNumberOfWafers | ( | ) | const [inline] |
Definition at line 30 of file EcalPreshowerGeometry.h.
References _nnwafers.
00030 { return _nnwafers ; }
static std::string EcalPreshowerGeometry::hitString | ( | ) | [inline, static] |
static unsigned int EcalPreshowerGeometry::numberOfAlignments | ( | ) | [inline, static] |
Definition at line 51 of file EcalPreshowerGeometry.h.
Referenced by FakeCaloAlignmentEP::produceESAli().
static std::string EcalPreshowerGeometry::producerName | ( | ) | [inline, static] |
Definition at line 38 of file EcalPreshowerGeometry.h.
References _nnstrips.
00038 { _nnstrips=nnstrips ; }
Definition at line 36 of file EcalPreshowerGeometry.h.
References _nnwafers.
00036 { _nnwafers=nnwafers ; }
void EcalPreshowerGeometry::setzPlanes | ( | float | z1, | |
float | z2 | |||
) | [inline] |
float EcalPreshowerGeometry::_act_w [private] |
Definition at line 61 of file EcalPreshowerGeometry.h.
Referenced by EcalPreshowerGeometry(), and getClosestCellInPlane().
float EcalPreshowerGeometry::_centre_gap [private] |
Definition at line 61 of file EcalPreshowerGeometry.h.
Referenced by EcalPreshowerGeometry(), and getClosestCellInPlane().
float EcalPreshowerGeometry::_inter_lad_gap [private] |
Definition at line 61 of file EcalPreshowerGeometry.h.
Referenced by EcalPreshowerGeometry(), and getClosestCellInPlane().
float EcalPreshowerGeometry::_intra_lad_gap [private] |
Definition at line 61 of file EcalPreshowerGeometry.h.
Referenced by EcalPreshowerGeometry(), and getClosestCellInPlane().
int EcalPreshowerGeometry::_nnstrips [private] |
number of crystals per module
Definition at line 59 of file EcalPreshowerGeometry.h.
Referenced by getNumberOfStripsPerWafer(), and setNumberOfStripsPerWafer().
int EcalPreshowerGeometry::_nnwafers [private] |
number of modules
Definition at line 56 of file EcalPreshowerGeometry.h.
Referenced by getNumberOfWafers(), and setNumberOfWafers().
float EcalPreshowerGeometry::_pitch [private] |
Definition at line 61 of file EcalPreshowerGeometry.h.
Referenced by EcalPreshowerGeometry(), and getClosestCellInPlane().
float EcalPreshowerGeometry::_waf_w [private] |
Definition at line 61 of file EcalPreshowerGeometry.h.
Referenced by EcalPreshowerGeometry(), and getClosestCellInPlane().
float EcalPreshowerGeometry::_zplane[2] [private] |
Definition at line 62 of file EcalPreshowerGeometry.h.
Referenced by EcalPreshowerGeometry(), getClosestCellInPlane(), and setzPlanes().