ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Muon::NSWCalibTool Class Reference

#include <NSWCalibTool.h>

Inheritance diagram for Muon::NSWCalibTool:
Collaboration diagram for Muon::NSWCalibTool:

Public Types

using TimeCalibType = NswCalibDbTimeChargeData::CalibDataType
 
using TimeCalibConst = NswCalibDbTimeChargeData::CalibConstants
 

Public Member Functions

 NSWCalibTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~NSWCalibTool ()=default
 
StatusCode calibrateClus (const EventContext &ctx, const Muon::MMPrepData *prepData, const Amg::Vector3D &globalPos, std::vector< NSWCalib::CalibratedStrip > &calibClus) const override
 
StatusCode distToTime (const EventContext &ctx, const Muon::MMPrepData *prepData, const Amg::Vector3D &globalPos, const std::vector< double > &driftDistances, std::vector< double > &driftTimes) const override
 
StatusCode calibrateStrip (const Identifier &id, const double time, const double charge, const double lorentzAngle, NSWCalib::CalibratedStrip &calibStrip) const override
 
StatusCode calibrateStrip (const EventContext &ctx, const Muon::MM_RawData *mmRawData, NSWCalib::CalibratedStrip &calibStrip) const override
 
StatusCode calibrateStrip (const EventContext &ctx, const Muon::STGC_RawData *sTGCRawData, NSWCalib::CalibratedStrip &calibStrip) const override
 
bool tdoToTime (const EventContext &ctx, const bool inCounts, const int tdo, const Identifier &chnlId, float &time, const int relBCID) const override
 
bool timeToTdo (const EventContext &ctx, const float time, const Identifier &chnlId, int &tdo, int &relBCID) const override
 
bool chargeToPdo (const EventContext &ctx, const float charge, const Identifier &chnlId, int &pdo) const override
 
bool pdoToCharge (const EventContext &ctx, const bool inCounts, const int pdo, const Identifier &chnlId, float &charge) const override
 
virtual StatusCode initialize () override
 
NSWCalib::MicroMegaGas mmGasProperties () const override
 
float mmPeakTime () const override
 
float stgcPeakTime () const override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

using angleFunction = NSWCalib::MicroMegaGas::angleFunction
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

const NswCalibDbTimeChargeDatagetCalibData (const EventContext &ctx) const
 
bool loadMagneticField (const EventContext &ctx, MagField::AtlasFieldCache &fieldCache) const
 
bool timeToTdoMM (const NswCalibDbTimeChargeData *tdoPdoData, const float time, const Identifier &chnlId, int &tdo, int &relBCID) const
 
bool timeToTdoSTGC (const NswCalibDbTimeChargeData *tdoPdoData, const float time, const Identifier &chnlId, int &tdo, int &relBCID) const
 
float applyT0Calibration (const EventContext &ctx, const Identifier &id, float time) const
 
StatusCode initializeGasProperties ()
 
bool localStripPosition (const Identifier &id, Amg::Vector2D &locPos) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj"}
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"}
 
SG::ReadCondHandleKey< NswCalibDbTimeChargeDatam_condTdoPdoKey {this, "condTdoPdoKey", "NswCalibDbTimeChargeData", "Key of NswCalibDbTimeChargeData object containing calibration data (TDO and PDO)"}
 
SG::ReadCondHandleKey< NswT0Datam_condT0Key {this, "condT0Key", "NswT0Data", "Key of NswT0Data containing the t0 calibration data"}
 
Gaudi::Property< bool > m_isData {this, "isData", false, "Processing data"}
 
Gaudi::Property< double > m_vDrift {this, "DriftVelocity",0.047, "Drift velocity"}
 
Gaudi::Property< double > m_timeRes {this, "TimeResolution", 25., "Time resolution"}
 
Gaudi::Property< double > m_longDiff {this, "longDiff", 0.019}
 
Gaudi::Property< double > m_transDiff {this, "transDiff", 0.036}
 
Gaudi::Property< double > m_ionUncertainty {this,"ionUncertainty", 4.0}
 
Gaudi::Property< float > m_mmPeakTime {this, "mmPeakTime", 200.}
 
Gaudi::Property< float > m_stgcPeakTime {this, "sTgcPeakTime", 0.}
 
Gaudi::Property< std::string > m_gasMixture {this, "GasMixture", "ArCo2_937"}
 
Gaudi::Property< float > m_mmLatencyMC {this,"mmLatencyMC",25}
 
Gaudi::Property< float > m_mmLatencyData {this,"mmLatencyData",0}
 
Gaudi::Property< float > m_stgcLatencyMC {this,"stgcLatencyMC",-50}
 
Gaudi::Property< float > m_stgcLatencyData {this,"stgcLatencyData",-50}
 
Gaudi::Property< bool > m_applyMmT0Calib {this, "applyMmT0Calib", false, "apply the MM t0 calibration"}
 
Gaudi::Property< bool > m_applysTgcT0Calib {this, "applysTgcT0Calib", false, "apply the sTGC t0 calibration"}
 
Gaudi::Property< bool > m_applyMmBFieldCalib {this, "applyMmBFieldCalib", true, "apply the MM BField correction in reconstruction"}
 
Gaudi::Property< float > m_mmT0TargetValue {this, "mmT0TargetValue", 50.0, "target mean value for the MM t0 calibration"}
 
Gaudi::Property< float > m_stgcT0TargetValue {this,"stgcT0TargetValue", 0.0 ,"target mean value for the sTGC t0 calibration"}
 
double m_interactionDensitySigma {0.0F}
 
double m_interactionDensityMean {0.0F}
 
angleFunction m_lorentzAngleFunction {NSWCalib::MicroMegaGas::dummy_func()}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 23 of file NSWCalibTool.h.

Member Typedef Documentation

◆ angleFunction

Definition at line 103 of file NSWCalibTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TimeCalibConst

Definition at line 32 of file NSWCalibTool.h.

◆ TimeCalibType

Definition at line 31 of file NSWCalibTool.h.

Constructor & Destructor Documentation

◆ NSWCalibTool()

Muon::NSWCalibTool::NSWCalibTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 46 of file NSWCalibTool.cxx.

46  :
47  AthAlgTool(t,n,p) {
48  declareInterface<INSWCalibTool>(this);
49 }

◆ ~NSWCalibTool()

virtual Muon::NSWCalibTool::~NSWCalibTool ( )
virtualdefault

Member Function Documentation

◆ applyT0Calibration()

float Muon::NSWCalibTool::applyT0Calibration ( const EventContext &  ctx,
const Identifier id,
float  time 
) const
private

Definition at line 385 of file NSWCalibTool.cxx.

385  {
387  if(!readT0.isValid()){
388  ATH_MSG_ERROR("Cannot find conditions data container for T0s!");
389  }
390  float t0 {0};
391  bool isGood = readT0->getT0(id, t0);
392  if(!isGood || t0==0){
393  ATH_MSG_DEBUG("failed to retrieve good t0 from database, skipping t0 calibration");
394  return time;
395  } else {
396  float targetT0 = (m_idHelperSvc->isMM(id) ? m_mmT0TargetValue : m_stgcT0TargetValue);
397  float newTime = time + (targetT0 - t0);
398  ATH_MSG_DEBUG("doing T0 calibration for RDO " << m_idHelperSvc->toString(id) << " time " << time <<" t0 from database " << t0 << " t0 target " << targetT0 << " new time " << newTime);
399  return newTime;
400  }
401 }

◆ calibrateClus()

StatusCode Muon::NSWCalibTool::calibrateClus ( const EventContext &  ctx,
const Muon::MMPrepData prepData,
const Amg::Vector3D globalPos,
std::vector< NSWCalib::CalibratedStrip > &  calibClus 
) const
overridevirtual

magnetic field

get the component parallel to to the eta strips (same used in digitization)

swap sign depending on the readout side

loop over prepData strips

Implements Muon::INSWCalibTool.

Definition at line 91 of file NSWCalibTool.cxx.

91  {
92 
93  double lorentzAngle {0.};
96  MagField::AtlasFieldCache fieldCache;
97  if (!loadMagneticField(ctx, fieldCache)) return StatusCode::FAILURE;
98  Amg::Vector3D magneticField{Amg::Vector3D::Zero()};
99  fieldCache.getField(globalPos.data(), magneticField.data());
100 
102  double phi = globalPos.phi();
103  double bfield = (magneticField.x()*std::sin(phi)-magneticField.y()*std::cos(phi))*1000.;
104 
106  int gasGap = m_idHelperSvc->mmIdHelper().gasGap(prepData->identify());
107  bool changeSign = ( globalPos.z() < 0. ? (gasGap==1 || gasGap==3) : (gasGap==2 || gasGap==4) );
108  if (changeSign) bfield = -bfield;
109 
111  lorentzAngle = (bfield>0. ? 1. : -1.)*m_lorentzAngleFunction(std::abs(bfield)) * toRad;
112  }
113 
115  for (unsigned int i = 0; i < prepData->stripNumbers().size(); ++i){
116  Identifier id = prepData->rdoList().at(i);
117  double time = prepData->stripTimes().at(i);
118  double charge = prepData->stripCharges().at(i);
119  NSWCalib::CalibratedStrip calibStrip;
120  ATH_CHECK(calibrateStrip(id,time, charge, lorentzAngle, calibStrip));
121  calibClus.push_back(std::move(calibStrip));
122  }
123  return StatusCode::SUCCESS;
124 }

◆ calibrateStrip() [1/3]

StatusCode Muon::NSWCalibTool::calibrateStrip ( const EventContext &  ctx,
const Muon::MM_RawData mmRawData,
NSWCalib::CalibratedStrip calibStrip 
) const
overridevirtual

Implements Muon::INSWCalibTool.

Definition at line 152 of file NSWCalibTool.cxx.

152  {
153 
154  const Identifier rdoId = mmRawData->identify();
155  //get local postion
156  Amg::Vector2D locPos{0,0};
157  if(!localStripPosition(rdoId,locPos)) {
158  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Failed to retrieve local strip position "<<m_idHelperSvc->toString(rdoId));
159  return StatusCode::FAILURE;
160  }
161 
162  // MuonDetectorManager from the conditions store
164  const MuonGM::MuonDetectorManager* muDetMgr = muDetMgrHandle.cptr();
165 
166  //get globalPos
167  Amg::Vector3D globalPos{Amg::Vector3D::Zero()};
168  const MuonGM::MMReadoutElement* detEl = muDetMgr->getMMReadoutElement(rdoId);
169  detEl->stripGlobalPosition(rdoId,globalPos);
170 
171  // RDO has values in counts for both simulation and data
172  float time{-FLT_MAX}, charge{-FLT_MAX};
173  tdoToTime (ctx, mmRawData->timeAndChargeInCounts(), mmRawData->time (), rdoId, time , mmRawData->relBcid());
174  pdoToCharge(ctx, mmRawData->timeAndChargeInCounts(), mmRawData->charge(), rdoId, charge );
175 
176  calibStrip.charge = charge;
177  // historically the peak time is included in the time determined by the MM digitization and therefore added back in the tdoToTime function
178  // in order to not break the RDO to digit conversion needed for the trigger and the overlay
179  calibStrip.time = time - globalPos.norm() * reciprocalSpeedOfLight - mmPeakTime();
180  // applying T0 calibration, cannot be done inside the the tdo to time function since the tof correction was included when deriving the calibration constants
181  if(m_applyMmT0Calib){
182  calibStrip.time = applyT0Calibration(ctx, rdoId, calibStrip.time);
183  }
184 
185  calibStrip.identifier = rdoId;
186 
187  ATH_MSG_DEBUG("Calibrating RDO " << m_idHelperSvc->toString(rdoId) << "with pdo: " << mmRawData->charge() << " tdo: "<< mmRawData->time() << " relBCID "<< mmRawData->relBcid() << " charge and time in counts " <<
188  mmRawData->timeAndChargeInCounts() << " isData "<< m_isData << " to charge: " << calibStrip.charge << " electrons time after corrections " << calibStrip.time << " ns time before corrections "<< time << "ns");
189 
190 
191  //get stripWidth
192  detEl->getDesign(rdoId)->channelWidth(); // positon is not used for strip width
193 
194  calibStrip.distDrift = m_vDrift * calibStrip.time;
195  calibStrip.resTransDistDrift = pitchErr + std::pow(m_transDiff * calibStrip.distDrift, 2);
197  + std::pow(m_longDiff * calibStrip.distDrift, 2);
198 
199  calibStrip.locPos = locPos;
200 
201  return StatusCode::SUCCESS;
202 }

◆ calibrateStrip() [2/3]

StatusCode Muon::NSWCalibTool::calibrateStrip ( const EventContext &  ctx,
const Muon::STGC_RawData sTGCRawData,
NSWCalib::CalibratedStrip calibStrip 
) const
overridevirtual

Implements Muon::INSWCalibTool.

Definition at line 204 of file NSWCalibTool.cxx.

204  {
205 
206  Identifier rdoId = sTGCRawData->identify();
208  const MuonGM::MuonDetectorManager* muDetMgr = muDetMgrHandle.cptr();
209 
210  //get globalPos
211  Amg::Vector3D globalPos{Amg::Vector3D::Zero()};
212  const MuonGM::sTgcReadoutElement* detEl = muDetMgr->getsTgcReadoutElement(rdoId);
213  detEl->stripGlobalPosition(rdoId,globalPos);
214 
215  //get local postion
217  if(!localStripPosition(rdoId,locPos)) {
218  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Failed to retrieve local strip position "<<m_idHelperSvc->toString(rdoId));
219  return StatusCode::FAILURE;
220  }
221 
222  // RDO has values in counts for both simulation and data
223  float time{-FLT_MAX}, charge{-FLT_MAX};
224  tdoToTime (ctx, sTGCRawData->timeAndChargeInCounts(), sTGCRawData->time (), rdoId, time , sTGCRawData->bcTag());
225  pdoToCharge(ctx, sTGCRawData->timeAndChargeInCounts(), sTGCRawData->charge(), rdoId, charge );
226  if(sTGCRawData->timeAndChargeInCounts()){
227  calibStrip.charge = charge * sTGC_pCPerfC;
228  } else {
229  calibStrip.charge = charge;
230  }
231  calibStrip.time = time - stgcPeakTime();
232 
233  if(m_applysTgcT0Calib){
234  calibStrip.time = applyT0Calibration(ctx, rdoId, calibStrip.time);
235  }
236 
237  calibStrip.identifier = rdoId;
238  calibStrip.locPos = locPos;
239  return StatusCode::SUCCESS;
240 
241 }

◆ calibrateStrip() [3/3]

StatusCode Muon::NSWCalibTool::calibrateStrip ( const Identifier id,
const double  time,
const double  charge,
const double  lorentzAngle,
NSWCalib::CalibratedStrip calibStrip 
) const
overridevirtual

transversal and longitudinal components of the resolution

Implements Muon::INSWCalibTool.

Definition at line 126 of file NSWCalibTool.cxx.

126  {
127 
128  //get local positon
130  if(!localStripPosition(id,locPos)) {
131  ATH_MSG_WARNING(__FILE__<<":"<<__LINE__<<" Failed to retrieve local strip position "<<m_idHelperSvc->toString(id));
132  return StatusCode::FAILURE;
133  }
134 
135  calibStrip.identifier = id;
136  calibStrip.charge = charge;
137  calibStrip.time = time;
138 
139  double vDriftCorrected = m_vDrift * std::cos(lorentzAngle);
140  calibStrip.distDrift = vDriftCorrected * calibStrip.time;
141 
143  calibStrip.resTransDistDrift = pitchErr + std::pow(m_transDiff * calibStrip.distDrift, 2);
144  calibStrip.resLongDistDrift = std::pow(m_ionUncertainty * vDriftCorrected, 2)
145  + std::pow(m_longDiff * calibStrip.distDrift, 2);
146  calibStrip.dx = std::sin(lorentzAngle) * calibStrip.time * m_vDrift;
147  calibStrip.locPos = Amg::Vector2D(locPos.x() + calibStrip.dx, locPos.y());
148  return StatusCode::SUCCESS;
149 }

◆ chargeToPdo()

bool Muon::NSWCalibTool::chargeToPdo ( const EventContext &  ctx,
const float  charge,
const Identifier chnlId,
int &  pdo 
) const
overridevirtual

Implements Muon::INSWCalibTool.

Definition at line 277 of file NSWCalibTool.cxx.

277  {
278  const NswCalibDbTimeChargeData* tdoPdoData = getCalibData(ctx);
279  if (!tdoPdoData) {
280  pdo = 0;
281  return false;
282  }
283  const TimeCalibConst* calib_ptr = tdoPdoData->getCalibForChannel(TimeCalibType::PDO, chnlId);
284  if (!calib_ptr) {
285  pdo = 0;
286  return false;
287  }
288  const TimeCalibConst& calib{*calib_ptr};
289  float c = charge;
290  if (m_idHelperSvc->isMM (chnlId)) c /= MM_electronsPerfC;
291  else if(m_idHelperSvc->issTgc(chnlId)) c *= sTGC_pCPerfC;
292  else {
293  pdo = 0;
294  return false;
295  }
296  pdo = c * calib.slope + calib.intercept;
297  return true;
298 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ distToTime()

StatusCode Muon::NSWCalibTool::distToTime ( const EventContext &  ctx,
const Muon::MMPrepData prepData,
const Amg::Vector3D globalPos,
const std::vector< double > &  driftDistances,
std::vector< double > &  driftTimes 
) const
overridevirtual

retrieve the magnetic field

get the component parallel to to the eta strips (same used in digitization)

swap sign depending on the readout side

loop over drift distances

Implements Muon::INSWCalibTool.

Definition at line 251 of file NSWCalibTool.cxx.

251  {
253  MagField::AtlasFieldCache fieldCache;
254  if (!loadMagneticField(ctx, fieldCache)) return StatusCode::FAILURE;
255  Amg::Vector3D magneticField{Amg::Vector3D::Zero()};
256  fieldCache.getField(globalPos.data(), magneticField.data());
257 
259  const double phi = globalPos.phi();
260  double bfield = (magneticField.x()*std::sin(phi)-magneticField.y()*std::cos(phi))*1000.;
261 
263  int gasGap = m_idHelperSvc->mmIdHelper().gasGap(prepData->identify());
264  bool changeSign = ( globalPos.z() < 0. ? (gasGap==1 || gasGap==3) : (gasGap==2 || gasGap==4) );
265  if (changeSign) bfield = -bfield;
266  double cos2_lorentzAngle = std::pow(std::cos ( (bfield>0. ? 1. : -1.)*m_lorentzAngleFunction(std::abs(bfield)) * toRad), 2);
268  for (const double dist : driftDistances){
269  double time = dist / (m_vDrift*cos2_lorentzAngle);
270  driftTimes.push_back(time);
271  }
272  return StatusCode::SUCCESS;
273 
274 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getCalibData()

const NswCalibDbTimeChargeData * Muon::NSWCalibTool::getCalibData ( const EventContext &  ctx) const
private

Definition at line 81 of file NSWCalibTool.cxx.

81  {
82  // set up pointer to conditions object
84  if(!readTdoPdo.isValid()){
85  ATH_MSG_ERROR("Cannot find conditions data container for TDOs and PDOs!");
86  return nullptr;
87  }
88  return readTdoPdo.cptr();
89 }

◆ initialize()

StatusCode Muon::NSWCalibTool::initialize ( )
overridevirtual

Definition at line 52 of file NSWCalibTool.cxx.

◆ initializeGasProperties()

StatusCode Muon::NSWCalibTool::initializeGasProperties ( )
private

Definition at line 66 of file NSWCalibTool.cxx.

66  {
67  if (!map_vDrift.count(m_gasMixture)) {
68  ATH_MSG_FATAL("Configured Micromegas with unkown gas mixture: " << m_gasMixture);
69  return StatusCode::FAILURE;
70  }
71 
72  m_vDrift = map_vDrift.find(m_gasMixture)->second;
73  m_transDiff = map_transDiff.find(m_gasMixture)->second;
74  m_longDiff = map_longDiff.find(m_gasMixture)->second;
75  m_interactionDensitySigma = map_interactionDensitySigma.find(m_gasMixture)->second;
76  m_interactionDensityMean = map_interactionDensityMean.find(m_gasMixture)->second;
77  m_lorentzAngleFunction = map_lorentzAngleFunctionPars.find(m_gasMixture)->second;
78  return StatusCode::SUCCESS;
79 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& Muon::INSWCalibTool::interfaceID ( )
inlinestaticinherited

Definition at line 63 of file INSWCalibTool.h.

63  {
64  static const InterfaceID IID_INSWCalibTool("Muon::INSWCalibTool",1,0);
65  return IID_INSWCalibTool;
66  }

◆ loadMagneticField()

bool Muon::NSWCalibTool::loadMagneticField ( const EventContext &  ctx,
MagField::AtlasFieldCache fieldCache 
) const
private

Definition at line 242 of file NSWCalibTool.cxx.

242  {
244  if (!readHandle.isValid()) {
245  ATH_MSG_ERROR("doDigitization: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
246  return false;
247  }
248  readHandle.cptr()->getInitializedCache(fieldCache);
249  return true;
250 }

◆ localStripPosition()

bool Muon::NSWCalibTool::localStripPosition ( const Identifier id,
Amg::Vector2D locPos 
) const
private

Definition at line 445 of file NSWCalibTool.cxx.

445  {
446  // MuonDetectorManager from the conditions store
448  const MuonGM::MuonDetectorManager* muDetMgr = muDetMgrHandle.cptr();
449  if(m_idHelperSvc->isMM(id)){
450  const MuonGM::MMReadoutElement* detEl = muDetMgr->getMMReadoutElement(id);
451  return detEl->stripPosition(id,locPos);
452 
453  } else if(m_idHelperSvc->issTgc(id)){
454  const MuonGM::sTgcReadoutElement* detEl = muDetMgr->getsTgcReadoutElement(id);
455  return detEl->stripPosition(id,locPos);
456 
457  } else {
458  return false;
459  }
460 }

◆ mmGasProperties()

NSWCalib::MicroMegaGas Muon::NSWCalibTool::mmGasProperties ( ) const
overridevirtual

Implements Muon::INSWCalibTool.

Definition at line 433 of file NSWCalibTool.cxx.

433  {
435  properties.driftVelocity = m_vDrift;
436  properties.longitudinalDiffusionSigma = m_longDiff;
437  properties.transverseDiffusionSigma = m_transDiff;
438  properties.interactionDensityMean = m_interactionDensityMean;
439  properties.interactionDensitySigma = m_interactionDensitySigma;
440  properties.lorentzAngleFunction = m_lorentzAngleFunction;
441  return properties;
442 }

◆ mmPeakTime()

float Muon::NSWCalibTool::mmPeakTime ( ) const
inlineoverridevirtual

Implements Muon::INSWCalibTool.

Definition at line 50 of file NSWCalibTool.h.

50 {return m_mmPeakTime; }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ pdoToCharge()

bool Muon::NSWCalibTool::pdoToCharge ( const EventContext &  ctx,
const bool  inCounts,
const int  pdo,
const Identifier chnlId,
float &  charge 
) const
overridevirtual

Implements Muon::INSWCalibTool.

Definition at line 301 of file NSWCalibTool.cxx.

301  {
302  if(!inCounts){
303  charge = pdo;
304  return true;
305  }
306  const NswCalibDbTimeChargeData* tdoPdoData = getCalibData(ctx);
307  if (!tdoPdoData) {
308  charge =0.;
309  return false;
310  }
311  const TimeCalibConst* calib_ptr = tdoPdoData->getCalibForChannel(TimeCalibType::PDO, chnlId);
312  if (!calib_ptr) {
313  charge = 0.;
314  return false;
315  }
316  const TimeCalibConst& calib{*calib_ptr};
317  charge = (pdo-calib.intercept)/calib.slope;
318  if (m_idHelperSvc->isMM (chnlId)) charge *= MM_electronsPerfC;
319  else if(m_idHelperSvc->issTgc(chnlId)) charge /= sTGC_pCPerfC;
320  else return false;
321  return true;
322 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ stgcPeakTime()

float Muon::NSWCalibTool::stgcPeakTime ( ) const
inlineoverridevirtual

Implements Muon::INSWCalibTool.

Definition at line 51 of file NSWCalibTool.h.

51 {return m_stgcPeakTime;}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tdoToTime()

bool Muon::NSWCalibTool::tdoToTime ( const EventContext &  ctx,
const bool  inCounts,
const int  tdo,
const Identifier chnlId,
float &  time,
const int  relBCID 
) const
overridevirtual

Implements Muon::INSWCalibTool.

Definition at line 405 of file NSWCalibTool.cxx.

405  {
406  if(!inCounts){
407  time = tdo;
408  return true;
409  }
410  const NswCalibDbTimeChargeData* tdoPdoData = getCalibData(ctx);
411  if (!tdoPdoData) {
412  time = 0.;
413  return false;
414  }
415  const TimeCalibConst* calib_ptr = tdoPdoData->getCalibForChannel(TimeCalibType::TDO, chnlId);
416  if (!calib_ptr){
417  time = 0.;
418  return false;
419  }
420  const TimeCalibConst& calib {*calib_ptr};
421  //this shift of 25ns is necessary to align the time of the signal with the way the VMM determines the time
422  //(relBCID 0 corresponds to -37.5 ns to - 12.5 ns)
423  //Eventually it should go into the conditions db since it is probably not the same for MC and Data
424  //but for now it is kept like it is. pscholer 8th of June 2022
425  float mmLatency = (m_isData? m_mmLatencyData : m_mmLatencyMC );
426  float stgcLatency = (m_isData? m_stgcLatencyData : m_stgcLatencyMC);
427 
428  const float peakTime = m_idHelperSvc->isMM(chnlId) ? mmPeakTime() + mmLatency : stgcPeakTime() + stgcLatency;
429  time = relBCID*25. - (tdo-calib.intercept)/calib.slope + peakTime;
430  return true;
431 }

◆ timeToTdo()

bool Muon::NSWCalibTool::timeToTdo ( const EventContext &  ctx,
const float  time,
const Identifier chnlId,
int &  tdo,
int &  relBCID 
) const
overridevirtual

Implements Muon::INSWCalibTool.

Definition at line 325 of file NSWCalibTool.cxx.

325  {
326  const NswCalibDbTimeChargeData* tdoPdoData = getCalibData(ctx);
327  if (!tdoPdoData) return false;
328  if (m_idHelperSvc->isMM (chnlId)) return timeToTdoMM (tdoPdoData, time, chnlId, tdo, relBCID);
329  else if(m_idHelperSvc->issTgc(chnlId)) return timeToTdoSTGC(tdoPdoData, time, chnlId, tdo, relBCID);
330  return false;
331 }

◆ timeToTdoMM()

bool Muon::NSWCalibTool::timeToTdoMM ( const NswCalibDbTimeChargeData tdoPdoData,
const float  time,
const Identifier chnlId,
int &  tdo,
int &  relBCID 
) const
private

Definition at line 334 of file NSWCalibTool.cxx.

334  {
335  const float t = time - m_mmPeakTime - m_mmLatencyMC; // subtract peaking time first! This is not supossed to run on data ever only needed for the RDO->Digit step
336  const TimeCalibConst* calib_ptr = tdoPdoData->getCalibForChannel(TimeCalibType::TDO, chnlId);
337  if (!calib_ptr) {
338  tdo = relBCID = 0;
339  return false;
340  }
341  const TimeCalibConst& calib{*calib_ptr};
342  float tdoTime = -999.9;
343  constexpr float lowerBound = Muon::MM_RawData::s_lowerTimeBound;
344  for(int i_relBCID=0; i_relBCID<Muon::MM_RawData::s_BCWindow; i_relBCID++){
345  if(t >= lowerBound+i_relBCID*25 && t < (lowerBound+25)+i_relBCID*25){
346  tdoTime = i_relBCID*25 - t;
347  relBCID = i_relBCID;
348  break;
349  }
350  }
351  if(tdoTime < lowerBound) {
352  tdo = relBCID = 0;
353  return false;
354  }
355  tdo = tdoTime*calib.slope + calib.intercept;
356  return true;
357 }

◆ timeToTdoSTGC()

bool Muon::NSWCalibTool::timeToTdoSTGC ( const NswCalibDbTimeChargeData tdoPdoData,
const float  time,
const Identifier chnlId,
int &  tdo,
int &  relBCID 
) const
private

Definition at line 360 of file NSWCalibTool.cxx.

360  {
361  const float t = time - m_stgcPeakTime - m_stgcLatencyMC; // subtract peaking time and latency first! This is not supossed to run on data ever only needed for the RDO->Digit step
362  const TimeCalibConst* calib_ptr = tdoPdoData->getCalibForChannel(TimeCalibType::TDO, chnlId);
363  if (!calib_ptr){
364  tdo = relBCID = 0;
365  return false;
366  }
367  const TimeCalibConst& calib = {*calib_ptr};
368  float tdoTime = -999.9;
369  const float lowerBound = Muon::STGC_RawData::s_lowerTimeBound - m_stgcLatencyMC; // this is not supossed to run on data ever, only needed for the RDO->Digit step
370  for(int i_relBCID=0; i_relBCID<Muon::STGC_RawData::s_BCWindow; ++i_relBCID){
371  if(t >= lowerBound+i_relBCID*25 && t < (lowerBound+25)+i_relBCID*25){
372  tdoTime = i_relBCID*25 - t;
373  relBCID = i_relBCID;
374  break;
375  }
376  }
377  if(tdoTime < lowerBound) {
378  tdo = relBCID = 0;
379  return false;
380  }
381  tdo = tdoTime*calib.slope + calib.intercept;
382  return true;
383 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_applyMmBFieldCalib

Gaudi::Property<bool> Muon::NSWCalibTool::m_applyMmBFieldCalib {this, "applyMmBFieldCalib", true, "apply the MM BField correction in reconstruction"}
private

Definition at line 93 of file NSWCalibTool.h.

◆ m_applyMmT0Calib

Gaudi::Property<bool> Muon::NSWCalibTool::m_applyMmT0Calib {this, "applyMmT0Calib", false, "apply the MM t0 calibration"}
private

Definition at line 90 of file NSWCalibTool.h.

◆ m_applysTgcT0Calib

Gaudi::Property<bool> Muon::NSWCalibTool::m_applysTgcT0Calib {this, "applysTgcT0Calib", false, "apply the sTGC t0 calibration"}
private

Definition at line 91 of file NSWCalibTool.h.

◆ m_condT0Key

SG::ReadCondHandleKey<NswT0Data> Muon::NSWCalibTool::m_condT0Key {this, "condT0Key", "NswT0Data", "Key of NswT0Data containing the t0 calibration data"}
private

Definition at line 66 of file NSWCalibTool.h.

◆ m_condTdoPdoKey

SG::ReadCondHandleKey<NswCalibDbTimeChargeData> Muon::NSWCalibTool::m_condTdoPdoKey {this, "condTdoPdoKey", "NswCalibDbTimeChargeData", "Key of NswCalibDbTimeChargeData object containing calibration data (TDO and PDO)"}
private

Definition at line 65 of file NSWCalibTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fieldCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> Muon::NSWCalibTool::m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj"}
private

Definition at line 63 of file NSWCalibTool.h.

◆ m_gasMixture

Gaudi::Property<std::string> Muon::NSWCalibTool::m_gasMixture {this, "GasMixture", "ArCo2_937"}
private

Definition at line 79 of file NSWCalibTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::NSWCalibTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 62 of file NSWCalibTool.h.

◆ m_interactionDensityMean

double Muon::NSWCalibTool::m_interactionDensityMean {0.0F}
private

Definition at line 101 of file NSWCalibTool.h.

◆ m_interactionDensitySigma

double Muon::NSWCalibTool::m_interactionDensitySigma {0.0F}
private

Definition at line 100 of file NSWCalibTool.h.

◆ m_ionUncertainty

Gaudi::Property<double> Muon::NSWCalibTool::m_ionUncertainty {this,"ionUncertainty", 4.0}
private

Definition at line 76 of file NSWCalibTool.h.

◆ m_isData

Gaudi::Property<bool> Muon::NSWCalibTool::m_isData {this, "isData", false, "Processing data"}
private

Definition at line 68 of file NSWCalibTool.h.

◆ m_longDiff

Gaudi::Property<double> Muon::NSWCalibTool::m_longDiff {this, "longDiff", 0.019}
private

Definition at line 74 of file NSWCalibTool.h.

◆ m_lorentzAngleFunction

angleFunction Muon::NSWCalibTool::m_lorentzAngleFunction {NSWCalib::MicroMegaGas::dummy_func()}
private

Definition at line 104 of file NSWCalibTool.h.

◆ m_mmLatencyData

Gaudi::Property<float> Muon::NSWCalibTool::m_mmLatencyData {this,"mmLatencyData",0}
private

Definition at line 84 of file NSWCalibTool.h.

◆ m_mmLatencyMC

Gaudi::Property<float> Muon::NSWCalibTool::m_mmLatencyMC {this,"mmLatencyMC",25}
private

Definition at line 83 of file NSWCalibTool.h.

◆ m_mmPeakTime

Gaudi::Property<float> Muon::NSWCalibTool::m_mmPeakTime {this, "mmPeakTime", 200.}
private

Definition at line 77 of file NSWCalibTool.h.

◆ m_mmT0TargetValue

Gaudi::Property<float> Muon::NSWCalibTool::m_mmT0TargetValue {this, "mmT0TargetValue", 50.0, "target mean value for the MM t0 calibration"}
private

Definition at line 96 of file NSWCalibTool.h.

◆ m_muDetMgrKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> Muon::NSWCalibTool::m_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"}
private

Definition at line 64 of file NSWCalibTool.h.

◆ m_stgcLatencyData

Gaudi::Property<float> Muon::NSWCalibTool::m_stgcLatencyData {this,"stgcLatencyData",-50}
private

Definition at line 87 of file NSWCalibTool.h.

◆ m_stgcLatencyMC

Gaudi::Property<float> Muon::NSWCalibTool::m_stgcLatencyMC {this,"stgcLatencyMC",-50}
private

Definition at line 86 of file NSWCalibTool.h.

◆ m_stgcPeakTime

Gaudi::Property<float> Muon::NSWCalibTool::m_stgcPeakTime {this, "sTgcPeakTime", 0.}
private

Definition at line 78 of file NSWCalibTool.h.

◆ m_stgcT0TargetValue

Gaudi::Property<float> Muon::NSWCalibTool::m_stgcT0TargetValue {this,"stgcT0TargetValue", 0.0 ,"target mean value for the sTGC t0 calibration"}
private

Definition at line 97 of file NSWCalibTool.h.

◆ m_timeRes

Gaudi::Property<double> Muon::NSWCalibTool::m_timeRes {this, "TimeResolution", 25., "Time resolution"}
private

Definition at line 73 of file NSWCalibTool.h.

◆ m_transDiff

Gaudi::Property<double> Muon::NSWCalibTool::m_transDiff {this, "transDiff", 0.036}
private

Definition at line 75 of file NSWCalibTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vDrift

Gaudi::Property<double> Muon::NSWCalibTool::m_vDrift {this, "DriftVelocity",0.047, "Drift velocity"}
private

Definition at line 72 of file NSWCalibTool.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
MuonGM::MMReadoutElement::stripPosition
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position – local or global If the strip number is outside the range of valid strips,...
Definition: MMReadoutElement.h:207
Muon::STGC_RawData::identify
const Identifier identify() const
Definition: STGC_RawData.h:52
Muon::NSWCalibTool::stgcPeakTime
float stgcPeakTime() const override
Definition: NSWCalibTool.h:51
Muon::NSWCalibTool::m_applyMmT0Calib
Gaudi::Property< bool > m_applyMmT0Calib
Definition: NSWCalibTool.h:90
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
NSWCalib::CalibratedStrip::time
double time
Definition: INSWCalibTool.h:22
Muon::NSWCalibTool::m_interactionDensityMean
double m_interactionDensityMean
Definition: NSWCalibTool.h:101
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Muon::NSWCalibTool::m_stgcPeakTime
Gaudi::Property< float > m_stgcPeakTime
Definition: NSWCalibTool.h:78
Muon::MM_RawData::relBcid
uint16_t relBcid() const
Definition: MM_RawData.h:63
Muon::NSWCalibTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: NSWCalibTool.h:62
Muon::MM_RawData::s_lowerTimeBound
static constexpr double s_lowerTimeBound
Definition: MM_RawData.h:72
NSWCalib::CalibratedStrip::charge
double charge
Definition: INSWCalibTool.h:21
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Muon::NSWCalibTool::initializeGasProperties
StatusCode initializeGasProperties()
Definition: NSWCalibTool.cxx:66
python.TestDriveDummies.properties
dictionary properties
Definition: TestDriveDummies.py:14
Muon::NSWCalibTool::m_mmLatencyMC
Gaudi::Property< float > m_mmLatencyMC
Definition: NSWCalibTool.h:83
NswCalibDbTimeChargeData::CalibDataType::PDO
@ PDO
NSWCalib::CalibratedStrip::distDrift
double distDrift
Definition: INSWCalibTool.h:24
Muon::NSWCalibTool::pdoToCharge
bool pdoToCharge(const EventContext &ctx, const bool inCounts, const int pdo, const Identifier &chnlId, float &charge) const override
Definition: NSWCalibTool.cxx:301
NSWCalib::CalibratedStrip::dx
double dx
Definition: INSWCalibTool.h:27
Muon::NSWCalibTool::m_mmLatencyData
Gaudi::Property< float > m_mmLatencyData
Definition: NSWCalibTool.h:84
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Muon::MM_RawData::timeAndChargeInCounts
bool timeAndChargeInCounts() const
Definition: MM_RawData.h:65
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Muon::MM_RawData::identify
const Identifier & identify() const
Definition: MM_RawData.h:58
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
MuonGM::MMReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MMReadoutElement.h:191
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
Muon::MM_RawData::time
int time() const
Definition: MM_RawData.h:62
NSWCalib::CalibratedStrip::resTransDistDrift
double resTransDistDrift
Definition: INSWCalibTool.h:25
Muon::NSWCalibTool::m_lorentzAngleFunction
angleFunction m_lorentzAngleFunction
Definition: NSWCalibTool.h:104
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
Muon::NSWCalibTool::m_muDetMgrKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
Definition: NSWCalibTool.h:64
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Muon::NSWCalibTool::m_mmPeakTime
Gaudi::Property< float > m_mmPeakTime
Definition: NSWCalibTool.h:77
Muon::NSWCalibTool::mmPeakTime
float mmPeakTime() const override
Definition: NSWCalibTool.h:50
Muon::NSWCalibTool::tdoToTime
bool tdoToTime(const EventContext &ctx, const bool inCounts, const int tdo, const Identifier &chnlId, float &time, const int relBCID) const override
Definition: NSWCalibTool.cxx:405
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
Muon::NSWCalibTool::m_longDiff
Gaudi::Property< double > m_longDiff
Definition: NSWCalibTool.h:74
Muon::NSWCalibTool::m_isData
Gaudi::Property< bool > m_isData
Definition: NSWCalibTool.h:68
Muon::NSWCalibTool::m_stgcT0TargetValue
Gaudi::Property< float > m_stgcT0TargetValue
Definition: NSWCalibTool.h:97
Muon::MM_RawData::s_BCWindow
static constexpr int s_BCWindow
Definition: MM_RawData.h:75
NSWCalib::CalibratedStrip::resLongDistDrift
double resLongDistDrift
Definition: INSWCalibTool.h:26
Muon::NSWCalibTool::m_mmT0TargetValue
Gaudi::Property< float > m_mmT0TargetValue
Definition: NSWCalibTool.h:96
Muon::NSWCalibTool::m_interactionDensitySigma
double m_interactionDensitySigma
Definition: NSWCalibTool.h:100
Muon::NSWCalibTool::loadMagneticField
bool loadMagneticField(const EventContext &ctx, MagField::AtlasFieldCache &fieldCache) const
Definition: NSWCalibTool.cxx:242
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Muon::STGC_RawData::s_lowerTimeBound
static constexpr double s_lowerTimeBound
Definition: STGC_RawData.h:67
MuonGM::sTgcReadoutElement::stripPosition
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position - should be renamed to channel position If the strip number is outside the range of va...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:321
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
Muon::NSWCalibTool::m_vDrift
Gaudi::Property< double > m_vDrift
Definition: NSWCalibTool.h:72
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Muon::MMPrepData::stripCharges
const std::vector< int > & stripCharges() const
returns the list of charges
Definition: MMPrepData.h:257
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Muon::NSWCalibTool::m_ionUncertainty
Gaudi::Property< double > m_ionUncertainty
Definition: NSWCalibTool.h:76
Muon::NSWCalibTool::timeToTdoSTGC
bool timeToTdoSTGC(const NswCalibDbTimeChargeData *tdoPdoData, const float time, const Identifier &chnlId, int &tdo, int &relBCID) const
Definition: NSWCalibTool.cxx:360
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::NSWCalibTool::applyT0Calibration
float applyT0Calibration(const EventContext &ctx, const Identifier &id, float time) const
Definition: NSWCalibTool.cxx:385
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::MMReadoutElement::stripGlobalPosition
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
Definition: MMReadoutElement.h:280
NSWCalib::CalibratedStrip::locPos
Amg::Vector2D locPos
Definition: INSWCalibTool.h:28
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
NswCalibDbTimeChargeData::CalibDataType::TDO
@ TDO
Muon::NSWCalibTool::m_applyMmBFieldCalib
Gaudi::Property< bool > m_applyMmBFieldCalib
Definition: NSWCalibTool.h:93
Muon::NSWCalibTool::TimeCalibConst
NswCalibDbTimeChargeData::CalibConstants TimeCalibConst
Definition: NSWCalibTool.h:32
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Muon::MMPrepData::stripNumbers
const std::vector< uint16_t > & stripNumbers() const
returns the list of strip numbers
Definition: MMPrepData.h:247
Muon::NSWCalibTool::m_stgcLatencyData
Gaudi::Property< float > m_stgcLatencyData
Definition: NSWCalibTool.h:87
Muon::NSWCalibTool::m_stgcLatencyMC
Gaudi::Property< float > m_stgcLatencyMC
Definition: NSWCalibTool.h:86
NSWCalib::CalibratedStrip
Definition: INSWCalibTool.h:20
Muon::NSWCalibTool::m_gasMixture
Gaudi::Property< std::string > m_gasMixture
Definition: NSWCalibTool.h:79
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Muon::MMPrepData::stripTimes
const std::vector< short int > & stripTimes() const
returns the list of times
Definition: MMPrepData.h:252
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Muon::MM_RawData::charge
int charge() const
Definition: MM_RawData.h:64
Muon::NSWCalibTool::m_condT0Key
SG::ReadCondHandleKey< NswT0Data > m_condT0Key
Definition: NSWCalibTool.h:66
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
Muon::NSWCalibTool::getCalibData
const NswCalibDbTimeChargeData * getCalibData(const EventContext &ctx) const
Definition: NSWCalibTool.cxx:81
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
MuonGM::sTgcReadoutElement::stripGlobalPosition
bool stripGlobalPosition(const Identifier &id, Amg::Vector3D &gpos) const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:332
Muon::STGC_RawData::time
float time() const
Definition: STGC_RawData.h:55
charge
double charge(const T &p)
Definition: AtlasPID.h:538
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::NSWCalibTool::m_applysTgcT0Calib
Gaudi::Property< bool > m_applysTgcT0Calib
Definition: NSWCalibTool.h:91
PlotSFuncertainty.calib
calib
Definition: PlotSFuncertainty.py:110
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::NSWCalibTool::m_transDiff
Gaudi::Property< double > m_transDiff
Definition: NSWCalibTool.h:75
h
Muon::NSWCalibTool::localStripPosition
bool localStripPosition(const Identifier &id, Amg::Vector2D &locPos) const
Definition: NSWCalibTool.cxx:445
Muon::NSWCalibTool::timeToTdoMM
bool timeToTdoMM(const NswCalibDbTimeChargeData *tdoPdoData, const float time, const Identifier &chnlId, int &tdo, int &relBCID) const
Definition: NSWCalibTool.cxx:334
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonGM::MuonDetectorManager::getMMReadoutElement
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:255
MagField::AtlasFieldCache
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Definition: AtlasFieldCache.h:43
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:25
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
MagField::AtlasFieldCache::getField
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...
Definition: AtlasFieldCache.cxx:42
Muon::NSWCalibTool::m_condTdoPdoKey
SG::ReadCondHandleKey< NswCalibDbTimeChargeData > m_condTdoPdoKey
Definition: NSWCalibTool.h:65
NswCalibDbTimeChargeData
Definition: NswCalibDbTimeChargeData.h:19
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
MuonGM::MuonDetectorManager::getsTgcReadoutElement
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:259
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Muon::STGC_RawData::charge
unsigned int charge() const
Definition: STGC_RawData.h:57
Muon::NSWCalibTool::calibrateStrip
StatusCode calibrateStrip(const Identifier &id, const double time, const double charge, const double lorentzAngle, NSWCalib::CalibratedStrip &calibStrip) const override
Definition: NSWCalibTool.cxx:126
Muon::STGC_RawData::bcTag
uint16_t bcTag() const
Definition: STGC_RawData.h:58
MuonGM::MuonChannelDesign::channelWidth
double channelWidth() const
calculate local channel width
Definition: MuonChannelDesign.h:399
python.compressB64.c
def c
Definition: compressB64.py:93
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Muon::STGC_RawData::timeAndChargeInCounts
bool timeAndChargeInCounts() const
Definition: STGC_RawData.h:61
NswCalibDbTimeChargeData::getCalibForChannel
const CalibConstants * getCalibForChannel(const CalibDataType type, const Identifier &channelId) const
Retrieves the calibration constant for a particular readout channel.
Definition: NswCalibDbTimeChargeData.cxx:121
NSWCalib::MicroMegaGas
Definition: INSWCalibTool.h:32
Muon::STGC_RawData::s_BCWindow
static constexpr int s_BCWindow
Definition: STGC_RawData.h:70
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
NSWCalib::CalibratedStrip::identifier
Identifier identifier
Definition: INSWCalibTool.h:29
Muon::NSWCalibTool::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: NSWCalibTool.h:63
Identifier
Definition: IdentifierFieldParser.cxx:14