ATLAS Offline Software
Loading...
Searching...
No Matches
TRTMonitoringRun3RAW_Alg Class Reference

#include <TRTMonitoringRun3RAW_Alg.h>

Inheritance diagram for TRTMonitoringRun3RAW_Alg:

Public Types

enum class  Environment_t {
  user = 0 , online , tier0 , tier0Raw ,
  tier0ESD , AOD , altprod
}
 Specifies the processing environment. More...
enum class  DataType_t {
  userDefined = 0 , monteCarlo , collisions , cosmics ,
  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
virtual StatusCode fillHistograms (const EventContext &ctx) const override
 adds event to the monitoring histograms
virtual StatusCode execute (const EventContext &ctx) const override
 Applies filters and trigger requirements.
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.
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.
template<typename... T>
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, T &&... variables) const
 Fills a variadic list of variables to a group by reference.
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.
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.
template<typename... T>
void fill (const std::string &groupName, T &&... variables) const
 Fills a variadic list of variables to a group by name.
Environment_t environment () const
 Accessor functions for the environment.
Environment_t envStringToEnum (const std::string &str) const
 Convert the environment string from the python configuration to an enum object.
DataType_t dataType () const
 Accessor functions for the data type.
DataType_t dataTypeStringToEnum (const std::string &str) const
 Convert the data type string from the python configuration to an enum object.
const ToolHandle< GenericMonitoringTool > & getGroup (const std::string &name) const
 Get a specific monitoring tool from the tool handle array.
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool () const
 Get the trigger decision tool member.
bool trigChainsArePassed (const std::vector< std::string > &vTrigNames) const
 Check whether triggers are passed.
SG::ReadHandle< xAOD::EventInfoGetEventInfo (const EventContext &) const
 Return a ReadHandle for an EventInfo object (get run/event numbers, etc.).
virtual float lbAverageInteractionsPerCrossing (const EventContext &ctx) const
 Calculate the average mu, i.e.
virtual float lbInteractionsPerCrossing (const EventContext &ctx) const
 Calculate instantaneous number of interactions, i.e.
virtual float lbAverageLuminosity (const EventContext &ctx) const
 Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
virtual float lbLuminosityPerBCID (const EventContext &ctx) const
 Calculate the instantaneous luminosity per bunch crossing.
virtual double lbDuration (const EventContext &ctx) const
 Calculate the duration of the luminosity block (in seconds).
virtual float lbAverageLivefraction (const EventContext &ctx) const
 Calculate the average luminosity livefraction.
virtual float livefractionPerBCID (const EventContext &ctx) const
 Calculate the live fraction per bunch crossing ID.
virtual double lbLumiWeight (const EventContext &ctx) const
 Calculate the average integrated luminosity multiplied by the live fraction.
virtual StatusCode parseList (const std::string &line, std::vector< std::string > &result) const
 Parse a string into a vector.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Protected Attributes

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

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>

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.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
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 370 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 class 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 194 of file AthMonitorAlgorithm.h.

194 {
195 userDefined = 0,
196 monteCarlo,
197 collisions,
198 cosmics,
199 heavyIonCollisions,
200 };
AthConfigFlags cosmics(AthConfigFlags flags, str instanceName, str recoMode)

◆ Environment_t

enum class 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 175 of file AthMonitorAlgorithm.h.

175 {
176 user = 0,
177 online,
178 tier0,
179 tier0Raw,
180 tier0ESD,
181 AOD,
182 altprod,
183 };

◆ GasType

enum TRTMonitoringRun3RAW_Alg::GasType
private
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 48 of file TRTMonitoringRun3RAW_Alg.cxx.

49:AthMonitorAlgorithm(name,pSvcLocator)
50{
51}
Base class for Athena Monitoring Algorithms.

◆ ~TRTMonitoringRun3RAW_Alg()

TRTMonitoringRun3RAW_Alg::~TRTMonitoringRun3RAW_Alg ( )
virtual

Definition at line 53 of file TRTMonitoringRun3RAW_Alg.cxx.

53{}

Member Function Documentation

◆ checkEventBurst()

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

Definition at line 401 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ checkTRTReadoutIntegrity()

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

Definition at line 257 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ chipToBoard()

int TRTMonitoringRun3RAW_Alg::chipToBoard ( int chip) const
private

Definition at line 359 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ chipToBoard_EndCap()

int TRTMonitoringRun3RAW_Alg::chipToBoard_EndCap ( int chip) const
private

Definition at line 389 of file TRTMonitoringRun3RAW_Alg.cxx.

389 {
390//----------------------------------------------------------------------------------//
391 const int remainder = (chip - 1) % 12;
392 const int Board = int(((chip - 1) - remainder) / 12);
393 return Board + 1;
394}
std::vector< std::string > remainder(const std::vector< std::string > &v1, const std::vector< std::string > &v2)

◆ 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 224 of file AthMonitorAlgorithm.h.

224{ return m_dataType; }
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.

◆ 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 144 of file AthMonitorAlgorithm.cxx.

144 {
145 // convert the string to all lowercase
146 std::string lowerCaseStr = str;
147 std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
148
149 // check if it matches one of the enum choices
150 if( lowerCaseStr == "userdefined" ) {
152 } else if( lowerCaseStr == "montecarlo" ) {
154 } else if( lowerCaseStr == "collisions" ) {
156 } else if( lowerCaseStr == "cosmics" ) {
157 return DataType_t::cosmics;
158 } else if( lowerCaseStr == "heavyioncollisions" ) {
160 } else { // otherwise, warn the user and return "userDefined"
161 ATH_MSG_WARNING("AthMonitorAlgorithm::dataTypeStringToEnum(): Unknown data type "
162 <<str<<", returning userDefined.");
164 }
165}
#define ATH_MSG_WARNING(x)
void tolower(std::string &s)

◆ declareGaudiProperty()

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 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ 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 208 of file AthMonitorAlgorithm.h.

208{ return m_environment; }
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.

◆ 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 116 of file AthMonitorAlgorithm.cxx.

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

◆ evtStore()

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.

◆ 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 77 of file AthMonitorAlgorithm.cxx.

77 {
78
79 // Checks that all of the DQ filters are passed. If any one of the filters
80 // fails, return SUCCESS code and do not fill the histograms with the event.
81 for ( const auto& filterItr : m_DQFilterTools ) {
82 if (!filterItr->accept(ctx)) {
83 ATH_MSG_DEBUG("Event rejected due to filter tool.");
84 return StatusCode::SUCCESS;
85 }
86 }
87
88 // Trigger: If there is a decision tool and the chains fail, skip the event.
90 ATH_MSG_DEBUG("Event rejected due to trigger filter.");
91 return StatusCode::SUCCESS;
92 }
93
94 ATH_MSG_DEBUG("Event accepted!");
95 return fillHistograms(ctx);
96}
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.

◆ 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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ 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 2714 of file TRTMonitoringRun3RAW_Alg.cxx.

2714 {
2715 using namespace Monitored;
2716 bool passEventBurst;
2717
2718 ATH_MSG_VERBOSE("Monitoring Histograms being filled");
2719
2720 SG::ReadHandle<TRT_RDO_Container> rdoContainer(m_rdoContainerKey, ctx);
2721 SG::ReadHandle<xAOD::EventInfo> xAODEventInfo = GetEventInfo(ctx);
2722 SG::ReadHandle<InDetTimeCollection> trtBCIDCollection(m_TRT_BCIDCollectionKey, ctx);
2723 SG::ReadHandle<TrackCollection> combTrackCollection(m_combTrackCollectionKey, ctx);
2724 SG::ReadHandle<TrackCollection> trackCollection(m_trackCollectionKey, ctx);
2725
2726 if (m_doRDOsMon) {
2727 if (!rdoContainer.isValid()) {
2728 ATH_MSG_ERROR("Could not find TRT Raw Data Object " << m_rdoContainerKey.key() <<
2729 " in store");
2730 return StatusCode::FAILURE;
2731 }
2732
2733 passEventBurst = checkEventBurst(*rdoContainer);
2734 if (passEventBurst) {
2735 if (!trtBCIDCollection.isValid()) {
2736 ATH_MSG_INFO("Could not find BCID collection " << m_TRT_BCIDCollectionKey.key() <<
2737 " in store");
2738 }
2739
2740 ATH_CHECK( fillTRTRDOs(ctx, *rdoContainer, *xAODEventInfo, trtBCIDCollection.ptr()) );
2741 }
2742 } else passEventBurst = true;
2743
2744 if (m_useHoleFinder) {
2745 if (!combTrackCollection.isValid()) {
2746 ATH_MSG_ERROR("Could not find track collection " << m_combTrackCollectionKey.key() <<
2747 " in store");
2748 return StatusCode::FAILURE;
2749 }
2750 ATH_CHECK( fillTRTEfficiency(ctx, *combTrackCollection) );
2751 }
2752
2753 if (m_doHitsMon) {
2754 if (!trackCollection.isValid()) {
2755 ATH_MSG_ERROR("Could not find track collection " << m_trackCollectionKey.key() <<
2756 " in store");
2757 return StatusCode::FAILURE;
2758 }
2759 if (passEventBurst) {
2760 ATH_CHECK( fillTRTHits(ctx, *trackCollection) );
2761 }
2762 }
2763
2764 return StatusCode::SUCCESS;
2765}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
StatusCode fillTRTRDOs(const EventContext &ctx, const TRT_RDO_Container &rdoContainer, const xAOD::EventInfo &eventInfo, const InDetTimeCollection *trtBCIDCollection) const
StatusCode fillTRTHits(const EventContext &ctx, const TrackCollection &trackCollection) const
SG::ReadHandleKey< TrackCollection > m_combTrackCollectionKey
StatusCode fillTRTEfficiency(const EventContext &ctx, const TrackCollection &combTrackCollection) const
SG::ReadHandleKey< TrackCollection > m_trackCollectionKey
Generic monitoring tool for athena components.

◆ fillTRTEfficiency()

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

Definition at line 1691 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ fillTRTHits()

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

Definition at line 2030 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ 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 703 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ filterPassed()

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

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ 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 111 of file AthMonitorAlgorithm.cxx.

111 {
112 return SG::ReadHandle<xAOD::EventInfo>(m_EventInfoKey, ctx);
113}
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.

◆ 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 168 of file AthMonitorAlgorithm.cxx.

168 {
169 // get the pointer to the tool, and check that it exists
170 auto idx = m_toolLookupMap.find(name);
171 //Check if the tool exists in the map
172 if (ATH_LIKELY(idx != m_toolLookupMap.end())) {
173 return m_tools[idx->second];
174 }
175 else {
176 //Check if the map is empty
177 if (m_toolLookupMap.empty()) {
178 ATH_MSG_FATAL("The m_toolLookupMap is empty. The tool " << name << " cannot be found in an empty map.");
179 return m_dummy;
180 }
181 //If the map is not empty and the tool was not found, print a fatal error
182 if (!m_toolLookupMap.empty()) {
183 std::string available = std::accumulate(
184 m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
185 [](const std::string& s, auto h) { return s + "," + h.first; });
186 ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
187 << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
188 << "your python configuration and c++ filling code. Note: your available groups are {"
189 << available << "}.");
190
191 return m_dummy;
192 }
193 if (!isInitialized()) {
195 "It seems that the AthMonitorAlgorithm::initialize was not called "
196 "in derived class initialize method, group name: " << name);
197 }
198 }
199 return m_dummy;
200}
#define ATH_MSG_FATAL(x)
#define ATH_LIKELY(x)
std::unordered_map< std::string, size_t > m_toolLookupMap
const ToolHandle< GenericMonitoringTool > m_dummy
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.

◆ 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 203 of file AthMonitorAlgorithm.cxx.

203 {
204 return m_trigDecTool;
205}

◆ initialize()

StatusCode TRTMonitoringRun3RAW_Alg::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from AthMonitorAlgorithm.

Definition at line 55 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ initScaleVectors()

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

Definition at line 194 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ 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()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 350 of file AthMonitorAlgorithm.cxx.

350 {
351 std::string item;
352 std::stringstream ss(line);
353
354 ATH_MSG_DEBUG( "AthMonitorAlgorithm::parseList()" );
355
356 while ( std::getline(ss, item, ',') ) {
357 std::stringstream iss(item); // remove whitespace
358 iss >> item;
359 result.push_back(item);
360 }
361
362 return StatusCode::SUCCESS;
363}
static Double_t ss

◆ radToDegrees()

float TRTMonitoringRun3RAW_Alg::radToDegrees ( float radValue) const
private

Definition at line 637 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ 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();
384 }
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)

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

◆ setFilterPassed()

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

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ 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 600 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ strawLayerNumber_reverse()

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

Definition at line 618 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ strawNumber()

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

Definition at line 434 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ strawNumber_reverse()

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

Definition at line 481 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ strawNumberEndCap()

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

Definition at line 521 of file TRTMonitoringRun3RAW_Alg.cxx.

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

◆ sysExecute()

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

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< 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 AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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 208 of file AthMonitorAlgorithm.cxx.

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

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

83{this, "doArgonXenonSeparation", true};

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

135{this,"ByteStreamErrors","TRT_ByteStreamErrs","SG key of TRT ByteStream Error container"};

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

126{this, "TRT_ByteStream_ConditionsSvc", "TRT_ByteStream_ConditionsSvc", ""};

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

132{this, "track_collection_hole_finder", "CombinedInDetTracks", "Name of tracks container used for hole finder"};

◆ m_dataType

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::m_dataType
protectedinherited

Instance of the DataType_t enum.

Definition at line 356 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 358 of file AthMonitorAlgorithm.h.

358{this,"DataType","userDefined"};

◆ m_defaultLBDuration

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

Default duration of one lumi block.

Definition at line 365 of file AthMonitorAlgorithm.h.

365{this,"DefaultLBDuration",60.};

◆ m_detailLevel

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

Sets the level of detail used in the monitoring.

Definition at line 366 of file AthMonitorAlgorithm.h.

366{this,"DetailLevel",0};

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

80{this, "DistanceToStraw", 0.4, ""};

◆ m_doChips

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

Definition at line 73 of file TRTMonitoringRun3RAW_Alg.h.

73{this, "doChips", true, ""};

◆ m_doExpert

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

Definition at line 72 of file TRTMonitoringRun3RAW_Alg.h.

72{this, "doExpert", false, ""};

◆ m_doHitsMon

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

Definition at line 79 of file TRTMonitoringRun3RAW_Alg.h.

79{this, "DoHitsMon", true, ""};

◆ m_doMaskStraws

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

Definition at line 77 of file TRTMonitoringRun3RAW_Alg.h.

77{this, "doMaskStraws", true, ""};

◆ m_doRDOsMon

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

Definition at line 75 of file TRTMonitoringRun3RAW_Alg.h.

75{this, "doRDOsMon", true, ""};

◆ m_doShift

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

Definition at line 76 of file TRTMonitoringRun3RAW_Alg.h.

76{this, "doShift", true, ""};

◆ m_doStraws

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

Definition at line 71 of file TRTMonitoringRun3RAW_Alg.h.

71{this, "doStraws", true, ""};

◆ m_doTracksMon

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

Definition at line 74 of file TRTMonitoringRun3RAW_Alg.h.

74{this, "doTracksMon", true, ""};

◆ m_DQFilterTools

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

Array of Data Quality filter tools.

Definition at line 346 of file AthMonitorAlgorithm.h.

346{this,"FilterTools",{}};

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 374 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 377 of file AthMonitorAlgorithm.h.

377 {this,
378 "EnforceExpressTriggers", false,
379 "Requires that matched triggers made the event enter the express stream"};

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 355 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 357 of file AthMonitorAlgorithm.h.

357{this,"Environment","user"};

◆ m_EventBurstCut

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

Definition at line 162 of file TRTMonitoringRun3RAW_Alg.h.

162{this, "EventBurstCut", -1};

◆ m_EventInfoKey

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

Key for retrieving EventInfo from StoreGate.

Definition at line 367 of file AthMonitorAlgorithm.h.

367{this,"EventInfoKey","EventInfo"};

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

95{this, "every_xth_track", 1, ""};

◆ 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 AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_fileKey

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

Internal Athena name for file.

Definition at line 363 of file AthMonitorAlgorithm.h.

363{this,"FileKey",""};

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

88{this,"iChipMax", {-1, -1}};

◆ m_idHelper

const AtlasDetectorID* TRTMonitoringRun3RAW_Alg::m_idHelper {}
private

Definition at line 58 of file TRTMonitoringRun3RAW_Alg.h.

58{};

◆ m_isCosmics

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

Definition at line 161 of file TRTMonitoringRun3RAW_Alg.h.

161{this, "IsCosmics", false};

◆ m_lbDurationDataKey

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

Definition at line 350 of file AthMonitorAlgorithm.h.

351{this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"};

◆ m_longToTCut

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

Definition at line 85 of file TRTMonitoringRun3RAW_Alg.h.

85{this, "LongToTCut", 9.375};

◆ m_lumiDataKey

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

Definition at line 348 of file AthMonitorAlgorithm.h.

349{this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"};

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

63{64, std::vector<unsigned char>(1642)};

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

62{64, std::vector<unsigned char>(3840)};

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

96{this, "max_abs_d0", 10 * CLHEP::mm, ""};

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

98{this, "max_abs_eta", 2.5, ""};

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

97{this, "max_abs_z0", 300 * CLHEP::mm, ""};

◆ m_mgr

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

Definition at line 60 of file TRTMonitoringRun3RAW_Alg.h.

60{};

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

91{this, "min_pixel_hits", 0, ""};

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

100{this, "min_pT", 0.5 * CLHEP::GeV, ""};

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

92{this, "min_sct_hits", 0, ""};

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

90{this, "min_si_hits", 1, ""};

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

93{this, "min_trt_hits", 10, ""};

◆ m_minP

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

Definition at line 99 of file TRTMonitoringRun3RAW_Alg.h.

99{this, "MinTrackP", 0.0 * CLHEP::GeV, ""};

◆ m_minTRThits

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

Definition at line 94 of file TRTMonitoringRun3RAW_Alg.h.

94{this, "MinTRTHitCut", 10, ""};

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 371 of file AthMonitorAlgorithm.h.

◆ m_pTRTHelper

const TRT_ID* TRTMonitoringRun3RAW_Alg::m_pTRTHelper {}
private

Definition at line 59 of file TRTMonitoringRun3RAW_Alg.h.

59{};

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

130{this, "TRTRawDataObjectName", "TRT_RDOs", "Name of TRT RDOs container"};

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

87{this,"strawMax", {-1, -1}};

◆ m_sumTool

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

Definition at line 124 of file TRTMonitoringRun3RAW_Alg.h.

124{this, "InDetTRTStrawStatusSummaryTool", "TRT_StrawStatusSummaryTool", ""};

◆ m_toolLookupMap

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

Definition at line 372 of file AthMonitorAlgorithm.h.

◆ m_tools

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

Array of Generic Monitoring Tools.

Definition at line 341 of file AthMonitorAlgorithm.h.

341{this,"GMTools",{}};

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

133{this, "TRTTracksObjectName", "CombinedInDetTracks", "Name of tracks container"};

◆ m_trackSelTool

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

Definition at line 127 of file TRTMonitoringRun3RAW_Alg.h.

127{this, "TrackSelectionTool", "InDet::InDetTrackSelectionTool/TrackSelectionTool", ""};

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

139{this, "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool name"};

◆ m_trigDecTool

PublicToolHandle<Trig::TrigDecisionTool> AthMonitorAlgorithm::m_trigDecTool
protectedinherited

Tool to tell whether a specific trigger is passed.

Definition at line 345 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 360 of file AthMonitorAlgorithm.h.

360{this,"TriggerChain",""};

◆ m_trigLiveFractionDataKey

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

Definition at line 352 of file AthMonitorAlgorithm.h.

353{this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"};

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

131{this, "TRTBCIDCollectionName", "TRT_BCID", "Name of TRT BCID collection"};

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

138{this, "trt_hole_search", "TRTTrackHoleSearchTool", "Track hole search tool name"};

◆ m_TRTStrawNeighbourSvc

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

Definition at line 125 of file TRTMonitoringRun3RAW_Alg.h.

125{this, "StrawNeighbourSvc", "TRT_StrawNeighbourSvc", ""};

◆ m_usedEvents

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

Definition at line 81 of file TRTMonitoringRun3RAW_Alg.h.

81{this, "totalEvents", -1, ""};

◆ m_useHoleFinder

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

Definition at line 78 of file TRTMonitoringRun3RAW_Alg.h.

78{this, "useHoleFinder", false, ""};

◆ m_useLumi

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

Allows use of various luminosity functions.

Definition at line 364 of file AthMonitorAlgorithm.h.

364{this,"EnableLumi",false};

◆ 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 361 of file AthMonitorAlgorithm.h.

◆ s_iChip_max

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

Definition at line 46 of file TRTMonitoringRun3RAW_Alg.h.

◆ s_numberOfBarrelStacks

int TRTMonitoringRun3RAW_Alg::s_numberOfBarrelStacks = 32
staticconstexprprivate

Definition at line 68 of file TRTMonitoringRun3RAW_Alg.h.

◆ s_numberOfEndCapStacks

int TRTMonitoringRun3RAW_Alg::s_numberOfEndCapStacks = 32
staticconstexprprivate

Definition at line 69 of file TRTMonitoringRun3RAW_Alg.h.

◆ s_Straw_max

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

Definition at line 45 of file TRTMonitoringRun3RAW_Alg.h.


The documentation for this class was generated from the following files: