28 const std::string& name,
29 const IInterface* parent)
30 : base_class(
type, name, parent)
57 StatusCode
sc = AthAlgTool::initialize();
61 return StatusCode::FAILURE;
78 sc = detStore()->retrieve(
m_trtid,
"TRT_ID");
79 if (
sc.isFailure() ) {
86 ATH_MSG_FATAL(
"Length of ToTCorrectionsBarrelXe is not 20." );
90 ATH_MSG_FATAL(
"Length of ToTCorrectionsEndcapXe is not 20." );
94 ATH_MSG_FATAL(
"Length of ToTCorrectionsBarrelAr is not 20." );
98 ATH_MSG_FATAL(
"Length of ToTCorrectionsEndcapAr is not 20." );
104 SmartIF<IGeoModelSvc> geomodel{service(
"GeoModelSvc")};
110 int numB =
m_manager->getNumerology()->getNBarrelPhi();
123 StatusCode
sc = AlgTool::finalize();
134 if(driftradius<0.100) {
136 }
else if(driftradius<1.99) {
137 while(driftradius>=
m_radius[i]) ++i;
155 if (drifttimebin-1 > -1)
159 }
else if (drifttimebin+1 < 20) {
191 bool mcdigit = word & (1u<<31);
194 ATH_MSG_DEBUG (
"Overlay TRTCalDbTool gave radius: "<<radius<<
", t0: "<<
t0);
198 ATH_MSG_DEBUG (
"Overlay TRTCalDbTool2 gives radius: "<<radius<<
", t0: "<<
t0);
201 double drifttime = rawtime-
t0;
210 if(
m_dummy)
return 4./std::sqrt(12.);
213 bool foundslope=
true;
215 double slope =
m_TRTCalDbTool->driftSlope(drifttime,
id,foundslope);
216 bool mcdigit = word & (1u<<31);
222 ATH_MSG_DEBUG (
"Overlay TRTCalDbTool gave slope: "<<slope<<
", found="<<foundslope);
224 ATH_MSG_DEBUG (
"Overlay TRTCalDbTool2 gives slope: "<<slope<<
", found="<<foundslope);
227 if(founderr && foundslope) {
228 return error+mu*slope;
231 else if ((founderr && !foundslope) || (mu<0)) {
240 int drifttimebin = (int)drifttimeinbins;
241 float fracbin = drifttimeinbins-drifttimebin;
252 if (tot_index < 0) tot_index = 0;
253 if (tot_index > 19) tot_index = 19;
255 int bec_index = std::abs(
m_trtid->barrel_ec(
id)) - 1;
266 int bec_index = std::abs(
m_trtid->barrel_ec(
id)) - 1;
312 if(
m_key.compare(6,4,
"Comm")==0) {
#define ATH_CHECK
Evaluate an expression and check for errors.
This is an Identifier helper class for the TRT subdetector.
const ServiceHandle< StoreGateSvc > & detStore() const
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag a...
const std::string & tag() const
Return version tag.