Print

Print


Thanks, now what about this one:

I have a channel_id and I want to get the corresponding pedestal from the
conditions database.  I have a cached instance of EcalConditions.  Here's
what I managed to figure out that works:

ecalConditions.getChannelConstants(ecalConditions.getChannelCollection().findChannel(channel_id)).getCalibration().getPedestal();

Maybe there a simpler way?

Also, maybe related to Luca's issue, what happens if the run number changes?
Will a cached EcalChannelCollection and/or EcalConditions need to be updated manually?

-Nathan


On Jan 11, 2015, at 10:06 PM, "McCormick, Jeremy I." <[log in to unmask]> wrote:

> This util method should do that
> 
> EcalChannel channel = EcalConditionsUtil.findChannel(IIdentifierHelper helper, long cellId);
> 
> where 
> 
> helper = subdetector.getDetectorElement().getIdentifierHelper();
> 
> There should be a few examples of it in the code.
> 
> Or you can call
> 
> EcalChannelCollection.findGeometric(hit.getCellID());
> 
> if you have the EcalChannelCollection cached.
> ________________________________________
> From: [log in to unmask] <[log in to unmask]> on behalf of Nathan Baltzell <[log in to unmask]>
> Sent: Sunday, January 11, 2015 3:09 PM
> To: hps-software
> Subject: hit channel_id
> 
> If I have a RawCalorimeterHit object, and I want the corresponding channel’s unique
> channel_id from the database.  I came up with this that seems to work (in that it looks
> like it’s always between 0 and 441, but I didn’t check it any more than that):
> 
> findChannel(hit.getCellID()).getCalibration().getChannelId()
> 
> Does anyone know if it is correct?
> 
> -Nathan
> ########################################################################
> Use REPLY-ALL to reply to list
> 
> To unsubscribe from the HPS-SOFTWARE list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1