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

#include <TRTMonitoringRun3RAW_Alg.h>

Inheritance diagram for TRTMonitoringRun3RAW_Alg:
Collaboration diagram for TRTMonitoringRun3RAW_Alg:

Public Types

enum  Environment_t {
  Environment_t::user = 0, Environment_t::online, Environment_t::tier0, Environment_t::tier0Raw,
  Environment_t::tier0ESD, Environment_t::AOD, Environment_t::altprod
}
 Specifies the processing environment. More...
 
enum  DataType_t {
  DataType_t::userDefined = 0, DataType_t::monteCarlo, DataType_t::collisions, DataType_t::cosmics,
  DataType_t::heavyIonCollisions
}
 Specifies what type of input data is being monitored. More...
 

Public Member Functions

 TRTMonitoringRun3RAW_Alg (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~TRTMonitoringRun3RAW_Alg ()
 
virtual StatusCode initialize () override
 initialize More...
 
virtual StatusCode fillHistograms (const EventContext &ctx) const override
 adds event to the monitoring histograms More...
 
virtual StatusCode execute (const EventContext &ctx) const override
 Applies filters and trigger requirements. More...
 
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
 Fills a vector of variables to a group by reference. More...
 
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &variables) const
 Fills a vector of variables to a group by reference. More...
 
template<typename... T>
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, T &&... variables) const
 Fills a variadic list of variables to a group by reference. More...
 
void fill (const std::string &groupName, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
 Fills a vector of variables to a group by name. More...
 
void fill (const std::string &groupName, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &variables) const
 Fills a vector of variables to a group by name. More...
 
template<typename... T>
void fill (const std::string &groupName, T &&... variables) const
 Fills a variadic list of variables to a group by name. More...
 
Environment_t environment () const
 Accessor functions for the environment. More...
 
Environment_t envStringToEnum (const std::string &str) const
 Convert the environment string from the python configuration to an enum object. More...
 
DataType_t dataType () const
 Accessor functions for the data type. More...
 
DataType_t dataTypeStringToEnum (const std::string &str) const
 Convert the data type string from the python configuration to an enum object. More...
 
const ToolHandle< GenericMonitoringTool > & getGroup (const std::string &name) const
 Get a specific monitoring tool from the tool handle array. More...
 
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool () const
 Get the trigger decision tool member. More...
 
bool trigChainsArePassed (const std::vector< std::string > &vTrigNames) const
 Check whether triggers are passed. More...
 
SG::ReadHandle< xAOD::EventInfoGetEventInfo (const EventContext &) const
 Return a ReadHandle for an EventInfo object (get run/event numbers, etc.) More...
 
virtual float lbAverageInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average mu, i.e. More...
 
virtual float lbInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate instantaneous number of interactions, i.e. More...
 
virtual float lbAverageLuminosity (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1). More...
 
virtual float lbLuminosityPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the instantaneous luminosity per bunch crossing. More...
 
virtual double lbDuration (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the duration of the luminosity block (in seconds) More...
 
virtual float lbAverageLivefraction (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average luminosity livefraction. More...
 
virtual float livefractionPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the live fraction per bunch crossing ID. More...
 
virtual double lbLumiWeight (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average integrated luminosity multiplied by the live fraction. More...
 
virtual StatusCode parseList (const std::string &line, std::vector< std::string > &result) const
 Parse a string into a vector. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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
 

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

Protected Attributes

ToolHandleArray< GenericMonitoringToolm_tools {this,"GMTools",{}}
 Array of Generic Monitoring Tools. More...
 
PublicToolHandle< Trig::TrigDecisionToolm_trigDecTool {this, "TrigDecisionTool",""}
 Tool to tell whether a specific trigger is passed. More...
 
ToolHandleArray< IDQFilterToolm_DQFilterTools {this,"FilterTools",{}}
 Array of Data Quality filter tools. More...
 
SG::ReadCondHandleKey< LuminosityCondDatam_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
 
SG::ReadCondHandleKey< LBDurationCondDatam_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
 
SG::ReadCondHandleKey< TrigLiveFractionCondDatam_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
 
AthMonitorAlgorithm::Environment_t m_environment
 Instance of the Environment_t enum. More...
 
AthMonitorAlgorithm::DataType_t m_dataType
 Instance of the DataType_t enum. More...
 
Gaudi::Property< std::string > m_environmentStr {this,"Environment","user"}
 Environment string pulled from the job option and converted to enum. More...
 
Gaudi::Property< std::string > m_dataTypeStr {this,"DataType","userDefined"}
 DataType string pulled from the job option and converted to enum. More...
 
Gaudi::Property< std::string > m_triggerChainString {this,"TriggerChain",""}
 Trigger chain string pulled from the job option and parsed into a vector. More...
 
std::vector< std::string > m_vTrigChainNames
 Vector of trigger chain names parsed from trigger chain string. More...
 
Gaudi::Property< std::string > m_fileKey {this,"FileKey",""}
 Internal Athena name for file. More...
 
Gaudi::Property< bool > m_useLumi {this,"EnableLumi",false}
 Allows use of various luminosity functions. More...
 
Gaudi::Property< float > m_defaultLBDuration {this,"DefaultLBDuration",60.}
 Default duration of one lumi block. More...
 
Gaudi::Property< int > m_detailLevel {this,"DetailLevel",0}
 Sets the level of detail used in the monitoring. More...
 
SG::ReadHandleKey< xAOD::EventInfom_EventInfoKey {this,"EventInfoKey","EventInfo"}
 Key for retrieving EventInfo from StoreGate. More...
 

Private Types

enum  GasType { Xe = 0, Ar = 1, Kr = 2 }
 
typedef std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode fillTRTRDOs (const EventContext &ctx, const TRT_RDO_Container &rdoContainer, const xAOD::EventInfo &eventInfo, const InDetTimeCollection *trtBCIDCollection) const
 
StatusCode fillTRTEfficiency (const EventContext &ctx, const TrackCollection &combTrackCollection) const
 
StatusCode fillTRTHits (const EventContext &ctx, const TrackCollection &trackCollection) const
 
int chipToBoard (int chip) const
 
int chipToBoard_EndCap (int chip) const
 
StatusCode checkTRTReadoutIntegrity (const xAOD::EventInfo &eventInfo) const
 
std::vector< std::vector< std::vector< int > > > initScaleVectors (const EventContext &ctx) const
 
bool checkEventBurst (const TRT_RDO_Container &rdoContainer) const
 
int strawNumberEndCap (int strawNumber, int strawLayerNumber, int LayerNumber, int phi_stack, int side) const
 
int strawNumber (int strawNumber, int strawlayerNumber, int LayerNumber) const
 
int strawLayerNumber (int strawLayerNumber, int LayerNumber) const
 
float radToDegrees (float radValue) const
 
int strawNumber_reverse (int inp_strawnumber, int *strawNumber, int *strawlayerNumber, int *LayerNumber) const
 
int strawLayerNumber_reverse (int strawLayerNumInp, int *strawLayerNumber, int *LayerNumber) const
 
GasType Straw_Gastype (int stat) const
 
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

const AtlasDetectorIDm_idHelper {}
 
const TRT_IDm_pTRTHelper {}
 
const InDetDD::TRT_DetectorManagerm_mgr {}
 
std::vector< std::vector< unsigned char > > m_mat_chip_E {64, std::vector<unsigned char>(3840)}
 
std::vector< std::vector< unsigned char > > m_mat_chip_B {64, std::vector<unsigned char>(1642)}
 
BooleanProperty m_doStraws {this, "doStraws", true, ""}
 
BooleanProperty m_doExpert {this, "doExpert", false, ""}
 
BooleanProperty m_doChips {this, "doChips", true, ""}
 
BooleanProperty m_doTracksMon {this, "doTracksMon", true, ""}
 
BooleanProperty m_doRDOsMon {this, "doRDOsMon", true, ""}
 
BooleanProperty m_doShift {this, "doShift", true, ""}
 
BooleanProperty m_doMaskStraws {this, "doMaskStraws", true, ""}
 
BooleanProperty m_useHoleFinder {this, "useHoleFinder", false, ""}
 
BooleanProperty m_doHitsMon {this, "DoHitsMon", true, ""}
 
FloatProperty m_DistToStraw {this, "DistanceToStraw", 0.4, ""}
 
FloatProperty m_usedEvents {this, "totalEvents", -1, ""}
 
BooleanProperty m_ArgonXenonSplitter {this, "doArgonXenonSeparation", true}
 
FloatProperty m_longToTCut {this, "LongToTCut", 9.375}
 
Gaudi::Property< std::vector< int > > m_strawMax {this,"strawMax", {-1, -1}}
 
Gaudi::Property< std::vector< int > > m_iChipMax {this,"iChipMax", {-1, -1}}
 
IntegerProperty m_min_si_hits {this, "min_si_hits", 1, ""}
 
IntegerProperty m_min_pixel_hits {this, "min_pixel_hits", 0, ""}
 
IntegerProperty m_min_sct_hits {this, "min_sct_hits", 0, ""}
 
IntegerProperty m_min_trt_hits {this, "min_trt_hits", 10, ""}
 
IntegerProperty m_minTRThits {this, "MinTRTHitCut", 10, ""}
 
IntegerProperty m_every_xth_track {this, "every_xth_track", 1, ""}
 
FloatProperty m_max_abs_d0 {this, "max_abs_d0", 10 * CLHEP::mm, ""}
 
FloatProperty m_max_abs_z0 {this, "max_abs_z0", 300 * CLHEP::mm, ""}
 
FloatProperty m_max_abs_eta {this, "max_abs_eta", 2.5, ""}
 
FloatProperty m_minP {this, "MinTrackP", 0.0 * CLHEP::GeV, ""}
 
FloatProperty m_min_pT {this, "min_pT", 0.5 * CLHEP::GeV, ""}
 
ToolHandle< ITRT_StrawStatusSummaryToolm_sumTool {this, "InDetTRTStrawStatusSummaryTool", "TRT_StrawStatusSummaryTool", ""}
 
ServiceHandle< ITRT_StrawNeighbourSvcm_TRTStrawNeighbourSvc {this, "StrawNeighbourSvc", "TRT_StrawNeighbourSvc", ""}
 
ServiceHandle< ITRT_ByteStream_ConditionsSvcm_BSSvc {this, "TRT_ByteStream_ConditionsSvc", "TRT_ByteStream_ConditionsSvc", ""}
 
ToolHandle< InDet::IInDetTrackSelectionToolm_trackSelTool {this, "TrackSelectionTool", "InDet::InDetTrackSelectionTool/TrackSelectionTool", ""}
 
SG::ReadHandleKey< TRT_RDO_Containerm_rdoContainerKey {this, "TRTRawDataObjectName", "TRT_RDOs", "Name of TRT RDOs container"}
 
SG::ReadHandleKey< InDetTimeCollectionm_TRT_BCIDCollectionKey {this, "TRTBCIDCollectionName", "TRT_BCID", "Name of TRT BCID collection"}
 
SG::ReadHandleKey< TrackCollectionm_combTrackCollectionKey {this, "track_collection_hole_finder", "CombinedInDetTracks", "Name of tracks container used for hole finder"}
 
SG::ReadHandleKey< TrackCollectionm_trackCollectionKey {this, "TRTTracksObjectName", "CombinedInDetTracks", "Name of tracks container"}
 
SG::ReadHandleKey< TRT_BSErrContainerm_bsErrContKey {this,"ByteStreamErrors","TRT_ByteStreamErrs","SG key of TRT ByteStream Error container"}
 
ToolHandle< Trk::ITrackHoleSearchToolm_trt_hole_finder {this, "trt_hole_search", "TRTTrackHoleSearchTool", "Track hole search tool name"}
 
ToolHandle< Trk::ITrackSummaryToolm_TrackSummaryTool {this, "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool name"}
 
BooleanProperty m_isCosmics {this, "IsCosmics", false}
 
IntegerProperty m_EventBurstCut {this, "EventBurstCut", -1}
 
std::string m_name
 
std::unordered_map< std::string, size_t > m_toolLookupMap
 
const ToolHandle< GenericMonitoringToolm_dummy
 
Gaudi::Property< bool > m_enforceExpressTriggers
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
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
 

Static Private Attributes

static const int s_Straw_max [2] = {1642, 3840}
 
static const int s_iChip_max [2] = {104, 240}
 
static const int s_numberOfBarrelStacks = 32
 
static const int s_numberOfEndCapStacks = 32
 

Detailed Description

Definition at line 50 of file TRTMonitoringRun3RAW_Alg.h.

Member Typedef Documentation

◆ MonVarVec_t

typedef std::vector<std::reference_wrapper<Monitored::IMonitoredVariable> > AthMonitorAlgorithm::MonVarVec_t
privateinherited

Definition at line 365 of file AthMonitorAlgorithm.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ DataType_t

enum AthMonitorAlgorithm::DataType_t
stronginherited

Specifies what type of input data is being monitored.

An enumeration of the different types of data the monitoring application may be running over. This can be used to select which histograms to produce, e.g. to prevent the production of colliding-beam histograms when running on cosmic-ray data. Strings of the same names may be given as jobOptions.

Enumerator
userDefined 
monteCarlo 
collisions 
cosmics 
heavyIonCollisions 

Definition at line 191 of file AthMonitorAlgorithm.h.

191  {
192  userDefined = 0,
193  monteCarlo,
194  collisions,
195  cosmics,
196  heavyIonCollisions,
197  };

◆ Environment_t

enum AthMonitorAlgorithm::Environment_t
stronginherited

Specifies the processing environment.

The running environment may be used to select which histograms are produced, and where they are located in the output. For example, the output paths of the histograms are different for the "user", "online" and the various offline flags. Strings of the same names may be given as jobOptions.

Enumerator
user 
online 
tier0 
tier0Raw 
tier0ESD 
AOD 
altprod 

Definition at line 172 of file AthMonitorAlgorithm.h.

172  {
173  user = 0,
174  online,
175  tier0,
176  tier0Raw,
177  tier0ESD,
178  AOD,
179  altprod,
180  };

◆ GasType

Enumerator
Xe 
Ar 
Kr 

Definition at line 141 of file TRTMonitoringRun3RAW_Alg.h.

141 { Xe = 0, Ar = 1, Kr = 2 };

Constructor & Destructor Documentation

◆ TRTMonitoringRun3RAW_Alg()

TRTMonitoringRun3RAW_Alg::TRTMonitoringRun3RAW_Alg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 47 of file TRTMonitoringRun3RAW_Alg.cxx.

48 :AthMonitorAlgorithm(name,pSvcLocator)
49 {
50 }

◆ ~TRTMonitoringRun3RAW_Alg()

TRTMonitoringRun3RAW_Alg::~TRTMonitoringRun3RAW_Alg ( )
virtual

Definition at line 52 of file TRTMonitoringRun3RAW_Alg.cxx.

52 {}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ checkEventBurst()

bool TRTMonitoringRun3RAW_Alg::checkEventBurst ( const TRT_RDO_Container rdoContainer) const
private

Definition at line 400 of file TRTMonitoringRun3RAW_Alg.cxx.

400  {
401 //----------------------------------------------------------------------------------//
402  if (m_EventBurstCut <= 0) return true;
403 
404  int nHLHits = 0;
405  TRT_RDO_Container::const_iterator RDO_CollectionBegin = rdoContainer.begin();
406  TRT_RDO_Container::const_iterator RDO_CollectionEnd = rdoContainer.end();
407 
408  for (; RDO_CollectionBegin != RDO_CollectionEnd; ++RDO_CollectionBegin) {
409  const InDetRawDataCollection<TRT_RDORawData> *TRT_Collection(*RDO_CollectionBegin);
410 
411  if (!TRT_Collection) continue;
412  else {
413  DataVector<TRT_RDORawData>::const_iterator p_rdo = TRT_Collection->begin();
414 
415  for (; p_rdo != TRT_Collection->end(); ++p_rdo) {
416  const TRT_LoLumRawData *p_lolum = dynamic_cast<const TRT_LoLumRawData *>(*p_rdo);
417 
418  if (!p_lolum) continue;
419 
420  if (p_lolum->highLevel()) nHLHits++;
421  }
422  }
423  }
424 
425  if (nHLHits > m_EventBurstCut) return false;
426  else return true;
427 }

◆ checkTRTReadoutIntegrity()

StatusCode TRTMonitoringRun3RAW_Alg::checkTRTReadoutIntegrity ( const xAOD::EventInfo eventInfo) const
private

Definition at line 256 of file TRTMonitoringRun3RAW_Alg.cxx.

256  {
257 //-------------------------------------------------------------------------------------------------//
258  StatusCode sc = StatusCode::SUCCESS;
259 
260  auto ChipBSErrorsVsLB_x = Monitored::Scalar<float>("ChipBSErrorsVsLB_x", 0.0);
261  auto ChipBSErrorsVsLB_y = Monitored::Scalar<float>("ChipBSErrorsVsLB_y", 0.0);
262  auto RobBSErrorsVsLB_x = Monitored::Scalar<float>("RobBSErrorsVsLB_x", 0.0);
263  auto RobBSErrorsVsLB_y = Monitored::Scalar<float>("RobBSErrorsVsLB_y", 0.0);
264 
265  const TRT_BSErrContainer emptyErrCont;//Empty dummy instance for MC
266  const TRT_BSErrContainer* bsErrCont=&emptyErrCont;
267 
268  if (!m_bsErrContKey.empty()) {
269  //Regular real-data case, get the byte-stream errors from SG
271  bsErrCont=bsErrContHdl.cptr();
272  }
273  else {
274  ATH_MSG_DEBUG("MC case, using dummy TRT_BSErrContainer");
275  }
276 
277  const unsigned int lumiBlock = eventInfo.lumiBlock();
278  ATH_MSG_VERBOSE("This is lumiblock : " << lumiBlock);
279 
280  //if ((int)lumiBlock != m_lastLumiBlock) {
281  // m_lastLumiBlock = lumiBlock;
282  //}
283 
284  //Get BSConversion errors
285  const std::set<std::pair<uint32_t, uint32_t> > &L1IDErrorSet = bsErrCont->getL1ErrorSet();
286  const std::set<std::pair<uint32_t, uint32_t> > &BCIDErrorSet = bsErrCont->getBCIDErrorSet();
287  const std::set<uint32_t> &MissingErrorSet = bsErrCont->getMissingErrorSet();
288  const std::set<uint32_t> &SidErrorSet = bsErrCont->getSidErrorSet();
289  const std::set<std::pair<uint32_t, uint32_t> > &RobStatusErrorSet = bsErrCont->getRobErrorSet();
290 
291  const unsigned int rod_id_base[2][2] = { { 0x310000, 0x320000 }, { 0x330000, 0x340000 } };
292  const unsigned int nChipsTotal[2][2] = { { 3328, 3328 }, { 7680, 7680 } };
293  const unsigned int nRobsTotal[2][2] = { { 32, 32 }, { 64, 64 } };
294  float nBSErrors[2][2] = { { 0, 0 }, { 0, 0 } };
295  float nRobErrors[2][2] = { { 0, 0 }, { 0, 0 } };
296 
297  const std::set<std::pair<uint32_t, uint32_t> > *errorset1[2] = { &BCIDErrorSet, &L1IDErrorSet };
298 
299  for (int iset = 0; iset < 2; ++iset) {
300  for (auto setIt = errorset1[iset]->begin(); setIt != errorset1[iset]->end(); ++setIt) {
301  for (int ibe = 0; ibe < 2; ++ibe) {
302  for (int iside = 0; iside < 2; ++iside) {
303  if (((setIt->first >> 8) & 0xFF0000) == rod_id_base[ibe][iside]) {
304  nBSErrors[ibe][iside] += 1. / nChipsTotal[ibe][iside];
305  }
306  }
307  }
308  }
309  }
310 
311  const std::set<uint32_t> *errorset2[2] = { &MissingErrorSet, &SidErrorSet };
312 
313  for (int iset = 0; iset < 2; ++iset) {
314  for (auto setIt = errorset2[iset]->begin(); setIt != errorset2[iset]->end(); ++setIt) {
315  for (int ibe = 0; ibe < 2; ++ibe) {
316  for (int iside = 0; iside < 2; ++iside) {
317  if (((*setIt >> 8) & 0xFF0000) == rod_id_base[ibe][iside]) {
318  nBSErrors[ibe][iside] += 1. / nChipsTotal[ibe][iside];
319  }
320  }
321  }
322  }
323  }
324 
325  for (int ibe = 0; ibe < 2; ++ibe) {
326  for (int iside = 0; iside < 2; ++iside) {
327  ChipBSErrorsVsLB_x = lumiBlock;
328  ChipBSErrorsVsLB_y = nBSErrors[ibe][iside];
329  for (unsigned int i = 0; i < lumiBlock; i++) // we need this so the LastBinThreshold algorithm can find the last bin
330  fill("RDOShiftSmryRebinnedHistograms"+std::to_string(ibe)+std::to_string(iside), ChipBSErrorsVsLB_x, ChipBSErrorsVsLB_y);
331  }
332  }
333 
334  for (auto setIt = RobStatusErrorSet.begin(); setIt != RobStatusErrorSet.end(); ++setIt) {
335  for (int ibe = 0; ibe < 2; ++ibe) {
336  for (int iside = 0; iside < 2; ++iside) {
337  if (setIt->first % rod_id_base[ibe][iside] < 0xffff) {
338  nRobErrors[ibe][iside] += 1. / nRobsTotal[ibe][iside];
339  }
340  }
341  }
342  }
343 
344  for (int ibe = 0; ibe < 2; ++ibe) {
345  for (int iside = 0; iside < 2; ++iside) {
346  RobBSErrorsVsLB_x = lumiBlock;
347  RobBSErrorsVsLB_y = nRobErrors[ibe][iside];
348  for (unsigned int i = 0; i < lumiBlock; i++) // we need this so the LastBinThreshold algorithm can find the last bin
349  fill("RDOShiftSmryRebinnedHistograms"+std::to_string(ibe)+std::to_string(iside), RobBSErrorsVsLB_x, RobBSErrorsVsLB_y);
350  }
351  }
352 
353  return sc;
354 }

◆ chipToBoard()

int TRTMonitoringRun3RAW_Alg::chipToBoard ( int  chip) const
private

Definition at line 358 of file TRTMonitoringRun3RAW_Alg.cxx.

358  {
359 //----------------------------------------------------------------------------------//
360  // return logical board index:
361  // 0 for Board 1S (has 10 chips) 0 - 9
362  // 1 for 1L (11) 10 - 20
363  // 2 for 2S (15) 21 - 35
364  // 3 for 2L, first 9 chips 36 - 44
365  // 4 for 2L, second 9 chips 45 - 53
366  // 5 for 3S, first 11 54 - 64
367  // 6 for 3S, second 12 65 - 76
368  // 7 for 3L, first 13 77 - 89
369  // 8 for 3L, second 14 90 - 103
370  const int list[] = {10, 11, 15, 9, 9, 11, 12, 13, 14};
371  int count = 0;
372  chip--;
373 
374  for (int i = 0; i < 9; i++) {
375  count += list[i];
376 
377  if (chip < count) return i + 1;
378  else if (chip == 104) return 9;
379  }
380 
381  assert(count == 104);
382  assert(false); // should never come this far
383  return -1;
384 }

◆ chipToBoard_EndCap()

int TRTMonitoringRun3RAW_Alg::chipToBoard_EndCap ( int  chip) const
private

Definition at line 388 of file TRTMonitoringRun3RAW_Alg.cxx.

388  {
389 //----------------------------------------------------------------------------------//
390  const int remainder = (chip - 1) % 12;
391  const int Board = int(((chip - 1) - remainder) / 12);
392  return Board + 1;
393 }

◆ dataType()

DataType_t AthMonitorAlgorithm::dataType ( ) const
inlineinherited

Accessor functions for the data type.

Returns
the current value of the class's DataType_t instance.

Definition at line 221 of file AthMonitorAlgorithm.h.

221 { return m_dataType; }

◆ dataTypeStringToEnum()

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::dataTypeStringToEnum ( const std::string &  str) const
inherited

Convert the data type string from the python configuration to an enum object.

Returns
a value in the DataType_t enumeration which matches the input string.

Definition at line 140 of file AthMonitorAlgorithm.cxx.

140  {
141  // convert the string to all lowercase
142  std::string lowerCaseStr = str;
143  std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
144 
145  // check if it matches one of the enum choices
146  if( lowerCaseStr == "userdefined" ) {
148  } else if( lowerCaseStr == "montecarlo" ) {
149  return DataType_t::monteCarlo;
150  } else if( lowerCaseStr == "collisions" ) {
151  return DataType_t::collisions;
152  } else if( lowerCaseStr == "cosmics" ) {
153  return DataType_t::cosmics;
154  } else if( lowerCaseStr == "heavyioncollisions" ) {
156  } else { // otherwise, warn the user and return "userDefined"
157  ATH_MSG_WARNING("AthMonitorAlgorithm::dataTypeStringToEnum(): Unknown data type "
158  <<str<<", returning userDefined.");
160  }
161 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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; }

◆ environment()

Environment_t AthMonitorAlgorithm::environment ( ) const
inlineinherited

Accessor functions for the environment.

Returns
the current value of the class's Environment_t instance.

Definition at line 205 of file AthMonitorAlgorithm.h.

205 { return m_environment; }

◆ envStringToEnum()

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::envStringToEnum ( const std::string &  str) const
inherited

Convert the environment string from the python configuration to an enum object.

Returns
a value in the Environment_t enumeration which matches the input string.

Definition at line 112 of file AthMonitorAlgorithm.cxx.

112  {
113  // convert the string to all lowercase
114  std::string lowerCaseStr = str;
115  std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
116 
117  // check if it matches one of the enum choices
118  if( lowerCaseStr == "user" ) {
119  return Environment_t::user;
120  } else if( lowerCaseStr == "online" ) {
121  return Environment_t::online;
122  } else if( lowerCaseStr == "tier0" ) {
123  return Environment_t::tier0;
124  } else if( lowerCaseStr == "tier0raw" ) {
126  } else if( lowerCaseStr == "tier0esd" ) {
128  } else if( lowerCaseStr == "aod" ) {
129  return Environment_t::AOD;
130  } else if( lowerCaseStr == "altprod" ) {
131  return Environment_t::altprod;
132  } else { // otherwise, warn the user and return "user"
133  ATH_MSG_WARNING("AthMonitorAlgorithm::envStringToEnum(): Unknown environment "
134  <<str<<", returning user.");
135  return Environment_t::user;
136  }
137 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode AthMonitorAlgorithm::execute ( const EventContext &  ctx) const
overridevirtualinherited

Applies filters and trigger requirements.

Then, calls fillHistograms().

Parameters
ctxevent context for reentrant Athena call
Returns
StatusCode

Definition at line 73 of file AthMonitorAlgorithm.cxx.

73  {
74 
75  // Checks that all of the DQ filters are passed. If any one of the filters
76  // fails, return SUCCESS code and do not fill the histograms with the event.
77  for ( const auto& filterItr : m_DQFilterTools ) {
78  if (!filterItr->accept()) {
79  ATH_MSG_DEBUG("Event rejected due to filter tool.");
80  return StatusCode::SUCCESS;
81  }
82  }
83 
84  // Trigger: If there is a decision tool and the chains fail, skip the event.
86  ATH_MSG_DEBUG("Event rejected due to trigger filter.");
87  return StatusCode::SUCCESS;
88  }
89 
90  ATH_MSG_DEBUG("Event accepted!");
91  return fillHistograms(ctx);
92 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ fillHistograms()

StatusCode TRTMonitoringRun3RAW_Alg::fillHistograms ( const EventContext &  ctx) const
overridevirtual

adds event to the monitoring histograms

User will overwrite this function. Histogram booking is no longer done in C++. This function is called in execute once the filters are all passed.

Parameters
ctxforwarded from execute
Returns
StatusCode

Implements AthMonitorAlgorithm.

Definition at line 2713 of file TRTMonitoringRun3RAW_Alg.cxx.

2713  {
2714  using namespace Monitored;
2715  bool passEventBurst;
2716 
2717  ATH_MSG_VERBOSE("Monitoring Histograms being filled");
2718 
2720  SG::ReadHandle<xAOD::EventInfo> xAODEventInfo = GetEventInfo(ctx);
2724 
2725  if (m_doRDOsMon) {
2726  if (!rdoContainer.isValid()) {
2727  ATH_MSG_ERROR("Could not find TRT Raw Data Object " << m_rdoContainerKey.key() <<
2728  " in store");
2729  return StatusCode::FAILURE;
2730  }
2731 
2732  passEventBurst = checkEventBurst(*rdoContainer);
2733  if (passEventBurst) {
2734  if (!trtBCIDCollection.isValid()) {
2735  ATH_MSG_INFO("Could not find BCID collection " << m_TRT_BCIDCollectionKey.key() <<
2736  " in store");
2737  }
2738 
2739  ATH_CHECK( fillTRTRDOs(ctx, *rdoContainer, *xAODEventInfo, trtBCIDCollection.ptr()) );
2740  }
2741  } else passEventBurst = true;
2742 
2743  if (m_useHoleFinder) {
2744  if (!combTrackCollection.isValid()) {
2745  ATH_MSG_ERROR("Could not find track collection " << m_combTrackCollectionKey.key() <<
2746  " in store");
2747  return StatusCode::FAILURE;
2748  }
2749  ATH_CHECK( fillTRTEfficiency(ctx, *combTrackCollection) );
2750  }
2751 
2752  if (m_doHitsMon) {
2753  if (!trackCollection.isValid()) {
2754  ATH_MSG_ERROR("Could not find track collection " << m_trackCollectionKey.key() <<
2755  " in store");
2756  return StatusCode::FAILURE;
2757  }
2758  if (passEventBurst) {
2759  ATH_CHECK( fillTRTHits(ctx, *trackCollection) );
2760  }
2761  }
2762 
2763  return StatusCode::SUCCESS;
2764 }

◆ fillTRTEfficiency()

StatusCode TRTMonitoringRun3RAW_Alg::fillTRTEfficiency ( const EventContext &  ctx,
const TrackCollection combTrackCollection 
) const
private

Definition at line 1690 of file TRTMonitoringRun3RAW_Alg.cxx.

1691  {
1692 //----------------------------------------------------------------------------------//
1693  ATH_MSG_VERBOSE("Filling TRT Efficiency Histograms");
1694 
1695  // TEfficiency
1696  auto Efficiency_eta = Monitored::Scalar<float>("Efficiency_eta", 0.0);
1697  auto Efficiency_phi = Monitored::Scalar<float>("Efficiency_phi", 0.0);
1698  auto Efficiency_pt = Monitored::Scalar<float>("Efficiency_pt", 0.0);
1699  auto Efficiency_z0 = Monitored::Scalar<float>("Efficiency_z0", 0.0);
1700  auto EfficiencyBarrel_locR = Monitored::Scalar<float>("EfficiencyBarrel_locR", 0.0);
1701  auto EfficiencyBarrel_locR_Ar = Monitored::Scalar<float>("EfficiencyBarrel_locR_Ar", 0.0);
1702  auto EfficiencyBarrelMap = Monitored::Scalar<float>("EfficiencyBarrelMap", 0.0);
1703  auto EfficiencyEndCapMap = Monitored::Scalar<float>("EfficiencyEndCapMap", 0.0);
1704  auto EfficiencyEndCap_locR = Monitored::Scalar<float>("EfficiencyEndCap_locR", 0.0);
1705  auto EfficiencyEndCap_locR_Ar = Monitored::Scalar<float>("EfficiencyEndCap_locR_Ar", 0.0);
1706  auto EfficiencyS = Monitored::Scalar<float>("EfficiencyS", 0.0);
1707  auto EfficiencyC = Monitored::Scalar<float>("EfficiencyC", 0.0);
1708  auto Efficiency_eta_passed = Monitored::Scalar<float>("Efficiency_eta_passed", 0.0);
1709  auto Efficiency_phi_passed = Monitored::Scalar<float>("Efficiency_phi_passed", 0.0);
1710  auto Efficiency_pt_passed = Monitored::Scalar<float>("Efficiency_pt_passed", 0.0);
1711  auto Efficiency_z0_passed = Monitored::Scalar<float>("Efficiency_z0_passed", 0.0);
1712  auto EfficiencyBarrel_locR_passed = Monitored::Scalar<bool>("EfficiencyBarrel_locR_passed", false);
1713  auto EfficiencyBarrel_locR_Ar_passed = Monitored::Scalar<bool>("EfficiencyBarrel_locR_Ar_passed", false);
1714  auto EfficiencyBarrelMap_passed = Monitored::Scalar<bool>("EfficiencyBarrelMap_passed", false);
1715  auto EfficiencyEndCapMap_passed = Monitored::Scalar<bool>("EfficiencyEndCapMap_passed", false);
1716  auto EfficiencyEndCap_locR_passed = Monitored::Scalar<bool>("EfficiencyEndCap_locR_passed", false);
1717  auto EfficiencyEndCap_locR_Ar_passed = Monitored::Scalar<bool>("EfficiencyEndCap_locR_Ar_passed", false);
1718  auto EfficiencyS_passed = Monitored::Scalar<bool>("EfficiencyS_passed", false);
1719  auto EfficiencyC_passed = Monitored::Scalar<bool>("EfficiencyC_passed", false);
1720 
1721  // Reduce unnecessary divisions
1722  const float invGeV = 1. / CLHEP::GeV;
1723  const float invmm = 1. / CLHEP::mm;
1724  int itrack = 0;
1725  float track_pt = 0;
1726  float track_eta = 0;
1727  float track_phi = 0;
1728  float track_d0 = 0;
1729  float track_z0 = 0;
1730 
1731  for (auto track = combTrackCollection.begin(); track != combTrackCollection.end(); ++track) {
1732  // Online: use all tracks, offline: use only every xth track, skip the rest
1733  if (m_environment != Environment_t::online && (itrack % m_every_xth_track) != 0) continue;
1734 
1735  ++itrack;
1736  // Get perigee
1737  const Trk::Perigee *perigee = (*track)->perigeeParameters();
1738 
1739  if (perigee) {
1740  track_pt = perigee->pT();
1741  track_eta = perigee->eta();
1742  track_phi = perigee->parameters()[Trk::phi0];
1743  track_d0 = perigee->parameters()[Trk::d0];
1744  track_z0 = perigee->parameters()[Trk::z0];
1745  ATH_MSG_DEBUG("This track has perigee parameters:\n"
1746  << " pT = " << track_pt * invGeV << " GeV" << "\n"
1747  << " eta = " << track_eta << "\n"
1748  << " phi0 = " << track_phi << "\n"
1749  << " d0 = " << track_d0 * invmm << "\n"
1750  << " z0 = " << track_z0 * invmm << "\n"
1751  << " theta = " << perigee->parameters()[Trk::theta] << "\n"
1752  << " qOverP = " << perigee->parameters()[Trk::qOverP]);
1753  } else {
1754  ATH_MSG_DEBUG("This track has null perigeeParameters.");
1755  continue;
1756  }
1757 
1758  const Trk::TrackStates *track_states = (*track)->trackStateOnSurfaces();
1759 
1760  if (track_states) {
1761  ATH_MSG_DEBUG("This track has " << track_states->size() << " track states on surface.");
1762  } else {
1763  ATH_MSG_DEBUG("This track has null track states on surface.");
1764  continue;
1765  }
1766 
1767  const std::unique_ptr<const Trk::TrackSummary> summary(m_TrackSummaryTool->summary(ctx,*(*track)));
1768  int n_trt_hits = summary->get(Trk::numberOfTRTHits);
1769  int n_sct_hits = summary->get(Trk::numberOfSCTHits);
1770  int n_pixel_hits = summary->get(Trk::numberOfPixelHits);
1771  float p = 1.0e+08;
1772 
1773  if (perigee) {
1774  p = (perigee->parameters()[Trk::qOverP] != 0.) ? std::abs(1. / (perigee->parameters()[Trk::qOverP])) : 1.0e+08;
1775  }
1776 
1777 
1778  // Preselect tracks
1779  const bool passed_track_preselection = (static_cast<bool>(m_trackSelTool->accept(**track)) || m_isCosmics) &&
1780  n_trt_hits >= m_min_trt_hits &&
1781  p > m_minP &&
1782  perigee->pT() > (m_isCosmics?m_min_pT.value() : 2.0 * CLHEP::GeV);
1783 
1784  ATH_MSG_DEBUG("track has ntrt = " << n_trt_hits
1785  << " and nsct = " << n_sct_hits
1786  << " and npix = " << n_pixel_hits);
1787 
1788  if (!passed_track_preselection) {
1789  ATH_MSG_DEBUG("This track failed preselection.");
1790  continue;
1791  }
1792 
1793  ATH_MSG_DEBUG("This track passed preselection.");
1794 
1795  for (auto it = track_states->begin(); it != track_states->end(); it++) {
1796  if ( !((*it)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
1797 
1798  const Trk::TrackParameters *track_parameters = (*it)->trackParameters();
1799 
1800  if (!track_parameters) continue;
1801 
1803 
1804  if ( !((m_pTRTHelper->is_trt(id)) )) continue;
1805 
1806  float locR = track_parameters->parameters()[Trk::driftRadius];
1807  int barrel_ec = m_pTRTHelper->barrel_ec(id);
1808  int layer_or_wheel = m_pTRTHelper->layer_or_wheel(id);
1809  int phi_module = m_pTRTHelper->phi_module(id);
1810  int straw_layer = m_pTRTHelper->straw_layer(id);
1811  int straw = m_pTRTHelper->straw(id);
1812  const bool isArgonStraw = (Straw_Gastype( m_sumTool->getStatusHT(id, ctx) ) == GasType::Ar);
1813  // Assume always Xe if m_ArgonXenonSplitter is not enabled, otherwise check the straw status (good is Xe, non-good is Ar)
1814  int ibe = abs(barrel_ec) - 1; // ibe = 0 (Barrel), ibe = 1 (Endcap)
1815  int iside = barrel_ec > 0 ? 0 : 1; // iside = 0 (Side A), iside = 1 (Side C)
1816 
1817  if (ibe == 0) {
1818  if (isArgonStraw) {
1819  EfficiencyBarrel_locR_Ar = locR;
1820  EfficiencyBarrel_locR_Ar_passed = 1.0;
1821  fill("TRTEfficiencyHistogramsBarrel", EfficiencyBarrel_locR_Ar_passed, EfficiencyBarrel_locR_Ar);
1822  } else {
1823  EfficiencyBarrel_locR = locR;
1824  EfficiencyBarrel_locR_passed = 1.0;
1825  fill("TRTEfficiencyHistogramsBarrel", EfficiencyBarrel_locR_passed, EfficiencyBarrel_locR);
1826  }
1827  } else if (ibe == 1) {
1828  if (isArgonStraw) {
1829  EfficiencyBarrel_locR_Ar = locR;
1830  EfficiencyBarrel_locR_Ar_passed = 1.0;
1831  fill("TRTEfficiencyHistogramsEndCap"+std::to_string(iside), EfficiencyBarrel_locR_Ar_passed, EfficiencyBarrel_locR_Ar);
1832  } else {
1833  EfficiencyEndCap_locR = locR;
1834  EfficiencyEndCap_locR_passed = 1.0;
1835  fill("TRTEfficiencyHistogramsEndCap"+std::to_string(iside), EfficiencyEndCap_locR_passed, EfficiencyEndCap_locR);
1836  }
1837  }
1838 
1839  if (std::abs(locR) >= 1.3) continue;
1840 
1841  int thisStrawNumber = 0;
1842  int chip = 0;
1843 
1844  if (ibe == 0) {
1845  thisStrawNumber = strawNumber(straw, straw_layer, layer_or_wheel);
1846 
1847  if (thisStrawNumber >= 0 && thisStrawNumber < s_Straw_max[ibe])
1848  chip = m_mat_chip_B.at(phi_module).at(thisStrawNumber);
1849  } else if (ibe == 1) {
1850  thisStrawNumber = strawNumberEndCap(straw, straw_layer, layer_or_wheel, phi_module, barrel_ec);
1851 
1852  if (thisStrawNumber >= 0 && thisStrawNumber < s_Straw_max[ibe])
1853  chip = m_mat_chip_E.at(phi_module).at(thisStrawNumber);
1854  }
1855 
1856  if (ibe == 0) {
1857  EfficiencyBarrelMap = thisStrawNumber;
1858  EfficiencyBarrelMap_passed = 1.0;
1859  fill("TRTEfficiencyHistogramsBarrel", EfficiencyBarrelMap_passed, EfficiencyBarrelMap);
1860  } else if (ibe == 1) {
1861  EfficiencyEndCapMap = thisStrawNumber;
1862  EfficiencyEndCapMap_passed = 1.0;
1863  fill("TRTEfficiencyHistogramsEndCap", EfficiencyEndCapMap_passed, EfficiencyEndCapMap);
1864  }
1865 
1866  if (m_doExpert) {
1867  if (iside == 0) {
1868  EfficiencyS = thisStrawNumber;
1869  EfficiencyS_passed = 1.0;
1870  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module), EfficiencyS_passed, EfficiencyS);
1871  EfficiencyC = chip;
1872  EfficiencyC_passed = 1.0;
1873  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module), EfficiencyC_passed, EfficiencyC);
1874  } else if (iside == 1) {
1875  EfficiencyS = thisStrawNumber;
1876  EfficiencyS_passed = 1.0;
1877  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module + 32), EfficiencyS_passed, EfficiencyS);
1878  EfficiencyC = chip;
1879  EfficiencyC_passed = 1.0;
1880  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module + 32), EfficiencyC_passed, EfficiencyC);
1881  }
1882  }
1883 
1884  Efficiency_eta_passed = track_eta;
1885  Efficiency_eta = 1.0;
1886  fill("TRTEfficiencyHistograms", Efficiency_eta_passed, Efficiency_eta);
1887  Efficiency_phi_passed = track_phi;
1888  Efficiency_phi = 1.0;
1889  fill("TRTEfficiencyHistograms", Efficiency_phi_passed, Efficiency_phi);
1890  Efficiency_pt_passed = track_pt*invGeV;
1891  Efficiency_pt = 1.0;
1892  fill("TRTEfficiencyHistograms", Efficiency_pt_passed, Efficiency_pt);
1893  Efficiency_z0_passed = track_z0;
1894  Efficiency_z0 = 1.0;
1895  fill("TRTEfficiencyHistograms", Efficiency_z0_passed, Efficiency_z0);
1896  }
1897 
1898 
1899  // Use hole finder to find holes on this track
1900  if (m_useHoleFinder) {
1901  std::unique_ptr<const Trk::TrackStates> holes (m_trt_hole_finder->getHolesOnTrack(*(*track)));
1902 
1903  if (!holes) {
1904  ATH_MSG_WARNING("TRTTrackHoleSearchTool returned null results.");
1905  continue;
1906  } else {
1907  for (auto it = holes->begin(); it != holes->end(); ++it) { // holes->size() is always 0 for some reason
1908  if ( !((*it)->type(Trk::TrackStateOnSurface::Hole)) ) continue;
1909 
1910  const Trk::TrackParameters *track_parameters = (*it)->trackParameters();
1911 
1912  if (!track_parameters) continue;
1913 
1915 
1916  if ( !(m_pTRTHelper->is_trt(id)) ) continue;
1917 
1918  float locR = track_parameters->parameters()[Trk::driftRadius];
1919  int barrel_ec = m_pTRTHelper->barrel_ec(id);
1920  int layer_or_wheel = m_pTRTHelper->layer_or_wheel(id);
1921  int phi_module = m_pTRTHelper->phi_module(id);
1922  int straw_layer = m_pTRTHelper->straw_layer(id);
1923  int straw = m_pTRTHelper->straw(id);
1924  const bool isArgonStraw = Straw_Gastype( m_sumTool->getStatusHT(id, ctx) ) == GasType::Ar;
1925  // Assume always Xe if m_ArgonXenonSplitter is not enabled, otherwise check the straw status (good is Xe, non-good is Ar)
1926  int ibe = abs(barrel_ec) - 1; // ibe = 0 (Barrel), ibe = 1 (Endcap)
1927  int iside = barrel_ec > 0 ? 0 : 1; // iside = 0 (Side A), iside = 1 (Side C)
1928 
1929  if (ibe == 0) {
1930  if (isArgonStraw) {
1931  EfficiencyBarrel_locR_Ar = locR;
1932  EfficiencyBarrel_locR_Ar_passed = 0.0;
1933  fill("TRTEfficiencyHistograms", EfficiencyBarrel_locR_Ar_passed, EfficiencyBarrel_locR_Ar);
1934  } else {
1935  EfficiencyBarrel_locR = locR;
1936  EfficiencyBarrel_locR_passed = 0.0;
1937  fill("TRTEfficiencyHistograms", EfficiencyBarrel_locR_passed, EfficiencyBarrel_locR);
1938  }
1939  } else if (ibe == 1) {
1940  if (isArgonStraw) {
1941  EfficiencyEndCap_locR_Ar = locR;
1942  EfficiencyEndCap_locR_Ar_passed = 0.0;
1943  fill("TRTEfficiencyHistogramsEndCap"+std::to_string(iside), EfficiencyEndCap_locR_Ar_passed, EfficiencyEndCap_locR_Ar);
1944  } else {
1945  EfficiencyEndCap_locR = locR;
1946  EfficiencyEndCap_locR_passed = 0.0;
1947  fill("TRTEfficiencyHistogramsEndCap"+std::to_string(iside), EfficiencyEndCap_locR_passed, EfficiencyEndCap_locR);
1948  }
1949  }
1950 
1951  if (std::abs(locR) >= 1.3) continue;
1952 
1953  int thisStrawNumber = 0;
1954  int chip = 0;
1955 
1956  if (ibe == 0) {
1957  thisStrawNumber = strawNumber(straw, straw_layer, layer_or_wheel);
1958 
1959  if (thisStrawNumber >= 0 && thisStrawNumber < s_Straw_max[ibe]) {
1960  chip = m_mat_chip_B.at(phi_module).at(thisStrawNumber);
1961  }
1962  } else if (ibe == 1) {
1963  thisStrawNumber = strawNumberEndCap(straw, straw_layer, layer_or_wheel, phi_module, barrel_ec);
1964 
1965  if (thisStrawNumber >= 0 && thisStrawNumber < s_Straw_max[ibe]) {
1966  chip = m_mat_chip_E.at(phi_module).at(thisStrawNumber);
1967  }
1968  }
1969 
1970  if (ibe == 0) {
1971  EfficiencyBarrelMap = thisStrawNumber;
1972  EfficiencyBarrelMap_passed = 0.0;
1973  fill("TRTEfficiencyHistogramsBarrel", EfficiencyBarrelMap_passed, EfficiencyBarrelMap);
1974  } else if (ibe == 1) {
1975  EfficiencyEndCapMap = thisStrawNumber;
1976  EfficiencyEndCapMap_passed = 0.0;
1977  fill("TRTEfficiencyHistogramsEndCap", EfficiencyEndCapMap_passed, EfficiencyEndCapMap);
1978  }
1979 
1980  if (m_doExpert) {
1981  if (iside == 0) {
1982  EfficiencyS = thisStrawNumber;
1983  EfficiencyS_passed = 0.0;
1984  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module), EfficiencyS_passed, EfficiencyS);
1985  EfficiencyC = chip;
1986  EfficiencyC_passed = 0.0;
1987  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module), EfficiencyC_passed, EfficiencyC);
1988  } else if (iside == 1) {
1989  EfficiencyS = thisStrawNumber;
1990  EfficiencyS_passed = 0.0;
1991  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module + 32), EfficiencyS_passed, EfficiencyS);
1992  EfficiencyC = chip;
1993  EfficiencyC_passed = 0.0;
1994  fill("TRTEfficiencyHistograms"+std::to_string(ibe)+std::to_string(phi_module + 32), EfficiencyC_passed, EfficiencyC);
1995  }
1996  }
1997  Efficiency_eta_passed = track_eta;
1998  Efficiency_eta = 0.0;
1999  fill("TRTEfficiencyHistograms", Efficiency_eta_passed, Efficiency_eta);
2000  Efficiency_phi_passed = track_phi;
2001  Efficiency_phi = 0.0;
2002  fill("TRTEfficiencyHistograms", Efficiency_phi_passed, Efficiency_phi);
2003  Efficiency_pt_passed = track_pt*invGeV;
2004  Efficiency_pt = 0.0;
2005  fill("TRTEfficiencyHistograms", Efficiency_pt_passed, Efficiency_pt);
2006  Efficiency_z0_passed = track_z0;
2007  Efficiency_z0 = 0.0;
2008  fill("TRTEfficiencyHistograms", Efficiency_z0_passed, Efficiency_z0);
2009  }
2010  }
2011  }
2012  }
2013 
2014  // Efficiency calculations
2015  // Insert here
2016 
2017  return StatusCode::SUCCESS;
2018 }

◆ fillTRTHits()

StatusCode TRTMonitoringRun3RAW_Alg::fillTRTHits ( const EventContext &  ctx,
const TrackCollection trackCollection 
) const
private

Definition at line 2029 of file TRTMonitoringRun3RAW_Alg.cxx.

2030  {
2031 //----------------------------------------------------------------------------------//
2032  ATH_MSG_VERBOSE("Filling TRT Tracks Histos");
2033 
2034  // TH1F
2035  auto HLhitOnTrack_B = Monitored::Scalar<float>("HLhitOnTrack_B", 0.0);
2036  auto HLhitOnTrack_E = Monitored::Scalar<float>("HLhitOnTrack_E", 0.0);
2037  auto HtoLRatioOnTrack_B_Ar = Monitored::Scalar<float>("HtoLRatioOnTrack_B_Ar", 0.0);
2038  auto HtoLRatioOnTrack_B_Xe = Monitored::Scalar<float>("HtoLRatioOnTrack_B_Xe", 0.0);
2039  auto HtoLRatioOnTrack_B = Monitored::Scalar<float>("HtoLRatioOnTrack_B", 0.0);
2040  auto HtoLRatioOnTrack_E = Monitored::Scalar<float>("HtoLRatioOnTrack_E", 0.0);
2041  auto HtoLRatioOnTrack_E_Ar = Monitored::Scalar<float>("HtoLRatioOnTrack_E_Ar", 0.0);
2042  auto HtoLRatioOnTrack_E_Xe = Monitored::Scalar<float>("HtoLRatioOnTrack_E_Xe", 0.0);
2043  auto NumSwLLWoT_E = Monitored::Scalar<float>("NumSwLLWoT_E", 0.0);
2044  auto NumSwLLWoT_B = Monitored::Scalar<float>("NumSwLLWoT_B", 0.0);
2045  auto HitHWonTMapS = Monitored::Scalar<float>("HitHWonTMapS", 0.0);
2046  auto HitWonTMapS = Monitored::Scalar<float>("HitWonTMapS", 0.0);
2047  auto HitAonTMapS = Monitored::Scalar<float>("HitAonTMapS", 0.0);
2048  auto HitAWonTMapS = Monitored::Scalar<float>("HitAWonTMapS", 0.0);
2049  auto HitHonTMapS = Monitored::Scalar<float>("HitHonTMapS", 0.0);
2050  auto HitHWonTMapC = Monitored::Scalar<float>("HitHWonTMapC", 0.0);
2051  auto HitWonTMapC = Monitored::Scalar<float>("HitWonTMapC", 0.0);
2052  auto HitAonTMapC = Monitored::Scalar<float>("HitAonTMapC", 0.0);
2053  auto HitAWonTMapC = Monitored::Scalar<float>("HitAWonTMapC", 0.0);
2054  auto HitHonTMapC = Monitored::Scalar<float>("HitHonTMapC", 0.0);
2055 
2056  // TEfficiency
2057  auto StrawEffDetPhi_B = Monitored::Scalar<float>("StrawEffDetPhi_B", 0.0);
2058  auto StrawEffDetPhi_B_passed = Monitored::Scalar<float>("StrawEffDetPhi_B_passed", 0.0);
2059  auto StrawEffDetPhi_E = Monitored::Scalar<float>("StrawEffDetPhi_E", 0.0);
2060  auto StrawEffDetPhi_E_passed = Monitored::Scalar<float>("StrawEffDetPhi_E_passed", 0.0);
2061  auto EfficiencyS = Monitored::Scalar<float>("EfficiencyS", 0.0);
2062  auto EfficiencyS_passed = Monitored::Scalar<bool>("EfficiencyS_passed", false);
2063  auto EfficiencyC = Monitored::Scalar<float>("EfficiencyC", 0.0);
2064  auto EfficiencyC_passed = Monitored::Scalar<bool>("EfficiencyC_passed", false);
2065  auto HtoLonTMapS = Monitored::Scalar<float>("HtoLonTMapS", 0.0);
2066  auto HtoLonTMapS_passed = Monitored::Scalar<bool>("HtoLonTMapS_passed", false);
2067  auto HtoLWonTMapS = Monitored::Scalar<float>("HtoLWonTMapS", 0.0);
2068  auto HtoLWonTMapS_passed = Monitored::Scalar<bool>("HtoLWonTMapS_passed", false);
2069  auto HtoLonTMapC = Monitored::Scalar<float>("HtoLonTMapC", 0.0);
2070  auto HtoLonTMapC_passed = Monitored::Scalar<bool>("HtoLonTMapC_passed", false);
2071  auto HtoLWonTMapC = Monitored::Scalar<float>("HtoLWonTMapC", 0.0);
2072  auto HtoLWonTMapC_passed = Monitored::Scalar<bool>("HtoLWonTMapC_passed", false);
2073  auto HitTronTMapC_x = Monitored::Scalar<float>("HitTronTMapC_x", 0.0);
2074  auto HitTronTMapC_y = Monitored::Scalar<float>("HitTronTMapC_y", 0.0);
2075  auto HitTronTMapS_x = Monitored::Scalar<float>("HitTronTMapS_x", 0.0);
2076  auto HitTronTMapS_y = Monitored::Scalar<float>("HitTronTMapS_y", 0.0);
2077  auto HitToTonTMapS_x = Monitored::Scalar<float>("HitToTonTMapS_x", 0.0);
2078  auto HitToTonTMapS_y = Monitored::Scalar<float>("HitToTonTMapS_y", 0.0);
2079  auto HitToTonTMapC_x = Monitored::Scalar<float>("HitToTonTMapC_x", 0.0);
2080  auto HitToTonTMapC_y = Monitored::Scalar<float>("HitToTonTMapC_y", 0.0);
2081 
2082 
2083 
2084  // TProfile
2085  auto HitWonTMap_B_y = Monitored::Scalar<float>("HitWonTMap_B_y", 0.0);
2086  auto HitWonTMap_E_y = Monitored::Scalar<float>("HitWonTMap_E_y", 0.0);
2087 
2088  auto scale_hHitWonTMap_B = std::make_unique<short int[]>(s_Straw_max[0]);
2089  auto scale_hHitWonTMap_E = std::make_unique<short int[][s_Straw_max[1]]>(2);
2090  auto scale_hHitWonTMap_B_passed = std::make_unique<short int[]>(s_Straw_max[0]);
2091  auto scale_hHitWonTMap_E_passed = std::make_unique<short int[][s_Straw_max[1]]>(2);
2092 
2093  std::map<int,std::vector<straw_edge_struct>> straw_edge_map;
2094 
2095  auto p_trk = trackCollection.begin();
2096 
2097  const Trk::Perigee *mPer = nullptr;
2098  const DataVector<const Trk::TrackParameters> *AllTrkPar(nullptr);
2100 
2101  int ntrackstack[2][64];
2102 
2103  for (int ibe = 0; ibe < 2; ibe++) {
2104  std::fill(ntrackstack[ibe], ntrackstack[ibe] + 64, 0);
2105  }
2106 
2107  for (; p_trk != trackCollection.end(); ++p_trk) {
2108  const std::unique_ptr<const Trk::TrackSummary> summary(m_TrackSummaryTool->summary(ctx,*(*p_trk)));
2110 
2111  if (nTRTHits < m_minTRThits) continue;
2112 
2113  AllTrkPar = (*p_trk)->trackParameters();
2114 
2115  // Search of MeasuredPerigee in TrackParameters
2116  // The following algorithm only finds the First perigee measurement.
2117  // As there should be one and only one perigee measurement then this assumption should be valid.
2118  // But no check is done to see if there is more than one perigee measurement.
2119  for (p_trkpariter = AllTrkPar->begin(); p_trkpariter != AllTrkPar->end(); ++p_trkpariter) {
2120  //if track parameter does have a measured perigee then the track parameter is a keeper and break out of the loop
2121  if ((mPer = dynamic_cast<const Trk::Perigee *>(*p_trkpariter))) break;
2122  }
2123 
2124  if (!mPer) continue;
2125 
2126  float theta = mPer->parameters()[Trk::theta];
2127  float p = (mPer->parameters()[Trk::qOverP] != 0.) ? std::abs(1. / (mPer->parameters()[Trk::qOverP])) : 10e7;
2128  float pT = (p * sin(theta));
2129  pT = pT * 1e-3; // GeV
2130 
2131  if (p < m_minP) continue;
2132 
2133  const Trk::TrackStates *trackStates = (**p_trk).trackStateOnSurfaces();
2134 
2135  if (trackStates == nullptr) continue;
2136 
2137  Trk::TrackStates::const_iterator TSOSItBegin0 = trackStates->begin();
2138  Trk::TrackStates::const_iterator TSOSItBegin = trackStates->begin();
2139  Trk::TrackStates::const_iterator TSOSItBeginTemp = trackStates->begin();
2140  Trk::TrackStates::const_iterator TSOSItEnd = trackStates->end();
2141 
2142  const bool passed_track_preselection = (static_cast<bool>(m_trackSelTool->accept(**p_trk)) || m_isCosmics) &&
2144  mPer->pT() > (m_isCosmics?m_min_pT.value() : 2.0 * CLHEP::GeV);
2145 
2146  if (!passed_track_preselection) continue;
2147 
2148  int nTRTHitsW[2][2];
2149  int nTRTHitsW_Ar[2][2];
2150  int nTRTHitsW_Xe[2][2];
2151  int nTRTHLHitsW[2][2];
2152  int nTRTHLHitsW_Ar[2][2];
2153  int nTRTHLHitsW_Xe[2][2];
2154  int nTRTHits_side[2][2];
2155  int nTRTHitsW_perwheel[2][18];
2156  int hitontrack[2] = {0, 0};
2157  int hitontrack_E_side[2] = {0, 0};
2158 
2159  for (int ibe = 0; ibe < 2; ibe++) {
2160  for (int iside = 0; iside < 2; iside++) {
2161  nTRTHits_side[ibe][iside] = -1;
2162  nTRTHitsW[ibe][iside] = 0;
2163  nTRTHitsW_Ar[ibe][iside] = 0;
2164  nTRTHitsW_Xe[ibe][iside] = 0;
2165  nTRTHLHitsW[ibe][iside] = 0;
2166  nTRTHLHitsW_Ar[ibe][iside] = 0;
2167  nTRTHLHitsW_Xe[ibe][iside] = 0;
2168  }
2169  std::fill(nTRTHitsW_perwheel[ibe], nTRTHitsW_perwheel[ibe] + 18, 0);
2170  }
2171 
2172  bool isBarrelOnly = true;
2173  bool ECAhit = false;
2174  bool ECChit = false;
2175  bool Bhit = false;
2176  int barrel_ec = 0;
2177  int layer_or_wheel = 0;
2178  int phi_module = 0;
2179  int straw_layer = 0;
2180  int straw = 0;
2181  int nearest_straw_layer[2] = {100, 100};
2182  int nearest_straw[2] = {0, 0};
2183  int testLayer[2] = {100, 100};
2184  float phi2D[2] = {-100, -100};
2185 
2186  for (TSOSItBeginTemp = TSOSItBegin0; TSOSItBeginTemp != TSOSItEnd; ++TSOSItBeginTemp) {
2187  if ((*TSOSItBeginTemp) == nullptr) continue;
2188 
2189  if (! ((*TSOSItBeginTemp)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
2190  const InDet::TRT_DriftCircleOnTrack *trtCircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack *>((*TSOSItBeginTemp)->measurementOnTrack());
2191 
2192  if (!trtCircle) continue;
2193  const Trk::TrackParameters *aTrackParam = dynamic_cast<const Trk::TrackParameters *>((*TSOSItBeginTemp)->trackParameters());
2194 
2195  if (!aTrackParam) continue;
2196  Identifier DCoTId = trtCircle->identify();
2197  barrel_ec = m_pTRTHelper->barrel_ec(DCoTId);
2198  int ibe = std::abs(barrel_ec) - 1;
2199  layer_or_wheel = m_pTRTHelper->layer_or_wheel (DCoTId);
2200  straw_layer = m_pTRTHelper->straw_layer(DCoTId);
2201  straw = m_pTRTHelper->straw(DCoTId);
2202 
2203  // Restrict ourselves to the inner most TRT layers To get detector phi.
2204  if (layer_or_wheel >= testLayer[ibe]) continue;
2205  testLayer[ibe] = layer_or_wheel;
2206 
2207  if (straw_layer < nearest_straw_layer[ibe]) {
2208  nearest_straw_layer[ibe] = straw_layer;
2209  nearest_straw[ibe] = straw;
2210  const InDetDD::TRT_BaseElement *circleElement = nullptr;
2211  circleElement = trtCircle->detectorElement();
2212  phi2D[ibe] = radToDegrees(circleElement->strawCenter(nearest_straw[ibe]).phi());
2213  circleElement = nullptr;
2214  }
2215  }
2216 
2217  if (phi2D[0] == -999) {
2218  ATH_MSG_DEBUG("Track did not go through inner layer of Barrel.");
2219  } else {
2220  ATH_MSG_VERBOSE("Track's closest approach is m_layer_or_wheel: " <<
2221  testLayer[0] << " m_straw_layer: " <<
2222  nearest_straw_layer[0] << " (in the Barrel).");
2223  }
2224 
2225  if (phi2D[1] == -999) {
2226  ATH_MSG_DEBUG("Track did not go through any inner layer of EndCap A or C.");
2227  } else {
2228  ATH_MSG_VERBOSE("Track's closest approach is m_layer_or_wheel: " <<
2229  testLayer[1] << " m_straw_layer: " <<
2230  nearest_straw_layer[1] << " (in the EndCaps).");
2231  }
2232 
2233  bool trackfound[2][64];
2234 
2235  for (int i = 0; i < 2; i++) {
2236  std::fill(trackfound[i], trackfound[i] + 64, false);
2237  }
2238 
2239  for (TSOSItBegin = TSOSItBegin0; TSOSItBegin != TSOSItEnd; ++TSOSItBegin) {
2240  // Select a TSOS which is non-empty, measurement type and contains both drift circle and track parameters informations
2241  if ((*TSOSItBegin) == nullptr) continue;
2242 
2243  if ( !((*TSOSItBegin)->type(Trk::TrackStateOnSurface::Measurement)) ) continue;
2244 
2245  const InDet::TRT_DriftCircleOnTrack *trtCircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack *>((*TSOSItBegin)->measurementOnTrack());
2246 
2247  if (!trtCircle) continue;
2248 
2249  const Trk::TrackParameters *aTrackParam = dynamic_cast<const Trk::TrackParameters *>((*TSOSItBegin)->trackParameters());
2250 
2251  if (!aTrackParam) continue;
2252 
2253  Identifier DCoTId = trtCircle->identify();
2254  barrel_ec = m_pTRTHelper->barrel_ec(DCoTId);
2255  layer_or_wheel = m_pTRTHelper->layer_or_wheel(DCoTId);
2256  phi_module = m_pTRTHelper->phi_module(DCoTId);
2257  straw_layer = m_pTRTHelper->straw_layer(DCoTId);
2258  straw = m_pTRTHelper->straw(DCoTId);
2259  int ibe = std::abs(barrel_ec) - 1; // ibe = 0 (Barrel), ibe = 1 (Endcap)
2260  int iside = barrel_ec > 0 ? 0 : 1; // iside = 0 (Side A), iside = 1 (Side C)
2261  int thisStrawNumber[2] = {-1, -1};
2262  int chip[2] = {0, 0};
2263 
2264  if (ibe == 0) {
2265  thisStrawNumber[ibe] = strawNumber(straw, straw_layer, layer_or_wheel);
2266 
2267  if (thisStrawNumber[ibe] >= 0 && thisStrawNumber[ibe] < s_Straw_max[ibe]) {
2268  chip[ibe] = m_mat_chip_B.at(phi_module).at(thisStrawNumber[ibe]);
2269  }
2270  } else if (ibe == 1) {
2271  thisStrawNumber[ibe] = strawNumberEndCap(straw, straw_layer, layer_or_wheel, phi_module, barrel_ec);
2272 
2273  if (thisStrawNumber[ibe] >= 0 && thisStrawNumber[ibe] < s_Straw_max[ibe]) {
2274  chip[ibe] = m_mat_chip_E.at(phi_module).at(thisStrawNumber[ibe]);
2275  }
2276  } else {
2277  thisStrawNumber[ibe] = -1;
2278  }
2279 
2280  if (thisStrawNumber[ibe] < 0 || thisStrawNumber[ibe] >= s_Straw_max[ibe]) continue;
2281 
2282  if (ibe == 0) {
2283  Bhit = true;
2284  } else if (barrel_ec == 2) {
2285  isBarrelOnly = false;
2286  ECAhit = true;
2287  } else if (barrel_ec == -2) {
2288  isBarrelOnly = false;
2289  ECChit = true;
2290  }
2291 
2292  Identifier surfaceID;
2293  surfaceID = trtCircle->identify();
2294  const bool isArgonStraw = ( Straw_Gastype( m_sumTool->getStatusHT(surfaceID, ctx) ) == GasType::Ar );
2295  // Assume always Xe if m_ArgonXenonSplitter is not enabled, otherwise check the straw status (good is Xe, non-good is Ar)
2296  float temp_locr = aTrackParam->parameters()[Trk::driftRadius];
2297  int iphi_module = -9999;
2298 
2299  if (iside == 0) iphi_module = phi_module;
2300  else if (iside == 1) iphi_module = phi_module + 32;
2301 
2302  trackfound[ibe][iphi_module] = true;
2303 
2304  if (((ibe == 0) && (temp_locr < m_DistToStraw)) ||
2305  ((ibe == 1) && ((*TSOSItBegin)->type(Trk::TrackStateOnSurface::Measurement) ||
2306  (*TSOSItBegin)->type(Trk::TrackStateOnSurface::Outlier) ||
2307  (*TSOSItBegin)->type(Trk::TrackStateOnSurface::Hole)) &&
2308  (temp_locr < m_DistToStraw))) {
2309  if (m_idHelper->is_trt(DCoTId)) {
2310  if (ibe == 0) {
2311  hitontrack[ibe]++;
2312 
2313  if (m_doShift) {
2314  StrawEffDetPhi_B_passed = phi_module;
2315  StrawEffDetPhi_B = 1.0;
2316  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), StrawEffDetPhi_B_passed, StrawEffDetPhi_B);
2317 
2318  if (m_doStraws) scale_hHitWonTMap_B[thisStrawNumber[ibe]]++;
2319  }
2320 
2321  } else if (ibe == 1) {
2322  hitontrack[ibe]++;
2323  hitontrack_E_side[iside]++;
2324 
2325  if (m_doShift) {
2326  StrawEffDetPhi_E_passed = phi_module;
2327  StrawEffDetPhi_E = 1.0;
2328  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), StrawEffDetPhi_E_passed, StrawEffDetPhi_E);
2329 
2330  if (m_doStraws) scale_hHitWonTMap_E[iside][thisStrawNumber[ibe]]++;
2331  }
2332  }
2333 
2334  if (m_doStraws && m_doExpert) {
2335  EfficiencyS = thisStrawNumber[ibe];
2336  EfficiencyS_passed = 1.0;
2337  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), EfficiencyS_passed, EfficiencyS);
2338  }
2339 
2340  if (m_doChips && m_doExpert) {
2341  EfficiencyC = chip[ibe] - 1;
2342  EfficiencyC_passed = 1.0;
2343  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), EfficiencyC_passed, EfficiencyC);
2344  }
2345  }
2346  } else {
2347  if (m_idHelper->is_trt(DCoTId)) { // ToDo: Is this really needed?
2348  if (ibe == 0) {
2349  if (m_doShift) {
2350  StrawEffDetPhi_B_passed = phi_module;
2351  StrawEffDetPhi_B = 0.0;
2352  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), StrawEffDetPhi_B_passed, StrawEffDetPhi_B);
2353 
2354  if (m_doStraws) scale_hHitWonTMap_B[thisStrawNumber[ibe]]++;
2355  }
2356  } else if (ibe == 1) {
2357  if (m_doShift) {
2358  StrawEffDetPhi_E_passed = phi_module;
2359  StrawEffDetPhi_E = 0.0;
2360  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), StrawEffDetPhi_E_passed, StrawEffDetPhi_E);
2361 
2362  if (m_doStraws) scale_hHitWonTMap_E[iside][thisStrawNumber[ibe]]++;
2363  }
2364  }
2365 
2366  if (m_doStraws && m_doExpert) {
2367  EfficiencyS = thisStrawNumber[ibe];
2368  EfficiencyS_passed = 0.0;
2369  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), EfficiencyS_passed, EfficiencyS);
2370  }
2371 
2372  if (m_doChips && m_doExpert) {
2373  EfficiencyC = chip[ibe] - 1;
2374  EfficiencyC_passed = 0.0;
2375  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), EfficiencyC_passed, EfficiencyC);
2376  }
2377  }
2378  }
2379  const InDet::TRT_DriftCircle *RawDriftCircle = dynamic_cast<const InDet::TRT_DriftCircle *>(trtCircle->prepRawData());
2380  if (RawDriftCircle) {
2381  nTRTHits_side[ibe][iside]++;
2382  float timeOverThreshold = RawDriftCircle->timeOverThreshold();
2383  int middleHTbit = RawDriftCircle->getWord() & 0x00020000;
2384  //0x00020000 = 0000 0000 0000 0000 0000 0010 0000 0000 0000 0000
2385  int hitinvaliditygate = RawDriftCircle->getWord() & 0x000DFE80;
2386  //0x000DFE80 = 0000 0000 0000 0000 0000 1101 1111 1110 1000 0000
2387  bool is_middleHTbit_high = (middleHTbit != 0);
2388  bool is_anybininVgate_high = (hitinvaliditygate != 0);
2389 
2390  if (m_doExpert && m_doStraws) {
2391  HitToTonTMapS_x = thisStrawNumber[ibe];
2392  HitToTonTMapS_y = timeOverThreshold;
2393  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitToTonTMapS_x, HitToTonTMapS_y);
2394  }
2395 
2396  if (m_doExpert && m_doChips) {
2397  HitToTonTMapC_x = chip[ibe] - 1;
2398  HitToTonTMapC_y = timeOverThreshold;
2399  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitToTonTMapC_x, HitToTonTMapC_y);
2400  }
2401 
2402  if (m_doExpert && m_doStraws) {
2403  if (is_middleHTbit_high) {
2404  HitHonTMapS = thisStrawNumber[ibe];
2405  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitHonTMapS);
2406  HitHWonTMapS = thisStrawNumber[ibe];
2407  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitHWonTMapS);
2408 
2409  HtoLonTMapS = thisStrawNumber[ibe];
2410  HtoLonTMapS_passed = 1.0;
2411  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLonTMapS_passed, HtoLonTMapS);
2412  HtoLWonTMapS = thisStrawNumber[ibe];
2413  HtoLWonTMapS_passed = 1.0;
2414  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLWonTMapS_passed, HtoLWonTMapS);
2415  }
2416  }
2417 
2418  if (m_doExpert && m_doChips) {
2419  if (is_middleHTbit_high) {
2420  HitHWonTMapC = chip[ibe] - 1;
2421  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitHWonTMapC);
2422  HitHonTMapC = chip[ibe] - 1;
2423  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitHonTMapC);
2424  HtoLonTMapC = chip[ibe] - 1;
2425  HtoLonTMapC_passed = 1.0;
2426  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLonTMapC_passed, HtoLonTMapC);
2427  HtoLWonTMapC = chip[ibe] - 1;
2428  HtoLWonTMapC_passed = 1.0;
2429  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLWonTMapC_passed, HtoLWonTMapC);
2430  }
2431  }
2432 
2433  const int driftTimeBin = RawDriftCircle->driftTimeBin();
2434 
2435  if ( (driftTimeBin < 24) &&
2436  !(RawDriftCircle->lastBinHigh()) &&
2437  !(RawDriftCircle->firstBinHigh()) ) {
2438  if (m_doStraws && m_doShift) {
2439  if (ibe == 0) {
2440  straw_edge_struct& this_struct = straw_edge_map[1].emplace_back(); // index 1 is Barrel
2441  this_struct.strawNumber = thisStrawNumber[ibe];
2442  this_struct.HitWonTMap_B_y = 1.0;
2443  scale_hHitWonTMap_B_passed[thisStrawNumber[ibe]]++;
2444  } else if (ibe == 1) {
2445  straw_edge_struct& this_struct = straw_edge_map[iside == 0 ? 2 : -2].emplace_back(); // index 2 is EA, index -2 is EC
2446  this_struct.strawNumber = thisStrawNumber[ibe];
2447  this_struct.HitWonTMap_E_y = 1.0;
2448  scale_hHitWonTMap_E_passed[iside][thisStrawNumber[ibe]]++;
2449  }
2450  }
2451  }
2452 
2453  if ((driftTimeBin > 2) && (driftTimeBin < 17)) {
2454  if (m_doExpert && m_doStraws) {
2455  HitWonTMapS = thisStrawNumber[ibe];
2456  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitWonTMapS);
2457 
2458  }
2459  if (m_doExpert && m_doChips) {
2460  HitWonTMapC = chip[ibe] - 1;
2461  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitWonTMapC);
2462  }
2463  }
2464 
2465  const int trailingEdge = RawDriftCircle->trailingEdge();
2466  float trailingEdgeScaled = (trailingEdge + 1) * 3.125;
2467 
2468  if ((trailingEdge < 23) &&
2469  !(RawDriftCircle->lastBinHigh()) &&
2470  !(RawDriftCircle->firstBinHigh())) {
2471  if (m_doExpert && m_doStraws) {
2472  HitTronTMapS_x = thisStrawNumber[ibe];
2473  HitTronTMapS_y = trailingEdgeScaled;
2474  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitTronTMapS_x, HitTronTMapS_y);
2475  }
2476 
2477  if (m_doExpert && m_doChips) {
2478  HitTronTMapC_x = chip[ibe] - 1;
2479  HitTronTMapC_y = trailingEdgeScaled;
2480  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitTronTMapC_x, HitTronTMapC_y);
2481  }
2482  }
2483 
2484  const bool firstBinHigh = RawDriftCircle->firstBinHigh();
2485  const bool lastBinHigh = RawDriftCircle->lastBinHigh();
2486 
2487  if (firstBinHigh || lastBinHigh || driftTimeBin > 0 || trailingEdge < 23) {
2488  if (m_doExpert && m_doStraws) {
2489  HitAonTMapS = thisStrawNumber[ibe];
2490  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitAonTMapS);
2491 
2492  if (!is_middleHTbit_high) {
2493  HtoLonTMapS = thisStrawNumber[ibe];
2494  HtoLonTMapS_passed = 0.0;
2495  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLonTMapS_passed, HtoLonTMapS);
2496  }
2497  }
2498 
2499  if (m_doExpert && m_doChips) {
2500  HitAonTMapC = chip[ibe] - 1;
2501  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitAonTMapC);
2502  if (!is_middleHTbit_high) {
2503  HtoLonTMapC = chip[ibe] - 1;
2504  HtoLonTMapC_passed = 0.0;
2505  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLonTMapC_passed, HtoLonTMapC);
2506  }
2507  }
2508 
2509  nTRTHitsW[ibe][iside]++;
2510 
2511  if (isArgonStraw) nTRTHitsW_Ar[ibe][iside]++;
2512  else nTRTHitsW_Xe[ibe][iside]++;
2513 
2514  nTRTHitsW_perwheel[iside][layer_or_wheel]++;
2515 
2516  if (is_middleHTbit_high) {
2517  nTRTHLHitsW[ibe][iside]++;
2518  if (isArgonStraw) nTRTHLHitsW_Ar[ibe][iside]++;
2519  else nTRTHLHitsW_Xe[ibe][iside]++;
2520  }
2521  }
2522 
2523  if (is_anybininVgate_high) {
2524  if (m_doExpert && m_doStraws) {
2525  HitAWonTMapS = thisStrawNumber[ibe];
2526  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitAWonTMapS);
2527 
2528  if (!is_middleHTbit_high) {
2529  HtoLWonTMapS = thisStrawNumber[ibe];
2530  HtoLWonTMapS_passed = 0.0;
2531  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLWonTMapS_passed, HtoLWonTMapS);
2532  }
2533  }
2534 
2535  if (m_doExpert && m_doChips) {
2536  HitAWonTMapC = chip[ibe] - 1;
2537  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HitAWonTMapC);
2538 
2539  if (!is_middleHTbit_high) {
2540  HtoLWonTMapC = chip[ibe] - 1;
2541  HtoLWonTMapC_passed = 0.0;
2542  fill("TRTTrackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLWonTMapC_passed, HtoLWonTMapC);
2543  }
2544  }
2545  }
2546  }
2547  }
2548 
2549  // ToDo: work on the part below
2550  for (int ibe = 0; ibe < 2; ibe++) {
2551  for (int i = 0; i < 64; i++)
2552  if (trackfound[ibe][i])
2553  ntrackstack[ibe][i]++;
2554 
2555  if (phi2D[ibe] < 0) continue;
2556 
2557 
2558  if (m_doShift) {
2559  if (ibe == 0) {
2560  if (isBarrelOnly) {
2561  if (nTRTHitsW[ibe][0] > 0) {
2562  if (nTRTHitsW[ibe][1] > 0) {
2563  NumSwLLWoT_B = nTRTHitsW[ibe][0] + nTRTHitsW[ibe][1];
2564  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), NumSwLLWoT_B);
2565  }
2566  else {
2567  NumSwLLWoT_B = nTRTHitsW[ibe][0];
2568  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), NumSwLLWoT_B);
2569  }
2570  } else if (nTRTHitsW[ibe][1] > 0) {
2571  NumSwLLWoT_B = nTRTHitsW[ibe][1];
2572  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), NumSwLLWoT_B);
2573  }
2574  }
2575 
2576  if (nTRTHLHitsW[ibe][0] > 0) {
2577  if (nTRTHLHitsW[ibe][1] > 0) {
2578  HLhitOnTrack_B = nTRTHLHitsW[ibe][0] + nTRTHLHitsW[ibe][1];
2579  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), HLhitOnTrack_B);
2580  } else {
2581  HLhitOnTrack_B = nTRTHLHitsW[ibe][0];
2582  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), HLhitOnTrack_B);
2583  }
2584  } else if (nTRTHLHitsW[ibe][1] > 0) {
2585  HLhitOnTrack_B = nTRTHLHitsW[ibe][1];
2586  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), HLhitOnTrack_B);
2587  }
2588 
2589  if (nTRTHitsW[ibe][0] + nTRTHitsW[ibe][1] > 0) {
2590  HtoLRatioOnTrack_B = (float)(nTRTHLHitsW[ibe][0] + nTRTHLHitsW[ibe][1]) / (nTRTHitsW[ibe][0] + nTRTHitsW[ibe][1]);
2591  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), HtoLRatioOnTrack_B);
2592  }
2593 
2594  if (nTRTHitsW_Ar[ibe][0] + nTRTHitsW_Ar[ibe][1] > 0) {
2595  HtoLRatioOnTrack_B_Ar = (float)(nTRTHLHitsW_Ar[ibe][0] + nTRTHLHitsW_Ar[ibe][1]) / (nTRTHitsW_Ar[ibe][0] + nTRTHitsW_Ar[ibe][1]);
2596  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), HtoLRatioOnTrack_B_Ar);
2597  }
2598 
2599  if (nTRTHitsW_Xe[ibe][0] + nTRTHitsW_Xe[ibe][1] > 0) {
2600  HtoLRatioOnTrack_B_Xe = (float)(nTRTHLHitsW_Xe[ibe][0] + nTRTHLHitsW_Xe[ibe][1]) / (nTRTHitsW_Xe[ibe][0] + nTRTHitsW_Xe[ibe][1]);
2601  fill("ShiftTRTTrackHistograms"+std::to_string(ibe), HtoLRatioOnTrack_B_Xe);
2602  }
2603  } else if (ibe == 1) {
2604  if (nTRTHitsW[ibe][0] > 0) {
2605  if (nTRTHitsW[ibe][1] > 0) {
2606  if (ECAhit && !ECChit && !Bhit) {
2607  NumSwLLWoT_E = nTRTHitsW[ibe][0];
2608  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+"0", NumSwLLWoT_E);
2609  }
2610 
2611  if (ECChit && !ECAhit && !Bhit) {
2612  NumSwLLWoT_E = nTRTHitsW[ibe][1];
2613  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+"1", NumSwLLWoT_E);
2614  }
2615  }
2616 
2617  if (ECAhit && !ECChit && !Bhit) {
2618  NumSwLLWoT_E = nTRTHitsW[ibe][0];
2619  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+"0", NumSwLLWoT_E);
2620  }
2621  } else if (nTRTHitsW[ibe][1] > 0) {
2622  if (ECChit && !ECAhit && !Bhit) {
2623  NumSwLLWoT_E = nTRTHitsW[ibe][1];
2624  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+"1", NumSwLLWoT_E);
2625  }
2626  }
2627 
2628  for (int iside = 0; iside < 2; iside++) {
2629  if (nTRTHLHitsW[ibe][iside] > 0) {
2630  HLhitOnTrack_E = nTRTHLHitsW[ibe][iside];
2631  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), HLhitOnTrack_E);
2632  }
2633 
2634  if ((nTRTHitsW[ibe][iside]) > 0) {
2635  HtoLRatioOnTrack_E = (float)(nTRTHLHitsW[ibe][iside]) / nTRTHitsW[ibe][iside];
2636  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), HtoLRatioOnTrack_E);
2637 
2638  if ((nTRTHitsW_Ar[ibe][iside]) > 0) {
2639  HtoLRatioOnTrack_E_Ar = (float)(nTRTHLHitsW_Ar[ibe][iside]) / nTRTHitsW_Ar[ibe][iside];
2640  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), HtoLRatioOnTrack_E_Ar);
2641  }
2642 
2643  if ((nTRTHitsW_Xe[ibe][iside]) > 0) {
2644  HtoLRatioOnTrack_E_Xe = (float)(nTRTHLHitsW_Xe[ibe][iside]) / nTRTHitsW_Xe[ibe][iside];
2645  fill("ShiftTRTTrackHistograms"+std::to_string(ibe)+std::to_string(iside), HtoLRatioOnTrack_E_Xe);
2646  }
2647  }
2648  }
2649  }
2650  }
2651  }
2652  }
2653 
2654  // Barrel straw normalization
2655  for (int k = 0; k < s_Straw_max[0]; k++) {
2656  try {
2657  if (scale_hHitWonTMap_B[k] - scale_hHitWonTMap_B_passed[k] >= 0) {
2658  for (int j = 0; j < scale_hHitWonTMap_B[k] - scale_hHitWonTMap_B_passed[k]; j++) {
2659  if (m_doStraws) {
2660  straw_edge_struct& this_struct = straw_edge_map[1].emplace_back(); // index 1 is Barrel
2661  this_struct.strawNumber = k;
2662  this_struct.HitWonTMap_B_y = 0;
2663  }
2664  }
2665  } else {
2666  ATH_MSG_ERROR("Scale value " << scale_hHitWonTMap_B[k] - scale_hHitWonTMap_B_passed[k] <<
2667  " is less than zero in scaling for Barrel, k = " << k);
2668  }
2669  } catch (out_of_range &e) {
2670  ATH_MSG_ERROR("Index " << k << " out of range in scaling for Barrel");
2671  }
2672  }
2673 
2674  // Endcap straw normalization
2675  for (int k = 0; k < s_Straw_max[1]; k++) {
2676  for (int iside = 0; iside < 2; iside++) {
2677  try {
2678  if (scale_hHitWonTMap_E[iside][k] - scale_hHitWonTMap_E_passed[iside][k] >= 0) {
2679  for (int j = 0; j < scale_hHitWonTMap_E[iside][k] - scale_hHitWonTMap_E_passed[iside][k]; j++) {
2680  if (m_doStraws) {
2681  straw_edge_struct& this_struct = straw_edge_map[iside == 0 ? 2 : -2].emplace_back(); // index 2 is EA, index -2 is EC
2682  this_struct.strawNumber = k;
2683  this_struct.HitWonTMap_E_y = 0;
2684  }
2685  }
2686  } else {
2687  ATH_MSG_ERROR("Scale value " << scale_hHitWonTMap_E[iside][k] - scale_hHitWonTMap_E_passed[iside][k] <<
2688  " is less than zero in scaling for Endcap, iside = " << iside << ", k = " << k);
2689  }
2690  } catch (out_of_range &e) {
2691  ATH_MSG_ERROR("Index " << k << " out of range in scaling for Endcap");
2692  }
2693  }
2694  }
2695 
2696  for (const auto& ibarrel_ecpair : straw_edge_map) {
2697  int ibe = abs(ibarrel_ecpair.first) - 1;
2698  int iside = ibarrel_ecpair.first > 0 ? 0 : 1;
2699  auto strawNumber = Monitored::Collection("strawNumber", ibarrel_ecpair.second, [](const auto& s){return s.strawNumber;});
2700  auto HitWonTMap_B_y = Monitored::Collection("HitWonTMap_B_y", ibarrel_ecpair.second, [](const auto& s){return s.HitWonTMap_B_y;});
2701  auto HitWonTMap_E_y = Monitored::Collection("HitWonTMap_E_y", ibarrel_ecpair.second, [](const auto& s){return s.HitWonTMap_E_y;});
2702  if (ibe == 0) {
2703  fill("ShiftTRTTrackHistograms0", strawNumber, HitWonTMap_B_y);
2704  } else if (ibe == 1) {
2705  fill("ShiftTRTTrackHistograms1"+std::to_string(iside), strawNumber, HitWonTMap_E_y);
2706  }
2707  }
2708 
2709  return StatusCode::SUCCESS;
2710 }

◆ fillTRTRDOs()

StatusCode TRTMonitoringRun3RAW_Alg::fillTRTRDOs ( const EventContext &  ctx,
const TRT_RDO_Container rdoContainer,
const xAOD::EventInfo eventInfo,
const InDetTimeCollection trtBCIDCollection 
) const
private

Definition at line 702 of file TRTMonitoringRun3RAW_Alg.cxx.

705  {
706 //----------------------------------------------------------------------------------//
707  ATH_MSG_DEBUG("Filling TRT RDO Histograms");
708 
709  // TProfile
710  auto HitToTLongTrMapS_x = Monitored::Scalar<float>("HitToTLongTrMapS_x", 0.0);
711  auto HitToTLongTrMapS_y = Monitored::Scalar<float>("HitToTLongTrMapS_y", 0.0);
712  auto HitToTLongMapS_x = Monitored::Scalar<float>("HitToTLongMapS_x", 0.0);
713  auto HitToTLongMapS_y = Monitored::Scalar<float>("HitToTLongMapS_y", 0.0);
714  auto BCIDvsOcc_x = Monitored::Scalar<float>("BCIDvsOcc_x", 0.0);
715  auto BCIDvsOcc_y = Monitored::Scalar<float>("BCIDvsOcc_y", 0.0);
716  auto AvgHLOcc_side_x = Monitored::Scalar<float>("AvgHLOcc_side_x", 0.0);
717  auto AvgHLOcc_side_y = Monitored::Scalar<float>("AvgHLOcc_side_y", 0.0);
718  auto AvgLLOcc_side_x = Monitored::Scalar<float>("AvgLLOcc_side_x", 0.0);
719  auto AvgLLOcc_side_y = Monitored::Scalar<float>("AvgLLOcc_side_y", 0.0);
720  auto AvgLLOccMod_side_x = Monitored::Scalar<float>("AvgLLOccMod_side_x", 0.0);
721  auto AvgLLOccMod_side_y = Monitored::Scalar<float>("AvgLLOccMod_side_y", 0.0);
722  auto AvgHLOccMod_side_x = Monitored::Scalar<float>("AvgHLOccMod_side_x", 0.0);
723  auto AvgHLOccMod_side_y = Monitored::Scalar<float>("AvgHLOccMod_side_y", 0.0);
724  auto ChipBSErrorsVsLB_x = Monitored::Scalar<float>("ChipBSErrorsVsLB_x", 0.0);
725  auto ChipBSErrorsVsLB_y = Monitored::Scalar<float>("ChipBSErrorsVsLB_y", 0.0);
726  auto RobBSErrorsVsLB_x = Monitored::Scalar<float>("RobBSErrorsVsLB_x", 0.0);
727  auto RobBSErrorsVsLB_y = Monitored::Scalar<float>("RobBSErrorsVsLB_y", 0.0);
728  auto NHitsperLB_x = Monitored::Scalar<float>("NHitsperLB_x", 0.0);
729  auto NHitsperLB_y = Monitored::Scalar<float>("NHitsperLB_y", 0.0);
730  auto NHLHitsperLB_x = Monitored::Scalar<float>("NHLHitsperLB_x", 0.0);
731  auto NHLHitsperLB_y = Monitored::Scalar<float>("NHLHitsperLB_y", 0.0);
732 
733  // TH1F
734  auto OccAll = Monitored::Scalar<float>("OccAll", 0.0);
735 
736  // TH2F
737 
738  // TEfficiency
739  auto HtoLMapS = Monitored::Scalar<float>("HtoLMapS", 0.0);
740  auto HtoLMapS_passed = Monitored::Scalar<bool>("HtoLMapS_passed", false);
741  auto HtoLMapC = Monitored::Scalar<float>("HtoLMapC", 0.0);
742  auto HtoLMapC_passed = Monitored::Scalar<bool>("HtoLMapC_passed", false);
743  auto OccupancyC = Monitored::Scalar<float>("OccupancyC", 0.0);
744  auto OccupancyC_passed = Monitored::Scalar<bool>("OccupancyC_passed", false);
745  auto StrawOcc = Monitored::Scalar<float>("StrawOcc", 0.0);
746  auto StrawOcc_passed = Monitored::Scalar<bool>("StrawOcc_passed", false);
747 
748  const unsigned int lumiBlock = eventInfo.lumiBlock();
749  ATH_MSG_VERBOSE("This is lumiblock : " << lumiBlock);
750  auto good_bcid = eventInfo.bcid();
751 
752  TRT_RDO_Container::const_iterator RDO_CollectionBegin = rdoContainer.begin();
753  TRT_RDO_Container::const_iterator RDO_CollectionEnd = rdoContainer.end();
754  //Check readout Integrity of TRT
755  ATH_CHECK( checkTRTReadoutIntegrity(eventInfo) );
756  int numberOfStacks_b[2]; //Total stack number of barrel and endcap
757  numberOfStacks_b[0] = s_numberOfBarrelStacks * 3;
758  numberOfStacks_b[1] = s_numberOfEndCapStacks * 2;
759  Identifier TRT_Identifier;
760  int numberOfStrawsMod[3]; // For barrel(number if straw in module)
761  numberOfStrawsMod[0] = 329;
762  numberOfStrawsMod[1] = 520;
763  numberOfStrawsMod[2] = 793;
764  int numberOfStrawsWheel[2]; // For endcap
765  numberOfStrawsWheel[0] = 2304; //6 layers (6*16=96) 96*24=2304 straws in wheel type A
766  numberOfStrawsWheel[1] = 1536; //8 layers (8*8=64) 64*24=1536 straws in wheel type B
767  int moduleHits_B[192];
768  int moduleHits_E[128];
769  int HLmoduleHits_B[192];
770  int HLmoduleHits_E[128];
771  int nHitsperLB_B = 0;
772  int nHLHitsperLB_B = 0;
773  int nHitsperLB_E[2] = {0, 0};
774  int nHLHitsperLB_E[2] = {0, 0};
775 
776  for (int i = 0; i < 192; i++) {
777  moduleHits_B[i] = 0;
778  HLmoduleHits_B[i] = 0;
779  }
780 
781  for (int i = 0; i < 128; i++) {
782  moduleHits_E[i] = 0;
783  HLmoduleHits_E[i] = 0;
784  }
785 
786  auto scale_hHitWMap_B_passed = std::make_unique<short int[][s_Straw_max[0]]>(2);
787  auto scale_hHitWMap_E_passed = std::make_unique<short int[][2][s_Straw_max[1]]>(2);
788 
789  auto scale_hHitHWMapS_B_passed = std::make_unique<short int[][s_Straw_max[0]]>(s_numberOfBarrelStacks*2);
790  auto scale_hHitHWMapC_B_passed = std::make_unique<short int[][s_iChip_max[0]]>(s_numberOfBarrelStacks*2);
791  auto scale_hHitWMapS_B_passed = std::make_unique<short int[][s_Straw_max[0]]>(s_numberOfBarrelStacks*2);
792  auto scale_hHitWMapC_B_passed = std::make_unique<short int[][s_iChip_max[0]]>(s_numberOfBarrelStacks*2);
793  auto scale_hHitAMapS_B_passed = std::make_unique<short int[][s_Straw_max[0]]>(s_numberOfBarrelStacks*2);
794  auto scale_hHitAMapC_B_passed = std::make_unique<short int[][s_iChip_max[0]]>(s_numberOfBarrelStacks*2);
795  auto scale_hHitAWMapS_B_passed = std::make_unique<short int[][s_Straw_max[0]]>(s_numberOfBarrelStacks*2);
796  auto scale_hHitAWMapC_B_passed = std::make_unique<short int[][s_iChip_max[0]]>(s_numberOfBarrelStacks*2);
797  auto scale_hHitHMapS_B_passed = std::make_unique<short int[][s_Straw_max[0]]>(s_numberOfBarrelStacks*2);
798  auto scale_hHitHMapC_B_passed = std::make_unique<short int[][s_iChip_max[0]]>(s_numberOfBarrelStacks*2);
799 
800  auto scale_hHitHWMapS_E_passed = std::make_unique<short int[][s_Straw_max[1]]>(s_numberOfEndCapStacks*2);
801  auto scale_hHitHWMapC_E_passed = std::make_unique<short int[][s_iChip_max[1]]>(s_numberOfEndCapStacks*2);
802  auto scale_hHitWMapS_E_passed = std::make_unique<short int[][s_Straw_max[1]]>(s_numberOfEndCapStacks*2);
803  auto scale_hHitWMapC_E_passed = std::make_unique<short int[][s_iChip_max[1]]>(s_numberOfEndCapStacks*2);
804  auto scale_hHitAMapS_E_passed = std::make_unique<short int[][s_Straw_max[1]]>(s_numberOfEndCapStacks*2);
805  auto scale_hHitAMapC_E_passed = std::make_unique<short int[][s_iChip_max[1]]>(s_numberOfEndCapStacks*2);
806  auto scale_hHitAWMapS_E_passed = std::make_unique<short int[][s_Straw_max[1]]>(s_numberOfEndCapStacks*2);
807  auto scale_hHitAWMapC_E_passed = std::make_unique<short int[][s_iChip_max[1]]>(s_numberOfEndCapStacks*2);
808  auto scale_hHitHMapS_E_passed = std::make_unique<short int[][s_Straw_max[1]]>(s_numberOfEndCapStacks*2);
809  auto scale_hHitHMapC_E_passed = std::make_unique<short int[][s_iChip_max[1]]>(s_numberOfEndCapStacks*2);
810 
811  int goodid_status = 0;
812  int prev_bcid = 0;
813 
814  if (trtBCIDCollection) {
815  InDetTimeCollection::const_iterator itrt_bcid = trtBCIDCollection->begin();
816 
817  while (goodid_status == 0 && itrt_bcid != trtBCIDCollection->end()) {
818 
819  const unsigned int trt_bcid = (*itrt_bcid).second;
820 
821  if (itrt_bcid > trtBCIDCollection->begin() && prev_bcid - trt_bcid == 0) {
822  goodid_status = 1;
823  } else if (itrt_bcid > trtBCIDCollection->begin() && prev_bcid - trt_bcid != 0) {
824  ATH_MSG_WARNING("TRT BCID is not consistent. TRT RODID is " <<
825  std::hex << (*itrt_bcid).first << " trt bcid from ROD is " <<
826  std::hex << trt_bcid);
827  }
828 
829  prev_bcid = trt_bcid;
830  ++itrt_bcid;
831  }
832  }
833 
834  // Test out the TRT_StrawStatusSummarySvc.
835  if (!m_sumTool.name().empty() && m_doExpert) {
836  ATH_MSG_VERBOSE("Trying " << m_sumTool << " isGood");
837  ATH_MSG_VERBOSE("TRT_StrawStatusTool reports status = " << m_sumTool->getStatus(TRT_Identifier, ctx));
838  }
839 
840  // ibe = 0 (Barrel), ibe = 1 (Endcap)
841  int nTRTHits[2];
842  for (int ibe = 0; ibe < 2; ibe++) {
843  nTRTHits[ibe] = 0;
844 
845  // Insert here
846  // Scaling for online environment
847 
848  }
849 
850  int nhitsall = 0;
851 
852  std::map<int,std::map<int, std::vector<straw_struct>>> straw_map;
853  std::map<int,std::map<int, std::vector<chip_struct>>> chip_map;
854  std::map<int,std::vector<straw_shifter_struct>> straw_shifter_map;
855  std::map<int,std::map<int, std::vector<straw_struct_prob>>> straw_map_prob;
856  std::map<int,std::map<int, std::vector<chip_struct_prob>>> chip_map_prob;
857 
858  std::vector<std::vector<std::vector<int>>> scale_hHitWMap = initScaleVectors(ctx);
859 
860  for (; RDO_CollectionBegin != RDO_CollectionEnd; ++RDO_CollectionBegin) {
861  const InDetRawDataCollection<TRT_RDORawData> *TRT_Collection(*RDO_CollectionBegin);
862 
863  if (!TRT_Collection) continue;
864 
865  DataVector<TRT_RDORawData>::const_iterator p_rdo = TRT_Collection->begin();
866 
867  for (; p_rdo != TRT_Collection->end(); ++p_rdo) {
868  int middleHTbit = (*p_rdo)->getWord() & 0x00020000;
869  //0x00020000 = 0000 0000 0000 0000 0000 0010 0000 0000 0000 0000
870  int hitinvaliditygate = (*p_rdo)->getWord() & 0x000DFE80;
871  //0x000DFE80 = 0000 0000 0000 0000 0000 1101 1111 1110 1000 0000 //
872  bool is_middleHTbit_high = (middleHTbit != 0);
873  bool is_anybininVgate_high = (hitinvaliditygate != 0);
874  TRT_Identifier = (*p_rdo)->identify();
875 
876  if (m_doMaskStraws && m_sumTool->get_status(TRT_Identifier, ctx)) continue;
877 
878  int barrel_ec = m_pTRTHelper->barrel_ec(TRT_Identifier);
879  //ToDo: Check TRT_LoLumRawData object
880  const TRT_LoLumRawData *p_lolum = dynamic_cast<const TRT_LoLumRawData *>(*p_rdo);
881 
882  if (!p_lolum) continue;
883 
884  nhitsall++;
885  int ibe = abs(barrel_ec) - 1;
886  int iside = barrel_ec > 0 ? 0 : 1;
887 
888  //if barrel_ec is outof range go to next measurement in rdo_collection
889  if (ibe != 1 && ibe != 0) {
890  ATH_MSG_DEBUG("TRT part retrieved from TRT Identifier is not a barrel or an endcap");
891  continue;
892  }
893 
894  int moduleNumber_barrel1[2];
895  int moduleNumber_barrel2[2];
896  int moduleNumber_barrel3[2];
897  int moduleNumber_endcapA[2];
898  int moduleNumber_endcapB[2];
899  // Get TRT Identifier
900  // Need to know phi module, module layer, straw layer, and straw # within the layer
901  // To get proper straw numbering
902  TRT_Identifier = p_lolum->identify();
903  //inline function checks m_ArgonXenonSplitter
904  const bool isArgonStraw = (Straw_Gastype( m_sumTool->getStatusHT(TRT_Identifier, ctx) ) == GasType::Ar);
905  int phi_module = m_pTRTHelper->phi_module(TRT_Identifier);
906  int layer_or_wheel = m_pTRTHelper->layer_or_wheel(TRT_Identifier);
907  int straw_layer = m_pTRTHelper->straw_layer(TRT_Identifier);
908  int straw = m_pTRTHelper->straw(TRT_Identifier);
909  int thisStrawNumber;
910  int chip = 0;
911  int board = -1;
912  //ToDo: Check if that is really neccessary
913  bool is_barrel = m_pTRTHelper->is_barrel(TRT_Identifier);
914 
915  //Сheck straw number and find the correct chip and m_ board values
916  if ( is_barrel && ibe == 0 ) {
917  thisStrawNumber = strawNumber(straw, straw_layer, layer_or_wheel);
918 
919  if (thisStrawNumber >= 0 && thisStrawNumber < s_Straw_max[ibe]) {
920  chip = m_mat_chip_B.at(phi_module).at(thisStrawNumber);
921  }
922 
923  board = chipToBoard(chip);
924 
925  } else if ( !is_barrel && ibe == 1 ) {
926  thisStrawNumber = strawNumberEndCap(straw, straw_layer, layer_or_wheel, phi_module, barrel_ec);
927 
928  if (thisStrawNumber >= 0 && thisStrawNumber < s_Straw_max[ibe]) {
929  chip = m_mat_chip_E.at(phi_module).at(thisStrawNumber);
930  }
931 
932  board = chipToBoard_EndCap(chip);
933  } else {
934  thisStrawNumber = -1;
935  }
936 
937  if (thisStrawNumber < 0 || thisStrawNumber >= s_Straw_max[ibe]) {
938  ATH_MSG_WARNING("Found m_strawNumber = " << thisStrawNumber << " out of range.");
939  continue;
940  }
941  const int driftTimeBin = p_lolum->driftTimeBin();
942  const int trailingEdge = p_lolum->trailingEdge();
943  const bool highlevel = is_middleHTbit_high; //Hardcoded Middle Bit
944  const bool firstBinHigh = p_lolum->firstBinHigh(); // If the first time bin is up then the hit is out of time window
945  const bool lastBinHigh = p_lolum->lastBinHigh(); // If the last bin is up then the hit is out of time window.
946  const float timeOverThreshold = p_lolum->timeOverThreshold();
947  moduleNumber_barrel1[0] = phi_module;
948  moduleNumber_barrel1[1] = phi_module + 96;
949  moduleNumber_barrel2[0] = phi_module + s_numberOfBarrelStacks;
950  moduleNumber_barrel2[1] = phi_module + s_numberOfBarrelStacks + 96;
951  moduleNumber_barrel3[0] = phi_module + 2*s_numberOfBarrelStacks;
952  moduleNumber_barrel3[1] = phi_module + 2*s_numberOfBarrelStacks + 96;
953  moduleNumber_endcapA[0] = phi_module;
954  moduleNumber_endcapA[1] = phi_module + 64;
955  moduleNumber_endcapB[0] = phi_module + s_numberOfEndCapStacks;
956  moduleNumber_endcapB[1] = phi_module + s_numberOfEndCapStacks + 64;
957  int iphi_module = -999;
958 
959  if (iside == 0) {
960  iphi_module = phi_module;
961  } else if (iside == 1) {
962  iphi_module = phi_module + 32;
963  }
964 
965  if (m_doStraws) {
966  straw_shifter_struct& this_struct = straw_shifter_map[barrel_ec].emplace_back();
967  this_struct.strawNumber = thisStrawNumber;
968  this_struct.isAr = isArgonStraw;
969  this_struct.HitWMap_passed = true;
970  this_struct.HitWMap_Ar_passed = true;
971  if (abs(barrel_ec) == 1) scale_hHitWMap_B_passed[isArgonStraw ? 1 : 0][thisStrawNumber]++;
972  if (abs(barrel_ec) == 2) scale_hHitWMap_E_passed[barrel_ec < 0 ? 1 : 0][isArgonStraw ? 1 : 0][thisStrawNumber]++;
973  }
974 
975  nTRTHits[ibe]++;
976  if (ibe == 0) {
977 
978  if (m_doShift) {
979  nHitsperLB_B++;
980 
981  if (highlevel) {
982  nHLHitsperLB_B++;
983  }
984  }
985  } else if (ibe == 1) {
986  nTRTHits[ibe]++;
987 
988  if (m_doShift) {
989  nHitsperLB_E[iside]++;
990 
991  if (highlevel) {
992  nHLHitsperLB_E[iside]++;
993  }
994  }
995  }
996 
997  if (m_doExpert) {
998  if (m_doStraws) {
999  straw_struct_prob& this_struct = straw_map_prob[ibe][iphi_module].emplace_back();
1000  this_struct.strawNumber = thisStrawNumber;
1001  this_struct.HitHWMapS_cut = highlevel && is_middleHTbit_high;
1002  this_struct.HitWMapS_cut = (driftTimeBin > 2) && (driftTimeBin < 17);
1003  this_struct.HitAMapS_cut = (firstBinHigh || lastBinHigh || (driftTimeBin > 0) || (trailingEdge < 23));
1004  this_struct.HitAWMapS_cut = is_anybininVgate_high;
1005  this_struct.HitHMapS_cut = highlevel;
1006  this_struct.HitHWMapS_passed = 1.;
1007  this_struct.HitWMapS_passed = 1.;
1008  this_struct.HitAMapS_passed = 1.;
1009  this_struct.HitAWMapS_passed = 1.;
1010  this_struct.HitHMapS_passed = 1.;
1011  if (ibe == 0) {
1012  if (highlevel && is_middleHTbit_high) scale_hHitHWMapS_B_passed[iphi_module][thisStrawNumber]++;
1013  if ((driftTimeBin > 2) && (driftTimeBin < 17)) scale_hHitWMapS_B_passed[iphi_module][thisStrawNumber]++;
1014  if (firstBinHigh || lastBinHigh || (driftTimeBin > 0) || (trailingEdge < 23)) scale_hHitAMapS_B_passed[iphi_module][thisStrawNumber]++;
1015  if (is_anybininVgate_high) scale_hHitAWMapS_B_passed[iphi_module][thisStrawNumber]++;
1016  if (highlevel) scale_hHitHMapS_B_passed[iphi_module][thisStrawNumber]++;
1017  }
1018  if (ibe == 1) {
1019  if (highlevel && is_middleHTbit_high) scale_hHitHWMapS_E_passed[iphi_module][thisStrawNumber]++;
1020  if ((driftTimeBin > 2) && (driftTimeBin < 17)) scale_hHitWMapS_E_passed[iphi_module][thisStrawNumber]++;
1021  if (firstBinHigh || lastBinHigh || (driftTimeBin > 0) || (trailingEdge < 23)) scale_hHitAMapS_E_passed[iphi_module][thisStrawNumber]++;
1022  if (is_anybininVgate_high) scale_hHitAWMapS_E_passed[iphi_module][thisStrawNumber]++;
1023  if (highlevel) scale_hHitHMapS_E_passed[iphi_module][thisStrawNumber]++;
1024  }
1025  }
1026 
1027  float trailingEdgeScaled = (trailingEdge + 1)*3.125;
1028 
1029  if (m_doStraws) {
1030  straw_struct& this_struct = straw_map[ibe][iphi_module].emplace_back();
1031  this_struct.strawNumber = thisStrawNumber;
1032  this_struct.HitTrMapS_y = trailingEdgeScaled;
1033  this_struct.HitToTMapS_y = timeOverThreshold;
1034  this_struct.HitToTLong_cut = (timeOverThreshold > m_longToTCut);
1035  this_struct.HitTrWMapS_y = trailingEdgeScaled;
1036  this_struct.HitTrWMapS_cut = (trailingEdge < 23) && !lastBinHigh && !firstBinHigh;
1037 
1038  if (highlevel) {
1039  HtoLMapS = thisStrawNumber;
1040  HtoLMapS_passed = 1.0;
1041  fill("RDOStackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLMapS_passed, HtoLMapS);
1042  } else {
1043  HtoLMapS = thisStrawNumber;
1044  HtoLMapS_passed = 0.0;
1045  fill("RDOStackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLMapS_passed, HtoLMapS);
1046  }
1047  }
1048 
1049  if (m_doChips) {
1050  chip_struct_prob& this_struct = chip_map_prob[ibe][iphi_module].emplace_back();
1051  this_struct.chipNumber = chip - 1;
1052  this_struct.HitHWMapC_cut = highlevel && is_middleHTbit_high;
1053  this_struct.HitWMapC_cut = (driftTimeBin > 2) && (driftTimeBin < 17);
1054  this_struct.HitAMapC_cut = (firstBinHigh || lastBinHigh || (driftTimeBin > 0) || (trailingEdge < 23));
1055  this_struct.HitAWMapC_cut = is_anybininVgate_high;
1056  this_struct.HitHMapC_cut = highlevel;
1057  this_struct.HitHWMapC_passed = 1.;
1058  this_struct.HitWMapC_passed = 1.;
1059  this_struct.HitAMapC_passed = 1.;
1060  this_struct.HitAWMapC_passed = 1.;
1061  this_struct.HitHMapC_passed = 1.;
1062  if (ibe == 0) {
1063  if (highlevel && is_middleHTbit_high) scale_hHitHWMapC_B_passed[iphi_module][chip - 1]++;
1064  if ((driftTimeBin > 2) && (driftTimeBin < 17)) scale_hHitWMapC_B_passed[iphi_module][chip - 1]++;
1065  if (firstBinHigh || lastBinHigh || (driftTimeBin > 0) || (trailingEdge < 23)) scale_hHitAMapC_B_passed[iphi_module][chip - 1]++;
1066  if (is_anybininVgate_high) scale_hHitAWMapC_B_passed[iphi_module][chip - 1]++;
1067  if (highlevel) scale_hHitHMapC_B_passed[iphi_module][chip - 1]++;
1068  }
1069  if (ibe == 1) {
1070  if (highlevel && is_middleHTbit_high) scale_hHitHWMapC_E_passed[iphi_module][chip - 1]++;
1071  if ((driftTimeBin > 2) && (driftTimeBin < 17)) scale_hHitWMapC_E_passed[iphi_module][chip - 1]++;
1072  if (firstBinHigh || lastBinHigh || (driftTimeBin > 0) || (trailingEdge < 23)) scale_hHitAMapC_E_passed[iphi_module][chip - 1]++;
1073  if (is_anybininVgate_high) scale_hHitAWMapC_E_passed[iphi_module][chip - 1]++;
1074  if (highlevel) scale_hHitHMapC_E_passed[iphi_module][chip - 1]++;
1075  }
1076  }
1077 
1078  if (m_doChips) {
1079  chip_struct& this_struct = chip_map[ibe][iphi_module].emplace_back();
1080  this_struct.chipNumber = chip - 1;
1081  this_struct.HitTrMapC_y = trailingEdgeScaled;
1082  this_struct.HitToTMapC_y = timeOverThreshold;
1083  this_struct.HitTrWMapC_cut = (trailingEdge < 23) && !lastBinHigh && !firstBinHigh;
1084  this_struct.HtoBCMap_cut = false;
1085  this_struct.HtoBCMapB_y = board - 1;
1086  this_struct.HtoBCMapC_x = -1;
1087  this_struct.HtoBCMapB_x = -1;
1088  if (p_lolum->highLevel(1)) {
1089  this_struct.HtoBCMapC_x = 0.;
1090  this_struct.HtoBCMapB_x = 0.;
1091  this_struct.HtoBCMap_cut=true;
1092  }
1093 
1094  if (p_lolum->highLevel(2)) {
1095  this_struct.HtoBCMapC_x = 1.;
1096  this_struct.HtoBCMapB_x = 1.;
1097  this_struct.HtoBCMap_cut=true;
1098  }
1099 
1100  if (p_lolum->highLevel(3)) {
1101  this_struct.HtoBCMapC_x = 2.;
1102  this_struct.HtoBCMapB_x = 2.;
1103  this_struct.HtoBCMap_cut=true;
1104  }
1105 
1106  if (highlevel) {
1107  HtoLMapC = chip - 1;
1108  HtoLMapC_passed = 1.0;
1109  fill("RDOStackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLMapC_passed, HtoLMapC);
1110  } else {
1111  HtoLMapC = chip - 1;
1112  HtoLMapC_passed = 0.0;
1113  fill("RDOStackHistograms"+std::to_string(ibe)+std::to_string(iphi_module), HtoLMapC_passed, HtoLMapC);
1114  }
1115  }
1116  }
1117 
1118  //Set Module Numbers.
1119  int moduleNumber = -1;
1120 
1121  if (ibe == 0) {
1122  if (layer_or_wheel == 0) {
1123  moduleNumber = moduleNumber_barrel1[iside];
1124  moduleHits_B[moduleNumber]++;
1125  } else if (layer_or_wheel == 1) {
1126  moduleNumber = moduleNumber_barrel2[iside];
1127  moduleHits_B[moduleNumber]++;
1128  } else if (layer_or_wheel == 2) {
1129  moduleNumber = moduleNumber_barrel3[iside];
1130  moduleHits_B[moduleNumber]++;
1131  }
1132 
1133  if (highlevel) {
1134  if (layer_or_wheel == 0) {
1135  moduleNumber = moduleNumber_barrel1[iside];
1136  HLmoduleHits_B[moduleNumber]++;
1137  } else if (layer_or_wheel == 1) {
1138  moduleNumber = moduleNumber_barrel2[iside];
1139  HLmoduleHits_B[moduleNumber]++;
1140  } else if (layer_or_wheel == 2) {
1141  moduleNumber = moduleNumber_barrel3[iside];
1142  HLmoduleHits_B[moduleNumber]++;
1143  }
1144  }
1145  } else if (ibe == 1) {
1146  if (layer_or_wheel < 6) {
1147  moduleNumber = moduleNumber_endcapA[iside];
1148  moduleHits_E[moduleNumber]++;
1149  } else if (layer_or_wheel > 5) {
1150  moduleNumber = moduleNumber_endcapB[iside];
1151  moduleHits_E[moduleNumber]++;
1152  }
1153 
1154  if (highlevel) {
1155  if (layer_or_wheel < 6) {
1156  moduleNumber = moduleNumber_endcapA[iside];
1157  HLmoduleHits_E[moduleNumber]++;
1158  } else if (layer_or_wheel > 5) {
1159  moduleNumber = moduleNumber_endcapB[iside];
1160  HLmoduleHits_E[moduleNumber]++;
1161  }
1162  }
1163  }
1164  }
1165  }
1166 
1167  // Barrel straw normalization
1168  for (int k = 0; k < s_Straw_max[0]; k++) {
1169  for (int iGas = 0; iGas < 2; iGas++) {
1170  try {
1171  if (scale_hHitWMap[0][iGas].at(k) - scale_hHitWMap_B_passed[iGas][k] >= 0) {
1172  for (int j = 0; j < scale_hHitWMap[0][iGas].at(k) - scale_hHitWMap_B_passed[iGas][k]; j++) {
1173  if (m_doStraws) {
1174  straw_shifter_struct& this_struct = straw_shifter_map[1].emplace_back(); // index 1 is Barrel
1175  this_struct.strawNumber = k;
1176  this_struct.isAr = iGas > 0 ? true : false;
1177  this_struct.HitWMap_passed = false;
1178  this_struct.HitWMap_Ar_passed = false;
1179  }
1180  }
1181  } else {
1182  ATH_MSG_ERROR("Scale value " << scale_hHitWMap[0][iGas].at(k) - scale_hHitWMap_B_passed[iGas][k] <<
1183  " is less than zero in scaling for Barrel, iGas = " << iGas << ", k = " << k);
1184  }
1185  } catch (out_of_range &e) {
1186  ATH_MSG_ERROR("Index " << k << " out of range in scaling for Barrel");
1187  }
1188  }
1189  }
1190 
1191  // Endcap straw normalization
1192  for (int k = 0; k < s_Straw_max[1]; k++) {
1193  for (int iside = 0; iside < 2; iside++) {
1194  for (int iGas = 0; iGas < 2; iGas++) {
1195  try {
1196  if (scale_hHitWMap[iside + 1][iGas].at(k) - scale_hHitWMap_E_passed[iside][iGas][k] >= 0) {
1197  for (int j = 0; j < scale_hHitWMap[iside + 1][iGas].at(k) - scale_hHitWMap_E_passed[iside][iGas][k]; j++) {
1198  if (m_doStraws) {
1199  straw_shifter_struct& this_struct = straw_shifter_map[iside == 0 ? 2 : -2].emplace_back(); // index 2 is EA, index -2 is EC
1200  this_struct.strawNumber = k;
1201  this_struct.isAr = iGas > 0 ? true : false;
1202  this_struct.HitWMap_passed = false;
1203  this_struct.HitWMap_Ar_passed = false;
1204  }
1205  }
1206  } else {
1207  ATH_MSG_ERROR("Scale value " << scale_hHitWMap[iside + 1][iGas].at(k) - scale_hHitWMap_E_passed[iside][iGas][k] <<
1208  " is less than zero in scaling for Endcap, iside = " << iside << ", iGas = " << iGas << ", k = " << k);
1209  }
1210  } catch (out_of_range &e) {
1211  ATH_MSG_ERROR("Index " << k << " out of range in scaling for Endcap");
1212  }
1213  }
1214  }
1215  }
1216 
1217  if (m_doExpert) {
1218  // Barrel straw normalization
1219  for (int k = 0; k < s_Straw_max[0]; k++) {
1220  for (int iside = 0; iside < 2; iside++) {
1221  for (int phi_module = 0; phi_module < s_numberOfBarrelStacks; phi_module++) {
1222  int iphi_module = -999;;
1223  if (iside == 0) iphi_module = phi_module; else if (iside == 1) iphi_module = phi_module + 32;
1224  if (scale_hHitHWMapS_B_passed[iphi_module][k] < 2 || scale_hHitWMapS_B_passed[iphi_module][k] < 2 ||
1225  scale_hHitAMapS_B_passed[iphi_module][k] < 2 || scale_hHitAWMapS_B_passed[iphi_module][k] < 2 ||
1226  scale_hHitHMapS_B_passed[iphi_module][k] < 2) {
1227  for (int l = 0; l < 1 - scale_hHitHWMapS_B_passed[iphi_module][k]; l++){
1228  straw_struct_prob& this_struct = straw_map_prob[0][iphi_module].emplace_back(); // index 0 is Barrel, A and C are splitted by iphi_module
1229  this_struct.strawNumber = k;
1230  this_struct.HitHWMapS_cut = true;
1231  this_struct.HitHWMapS_passed = false;
1232  }
1233  for (int l = 0; l < 1 - scale_hHitWMapS_B_passed[iphi_module][k]; l++){
1234  straw_struct_prob& this_struct = straw_map_prob[0][iphi_module].emplace_back();
1235  this_struct.strawNumber = k;
1236  this_struct.HitWMapS_cut = true;
1237  this_struct.HitWMapS_passed = false;
1238  }
1239  for (int l = 0; l < 1 - scale_hHitAMapS_B_passed[iphi_module][k]; l++){
1240  straw_struct_prob& this_struct = straw_map_prob[0][iphi_module].emplace_back();
1241  this_struct.strawNumber = k;
1242  this_struct.HitAMapS_cut = true;
1243  this_struct.HitAMapS_passed = false;
1244  }
1245  for (int l = 0; l < 1 - scale_hHitAWMapS_B_passed[iphi_module][k]; l++){
1246  straw_struct_prob& this_struct = straw_map_prob[0][iphi_module].emplace_back();
1247  this_struct.strawNumber = k;
1248  this_struct.HitAWMapS_cut = true;
1249  this_struct.HitAWMapS_passed = false;
1250  }
1251  for (int l = 0; l < 1 - scale_hHitHMapS_B_passed[iphi_module][k]; l++){
1252  straw_struct_prob& this_struct = straw_map_prob[0][iphi_module].emplace_back();
1253  this_struct.strawNumber = k;
1254  this_struct.HitHMapS_cut = true;
1255  this_struct.HitHMapS_passed = false;
1256  }
1257  } else{
1258  ATH_MSG_ERROR("Scale value is less than zero in normalization for Barrel straw!");
1259  }
1260  }
1261  }
1262  }
1263 
1264  // Barrel chip normalization
1265  for (int k = 0; k < s_iChip_max[0]; k++) {
1266  for (int iside = 0; iside < 2; iside++) {
1267  for (int phi_module = 0; phi_module < s_numberOfBarrelStacks; phi_module++) {
1268  int iphi_module = -999;;
1269  if (iside == 0) iphi_module = phi_module; else if (iside == 1) iphi_module = phi_module + 32;
1270  if (scale_hHitHWMapC_B_passed[iphi_module][k] < 17 || scale_hHitWMapC_B_passed[iphi_module][k] < 17 ||
1271  scale_hHitAMapC_B_passed[iphi_module][k] < 17 || scale_hHitAWMapC_B_passed[iphi_module][k] < 17 ||
1272  scale_hHitHMapC_B_passed[iphi_module][k] < 17) {
1273  for (int l = 0; l < 16*1. - scale_hHitHWMapC_B_passed[iphi_module][k]; l++){
1274  chip_struct_prob& this_struct = chip_map_prob[0][iphi_module].emplace_back(); // index 0 is Barrel, A and C are splitted by iphi_module
1275  this_struct.chipNumber = k;
1276  this_struct.HitHWMapC_cut = true;
1277  this_struct.HitHWMapC_passed = false;
1278  }
1279  for (int l = 0; l < 16*1. - scale_hHitWMapC_B_passed[iphi_module][k]; l++){
1280  chip_struct_prob& this_struct = chip_map_prob[0][iphi_module].emplace_back();
1281  this_struct.chipNumber = k;
1282  this_struct.HitWMapC_cut = true;
1283  this_struct.HitWMapC_passed = false;
1284  }
1285  for (int l = 0; l < 16*1. - scale_hHitAMapC_B_passed[iphi_module][k]; l++){
1286  chip_struct_prob& this_struct = chip_map_prob[0][iphi_module].emplace_back();
1287  this_struct.chipNumber = k;
1288  this_struct.HitAMapC_cut = true;
1289  this_struct.HitAMapC_passed = false;
1290  }
1291  for (int l = 0; l < 16*1. - scale_hHitAWMapC_B_passed[iphi_module][k]; l++){
1292  chip_struct_prob& this_struct = chip_map_prob[0][iphi_module].emplace_back();
1293  this_struct.chipNumber = k;
1294  this_struct.HitAWMapC_cut = true;
1295  this_struct.HitAWMapC_passed = false;
1296  }
1297  for (int l = 0; l < 16*1. - scale_hHitHMapC_B_passed[iphi_module][k]; l++){
1298  chip_struct_prob& this_struct = chip_map_prob[0][iphi_module].emplace_back();
1299  this_struct.chipNumber = k;
1300  this_struct.HitHMapC_cut = true;
1301  this_struct.HitHMapC_passed = false;
1302  }
1303  } else{
1304  ATH_MSG_ERROR("Scale value is less than zero in normalization for Barrel chip!");
1305  }
1306  }
1307  }
1308  }
1309 
1310  // Endcap straw normalization
1311  for (int k = 0; k < s_Straw_max[1]; k++) {
1312  for (int iside = 0; iside < 2; iside++) {
1313  for (int phi_module = 0; phi_module < s_numberOfEndCapStacks; phi_module++) {
1314  int iphi_module = -999;;
1315  if (iside == 0) iphi_module = phi_module; else if (iside == 1) iphi_module = phi_module + 32;
1316  if (scale_hHitHWMapS_E_passed[iphi_module][k] < 2 || scale_hHitWMapS_E_passed[iphi_module][k] < 2 ||
1317  scale_hHitAMapS_E_passed[iphi_module][k] < 2 || scale_hHitAWMapS_E_passed[iphi_module][k] < 2 ||
1318  scale_hHitHMapS_E_passed[iphi_module][k] < 2) {
1319  for (int l = 0; l < 1. - scale_hHitHWMapS_E_passed[iphi_module][k]; l++){
1320  straw_struct_prob& this_struct = straw_map_prob[1][iphi_module].emplace_back(); // index 1 is Endcap, A and C are splitted by iphi_module
1321  this_struct.strawNumber = k;
1322  this_struct.HitHWMapS_cut = true;
1323  this_struct.HitHWMapS_passed = false;
1324  }
1325  for (int l = 0; l < 1. - scale_hHitWMapS_E_passed[iphi_module][k]; l++){
1326  straw_struct_prob& this_struct = straw_map_prob[1][iphi_module].emplace_back();
1327  this_struct.strawNumber = k;
1328  this_struct.HitWMapS_cut = true;
1329  this_struct.HitWMapS_passed = false;
1330  }
1331  for (int l = 0; l < 1. - scale_hHitAMapS_E_passed[iphi_module][k]; l++){
1332  straw_struct_prob& this_struct = straw_map_prob[1][iphi_module].emplace_back();
1333  this_struct.strawNumber = k;
1334  this_struct.HitAMapS_cut = true;
1335  this_struct.HitAMapS_passed = false;
1336  }
1337  for (int l = 0; l < 1. - scale_hHitAWMapS_E_passed[iphi_module][k]; l++){
1338  straw_struct_prob& this_struct = straw_map_prob[1][iphi_module].emplace_back();
1339  this_struct.strawNumber = k;
1340  this_struct.HitAWMapS_cut = true;
1341  this_struct.HitAWMapS_passed = false;
1342  }
1343  for (int l = 0; l < 1. - scale_hHitHMapS_E_passed[iphi_module][k]; l++){
1344  straw_struct_prob& this_struct = straw_map_prob[1][iphi_module].emplace_back();
1345  this_struct.strawNumber = k;
1346  this_struct.HitHMapS_cut = true;
1347  this_struct.HitHMapS_passed = false;
1348  }
1349  } else{
1350  ATH_MSG_ERROR("Scale value is less than zero in normalization for Endcap straw!");
1351  }
1352  }
1353  }
1354  }
1355 
1356  // Endcap chip normalization
1357  for (int k = 0; k < s_iChip_max[1]; k++) {
1358  for (int iside = 0; iside < 2; iside++) {
1359  for (int phi_module = 0; phi_module < s_numberOfEndCapStacks; phi_module++) {
1360  int iphi_module = -999;;
1361  if (iside == 0) iphi_module = phi_module; else if (iside == 1) iphi_module = phi_module + 32;
1362  if (scale_hHitHWMapC_E_passed[iphi_module][k] < 17 || scale_hHitWMapC_E_passed[iphi_module][k] < 17 ||
1363  scale_hHitAMapC_E_passed[iphi_module][k] < 17 || scale_hHitAWMapC_E_passed[iphi_module][k] < 17 ||
1364  scale_hHitHMapC_E_passed[iphi_module][k] < 17) {
1365  for (int l = 0; l < 16*1. - scale_hHitHWMapC_E_passed[iphi_module][k]; l++){
1366  chip_struct_prob& this_struct = chip_map_prob[1][iphi_module].emplace_back(); // index 0 is Barrel, A and C are splitted by iphi_module
1367  this_struct.chipNumber = k;
1368  this_struct.HitHWMapC_cut = true;
1369  this_struct.HitHWMapC_passed = false;
1370  }
1371  for (int l = 0; l < 16*1. - scale_hHitWMapC_E_passed[iphi_module][k]; l++){
1372  chip_struct_prob& this_struct = chip_map_prob[1][iphi_module].emplace_back();
1373  this_struct.chipNumber = k;
1374  this_struct.HitWMapC_cut = true;
1375  this_struct.HitWMapC_passed = false;
1376  }
1377  for (int l = 0; l < 16*1. - scale_hHitAMapC_E_passed[iphi_module][k]; l++){
1378  chip_struct_prob& this_struct = chip_map_prob[1][iphi_module].emplace_back();
1379  this_struct.chipNumber = k;
1380  this_struct.HitAMapC_cut = true;
1381  this_struct.HitAMapC_passed = false;
1382  }
1383  for (int l = 0; l < 16*1. - scale_hHitAWMapC_E_passed[iphi_module][k]; l++){
1384  chip_struct_prob& this_struct = chip_map_prob[1][iphi_module].emplace_back();
1385  this_struct.chipNumber = k;
1386  this_struct.HitAWMapC_cut = true;
1387  this_struct.HitAWMapC_passed = false;
1388  }
1389  for (int l = 0; l < 16*1. - scale_hHitHMapC_E_passed[iphi_module][k]; l++){
1390  chip_struct_prob& this_struct = chip_map_prob[1][iphi_module].emplace_back();
1391  this_struct.chipNumber = k;
1392  this_struct.HitHMapC_cut = true;
1393  this_struct.HitHMapC_passed = false;
1394  }
1395  } else{
1396  ATH_MSG_ERROR("Scale value is less than zero in normalization for Endcap chip!");
1397  }
1398  }
1399  }
1400  }
1401  }
1402 
1403  for (const auto& ibarrel_ecpair : straw_shifter_map) {
1404  int ibe = abs(ibarrel_ecpair.first) - 1;
1405  int iside = ibarrel_ecpair.first > 0 ? 0 : 1;
1406  auto strawNumber = Monitored::Collection("strawNumber", ibarrel_ecpair.second, [](const auto& s){return s.strawNumber;});
1407  auto HitWMap_passed = Monitored::Collection("HitWMap_passed", ibarrel_ecpair.second, [](const auto& s){return s.HitWMap_passed;});
1408  auto HitWMap_Ar_passed = Monitored::Collection("HitWMap_Ar_passed", ibarrel_ecpair.second, [](const auto& s){return s.HitWMap_Ar_passed;});
1409  auto isAr = Monitored::Collection("isAr", ibarrel_ecpair.second, [](const auto& s){return s.isAr;});
1410  auto isNotAr = Monitored::Collection("isNotAr", ibarrel_ecpair.second, [](const auto& s){return not s.isAr;});
1411  if (ibe == 0) {
1412  fill("RDOHistograms0", strawNumber, HitWMap_passed, HitWMap_Ar_passed, isAr, isNotAr);
1413  } else if (ibe == 1) {
1414  fill("RDOHistograms1"+std::to_string(iside), strawNumber, HitWMap_passed, HitWMap_Ar_passed, isAr, isNotAr);
1415  }
1416  }
1417 
1418  if (m_doExpert) {
1419  for (const auto& ibepair : straw_map_prob) {
1420  for (const auto& iphi_modulepair : ibepair.second ) {
1421  auto strawNumber = Monitored::Collection("strawNumber", iphi_modulepair.second, [](const auto& s){return s.strawNumber;});
1422  auto HitHWMapS_passed = Monitored::Collection("HitHWMapS_passed", iphi_modulepair.second, [](const auto& s){return s.HitHWMapS_passed;});
1423  auto HitWMapS_passed = Monitored::Collection("HitWMapS_passed", iphi_modulepair.second, [](const auto& s){return s.HitWMapS_passed;});
1424  auto HitAMapS_passed = Monitored::Collection("HitAMapS_passed", iphi_modulepair.second, [](const auto& s){return s.HitAMapS_passed;});
1425  auto HitAWMapS_passed = Monitored::Collection("HitAWMapS_passed", iphi_modulepair.second, [](const auto& s){return s.HitAWMapS_passed;});
1426  auto HitHMapS_passed = Monitored::Collection("HitHMapS_passed", iphi_modulepair.second, [](const auto& s){return s.HitHMapS_passed;});
1427  auto HitHWMapS_cut = Monitored::Collection("HitHWMapS_cut", iphi_modulepair.second, [](const auto& s){return s.HitHWMapS_cut;});
1428  auto HitWMapS_cut = Monitored::Collection("HitWMapS_cut", iphi_modulepair.second, [](const auto& s){return s.HitWMapS_cut;});
1429  auto HitAMapS_cut = Monitored::Collection("HitAMapS_cut", iphi_modulepair.second, [](const auto& s){return s.HitAMapS_cut;});
1430  auto HitAWMapS_cut = Monitored::Collection("HitAWMapS_cut", iphi_modulepair.second, [](const auto& s){return s.HitAWMapS_cut;});
1431  auto HitHMapS_cut = Monitored::Collection("HitHMapS_cut", iphi_modulepair.second, [](const auto& s){return s.HitHMapS_cut;});
1432 
1433  fill("RDOStackHistograms"+std::to_string(ibepair.first)+std::to_string(iphi_modulepair.first), strawNumber, HitHWMapS_passed, HitHWMapS_cut,
1434  HitWMapS_passed, HitWMapS_cut, HitAMapS_passed, HitAMapS_cut, HitAWMapS_passed, HitAWMapS_cut, HitHMapS_passed, HitHMapS_cut);
1435  }
1436  }
1437 
1438  for (const auto& ibepair : chip_map_prob) {
1439  for (const auto& iphi_modulepair : ibepair.second ) {
1440  auto chipNumber = Monitored::Collection("chipNumber", iphi_modulepair.second, [](const auto& s){return s.chipNumber;});
1441  auto HitHWMapC_passed = Monitored::Collection("HitHWMapC_passed", iphi_modulepair.second, [](const auto& s){return s.HitHWMapC_passed;});
1442  auto HitWMapC_passed = Monitored::Collection("HitWMapC_passed", iphi_modulepair.second, [](const auto& s){return s.HitWMapC_passed;});
1443  auto HitAMapC_passed = Monitored::Collection("HitAMapC_passed", iphi_modulepair.second, [](const auto& s){return s.HitAMapC_passed;});
1444  auto HitAWMapC_passed = Monitored::Collection("HitAWMapC_passed", iphi_modulepair.second, [](const auto& s){return s.HitAWMapC_passed;});
1445  auto HitHMapC_passed = Monitored::Collection("HitHMapC_passed", iphi_modulepair.second, [](const auto& s){return s.HitHMapC_passed;});
1446  auto HitHWMapC_cut = Monitored::Collection("HitHWMapC_cut", iphi_modulepair.second, [](const auto& s){return s.HitHWMapC_cut;});
1447  auto HitWMapC_cut = Monitored::Collection("HitWMapC_cut", iphi_modulepair.second, [](const auto& s){return s.HitWMapC_cut;});
1448  auto HitAMapC_cut = Monitored::Collection("HitAMapC_cut", iphi_modulepair.second, [](const auto& s){return s.HitAMapC_cut;});
1449  auto HitAWMapC_cut = Monitored::Collection("HitAWMapC_cut", iphi_modulepair.second, [](const auto& s){return s.HitAWMapC_cut;});
1450  auto HitHMapC_cut = Monitored::Collection("HitHMapC_cut", iphi_modulepair.second, [](const auto& s){return s.HitHMapC_cut;});
1451 
1452  fill("RDOStackHistograms"+std::to_string(ibepair.first)+std::to_string(iphi_modulepair.first), chipNumber, HitHWMapC_passed, HitHWMapC_cut,
1453  HitWMapC_passed, HitWMapC_cut, HitAMapC_passed, HitAMapC_cut, HitAWMapC_passed, HitAWMapC_cut, HitHMapC_passed, HitHMapC_cut);
1454  }
1455  }
1456  }
1457 
1458  for (const auto& ibepair : straw_map) {
1459  for (const auto& iphi_modulepair : ibepair.second ) {
1460  auto strawNumber = Monitored::Collection("strawNumber", iphi_modulepair.second, [](const auto& s){return s.strawNumber;});
1461  auto HitTrMapS_y = Monitored::Collection("HitTrMapS_y", iphi_modulepair.second, [](const auto& s){return s.HitTrMapS_y;});
1462  auto HitToTMapS_y = Monitored::Collection("HitToTMapS_y", iphi_modulepair.second, [](const auto& s){return s.HitToTMapS_y;});
1463  auto HitToTLong_cut = Monitored::Collection("HitToTLong_cut", iphi_modulepair.second, [](const auto& s){return s.HitToTLong_cut;});
1464  auto HitTrWMapS_y = Monitored::Collection("HitTrWMapS_y", iphi_modulepair.second, [](const auto& s){return s.HitTrWMapS_y;});
1465  auto HitTrWMapS_cut = Monitored::Collection("HitTrWMapS_cut", iphi_modulepair.second, [](const auto& s){return s.HitTrWMapS_cut;});
1466 
1467  fill("RDOStackHistograms"+std::to_string(ibepair.first)+std::to_string(iphi_modulepair.first), strawNumber,
1468  HitTrMapS_y, HitToTMapS_y, HitToTLong_cut, HitTrWMapS_y, HitTrWMapS_cut);
1469  }
1470  }
1471 
1472  for (const auto& ibepair : chip_map) {
1473  for (const auto& iphi_modulepair : ibepair.second ) {
1474  auto chipNumber = Monitored::Collection("chipNumber", iphi_modulepair.second, [](const auto& s){return s.chipNumber;});
1475  auto HitTrMapC_y = Monitored::Collection("HitTrMapC_y", iphi_modulepair.second, [](const auto& s){return s.HitTrMapC_y;});
1476  auto HitToTMapC_y = Monitored::Collection("HitToTMapC_y", iphi_modulepair.second, [](const auto& s){return s.HitToTMapC_y;});
1477  auto HtoBCMapC_x = Monitored::Collection("HtoBCMapC_x", iphi_modulepair.second, [](const auto& s){return s.HtoBCMapC_x;});
1478  auto HtoBCMapB_x = Monitored::Collection("HtoBCMapB_x", iphi_modulepair.second, [](const auto& s){return s.HtoBCMapB_x;});
1479  auto HtoBCMapB_y = Monitored::Collection("HtoBCMapB_y", iphi_modulepair.second, [](const auto& s){return s.HtoBCMapB_y;});
1480  auto HtoBCMap_cut = Monitored::Collection("HtoBCMap_cut", iphi_modulepair.second, [](const auto& s){return s.HtoBCMap_cut;});
1481  auto HitTrWMapC_cut = Monitored::Collection("HitTrWMapC_cut", iphi_modulepair.second, [](const auto& s){return s.HitTrWMapC_cut;});
1482 
1483  fill("RDOStackHistograms"+std::to_string(ibepair.first)+std::to_string(iphi_modulepair.first),
1484  chipNumber, HitTrMapC_y, HitToTMapC_y, HtoBCMapC_x, HtoBCMapB_x, HtoBCMapB_y, HtoBCMap_cut, HitTrWMapC_cut);
1485  }
1486  }
1487 
1488  OccAll = nhitsall/350848.;
1489  fill("RDOHistograms0", OccAll);
1490 
1491  //ToDo Explain this
1492  for (int ibe = 0; ibe < 2; ibe++) {
1493  if (m_doShift) {
1494  if (ibe == 0) {
1495  BCIDvsOcc_x = good_bcid;
1496  BCIDvsOcc_y = nTRTHits[ibe]/105088.0;
1497  fill("RDOHistograms0", BCIDvsOcc_x, BCIDvsOcc_y);
1498  } else if (ibe == 1) {
1499  BCIDvsOcc_x = good_bcid;
1500  BCIDvsOcc_y = nTRTHits[ibe]/245760.0;
1501  fill("RDOHistograms1", BCIDvsOcc_x, BCIDvsOcc_y);
1502  }
1503 
1504  for (int iside = 0; iside < 2; iside++) {
1505  for (int i = 1; i <= numberOfStacks_b[ibe]; i++) {
1506 
1507  int index_tmp = 0;
1508  int modulenum_tmp = 0;
1509 
1510  if (iside == 0) {
1511  index_tmp = i - 1;
1512  modulenum_tmp = i - 1;
1513  } else if (iside == 1) {
1514  index_tmp = i + 31;
1515 
1516  if (ibe == 0) modulenum_tmp = (i - 1) + 96;
1517  else if (ibe == 1) modulenum_tmp = (i - 1) + 64;
1518  }
1519 
1520  int nclass = -1;
1521 
1522  if (i <= s_numberOfBarrelStacks) {
1523  nclass = 0;
1524  } else if (i <= 2 * s_numberOfBarrelStacks && i > s_numberOfBarrelStacks) {
1525  nclass = 1;
1526  } else if (i > 2 * s_numberOfBarrelStacks) {
1527  nclass = 2;
1528  }
1529  int LLocc_index = index_tmp - 32 * nclass;
1530 
1531  if (nclass >= 0) {
1532  if (ibe == 0) {
1533  // Tell clang to optimize assuming that FP operations may trap.
1535  float occLL = float(moduleHits_B[modulenum_tmp]) / float(numberOfStrawsMod[nclass]);
1536  float occHL = float(HLmoduleHits_B[modulenum_tmp]) / float(numberOfStrawsMod[nclass]);
1537  AvgLLOcc_side_x = i - (32 * nclass);
1538  AvgLLOcc_side_y = occLL;
1539  AvgHLOcc_side_x = i - (32 * nclass);
1540  AvgHLOcc_side_y = occHL;
1541  AvgLLOccMod_side_x = i;
1542  AvgLLOccMod_side_y = occLL;
1543  AvgHLOccMod_side_x = i;
1544  AvgHLOccMod_side_y = occHL;
1545  } else if (ibe == 1) {
1546  float occLL = float(moduleHits_E[modulenum_tmp]) / float(numberOfStrawsWheel[nclass]);
1547  float occHL = float(HLmoduleHits_E[modulenum_tmp]) / float(numberOfStrawsWheel[nclass]);
1548 
1549  if (LLocc_index < 64) {
1550  } else {
1551  ATH_MSG_WARNING("m_LLOcc index out of bounds!"); // To satisfy Coverity defect CID 16514 which we believe is a false report.
1552  }
1553  AvgLLOcc_side_x = i - (32 * nclass);
1554  AvgLLOcc_side_y = occLL;
1555  AvgHLOcc_side_x = i - (32 * nclass);
1556  AvgHLOcc_side_y = occHL;
1557  AvgLLOccMod_side_x = i;
1558  AvgLLOccMod_side_y = occLL;
1559  AvgHLOccMod_side_x = i;
1560  AvgHLOccMod_side_y = occHL;
1561  }
1562  fill("RDOLLHLOccHistograms"+std::to_string(ibe)+std::to_string(iside), AvgLLOcc_side_x, AvgLLOcc_side_y, AvgHLOcc_side_x, AvgHLOcc_side_y,
1563  AvgLLOccMod_side_x, AvgLLOccMod_side_y, AvgHLOccMod_side_x, AvgHLOccMod_side_y);
1564  }
1565  }
1566  }
1567  }
1568  // Normalization for online environmenmet
1569  // Insert here
1570  }
1571 
1572  if (m_doShift) {
1573  const unsigned int lumiBlock = eventInfo.lumiBlock();
1574  ATH_MSG_VERBOSE("This is lumiblock : " << lumiBlock);
1575  int lastLumiBlock = -99; // ToDo - last lumiblock calculation is not correct
1576  if ((int)lumiBlock != lastLumiBlock) {
1577  lastLumiBlock = lumiBlock;
1578  }
1579  float evtLumiBlock = 1.;
1580  float lumiBlockScale = (evtLumiBlock > 0) ? (1. / evtLumiBlock) : 0;
1581  const float barrelConst = 1. / 105088;
1582  const float endcapConst = 1. / 122880;
1583 
1584  if (m_doTracksMon && evtLumiBlock > 0) {
1585  NHitsperLB_x = lastLumiBlock;
1586  NHitsperLB_y = (float)nHitsperLB_B * lumiBlockScale * barrelConst;
1587  fill("RDOShiftRebinnedBarrelHistograms0", NHitsperLB_x, NHitsperLB_y);
1588  NHLHitsperLB_x = lastLumiBlock;
1589  NHLHitsperLB_y = (float)nHLHitsperLB_B * lumiBlockScale * barrelConst;
1590  fill("RDOShiftRebinnedBarrelHistograms0", NHLHitsperLB_x, NHLHitsperLB_y);
1591 
1592  for (int iside = 0; iside < 2; iside++) {
1593  NHitsperLB_x = lastLumiBlock;
1594  NHitsperLB_y = (float)nHitsperLB_E[iside] * lumiBlockScale * endcapConst;
1595  fill("RDOShiftRebinnedEndcapHistograms1"+std::to_string(iside), NHitsperLB_x, NHitsperLB_y);
1596  NHLHitsperLB_x = lastLumiBlock;
1597  NHLHitsperLB_y = (float)nHLHitsperLB_E[iside] * lumiBlockScale * endcapConst;
1598  fill("RDOShiftRebinnedEndcapHistograms1"+std::to_string(iside), NHLHitsperLB_x, NHLHitsperLB_y);
1599  }
1600 
1601  nHitsperLB_B = 0;
1602  nHLHitsperLB_B = 0;
1603 
1604  for (int iside = 0; iside < 2; iside++) {
1605  nHitsperLB_E[iside] = 0;
1606  nHLHitsperLB_E[iside] = 0;
1607  }
1608  }
1609  }
1610 
1611  ATH_MSG_DEBUG("end of event and lumi block");
1612 
1613  //Get BSConversion Errors from BSConditionsServices:
1614  std::set<std::pair<uint32_t, uint32_t> > *L1IDErrorSet = m_BSSvc->getIdErrorSet(TRTByteStreamErrors::L1IDError);
1615  std::set<std::pair<uint32_t, uint32_t> > *BCIDErrorSet = m_BSSvc->getIdErrorSet(TRTByteStreamErrors::BCIDError);
1616  std::set<uint32_t> *MissingErrorSet = m_BSSvc->getErrorSet(TRTByteStreamErrors::MISSINGError);
1617  std::set<uint32_t> *SidErrorSet = m_BSSvc->getErrorSet(TRTByteStreamErrors::SIDError);
1618  std::set<std::pair<uint32_t, uint32_t> > *RobStatusErrorSet = m_BSSvc->getRodRobErrorSet(TRTByteStreamErrors::RobStatusError);
1619  const unsigned int rod_id_base[2][2] = { { 0x310000, 0x320000 }, { 0x330000, 0x340000 } };
1620  const unsigned int nChipsTotal[2][2] = { { 3328, 3328 }, { 7680, 7680 } };
1621  const unsigned int nRobsTotal[2][2] = { { 32, 32 }, { 64, 64 } };
1622  float nBSErrors[2][2] = { { 0, 0 }, { 0, 0 } };
1623  float nRobErrors[2][2] = { { 0, 0 }, { 0, 0 } };
1624  const std::set<std::pair<uint32_t, uint32_t> > *errorset1[2] = { BCIDErrorSet, L1IDErrorSet };
1625 
1626  for (int iset = 0; iset < 2; ++iset) {
1627  for (auto setIt = errorset1[iset]->begin(); setIt != errorset1[iset]->end(); ++setIt) {
1628  for (int ibe = 0; ibe < 2; ++ibe) {
1629  for (int iside = 0; iside < 2; ++iside) {
1630  if (((setIt->first >> 8) & 0xFF0000) == rod_id_base[ibe][iside]) {
1631  nBSErrors[ibe][iside] += 1. / nChipsTotal[ibe][iside];
1632  }
1633  }
1634  }
1635  }
1636  }
1637 
1638  const std::set<uint32_t> *errorset2[2] = { MissingErrorSet, SidErrorSet };
1639 
1640  for (int iset = 0; iset < 2; ++iset) {
1641  for (auto setIt = errorset2[iset]->begin(); setIt != errorset2[iset]->end(); ++setIt) {
1642  for (int ibe = 0; ibe < 2; ++ibe) {
1643  for (int iside = 0; iside < 2; ++iside) {
1644  if (((*setIt >> 8) & 0xFF0000) == rod_id_base[ibe][iside]) {
1645  nBSErrors[ibe][iside] += 1. / nChipsTotal[ibe][iside];
1646  }
1647  }
1648  }
1649  }
1650  }
1651 
1652  for (int ibe = 0; ibe < 2; ++ibe) {
1653  for (int iside = 0; iside < 2; ++iside) {
1654  ChipBSErrorsVsLB_x = lumiBlock;
1655  ChipBSErrorsVsLB_y = nBSErrors[ibe][iside];
1656  for (unsigned int i = 0; i < lumiBlock; i++) {
1657  // we need this so the LastBinThreshold algorithm can find the last bin
1658  fill("RDOShiftSmryRebinnedHistograms"+std::to_string(ibe)+std::to_string(iside), ChipBSErrorsVsLB_x, ChipBSErrorsVsLB_y);
1659  }
1660  }
1661  }
1662 
1663  for (auto setIt = RobStatusErrorSet->begin(); setIt != RobStatusErrorSet->end(); ++setIt) {
1664  for (int ibe = 0; ibe < 2; ++ibe) {
1665  for (int iside = 0; iside < 2; ++iside) {
1666  if (setIt->first % rod_id_base[ibe][iside] < 0xffff) {
1667  nRobErrors[ibe][iside] += 1. / nRobsTotal[ibe][iside];
1668  }
1669  }
1670  }
1671  }
1672 
1673  for (int ibe = 0; ibe < 2; ++ibe) {
1674  for (int iside = 0; iside < 2; ++iside) {
1675  RobBSErrorsVsLB_x = lumiBlock;
1676  RobBSErrorsVsLB_y = nRobErrors[ibe][iside];
1677  for (unsigned int i = 0; i < lumiBlock; i++) {
1678  // we need this so the LastBinThreshold algorithm can find the last bin
1679  fill("RDOShiftSmryRebinnedHistograms"+std::to_string(ibe)+std::to_string(iside), RobBSErrorsVsLB_x, RobBSErrorsVsLB_y);
1680  }
1681  }
1682  }
1683 
1684  ATH_MSG_VERBOSE("Leaving Fill TRT RDO Histograms");
1685  return StatusCode::SUCCESS;
1686 }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ GetEventInfo()

SG::ReadHandle< xAOD::EventInfo > AthMonitorAlgorithm::GetEventInfo ( const EventContext &  ctx) const
inherited

Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)

Parameters
ctxEventContext for the event
Returns
a SG::ReadHandle<xAOD::EventInfo>

Definition at line 107 of file AthMonitorAlgorithm.cxx.

107  {
109 }

◆ getGroup()

const ToolHandle< GenericMonitoringTool > & AthMonitorAlgorithm::getGroup ( const std::string &  name) const
inherited

Get a specific monitoring tool from the tool handle array.

Finds a specific GenericMonitoringTool instance from the list of monitoring tools (a ToolHandleArray). Throws a FATAL warning if the object found is empty.

Parameters
namestring name of the desired tool
Returns
reference to the desired monitoring tool

Definition at line 164 of file AthMonitorAlgorithm.cxx.

164  {
165  // get the pointer to the tool, and check that it exists
166  auto idx = m_toolLookupMap.find(name);
167  if (ATH_LIKELY(idx != m_toolLookupMap.end())) {
168  return m_tools[idx->second];
169  }
170  else {
171  // treat empty tool handle case as in Monitored::Group
172  if (m_toolLookupMap.empty()) {
173  return m_dummy;
174  }
175 
176  if (!isInitialized()) {
178  "It seems that the AthMonitorAlgorithm::initialize was not called "
179  "in derived class initialize method");
180  } else {
181  std::string available = std::accumulate(
182  m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
183  [](const std::string& s, auto h) { return s + "," + h.first; });
184  ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
185  << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
186  << "your python configuration and c++ filling code. Note: your available groups are {"
187  << available << "}.");
188  }
189  }
190  return m_dummy;
191 }

◆ getTrigDecisionTool()

const ToolHandle< Trig::TrigDecisionTool > & AthMonitorAlgorithm::getTrigDecisionTool ( ) const
inherited

Get the trigger decision tool member.

The trigger decision tool is used to check whether a specific trigger is passed by an event.

Returns
m_trigDecTool

Definition at line 194 of file AthMonitorAlgorithm.cxx.

194  {
195  return m_trigDecTool;
196 }

◆ initialize()

StatusCode TRTMonitoringRun3RAW_Alg::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from AthMonitorAlgorithm.

Definition at line 54 of file TRTMonitoringRun3RAW_Alg.cxx.

54  {
55  using namespace Monitored;
56 
57  ATH_MSG_VERBOSE("Initializing TRT Monitoring");
58 
59  // initialize superclass
61 
62  // Retrieve detector manager.
63  ATH_CHECK( detStore()->retrieve(m_mgr, "TRT") );
64  // Get ID helper for TRT to access various detector components like straw, straw_layer, layer_or_wheel, phi_module, etc...
65  ATH_CHECK( detStore()->retrieve(m_pTRTHelper, "TRT_ID") );
66  ATH_CHECK( detStore()->retrieve(m_idHelper, "AtlasID") );
67 
68  if (m_doExpert) {
69  // Retrieve the TRT_Straw Status Service.
70  if (m_sumTool.name().empty()) {
71  ATH_MSG_WARNING("TRT_StrawStatusTool not given.");
72  } else {
73  ATH_CHECK( m_sumTool.retrieve() );
74  }
75 
77 
78  if (m_sumTool.name() != "") {
79  ATH_MSG_VERBOSE("Trying " << m_sumTool << " isGood");
80  ATH_MSG_VERBOSE("TRT_StrawStatusTool reports status = " << m_sumTool->getStatus(ident, Gaudi::Hive::currentContext()));
81  }
82 
83  // Retrieve the TRT_ByteStreamService.
84  if (m_BSSvc.name().empty()) {
85  ATH_MSG_WARNING("TRT_ByteStreamSvc not given.");
86  } else {
87  ATH_CHECK( m_BSSvc.retrieve() );
88  }
89  }//If do expert
90 
91  // Get Track summary tool
92  if (m_TrackSummaryTool.retrieve().isFailure())
93  ATH_MSG_ERROR("Cannot get TrackSummaryTool");
94  else
95  ATH_MSG_DEBUG("Retrieved succesfully the track summary tool" << m_TrackSummaryTool);
96 
97  // Retrieve TRTTrackHoleSearchTool
98  if (m_useHoleFinder || m_doExpert) {
99  ATH_CHECK( m_trt_hole_finder.retrieve() );
100  }
101  else {
102  m_trt_hole_finder.disable();
103  }
104 
105  // Initialization of VarHandleKeys
106  ATH_CHECK( m_rdoContainerKey.initialize() );
108  ATH_CHECK( m_combTrackCollectionKey.initialize() );
109  ATH_CHECK( m_trackCollectionKey.initialize() );
111 
112  // InDetTrackSelectionTools initialization:
113  ATH_CHECK( m_trackSelTool.retrieve() );
114 
115  // initialize chip lookup maps
116  ATH_CHECK( m_TRTStrawNeighbourSvc.retrieve() );
117 
118  //loop over straw hash index to create straw number mapping for TRTViewer
119  unsigned int maxHash = m_pTRTHelper->straw_layer_hash_max();
120 
121  for (int ibe = 0; ibe < 2; ibe++) { // ibe=0(barrel), ibe=1(endcap)
122  for (unsigned int index = 0; index < maxHash; index++) {
123  IdentifierHash idHash = index;
124  Identifier id = m_pTRTHelper->layer_id(idHash);
125  int idBarrelEndcap = m_pTRTHelper->barrel_ec(id);
126  int idLayerWheel = m_pTRTHelper->layer_or_wheel(id);
127  int idPhiModule = m_pTRTHelper->phi_module(id);
128  int idStrawLayer = m_pTRTHelper->straw_layer(id);
129  bool isBarrel = m_pTRTHelper->is_barrel(id);
130  int idSide;
131  int sectorflag = 0;
132  const InDetDD::TRT_BaseElement *element = nullptr;
133 
134  if (ibe == 0) { // barrel
135  idSide = idBarrelEndcap ? 1 : -1;
136 
137  if (isBarrel && (idBarrelEndcap == -1)) {
138  sectorflag = 1;
139  element = m_mgr->getBarrelElement(idSide, idLayerWheel, idPhiModule, idStrawLayer);
140  }
141  } else if (ibe == 1) { // endcap
142  idSide = idBarrelEndcap ? 1 : 0;
143 
144  if (!isBarrel && ((idBarrelEndcap == -2) || (idBarrelEndcap == 2))) {
145  sectorflag = 1;
146  element = m_mgr->getEndcapElement(idSide, idLayerWheel, idStrawLayer, idPhiModule);//, idStrawLayer_ec);
147  }
148  }
149 
150  if (sectorflag == 1) {
151  if (!element) continue;
152 
153  for (unsigned int istraw = 0; istraw < element->nStraws(); istraw++) {
154  std::vector<Identifier> neighbourIDs;
155  Identifier strawID = m_pTRTHelper->straw_id(id, int(istraw));
156  int i_chip, i_pad;
157  m_TRTStrawNeighbourSvc->getChip(strawID, i_chip);
158  m_TRTStrawNeighbourSvc->getPad(id, i_pad);
159 
160  if (ibe == 0) { //barrel
161  if (idLayerWheel == 1) i_chip += 21;
162 
163  if (idLayerWheel == 2) i_chip += 54;
164 
165  int tempStrawNumber = strawNumber(istraw, idStrawLayer, idLayerWheel);
166 
167  if (tempStrawNumber < 0 || tempStrawNumber > (s_Straw_max[ibe] - 1)) {
168  ATH_MSG_WARNING("Found tempStrawNumber = " << tempStrawNumber << " out of range.");
169  } else {
170  m_mat_chip_B.at(idPhiModule).at(tempStrawNumber) = i_chip;
171  m_mat_chip_B.at(idPhiModule + 32).at(tempStrawNumber) = i_chip;
172  }
173  } else if (ibe == 1) { //endcap
174  ++i_chip -= 104;
175  int tempStrawNumber = strawNumberEndCap(istraw, idStrawLayer, idLayerWheel, idPhiModule, idSide);
176 
177  if (tempStrawNumber < 0 || tempStrawNumber > (s_Straw_max[ibe] - 1)) {
178  ATH_MSG_WARNING("Found tempStrawNumber = " << tempStrawNumber << " out of range.");
179  } else {
180  m_mat_chip_E.at(idPhiModule).at(tempStrawNumber) = i_chip;
181  m_mat_chip_E.at(idPhiModule + 32).at(tempStrawNumber) = i_chip;
182  }
183  }
184  }
185  }
186  }
187  }
188 
189  return StatusCode::SUCCESS;
190 }

◆ initScaleVectors()

std::vector< std::vector< std::vector< int > > > TRTMonitoringRun3RAW_Alg::initScaleVectors ( const EventContext &  ctx) const
private

Definition at line 193 of file TRTMonitoringRun3RAW_Alg.cxx.

193  {
194 //----------------------------------------------------------------------------------//
195 // if (m_flagforscale == 0 ) return 0;
196  std::vector<std::vector<std::vector<int>>> scale_hHitWMap;
197  std::vector<std::vector<int>> scale_hHitWMap_B, scale_hHitWMap_EA, scale_hHitWMap_EC;
198  std::vector<int> scale_B_Xe, scale_B_Ar, scale_EA_Xe, scale_EA_Ar, scale_EC_Xe, scale_EC_Ar;
199 
200  scale_hHitWMap.clear();
201  scale_hHitWMap_B.clear();
202  scale_hHitWMap_EA.clear();
203  scale_hHitWMap_EC.clear();
204  scale_B_Xe.clear();
205  scale_B_Ar.clear();
206  scale_EA_Xe.clear();
207  scale_EA_Ar.clear();
208  scale_EC_Xe.clear();
209  scale_EC_Ar.clear();
210 
211  for (int i = 0; i < s_Straw_max[0]; i++) {
212  float countAr = 0;
213  float countXe = 0;
214  int sN, sLN, lN;
215  strawNumber_reverse(i, &sN, &sLN, &lN);
216 
217  for (int side = -1 ; side < 2; side += 2 ) {
218  for (int j = 0; j < 32; j++ ) {
219  Identifier Dummy_Identifier;
220  Dummy_Identifier = m_pTRTHelper->straw_id(side, j, lN, sLN, sN);
221  bool isArgonStraw = (Straw_Gastype( m_sumTool->getStatusHT(Dummy_Identifier, ctx) ) == GasType::Ar);
222 
223  if (isArgonStraw)
224  countAr += 1.0;
225  else
226  countXe += 1.0;
227  }
228  }
229  scale_B_Xe.push_back(countXe);
230  scale_B_Ar.push_back(countAr);
231  }
232 
233  for (int i = 0; i < s_Straw_max[1]; i++) {
234  scale_EA_Xe.push_back(32);
235  scale_EA_Ar.push_back(32);
236  scale_EC_Xe.push_back(32);
237  scale_EC_Ar.push_back(32);
238  }
239 
240  scale_hHitWMap_B.push_back(scale_B_Xe);
241  scale_hHitWMap_B.push_back(scale_B_Ar);
242  scale_hHitWMap_EA.push_back(scale_EA_Xe);
243  scale_hHitWMap_EA.push_back(scale_EA_Ar);
244  scale_hHitWMap_EC.push_back(scale_EC_Xe);
245  scale_hHitWMap_EC.push_back(scale_EC_Ar);
246  scale_hHitWMap.push_back(scale_hHitWMap_B);
247  scale_hHitWMap.push_back(scale_hHitWMap_EA);
248  scale_hHitWMap.push_back(scale_hHitWMap_EC);
249 
250 // m_flagforscale = 0;
251  return scale_hHitWMap;
252 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ parseList()

StatusCode AthMonitorAlgorithm::parseList ( const std::string &  line,
std::vector< std::string > &  result 
) const
virtualinherited

Parse a string into a vector.

The input string is a single long string of all of the trigger names. It parses this string and turns it into a vector, where each element is one trigger or trigger category.

Parameters
lineThe input string.
resultThe parsed output vector of strings.
Returns
StatusCode

Definition at line 341 of file AthMonitorAlgorithm.cxx.

341  {
342  std::string item;
343  std::stringstream ss(line);
344 
345  ATH_MSG_DEBUG( "AthMonitorAlgorithm::parseList()" );
346 
347  while ( std::getline(ss, item, ',') ) {
348  std::stringstream iss(item); // remove whitespace
349  iss >> item;
350  result.push_back(item);
351  }
352 
353  return StatusCode::SUCCESS;
354 }

◆ radToDegrees()

float TRTMonitoringRun3RAW_Alg::radToDegrees ( float  radValue) const
private

Definition at line 636 of file TRTMonitoringRun3RAW_Alg.cxx.

636  {
637 //----------------------------------------------------------------------------------//
638  float degreeValue = radValue / M_PI * 180;
639 
640  if (degreeValue < 0) degreeValue += 360;
641 
642  return degreeValue;
643 }

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ Straw_Gastype()

GasType TRTMonitoringRun3RAW_Alg::Straw_Gastype ( int  stat) const
inlineprivate

Definition at line 143 of file TRTMonitoringRun3RAW_Alg.h.

143  {
144  // getStatusHT returns enum {Undefined, Dead, Good, Xenon, Argon, Krypton}.
145  // Our representation of 'GasType' is 0:Xenon, 1:Argon, 2:Krypton
146  GasType Gas = Xe; // Xenon is default
147  if (m_ArgonXenonSplitter) {
148  // int stat=m_sumSvc->getStatusHT(TRT_Identifier);
149  if ( stat==2 || stat==3 ) { Gas = Xe; } // Xe
150  else if ( stat==1 || stat==4 ) { Gas = Ar; } // Ar
151  else if ( stat==5 ) { Gas = Kr; } // Kr
152  else if ( stat==6 ) { Gas = Xe; } // emulate Ar (so treat as Xe here)
153  else if ( stat==7 ) { Gas = Xe; } // emulate Kr (so treat as Xe here)
154  else { ATH_MSG_FATAL ("getStatusHT = " << stat << ", must be 'Good(2)||Xenon(3)' or 'Dead(1)||Argon(4)' or 'Krypton(5)!' or 6 or 7 for emulated types!");
155  throw std::exception();
156  }
157  }
158  return Gas;
159  }

◆ strawLayerNumber()

int TRTMonitoringRun3RAW_Alg::strawLayerNumber ( int  strawLayerNumber,
int  LayerNumber 
) const
private

Definition at line 599 of file TRTMonitoringRun3RAW_Alg.cxx.

599  {
600 //----------------------------------------------------------------------------------//
601  switch (LayerNumber) {
602  case 0:
603  return strawLayerNumber;
604 
605  case 1:
606  return strawLayerNumber + 19;
607 
608  case 2:
609  return strawLayerNumber + 43;
610 
611  default:
612  return strawLayerNumber;
613  }
614 }

◆ strawLayerNumber_reverse()

int TRTMonitoringRun3RAW_Alg::strawLayerNumber_reverse ( int  strawLayerNumInp,
int *  strawLayerNumber,
int *  LayerNumber 
) const
private

Definition at line 617 of file TRTMonitoringRun3RAW_Alg.cxx.

617  {
618 //----------------------------------------------------------------------------------//
619  //Danger? There are no checks on input
620  //use with care
621  if (strawLayerNumInp < 19) {
622  *strawLayerNumber = strawLayerNumInp;
623  *LayerNumber = 0;
624  } else if (strawLayerNumInp < 43) {
625  *strawLayerNumber = strawLayerNumInp - 19;
626  *LayerNumber = 1;
627  } else {
628  *strawLayerNumber = strawLayerNumInp - 43;
629  *LayerNumber = 2;
630  }
631 
632  return 0;
633 }

◆ strawNumber()

int TRTMonitoringRun3RAW_Alg::strawNumber ( int  strawNumber,
int  strawlayerNumber,
int  LayerNumber 
) const
private

Definition at line 433 of file TRTMonitoringRun3RAW_Alg.cxx.

433  {
434 //----------------------------------------------------------------------------------//
435  int addToStrawNumber = 0;
436  int addToStrawNumberNext = 0;
437  int i = 0;
438  const int numberOfStraws[75] = {
439  0,
440  15,
441  16, 16, 16, 16,
442  17, 17, 17, 17, 17,
443  18, 18, 18, 18, 18,
444  19, 19, 19,
445  18,
446  19,
447  20, 20, 20, 20, 20,
448  21, 21, 21, 21, 21,
449  22, 22, 22, 22, 22,
450  23, 23, 23, 23, 23,
451  24, 24,
452  23, 23,
453  24, 24, 24, 24,
454  25, 25, 25, 25, 25,
455  26, 26, 26, 26, 26,
456  27, 27, 27, 27, 27,
457  28, 28, 28, 28, 28,
458  29, 29, 29, 29,
459  28,
460  0
461  };
462 
463  do {
464  i++;
465  addToStrawNumber += numberOfStraws[i - 1];
466  addToStrawNumberNext = addToStrawNumber + numberOfStraws[i];
467  } while (strawLayerNumber(strawlayerNumber, LayerNumber) != i - 1);
468 
469  strawNumber = addToStrawNumberNext - strawNumber - 1;
470 
471  if (strawNumber < 0 || strawNumber > s_Straw_max[0] - 1) {
472  ATH_MSG_WARNING("strawNumber = " << strawNumber << " out of range. Will set to 0.");
473  strawNumber = 0;
474  }
475 
476  return strawNumber;
477 }

◆ strawNumber_reverse()

int TRTMonitoringRun3RAW_Alg::strawNumber_reverse ( int  inp_strawnumber,
int *  strawNumber,
int *  strawlayerNumber,
int *  LayerNumber 
) const
private

Definition at line 480 of file TRTMonitoringRun3RAW_Alg.cxx.

480  {
481 //----------------------------------------------------------------------------------//
482  const int numberOfStraws[75] = {
483  0,
484  15,
485  16, 16, 16, 16,
486  17, 17, 17, 17, 17,
487  18, 18, 18, 18, 18,
488  19, 19, 19,
489  18,
490  19,
491  20, 20, 20, 20, 20,
492  21, 21, 21, 21, 21,
493  22, 22, 22, 22, 22,
494  23, 23, 23, 23, 23,
495  24, 24,
496  23, 23,
497  24, 24, 24, 24,
498  25, 25, 25, 25, 25,
499  26, 26, 26, 26, 26,
500  27, 27, 27, 27, 27,
501  28, 28, 28, 28, 28,
502  29, 29, 29, 29,
503  28,
504  0
505  };
506  //ToDo check inp_strawnumber
507  int i = 1;
508 
509  for (i = 1; inp_strawnumber >= 0; i++) {
510  inp_strawnumber -= numberOfStraws[i];
511  }
512 
513  i -= 2;
514  strawLayerNumber_reverse(i, strawlayerNumber, LayerNumber);
515  *strawNumber = -inp_strawnumber - 1;
516  return 0;
517 }

◆ strawNumberEndCap()

int TRTMonitoringRun3RAW_Alg::strawNumberEndCap ( int  strawNumber,
int  strawLayerNumber,
int  LayerNumber,
int  phi_stack,
int  side 
) const
private

Definition at line 520 of file TRTMonitoringRun3RAW_Alg.cxx.

520  {
521 //----------------------------------------------------------------------------------//
522  // Before perfoming map, corrections need to be perfomed.
523  // apply special rotations for endcap mappings
524  // for eca, rotate triplets by 180 for stacks 9-16, and 25-32.
525  static const int TripletOrientation[2][32] = {
526  {
527  1, 1, 1, 1, 1, 1, 1, 1,
528  0, 0, 0, 0, 0, 0, 0, 0,
529  1, 1, 1, 1, 1, 1, 1, 1,
530  0, 0, 0, 0, 0, 0, 0, 0
531  },
532  {
533  1, 1, 1, 1, 1, 1, 1, 1,
534  0, 0, 0, 0, 0, 0, 0, 0,
535  1, 1, 1, 1, 1, 1, 1, 1,
536  0, 0, 0, 0, 0, 0, 0, 0
537  }
538  };
539  int phi1 = -1;
540 
541  if (side == 2) phi1 = phi_stack, side = 1;
542  else if (side == -2) phi1 = 31 - phi_stack, side = 0;
543 
544  if (phi1 > -1) {
545  if (TripletOrientation[side][phi1]) {
546  //Change straw number from 0-23 in straw layer to 0-192
548 
550 
551  strawNumber = (192 - 1) * TripletOrientation[side][phi1] + strawNumber * (1 - 2 * TripletOrientation[side][phi1]); //actual rotation
552 
553  //take strawNumber back to 0-23
555 
556  if (strawLayerNumber > 7) strawLayerNumber = int(strawNumber / 24) + 8;
557 
558  strawNumber = strawNumber % 24;
559  }
560 
561  //Finish rotation
562  //Flip straw in layer.
563 
564  if (side == 0) strawNumber = 23 - strawNumber;
565 
566  //Finish Flipping
567  }
568 
569  // Done with corrections
570  // Start mapping from athena identifiers to TRTViewer maps
571  int strawNumberNew = 0;
572 
573  if (LayerNumber < 6 && strawLayerNumber > 7) {
574  strawNumberNew = strawNumberNew + (384 * LayerNumber);
575  strawNumberNew = strawNumberNew + 192 + (strawLayerNumber % 8) + (strawNumber * 8);
576  } else if (LayerNumber < 6 && strawLayerNumber < 8) {
577  strawNumberNew = strawNumberNew + (384 * LayerNumber);
578  strawNumberNew = strawNumberNew + (strawLayerNumber % 8) + (strawNumber * 8);
579  } else if (LayerNumber > 5 && strawLayerNumber > 7) {
580  strawNumberNew = strawNumberNew + 2304 + 192 * (LayerNumber - 6);
581  strawNumberNew = strawNumberNew + 192 + (strawLayerNumber % 8) + (8 * strawNumber);
582  } else if (LayerNumber > 5 && strawLayerNumber < 8) {
583  strawNumberNew = strawNumberNew + 2304 + 192 * (LayerNumber - 6);
584  strawNumberNew = strawNumberNew + (strawLayerNumber % 8) + (8 * strawNumber);
585  }
586 
587  strawNumber = strawNumberNew;
588 
589  if (strawNumber < 0 || strawNumber > s_Straw_max[1] - 1) {
590  ATH_MSG_WARNING("strawNumber = " << strawNumber << " out of range. Will set to 0.");
591  strawNumber = 0;
592  }
593 
594  return strawNumber;
595 }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ trigChainsArePassed()

bool AthMonitorAlgorithm::trigChainsArePassed ( const std::vector< std::string > &  vTrigNames) const
inherited

Check whether triggers are passed.

For the event, use the trigger decision tool to check that at least one of the triggers listed in the supplied vector is passed.

Parameters
vTrigNamesList of trigger names.
Returns
If empty input, default to true. If at least one trigger is specified, returns whether at least one trigger was passed.

Definition at line 199 of file AthMonitorAlgorithm.cxx.

199  {
200 
201 
202  // If no triggers were given, return true.
203  if (vTrigNames.empty()) return true;
204 
205 
206  // Trigger: Check if this Algorithm is being run as an Express Stream job.
207  // Events are entering the express stream are chosen randomly, and by chain,
208  // Hence an additional check should be aplied to see if the chain(s)
209  // monitored here are responsible for the event being selected for
210  // the express stream.
211 
212  const auto group = m_trigDecTool->getChainGroup(vTrigNames);
214  const auto passedBits = m_trigDecTool->isPassedBits(group);
215  bool expressPass = passedBits & TrigDefs::Express_passed; //bitwise AND
216  if(!expressPass) {
217  return false;
218  }
219  }
220 
221  // monitor the event if any of the chains in the chain group passes the event.
222  return group->isPassed();
223 
224 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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_ArgonXenonSplitter

BooleanProperty TRTMonitoringRun3RAW_Alg::m_ArgonXenonSplitter {this, "doArgonXenonSeparation", true}
private

Definition at line 83 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_bsErrContKey

SG::ReadHandleKey<TRT_BSErrContainer> TRTMonitoringRun3RAW_Alg::m_bsErrContKey {this,"ByteStreamErrors","TRT_ByteStreamErrs","SG key of TRT ByteStream Error container"}
private

Definition at line 135 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_BSSvc

ServiceHandle<ITRT_ByteStream_ConditionsSvc> TRTMonitoringRun3RAW_Alg::m_BSSvc {this, "TRT_ByteStream_ConditionsSvc", "TRT_ByteStream_ConditionsSvc", ""}
private

Definition at line 126 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_combTrackCollectionKey

SG::ReadHandleKey<TrackCollection> TRTMonitoringRun3RAW_Alg::m_combTrackCollectionKey {this, "track_collection_hole_finder", "CombinedInDetTracks", "Name of tracks container used for hole finder"}
private

Definition at line 132 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_dataType

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::m_dataType
protectedinherited

Instance of the DataType_t enum.

Definition at line 351 of file AthMonitorAlgorithm.h.

◆ m_dataTypeStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_dataTypeStr {this,"DataType","userDefined"}
protectedinherited

DataType string pulled from the job option and converted to enum.

Definition at line 353 of file AthMonitorAlgorithm.h.

◆ m_defaultLBDuration

Gaudi::Property<float> AthMonitorAlgorithm::m_defaultLBDuration {this,"DefaultLBDuration",60.}
protectedinherited

Default duration of one lumi block.

Definition at line 360 of file AthMonitorAlgorithm.h.

◆ m_detailLevel

Gaudi::Property<int> AthMonitorAlgorithm::m_detailLevel {this,"DetailLevel",0}
protectedinherited

Sets the level of detail used in the monitoring.

Definition at line 361 of file AthMonitorAlgorithm.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DistToStraw

FloatProperty TRTMonitoringRun3RAW_Alg::m_DistToStraw {this, "DistanceToStraw", 0.4, ""}
private

Definition at line 80 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doChips

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doChips {this, "doChips", true, ""}
private

Definition at line 73 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doExpert

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doExpert {this, "doExpert", false, ""}
private

Definition at line 72 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doHitsMon

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doHitsMon {this, "DoHitsMon", true, ""}
private

Definition at line 79 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doMaskStraws

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doMaskStraws {this, "doMaskStraws", true, ""}
private

Definition at line 77 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doRDOsMon

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doRDOsMon {this, "doRDOsMon", true, ""}
private

Definition at line 75 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doShift

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doShift {this, "doShift", true, ""}
private

Definition at line 76 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doStraws

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doStraws {this, "doStraws", true, ""}
private

Definition at line 71 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_doTracksMon

BooleanProperty TRTMonitoringRun3RAW_Alg::m_doTracksMon {this, "doTracksMon", true, ""}
private

Definition at line 74 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_DQFilterTools

ToolHandleArray<IDQFilterTool> AthMonitorAlgorithm::m_DQFilterTools {this,"FilterTools",{}}
protectedinherited

Array of Data Quality filter tools.

Definition at line 341 of file AthMonitorAlgorithm.h.

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 369 of file AthMonitorAlgorithm.h.

◆ m_enforceExpressTriggers

Gaudi::Property<bool> AthMonitorAlgorithm::m_enforceExpressTriggers
privateinherited
Initial value:
{this,
"EnforceExpressTriggers", false,
"Requires that matched triggers made the event enter the express stream"}

Definition at line 372 of file AthMonitorAlgorithm.h.

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 350 of file AthMonitorAlgorithm.h.

◆ m_environmentStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_environmentStr {this,"Environment","user"}
protectedinherited

Environment string pulled from the job option and converted to enum.

Definition at line 352 of file AthMonitorAlgorithm.h.

◆ m_EventBurstCut

IntegerProperty TRTMonitoringRun3RAW_Alg::m_EventBurstCut {this, "EventBurstCut", -1}
private

Definition at line 162 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_EventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> AthMonitorAlgorithm::m_EventInfoKey {this,"EventInfoKey","EventInfo"}
protectedinherited

Key for retrieving EventInfo from StoreGate.

Definition at line 362 of file AthMonitorAlgorithm.h.

◆ m_every_xth_track

IntegerProperty TRTMonitoringRun3RAW_Alg::m_every_xth_track {this, "every_xth_track", 1, ""}
private

Definition at line 95 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fileKey

Gaudi::Property<std::string> AthMonitorAlgorithm::m_fileKey {this,"FileKey",""}
protectedinherited

Internal Athena name for file.

Definition at line 358 of file AthMonitorAlgorithm.h.

◆ m_iChipMax

Gaudi::Property<std::vector<int> > TRTMonitoringRun3RAW_Alg::m_iChipMax {this,"iChipMax", {-1, -1}}
private

Definition at line 88 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_idHelper

const AtlasDetectorID* TRTMonitoringRun3RAW_Alg::m_idHelper {}
private

Definition at line 58 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_isCosmics

BooleanProperty TRTMonitoringRun3RAW_Alg::m_isCosmics {this, "IsCosmics", false}
private

Definition at line 161 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_lbDurationDataKey

SG::ReadCondHandleKey<LBDurationCondData> AthMonitorAlgorithm::m_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
protectedinherited

Definition at line 345 of file AthMonitorAlgorithm.h.

◆ m_longToTCut

FloatProperty TRTMonitoringRun3RAW_Alg::m_longToTCut {this, "LongToTCut", 9.375}
private

Definition at line 85 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_lumiDataKey

SG::ReadCondHandleKey<LuminosityCondData> AthMonitorAlgorithm::m_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
protectedinherited

Definition at line 343 of file AthMonitorAlgorithm.h.

◆ m_mat_chip_B

std::vector<std::vector<unsigned char> > TRTMonitoringRun3RAW_Alg::m_mat_chip_B {64, std::vector<unsigned char>(1642)}
private

Definition at line 63 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_mat_chip_E

std::vector<std::vector<unsigned char> > TRTMonitoringRun3RAW_Alg::m_mat_chip_E {64, std::vector<unsigned char>(3840)}
private

Definition at line 62 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_max_abs_d0

FloatProperty TRTMonitoringRun3RAW_Alg::m_max_abs_d0 {this, "max_abs_d0", 10 * CLHEP::mm, ""}
private

Definition at line 96 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_max_abs_eta

FloatProperty TRTMonitoringRun3RAW_Alg::m_max_abs_eta {this, "max_abs_eta", 2.5, ""}
private

Definition at line 98 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_max_abs_z0

FloatProperty TRTMonitoringRun3RAW_Alg::m_max_abs_z0 {this, "max_abs_z0", 300 * CLHEP::mm, ""}
private

Definition at line 97 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_mgr

const InDetDD::TRT_DetectorManager* TRTMonitoringRun3RAW_Alg::m_mgr {}
private

Definition at line 60 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_min_pixel_hits

IntegerProperty TRTMonitoringRun3RAW_Alg::m_min_pixel_hits {this, "min_pixel_hits", 0, ""}
private

Definition at line 91 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_min_pT

FloatProperty TRTMonitoringRun3RAW_Alg::m_min_pT {this, "min_pT", 0.5 * CLHEP::GeV, ""}
private

Definition at line 100 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_min_sct_hits

IntegerProperty TRTMonitoringRun3RAW_Alg::m_min_sct_hits {this, "min_sct_hits", 0, ""}
private

Definition at line 92 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_min_si_hits

IntegerProperty TRTMonitoringRun3RAW_Alg::m_min_si_hits {this, "min_si_hits", 1, ""}
private

Definition at line 90 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_min_trt_hits

IntegerProperty TRTMonitoringRun3RAW_Alg::m_min_trt_hits {this, "min_trt_hits", 10, ""}
private

Definition at line 93 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_minP

FloatProperty TRTMonitoringRun3RAW_Alg::m_minP {this, "MinTrackP", 0.0 * CLHEP::GeV, ""}
private

Definition at line 99 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_minTRThits

IntegerProperty TRTMonitoringRun3RAW_Alg::m_minTRThits {this, "MinTRTHitCut", 10, ""}
private

Definition at line 94 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 366 of file AthMonitorAlgorithm.h.

◆ m_pTRTHelper

const TRT_ID* TRTMonitoringRun3RAW_Alg::m_pTRTHelper {}
private

Definition at line 59 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_rdoContainerKey

SG::ReadHandleKey<TRT_RDO_Container> TRTMonitoringRun3RAW_Alg::m_rdoContainerKey {this, "TRTRawDataObjectName", "TRT_RDOs", "Name of TRT RDOs container"}
private

Definition at line 130 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_strawMax

Gaudi::Property<std::vector<int> > TRTMonitoringRun3RAW_Alg::m_strawMax {this,"strawMax", {-1, -1}}
private

Definition at line 87 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_sumTool

ToolHandle<ITRT_StrawStatusSummaryTool> TRTMonitoringRun3RAW_Alg::m_sumTool {this, "InDetTRTStrawStatusSummaryTool", "TRT_StrawStatusSummaryTool", ""}
private

Definition at line 124 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_toolLookupMap

std::unordered_map<std::string, size_t> AthMonitorAlgorithm::m_toolLookupMap
privateinherited

Definition at line 367 of file AthMonitorAlgorithm.h.

◆ m_tools

ToolHandleArray<GenericMonitoringTool> AthMonitorAlgorithm::m_tools {this,"GMTools",{}}
protectedinherited

Array of Generic Monitoring Tools.

Definition at line 338 of file AthMonitorAlgorithm.h.

◆ m_trackCollectionKey

SG::ReadHandleKey<TrackCollection> TRTMonitoringRun3RAW_Alg::m_trackCollectionKey {this, "TRTTracksObjectName", "CombinedInDetTracks", "Name of tracks container"}
private

Definition at line 133 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_trackSelTool

ToolHandle<InDet::IInDetTrackSelectionTool> TRTMonitoringRun3RAW_Alg::m_trackSelTool {this, "TrackSelectionTool", "InDet::InDetTrackSelectionTool/TrackSelectionTool", ""}
private

Definition at line 127 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_TrackSummaryTool

ToolHandle<Trk::ITrackSummaryTool> TRTMonitoringRun3RAW_Alg::m_TrackSummaryTool {this, "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool name"}
private

Definition at line 139 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_trigDecTool

PublicToolHandle<Trig::TrigDecisionTool> AthMonitorAlgorithm::m_trigDecTool {this, "TrigDecisionTool",""}
protectedinherited

Tool to tell whether a specific trigger is passed.

Definition at line 340 of file AthMonitorAlgorithm.h.

◆ m_triggerChainString

Gaudi::Property<std::string> AthMonitorAlgorithm::m_triggerChainString {this,"TriggerChain",""}
protectedinherited

Trigger chain string pulled from the job option and parsed into a vector.

Definition at line 355 of file AthMonitorAlgorithm.h.

◆ m_trigLiveFractionDataKey

SG::ReadCondHandleKey<TrigLiveFractionCondData> AthMonitorAlgorithm::m_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
protectedinherited

Definition at line 347 of file AthMonitorAlgorithm.h.

◆ m_TRT_BCIDCollectionKey

SG::ReadHandleKey<InDetTimeCollection> TRTMonitoringRun3RAW_Alg::m_TRT_BCIDCollectionKey {this, "TRTBCIDCollectionName", "TRT_BCID", "Name of TRT BCID collection"}
private

Definition at line 131 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_trt_hole_finder

ToolHandle<Trk::ITrackHoleSearchTool> TRTMonitoringRun3RAW_Alg::m_trt_hole_finder {this, "trt_hole_search", "TRTTrackHoleSearchTool", "Track hole search tool name"}
private

Definition at line 138 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_TRTStrawNeighbourSvc

ServiceHandle<ITRT_StrawNeighbourSvc> TRTMonitoringRun3RAW_Alg::m_TRTStrawNeighbourSvc {this, "StrawNeighbourSvc", "TRT_StrawNeighbourSvc", ""}
private

Definition at line 125 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_usedEvents

FloatProperty TRTMonitoringRun3RAW_Alg::m_usedEvents {this, "totalEvents", -1, ""}
private

Definition at line 81 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_useHoleFinder

BooleanProperty TRTMonitoringRun3RAW_Alg::m_useHoleFinder {this, "useHoleFinder", false, ""}
private

Definition at line 78 of file TRTMonitoringRun3RAW_Alg.h.

◆ m_useLumi

Gaudi::Property<bool> AthMonitorAlgorithm::m_useLumi {this,"EnableLumi",false}
protectedinherited

Allows use of various luminosity functions.

Definition at line 359 of file AthMonitorAlgorithm.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vTrigChainNames

std::vector<std::string> AthMonitorAlgorithm::m_vTrigChainNames
protectedinherited

Vector of trigger chain names parsed from trigger chain string.

Definition at line 356 of file AthMonitorAlgorithm.h.

◆ s_iChip_max

constexpr int TRTMonitoringRun3RAW_Alg::s_iChip_max = {104, 240}
staticconstexprprivate

Definition at line 66 of file TRTMonitoringRun3RAW_Alg.h.

◆ s_numberOfBarrelStacks

constexpr int TRTMonitoringRun3RAW_Alg::s_numberOfBarrelStacks = 32
staticconstexprprivate

Definition at line 68 of file TRTMonitoringRun3RAW_Alg.h.

◆ s_numberOfEndCapStacks

constexpr int TRTMonitoringRun3RAW_Alg::s_numberOfEndCapStacks = 32
staticconstexprprivate

Definition at line 69 of file TRTMonitoringRun3RAW_Alg.h.

◆ s_Straw_max

constexpr int TRTMonitoringRun3RAW_Alg::s_Straw_max = {1642, 3840}
staticconstexprprivate

Definition at line 65 of file TRTMonitoringRun3RAW_Alg.h.


The documentation for this class was generated from the following files:
TRTMonitoringRun3RAW_Alg::strawLayerNumber
int strawLayerNumber(int strawLayerNumber, int LayerNumber) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:599
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
straw_shifter_struct::isAr
bool isAr
Definition: TRTMonitoringRun3RAW_Alg.cxx:695
Trk::numberOfPixelHits
@ numberOfPixelHits
number of pixel layers on track with absence of hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:57
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
chip_struct_prob::chipNumber
int chipNumber
Definition: TRTMonitoringRun3RAW_Alg.cxx:680
TRTMonitoringRun3RAW_Alg::m_EventBurstCut
IntegerProperty m_EventBurstCut
Definition: TRTMonitoringRun3RAW_Alg.h:162
CXXUTILS_TRAPPING_FP
#define CXXUTILS_TRAPPING_FP
Definition: trapping_fp.h:24
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
TRT_ID::layer_id
Identifier layer_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer) const
For an individual straw layer.
Definition: TRT_ID.h:494
TRT_BSErrContainer::getMissingErrorSet
const std::set< uint32_t > & getMissingErrorSet(void) const
Definition: TRT_BSErrContainer.h:33
lastBinHigh
bool lastBinHigh(unsigned int m_word)
Definition: driftCircle.h:108
AthMonitorAlgorithm::Environment_t::tier0Raw
@ tier0Raw
straw_shifter_struct::HitWMap_passed
float HitWMap_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:696
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:18
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
chip_struct_prob::HitAWMapC_passed
float HitAWMapC_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:688
TRT::Hit::straw
@ straw
Definition: HitInfo.h:82
InDet::TRT_DriftCircleOnTrack::prepRawData
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
Definition: TRT_DriftCircleOnTrack.h:202
chip_struct_prob::HitHWMapC_passed
float HitHWMapC_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:682
TRTMonitoringRun3RAW_Alg::m_doHitsMon
BooleanProperty m_doHitsMon
Definition: TRTMonitoringRun3RAW_Alg.h:79
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.mm
float mm
Definition: SystemOfUnits.py:98
TRTMonitoringRun3RAW_Alg::m_BSSvc
ServiceHandle< ITRT_ByteStream_ConditionsSvc > m_BSSvc
Definition: TRTMonitoringRun3RAW_Alg.h:126
straw_struct::HitToTLong_cut
bool HitToTLong_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:649
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
straw_shifter_struct::strawNumber
int strawNumber
Definition: TRTMonitoringRun3RAW_Alg.cxx:694
TRTMonitoringRun3RAW_Alg::fillTRTEfficiency
StatusCode fillTRTEfficiency(const EventContext &ctx, const TrackCollection &combTrackCollection) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:1690
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthMonitorAlgorithm::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
Definition: AthMonitorAlgorithm.h:340
TRTMonitoringRun3RAW_Alg::m_trackCollectionKey
SG::ReadHandleKey< TrackCollection > m_trackCollectionKey
Definition: TRTMonitoringRun3RAW_Alg.h:133
TRTMonitoringRun3RAW_Alg::m_idHelper
const AtlasDetectorID * m_idHelper
Definition: TRTMonitoringRun3RAW_Alg.h:58
AthMonitorAlgorithm::Environment_t::tier0
@ tier0
AthMonitorAlgorithm::Environment_t::AOD
@ AOD
TRT_LoLumRawData::highLevel
virtual bool highLevel() const override final
Definition: TRT_LoLumRawData.h:128
chip_struct_prob::HitAMapC_passed
float HitAMapC_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:686
TRTByteStreamErrors::L1IDError
@ L1IDError
Definition: ITRT_ByteStream_ConditionsSvc.h:20
TRT_LoLumRawData::lastBinHigh
bool lastBinHigh() const
Definition: TRT_LoLumRawData.h:165
TRTMonitoringRun3RAW_Alg::m_TRT_BCIDCollectionKey
SG::ReadHandleKey< InDetTimeCollection > m_TRT_BCIDCollectionKey
Definition: TRTMonitoringRun3RAW_Alg.h:131
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
TRT_LoLumRawData
Definition: TRT_LoLumRawData.h:25
index
Definition: index.py:1
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
InDetDD::holes
@ holes
Definition: InDetDD_Defs.h:17
InDetDD::TRT_DetectorManager::getBarrelElement
const TRT_BarrelElement * getBarrelElement(unsigned int positive, unsigned int moduleIndex, unsigned int phiIndex, unsigned int strawLayerIndex) const
Access Barrel Elements:---------------—(Fast)-------------------------—.
Definition: TRT_DetectorManager.cxx:100
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
TRTMonitoringRun3RAW_Alg::strawNumber_reverse
int strawNumber_reverse(int inp_strawnumber, int *strawNumber, int *strawlayerNumber, int *LayerNumber) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:480
chip_struct::HitToTMapC_y
float HitToTMapC_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:658
InDet::TRT_DriftCircle::timeOverThreshold
double timeOverThreshold() const
returns Time over threshold in ns
straw_edge_struct
Definition: TRTMonitoringRun3RAW_Alg.cxx:2021
InDetDD::TRT_BaseElement::nStraws
unsigned int nStraws() const
Number of straws in the element.
TRTMonitoringRun3RAW_Alg::Ar
@ Ar
Definition: TRTMonitoringRun3RAW_Alg.h:141
chip_struct::HtoBCMapB_x
int HtoBCMapB_x
Definition: TRTMonitoringRun3RAW_Alg.cxx:660
Trk::Surface::associatedDetectorElementIdentifier
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
AthMonitorAlgorithm::m_vTrigChainNames
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
Definition: AthMonitorAlgorithm.h:356
chip_struct::HitTrWMapC_cut
bool HitTrWMapC_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:657
chip_struct_prob
Definition: TRTMonitoringRun3RAW_Alg.cxx:679
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
straw_struct_prob::HitAWMapS_cut
bool HitAWMapS_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:673
AthMonitorAlgorithm::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.
Definition: AthMonitorAlgorithm.h:362
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
straw_struct::HitToTMapS_y
float HitToTMapS_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:648
skel.it
it
Definition: skel.GENtoEVGEN.py:407
straw_struct_prob::HitWMapS_cut
bool HitWMapS_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:669
straw_shifter_struct::HitWMap_Ar_passed
float HitWMap_Ar_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:697
M_PI
#define M_PI
Definition: ActiveFraction.h:11
straw_struct::strawNumber
int strawNumber
Definition: TRTMonitoringRun3RAW_Alg.cxx:646
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
TRTMonitoringRun3RAW_Alg::chipToBoard_EndCap
int chipToBoard_EndCap(int chip) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:388
TRTMonitoringRun3RAW_Alg::m_ArgonXenonSplitter
BooleanProperty m_ArgonXenonSplitter
Definition: TRTMonitoringRun3RAW_Alg.h:83
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
InDetDD::TRT_BaseElement::strawCenter
const Amg::Vector3D & strawCenter(int straw) const
Straw Surface: Local -> global transform of the straw via integer.
Definition: TRT_BaseElement.cxx:143
AthMonitorAlgorithm::m_toolLookupMap
std::unordered_map< std::string, size_t > m_toolLookupMap
Definition: AthMonitorAlgorithm.h:367
Trk::z0
@ z0
Definition: ParamDefs.h:64
TRTMonitoringRun3RAW_Alg::m_doMaskStraws
BooleanProperty m_doMaskStraws
Definition: TRTMonitoringRun3RAW_Alg.h:77
straw_struct::HitTrWMapS_cut
bool HitTrWMapS_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:650
TRTMonitoringRun3RAW_Alg::m_TrackSummaryTool
ToolHandle< Trk::ITrackSummaryTool > m_TrackSummaryTool
Definition: TRTMonitoringRun3RAW_Alg.h:139
AthMonitorAlgorithm::m_environment
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.
Definition: AthMonitorAlgorithm.h:350
TRTMonitoringRun3RAW_Alg::m_rdoContainerKey
SG::ReadHandleKey< TRT_RDO_Container > m_rdoContainerKey
Definition: TRTMonitoringRun3RAW_Alg.h:130
TRTMonitoringRun3RAW_Alg::m_isCosmics
BooleanProperty m_isCosmics
Definition: TRTMonitoringRun3RAW_Alg.h:161
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
straw_edge_struct::HitWonTMap_B_y
float HitWonTMap_B_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:2023
cosmics
Definition: cosmics.py:1
Trk::locR
@ locR
Definition: ParamDefs.h:44
TRTMonitoringRun3RAW_Alg::chipToBoard
int chipToBoard(int chip) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:358
AtlasDetectorID::is_trt
bool is_trt(Identifier id) const
Definition: AtlasDetectorID.h:789
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
straw_struct_prob::HitHWMapS_cut
bool HitHWMapS_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:667
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
TRTMonitoringRun3RAW_Alg::m_TRTStrawNeighbourSvc
ServiceHandle< ITRT_StrawNeighbourSvc > m_TRTStrawNeighbourSvc
Definition: TRTMonitoringRun3RAW_Alg.h:125
InDet::TRT_DriftCircle::driftTimeBin
int driftTimeBin() const
returns the leading edge bin defined as in TRT_LoLumRawData to be the first 0-1 transition
InDet::TRT_DriftCircleOnTrack
Definition: TRT_DriftCircleOnTrack.h:53
straw_struct_prob::strawNumber
int strawNumber
Definition: TRTMonitoringRun3RAW_Alg.cxx:666
InDet::TRT_DriftCircleOnTrack::detectorElement
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
Definition: TRT_DriftCircleOnTrack.h:224
TRTMonitoringRun3RAW_Alg::m_doStraws
BooleanProperty m_doStraws
Definition: TRTMonitoringRun3RAW_Alg.h:71
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
AthMonitorAlgorithm::trigChainsArePassed
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
Definition: AthMonitorAlgorithm.cxx:199
chip_struct
Definition: TRTMonitoringRun3RAW_Alg.cxx:654
InDet::TRT_DriftCircle
Definition: TRT_DriftCircle.h:32
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
AthMonitorAlgorithm::Environment_t::user
@ user
TRTMonitoringRun3RAW_Alg::strawLayerNumber_reverse
int strawLayerNumber_reverse(int strawLayerNumInp, int *strawLayerNumber, int *LayerNumber) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:617
TRTMonitoringRun3RAW_Alg::m_every_xth_track
IntegerProperty m_every_xth_track
Definition: TRTMonitoringRun3RAW_Alg.h:95
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
TRTByteStreamErrors::RobStatusError
@ RobStatusError
Definition: ITRT_ByteStream_ConditionsSvc.h:24
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthMonitorAlgorithm::m_dummy
const ToolHandle< GenericMonitoringTool > m_dummy
Definition: AthMonitorAlgorithm.h:369
TRTMonitoringRun3RAW_Alg::m_doTracksMon
BooleanProperty m_doTracksMon
Definition: TRTMonitoringRun3RAW_Alg.h:74
TRT_BSErrContainer::getRobErrorSet
const std::set< std::pair< uint32_t, uint32_t > > & getRobErrorSet(void) const
Definition: TRT_BSErrContainer.h:31
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TRT::Hit::side
@ side
Definition: HitInfo.h:83
straw_struct_prob::HitHMapS_passed
float HitHMapS_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:676
TRT_LoLumRawData::driftTimeBin
virtual int driftTimeBin() const override final
Definition: TRT_LoLumRawData.h:57
TRT_BSErrContainer
Definition: TRT_BSErrContainer.h:20
TRT_LoLumRawData::firstBinHigh
bool firstBinHigh() const
Definition: TRT_LoLumRawData.h:154
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
chip_struct::HtoBCMapC_x
int HtoBCMapC_x
Definition: TRTMonitoringRun3RAW_Alg.cxx:659
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
chip_struct_prob::HitWMapC_cut
bool HitWMapC_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:683
TileSynchronizeBch.online
online
Definition: TileSynchronizeBch.py:88
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
TRTMonitoringRun3RAW_Alg::strawNumber
int strawNumber(int strawNumber, int strawlayerNumber, int LayerNumber) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:433
TRT_ID::straw
int straw(const Identifier &id) const
Definition: TRT_ID.h:896
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
TRTMonitoringRun3RAW_Alg::Straw_Gastype
GasType Straw_Gastype(int stat) const
Definition: TRTMonitoringRun3RAW_Alg.h:143
AthCommonDataStore
Definition: AthCommonDataStore.h:52
straw_struct::HitTrWMapS_y
float HitTrWMapS_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:651
AthMonitorAlgorithm::m_DQFilterTools
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.
Definition: AthMonitorAlgorithm.h:341
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TRTMonitoringRun3RAW_Alg::fillTRTHits
StatusCode fillTRTHits(const EventContext &ctx, const TrackCollection &trackCollection) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:2029
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
TRTMonitoringRun3RAW_Alg::radToDegrees
float radToDegrees(float radValue) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:636
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
lumiFormat.i
int i
Definition: lumiFormat.py:85
TRTMonitoringRun3RAW_Alg::s_Straw_max
static const int s_Straw_max[2]
Definition: TRTMonitoringRun3RAW_Alg.h:65
Monitored
Generic monitoring tool for athena components.
Definition: GenericMonitoringTool.h:30
IDTPM::nTRTHits
float nTRTHits(const U &p)
Definition: TrackParametersHelper.h:446
Trk::theta
@ theta
Definition: ParamDefs.h:66
TRTMonitoringRun3RAW_Alg::s_numberOfBarrelStacks
static const int s_numberOfBarrelStacks
Definition: TRTMonitoringRun3RAW_Alg.h:68
TRTMonitoringRun3RAW_Alg::Xe
@ Xe
Definition: TRTMonitoringRun3RAW_Alg.h:141
AthMonitorAlgorithm::DataType_t::heavyIonCollisions
@ heavyIonCollisions
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::numberOfSCTHits
@ numberOfSCTHits
number of SCT holes
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:71
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
straw_edge_struct::strawNumber
int strawNumber
Definition: TRTMonitoringRun3RAW_Alg.cxx:2022
straw_struct_prob
Definition: TRTMonitoringRun3RAW_Alg.cxx:665
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
Trk::driftRadius
@ driftRadius
trt, straws
Definition: ParamDefs.h:53
tolower
void tolower(std::string &s)
Definition: AthenaSummarySvc.cxx:108
python.CaloAddPedShiftConfig.str
str
Definition: CaloAddPedShiftConfig.py:42
AthMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
calibdata.exception
exception
Definition: calibdata.py:495
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:239
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
TRTMonitoringRun3RAW_Alg::m_bsErrContKey
SG::ReadHandleKey< TRT_BSErrContainer > m_bsErrContKey
Definition: TRTMonitoringRun3RAW_Alg.h:135
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:79
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:233
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
InDet::TRT_DriftCircle::trailingEdge
int trailingEdge() const
returns the trailing edge bin
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
TRTMonitoringRun3RAW_Alg::m_combTrackCollectionKey
SG::ReadHandleKey< TrackCollection > m_combTrackCollectionKey
Definition: TRTMonitoringRun3RAW_Alg.h:132
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:860
TRT_ID::straw_layer
int straw_layer(const Identifier &id) const
Definition: TRT_ID.h:887
jobOption.theta
theta
Definition: jobOption.ParticleGun_fwd_sequence.py:13
AthMonitorAlgorithm::GetEventInfo
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
Definition: AthMonitorAlgorithm.cxx:107
DataVector< const Trk::TrackStateOnSurface >
TRT_ID::layer_or_wheel
int layer_or_wheel(const Identifier &id) const
Definition: TRT_ID.h:878
beamspotman.stat
stat
Definition: beamspotman.py:264
TRTByteStreamErrors::BCIDError
@ BCIDError
Definition: ITRT_ByteStream_ConditionsSvc.h:19
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
AthMonitorAlgorithm::m_dataType
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.
Definition: AthMonitorAlgorithm.h:351
straw_edge_struct::HitWonTMap_E_y
float HitWonTMap_E_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:2024
TRTMonitoringRun3RAW_Alg::s_numberOfEndCapStacks
static const int s_numberOfEndCapStacks
Definition: TRTMonitoringRun3RAW_Alg.h:69
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
straw_struct_prob::HitAMapS_cut
bool HitAMapS_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:671
TRTMonitoringRun3RAW_Alg::m_mat_chip_B
std::vector< std::vector< unsigned char > > m_mat_chip_B
Definition: TRTMonitoringRun3RAW_Alg.h:63
AthMonitorAlgorithm::DataType_t::cosmics
@ cosmics
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
straw_struct_prob::HitHMapS_cut
bool HitHMapS_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:675
firstBinHigh
bool firstBinHigh(unsigned int m_word)
Definition: driftCircle.h:104
InDetDD::TRT_DetectorManager::getEndcapElement
const TRT_EndcapElement * getEndcapElement(unsigned int positive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex) const
Access Endcap Elements:---------------—(Fast)--------------------------—.
Definition: TRT_DetectorManager.cxx:116
AthMonitorAlgorithm::m_tools
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
Definition: AthMonitorAlgorithm.h:338
chip_struct::HtoBCMapB_y
int HtoBCMapB_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:661
Trk::numberOfTRTHits
@ numberOfTRTHits
number of TRT outliers
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:79
TRT_LoLumRawData::trailingEdge
int trailingEdge() const
Definition: TRT_LoLumRawData.h:66
AthMonitorAlgorithm::Environment_t::online
@ online
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
remainder
std::vector< std::string > remainder(const std::vector< std::string > &v1, const std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Trk::d0
@ d0
Definition: ParamDefs.h:63
TRTMonitoringRun3RAW_Alg::m_useHoleFinder
BooleanProperty m_useHoleFinder
Definition: TRTMonitoringRun3RAW_Alg.h:78
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TRT_LoLumRawData::timeOverThreshold
virtual double timeOverThreshold() const override final
Definition: TRT_LoLumRawData.h:47
AthMonitorAlgorithm::Environment_t::tier0ESD
@ tier0ESD
straw_struct_prob::HitWMapS_passed
float HitWMapS_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:670
TRTMonitoringRun3RAW_Alg::m_doChips
BooleanProperty m_doChips
Definition: TRTMonitoringRun3RAW_Alg.h:73
AthMonitorAlgorithm::Environment_t::altprod
@ altprod
TRTMonitoringRun3RAW_Alg::m_longToTCut
FloatProperty m_longToTCut
Definition: TRTMonitoringRun3RAW_Alg.h:85
AthMonitorAlgorithm::m_enforceExpressTriggers
Gaudi::Property< bool > m_enforceExpressTriggers
Definition: AthMonitorAlgorithm.h:372
InDet::TRT_DriftCircle::lastBinHigh
bool lastBinHigh() const
returns true if the last bin is high
item
Definition: ItemListSvc.h:43
WriteBchToCool.user
user
Definition: WriteBchToCool.py:76
TRTMonitoringRun3RAW_Alg::m_doShift
BooleanProperty m_doShift
Definition: TRTMonitoringRun3RAW_Alg.h:76
TRT_BSErrContainer::getSidErrorSet
const std::set< uint32_t > & getSidErrorSet(void) const
Definition: TRT_BSErrContainer.h:39
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
TRT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: TRT_ID.h:869
chip_struct_prob::HitAWMapC_cut
bool HitAWMapC_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:687
chip_struct_prob::HitHMapC_passed
float HitHMapC_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:690
chip_struct::HitTrMapC_y
float HitTrMapC_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:656
TRTMonitoringRun3RAW_Alg::m_doRDOsMon
BooleanProperty m_doRDOsMon
Definition: TRTMonitoringRun3RAW_Alg.h:75
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
TRTByteStreamErrors::MISSINGError
@ MISSINGError
Definition: ITRT_ByteStream_ConditionsSvc.h:21
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
TRTMonitoringRun3RAW_Alg::Kr
@ Kr
Definition: TRTMonitoringRun3RAW_Alg.h:141
TRTMonitoringRun3RAW_Alg::m_mat_chip_E
std::vector< std::vector< unsigned char > > m_mat_chip_E
Definition: TRTMonitoringRun3RAW_Alg.h:62
ATH_LIKELY
#define ATH_LIKELY(x)
Definition: AthUnlikelyMacros.h:16
DeMoScan.index
string index
Definition: DeMoScan.py:362
runIDAlign.accumulate
accumulate
Update flags based on parser line args.
Definition: runIDAlign.py:60
straw_struct::HitTrMapS_y
float HitTrMapS_y
Definition: TRTMonitoringRun3RAW_Alg.cxx:647
TRT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel.
Definition: TRT_ID.h:851
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
h
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
TRTMonitoringRun3RAW_Alg::m_trt_hole_finder
ToolHandle< Trk::ITrackHoleSearchTool > m_trt_hole_finder
Definition: TRTMonitoringRun3RAW_Alg.h:138
lumiFormat.fill
fill
Definition: lumiFormat.py:104
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthMonitorAlgorithm::DataType_t::collisions
@ collisions
straw_shifter_struct
Definition: TRTMonitoringRun3RAW_Alg.cxx:693
AthMonitorAlgorithm::m_name
std::string m_name
Definition: AthMonitorAlgorithm.h:366
TRTMonitoringRun3RAW_Alg::m_minP
FloatProperty m_minP
Definition: TRTMonitoringRun3RAW_Alg.h:99
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
chip_struct_prob::HitAMapC_cut
bool HitAMapC_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:685
TRT_BSErrContainer::getL1ErrorSet
const std::set< std::pair< uint32_t, uint32_t > > & getL1ErrorSet() const
Definition: TRT_BSErrContainer.h:42
straw_struct_prob::HitAMapS_passed
float HitAMapS_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:672
TRTMonitoringRun3RAW_Alg::m_min_pT
FloatProperty m_min_pT
Definition: TRTMonitoringRun3RAW_Alg.h:100
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMonitorAlgorithm.cxx:7
python.LArCondContChannels.isBarrel
isBarrel
Definition: LArCondContChannels.py:659
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
chip_struct_prob::HitWMapC_passed
float HitWMapC_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:684
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
straw_struct_prob::HitAWMapS_passed
float HitAWMapS_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:674
TRTMonitoringRun3RAW_Alg::m_trackSelTool
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
Definition: TRTMonitoringRun3RAW_Alg.h:127
chip_struct_prob::HitHWMapC_cut
bool HitHWMapC_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:681
TRTMonitoringRun3RAW_Alg::strawNumberEndCap
int strawNumberEndCap(int strawNumber, int strawLayerNumber, int LayerNumber, int phi_stack, int side) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:520
TRTMonitoringRun3RAW_Alg::m_sumTool
ToolHandle< ITRT_StrawStatusSummaryTool > m_sumTool
Definition: TRTMonitoringRun3RAW_Alg.h:124
timeOverThreshold
double timeOverThreshold(unsigned int m_word)
Definition: driftCircle.h:116
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
TRTMonitoringRun3RAW_Alg::s_iChip_max
static const int s_iChip_max[2]
Definition: TRTMonitoringRun3RAW_Alg.h:66
TRTByteStreamErrors::SIDError
@ SIDError
Definition: ITRT_ByteStream_ConditionsSvc.h:23
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
TRTMonitoringRun3RAW_Alg::initScaleVectors
std::vector< std::vector< std::vector< int > > > initScaleVectors(const EventContext &ctx) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:193
InDet::TRT_DriftCircle::getWord
unsigned int getWord() const
returns the TRT dataword
TRTMonitoringRun3RAW_Alg::m_pTRTHelper
const TRT_ID * m_pTRTHelper
Definition: TRTMonitoringRun3RAW_Alg.h:59
TRT_ID::straw_layer_hash_max
size_type straw_layer_hash_max() const
Definition: TRT_ID.h:914
TRTMonitoringRun3RAW_Alg::GasType
GasType
Definition: TRTMonitoringRun3RAW_Alg.h:141
AthMonitorAlgorithm::DataType_t::userDefined
@ userDefined
TRTMonitoringRun3RAW_Alg::fillTRTRDOs
StatusCode fillTRTRDOs(const EventContext &ctx, const TRT_RDO_Container &rdoContainer, const xAOD::EventInfo &eventInfo, const InDetTimeCollection *trtBCIDCollection) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:702
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
TRTMonitoringRun3RAW_Alg::m_DistToStraw
FloatProperty m_DistToStraw
Definition: TRTMonitoringRun3RAW_Alg.h:80
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:328
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
TRTMonitoringRun3RAW_Alg::m_doExpert
BooleanProperty m_doExpert
Definition: TRTMonitoringRun3RAW_Alg.h:72
TRTMonitoringRun3RAW_Alg::m_minTRThits
IntegerProperty m_minTRThits
Definition: TRTMonitoringRun3RAW_Alg.h:94
TRTMonitoringRun3RAW_Alg::checkEventBurst
bool checkEventBurst(const TRT_RDO_Container &rdoContainer) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:400
chip_struct::chipNumber
int chipNumber
Definition: TRTMonitoringRun3RAW_Alg.cxx:655
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
trailingEdge
int trailingEdge(unsigned int m_word)
Definition: driftCircle.h:64
TRTMonitoringRun3RAW_Alg::m_min_trt_hits
IntegerProperty m_min_trt_hits
Definition: TRTMonitoringRun3RAW_Alg.h:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
InDet::TRT_DriftCircle::firstBinHigh
bool firstBinHigh() const
returns true if the first bin is high
Trk::phi0
@ phi0
Definition: ParamDefs.h:65
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
TRTMonitoringRun3RAW_Alg::checkTRTReadoutIntegrity
StatusCode checkTRTReadoutIntegrity(const xAOD::EventInfo &eventInfo) const
Definition: TRTMonitoringRun3RAW_Alg.cxx:256
straw_struct
Definition: TRTMonitoringRun3RAW_Alg.cxx:645
TRT_BSErrContainer::getBCIDErrorSet
const std::set< std::pair< uint32_t, uint32_t > > & getBCIDErrorSet() const
Definition: TRT_BSErrContainer.h:45
AthMonitorAlgorithm::DataType_t::monteCarlo
@ monteCarlo
chip_struct::HtoBCMap_cut
bool HtoBCMap_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:662
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
chip_struct_prob::HitHMapC_cut
bool HitHMapC_cut
Definition: TRTMonitoringRun3RAW_Alg.cxx:689
fitman.k
k
Definition: fitman.py:528
straw_struct_prob::HitHWMapS_passed
float HitHWMapS_passed
Definition: TRTMonitoringRun3RAW_Alg.cxx:668
InDetDD::TRT_BaseElement
Definition: TRT_BaseElement.h:52
invGeV
constexpr float invGeV
Definition: PFTrackSelector.cxx:10
TRT_ID::straw_id
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw:
Definition: TRT_ID.h:575
python.LArMinBiasAlgConfig.float
float
Definition: LArMinBiasAlgConfig.py:65
ServiceHandle< ICondSvc >
driftTimeBin
int driftTimeBin(unsigned int m_word)
Definition: driftCircle.h:50
TRTMonitoringRun3RAW_Alg::m_mgr
const InDetDD::TRT_DetectorManager * m_mgr
Definition: TRTMonitoringRun3RAW_Alg.h:60
collisions
Definition: collisions.py:1
Identifier
Definition: IdentifierFieldParser.cxx:14
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65