|
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 > &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 |
|
- 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 28 of file TrigT1MBTS.h.
◆ StoreGateSvc_t
◆ TrigT1MBTS()
LVL1::TrigT1MBTS::TrigT1MBTS |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Definition at line 11 of file TrigT1MBTS.cxx.
13 m_thresholdNumber{{0,1,2,3,4,5,6,7}, {8,9,10,11,12,13,14,15}},
14 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 179 of file TrigT1MBTS.cxx.
184 if(
sc.isFailure() || !tileTTL1MBTSContainer ) {
186 return StatusCode::SUCCESS;
192 if(tileTTL1MBTSContainer->size() > 32) {
194 ATH_MSG_WARNING(
"BAD DATA!!! tileTTL1MBTSContainer->size() = " << tileTTL1MBTSContainer->size());
195 ATH_MSG_WARNING(
"There should be no more than 24 TileTTL1MBTS elements in one event.");
196 ATH_MSG_WARNING(
"This event will be skipped. Any further bad data will be skipped.");
199 return StatusCode::SUCCESS;
202 unsigned int triggersEBA = 0;
203 unsigned int triggersEBC = 0;
204 unsigned int single_triggers_A = 0;
205 unsigned int single_triggers_C = 0;
208 for(
const TileTTL1 * ttl1_mbts : *tileTTL1MBTSContainer) {
214 return StatusCode::FAILURE;
218 if(phi < 0 || phi > 7) {
220 return StatusCode::FAILURE;
224 if(channel < 0 || channel > 1) {
226 return StatusCode::FAILURE;
230 if(detSide != -1 && detSide != 1) {
231 ATH_MSG_ERROR(
"Side value " << detSide <<
" is out of range!");
232 return StatusCode::FAILURE;
236 const std::vector<double> & samples = ttl1_mbts->samples();
237 unsigned int numSamples = samples.size();
240 return StatusCode::FAILURE;
255 ATH_MSG_ERROR(
"Threshold index \"" << thresholdIndex <<
"\" for single triggers is out of range.");
256 return StatusCode::FAILURE;
259 if(thresholdIndex12 == 1000){
260 ATH_MSG_DEBUG(
"this is a needless counter for run2, the sample will be skipped!");
265 float ThrValue_a = 0;
266 float ThrValue_c = 0;
284 else if (detSide == 1)
295 if (triggersEBA>7) triggersEBA=7;
296 if (triggersEBC>7) triggersEBC=7;
298 ATH_MSG_DEBUG(
"Multis: "<< triggersEBA <<
" and "<< triggersEBC );
300 unsigned int cableWordA = single_triggers_A + (triggersEBA<<
m_cablestart_a);
301 unsigned int cableWordC = single_triggers_C + (triggersEBC<<
m_cablestart_c);
304 MbtsCTP *mbtsACTP =
new MbtsCTP(cableWordA);
305 MbtsCTP *mbtsCCTP =
new MbtsCTP(cableWordC);
308 ATH_MSG_DEBUG(
" (in CTPSimulation) mbtsA cable word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill(
'0' ) << mbtsACTP->cableWord0() );
309 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 ) ) );
311 ATH_MSG_DEBUG(
" (in CTPSimulation) mbtsC cable word 0 is: 0x" << std::hex << std::setw( 8 ) << std::setfill(
'0' ) << mbtsCCTP->cableWord0() );
312 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 ) ) );
317 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 18 of file TrigT1MBTS.cxx.
47 for (std::shared_ptr<TrigConf::L1Threshold> thr :
l1menu->thresholds(
"MBTS")) {
48 if(thr->name() !=
"MBTS_A" && thr->name() !=
"MBTS_C") {
51 std::string connName =
l1menu->connectorNameFromThreshold(thr->name());
52 unsigned int startbit =
l1menu->connector(connName).triggerLine(thr->name()).startbit();
54 std::vector<float> hwThrValues(12, 0.0);
55 if(thr->name() ==
"MBTS_A") {
73 for (std::shared_ptr<TrigConf::L1Threshold> thr :
l1menu->thresholds(
"MBTSSI")) {
75 std::string thrname = thr->name();
77 size_t module = std::stoi(thrname.substr(6));
79 std::string connName =
l1menu->connectorNameFromThreshold(thr->name());
80 unsigned int startbit =
l1menu->connector(connName).triggerLine(thr->name()).startbit();
81 ATH_MSG_INFO(
"Read " << thrname <<
" with voltage " << hwValue <<
"mV at bit " << startbit <<
" on " << connName);
83 bool isCSide = thrname.find(
"MBTS_C")==0;
91 }
else if(thrname.starts_with(
"MBTS_A") && thrname.size()>6) {
107 ATH_MSG_INFO(
"MBTS_A Lvl 1 single input thresholds not set. Triggers will be disabled.");
109 for(
size_t i=0;
i<16;
i++) {
114 ATH_MSG_INFO(
"MBTS_C Lvl 1 single input thresholds not set. Triggers will be disabled.");
116 for(
size_t i=0;
i<16;
i++) {
123 msg(MSG::INFO) <<
"=================== Settings ==================" <<
endmsg;
128 msg(MSG::INFO) <<
"C side thresholds for single inputs = {";
129 for(
size_t i=0;
i<12;
i++) {
131 if(
i<11)
msg(MSG::INFO) <<
",";
134 msg(MSG::INFO) <<
"A side thresholds for single inputs = {";
135 for(
size_t i=0;
i<12;
i++) {
137 if(
i<11)
msg(MSG::INFO) <<
",";
142 for(
size_t j=0;j<2;j++) {
143 for(
size_t i=0;
i<8;
i++) {
151 msg(MSG::INFO) <<
"C side thresholds for single inputs = {";
152 for(
size_t i=0;
i<16;
i++) {
154 if(
i<15)
msg(MSG::INFO) <<
",";
157 msg(MSG::INFO) <<
"A side thresholds for single inputs = {";
158 for(
size_t i=0;
i<16;
i++) {
160 if(
i<15)
msg(MSG::INFO) <<
",";
166 for(
size_t j=0;j<2;j++) {
167 for(
size_t i=0;
i<8;
i++) {
173 msg(MSG::INFO) <<
"===============================================" <<
endmsg;
175 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 68 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 60 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 49 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 40 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 46 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 64 of file TrigT1MBTS.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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.
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.
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
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>