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 ATLAS_NOT_THREAD_SAFE () override
 
virtual void handle (const Incident &inc) 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 > &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...
 
StatusCode fill_pad_validation_id ATLAS_NOT_THREAD_SAFE (std::vector< std::vector< std::shared_ptr< PadData >> > &pad_cache) const
 Fill the ntuple branch for the PadTdsOffline. 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 > &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< IIncidentSvc > m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
 Athena/Gaudi incident Service. More...
 
ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
 Random number generator engine to use. More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
const MuonGM::MuonDetectorManagerm_detManager
 MuonDetectorManager. More...
 
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< bool > m_doNtuple {this, "DoNtuple", false, "Input PadTds branches into the analysis ntuple"}
 
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"}
 
std::unique_ptr< PadTdsValidationTreem_validation_tree
 
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 83 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  m_detManager(0)
35  {
36  declareInterface<NSWL1::IPadTdsTool>(this);
37  }

◆ ~PadTdsOfflineTool()

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

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

virtual StatusCode initialize NSWL1::PadTdsOfflineTool::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

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

Fill the ntuple branch for the PadTdsOffline.

◆ cache_index()

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

Definition at line 333 of file PadTdsOfflineTool.cxx.

334  {
335  Identifier Id = digit->identify();
336  int stationEta = m_idHelperSvc->stgcIdHelper().stationEta(Id);
337  int stationPhi = m_idHelperSvc->stgcIdHelper().stationPhi(Id);
338  std::string stName = m_idHelperSvc->stgcIdHelper().stationNameString(m_idHelperSvc->stgcIdHelper().stationName(Id));
339  int isSmall = stName[2] == 'S';
340  int trigger_sector = (isSmall)? stationPhi*2-1 : stationPhi*2-2;
341  return (stationEta>0)? trigger_sector + 16 : trigger_sector;
342  }

◆ computeTimeJitter()

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

extract the time jitter t subtract from the PAD hit time

Definition at line 282 of file PadTdsOfflineTool.cxx.

282  {
283  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, m_rndmEngineName);
284  CLHEP::HepRandomEngine * engine = rngWrapper->getEngine(Gaudi::Hive::currentContext());
285  return CLHEP::RandGauss::shoot(engine, 0, m_timeJitter);
286  }

◆ computeTof()

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

compute the time of flight of particle giving the PAD hit

Definition at line 268 of file PadTdsOfflineTool.cxx.

268  {
269  Identifier Id = digit->identify();
271  Amg::Vector2D pad_lpos;
272  rdoEl->stripPosition(Id,pad_lpos);
273  Amg::Vector3D pad_gpos;
274  rdoEl->surface(Id).localToGlobal(pad_lpos, pad_gpos, pad_gpos);
275 
276  double distance = std::sqrt( pad_gpos.x()*pad_gpos.x() +
277  pad_gpos.y()*pad_gpos.y() +
278  pad_gpos.z()*pad_gpos.z() );
279  return distance * c_inverse;
280  }

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

◆ 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 346 of file PadTdsOfflineTool.cxx.

348  {
349  bool success = false;
350  if(!digit) return success;
351  if(!is_pad_digit(digit)) return success;
352  double arrival_time = digit->time();
353  delayed_time = arrival_time;
354  if(m_applyTDS_TofSubtraction) delayed_time -= computeTof(digit);
356  double capture_time = delayed_time + m_triggerCaptureWindow;
357  if((delayed_time>200 || delayed_time<-200) ||
358  (capture_time>200 || capture_time<-200) ){
359  ATH_MSG_WARNING("sTGC Pad hit "<<pad_hit_number<<" time outside of the range -200 ns / +200 ns,"
360  " skipping it!");
361  ATH_MSG_WARNING("sTGC Pad hit "<<pad_hit_number<<": delayed time ["<<delayed_time<<" ns]"
362  " capture time ["<<capture_time<<" ns]");
363  return success;
364  }
365  for (unsigned int i=0; i<16; i++) {
366  double bunch_start = i*25;
367  double bunch_stop = (i+1)*25;
368  double signal_start = delayed_time + 200;
369  double signal_stop = capture_time + 200;
370  if ((signal_start>=bunch_start && signal_start<bunch_stop) ||
371  (signal_stop>=bunch_start && signal_stop<bunch_stop) ){
372  BCtag = BCtag | (0x1<<i);
373  continue;
374  }
375  if(bunch_start>=signal_start && bunch_stop<signal_stop){
376  BCtag = BCtag | (0x1<<i);
377  }
378  }
379  std::string bctag = "";
380  uint16_t last_bit = 0x8000;
381  for(unsigned int i=0; i<16; i++) {
382  if(BCtag & (last_bit>>i)) bctag += "1";
383  else bctag += "0";
384  }
385  ATH_MSG_DEBUG("sTGC Pad hit " << pad_hit_number << ": arrival time [" << arrival_time << " ns]"
386  << " delayed time [" << delayed_time << " ns]"
387  << " capture time [" << capture_time << " ns]"
388  << " BC tag [" << bctag << "]" );
389  success = true;
390  return success;
391  }

◆ 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 223 of file PadTdsOfflineTool.cxx.

223  {
225  if(!digit_container.isValid()){
226  ATH_MSG_ERROR("could not retrieve the sTGC Digit container: cannot return the STRIP hits");
227  return StatusCode::FAILURE;
228  }
229 
230  sTgcDigitContainer::const_iterator it = digit_container->begin();
231  sTgcDigitContainer::const_iterator it_e = digit_container->end();
232  ATH_MSG_DEBUG("retrieved sTGC Digit Container with size "<<digit_container->digit_size());
233 
234  //int pad_hit_number = 0;
235  std::vector<PadHits> pad_hits;
236  uint16_t BC0 = 0, BCP1 = 1, BCP2 = 2, BCP3 = 3, BCP4 = 4, BCM1 = ~BCP1, BCM2 = ~BCP2, BCM3 = ~BCP3;
237  std::vector<uint16_t> bcWindow={BC0, BCP1, BCP2, BCP3, BCP4, BCM1, BCM2, BCM3};
238 
239  for(; it!=it_e; ++it) {
240  const sTgcDigitCollection* coll = *it;
241  ATH_MSG_DEBUG( "processing collection with size " << coll->size() );
242  for (unsigned int item=0; item<coll->size(); item++) {
243  const sTgcDigit* digit = coll->at(item);
244  if(digit) {
245  if(is_pad_digit(digit)) {
246  Identifier Id = digit->identify();
247  if (std::find(bcWindow.begin(), bcWindow.end(), digit->bcTag()) != bcWindow.end()){
249  //PadOfflineData* pad = new PadOfflineData(Id, digit->time(), digit->bcTag(), m_sTgcIdHelper);
250  //S.I
251  //std::shared_ptr<PadOfflineData> pad(new PadOfflineData(Id, digit->time(), digit->bcTag(), m_sTgcIdHelper));
252  auto pad=std::make_shared<PadOfflineData>(Id, digit->time(), digit->bcTag(), m_detManager);
253  //pad_hits.push_back(PadHits(Id, pad, cache_index(digit)));
254  pad_hits.emplace_back(Id, pad, cache_index(digit));//avoids extra copy
255  //S.I
256  }
257  }
258  }
259  } //for(item)
260  } // for(it)
261 
262  store_pads(pad_hits, pad_cache);
263  print_pad_cache(pad_cache);
264  ATH_MSG_DEBUG( "fill_pad_cache: end of processing" );
265  return StatusCode::SUCCESS;
266  }

◆ firstSector() [1/2]

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

Definition at line 103 of file PadTdsOfflineTool.h.

103 { return 0; }

◆ firstSector() [2/2]

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

Definition at line 111 of file PadTdsOfflineTool.h.

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

◆ firstSectorAside()

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

Definition at line 107 of file PadTdsOfflineTool.h.

107 { return 0; }

◆ firstSectorCside()

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

Definition at line 109 of file PadTdsOfflineTool.h.

109 { 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 157 of file PadTdsOfflineTool.cxx.

157  {
158  ATH_MSG_DEBUG( "gather_pad_data: start gathering the PAD hits for side " << side << ", sector " << sector );
159  // check side and sector parameters
160  if ( side <-1 || side >1 ) {
161  ATH_MSG_ERROR( "requested side " << side << " is out of range: [-1==All, 0==side C, 1==side A]");
162  return StatusCode::FAILURE;
163  }
164 
165  if ( sector <-1 || sector >15 ) {
166  ATH_MSG_ERROR( "requested sector " << sector << " is out of range: [-1==All, 0 - 15]");
167  return StatusCode::FAILURE;
168  }
169 
170  std::vector< std::vector<std::shared_ptr<PadData>> > pad_cache(PadTdsOfflineTool::numberOfSectors());
171  ATH_CHECK(fill_pad_cache(pad_cache));
172  if(m_doNtuple) {
173  // Ntuple can only be enabled in single-threaded mode (see initialize)
174  StatusCode sc ATLAS_THREAD_SAFE = this->fill_pad_validation_id(pad_cache);
175  ATH_CHECK( sc );
176  }
177 
178  // delivering the required collection
179  const bool anySide = (side==-1);
180  const bool anySector = (sector==-1);
181  if (anySide && anySector) {
182  //return the full set
183  ATH_MSG_DEBUG( "copying the full PAD hit set" );
185  std::vector<std::shared_ptr<PadData>>& pad_sec = pad_cache.at(i);
186  pads.insert( pads.end(), std::make_move_iterator(pad_sec.begin()), std::make_move_iterator(pad_sec.end()));
187  }
188  }
189  else if (anySector and not anySide) {
190  //return all the trigger sectors for the given side
191  ATH_MSG_DEBUG( "copying the PAD hit set of all trigger sector in side " << PadTdsOfflineTool::sideLabel(side) );
192  unsigned int start = PadTdsOfflineTool::firstSector(side);
193  unsigned int stop = PadTdsOfflineTool::lastSector(side);
194  for (size_t i=start; i<stop; i++) {
195  std::vector<std::shared_ptr<PadData>>& pad_sec = pad_cache.at(i);
196  pads.insert( pads.end(), std::make_move_iterator(pad_sec.begin()), std::make_move_iterator(pad_sec.end()));
197  }
198  }
199  else if (anySide and not anySector) {
200  // return the required trigger sectors
201  ATH_MSG_DEBUG( "copying the PAD hit set of all trigger sector " << sector << " in both side" );
202  size_t sectorA = sector+PadTdsOfflineTool::firstSectorAside();
203  std::vector<std::shared_ptr<PadData>>& pad_secA = pad_cache.at(sectorA);
204  pads.insert( pads.end(), std::make_move_iterator(pad_secA.begin()), std::make_move_iterator(pad_secA.end()));
205 
206  size_t sectorC = sector+PadTdsOfflineTool::firstSectorCside();
207  std::vector<std::shared_ptr<PadData>>& pad_secC = pad_cache.at(sectorC);
208  pads.insert( pads.end(), std::make_move_iterator(pad_secC.begin()), std::make_move_iterator(pad_secC.end()));
209  }
210  else {
211  // return the required trigger sector
212  ATH_MSG_DEBUG("copying the PAD hit set of all trigger sector "<<sector
213  <<" in side "<<PadTdsOfflineTool::sideLabel(side));
214  size_t sectorAorC = PadTdsOfflineTool::sectorIndex(side, sector);
215  std::vector<std::shared_ptr<PadData>>& pad_secAorC = pad_cache.at(sectorAorC);
216  pads.insert( pads.end(), std::make_move_iterator(pad_secAorC.begin()), std::make_move_iterator(pad_secAorC.end()));
217  }
218  ATH_MSG_DEBUG( "delivered n. " << pads.size() << " PAD hits." );
219  pad_cache.clear();
220  return StatusCode::SUCCESS;
221  }

◆ 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 393 of file PadTdsOfflineTool.cxx.

394  {
395  bool success=false;
396  const MuonSimDataCollection* ptrMuonSimDataCollection = nullptr;
397  if(m_isMC) {
399  if(!sdo_container.isValid()) {
400  ATH_MSG_WARNING("could not retrieve the sTGC SDO container: it will not be possible to associate the MC truth");
401  return success;
402  }
403  ptrMuonSimDataCollection = sdo_container.cptr();
404  const MuonSimData pad_sdo = (ptrMuonSimDataCollection->find(pad_id))->second;
405  pad_sdo.deposits(deposits);
406  success = true;
407  }
408  return success;
409  }

◆ handle()

void NSWL1::PadTdsOfflineTool::handle ( const Incident &  inc)
overridevirtual

Definition at line 91 of file PadTdsOfflineTool.cxx.

91  {
92  if( inc.type()==IncidentType::BeginEvent ) {
93  if( m_doNtuple ) {
94  // Ntuple can only be enabled in single-threaded mode (see initialize)
95  [[maybe_unused]] bool success ATLAS_THREAD_SAFE = m_validation_tree->reset_ntuple_variables();
96  }
97  }
98  }

◆ 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 328 of file PadTdsOfflineTool.cxx.

329  {
330  return (digit && m_idHelperSvc->stgcIdHelper().channelType(digit->identify())==0);
331  }

◆ lastSector() [1/2]

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

Definition at line 104 of file PadTdsOfflineTool.h.

104 { return 31; }

◆ lastSector() [2/2]

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

Definition at line 113 of file PadTdsOfflineTool.h.

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

◆ lastSectorAside()

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

Definition at line 108 of file PadTdsOfflineTool.h.

108 { return 15; }

◆ lastSectorCside()

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

Definition at line 110 of file PadTdsOfflineTool.h.

110 { 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 105 of file PadTdsOfflineTool.h.

105 { return 32; }

◆ numberOfSectorsPerSide()

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

Definition at line 106 of file PadTdsOfflineTool.h.

106 { 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 427 of file PadTdsOfflineTool.cxx.

428  {
429  if(!is_pad_digit(digit)) return;
430  Identifier Id = digit->identify();
431  std::string stName = m_idHelperSvc->stgcIdHelper().stationNameString(m_idHelperSvc->stgcIdHelper().stationName(Id));
432  int stationEta = m_idHelperSvc->stgcIdHelper().stationEta(Id);
433  int stationPhi = m_idHelperSvc->stgcIdHelper().stationPhi(Id);
434  int multiplet = m_idHelperSvc->stgcIdHelper().multilayer(Id);
435  int gas_gap = m_idHelperSvc->stgcIdHelper().gasGap(Id);
436  int channel_type = m_idHelperSvc->stgcIdHelper().channelType(Id);
437  int channel = m_idHelperSvc->stgcIdHelper().channel(Id);
438  int pad_eta = m_idHelperSvc->stgcIdHelper().padEta(Id);
439  int pad_phi = m_idHelperSvc->stgcIdHelper().padPhi(Id);
440 
441  ATH_MSG_DEBUG("sTGC Pad hit:"
442  <<" cache index ["<<cache_index(digit)<<"]"
443  <<" Station Name [" <<stName <<"]"
444  <<" Station Eta [" <<stationEta <<"]"
445  <<" Station Phi [" <<stationPhi <<"]"
446  <<" Multiplet [" <<multiplet <<"]"
447  <<" GasGap [" <<gas_gap <<"]"
448  <<" Type [" <<channel_type <<"]"
449  <<" ChNr [" <<channel <<"]"
450  <<" Pad Eta [" <<pad_eta <<"]"
451  <<" Pad Phi [" <<pad_phi <<"]"
452  <<" BCTag [" <<digit->bcTag() <<"]"
453  <<" Id Hash [" <<Id <<"]");
454  }

◆ 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 461 of file PadTdsOfflineTool.cxx.

462  {
463  for (const std::vector<std::shared_ptr<PadData>>& pad : pad_cache) {
464  for (const auto &padhit : pad)
465  ATH_MSG_DEBUG("PAD hit cache: hit at side " << ( (padhit->sideId())? "A":"C")
466  << ", trigger sector " << padhit->sectorId()
467  << ", module " << padhit->moduleId()
468  << ", multiplet " << padhit->multipletId()
469  << ", gas gap " << padhit->gasGapId()
470  << ", pad eta " << padhit->padEtaId()
471  << ", pad phi " << padhit->padPhiId());
472  }
473  }

◆ 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 456 of file PadTdsOfflineTool.cxx.

457  {
458  for (const auto &hit : pad_hits) ATH_MSG_DEBUG("pad hit has time "<< hit.t_pad->time());
459  }

◆ 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 118 of file PadTdsOfflineTool.h.

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

◆ sideLabel()

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

Definition at line 115 of file PadTdsOfflineTool.h.

116  { 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 288 of file PadTdsOfflineTool.cxx.

288  {
289 
290  // create a channel map and fill it
291  PAD_MAP channel_map;
292  for (unsigned int i=0; i<h.size(); i++) {
293  Identifier pad_id = h[i].t_id;
294  PAD_MAP_IT it = channel_map.find( pad_id );
295  if ( it!=channel_map.end() ) {
296  (*it).second.push_back(h[i]);
297  } else {
298  std::vector<PadHits> tmp;
299  tmp.push_back(h[i]);
300  channel_map.insert( PAD_MAP_ITEM(pad_id,tmp) );
301  }
302  }
303 
304  // vector are already ordered in time so check for dead time overlap.
305  PAD_MAP_IT it = channel_map.begin();
306  while ( it!=channel_map.end() ) {
307  std::vector<PadHits>& hits = (*it).second;
308  std::vector<PadHits>::iterator p_next = hits.begin();
310  while ( p_next!=hits.end() ) {
311  if (std::fabs((*p_next).t_pad->time()-(*p).t_pad->time())<=m_vmmDeadTime){
312  p_next = hits.erase(p_next);
313  }else{
314  p=p_next++;
315  }
316  }
317  }
318  //once cleared the overlapping PAD hits, refill the PAD hit vector
319  h.clear();
320  it = channel_map.begin();
321  while ( it!=channel_map.end() ) {
322  std::vector<PadHits> hits = (*it).second;
323  h.insert(h.end(),hits.begin(),hits.end());
324  ++it;
325  }
326  }

◆ 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 411 of file PadTdsOfflineTool.cxx.

412  {
413  for (unsigned int i=0; i<pad_hits.size(); i++) {
414  const std::vector<std::shared_ptr<PadData>>& pads = pad_cache.at(pad_hits[i].t_cache_index);
415  bool fill = pads.empty();
416  for(unsigned int p=0; p<pads.size(); p++) {
417  Identifier Id(pads.at(p)->id());
418  if(Id==pad_hits[i].t_id) {
419  fill = false;
420  ATH_MSG_WARNING( "Pad Hits entered multiple times Discarding!!! Id:" << Id );
421  } else fill = true;
422  }
423  if( fill ) pad_cache.at(pad_hits[i].t_cache_index).push_back(pad_hits[i].t_pad);
424  }
425  }

◆ 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 162 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 161 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 165 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 164 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 163 of file PadTdsOfflineTool.h.

◆ m_detManager

const MuonGM::MuonDetectorManager* NSWL1::PadTdsOfflineTool::m_detManager
private

MuonDetectorManager.

Definition at line 149 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_doNtuple

Gaudi::Property<bool> NSWL1::PadTdsOfflineTool::m_doNtuple {this, "DoNtuple", false, "Input PadTds branches into the analysis ntuple"}
private

Definition at line 154 of file PadTdsOfflineTool.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 148 of file PadTdsOfflineTool.h.

◆ m_incidentSvc

ServiceHandle<IIncidentSvc> NSWL1::PadTdsOfflineTool::m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
private

Athena/Gaudi incident Service.

Definition at line 146 of file PadTdsOfflineTool.h.

◆ m_isMC

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

Definition at line 152 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 153 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 147 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 168 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 169 of file PadTdsOfflineTool.h.

◆ m_timeJitter

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

Definition at line 159 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 158 of file PadTdsOfflineTool.h.

◆ m_validation_tree

std::unique_ptr<PadTdsValidationTree> NSWL1::PadTdsOfflineTool::m_validation_tree
private

Definition at line 167 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 157 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 156 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 155 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:115
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:158
NSWL1::PadTdsOfflineTool::m_applyTDS_TimeJitterSubtraction
Gaudi::Property< bool > m_applyTDS_TimeJitterSubtraction
Definition: PadTdsOfflineTool.h:162
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
NSWL1::PadTdsOfflineTool::numberOfSectors
static size_t numberOfSectors()
Definition: PadTdsOfflineTool.h:105
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
NSWL1::PadTdsOfflineTool::m_validation_tree
std::unique_ptr< PadTdsValidationTree > m_validation_tree
Definition: PadTdsOfflineTool.h:167
NSWL1::PadTdsOfflineTool::m_doNtuple
Gaudi::Property< bool > m_doNtuple
Definition: PadTdsOfflineTool.h:154
NSWL1::PadTdsOfflineTool::computeTimeJitter
double computeTimeJitter() const
extract the time jitter t subtract from the PAD hit time
Definition: PadTdsOfflineTool.cxx:282
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
NSWL1::PadTdsOfflineTool::lastSector
static size_t lastSector()
Definition: PadTdsOfflineTool.h:104
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
NSWL1::PAD_MAP
std::map< Identifier, std::vector< PadHits > > PAD_MAP
Definition: PadTdsOfflineTool.cxx:27
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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:158
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:107
NSWL1::PadTdsOfflineTool::numberOfSectorsPerSide
static size_t numberOfSectorsPerSide()
Definition: PadTdsOfflineTool.h:106
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
NSWL1::PadTdsOfflineTool::cache_index
int cache_index(const sTgcDigit *digit) const
Definition: PadTdsOfflineTool.cxx:333
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
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:223
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
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:268
NSWL1::PadTdsOfflineTool::m_sTgcSdoContainer
SG::ReadHandleKey< MuonSimDataCollection > m_sTgcSdoContainer
Definition: PadTdsOfflineTool.h:169
sTgcDigit
Definition: sTgcDigit.h:20
NSWL1::PadTdsOfflineTool::m_vmmDeadTime
Gaudi::Property< float > m_vmmDeadTime
Definition: PadTdsOfflineTool.h:157
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
MuonSimData::deposits
void deposits(std::vector< Deposit > &deposits) const
Definition: MuonSimData.h:99
NSWL1::PadTdsOfflineTool::firstSector
static size_t firstSector()
Definition: PadTdsOfflineTool.h:103
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:88
lumiFormat.i
int i
Definition: lumiFormat.py:85
sTgcDigitCollection
Definition: sTgcDigitCollection.h:18
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
NSWL1::PadTdsOfflineTool::m_sTgcDigitContainer
SG::ReadHandleKey< sTgcDigitContainer > m_sTgcDigitContainer
Definition: PadTdsOfflineTool.h:168
NSWL1::PadTdsOfflineTool::m_isMC
Gaudi::Property< bool > m_isMC
Definition: PadTdsOfflineTool.h:152
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:148
NSWL1::PadTdsOfflineTool::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number generator engine to use.
Definition: PadTdsOfflineTool.h:147
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:118
NSWL1::PAD_MAP_ITEM
std::pair< Identifier, std::vector< PadHits > > PAD_MAP_ITEM
Definition: PadTdsOfflineTool.cxx:29
NSWL1::PadTdsOfflineTool::m_detManager
const MuonGM::MuonDetectorManager * m_detManager
MuonDetectorManager.
Definition: PadTdsOfflineTool.h:149
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
NSWL1::PadTdsOfflineTool::m_applyTDS_TofSubtraction
Gaudi::Property< bool > m_applyTDS_TofSubtraction
Definition: PadTdsOfflineTool.h:161
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:221
NSWL1::PadTdsOfflineTool::m_timeJitter
Gaudi::Property< float > m_timeJitter
Definition: PadTdsOfflineTool.h:159
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
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:461
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:108
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
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
NSWL1::PadTdsOfflineTool::lastSectorCside
static size_t lastSectorCside()
Definition: PadTdsOfflineTool.h:110
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
NSWL1::c_inverse
const double c_inverse
Definition: tdr_compat_enum.h:13
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
MuonGM::MuonDetectorManager::getsTgcReadoutElement
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:259
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:156
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:204
NSWL1::PadTdsOfflineTool::m_rndmEngineName
Gaudi::Property< std::string > m_rndmEngineName
Definition: PadTdsOfflineTool.h:153
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:411
NSWL1::PadTdsOfflineTool::is_pad_digit
bool is_pad_digit(const sTgcDigit *digit) const
Definition: PadTdsOfflineTool.cxx:328
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.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
NSWL1::PadTdsOfflineTool::firstSectorCside
static size_t firstSectorCside()
Definition: PadTdsOfflineTool.h:109
fitman.k
k
Definition: fitman.py:528
NSWL1::PadTdsOfflineTool::print_digit
void print_digit(const sTgcDigit *digit) const
Definition: PadTdsOfflineTool.cxx:427
Identifier
Definition: IdentifierFieldParser.cxx:14