Skip to content

Commit

Permalink
fix cellIDs in SHcalSc04_Barrel_v04 (and slices ))
Browse files Browse the repository at this point in the history
  • Loading branch information
gaede committed Apr 19, 2017
1 parent 3df0972 commit eaf670f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions ILD/compact/ILD_l4_v01/ILD_l4_v01.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<include ref="./SHcalSc04_EndcapRing_v01.xml"/>

<include ref="../ILD_common_v01/Yoke05_Barrel.xml"/>
<include ref="../ILD_common_v01/Yoke05_Endcaps.xml"/>g
<include ref="../ILD_common_v01/Yoke05_Endcaps.xml"/>
<include ref="../ILD_common_v01/LumiCal.xml"/>
<include ref="../ILD_common_v01/LHCal01.xml"/>
<include ref="../ILD_common_v01/BeamCal08.xml"/>
Expand Down Expand Up @@ -190,8 +190,8 @@
<segmentation name="Scigrid" type="TiledLayerGridXY" key_value="4" grid_size_x="3" grid_size_y="3.03248"/>
</segmentation>
<hits_collections>
<hits_collection name="HCalBarrelRPCHits" key="slice" key_value="3"/>
<hits_collection name="HcalBarrelRegCollection" key="slice" key_value="6"/>
<hits_collection name="HCalBarrelRPCHits" key="slice" key_value="2"/>
<hits_collection name="HcalBarrelRegCollection" key="slice" key_value="4"/>
</hits_collections>
<id>system:5,module:3,stave:4,tower:5,layer:6,slice:4,x:32:-16,y:-16</id>
</readout>
Expand Down
14 changes: 6 additions & 8 deletions detector/calorimeter/SHcalSc04_Barrel_v04.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,16 +549,14 @@ static Ref_t create_detector(LCDD& lcdd, xml_h element, SensitiveDetector sens)
// slice PlacedVolume
PlacedVolume slice_phv = ChamberLogical.placeVolume(slice_vol,Position(0.,0.,slice_pos_z));

int slice_id = (layer_id > Hcal_nlayers) ? slice_number : - slice_number ;

slice_phv.addPhysVolID("layer",logical_layer_id).addPhysVolID("slice", slice_id );
slice_phv.addPhysVolID("layer",logical_layer_id).addPhysVolID("slice", slice_number );


// if ( x_slice.isSensitive() ) {
// int slice_id = (layer_id > Hcal_nlayers)? 1:-1;
// slice_phv.addPhysVolID("layer",logical_layer_id).addPhysVolID("tower",slice_id);
// printout( DD4hep::DEBUG, "SHcalSc04_Barrel_v04", " logical_layer_id: %d slice_id: %d", logical_layer_id, slice_id ) ;
// }
if ( x_slice.isSensitive() ) {
int tower_id = (layer_id > Hcal_nlayers)? 1:-1;
slice_phv.addPhysVolID("tower",tower_id);
printout( DD4hep::DEBUG, "SHcalSc04_Barrel_v04", " logical_layer_id: %d tower_id: %d", logical_layer_id, tower_id ) ;
}

slice.setPlacement(slice_phv);
// Increment x position for next slice.
Expand Down

0 comments on commit eaf670f

Please sign in to comment.