ATLAS Offline Software
MbtsHypoTool.h
Go to the documentation of this file.
1 /*
2 Copyright! (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGMINBIAS_MbtsHypoTool_H
5 #define TRIGMINBIAS_MbtsHypoTool_H
6 
7 #include "Gaudi/Property.h"
13 
14 class MbtsHypoTool : virtual public ::AthAlgTool
15 {
16 public:
17  MbtsHypoTool(const std::string &type,
18  const std::string &name,
19  const IInterface *parent);
20 
21  virtual StatusCode initialize() override;
22 
23  struct MbtsHypoInfo
24  {
28  };
29 
31 
32 private:
33  bool applyCut(const Gaudi::Property<int> &threshold, const xAOD::TrigComposite *composit) const;
35  Gaudi::Property<bool> m_acceptAll{this, "AcceptAll", false, "Accept all events"};
36 
37  Gaudi::Property<unsigned int> m_mbtsCounters{this, "MbtsCounters", 2, "The number of MBTS counters required to be above threshold"};
38 
39  Gaudi::Property<bool> m_coincidence{this, "Coincidence", false, "A flag to control if this is a coincidence requirement or not"};
40 
41  Gaudi::Property<bool> m_or{this, "Or", false, "Flag extending above choice to do Or between the two sides of MBTS"};
42 
43  Gaudi::Property<bool> m_veto{this, "Veto", false, "Flag to select lower than threshold multiplicities"};
44 
45  Gaudi::Property<int> m_mbtsmode{this, "MBTSMode", 0, "Flag to count multiplicities only on inner or outer MBTS modules (1, inner, 2 outer, 0 all) "};
46 
47  Gaudi::Property<float> m_threshold{this, "Threshold", 40.0 / 222.0, "Energy threshold in pC"};
48 
49  Gaudi::Property<float> m_timeCut{this, "TimeCut", -1.0, "A time cut in ns. Values <= 0 disable the time cut"};
50 
51  Gaudi::Property<float> m_globalTimeOffset{this, "GlobalTimeOffset", 0, "A global time offset in ns about which the time window cuts"};
52 
53  Gaudi::Property<std::vector<float>> m_timeOffsets{this, "TimeOffset", std::vector<float>(32), "Offsets with respect to the global offset of all counters. (A0-15 then C0-C15) "};
54 
55  ToolHandle<GenericMonitoringTool> m_monTool{this, "MonTool", "", "Monitoring tool"};
56  struct Counts
57  {
58  size_t sideA;
59  size_t sideC;
60  };
61  Counts calculateMultiplicities(const xAOD::TrigT2MbtsBits *t2mbtsBits) const;
62 };
63 
64 #endif //> !TRIGMINBIAS_MbtsHypoTool_H
MbtsHypoTool::m_mbtsCounters
Gaudi::Property< unsigned int > m_mbtsCounters
Definition: MbtsHypoTool.h:37
TrigCompositeUtils.h
MbtsHypoTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: MbtsHypoTool.h:55
MbtsHypoTool::decide
StatusCode decide(MbtsHypoInfo &decisions) const
Definition: MbtsHypoTool.cxx:22
MbtsHypoTool::MbtsHypoInfo::previousDecisionIDs
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs
Definition: MbtsHypoTool.h:25
MbtsHypoTool::initialize
virtual StatusCode initialize() override
Definition: MbtsHypoTool.cxx:16
MbtsHypoTool::m_timeOffsets
Gaudi::Property< std::vector< float > > m_timeOffsets
Definition: MbtsHypoTool.h:53
MbtsHypoTool::applyCut
bool applyCut(const Gaudi::Property< int > &threshold, const xAOD::TrigComposite *composit) const
MbtsHypoTool
Definition: MbtsHypoTool.h:15
TrigT2MbtsBits.h
MbtsHypoTool::m_or
Gaudi::Property< bool > m_or
Definition: MbtsHypoTool.h:41
MbtsHypoTool::m_timeCut
Gaudi::Property< float > m_timeCut
Definition: MbtsHypoTool.h:49
GenericMonitoringTool.h
MbtsHypoTool::Counts::sideA
size_t sideA
Definition: MbtsHypoTool.h:58
MbtsHypoTool::Counts::sideC
size_t sideC
Definition: MbtsHypoTool.h:59
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TrigT2MbtsBits_v1
Definition: TrigT2MbtsBits_v1.h:14
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
MbtsHypoTool::Counts
Definition: MbtsHypoTool.h:57
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
xAOD::decisions
decisions
Definition: TrigComposite_v1.cxx:81
MbtsHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: MbtsHypoTool.h:34
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
MbtsHypoTool::calculateMultiplicities
Counts calculateMultiplicities(const xAOD::TrigT2MbtsBits *t2mbtsBits) const
Definition: MbtsHypoTool.cxx:93
MbtsHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: MbtsHypoTool.h:35
threshold
Definition: chainparser.cxx:74
MbtsHypoTool::m_veto
Gaudi::Property< bool > m_veto
Definition: MbtsHypoTool.h:43
MbtsHypoTool::MbtsHypoInfo::mbtsBits
const xAOD::TrigT2MbtsBits * mbtsBits
Definition: MbtsHypoTool.h:26
MbtsHypoTool::MbtsHypoInfo
Definition: MbtsHypoTool.h:24
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
MbtsHypoTool::m_coincidence
Gaudi::Property< bool > m_coincidence
Definition: MbtsHypoTool.h:39
MbtsHypoTool::MbtsHypoInfo::decision
TrigCompositeUtils::Decision * decision
Definition: MbtsHypoTool.h:27
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HLTIdentifier.h
MbtsHypoTool::m_globalTimeOffset
Gaudi::Property< float > m_globalTimeOffset
Definition: MbtsHypoTool.h:51
MbtsHypoTool::m_threshold
Gaudi::Property< float > m_threshold
Definition: MbtsHypoTool.h:47
AthAlgTool
Definition: AthAlgTool.h:26
MbtsHypoTool::MbtsHypoTool
MbtsHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: MbtsHypoTool.cxx:12
MbtsHypoTool::m_mbtsmode
Gaudi::Property< int > m_mbtsmode
Definition: MbtsHypoTool.h:45