#include <NonProjCalLayer.hh>
Collaboration diagram for NonProjCalLayer:

Public Member Functions | |
| NonProjCalLayer (const NonProjCalGeomParams &par, const int ilay) | |
| ~NonProjCalLayer () | |
| int | Index () const |
| int | NumCellsAlongPhi () const |
| int | NumCellsAlongZ () const |
| NPCellID | getClosestCell (const G4ThreeVector &pos) const |
| bool | activeCellContains (const NPCellID &id, const G4ThreeVector &pos) const |
| double | getCellCenterCylR (const NPCellID &id) const |
| double | getCellCenterPhi (const NPCellID &id) const |
| double | getCellCenterZ (const NPCellID &id) const |
| G4ThreeVector | getCellCenter (const NPCellID &id) const |
| double | getCellCenterX (const NPCellID &id) const |
| double | getCellCenterY (const NPCellID &id) const |
| double | getCellCenterTheta (const NPCellID &id) const |
| double | getCellCenterSphR (const NPCellID &id) const |
| double | getInnerRadiusOfActive () const |
| double | getCenterRadiusOfActive () const |
| int | getNcellsAlongZ () const |
| int | getNcellsAlongPhi () const |
| double | getCellSizeAlongZ () const |
| double | getDeltaPhi () const |
| double | getCellSizeAlongPhi () const |
Private Attributes | |
| const NonProjCalGeomParams * | _par |
| unsigned int | layerIndex |
| double | rc |
| double | deltaR |
| int | nphi |
| double | phic |
| double | deltaPhi |
| int | nz |
| double | zc |
| double | deltaZ |
|
||||||||||||
|
Definition at line 4 of file NonProjCalLayer.cc. References _par, deltaPhi, deltaR, deltaZ, layerIndex, nphi, nz, phic, NonProjCalGeomParams::PreAbsThickness(), rc, and zc.
00004 {
00005
00006 // layer number
00007 layerIndex = ilay;
00008 _par = ∥
00009
00010 // layer thickness
00011 double preabs_thick = par.PreAbsThickness();
00012 double postabs_thick = par.PostAbsThickness();
00013 double sens_thick = par.SensorThickness();
00014 double layer_thick = preabs_thick + sens_thick + postabs_thick;
00015 // inner radius of sensitive layer
00016 double ri= par.GlobalRmin() + layerIndex*layer_thick + preabs_thick;
00017 // System.out.println("abst="+abs_thick+", senst="+sens_thick
00018 // +", layt="+layer_thick);
00019
00020 // cyl coord r for cell center
00021 rc = ri + sens_thick/2;
00022 // radial distance between adjacent layers
00023 deltaR = layer_thick;
00024 // System.out.println("rc="+rc+", deltaR="+deltaR);
00025
00026 // number of cells along phi in current layer
00027 nphi = (int)floor( 2.*M_PI*ri / par.CellDimPhi() );
00028 // phi angle corresponding to a single cell in current layer
00029 deltaPhi = 2.*M_PI / nphi;
00030 // azymuth for center of cell indexed iphi=0 in current layer
00031 phic = deltaPhi / 2;
00032 // System.out.println("nphi="+nphi+", deltaPhi="+deltaPhi
00033 // +", phic="+phic);
00034 // double philen = ri * deltaPhi;
00035 // System.out.println("philen="+philen);
00036
00037 // number of cells along z in current layer
00038 double zmax = par.GlobalZmax();
00039 nz = (int)floor( 2.*zmax / par.CellDimZ() );
00040 // distance along z between neighbor cell centers
00041 deltaZ = 2.*zmax / nz;
00042 // z-coord of cell indexed iz=0 in current layer
00043 zc = -double(nz-1)*deltaZ/2.; // works for any nz!
00044 // G4cout <<"zmax="<< zmax <<", nz="<< nz <<", dZ="<< deltaZ
00045 // <<", zc="<< zc << G4endl;
00046 }
|
|
|
Definition at line 24 of file NonProjCalLayer.hh.
00024 {}
|
|
||||||||||||
|
Definition at line 61 of file NonProjCalLayer.cc. References _par, deltaPhi, deltaZ, NPCellID::iphi, NPCellID::ir, NPCellID::iz, layerIndex, phic, rc, NonProjCalGeomParams::SensorThickness(), and zc.
00063 {
00064 assert( id.ir == layerIndex ); // otherwise is a nonsense...
00065 // Check it is within sensor thickness
00066 double r = sqrt( pos.x()*pos.x() + pos.y()*pos.y() );
00067 if( fabs(r-rc) > _par->SensorThickness()/2 ) return false;
00068
00069 // point is in layer, check cell indices
00070 unsigned int iz = (int)floor((pos.z()-zc)/deltaZ + 0.5);
00071 if( iz != id.iz ) return false;
00072
00073 double phi = atan( pos.y() / pos.x() );
00074 unsigned int iphi = (int)floor((phi-phic)/deltaPhi + 0.5);
00075 if( iphi != id.iphi ) return false;
00076
00077 // well... ok
00078 return true;
00079 }
|
|
|
Definition at line 46 of file NonProjCalLayer.hh. References getCellCenterX(), getCellCenterY(), and getCellCenterZ().
00046 {
00047 return G4ThreeVector(getCellCenterX(id),
00048 getCellCenterY(id),
00049 getCellCenterZ(id));
00050 }
|
|
|
Definition at line 37 of file NonProjCalLayer.hh. References rc.
00037 {
00038 return rc;
00039 }
|
|
|
Definition at line 40 of file NonProjCalLayer.hh. References deltaPhi, NPCellID::iphi, and phic. Referenced by getCellCenterX(), and getCellCenterY().
|
|
|
Definition at line 61 of file NonProjCalLayer.hh. References getCellCenterZ(), rc, and zc.
00061 {
00062 double zc = getCellCenterZ(id);
00063 return std::sqrt( rc*rc + zc*zc );
00064 // return Math.sqrt( rc*rc + Math.pow(getCellCenterZ(id),2) );
00065 }
|
|
|
Definition at line 58 of file NonProjCalLayer.hh. References getCellCenterZ(), and rc.
00058 {
00059 return M_PI/2 - std::atan( getCellCenterZ(id)/rc );
00060 }
|
|
|
Definition at line 52 of file NonProjCalLayer.hh. References getCellCenterPhi(), and rc. Referenced by getCellCenter().
00052 {
00053 return rc * std::cos( getCellCenterPhi(id) );
00054 }
|
|
|
Definition at line 55 of file NonProjCalLayer.hh. References getCellCenterPhi(), and rc. Referenced by getCellCenter().
00055 {
00056 return rc * std::sin( getCellCenterPhi(id) );
00057 }
|
|
|
Definition at line 43 of file NonProjCalLayer.hh. References deltaZ, NPCellID::iz, and zc. Referenced by getCellCenter(), getCellCenterSphR(), and getCellCenterTheta().
|
|
|
Definition at line 85 of file NonProjCalLayer.hh. References deltaPhi, and getInnerRadiusOfActive().
00085 {
00086 // Note that this is measured along inner face, not along center
00087 return deltaPhi * getInnerRadiusOfActive();
00088 }
|
|
|
Definition at line 79 of file NonProjCalLayer.hh. References deltaZ.
00079 {
00080 return deltaZ;
00081 }
|
|
|
Definition at line 70 of file NonProjCalLayer.hh. References rc.
00070 {
00071 return rc;
00072 }
|
|
|
Definition at line 50 of file NonProjCalLayer.cc. References deltaPhi, deltaZ, layerIndex, phic, and zc.
|
|
|
Definition at line 82 of file NonProjCalLayer.hh. References deltaPhi.
00082 {
00083 return deltaPhi;
00084 }
|
|
|
Definition at line 67 of file NonProjCalLayer.hh. References _par, rc, and NonProjCalGeomParams::SensorThickness(). Referenced by getCellSizeAlongPhi().
00067 {
00068 return rc - _par->SensorThickness()/2;
00069 }
|
|
|
Definition at line 76 of file NonProjCalLayer.hh. References nphi.
00076 {
00077 return nphi;
00078 }
|
|
|
Definition at line 73 of file NonProjCalLayer.hh. References nz.
00073 {
00074 return nz;
00075 }
|
|
|
Definition at line 27 of file NonProjCalLayer.hh. References layerIndex.
00027 { return layerIndex; }
|
|
|
Definition at line 28 of file NonProjCalLayer.hh. References nphi.
00028 { return nphi; }
|
|
|
Definition at line 29 of file NonProjCalLayer.hh. References nz.
00029 { return nz; }
|
|
|
Definition at line 93 of file NonProjCalLayer.hh. Referenced by activeCellContains(), getInnerRadiusOfActive(), and NonProjCalLayer(). |
|
|
Definition at line 106 of file NonProjCalLayer.hh. Referenced by activeCellContains(), getCellCenterPhi(), getCellSizeAlongPhi(), getClosestCell(), getDeltaPhi(), and NonProjCalLayer(). |
|
|
Definition at line 99 of file NonProjCalLayer.hh. Referenced by NonProjCalLayer(). |
|
|
Definition at line 113 of file NonProjCalLayer.hh. Referenced by activeCellContains(), getCellCenterZ(), getCellSizeAlongZ(), getClosestCell(), and NonProjCalLayer(). |
|
|
Definition at line 95 of file NonProjCalLayer.hh. Referenced by activeCellContains(), getClosestCell(), Index(), and NonProjCalLayer(). |
|
|
Definition at line 102 of file NonProjCalLayer.hh. Referenced by getNcellsAlongPhi(), NonProjCalLayer(), and NumCellsAlongPhi(). |
|
|
Definition at line 109 of file NonProjCalLayer.hh. Referenced by getNcellsAlongZ(), NonProjCalLayer(), and NumCellsAlongZ(). |
|
|
Definition at line 104 of file NonProjCalLayer.hh. Referenced by activeCellContains(), getCellCenterPhi(), getClosestCell(), and NonProjCalLayer(). |
|
|
Definition at line 97 of file NonProjCalLayer.hh. Referenced by activeCellContains(), getCellCenterCylR(), getCellCenterSphR(), getCellCenterTheta(), getCellCenterX(), getCellCenterY(), getCenterRadiusOfActive(), getInnerRadiusOfActive(), and NonProjCalLayer(). |
|
|
Definition at line 111 of file NonProjCalLayer.hh. Referenced by activeCellContains(), getCellCenterSphR(), getCellCenterZ(), getClosestCell(), and NonProjCalLayer(). |
1.3.4