Print

Print


Hi Andrea and Everyone,

> 2) Given a calibrated hit, I can access the corresponding energy in MeV. I want to "revert back" to the pedestal-subtracted ADC sum: the two values are related  by
> 
> Energy ( MeV) = gain * PedestalSubtractedADCsum
> 
> The easiest way I found to do this is (cellID is from hit.getCellID() and energy is from hit.GetCorrectedEnergy()):
> 
>          EcalChannelConstants channelData = ecalConditions.getChannelConstants(ecalConditions.getChannelCollection().findGeometric(cellID));
>          double RawSum=energy/ ECalUtils.MeV;
>          double gain=channelData.getGain().getGain();
>          double adc=RawSum/gain;
> 

One technicality worth being aware of (although maybe not applicable to what you're doing):
I think this could be incorrect depending on when the CalorimeterHit was made.  For example,
if the CalorimeterHit is being read from an LCIO file, and the gains being read from the
database are different than were used to create the file.  But I think this is why we have "tags"
in the database (currently "pass0" and "pass").  (We could also put a set of all the conditions
used in the first event in the LCIO files for extra safety.)

> Is there a simpler or better method?

I'd guess the answer to #1 is needed to best answer this.

Regardless, we could make a new utility class where we can accumulate wrapper methods to
more easily do these sort of conversions (cellID, channel_id, gain, pedestal, (x,y), (ix,iy) ….).

-Nathan





On Feb 18, 2015, at 6:25 AM, Andrea Celentano <[log in to unmask]> wrote:

> Dear all,
> I have 2 questions regarding ecal reconstruction:
> 
> 1) What is the difference between the two values reported by getRawEnergy() and getCorrectedEnergy() of the class CalorimeterHit?
> 
> 2) Given a calibrated hit, I can access the corresponding energy in MeV. I want to "revert back" to the pedestal-subtracted ADC sum: the two values are related  by
> 
> Energy ( MeV) = gain * PedestalSubtractedADCsum
> 
> The easiest way I found to do this is (cellID is from hit.getCellID() and energy is from hit.GetCorrectedEnergy()):
> 
>          EcalChannelConstants channelData = ecalConditions.getChannelConstants(ecalConditions.getChannelCollection().findGeometric(cellID));
>          double RawSum=energy/ ECalUtils.MeV;
>          double gain=channelData.getGain().getGain();
>          double adc=RawSum/gain;
> 
> Is there a simpler or better method?
> 
> Thanks
> 
> Andrea
> 
> ########################################################################
> 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