Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions DataProducts/inc/SurfaceId.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace mu2e {
TT_Front=0, TT_Mid, TT_Back, TT_Inner, TT_Outer, // tracker VD equivalents
DS_Front=80, DS_Back, DS_Inner, DS_Outer,
IPA_Legacy, //introduced for backwards compatibility with MDS1
DS_CryoInner, DS_CryoOuter, DS_ShieldInner, DS_ShieldOuter, DS_Coil,
IPA=90, IPA_Front, IPA_Back,
OPA=95, TSDA, // Absorbers in the DS
ST_Front=100,ST_Back, ST_Inner, ST_Outer, ST_Foils, ST_Wires, // stopping target bounding surfaces and components
Expand All @@ -32,11 +33,13 @@ namespace mu2e {
CRV_U =240, // CRV-Upstream
CRV_D1=250, CRV_D2, CRV_D3, CRV_D4, // CRV-Downstream
CRV_C1=260, CRV_C2, // CRV-Cryo-Outer
CRV_M1=270, CRV_M2, CRV_M3, CRV_M4, CRV_M5, CRV_M6, CRV_M7, CRV_M8 //CRV-Muon-Taggers
CRV_M1=270, CRV_M2, CRV_M3, CRV_M4, CRV_M5, CRV_M6, CRV_M7, CRV_M8, // CRV-Muon-Taggers (Mu2e/Offline PR #1864)
CRV_StrongBack=280, // CRV module Al strongback (tracker-side support plate)
DS_HatchConcrete=300 // detector-area hatch concrete block approximation
};

// Update this counter whenever you add/remove surface IDs from the enum above.
static constexpr std::size_t nSurfaceIds = 55;
static constexpr std::size_t nSurfaceIds = 62;

static std::string const& typeName();
static std::map<enum_type,std::string> const& names();
Expand Down
9 changes: 8 additions & 1 deletion DataProducts/src/SurfaceId.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ namespace mu2e {
std::make_pair(SurfaceIdEnum::DS_Inner, "DS_Inner"),
std::make_pair(SurfaceIdEnum::DS_Outer, "DS_Outer"),
std::make_pair(SurfaceIdEnum::IPA_Legacy, "IPA_Legacy"),
std::make_pair(SurfaceIdEnum::DS_CryoInner, "DS_CryoInner"),
std::make_pair(SurfaceIdEnum::DS_CryoOuter, "DS_CryoOuter"),
std::make_pair(SurfaceIdEnum::DS_ShieldInner, "DS_ShieldInner"),
std::make_pair(SurfaceIdEnum::DS_ShieldOuter, "DS_ShieldOuter"),
std::make_pair(SurfaceIdEnum::DS_Coil, "DS_Coil"),
std::make_pair(SurfaceIdEnum::IPA, "IPA"),
std::make_pair(SurfaceIdEnum::IPA_Front, "IPA_Front"),
std::make_pair(SurfaceIdEnum::IPA_Back, "IPA_Back"),
Expand Down Expand Up @@ -71,7 +76,9 @@ namespace mu2e {
std::make_pair(SurfaceIdEnum::CRV_M5, "CRV_M5"),
std::make_pair(SurfaceIdEnum::CRV_M6, "CRV_M6"),
std::make_pair(SurfaceIdEnum::CRV_M7, "CRV_M7"),
std::make_pair(SurfaceIdEnum::CRV_M8, "CRV_M8")
std::make_pair(SurfaceIdEnum::CRV_M8, "CRV_M8"),
std::make_pair(SurfaceIdEnum::CRV_StrongBack, "CRV_StrongBack"),
std::make_pair(SurfaceIdEnum::DS_HatchConcrete, "DS_HatchConcrete")
};

constexpr std::size_t nSurfaceIdNames = sizeof(surfaceIdNames)/sizeof(surfaceIdNames[0]);
Expand Down
18 changes: 16 additions & 2 deletions ExternalShieldingGeom/inc/ExtShieldDownstream.hh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ namespace mu2e {
{ return _notchLocations; }
const std::vector<std::vector<double> >& getNotchDimensions() const
{ return _notchDimensions; }
// 1-based box-type number per block (the "type" from the SimpleConfig description).
const std::vector<int>& getBoxTypes() const
{ return _boxTypes; }
// Declared number of box types (ExtShieldDownstream.numberOfBoxTypes); may exceed the
// number of types that actually have blocks (some types can have zero blocks).
int getNumberOfBoxTypes() const
{ return _numberOfBoxTypes; }

private:

Expand All @@ -91,7 +98,9 @@ namespace mu2e {
const std::vector<std::string>& oHole,
const std::vector<int>& iNotch,
const std::vector<CLHEP::Hep3Vector>& locNotch,
const std::vector<std::vector<double> >& locDims)
const std::vector<std::vector<double> >& locDims,
const std::vector<int>& boxTypes,
int numberOfBoxTypes)
: _extShieldOutlines(outlines),
_extShieldLengths (lengths),
_extShieldBoxTols (tols),
Expand All @@ -107,7 +116,9 @@ namespace mu2e {
_holeOrientations (oHole),
_notchIndices (iNotch),
_notchLocations (locNotch),
_notchDimensions (locDims)
_notchDimensions (locDims),
_boxTypes (boxTypes),
_numberOfBoxTypes (numberOfBoxTypes)
{ }

// Or read back from persistent storage
Expand Down Expand Up @@ -137,6 +148,9 @@ namespace mu2e {
std::vector< int > _notchIndices;
std::vector< CLHEP::Hep3Vector > _notchLocations;
std::vector< std::vector< double > > _notchDimensions;
// 1-based box-type number per block (parallel to _centerPositions etc.)
std::vector< int > _boxTypes;
int _numberOfBoxTypes = 0;
};

std::ostream& operator<<(std::ostream& os, const ExtShieldDownstream& upstr);
Expand Down
12 changes: 11 additions & 1 deletion GeometryService/inc/KinKalGeomMaker.hh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,26 @@
//
#include "Offline/KinKalGeom/inc/KinKalGeom.hh"
#include "Offline/KinKalGeom/inc/KKMaterial.hh"
#include "CLHEP/Vector/ThreeVector.h"
#include <string>
namespace mu2e {
class DetectorSystem;
class KinKalGeomMaker {
public:
KinKalGeomMaker(int debug) : debug_(debug) {}
explicit KinKalGeomMaker(int debug) : debug_(debug) {}
std::unique_ptr<KinKalGeom>& makeKKG();
private:
void makeTracker();
void makeDS();
void makeTarget();
void makeCRV();
void makePassiveMaterials();
// append one averaged rectangular concrete passive-material plane (see .cc)
void addConcretePlane(DetectorSystem const& det, int normalAxis,
CLHEP::Hep3Vector const& centerMu2e, double hw1, double hw2,
double halfThickness, std::string const& material);
// run-1 building hatch concrete when ExtShieldDownstream concrete is zeroed
void addBuildingHatchConcrete(DetectorSystem const& det);
std::unique_ptr<KinKalGeom> kkg_;
int debug_ = 0;
};
Expand Down
7 changes: 6 additions & 1 deletion GeometryService/src/ExtShieldDownstreamMaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ namespace mu2e {
std::vector<std::string> holeOri;
std::vector<CLHEP::Hep3Vector> notchLoc;
std::vector<std::vector<double> > notchDim;
std::vector<int> boxTypes;
outlines .reserve(nBoxesTot);
lengths .reserve(nBoxesTot);
tols .reserve(nBoxesTot);
Expand All @@ -160,6 +161,7 @@ namespace mu2e {
nNotches .reserve(nBoxesTot);
holeID .reserve(nBoxesTot);
notchID .reserve(nBoxesTot);
boxTypes .reserve(nBoxesTot);

// Helper variables for building lists of holes and notches
int holeIdx = 0;
Expand All @@ -172,6 +174,7 @@ namespace mu2e {
lengths.push_back(lengthOfType[it]); // from the type-specified
tols.push_back(tolsOfType[it]); // info filled above
mats.push_back(materialOfType[it]);
boxTypes.push_back(it+1); // 1-based type number for this box


// Location of the center of the box in Mu2e coords
Expand Down Expand Up @@ -301,7 +304,9 @@ namespace mu2e {
holeOri,
notchID,
notchLoc,
notchDim)
notchDim,
boxTypes,
nType)
);

//----------------------------------------------------------------
Expand Down
Loading