Commit in projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon on MAIN | |||
HpsSiSensor.java | +13 | -14 | 3329 -> 3330 |
Use the SiSensor strip ID maker to generate the channel ID.
--- projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon/HpsSiSensor.java 2014-09-17 21:24:23 UTC (rev 3329) +++ projects/lcsim/trunk/detector-framework/src/main/java/org/lcsim/detector/tracker/silicon/HpsSiSensor.java 2014-09-17 21:36:37 UTC (rev 3330) @@ -241,21 +241,20 @@
return t0Shift; }
- /** - * Create an identifier for a channel. - * - * @param channel The channel number. - * @return The identifier for the channel. - */ - public long makeChannelId(int channel) { - IIdentifierHelper helper = getIdentifierHelper(); - IIdentifier id = getIdentifier(); - IExpandedIdentifier expId = helper.unpack(id); - int idx = helper.getIdentifierDictionary().getFieldIndex("channel"); - expId.setValue(idx, channel); - return helper.pack(expId).getValue();
+ + /** + * Generate an ID for a channel (strip) on a sensor. + * + * @param sensor + * @param channel : Physical channel number + * @return ID + */ + public long makeChannelID(int channel){ + int sideNumber = this.hasElectrodesOnSide(ChargeCarrier.HOLE) + ? ChargeCarrier.HOLE.charge() : ChargeCarrier.ELECTRON.charge(); + return this.makeStripId(channel, sideNumber).getValue();
}
-
+
/** * Set the pedestal value for all samples for a given channel. *
Use REPLY-ALL to reply to list
To unsubscribe from the LCDET-SVN list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCDET-SVN&A=1