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

#include <PadTdsOfflineTool.h>

Inheritance diagram for NSWL1::PadTdsOfflineTool:
Collaboration diagram for NSWL1::PadTdsOfflineTool:

Public Member Functions

 PadTdsOfflineTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~PadTdsOfflineTool ()=default
 
virtual StatusCode initialize () override
 
virtual StatusCode gather_pad_data (std::vector< std::shared_ptr< PadData >> &pads, int side=-1, int sector=-1) 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, V, H > &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 ()
 
Sector indices

The current convention is to have sector [0,15] on side==0 (side 'A') and sector [16,31] on side==1 (side 'C').

Use the functions below rather than hardcoded values.

static size_t firstSector ()
 
static size_t lastSector ()
 
static size_t numberOfSectors ()
 
static size_t numberOfSectorsPerSide ()
 
static size_t firstSectorAside ()
 
static size_t lastSectorAside ()
 
static size_t firstSectorCside ()
 
static size_t lastSectorCside ()
 
static size_t firstSector (const int &side)
 
static size_t lastSector (const int &side)
 
static char sideLabel (const int &side)
 
static size_t sectorIndex (const int &side, const int &sector)
 internal index. More...
 

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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode fill_pad_cache (std::vector< std::vector< std::shared_ptr< PadData >> > &pad_cache) const
 Apply the additional processing then fill the cache, locally. More...
 
double computeTof (const sTgcDigit *digit) const
 compute the time of flight of particle giving the PAD hit More...
 
double computeTimeJitter () const
 extract the time jitter t subtract from the PAD hit time More...
 
void simulateDeadTime (std::vector< PadHits > &h) const
 simulate the dead time of the VMM More...
 
bool get_truth_hits_this_pad (const Identifier &pad_id, std::vector< MuonSimData::Deposit > &deposits) const
 
bool is_pad_digit (const sTgcDigit *digit) const
 
int cache_index (const sTgcDigit *digit) const
 
bool determine_delay_and_bc (const sTgcDigit *digit, const int pad_hit_number, double &delayed_time, uint16_t &BCtag) const
 
void store_pads (const std::vector< PadHits > &pad_hits, std::vector< std::vector< std::shared_ptr< PadData >> > &pad_cache) const
 Store pad data in the cache. More...
 
void print_digit (const sTgcDigit *digit) const
 
void print_pad_time (const std::vector< PadHits > &pad_hits) const
 Print time for each pad. More...
 
void print_pad_cache (std::vector< std::vector< std::shared_ptr< PadData >> > &pad_cache) const
 Print all info stored in the pad cache. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
 Random number generator engine to use. More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_detManagerKey {this, "MuonManagerKey", "MuonDetectorManager"}
 
Gaudi::Property< bool > m_isMC {this, "IsMC", true, "This is MC"}
 
Gaudi::Property< std::string > m_rndmEngineName {this, "RndmEngineName", "PadTdsOfflineTool", "Name of the random engine"}
 
Gaudi::Property< float > m_vmmTimeOverThreshold {this, "VMM_TimeOverThreshold", 0., "Time to form a digital signal"}
 
Gaudi::Property< float > m_vmmShapingTime {this, "VMM_ShapingTime", 0., "Time from the leading edge of the signal and its peak"}
 
Gaudi::Property< float > m_vmmDeadTime {this, "VMM_DeadTime", 50., "VMM chip dead time to produce another signal on the same channel"}
 
Gaudi::Property< float > m_triggerCaptureWindow {this, "TriggerCaptureWindow", 30., "Time window for valid hit coincidences"}
 
Gaudi::Property< float > m_timeJitter {this, "TimeJitter", 2., "Time jitter"}
 
Gaudi::Property< bool > m_applyTDS_TofSubtraction {this, "ApplyTofSubtraction", false, "Time of flight subtraction"}
 
Gaudi::Property< bool > m_applyTDS_TimeJitterSubtraction {this, "ApplyTimeJitterSubtraction", false, "Time jitter subtraction"}
 
Gaudi::Property< bool > m_applyVMM_ToT {this, "ApplyToT", false, "Time over threshold criteria"}
 
Gaudi::Property< bool > m_applyVMM_ShapingTime {this, "ApplyVMMShapingTime", false, "VMM Shaping time condition"}
 
Gaudi::Property< bool > m_applyVMM_DeadTime {this, "ApplyVMMDeadTime", false, "VMM Dead time condition"}
 
SG::ReadHandleKey< sTgcDigitContainerm_sTgcDigitContainer = {this,"sTGC_DigitContainerName","sTGC_DIGITS","the name of the sTGC digit container"}
 
SG::ReadHandleKey< MuonSimDataCollectionm_sTgcSdoContainer = {this,"sTGC_SdoContainerName","sTGC_SDO","the name of the sTGC SDO container"}
 
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 78 of file PadTdsOfflineTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PadTdsOfflineTool()

NSWL1::PadTdsOfflineTool::PadTdsOfflineTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 32 of file PadTdsOfflineTool.cxx.

32  :
34  {
35  declareInterface<NSWL1::IPadTdsTool>(this);
36  }

◆ ~PadTdsOfflineTool()

virtual NSWL1::PadTdsOfflineTool::~PadTdsOfflineTool ( )
virtualdefault

Member Function Documentation

◆ cache_index()

int NSWL1::PadTdsOfflineTool::cache_index ( const sTgcDigit digit) const
private

Definition at line 237 of file PadTdsOfflineTool.cxx.

238  {
239  Identifier Id = digit->identify();
240  int stationEta = m_idHelperSvc->stgcIdHelper().stationEta(Id);
241  int stationPhi = m_idHelperSvc->stgcIdHelper().stationPhi(Id);
242  std::string stName = m_idHelperSvc->stgcIdHelper().stationNameString(m_idHelperSvc->stgcIdHelper().stationName(Id));
243  int isSmall = stName[2] == 'S';
244  int trigger_sector = (isSmall)? stationPhi*2-1 : stationPhi*2-2;
245  return (stationEta>0)? trigger_sector + 16 : trigger_sector;
246  }

◆ computeTimeJitter()

double NSWL1::PadTdsOfflineTool::computeTimeJitter ( ) const
private

extract the time jitter t subtract from the PAD hit time

Definition at line 186 of file PadTdsOfflineTool.cxx.

186  {
187  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, m_rndmEngineName);
188  CLHEP::HepRandomEngine * engine = rngWrapper->getEngine(Gaudi::Hive::currentContext());
189  return CLHEP::RandGauss::shoot(engine, 0, m_timeJitter);
190  }

◆ computeTof()

double NSWL1::PadTdsOfflineTool::computeTof ( const sTgcDigit digit) const
private

compute the time of flight of particle giving the PAD hit

Definition at line 171 of file PadTdsOfflineTool.cxx.

171  {
172  SG::ReadCondHandle<MuonGM::MuonDetectorManager> detManager{m_detManagerKey, Gaudi::Hive::currentContext()};
173  Identifier Id = digit->identify();
174  const MuonGM::sTgcReadoutElement* rdoEl = detManager->getsTgcReadoutElement(Id);
175  Amg::Vector2D pad_lpos;
176  rdoEl->stripPosition(Id,pad_lpos);
177  Amg::Vector3D pad_gpos;
178  rdoEl->surface(Id).localToGlobal(pad_lpos, pad_gpos, pad_gpos);
179 
180  double distance = std::sqrt( pad_gpos.x()*pad_gpos.x() +
181  pad_gpos.y()*pad_gpos.y() +
182  pad_gpos.z()*pad_gpos.z() );
183  return distance * c_inverse;
184  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ determine_delay_and_bc()

bool NSWL1::PadTdsOfflineTool::determine_delay_and_bc ( const sTgcDigit digit,
const int  pad_hit_number,
double &  delayed_time,
uint16_t &  BCtag 
) const
private

Definition at line 250 of file PadTdsOfflineTool.cxx.

252  {
253  bool success = false;
254  if(!digit) return success;
255  if(!is_pad_digit(digit)) return success;
256  double arrival_time = digit->time();
257  delayed_time = arrival_time;
258  if(m_applyTDS_TofSubtraction) delayed_time -= computeTof(digit);
260  double capture_time = delayed_time + m_triggerCaptureWindow;
261  if((delayed_time>200 || delayed_time<-200) ||
262  (capture_time>200 || capture_time<-200) ){
263  ATH_MSG_WARNING("sTGC Pad hit "<<pad_hit_number<<" time outside of the range -200 ns / +200 ns,"
264  " skipping it!");
265  ATH_MSG_WARNING("sTGC Pad hit "<<pad_hit_number<<": delayed time ["<<delayed_time<<" ns]"
266  " capture time ["<<capture_time<<" ns]");
267  return success;
268  }
269  for (unsigned int i=0; i<16; i++) {
270  double bunch_start = i*25;
271  double bunch_stop = (i+1)*25;
272  double signal_start = delayed_time + 200;
273  double signal_stop = capture_time + 200;
274  if ((signal_start>=bunch_start && signal_start<bunch_stop) ||
275  (signal_stop>=bunch_start && signal_stop<bunch_stop) ){
276  BCtag = BCtag | (0x1<<i);
277  continue;
278  }
279  if(bunch_start>=signal_start && bunch_stop<signal_stop){
280  BCtag = BCtag | (0x1<<i);
281  }
282  }
283  std::string bctag = "";
284  uint16_t last_bit = 0x8000;
285  for(unsigned int i=0; i<16; i++) {
286  if(BCtag & (last_bit>>i)) bctag += "1";
287  else bctag += "0";
288  }
289  ATH_MSG_DEBUG("sTGC Pad hit " << pad_hit_number << ": arrival time [" << arrival_time << " ns]"
290  << " delayed time [" << delayed_time << " ns]"
291  << " capture time [" << capture_time << " ns]"
292  << " BC tag [" << bctag << "]" );
293  success = true;
294  return success;
295  }

◆ 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; }

◆ 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

◆ fill_pad_cache()

StatusCode NSWL1::PadTdsOfflineTool::fill_pad_cache ( std::vector< std::vector< std::shared_ptr< PadData >> > &  pad_cache) const
private

Apply the additional processing then fill the cache, locally.

Definition at line 125 of file PadTdsOfflineTool.cxx.

125  {
126  SG::ReadCondHandle<MuonGM::MuonDetectorManager> detManager{m_detManagerKey, Gaudi::Hive::currentContext()};
128  if(!digit_container.isValid()){
129  ATH_MSG_ERROR("could not retrieve the sTGC Digit container: cannot return the STRIP hits");
130  return StatusCode::FAILURE;
131  }
132 
133  sTgcDigitContainer::const_iterator it = digit_container->begin();
134  sTgcDigitContainer::const_iterator it_e = digit_container->end();
135  ATH_MSG_DEBUG("retrieved sTGC Digit Container with size "<<digit_container->digit_size());
136 
137  //int pad_hit_number = 0;
138  std::vector<PadHits> pad_hits;
139  uint16_t BC0 = 0, BCP1 = 1, BCP2 = 2, BCP3 = 3, BCP4 = 4, BCM1 = ~BCP1, BCM2 = ~BCP2, BCM3 = ~BCP3;
140  std::vector<uint16_t> bcWindow={BC0, BCP1, BCP2, BCP3, BCP4, BCM1, BCM2, BCM3};
141 
142  for(; it!=it_e; ++it) {
143  const sTgcDigitCollection* coll = *it;
144  ATH_MSG_DEBUG( "processing collection with size " << coll->size() );
145  for (unsigned int item=0; item<coll->size(); item++) {
146  const sTgcDigit* digit = coll->at(item);
147  if(digit) {
148  if(is_pad_digit(digit)) {
149  Identifier Id = digit->identify();
150  if (std::find(bcWindow.begin(), bcWindow.end(), digit->bcTag()) != bcWindow.end()){
152  //PadOfflineData* pad = new PadOfflineData(Id, digit->time(), digit->bcTag(), m_sTgcIdHelper);
153  //S.I
154  //std::shared_ptr<PadOfflineData> pad(new PadOfflineData(Id, digit->time(), digit->bcTag(), m_sTgcIdHelper));
155  auto pad=std::make_shared<PadOfflineData>(Id, digit->time(), digit->bcTag(), *detManager);
156  //pad_hits.push_back(PadHits(Id, pad, cache_index(digit)));
157  pad_hits.emplace_back(Id, pad, cache_index(digit));//avoids extra copy
158  //S.I
159  }
160  }
161  }
162  } //for(item)
163  } // for(it)
164 
165  store_pads(pad_hits, pad_cache);
166  print_pad_cache(pad_cache);
167  ATH_MSG_DEBUG( "fill_pad_cache: end of processing" );
168  return StatusCode::SUCCESS;
169  }

◆ firstSector() [1/2]

static size_t NSWL1::PadTdsOfflineTool::firstSector ( )
inlinestatic

Definition at line 96 of file PadTdsOfflineTool.h.

96 { return 0; }

◆ firstSector() [2/2]

static size_t NSWL1::PadTdsOfflineTool::firstSector ( const int &  side)
inlinestatic

Definition at line 104 of file PadTdsOfflineTool.h.

105  { return (side==0 ? firstSectorAside() : side==1 ? firstSectorCside() : 0); }

◆ firstSectorAside()

static size_t NSWL1::PadTdsOfflineTool::firstSectorAside ( )
inlinestatic

Definition at line 100 of file PadTdsOfflineTool.h.

100 { return 0; }

◆ firstSectorCside()

static size_t NSWL1::PadTdsOfflineTool::firstSectorCside ( )
inlinestatic

Definition at line 102 of file PadTdsOfflineTool.h.

102 { return 16; }

◆ gather_pad_data()

StatusCode NSWL1::PadTdsOfflineTool::gather_pad_data ( std::vector< std::shared_ptr< PadData >> &  pads,
int  side = -1,
int  sector = -1 
) const
overridevirtual

Implements NSWL1::IPadTdsTool.

Definition at line 64 of file PadTdsOfflineTool.cxx.

64  {
65  ATH_MSG_DEBUG( "gather_pad_data: start gathering the PAD hits for side " << side << ", sector " << sector );
66  // check side and sector parameters
67  if ( side <-1 || side >1 ) {
68  ATH_MSG_ERROR( "requested side " << side << " is out of range: [-1==All, 0==side C, 1==side A]");
69  return StatusCode::FAILURE;
70  }
71 
72  if ( sector <-1 || sector >15 ) {
73  ATH_MSG_ERROR( "requested sector " << sector << " is out of range: [-1==All, 0 - 15]");
74  return StatusCode::FAILURE;
75  }
76 
77  std::vector< std::vector<std::shared_ptr<PadData>> > pad_cache(PadTdsOfflineTool::numberOfSectors());
78  ATH_CHECK(fill_pad_cache(pad_cache));
79 
80  // delivering the required collection
81  const bool anySide = (side==-1);
82  const bool anySector = (sector==-1);
83  if (anySide && anySector) {
84  //return the full set
85  ATH_MSG_DEBUG( "copying the full PAD hit set" );
87  std::vector<std::shared_ptr<PadData>>& pad_sec = pad_cache.at(i);
88  pads.insert( pads.end(), std::make_move_iterator(pad_sec.begin()), std::make_move_iterator(pad_sec.end()));
89  }
90  }
91  else if (anySector and not anySide) {
92  //return all the trigger sectors for the given side
93  ATH_MSG_DEBUG( "copying the PAD hit set of all trigger sector in side " << PadTdsOfflineTool::sideLabel(side) );
95  unsigned int stop = PadTdsOfflineTool::lastSector(side);
96  for (size_t i=start; i<stop; i++) {
97  std::vector<std::shared_ptr<PadData>>& pad_sec = pad_cache.at(i);
98  pads.insert( pads.end(), std::make_move_iterator(pad_sec.begin()), std::make_move_iterator(pad_sec.end()));
99  }
100  }
101  else if (anySide and not anySector) {
102  // return the required trigger sectors
103  ATH_MSG_DEBUG( "copying the PAD hit set of all trigger sector " << sector << " in both side" );
104  size_t sectorA = sector+PadTdsOfflineTool::firstSectorAside();
105  std::vector<std::shared_ptr<PadData>>& pad_secA = pad_cache.at(sectorA);
106  pads.insert( pads.end(), std::make_move_iterator(pad_secA.begin()), std::make_move_iterator(pad_secA.end()));
107 
108  size_t sectorC = sector+PadTdsOfflineTool::firstSectorCside();
109  std::vector<std::shared_ptr<PadData>>& pad_secC = pad_cache.at(sectorC);
110  pads.insert( pads.end(), std::make_move_iterator(pad_secC.begin()), std::make_move_iterator(pad_secC.end()));
111  }
112  else {
113  // return the required trigger sector
114  ATH_MSG_DEBUG("copying the PAD hit set of all trigger sector "<<sector
115  <<" in side "<<PadTdsOfflineTool::sideLabel(side));
116  size_t sectorAorC = PadTdsOfflineTool::sectorIndex(side, sector);
117  std::vector<std::shared_ptr<PadData>>& pad_secAorC = pad_cache.at(sectorAorC);
118  pads.insert( pads.end(), std::make_move_iterator(pad_secAorC.begin()), std::make_move_iterator(pad_secAorC.end()));
119  }
120  ATH_MSG_DEBUG( "delivered n. " << pads.size() << " PAD hits." );
121  pad_cache.clear();
122  return StatusCode::SUCCESS;
123  }

◆ get_truth_hits_this_pad()

bool NSWL1::PadTdsOfflineTool::get_truth_hits_this_pad ( const Identifier pad_id,
std::vector< MuonSimData::Deposit > &  deposits 
) const
private

Definition at line 297 of file PadTdsOfflineTool.cxx.

298  {
299  bool success=false;
300  const MuonSimDataCollection* ptrMuonSimDataCollection = nullptr;
301  if(m_isMC) {
303  if(!sdo_container.isValid()) {
304  ATH_MSG_WARNING("could not retrieve the sTGC SDO container: it will not be possible to associate the MC truth");
305  return success;
306  }
307  ptrMuonSimDataCollection = sdo_container.cptr();
308  const MuonSimData pad_sdo = (ptrMuonSimDataCollection->find(pad_id))->second;
309  pad_sdo.deposits(deposits);
310  success = true;
311  }
312  return success;
313  }

◆ initialize()

StatusCode NSWL1::PadTdsOfflineTool::initialize ( )
overridevirtual

Definition at line 38 of file PadTdsOfflineTool.cxx.

38  {
39  ATH_MSG_DEBUG( "initializing " << name() );
40 
41  ATH_MSG_DEBUG( name() << " configuration:");
42  ATH_MSG_DEBUG(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_rndmEngineName.name() << m_rndmEngineName.value());
43  ATH_MSG_DEBUG(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_triggerCaptureWindow.name() << m_triggerCaptureWindow.value());
44  ATH_MSG_DEBUG(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_timeJitter.name() << m_timeJitter.value());
45  ATH_MSG_DEBUG(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_vmmTimeOverThreshold.name() << m_vmmTimeOverThreshold.value());
46  ATH_MSG_DEBUG(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_vmmShapingTime.name() << m_vmmShapingTime.value());
47  ATH_MSG_DEBUG(" " << std::setw(32) << std::setfill('.') << std::setiosflags(std::ios::left) << m_vmmDeadTime.name() << m_vmmDeadTime.value());
48 
51 
52  // retrieve the MuonDetectormanager
54 
55  // retrieve the Random Service
56  ATH_CHECK( m_rndmSvc.retrieve() );
57 
58  // retrieve the idHelper Service
59  ATH_CHECK(m_idHelperSvc.retrieve());
60 
61  return StatusCode::SUCCESS;
62  }

◆ 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& NSWL1::IPadTdsTool::interfaceID ( )
inlinestaticinherited

Definition at line 41 of file IPadTdsTool.h.

41  {
42  static const InterfaceID IID_IPadTdsTool("NSWL1::IPadTdsTool", 1 ,0);
43  return IID_IPadTdsTool;
44  }

◆ is_pad_digit()

bool NSWL1::PadTdsOfflineTool::is_pad_digit ( const sTgcDigit digit) const
private

Definition at line 232 of file PadTdsOfflineTool.cxx.

233  {
234  return (digit && m_idHelperSvc->stgcIdHelper().channelType(digit->identify())==0);
235  }

◆ lastSector() [1/2]

static size_t NSWL1::PadTdsOfflineTool::lastSector ( )
inlinestatic

Definition at line 97 of file PadTdsOfflineTool.h.

97 { return 31; }

◆ lastSector() [2/2]

static size_t NSWL1::PadTdsOfflineTool::lastSector ( const int &  side)
inlinestatic

Definition at line 106 of file PadTdsOfflineTool.h.

107  { return (side==0 ? lastSectorAside() : side==1 ? lastSectorCside() : 0); }

◆ lastSectorAside()

static size_t NSWL1::PadTdsOfflineTool::lastSectorAside ( )
inlinestatic

Definition at line 101 of file PadTdsOfflineTool.h.

101 { return 15; }

◆ lastSectorCside()

static size_t NSWL1::PadTdsOfflineTool::lastSectorCside ( )
inlinestatic

Definition at line 103 of file PadTdsOfflineTool.h.

103 { return 31; }

◆ 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  }

◆ numberOfSectors()

static size_t NSWL1::PadTdsOfflineTool::numberOfSectors ( )
inlinestatic

Definition at line 98 of file PadTdsOfflineTool.h.

98 { return 32; }

◆ numberOfSectorsPerSide()

static size_t NSWL1::PadTdsOfflineTool::numberOfSectorsPerSide ( )
inlinestatic

Definition at line 99 of file PadTdsOfflineTool.h.

99 { return 16; }

◆ 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.

◆ print_digit()

void NSWL1::PadTdsOfflineTool::print_digit ( const sTgcDigit digit) const
private

Definition at line 331 of file PadTdsOfflineTool.cxx.

332  {
333  if(!is_pad_digit(digit)) return;
334  Identifier Id = digit->identify();
335  std::string stName = m_idHelperSvc->stgcIdHelper().stationNameString(m_idHelperSvc->stgcIdHelper().stationName(Id));
336  int stationEta = m_idHelperSvc->stgcIdHelper().stationEta(Id);
337  int stationPhi = m_idHelperSvc->stgcIdHelper().stationPhi(Id);
338  int multiplet = m_idHelperSvc->stgcIdHelper().multilayer(Id);
339  int gas_gap = m_idHelperSvc->stgcIdHelper().gasGap(Id);
340  int channel_type = m_idHelperSvc->stgcIdHelper().channelType(Id);
341  int channel = m_idHelperSvc->stgcIdHelper().channel(Id);
342  int pad_eta = m_idHelperSvc->stgcIdHelper().padEta(Id);
343  int pad_phi = m_idHelperSvc->stgcIdHelper().padPhi(Id);
344 
345  ATH_MSG_DEBUG("sTGC Pad hit:"
346  <<" cache index ["<<cache_index(digit)<<"]"
347  <<" Station Name [" <<stName <<"]"
348  <<" Station Eta [" <<stationEta <<"]"
349  <<" Station Phi [" <<stationPhi <<"]"
350  <<" Multiplet [" <<multiplet <<"]"
351  <<" GasGap [" <<gas_gap <<"]"
352  <<" Type [" <<channel_type <<"]"
353  <<" ChNr [" <<channel <<"]"
354  <<" Pad Eta [" <<pad_eta <<"]"
355  <<" Pad Phi [" <<pad_phi <<"]"
356  <<" BCTag [" <<digit->bcTag() <<"]"
357  <<" Id Hash [" <<Id <<"]");
358  }

◆ print_pad_cache()

void NSWL1::PadTdsOfflineTool::print_pad_cache ( std::vector< std::vector< std::shared_ptr< PadData >> > &  pad_cache) const
private

Print all info stored in the pad cache.

Definition at line 365 of file PadTdsOfflineTool.cxx.

366  {
367  for (const std::vector<std::shared_ptr<PadData>>& pad : pad_cache) {
368  for (const auto &padhit : pad)
369  ATH_MSG_DEBUG("PAD hit cache: hit at side " << ( (padhit->sideId())? "A":"C")
370  << ", trigger sector " << padhit->sectorId()
371  << ", module " << padhit->moduleId()
372  << ", multiplet " << padhit->multipletId()
373  << ", gas gap " << padhit->gasGapId()
374  << ", pad eta " << padhit->padEtaId()
375  << ", pad phi " << padhit->padPhiId());
376  }
377  }

◆ print_pad_time()

void NSWL1::PadTdsOfflineTool::print_pad_time ( const std::vector< PadHits > &  pad_hits) const
private

Print time for each pad.

Definition at line 360 of file PadTdsOfflineTool.cxx.

361  {
362  for (const auto &hit : pad_hits) ATH_MSG_DEBUG("pad hit has time "<< hit.t_pad->time());
363  }

◆ 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  }

◆ sectorIndex()

static size_t NSWL1::PadTdsOfflineTool::sectorIndex ( const int &  side,
const int &  sector 
)
inlinestatic

internal index.

Definition at line 111 of file PadTdsOfflineTool.h.

112  { return side * numberOfSectorsPerSide() + sector; }

◆ sideLabel()

static char NSWL1::PadTdsOfflineTool::sideLabel ( const int &  side)
inlinestatic

Definition at line 108 of file PadTdsOfflineTool.h.

109  { return (side==0 ? 'A' : side==1 ? 'C' : '?'); }

◆ simulateDeadTime()

void NSWL1::PadTdsOfflineTool::simulateDeadTime ( std::vector< PadHits > &  h) const
private

simulate the dead time of the VMM

Definition at line 192 of file PadTdsOfflineTool.cxx.

192  {
193 
194  // create a channel map and fill it
195  PAD_MAP channel_map;
196  for (unsigned int i=0; i<h.size(); i++) {
197  Identifier pad_id = h[i].t_id;
198  PAD_MAP_IT it = channel_map.find( pad_id );
199  if ( it!=channel_map.end() ) {
200  (*it).second.push_back(h[i]);
201  } else {
202  std::vector<PadHits> tmp;
203  tmp.push_back(h[i]);
204  channel_map.insert( PAD_MAP_ITEM(pad_id,tmp) );
205  }
206  }
207 
208  // vector are already ordered in time so check for dead time overlap.
209  PAD_MAP_IT it = channel_map.begin();
210  while ( it!=channel_map.end() ) {
211  std::vector<PadHits>& hits = (*it).second;
212  std::vector<PadHits>::iterator p_next = hits.begin();
214  while ( p_next!=hits.end() ) {
215  if (std::fabs((*p_next).t_pad->time()-(*p).t_pad->time())<=m_vmmDeadTime){
216  p_next = hits.erase(p_next);
217  }else{
218  p=p_next++;
219  }
220  }
221  }
222  //once cleared the overlapping PAD hits, refill the PAD hit vector
223  h.clear();
224  it = channel_map.begin();
225  while ( it!=channel_map.end() ) {
226  std::vector<PadHits> hits = (*it).second;
227  h.insert(h.end(),hits.begin(),hits.end());
228  ++it;
229  }
230  }

◆ store_pads()

void NSWL1::PadTdsOfflineTool::store_pads ( const std::vector< PadHits > &  pad_hits,
std::vector< std::vector< std::shared_ptr< PadData >> > &  pad_cache 
) const
private

Store pad data in the cache.

Definition at line 315 of file PadTdsOfflineTool.cxx.

316  {
317  for (unsigned int i=0; i<pad_hits.size(); i++) {
318  const std::vector<std::shared_ptr<PadData>>& pads = pad_cache.at(pad_hits[i].t_cache_index);
319  bool fill = pads.empty();
320  for(unsigned int p=0; p<pads.size(); p++) {
321  Identifier Id(pads.at(p)->id());
322  if(Id==pad_hits[i].t_id) {
323  fill = false;
324  ATH_MSG_WARNING( "Pad Hits entered multiple times Discarding!!! Id:" << Id );
325  } else fill = true;
326  }
327  if( fill ) pad_cache.at(pad_hits[i].t_cache_index).push_back(pad_hits[i].t_pad);
328  }
329  }

◆ 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.

◆ 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_applyTDS_TimeJitterSubtraction

Gaudi::Property<bool> NSWL1::PadTdsOfflineTool::m_applyTDS_TimeJitterSubtraction {this, "ApplyTimeJitterSubtraction", false, "Time jitter subtraction"}
private

Definition at line 152 of file PadTdsOfflineTool.h.

◆ m_applyTDS_TofSubtraction

Gaudi::Property<bool> NSWL1::PadTdsOfflineTool::m_applyTDS_TofSubtraction {this, "ApplyTofSubtraction", false, "Time of flight subtraction"}
private

Definition at line 151 of file PadTdsOfflineTool.h.

◆ m_applyVMM_DeadTime

Gaudi::Property<bool> NSWL1::PadTdsOfflineTool::m_applyVMM_DeadTime {this, "ApplyVMMDeadTime", false, "VMM Dead time condition"}
private

Definition at line 155 of file PadTdsOfflineTool.h.

◆ m_applyVMM_ShapingTime

Gaudi::Property<bool> NSWL1::PadTdsOfflineTool::m_applyVMM_ShapingTime {this, "ApplyVMMShapingTime", false, "VMM Shaping time condition"}
private

Definition at line 154 of file PadTdsOfflineTool.h.

◆ m_applyVMM_ToT

Gaudi::Property<bool> NSWL1::PadTdsOfflineTool::m_applyVMM_ToT {this, "ApplyToT", false, "Time over threshold criteria"}
private

Definition at line 153 of file PadTdsOfflineTool.h.

◆ m_detManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> NSWL1::PadTdsOfflineTool::m_detManagerKey {this, "MuonManagerKey", "MuonDetectorManager"}
private

Definition at line 140 of file PadTdsOfflineTool.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_idHelperSvc

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

Definition at line 139 of file PadTdsOfflineTool.h.

◆ m_isMC

Gaudi::Property<bool> NSWL1::PadTdsOfflineTool::m_isMC {this, "IsMC", true, "This is MC"}
private

Definition at line 143 of file PadTdsOfflineTool.h.

◆ m_rndmEngineName

Gaudi::Property<std::string> NSWL1::PadTdsOfflineTool::m_rndmEngineName {this, "RndmEngineName", "PadTdsOfflineTool", "Name of the random engine"}
private

Definition at line 144 of file PadTdsOfflineTool.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> NSWL1::PadTdsOfflineTool::m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Random number generator engine to use.

Definition at line 138 of file PadTdsOfflineTool.h.

◆ m_sTgcDigitContainer

SG::ReadHandleKey<sTgcDigitContainer> NSWL1::PadTdsOfflineTool::m_sTgcDigitContainer = {this,"sTGC_DigitContainerName","sTGC_DIGITS","the name of the sTGC digit container"}
private

Definition at line 157 of file PadTdsOfflineTool.h.

◆ m_sTgcSdoContainer

SG::ReadHandleKey<MuonSimDataCollection> NSWL1::PadTdsOfflineTool::m_sTgcSdoContainer = {this,"sTGC_SdoContainerName","sTGC_SDO","the name of the sTGC SDO container"}
private

Definition at line 158 of file PadTdsOfflineTool.h.

◆ m_timeJitter

Gaudi::Property<float> NSWL1::PadTdsOfflineTool::m_timeJitter {this, "TimeJitter", 2., "Time jitter"}
private

Definition at line 149 of file PadTdsOfflineTool.h.

◆ m_triggerCaptureWindow

Gaudi::Property<float> NSWL1::PadTdsOfflineTool::m_triggerCaptureWindow {this, "TriggerCaptureWindow", 30., "Time window for valid hit coincidences"}
private

Definition at line 148 of file PadTdsOfflineTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vmmDeadTime

Gaudi::Property<float> NSWL1::PadTdsOfflineTool::m_vmmDeadTime {this, "VMM_DeadTime", 50., "VMM chip dead time to produce another signal on the same channel"}
private

Definition at line 147 of file PadTdsOfflineTool.h.

◆ m_vmmShapingTime

Gaudi::Property<float> NSWL1::PadTdsOfflineTool::m_vmmShapingTime {this, "VMM_ShapingTime", 0., "Time from the leading edge of the signal and its peak"}
private

Definition at line 146 of file PadTdsOfflineTool.h.

◆ m_vmmTimeOverThreshold

Gaudi::Property<float> NSWL1::PadTdsOfflineTool::m_vmmTimeOverThreshold {this, "VMM_TimeOverThreshold", 0., "Time to form a digital signal"}
private

Definition at line 145 of file PadTdsOfflineTool.h.


The documentation for this class was generated from the following files:
NSWL1::PadTdsOfflineTool::sideLabel
static char sideLabel(const int &side)
Definition: PadTdsOfflineTool.h:108
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
NSWL1::PadTdsOfflineTool::m_applyTDS_TimeJitterSubtraction
Gaudi::Property< bool > m_applyTDS_TimeJitterSubtraction
Definition: PadTdsOfflineTool.h:152
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
NSWL1::PadTdsOfflineTool::numberOfSectors
static size_t numberOfSectors()
Definition: PadTdsOfflineTool.h:98
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
NSWL1::PadTdsOfflineTool::computeTimeJitter
double computeTimeJitter() const
extract the time jitter t subtract from the PAD hit time
Definition: PadTdsOfflineTool.cxx:186
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
NSWL1::PadTdsOfflineTool::lastSector
static size_t lastSector()
Definition: PadTdsOfflineTool.h:97
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:13
NSWL1::PAD_MAP
std::map< Identifier, std::vector< PadHits > > PAD_MAP
Definition: PadTdsOfflineTool.cxx:27
Muon::MuonStationIndex::stName
const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:104
skel.it
it
Definition: skel.GENtoEVGEN.py:407
python.SystemOfUnits.second
float second
Definition: SystemOfUnits.py:135
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
NSWL1::PadTdsOfflineTool::m_triggerCaptureWindow
Gaudi::Property< float > m_triggerCaptureWindow
Definition: PadTdsOfflineTool.h:148
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
NSWL1::PadTdsOfflineTool::firstSectorAside
static size_t firstSectorAside()
Definition: PadTdsOfflineTool.h:100
NSWL1::PadTdsOfflineTool::numberOfSectorsPerSide
static size_t numberOfSectorsPerSide()
Definition: PadTdsOfflineTool.h:99
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
NSWL1::PadTdsOfflineTool::cache_index
int cache_index(const sTgcDigit *digit) const
Definition: PadTdsOfflineTool.cxx:237
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
NSWL1::PadTdsOfflineTool::m_vmmShapingTime
Gaudi::Property< float > m_vmmShapingTime
Definition: PadTdsOfflineTool.h:146
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
NSWL1::PadTdsOfflineTool::fill_pad_cache
StatusCode fill_pad_cache(std::vector< std::vector< std::shared_ptr< PadData >> > &pad_cache) const
Apply the additional processing then fill the cache, locally.
Definition: PadTdsOfflineTool.cxx:125
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TRT::Hit::side
@ side
Definition: HitInfo.h:83
NSWL1::PadTdsOfflineTool::computeTof
double computeTof(const sTgcDigit *digit) const
compute the time of flight of particle giving the PAD hit
Definition: PadTdsOfflineTool.cxx:171
NSWL1::PadTdsOfflineTool::m_sTgcSdoContainer
SG::ReadHandleKey< MuonSimDataCollection > m_sTgcSdoContainer
Definition: PadTdsOfflineTool.h:158
sTgcDigit
Definition: sTgcDigit.h:20
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
NSWL1::PadTdsOfflineTool::m_vmmDeadTime
Gaudi::Property< float > m_vmmDeadTime
Definition: PadTdsOfflineTool.h:147
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
MuonSimData::deposits
void deposits(std::vector< Deposit > &deposits) const
Definition: MuonSimData.h:99
NSWL1::PadTdsOfflineTool::firstSector
static size_t firstSector()
Definition: PadTdsOfflineTool.h:96
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
lumiFormat.i
int i
Definition: lumiFormat.py:85
sTgcDigitCollection
Definition: sTgcDigitCollection.h:18
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
NSWL1::PadTdsOfflineTool::m_sTgcDigitContainer
SG::ReadHandleKey< sTgcDigitContainer > m_sTgcDigitContainer
Definition: PadTdsOfflineTool.h:157
NSWL1::PadTdsOfflineTool::m_isMC
Gaudi::Property< bool > m_isMC
Definition: PadTdsOfflineTool.h:143
MuonGM::sTgcReadoutElement
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/sTgcReadoutElement.h:30
MuonSimDataCollection
Definition: MuonSimDataCollection.h:21
NSWL1::PadTdsOfflineTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: PadTdsOfflineTool.h:139
NSWL1::PadTdsOfflineTool::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number generator engine to use.
Definition: PadTdsOfflineTool.h:138
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
NSWL1::PadTdsOfflineTool::sectorIndex
static size_t sectorIndex(const int &side, const int &sector)
internal index.
Definition: PadTdsOfflineTool.h:111
NSWL1::PAD_MAP_ITEM
std::pair< Identifier, std::vector< PadHits > > PAD_MAP_ITEM
Definition: PadTdsOfflineTool.cxx:29
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:79
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
NSWL1::PadTdsOfflineTool::m_applyTDS_TofSubtraction
Gaudi::Property< bool > m_applyTDS_TofSubtraction
Definition: PadTdsOfflineTool.h:151
padhit
Definition: MuonFeatureDetails_p2.h:16
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
NSWL1::PadTdsOfflineTool::m_timeJitter
Gaudi::Property< float > m_timeJitter
Definition: PadTdsOfflineTool.h:149
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
NSWL1::PadTdsOfflineTool::print_pad_cache
void print_pad_cache(std::vector< std::vector< std::shared_ptr< PadData >> > &pad_cache) const
Print all info stored in the pad cache.
Definition: PadTdsOfflineTool.cxx:365
MuonSimData
Definition: MuonSimData.h:62
item
Definition: ItemListSvc.h:43
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
NSWL1::PadTdsOfflineTool::lastSectorAside
static size_t lastSectorAside()
Definition: PadTdsOfflineTool.h:101
Muon::nsw::channel_type
channel_type
Definition: NSWDecodeHelper.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
NSWL1::PAD_MAP_IT
std::map< Identifier, std::vector< PadHits > >::iterator PAD_MAP_IT
Definition: PadTdsOfflineTool.cxx:28
h
lumiFormat.fill
fill
Definition: lumiFormat.py:104
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
NSWL1::PadTdsOfflineTool::lastSectorCside
static size_t lastSectorCside()
Definition: PadTdsOfflineTool.h:103
NSWL1::PadTdsOfflineTool::m_detManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detManagerKey
Definition: PadTdsOfflineTool.h:140
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
NSWL1::c_inverse
const double c_inverse
Definition: tdr_compat_enum.h:13
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
NSWL1::PadTdsOfflineTool::m_vmmTimeOverThreshold
Gaudi::Property< float > m_vmmTimeOverThreshold
Definition: PadTdsOfflineTool.h:145
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
Trk::PlaneSurface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
Definition: PlaneSurface.cxx:198
NSWL1::PadTdsOfflineTool::m_rndmEngineName
Gaudi::Property< std::string > m_rndmEngineName
Definition: PadTdsOfflineTool.h:144
NSWL1::PadTdsOfflineTool::store_pads
void store_pads(const std::vector< PadHits > &pad_hits, std::vector< std::vector< std::shared_ptr< PadData >> > &pad_cache) const
Store pad data in the cache.
Definition: PadTdsOfflineTool.cxx:315
NSWL1::PadTdsOfflineTool::is_pad_digit
bool is_pad_digit(const sTgcDigit *digit) const
Definition: PadTdsOfflineTool.cxx:232
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
NSWL1::PadTdsOfflineTool::firstSectorCside
static size_t firstSectorCside()
Definition: PadTdsOfflineTool.h:102
fitman.k
k
Definition: fitman.py:528
NSWL1::PadTdsOfflineTool::print_digit
void print_digit(const sTgcDigit *digit) const
Definition: PadTdsOfflineTool.cxx:331
Muon::MuonStationIndex::isSmall
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
Identifier
Definition: IdentifierFieldParser.cxx:14