Skip to content
Snippets Groups Projects
Commit 333b3de1 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: compact/ecal.xml

	modified:   src/cb_EMCAL.cpp
parent 525830be
No related branches found
No related tags found
1 merge request!7Resolve "Translate cb_EMCAL"
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
......@@ -32,9 +32,9 @@
A layered EM calorimeter with tungsten and silicon (or scintillator) strips
</comment>
<detector
id="ECalBarrel_ID"
name="EcalBarrel"
type="DD4hep_EcalBarrel"
id="cb_EMCAL_ID"
name="cb_EMCAL"
type="cb_EMCAL"
readout="EcalBarrelHits"
calorimeterType="EM_BARREL">
<dimensions
......
......@@ -8,20 +8,22 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
int detID = detElem.id();
xml::Component dims = detElem.dimensions();
double rInner = dims.inner_radius();
double RIn = dims.inner_radius();
//double rMin = dims.rmin();
double thickness = dims.thickness();
double rOuter = thickness + rInner;
double ROut = thickness + rInner;
double innerZ = dims.inner_z();
double outerZ = dims.outer_z();
double angle = dims.angle();
Material mat = desc.material(detElem.materialStr());
std::vector<double> coneROut = {cfg.ROut, cfg.ROut, cfg.ROut, cfg.ROut};
std::vector<double> coneRIn = {cfg.ROut - 1. * cm, cfg.RIn, cfg.RIn, cfg.ROut - 1. * cm};
std::vector<double> coneROut = {ROut, ROut, ROut, ROut};
std::vector<double> coneRIn = {ROut - 1. * cm, RIn, RIn, ROut - 1. * cm};
std::vector<double> coneZ = {-cfgsolenoid.SizeZ / 2, -cfgsolenoid.SizeZ / 2 + 30 * cm, cfgsolenoid.SizeZ / 2 - 30 * cm, cfgsolenoid.SizeZ / 2};
Polycone cone_solid("cb_EMCAL_GVol_Solid", 0. * deg, 360. * deg, 4, coneZ, rInner, coneROut);
Volume detVol(detName, cone_solid, mat);
//Logic = new G4LogicalVolume(Solid, worldMaterial, "cb_EMCAL_GVol_Logic");
//Phys = new G4PVPlacement(0, G4ThreeVector(), "cb_EMCAL_GVol_Phys", Logic, motherVolume, false, 0);
//
......@@ -30,7 +32,6 @@ static Ref_t createDetector(Detector& desc, xml_h handle, SensitiveDetector sens
//SubtractionSolid unchamferedShape(outerTubeShape, innerTubeShape);
//Cone chamferShape(thickness, 0, rMin, 0, rMin + 2 * tan(angle) * thickness);
//SubtractionSolid detShape(unchamferedShape, chamferShape, Position(0, 0, innerZ + thickness));
//Volume detVol(detName, detShape, mat);
detVol.setVisAttributes(desc.visAttributes(detElem.visStr()));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment