Commit b67740fd authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Debugging acts geometry

Something that runs...

	modified:   src/SiTrackerEndcap_geo.cpp
	modified:   topside/silicon_tracker.xml

	modified:   topside/silicon_tracker.xml
parent 09cabc71
......@@ -26,7 +26,7 @@
#include "Acts/Surfaces/PlanarBounds.hpp"
#include "Acts/Surfaces/RectangleBounds.hpp"
#include "Acts/Surfaces/TrapezoidBounds.hpp"
#include "Acts/Utilities/Units.hpp"
#include "Acts/Definitions/Units.hpp"
using namespace std;
......
......@@ -35,7 +35,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
xml_comp_t x_mod = mi;
xml_comp_t m_env = x_mod.child(_U(module_envelope));
string m_nam = x_mod.nameStr();
Volume m_vol(m_nam, Box(m_env.width() / 2, m_env.length() / 2, m_env.thickness() / 2), air);
Volume m_vol(m_nam, Box(m_env.thickness() / 2,m_env.width() / 2, m_env.length() / 2 ), air);
int ncomponents = 0, sensor_number = 1;
if (volumes.find(m_nam) != volumes.end()) {
......@@ -49,7 +49,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
xml_comp_t x_pos = x_comp.position(false);
xml_comp_t x_rot = x_comp.rotation(false);
string c_nam = _toString(ncomponents, "component%d");
Box c_box(x_comp.width() / 2, x_comp.length() / 2, x_comp.thickness() / 2);
Box c_box(x_comp.thickness() / 2, x_comp.width() / 2 ,x_comp.length() / 2 );
Volume c_vol(c_nam, c_box, description.material(x_comp.materialStr()));
if (x_pos && x_rot) {
......@@ -99,6 +99,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
Acts::ActsExtension* layerExtension = new Acts::ActsExtension();
layerExtension->addType("sensitive cylinder", "layer");
//layerExtension->addValue(10. * Acts::UnitConstants::mm, "r", "envelope");
lay_elt.addExtension<Acts::ActsExtension>(layerExtension);
Placements& sensVols = sensitives[m_nam];
......@@ -127,7 +128,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
// tr(RotationZYX(0,-((M_PI/2)-phic-phi_tilt),M_PI/2),Position(x,y,module_z));
// NOTE (Nikiforos, 26/08 Rotations needed to be fixed so that component1 (silicon) is on the
// outside
Transform3D tr(RotationZYX(0, ((M_PI / 2) - phic - phi_tilt), -M_PI / 2), Position(x, y, module_z));
Transform3D tr(RotationZYX(phic - phi_tilt,0, 0), Position(x, y, module_z));
pv = lay_vol.placeVolume(m_env, tr);
pv.addPhysVolID("module", module);
......@@ -136,7 +137,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
PlacedVolume sens_pv = sensVols[ic];
DetElement comp_elt(mod_elt, sens_pv.volume().name(), module);
comp_elt.setPlacement(sens_pv);
Acts::ActsExtension* moduleExtension = new Acts::ActsExtension();
Acts::ActsExtension* moduleExtension = new Acts::ActsExtension("YZX");
comp_elt.addExtension<Acts::ActsExtension>(moduleExtension);
}
......@@ -166,7 +167,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
assembly.setVisAttributes(description.invisible());
pv = description.pickMotherVolume(sdet).placeVolume(assembly);
pv.addPhysVolID("system", det_id); // Set the subdetector system ID.
pv.addPhysVolID("barrel", 0); // Flag this as a barrel subdetector.
pv.addPhysVolID("barrel", 1); // Flag this as a barrel subdetector.
sdet.setPlacement(pv);
return sdet;
}
......
......@@ -18,11 +18,10 @@
#include <map>
#include "Acts/Plugins/DD4hep/ActsExtension.hpp"
//#include "Acts/Definitions/Units.hpp"
#include "Acts/Surfaces/PlanarBounds.hpp"
#include "Acts/Surfaces/RectangleBounds.hpp"
#include "Acts/Surfaces/TrapezoidBounds.hpp"
#include "Acts/Utilities/Units.hpp"
//#include "Acts/Surfaces/PlanarBounds.hpp"
//#include "Acts/Surfaces/RectangleBounds.hpp"
//#include "Acts/Surfaces/TrapezoidBounds.hpp"
#include "Acts/Definitions/Units.hpp"
using namespace std;
using namespace dd4hep;
......@@ -107,7 +106,8 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
double layer_rmax = l_env.attr<double>(_Unicode(rmax));
double layer_length = l_env.attr<double>(_Unicode(length));
double layer_zstart = l_env.attr<double>(_Unicode(zstart));
std::cout << "SiTracker Endcap layer " << l_id << " zstart = " << layer_zstart/dd4hep::mm << "mm ( " << layer_length/dd4hep::mm << " mm thick )\n";
//printout(INFO,"ROOTGDMLParse","+++ Read geometry from GDML file file:%s",input.c_str());
//std::cout << "SiTracker Endcap layer " << l_id << " zstart = " << layer_zstart/dd4hep::mm << "mm ( " << layer_length/dd4hep::mm << " mm thick )\n";
//Assembly layer_assembly(layer_name);
//assembly.placeVolume(layer_assembly);
......
......@@ -22,7 +22,7 @@
#include "Acts/Surfaces/PlanarBounds.hpp"
#include "Acts/Surfaces/RectangleBounds.hpp"
#include "Acts/Surfaces/TrapezoidBounds.hpp"
#include "Acts/Utilities/Units.hpp"
#include "Acts/Definitions/Units.hpp"
using namespace std;
......
<display>
<vis name="SiVertexVis" alpha="0.9" r="1" g="0" b="1" showDaughters="true" />
<vis name="SiTrackerBarrelVis" alpha="0.01" r="1.0" g="0.0" b="0.0" showDaughters="true" visible="false"/>
<vis name="SiTrackerVis" alpha="0.5" r="1.0" g="0.0" b="0.0" showDaughters="false" />
<vis name="SiTrackerBarrelVis" alpha="0.5" r="0.0" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="SiTrackerVis" alpha="0.9" r="1.0" g="0.0" b="0.0" showDaughters="true" lineStyle="solid" drawingStyle="solid" />
<vis name="TrackerLayerVis" alpha="0.9" r="0.0" g="1.0" b="0.0" visible="true" showDaughters="true" />
<vis name="SiTrackerBarrelVis1" alpha="0.8" r="0.0" g="0.9" b="0.9" showDaughters="true" />
<vis name="SiTrackerBarrelVis2" alpha="0.8" r="0.1" g="0.9" b="0.0" showDaughters="true" visible="true"/>
<vis name="SiTrackerEndcapVis1" alpha="0.8" r="1.0" g="0.0" b="1.0" showDaughters="true" visible="true"/>
<vis name="SiTrackerEndcapVis2" alpha="0.8" r="1.0" g="0.45" b="0.0" showDaughters="false" visible="true"/>
<vis name="SiTrackerSubAssemblyVis" alpha="1" r="0.0" g="0.99" b="0.0" showDaughters="true" visible="true"/>
<vis name="SiTrackerLayerVis" alpha="1" r="0.0" g="1" b="0.0" showDaughters="true" visible="true" lineStyle="solid" drawingStyle="solid" />
<vis name="EcalVis" alpha="0.1" r="0.0" g="0.75" b="0.1" showDaughters="false"/>
<vis name="EcalEndcapVis" alpha="1.0" r="0.0" g="0.99" b="0.0" showDaughters="false" visible="true" />
<vis name="EcalBarrelVis" alpha="1.0" r="0.0" g="0.99" b="0.0" showDaughters="false" visible="true" />
<vis name="HcalVis" alpha="0.9" r="0.75" g="0.0" b="0.0" showDaughters="false"/>
<vis name="HcalBarrelVis" alpha="1.0" r="0.0" g="0.0" b="0.99" showDaughters="false" visible="true" />
<vis name="HcalEndcapVis" alpha="1.0" r="0.0" g="0.0" b="0.99" showDaughters="false" visible="true" />
<vis name="SolenoidCoilVis" alpha="1.0" r="0.55" g="0.55" b="0.7" showDaughters="true" visible="true" lineStyle="solid" drawingStyle="solid" />
<vis name="SolenoidCryostatVis" alpha="0.4" r="0.55" g="0.55" b="0.7" showDaughters="true" visible="true" lineStyle="solid" drawingStyle="solid" />
<vis name="SolenoidYokeVis" alpha="0.2" r="0.8" g="0.1" b="0.1" showDaughters="false" visible="true" lineStyle="solid" drawingStyle="solid" />
<vis name="RICHVis" alpha="0.5" r="1" g="0" b="1" showDaughters="false"/>
<vis name="InvisibleNoDaughters" showDaughters="false" visible="false"/>
<vis name="InvisibleWithDaughters" showDaughters="true" visible="false"/>
<vis name="GreenVis" alpha="0.2" r= "0.0" g="1.0" b="0.0" showDaughters="true" visible="true"/>
......
......@@ -123,12 +123,6 @@
</define>
<display>
<vis name="SiTrackerBarrelVis1" alpha="0.8" r="0.0" g="0.9" b="0.9" showDaughters="true" />
<vis name="SiTrackerBarrelVis2" alpha="0.8" r="0.1" g="0.9" b="0.0" showDaughters="true" visible="true"/>
<vis name="SiTrackerEndcapVis1" alpha="0.8" r="1.0" g="0.0" b="1.0" showDaughters="false" />
<vis name="SiTrackerEndcapVis2" alpha="0.8" r="1.0" g="0.45" b="0.0" showDaughters="false" visible="true"/>
<vis name="SiTrackerSubAssemblyVis" alpha="1" r="0.0" g="0.99" b="0.0" showDaughters="true" visible="true"/>
<vis name="SiTrackerLayerVis" alpha="0.4" r="0.0" g="0.99" b="0.0" showDaughters="true" visible="true"/>
</display>
......@@ -216,7 +210,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR1" rmax="SiliconTrackerRadius1"
zstart="SiliconTrackerBarrelLength1/2"
zstart="SiliconTrackerBarrelLength1/2+10*mm"
length="3*SiliconTrackerEndMod1RingDz" />
<ring
r="SiliconTrackerMinR1 + SiliconTrackerEndMod1DeltaR/2"
......@@ -254,7 +248,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR1" rmax="SiliconTrackerRadius1"
zstart="SiliconTrackerBarrelLength1/2"
zstart="SiliconTrackerBarrelLength1/2+10*mm"
length="3*SiliconTrackerEndMod1RingDz" />
<ring
r="SiliconTrackerMinR1 + SiliconTrackerEndMod1DeltaR/2"
......@@ -346,7 +340,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR2" rmax="SiliconTrackerRadius2"
zstart="SiliconTrackerBarrelLength2/2"
zstart="SiliconTrackerBarrelLength2/2+10*mm"
length="7*SiliconTrackerEndMod1RingDz" />
<ring
r="SiliconTrackerMinR2 + SiliconTrackerEndMod2DeltaR/2"
......@@ -399,7 +393,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR2" rmax="SiliconTrackerRadius2"
zstart="SiliconTrackerBarrelLength2/2"
zstart="SiliconTrackerBarrelLength2/2+10*mm"
length="7*SiliconTrackerEndMod1RingDz" />
<ring
r="SiliconTrackerMinR2 + SiliconTrackerEndMod2DeltaR/2"
......@@ -508,7 +502,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR3" rmax="SiliconTrackerRadius3"
zstart="SiliconTrackerBarrelLength3/2"
zstart="SiliconTrackerBarrelLength3/2+10*mm"
length="7*SiliconTrackerEndMod2RingDz" />
<ring
r="SiliconTrackerMinR3 + SiliconTrackerEndMod3DeltaR/2"
......@@ -561,7 +555,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR3" rmax="SiliconTrackerRadius3"
zstart="SiliconTrackerBarrelLength3/2"
zstart="SiliconTrackerBarrelLength3/2+10*mm"
length="7*SiliconTrackerEndMod2RingDz" />
<ring
r="SiliconTrackerMinR3 + SiliconTrackerEndMod3DeltaR/2"
......@@ -669,7 +663,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR4" rmax="SiliconTrackerRadius4"
zstart="SiliconTrackerBarrelLength4/2"
zstart="SiliconTrackerBarrelLength4/2+10*mm"
length="9*SiliconTrackerEndMod4RingDz" />
<ring
r="SiliconTrackerMinR4 + SiliconTrackerEndMod4DeltaR/2"
......@@ -730,7 +724,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR4" rmax="SiliconTrackerRadius4"
zstart="SiliconTrackerBarrelLength4/2"
zstart="SiliconTrackerBarrelLength4/2+10*mm"
length="9*SiliconTrackerEndMod4RingDz" />
<ring
r="SiliconTrackerMinR4 + SiliconTrackerEndMod4DeltaR/2"
......@@ -860,7 +854,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR5" rmax="SiliconTrackerRadius5"
zstart="SiliconTrackerBarrelLength5/2"
zstart="SiliconTrackerBarrelLength5/2+10*mm"
length="9*SiliconTrackerEndMod5RingDz" />
<ring
r="SiliconTrackerMinR5 + SiliconTrackerEndMod5DeltaR/2"
......@@ -936,7 +930,7 @@
<envelope
vis="SiTrackerLayerVis"
rmin="SiliconTrackerMinR5" rmax="SiliconTrackerRadius5"
zstart="SiliconTrackerBarrelLength5/2"
zstart="SiliconTrackerBarrelLength5/2+10*mm"
length="9*SiliconTrackerEndMod5RingDz" />
<ring
r="SiliconTrackerMinR5 + SiliconTrackerEndMod5DeltaR/2"
......@@ -973,13 +967,12 @@
</layer>
</detector>
</detectors>
<readouts>
<readout name="SiTrackerBarrelHits">
<segmentation type="CartesianGridXY" grid_size_x="0.10*mm" grid_size_y="0.50*mm" />
<id>system:8,barrel:2,layer:4,module:12,sensor:2,x:32:-16,y:-16</id>
<segmentation type="CartesianGridYZ" grid_size_y="0.10*mm" grid_size_z="0.50*mm" />
<id>system:8,barrel:2,layer:4,module:12,sensor:2,y:32:-16,z:-16</id>
</readout>
<readout name="SiTrackerEndcapHits">
<segmentation type="CartesianGridXY" grid_size_x="0.10*mm" grid_size_y="0.50*mm" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment