|
ATLAS Offline Software
|
#include <MbtsHypoTool.h>
|
| MbtsHypoTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual StatusCode | initialize () override |
|
StatusCode | decide (MbtsHypoInfo &decisions) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
HLT::Identifier | m_decisionId |
|
Gaudi::Property< bool > | m_acceptAll {this, "AcceptAll", false, "Accept all events"} |
|
Gaudi::Property< unsigned int > | m_mbtsCounters {this, "MbtsCounters", 2, "The number of MBTS counters required to be above threshold"} |
|
Gaudi::Property< bool > | m_coincidence {this, "Coincidence", false, "A flag to control if this is a coincidence requirement or not"} |
|
Gaudi::Property< bool > | m_or {this, "Or", false, "Flag extending above choice to do Or between the two sides of MBTS"} |
|
Gaudi::Property< bool > | m_veto {this, "Veto", false, "Flag to select lower than threshold multiplicities"} |
|
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) "} |
|
Gaudi::Property< float > | m_threshold {this, "Threshold", 40.0 / 222.0, "Energy threshold in pC"} |
|
Gaudi::Property< float > | m_timeCut {this, "TimeCut", -1.0, "A time cut in ns. Values <= 0 disable the time cut"} |
|
Gaudi::Property< float > | m_globalTimeOffset {this, "GlobalTimeOffset", 0, "A global time offset in ns about which the time window cuts"} |
|
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) "} |
|
ToolHandle< GenericMonitoringTool > | m_monTool {this, "MonTool", "", "Monitoring tool"} |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 14 of file MbtsHypoTool.h.
◆ StoreGateSvc_t
◆ MbtsHypoTool()
MbtsHypoTool::MbtsHypoTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ applyCut()
◆ calculateMultiplicities()
Definition at line 93 of file MbtsHypoTool.cxx.
104 std::vector<float> triggerTimes = t2mbtsBits->
triggerTimes();
108 ATH_MSG_WARNING(
"Vector sizes are not equal to number of MBTS counters.");
114 std::bitset<16> ebaTriggerBits;
115 std::bitset<16> ebcTriggerBits;
119 int ebaCounters = 0, ebcCounters = 0;
122 double timeDiff_A_C = 0.;
123 double timeMean_A = 0.;
124 double timeMean_C = 0.;
129 if (
m_mbtsmode == 1 && !(ibit < 8 || (ibit >= 16 && ibit < 24)))
131 if (
m_mbtsmode == 2 && !((ibit >= 8 && ibit < 16) || (ibit >= 24 && ibit < 32)))
141 timeMean_A += triggerTimes[ibit];
146 timeMean_C += triggerTimes[ibit];
157 ebaTriggerBits.set(ibit);
161 ebcTriggerBits.set(ibit - 16);
167 timeMean_A /= ebaCounters;
176 timeMean_C /= ebcCounters;
183 if (ebaCounters > 0 && ebcCounters > 0)
185 timeDiff_A_C = timeMean_A - timeMean_C;
189 timeDiff_A_C = -999.0;
192 <<
" side A: " << timeMean_A
193 <<
", side C: " << timeMean_C
194 <<
", difference A-C: " << timeDiff_A_C);
199 std::vector<int> counts;
200 counts.reserve(ebaTriggerBits.size() + ebcTriggerBits.size());
202 for (
size_t bit = 0; bit < ebaTriggerBits.size(); ++bit )
203 counts.push_back( ebaTriggerBits[bit] ? bit : -1 );
204 for (
size_t bit = 0; bit < ebcTriggerBits.size(); ++bit )
205 counts.push_back( ebcTriggerBits[bit] ? bit+ebaTriggerBits.size() : -1 );
209 return {ebaTriggerBits.count(), ebcTriggerBits.count()};
◆ decide()
StatusCode MbtsHypoTool::decide |
( |
MbtsHypoInfo & |
decisions | ) |
const |
Definition at line 22 of file MbtsHypoTool.cxx.
29 return StatusCode::SUCCESS;
34 if (counts.sideA == 0 && counts.sideC == 0)
36 ATH_MSG_DEBUG(
"calculateMultiplicities failed, no multiplicities");
37 return StatusCode::SUCCESS;
83 ATH_MSG_DEBUG(
"REGTEST: event " << (pass ?
"accepted" :
"failed") <<
" with EBA(" << counts.sideA <<
") + EBC(" << counts.sideC <<
") hits above threshold.");
90 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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
◆ initialize()
StatusCode MbtsHypoTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_acceptAll
Gaudi::Property<bool> MbtsHypoTool::m_acceptAll {this, "AcceptAll", false, "Accept all events"} |
|
private |
◆ m_coincidence
Gaudi::Property<bool> MbtsHypoTool::m_coincidence {this, "Coincidence", false, "A flag to control if this is a coincidence requirement or not"} |
|
private |
◆ m_decisionId
◆ m_detStore
◆ m_evtStore
◆ m_globalTimeOffset
Gaudi::Property<float> MbtsHypoTool::m_globalTimeOffset {this, "GlobalTimeOffset", 0, "A global time offset in ns about which the time window cuts"} |
|
private |
◆ m_mbtsCounters
Gaudi::Property<unsigned int> MbtsHypoTool::m_mbtsCounters {this, "MbtsCounters", 2, "The number of MBTS counters required to be above threshold"} |
|
private |
◆ m_mbtsmode
Gaudi::Property<int> MbtsHypoTool::m_mbtsmode {this, "MBTSMode", 0, "Flag to count multiplicities only on inner or outer MBTS modules (1, inner, 2 outer, 0 all) "} |
|
private |
◆ m_monTool
◆ m_or
Gaudi::Property<bool> MbtsHypoTool::m_or {this, "Or", false, "Flag extending above choice to do Or between the two sides of MBTS"} |
|
private |
◆ m_threshold
Gaudi::Property<float> MbtsHypoTool::m_threshold {this, "Threshold", 40.0 / 222.0, "Energy threshold in pC"} |
|
private |
◆ m_timeCut
Gaudi::Property<float> MbtsHypoTool::m_timeCut {this, "TimeCut", -1.0, "A time cut in ns. Values <= 0 disable the time cut"} |
|
private |
◆ m_timeOffsets
Gaudi::Property<std::vector<float> > MbtsHypoTool::m_timeOffsets {this, "TimeOffset", std::vector<float>(32), "Offsets with respect to the global offset of all counters. (A0-15 then C0-C15) "} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_veto
Gaudi::Property<bool> MbtsHypoTool::m_veto {this, "Veto", false, "Flag to select lower than threshold multiplicities"} |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
Group
Properties of a chain group.
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
virtual void setOwner(IDataHandleHolder *o)=0
static HLT::Identifier fromToolName(const std::string &tname)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
static const unsigned int NUM_MBTS
Prints out data members to MsgStream.
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const std::vector< float > & triggerTimes() const
Return the relative times of the triggers.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const std::vector< float > & triggerEnergies() const
Return the trigger energies of each counter.