Skip to content
Snippets Groups Projects
Commit f3d6991b authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'detTypeHandlingStrip' into 'main'

Add functionality for DetectorType to ITk Strips

See merge request atlas/athena!68007
parents b50e2456 f6fef4e3
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,8 @@ private:
protected:
SCT_ReadoutScheme m_scheme; // !< connection between diodes and readout cells
InDetDD::DetectorType m_detectorType;
///////////////////////////////////////////////////////////////////
// Private data:
......@@ -199,7 +201,6 @@ private:
const SCT_ModuleSideDesign * m_motherDesign{nullptr};
//if this design *is* a mother design, these are its children
std::map<int, const SCT_ModuleSideDesign *> m_childDesigns;
};
///////////////////////////////////////////////////////////////////
......
......@@ -41,7 +41,8 @@ public:
const int nStrips,
const double pitch,
const double length,
const double zShift=0.0);
InDetDD::DetectorType detectorType = InDetDD::Undefined,
const double zShift=0.0);
~StripBoxDesign() = default;
......@@ -114,6 +115,8 @@ public:
const Amg::Transform3D moduleShift() const final;
InDetDD::DetectorType type() const override final;
// ---------------------------------------------------------------------------------------
// DEPRECATED at least for Strips
HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const;
......@@ -218,6 +221,10 @@ inline int StripBoxDesign::strip(int stripId1Dim) const {
return stripId1Dim % m_nStrips;
}
inline InDetDD::DetectorType StripBoxDesign::type() const{
return m_detectorType;
}
/// DEPRECATED for StripBoxDesign; no dead area
double StripBoxDesign::deadAreaUpperBoundary() const {
return 0.;
......
......@@ -61,7 +61,8 @@ public:
const std::vector<double> &stripEnd,
const double &stereoAngle,
const double &centreR,
const bool &usePC);
const bool &usePC,
InDetDD::DetectorType detectorType = InDetDD::Undefined);
StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
const SiDetectorDesign::Axis &thicknessDirection,
......@@ -76,7 +77,8 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
const double &stereoAngle,
const double &centreR,//this is the centre radius for e.g. the local/global position
const double &waferCentreR,//this is the centre radius needed for calculating the bounds, It is common to all elements on the same wafer/module/sensor (i.e. with a common MotherDesign)
const bool &usePC);
const bool &usePC,
InDetDD::DetectorType detectorType = InDetDD::Undefined);
~StripStereoAnnulusDesign() = default;
......@@ -174,6 +176,8 @@ StripStereoAnnulusDesign(const SiDetectorDesign::Axis &stripDirection,
//different for elements where each row is its own element
double centreR() const;
InDetDD::DetectorType type() const override final;
// ---------------------------------------------------------------------------------------
// DEPRECATED at least for Strips
HepGeom::Vector3D<double> phiMeasureSegment(const SiLocalPosition &position) const;
......@@ -363,6 +367,10 @@ inline double StripStereoAnnulusDesign::centreR() const {
return m_R;
}
inline InDetDD::DetectorType StripStereoAnnulusDesign::type() const{
return m_detectorType;
}
/// DEPRECATED for StripStereoAnnulusDesign; no dead area
inline double StripStereoAnnulusDesign::deadAreaUpperBoundary() const {
return 0.;
......
......@@ -20,7 +20,8 @@ StripBoxDesign::StripBoxDesign(const SiDetectorDesign::Axis stripDirection,
const int nStrips,
const double pitch,
const double length,
const double zShift) :
InDetDD::DetectorType detectorType,
const double zShift) :
SCT_ModuleSideDesign(thickness, true, true, true, 1, nRows * nStrips, nRows * nStrips, 0, false, carrier,readoutSide, stripDirection, thicknessDirection) {
if (nRows <= 0) {
throw std::runtime_error(
......@@ -32,6 +33,7 @@ StripBoxDesign::StripBoxDesign(const SiDetectorDesign::Axis stripDirection,
m_pitch = pitch;
m_length = length;
m_zShift = zShift;
m_detectorType = detectorType;
double width = m_nStrips * m_pitch;
double fullLength = m_nRows * m_length;
......
......@@ -25,7 +25,8 @@ StripStereoAnnulusDesign::StripStereoAnnulusDesign(const SiDetectorDesign::Axis
const double &stereoAngle,
const double &centreR,
const double &waferCentreR,
const bool &usePC) :
const bool &usePC,
InDetDD::DetectorType detectorType) :
SCT_ModuleSideDesign(thickness, false, false, true, 1, 0, 0, 0, false, carrier,
readoutSide, stripDirection, thicknessDirection),
m_nRows(nRows),
......@@ -43,6 +44,9 @@ StripStereoAnnulusDesign::StripStereoAnnulusDesign(const SiDetectorDesign::Axis
m_cosNegStereo(m_cosStereo),
m_usePC(usePC)
{
m_detectorType = detectorType;
if (nRows < 0) {
throw std::runtime_error(
"ERROR: StripStereoAnnulusDesign called with negative number of rows");
......@@ -114,9 +118,10 @@ StripStereoAnnulusDesign::StripStereoAnnulusDesign(const SiDetectorDesign::Axis
const std::vector<double> &stripEndRadius,
const double &stereoAngle,
const double &centreR,
const bool &usePC):
const bool &usePC,
InDetDD::DetectorType detectorType):
StripStereoAnnulusDesign(stripDirection,thicknessDirection,thickness,readoutSide,carrier,nRows,nStrips,
pitch,stripStartRadius,stripEndRadius,stereoAngle,centreR,centreR,usePC){
pitch,stripStartRadius,stripEndRadius,stereoAngle,centreR,centreR,usePC,detectorType){
//assuming here that centreR==waferCentreR
}
......
......@@ -189,6 +189,16 @@ void StripGmxInterface::makeSiStripBox(const std::string &typeName,
getParameter(typeName, parameters, "pitch", pitch);
getParameter(typeName, parameters, "stripLength", length);
//At the moment, we'd only ever want StripBarrel for this detector type, so throw a WARNING if it differs
//However, in future this may be different, so implementing the functionality to set this anyway
InDetDD::DetectorType detectorType{InDetDD::StripBarrel};
int detectorTypeEnum = 0;
if (checkParameter(typeName, parameters, "detectorType", detectorTypeEnum)) {
if (detectorTypeEnum == 4) detectorType = InDetDD::StripBarrel;
else ATH_MSG_WARNING("Non-strip barrel type set for strip box DetectorElement - is this intended?");
}
//
// Make Sensor Design and add to DetectorManager
//
......@@ -209,7 +219,8 @@ void StripGmxInterface::makeSiStripBox(const std::string &typeName,
nRows,
nStrips,
pitch,
length);
length,
detectorType);
for (int i = 0; i< splitLevel; i++) {
for (int side : {0,1}) { //need different additional shift transform per side...
......@@ -225,6 +236,7 @@ void StripGmxInterface::makeSiStripBox(const std::string &typeName,
nStrips,
pitch,
length,
detectorType,
zShift);
design->setMother(motherDesign.get());
......@@ -247,7 +259,8 @@ void StripGmxInterface::makeSiStripBox(const std::string &typeName,
nRows,
nStrips,
pitch,
length);
length,
detectorType);
// Add to map for addSensor routine
m_geometryMap[typeName] = design.get();
......@@ -355,6 +368,16 @@ void StripGmxInterface::makeStereoAnnulus(const std::string &typeName,
if (checkParameter(typeName, parameters, "usePC", usePC)) ATH_MSG_INFO("Using polar co-ordinates for strip stereo annulus modules");
//At the moment, we'd only ever want StripEndcap for this detector type, so throw a WARNING if it differs
//However, in future this may be different, so implementing the functionality to set this anyway
InDetDD::DetectorType detectorType{InDetDD::StripEndcap};
int detectorTypeEnum = 0;
if (checkParameter(typeName, parameters, "detectorType", detectorTypeEnum)) {
if (detectorTypeEnum == 5) detectorType = InDetDD::StripEndcap;
else ATH_MSG_WARNING("Non-strip endcap type set for strip annulus DetectorElement - is this intended?");
}
//
// Make Sensor Design and add it to the DetectorManager
//
......@@ -378,7 +401,8 @@ void StripGmxInterface::makeStereoAnnulus(const std::string &typeName,
endR,
stereoAngle,
centreR,
usePC);
usePC,
detectorType);
for (int i = 0; i < splitLevel; i++) {
singleRowStrips.clear();
......@@ -408,7 +432,8 @@ void StripGmxInterface::makeStereoAnnulus(const std::string &typeName,
stereoAngle,
thisCentreR,
centreR,
usePC);
usePC,
detectorType);
// Add to map for addSensor routine
std::string splitName = typeName + "_" + std::to_string(i);
......@@ -437,7 +462,8 @@ void StripGmxInterface::makeStereoAnnulus(const std::string &typeName,
endR,
stereoAngle,
centreR,
usePC);
usePC,
detectorType);
m_geometryMap[typeName] = design.get();
m_detectorManager->addDesign(std::move(design));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment