|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/Bootstrap.h"
17 #include "GaudiKernel/ISvcLocator.h"
28 #include "CLHEP/Geometry/Point3D.h"
29 #include "CLHEP/Geometry/Transform3D.h"
32 using HepGeom::Point3D;
38 , m_emecManager(nullptr)
39 , m_innerWheelCalculatorPos(nullptr)
40 , m_innerWheelCalculatorNeg(nullptr)
41 , m_outerWheelCalculatorPos(nullptr)
42 , m_outerWheelCalculatorNeg(nullptr)
44 if (
verbose) { G4cout << GetName() <<
"::initialize()" << G4endl; }
46 throw std::runtime_error(
"Could not retrieve EMEC manager");
51 ISvcLocator* svcLocator = Gaudi::svcLocator();
54 SmartIF<IGeoModelSvc> geoModel{svcLocator->service (
"GeoModelSvc")};
57 "LArWheelSliceSolid",
"AccessGeoModel", FatalException,
58 "createSolid cannot access GeoModelSvc");
61 SmartIF<IGeoDbTagSvc> geoDbTagSvc{svcLocator->service (
"GeoDbTagSvc")};
64 "LArWheelSliceSolid",
"AccessDbTagSvc", FatalException,
65 "createSolid cannot access DbTagSvc");
69 SmartIF<IRDBAccessSvc> pAccessSvc{svcLocator->service(geoDbTagSvc->getParamSvcName())};
72 "LArWheelSliceSolid",
"AccessAccessSvc", FatalException,
73 "createSolid cannot access AccessSvc");
97 Point3D<double> localPosition = globalPosition.z()<0 ? xfNeg*globalPosition : xfPos*globalPosition;
99 int zIndex = globalPosition.z()<0 ? 0:1;
100 double eta = shiftedLocalPosition.getEta();
101 double phi = localPosition.getPhi();
102 double z = localPosition.z();
109 const CellBinning & etaBinning=regionDescriptor->
getEtaBinning();
110 if (
eta>etaBinning.getStart() &&
eta<etaBinning.getEnd()) {
112 unsigned int etaIndex =
int((
eta - etaBinning.getStart())/etaBinning.getDelta()) + etaBinning.getFirstDivisionNumber();
118 const CellBinning & phiBinning=regionDescriptor->
getPhiBinning();
119 double minPhi=
std::min(phiBinning.getStart(), phiBinning.getEnd());
120 double maxPhi=
std::max(phiBinning.getStart(), phiBinning.getEnd());
128 int sWheel =
zIndex==0 ? -wheel: wheel;
134 int nBins= phiBinning.getNumDivisions();
135 int gapsPerBin = nGaps/
nBins;
151 throw std::runtime_error(
"Error, unknown wheel in EndcapFastSimDedicatedSD");
EMECDetectorRegion::DetectorSide getEndcapIndex() const
The endcap index.
LArWheelCalculator * m_outerWheelCalculatorPos
Smart Pointer to EMEC Cells. This reference counted link allocates on demand. It audits the total poi...
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
const CellBinning & getPhiBinning() const
The Binning in Phi.
void ProcessSpot(const EnergySpot &spot) override final
ProcessHitsMethod.
LArWheelCalculator * m_outerWheelCalculatorNeg
This is the interface for the fast simulation dedicated sensitive detector.
LArWheelCalculator * m_innerWheelCalculatorNeg
int GetPhiGap(const CLHEP::Hep3Vector &p) const
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Descriptor for regions of the electromagnetic endcap calorimeter.
unsigned int getRadialIndex() const
Returns the Radial (Outer Wheel=0,InnerWheel=1) Index.
The Athena Transient Store API.
Definition of the abstract IRDBAccessSvc interface.
EMECDetectorManager::DetectorRegionConstIterator beginDetectorRegion() const
Iterate over detector regions.
G4double GetEnergy() const
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
Eigen::Affine3d Transform3D
EMECDetectorManager * m_emecManager
const EMECDetDescr * getDescriptor() const
Returns the Descriptor for this region.
double getRefToActive() const
This provides the distance in CLHEP::mm from the Active EMEC volume to the reference plane.
LArWheelCalculator * m_innerWheelCalculatorPos
const CellBinning & getEtaBinning() const
The Binning in Eta.
G4bool SimpleHit(const LArG4Identifier &lar_id, G4double time, G4double energy)
First method translates to this - also for fast sims.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setPhiMap phiBin
const EMECDetectorRegion * getDetectorRegion(unsigned int endcap, unsigned int sampling, unsigned int region, bool inner) const
Random Access to detector regions.
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
LArG4Identifier m_larID
My LAr identifier.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition of the abstract IRDBRecord interface.
EMECCellConstLink getEMECCell(unsigned int ieta, unsigned int iphi) const
Access to Cells.
EMECData toEMECData(IRDBAccessSvc *rdbAccess, const DecodeVersionKey &larVersionKey)
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
G4ThreeVector GetPosition() const
double getFocalToRef() const
This provides the distance in CLHEP::mm from the Focal Plane to the reference plane.
unsigned int getRegionIndex() const
Returns the Region Index.
Definition of the abstract IRDBRecordset interface.
EndcapFastSimDedicatedSD(StoreGateSvc *, bool verbose)
std::vector< const EMECDetectorRegion * >::const_iterator DetectorRegionConstIterator
EMECDetectorManager::DetectorRegionConstIterator endDetectorRegion() const
Iterate over detector regions.