 |
ATLAS Offline Software
|
#include <TrigT1MBTS.h>
|
| | TrigT1MBTS (const std::string &name, ISvcLocator *pSvcLocator) |
| |
| StatusCode | initialize () |
| |
| StatusCode | execute () |
| |
| virtual StatusCode | sysInitialize () override |
| | Override sysInitialize. More...
|
| |
| virtual const DataObjIDColl & | extraOutputDeps () const override |
| | Return the list of extra output dependencies. More...
|
| |
| ServiceHandle< StoreGateSvc > & | evtStore () |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | evtStore () const |
| | The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
| | The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
|
| |
| virtual StatusCode | sysStart () override |
| | Handle START transition. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| | Return this algorithm's input handles. More...
|
| |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| | Return this algorithm's output handles. More...
|
| |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| | Declare a new Gaudi property. More...
|
| |
| Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| | Declare a new Gaudi property. More...
|
| |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| |
| MsgStream & | msg () const |
| |
| MsgStream & | msg (const MSG::Level lvl) const |
| |
| bool | msgLvl (const MSG::Level lvl) const |
| |
|
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| | specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
| |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
| |
- Author
- W. H. Bell W.Bel.nosp@m.l@ce.nosp@m.rn.ch
An algorithm to simulate the level 1 MBTS trigger. This algorithm records a data object of MbtsCTP type into StoreGate. The object contains the input bits for the CTP simulation.
Definition at line 24 of file TrigT1MBTS.h.
◆ StoreGateSvc_t
◆ TrigT1MBTS()
| LVL1::TrigT1MBTS::TrigT1MBTS |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Definition at line 13 of file TrigT1MBTS.cxx.
15 m_thresholdNumber{{0,1,2,3,4,5,6,7}, {8,9,10,11,12,13,14,15}},
16 m_thresholdNumber12{{0,1,2,3,4,5,6,7}, {8,1000,9,1000,10,1000,11,1000}}
◆ 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]
◆ execute()
| StatusCode LVL1::TrigT1MBTS::execute |
( |
| ) |
|
Definition at line 181 of file TrigT1MBTS.cxx.
186 if(
sc.isFailure() || !tileTTL1MBTSContainer ) {
188 return StatusCode::SUCCESS;
194 if(tileTTL1MBTSContainer->size() > 32) {
196 ATH_MSG_WARNING(
"BAD DATA!!! tileTTL1MBTSContainer->size() = " << tileTTL1MBTSContainer->size());
197 ATH_MSG_WARNING(
"There should be no more than 24 TileTTL1MBTS elements in one event.");
198 ATH_MSG_WARNING(
"This event will be skipped. Any further bad data will be skipped.");
201 return StatusCode::SUCCESS;
204 unsigned int triggersEBA = 0;
205 unsigned int triggersEBC = 0;
206 unsigned int single_triggers_A = 0;
207 unsigned int single_triggers_C = 0;
210 for(
const TileTTL1 * ttl1_mbts : *tileTTL1MBTSContainer) {
216 return StatusCode::FAILURE;
220 if(phi < 0 || phi > 7) {
222 return StatusCode::FAILURE;
226 if(channel < 0 || channel > 1) {
228 return StatusCode::FAILURE;
232 if(detSide != -1 && detSide != 1) {
233 ATH_MSG_ERROR(
"Side value " << detSide <<
" is out of range!");
234 return StatusCode::FAILURE;
238 const std::vector<double> & samples = ttl1_mbts->samples();
239 unsigned int numSamples = samples.size();
242 return StatusCode::FAILURE;
257 ATH_MSG_ERROR(
"Threshold index \"" << thresholdIndex <<
"\" for single triggers is out of range.");
258 return StatusCode::FAILURE;
261 if(thresholdIndex12 == 1000){
262 ATH_MSG_DEBUG(
"this is a needless counter for run2, the sample will be skipped!");
267 float ThrValue_a = 0;
268 float ThrValue_c = 0;
286 else if (detSide == 1)
297 if (triggersEBA>7) triggersEBA=7;
298 if (triggersEBC>7) triggersEBC=7;
300 ATH_MSG_DEBUG(
"Multis: "<< triggersEBA <<
" and "<< triggersEBC );
302 unsigned int cableWordA = single_triggers_A + (triggersEBA<<
m_cablestart_a);
303 unsigned int cableWordC = single_triggers_C + (triggersEBC<<
m_cablestart_c);
306 MbtsCTP *mbtsACTP =
new MbtsCTP(cableWordA);
307 MbtsCTP *mbtsCCTP =
new MbtsCTP(cableWordC);
310 ATH_MSG_DEBUG(
" (in CTPSimulation) mbtsA cable word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill(
'0' ) << mbtsACTP->cableWord0() );
311 ATH_MSG_DEBUG(
" (in CTPSimulation) Mult of mbtsA is: "<<
static_cast<int>( (mbtsACTP->cableWord0() >>
m_cablestart_a) &
static_cast<unsigned int>(
pow( 2, 3 ) - 1 ) ) );
313 ATH_MSG_DEBUG(
" (in CTPSimulation) mbtsC cable word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill(
'0' ) << mbtsCCTP->cableWord0() );
314 ATH_MSG_DEBUG(
" (in CTPSimulation) Mult of mbtsC is: "<<
static_cast<int>( (mbtsCCTP->cableWord0() >>
m_cablestart_c) &
static_cast<unsigned int>(
pow( 2, 3 ) - 1 ) ) );
319 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
| const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ initialize()
| StatusCode LVL1::TrigT1MBTS::initialize |
( |
| ) |
|
Definition at line 20 of file TrigT1MBTS.cxx.
49 for (std::shared_ptr<TrigConf::L1Threshold>
thr :
l1menu->thresholds(
"MBTS")) {
50 if(
thr->name() !=
"MBTS_A" &&
thr->name() !=
"MBTS_C") {
53 std::string connName =
l1menu->connectorNameFromThreshold(
thr->name());
54 unsigned int startbit =
l1menu->connector(connName).triggerLine(
thr->name()).startbit();
56 std::vector<float> hwThrValues(12, 0.0);
57 if(
thr->name() ==
"MBTS_A") {
75 for (std::shared_ptr<TrigConf::L1Threshold>
thr :
l1menu->thresholds(
"MBTSSI")) {
77 std::string thrname =
thr->name();
79 size_t module = std::stoi(thrname.substr(6));
81 std::string connName =
l1menu->connectorNameFromThreshold(
thr->name());
82 unsigned int startbit =
l1menu->connector(connName).triggerLine(
thr->name()).startbit();
83 ATH_MSG_INFO(
"Read " << thrname <<
" with voltage " << hwValue <<
"mV at bit " << startbit <<
" on " << connName);
85 bool isCSide = thrname.find(
"MBTS_C")==0;
93 }
else if(thrname.starts_with(
"MBTS_A") && thrname.size()>6) {
109 ATH_MSG_INFO(
"MBTS_A Lvl 1 single input thresholds not set. Triggers will be disabled.");
111 for(
size_t i=0;
i<16;
i++) {
116 ATH_MSG_INFO(
"MBTS_C Lvl 1 single input thresholds not set. Triggers will be disabled.");
118 for(
size_t i=0;
i<16;
i++) {
130 msg(
MSG::INFO) <<
"C side thresholds for single inputs = {";
131 for(
size_t i=0;
i<12;
i++) {
136 msg(
MSG::INFO) <<
"A side thresholds for single inputs = {";
137 for(
size_t i=0;
i<12;
i++) {
144 for(
size_t j=0;j<2;j++) {
145 for(
size_t i=0;
i<8;
i++) {
153 msg(
MSG::INFO) <<
"C side thresholds for single inputs = {";
154 for(
size_t i=0;
i<16;
i++) {
159 msg(
MSG::INFO) <<
"A side thresholds for single inputs = {";
160 for(
size_t i=0;
i<16;
i++) {
168 for(
size_t j=0;j<2;j++) {
169 for(
size_t i=0;
i<8;
i++) {
177 return StatusCode::SUCCESS;
◆ 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()
| StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_badDataFound
| bool LVL1::TrigT1MBTS::m_badDataFound {false} |
|
private |
A flag to prevent the trigger simulation from running over bad input data.
Definition at line 64 of file TrigT1MBTS.h.
◆ m_cablestart_a
| int LVL1::TrigT1MBTS::m_cablestart_a {0} |
|
private |
◆ m_cablestart_c
| int LVL1::TrigT1MBTS::m_cablestart_c {0} |
|
private |
◆ m_cablestarts_a
| std::vector<int> LVL1::TrigT1MBTS::m_cablestarts_a |
|
private |
◆ m_cablestarts_c
| std::vector<int> LVL1::TrigT1MBTS::m_cablestarts_c |
|
private |
◆ m_CFD_fraction
| float LVL1::TrigT1MBTS::m_CFD_fraction {0.9} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
| DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_thresholdNumber
| std::vector<std::vector<unsigned int> > LVL1::TrigT1MBTS::m_thresholdNumber |
|
private |
A data member containing the mapping from channel,phi to threshold number.
Definition at line 56 of file TrigT1MBTS.h.
◆ m_thresholdNumber12
| std::vector<std::vector<unsigned int> > LVL1::TrigT1MBTS::m_thresholdNumber12 |
|
private |
◆ m_thresholds_a
| std::vector<float> LVL1::TrigT1MBTS::m_thresholds_a |
|
private |
The thresholds for the level 1 MBTS trigger.
Definition at line 45 of file TrigT1MBTS.h.
◆ m_thresholds_c
| std::vector<float> LVL1::TrigT1MBTS::m_thresholds_c |
|
private |
◆ m_thresholds_short_a
| std::vector<float> LVL1::TrigT1MBTS::m_thresholds_short_a |
|
private |
◆ m_thresholds_short_c
| std::vector<float> LVL1::TrigT1MBTS::m_thresholds_short_c |
|
private |
◆ m_ThrVecSize12
| bool LVL1::TrigT1MBTS::m_ThrVecSize12 {false} |
|
private |
◆ m_tileTBID
A data member to retain a pointer to the Tile Test Beam Identifier service.
The MBTS identifiers were added after the other tile identifiers. To avoid confusion and extra work they were added to the Test Bem (TB) Identifier service.
Definition at line 36 of file TrigT1MBTS.h.
◆ m_tileTTL1ContainerName
| Gaudi::Property<std::string> LVL1::TrigT1MBTS::m_tileTTL1ContainerName {this, "TileTTL1ContainerName", "TileTTL1MBTS"} |
|
private |
A data member to contain the name of the TileTTL1 container that contains the input MBTS information.
This data member is used as a job option property
Definition at line 42 of file TrigT1MBTS.h.
◆ m_tZeroBin
| Gaudi::Property<unsigned int> LVL1::TrigT1MBTS::m_tZeroBin {this, "TzeroBin", 3} |
|
private |
The index of the sample bin corresponding to a particle arriving from the IP.
Definition at line 60 of file TrigT1MBTS.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
Scalar phi() const
phi method
bool is_tiletb(const Identifier &id) const
Test ID if it is TileTBID.
std::vector< float > m_thresholds_a
The thresholds for the level 1 MBTS trigger.
std::vector< float > m_thresholds_short_c
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
int type(const Identifier &id) const
extract type field from TileTB identifier
const TileTBID * m_tileTBID
A data member to retain a pointer to the Tile Test Beam Identifier service.
std::vector< std::vector< unsigned int > > m_thresholdNumber12
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< int > m_cablestarts_a
std::vector< std::vector< unsigned int > > m_thresholdNumber
A data member containing the mapping from channel,phi to threshold number.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Property< unsigned int > m_tZeroBin
The index of the sample bin corresponding to a particle arriving from the IP.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int channel(const Identifier &id) const
extract channel field from TileTB identifier
bool m_badDataFound
A flag to prevent the trigger simulation from running over bad input data.
std::vector< float > m_thresholds_short_a
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Gaudi::Property< std::string > m_tileTTL1ContainerName
A data member to contain the name of the TileTTL1 container that contains the input MBTS information.
std::vector< int > m_cablestarts_c
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
std::vector< float > m_thresholds_c
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
int phi(const Identifier &id) const
extract phi field from MBTS identifier
AthAlgorithm()
Default constructor:
constexpr int pow(int base, int exp) noexcept