Skip to content

Commit

Permalink
Merge pull request #298 from CoralieNeubueser/hcalGeoUpdate
Browse files Browse the repository at this point in the history
updates in the TileCal geometry to replace the phi segmentation
  • Loading branch information
zaborowska authored Mar 13, 2018
2 parents 89b9867 + 4b23b84 commit 2e6b347
Show file tree
Hide file tree
Showing 17 changed files with 248 additions and 212 deletions.
12 changes: 5 additions & 7 deletions Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<constant name="BarHCal_zOff" value="0"/>
<!-- dimensions in R / rho of actual detector modules (face-plate is placed inside)-->
<!-- tile dimensions -->
<constant name="BarHCal_n_phi_modules" value="128"/>
<constant name="BarHCal_n_phi_modules" value="256"/>
<constant name="BarHCal_n_layers_1" value="2"/>
<constant name="BarHCal_n_layers_2" value="4"/>
<constant name="BarHCal_n_layers_3" value="4"/>
Expand Down Expand Up @@ -50,14 +50,12 @@
</display>

<readouts>
<readout name="BarHCal_Readout">
<!-- Introduce a segmentation in phi to devide HCAL modules, check for advantages of finer granularity -->
<segmentation type="FCCSWGridPhiEta" grid_size_eta="100" phi_bins="256" offset_phi="-pi+(pi/256.)"/>
<id>system:4,module:7,row:9,layer:5,tile:2,eta:1,phi:10</id>
<readout name="HCalBarrelReadout">
<id>system:4,module:8,row:9,layer:5</id>
</readout>
<readout name="BarHCal_Readout_phieta">
<segmentation type="FCCSWGridPhiEta" grid_size_eta="0.01" offset_eta="-1.256" phi_bins="256" offset_phi="-pi+(pi/256.)"/>
<id>system:4,module:7,row:9,layer:5,tile:2,eta:9,phi:10</id>
<segmentation type="FCCSWGridPhiEta" grid_size_eta="0.01" phi_bins="256" offset_eta="-1.256" offset_phi="-pi+(pi/256.)"/>
<id>system:4,module:8,row:9,layer:5,eta:9,phi:10</id>
</readout>
</readouts>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
<define>
<!-- dimensions in R / rho of actual detector modules (face-plate is placed inside)-->
<!-- tile dimensions -->
<constant name="BarHCal_n_phi_modules" value="128"/>
<constant name="BarHCal1_n_layers_1" value="1"/>
<constant name="BarHCal1_n_layers_2" value="0"/>
<constant name="BarHCal1_n_layers_3" value="3"/>
<constant name="BarHCal2_n_layers_1" value="2"/>
<constant name="BarHCal2_n_layers_2" value="2"/>
<constant name="BarHCal2_n_layers_3" value="4"/>
<constant name="BarHCal_module_drho_1" value="100*mm"/>
<constant name="BarHCal_module_drho_2" value="150*mm"/>
<constant name="BarHCal_module_drho_3" value="250*mm"/>
<constant name="BarHCAL_module_spacing_phi" value="1*mm"/>
<constant name="ExtBarHCal_n_phi_modules" value="256"/>
<constant name="ExtBarHCal1_n_layers_1" value="1"/>
<constant name="ExtBarHCal1_n_layers_2" value="0"/>
<constant name="ExtBarHCal1_n_layers_3" value="3"/>
<constant name="ExtBarHCal2_n_layers_1" value="2"/>
<constant name="ExtBarHCal2_n_layers_2" value="2"/>
<constant name="ExtBarHCal2_n_layers_3" value="4"/>
<constant name="ExtBarHCal_module_drho_1" value="100*mm"/>
<constant name="ExtBarHCal_module_drho_2" value="150*mm"/>
<constant name="ExtBarHCal_module_drho_3" value="250*mm"/>
<constant name="ExtBarHCAL_module_spacing_phi" value="1*mm"/>
<!-- component dimensions -->
<constant name="BarHCal_master_plate_thickness" value="5*mm" />
<constant name="BarHCal_spacer_plate_thickness" value="4*mm" />
<constant name="BarHCal_air_space_thickness" value="0.5*mm" />
<constant name="BarHCal_scintillator_thickness" value="3*mm" />
<constant name="ExtBarHCal_master_plate_thickness" value="5*mm" />
<constant name="ExtBarHCal_spacer_plate_thickness" value="4*mm" />
<constant name="ExtBarHCal_air_space_thickness" value="0.5*mm" />
<constant name="ExtBarHCal_scintillator_thickness" value="3*mm" />
<!-- face and end-plate dimensions -->
<constant name="BarHCal_steel_support_thickness" value="212*mm" />
<constant name="BarHCal_end_plate_thickness" value="5*mm" />
<constant name="BarHCal_face_plate_thickness" value="10*mm" />
<constant name="BarHCal_plate_space" value="0.5*mm" />
<constant name="ExtBarHCal_steel_support_thickness" value="212*mm" />
<constant name="ExtBarHCal_end_plate_thickness" value="5*mm" />
<constant name="ExtBarHCal_face_plate_thickness" value="10*mm" />
<constant name="ExtBarHCal_plate_space" value="0.5*mm" />
</define>

<display>
Expand All @@ -51,14 +51,12 @@
</display>

<readouts>
<readout name="ExtBarHCal_Readout">
<!-- Introduce a segmentation in phi to devide HCAL modules, check for advantages of finer granularity -->
<segmentation type="FCCSWGridPhiEta" grid_size_eta="100" phi_bins="256" offset_phi="-pi+pi/256."/>
<id>system:4,type:2,module:9,row:8,layer:4,tile:2,eta:1,phi:10</id>
<readout name="HCalExtBarrelReadout">
<id>system:4,type:2,module:9,row:8,layer:4</id>
</readout>
<readout name="ExtBarHCal_Readout_phieta">
<readout name="ExtBarHCal_Readout_phieta">
<segmentation type="FCCSWGridPhiEta" grid_size_eta="0.01" offset_eta="-1.813" phi_bins="256" offset_phi="-pi+pi/256."/>
<id>system:4,type:2,module:9,row:8,layer:4,tile:2,eta:10,phi:10</id>
<id>system:4,type:2,module:9,row:8,layer:4,eta:10,phi:10</id>
</readout>
</readouts>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
<detector id="ExtBarHCal_id" name="HCalExtBarrel" type="CaloExtBarrel" readout="ExtBarHCal_Readout" vis="extHcal_envelope">
<detector id="ExtBarHCal_id" name="HCalExtBarrel" type="CaloExtBarrel" readout="HCalExtBarrelReadout" vis="extHcal_envelope">
<sensitive type="BirksLawCalorimeterSD"/>
<dimensions rmin1="ExtBarHCal1_rmin" rmin2="ExtBarHCal2_rmin" rmax1="ExtBarHCal1_rmax" rmax2="ExtBarHCal2_rmax" width="ExtBarHCal1_dz" dz="ExtBarHCal2_dz" offset="ExtBarHCal1_zOffset" z_offset="ExtBarHCal2_zOffset"/>
<layer_1 id="0" name="type_1" material="Air" vis="exthcal_barrel_layer_vis">
<dimensions
dr="BarHCal_module_drho_1"
nmodules="BarHCal1_n_layers_1"
nModules="BarHCal2_n_layers_1"
dr="ExtBarHCal_module_drho_1"
nmodules="ExtBarHCal1_n_layers_1"
nModules="ExtBarHCal2_n_layers_1"
/>
</layer_1>
<layer_2 id="1" name="type_2" material="Air" vis="exthcal_barrel_layer_vis">
<dimensions
dr="BarHCal_module_drho_2"
nmodules="BarHCal1_n_layers_2"
nModules="BarHCal2_n_layers_2"
dr="ExtBarHCal_module_drho_2"
nmodules="ExtBarHCal1_n_layers_2"
nModules="ExtBarHCal2_n_layers_2"
/>
</layer_2>
<layer_3 id="2" name="type_3" material="Air" vis="exthcal_barrel_layer_vis">
<dimensions
dr="BarHCal_module_drho_3"
nmodules="BarHCal1_n_layers_3"
nModules="BarHCal2_n_layers_3"
dr="ExtBarHCal_module_drho_3"
nmodules="ExtBarHCal1_n_layers_3"
nModules="ExtBarHCal2_n_layers_3"
/>
</layer_3>
<sequence_a id="3" name="sequence_1" material="Air" vis="exthcal_barrel_seq1_vis">
<dimensions
dz="2*BarHCal_master_plate_thickness + BarHCal_spacer_plate_thickness + BarHCal_scintillator_thickness + 2*BarHCal_air_space_thickness"
phiBins="BarHCal_n_phi_modules"
x="BarHCAL_module_spacing_phi"
dz="2*ExtBarHCal_master_plate_thickness + ExtBarHCal_spacer_plate_thickness + ExtBarHCal_scintillator_thickness + 2*ExtBarHCal_air_space_thickness"
phiBins="ExtBarHCal_n_phi_modules"
x="ExtBarHCAL_module_spacing_phi"
/>
<!-- Master plate -->
<module_component thickness="BarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<module_component thickness="ExtBarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<!-- Spacer plate -->
<module_component thickness="BarHCal_spacer_plate_thickness" y_offset="0" material="Pb" sensitive="false" vis="extHcal_steel_vis" />
<module_component thickness="ExtBarHCal_spacer_plate_thickness" y_offset="0" material="Pb" sensitive="false" vis="extHcal_steel_vis" />
<!-- Master plate -->
<module_component thickness="BarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<module_component thickness="ExtBarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<!-- Air -->
<module_component thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
<module_component thickness="ExtBarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
<!-- Scintillator plate -->
<module_component thickness="BarHCal_scintillator_thickness" y_offset="0" material="Polystyrene" sensitive="true" vis="extHcal_polystyrene_vis" />
<module_component thickness="ExtBarHCal_scintillator_thickness" y_offset="0" material="Polystyrene" sensitive="true" vis="extHcal_polystyrene_vis" />
<!-- Air -->
<module_component thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
<module_component thickness="ExtBarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
</sequence_a>
<sequence_b id="4" name="sequence_2" material="Air" vis="extHcal_barrel_seq2_vis">
<dimensions
dz="2*BarHCal_master_plate_thickness + BarHCal_spacer_plate_thickness + BarHCal_scintillator_thickness + 2*BarHCal_air_space_thickness"
phiBins="BarHCal_n_phi_modules"
x="BarHCAL_module_spacing_phi"
dz="2*ExtBarHCal_master_plate_thickness + ExtBarHCal_spacer_plate_thickness + ExtBarHCal_scintillator_thickness + 2*ExtBarHCal_air_space_thickness"
phiBins="ExtBarHCal_n_phi_modules"
x="ExtBarHCAL_module_spacing_phi"
/>
<!-- Master plate -->
<module_component thickness="BarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<module_component thickness="ExtBarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<!-- Air -->
<module_component thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
<module_component thickness="ExtBarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
<!-- Scintillator plate -->
<module_component thickness="BarHCal_scintillator_thickness" y_offset="0" material="Polystyrene" sensitive="true" vis="extHcal_polystyrene_vis" />
<module_component thickness="ExtBarHCal_scintillator_thickness" y_offset="0" material="Polystyrene" sensitive="true" vis="extHcal_polystyrene_vis" />
<!-- Air -->
<module_component thickness="BarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
<module_component thickness="ExtBarHCal_air_space_thickness" y_offset="0" material="Air" sensitive="false" vis="extHcal_air_vis" />
<!-- Master plate -->
<module_component thickness="BarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<module_component thickness="ExtBarHCal_master_plate_thickness" y_offset="0" material="Steel235" sensitive="false" vis="extHcal_steel_master_vis" />
<!-- Spacer plate -->
<module_component thickness="BarHCal_spacer_plate_thickness" y_offset="0" material="Pb" sensitive="false" vis="extHcal_steel_vis" />
<module_component thickness="ExtBarHCal_spacer_plate_thickness" y_offset="0" material="Pb" sensitive="false" vis="extHcal_steel_vis" />
</sequence_b>
<end_plate name="end_plate" thickness="BarHCal_end_plate_thickness" material="Steel235" sensitive="false" vis="extHcal_end_plate_vis" />
<face_plate name="face_plate" thickness="BarHCal_face_plate_thickness" material="Steel235" sensitive="false" vis="extHcal_face_plate_vis" />
<plate_space name="plate_space" thickness="BarHCal_plate_space" material="Air" sensitive="false" vis="extHcal_air_vis" />
<steel_support name="steel_support" thickness="BarHCal_steel_support_thickness" material="Steel235" sensitive="false" vis="extHcal_steel_support_vis" />
<end_plate name="end_plate" thickness="ExtBarHCal_end_plate_thickness" material="Steel235" sensitive="false" vis="extHcal_end_plate_vis" />
<face_plate name="face_plate" thickness="ExtBarHCal_face_plate_thickness" material="Steel235" sensitive="false" vis="extHcal_face_plate_vis" />
<plate_space name="plate_space" thickness="ExtBarHCal_plate_space" material="Air" sensitive="false" vis="extHcal_air_vis" />
<steel_support name="steel_support" thickness="ExtBarHCal_steel_support_thickness" material="Steel235" sensitive="false" vis="extHcal_steel_support_vis" />
</detector>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<detector id="BarHCal_id" name="HCalBarrel" type="CaloBarrel" readout="BarHCal_Readout" vis="hcal_envelope">
<detector id="BarHCal_id" name="HCalBarrel" type="CaloBarrel" readout="HCalBarrelReadout" vis="hcal_envelope">
<sensitive type="BirksLawCalorimeterSD"/>
<dimensions rmin="BarHCal_rmin" rmax="BarHCal_rmax" dz="BarHCal_dz"/>
<layer_1 id="0" name="type_1" material="Air" vis="hcal_barrel_layer_vis">
Expand Down
19 changes: 9 additions & 10 deletions Detector/DetFCChhHCalTile/src/HCalBarrel_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep
lcdd.material(xComp.materialStr()));
tileVol.setSensitiveDetector(sensDet);
tiles.push_back(layerVolume.placeVolume(tileVol, offset));
tiles.back().addPhysVolID("tile", idxActMod);
idxActMod++;
} else {
tiles.push_back(layerVolume.placeVolume(modCompVol, offset));
Expand All @@ -217,10 +216,10 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep

for (unsigned int idxZRow = 0; idxZRow < numSequencesZ; ++idxZRow) {
double zOffset = -dzDetector + dZEndPlate + space + (2 * idxZRow + 1) * (dzSequence * 0.5);
lLog << MSG::DEBUG << "z offset of wedges = " << zOffset << std::endl;
lLog << MSG::DEBUG << "z offset of wedges = " << zOffset << endmsg;

if ((-dzDetector + zOffset) >= dzDetector) {
lLog << MSG::WARNING << " WARNING!!!! Module position outside of detector envelope" << std::endl;
lLog << MSG::WARNING << " WARNING!!!! Module position outside of detector envelope" << endmsg;
}
dd4hep::Position wedgeOffset(0, zOffset, 0);
// Fill vector for DetElements
Expand All @@ -229,7 +228,8 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep
}

for (unsigned int idxPhi = 0; idxPhi < numSequencesPhi; ++idxPhi) {
double phi = 0.5 * dphi + idxPhi * dphi; // 0.5*dphi for middle of module
double phi = -0.5 * dd4hep::pi - dphi * 0.5 -
idxPhi * dphi; // module placement starts at -pi
double yPosModule = (sensitiveBarrelRmin + dzModule) * cos(phi);
double xPosModule = (sensitiveBarrelRmin + dzModule) * sin(phi);
double yPosSupport = (sensitiveBarrelRmin + 2 * dzModule + dzSupport) * cos(phi);
Expand All @@ -239,20 +239,19 @@ static dd4hep::Ref_t createHCal(dd4hep::Detector& lcdd, xml_h xmlElement, dd4hep
dd4hep::Position supportOffset(xPosSupport, yPosSupport, 0);

dd4hep::Transform3D trans(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), moduleOffset);

dd4hep::Transform3D transS(dd4hep::RotationX(-0.5 * dd4hep::pi) * dd4hep::RotationY(phi), supportOffset);

// Fill the vectors of DetElements
modules.push_back(envelopeVolume.placeVolume(moduleVolume, trans));
modules.back().addPhysVolID("module", idxPhi);
supports.push_back(envelopeVolume.placeVolume(steelSupportVolume, transS));
// }
}

// Placement of DetElements
lLog << MSG::DEBUG << "Modules in phi : " << modules.size() << std::endl;
lLog << MSG::DEBUG << "Rows in z : " << rows.size() << std::endl;
lLog << MSG::DEBUG << "Layers in r : " << layers.size() << std::endl;
lLog << MSG::DEBUG << "Tiles in layers :" << tilesInLayers[1].size() << std::endl;
lLog << MSG::DEBUG << "Modules in phi : " << modules.size() << endmsg;
lLog << MSG::DEBUG << "Rows in z : " << rows.size() << endmsg;
lLog << MSG::DEBUG << "Layers in r : " << layers.size() << endmsg;
lLog << MSG::DEBUG << "Tiles in layers :" << tilesInLayers[1].size() << endmsg;

for (uint iPhi = 0; iPhi < numSequencesPhi; iPhi++) {
DetElement moduleDet(hCal, dd4hep::xml::_toString(iPhi, "module%d"), iPhi);
Expand Down
Loading

0 comments on commit 2e6b347

Please sign in to comment.