7 #include "GaudiKernel/ITHistSvc.h"
10 #include "GaudiKernel/StatusCode.h"
19 ToolHandle<LVL1::IL1CaloOfflineTriggerTowerTools>&offlineTT_tool,
21 const unsigned int lumimax,
22 const std::string& pathInRootFile)
33 m_storeGate(
"StoreGateSvc", histoSvc->
name()),
34 m_caloTool(
"LVL1::L1CaloMonitoringCaloTool/L1CaloMonitoringCaloTool"),
36 m_ppmAdcMaxValue(1023),
52 ToolHandle<LVL1::IL1TriggerTowerTool>&onlineTT_tool,
53 const int ADC_cut,
const unsigned int lumimax,
54 const std::string& pathInRootFile)
64 m_storeGate(
"StoreGateSvc", aMonObj->
name()),
65 m_caloTool(
"LVL1::L1CaloMonitoringCaloTool/L1CaloMonitoringCaloTool"),
67 m_ppmAdcMaxValue(1023),
87 if (
sc.isFailure() ) {
138 double fineTime = -1000.;
141 const std::vector<short unsigned int>& ADCslices = trigTower->
adc();
142 unsigned int ADCPeakIndex = trigTower->
adcPeak();
145 bool isSaturatedTT =
true;
146 bool badCaloQuality =
false;
148 double calFactor = 0;
163 if(fabs(trigTower->
eta()) >= 3.2){
165 }
else if(fabs(trigTower->
eta()) >= 1.5){
168 badCaloQuality =
false;
173 if(isSaturatedTT)
return fineTime;
176 if(badCaloQuality)
return fineTime;
178 unsigned int size = ADCslices.size();
182 if (
size<3 )
return fineTime;
185 if( ADCPeakIndex > (
size - 2) || ADCPeakIndex < 1 )
return fineTime;
187 int peakSlice = ADCslices[ADCPeakIndex];
188 int inferiorSlice = ADCslices[ADCPeakIndex - 1];
189 int superiorSlice = ADCslices[ADCPeakIndex + 1];
195 double denom = (2*(2*peakSlice - superiorSlice - inferiorSlice));
196 double numer = superiorSlice - inferiorSlice;
199 fineTime = numer/
denom;
203 fineTime = fineTime - refValue;
204 if(calFactor <= 0.000001){
208 fineTime = (-1)*fineTime/calFactor;
231 if (
sc.isFailure()) {
237 if (
sc.isFailure()) {