AIDASoft / DD4hep

Detector Description Toolkit for High Energy Physics
http://dd4hep.cern.ch
GNU Lesser General Public License v3.0
49 stars 95 forks source link

Negative value in readout id not working #32

Closed petricm closed 7 years ago

petricm commented 7 years ago

Negative values in readout id are not recognized properly. Usage of negative value in readout id will most probably result in duplicate volume (e.g. forward vs. backward tracker module).

gaede commented 7 years ago

For example in the ILD models in lcgeo (ILD_o1_v05 etc.) we use:

        <readout name="VXDCollection">
      <!-- fixme: for now DD4hep cannot handle signed values - side should actually be "-2" -->
            <id>system:5,side:2,layer:9,module:8,sensor:8</id>
        </readout>

whereas it should be

        <readout name="VXDCollection">
            <id>system:5,side:-2,layer:9,module:8,sensor:8</id>
        </readout>

interestingly enough, setting in the code

pv..addPhysVolID("side", 1 )   
pv..addPhysVolID("side", -1 ) 

produces the correct bit values that can later in reconstruction be interpreted with a signed value for the side field.

MarkusFrankATcernch commented 7 years ago

Should be working now in the git master.