|
ATLAS Offline Software
|
#include <L1CPHitsTools.h>
|
| L1CPHitsTools (const std::string &type, const std::string &name, const IInterface *parent) |
| Constructor. More...
|
|
virtual | ~L1CPHitsTools () |
| default destructor More...
|
|
virtual StatusCode | initialize () |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | finalize () |
| standard Athena-Algorithm method More...
|
|
virtual void | formCPMRoI (const DataVector< EmTauROI > *emTauRoiVec, DataVector< CPMRoI > *cpmRoiVec) const |
| EmTauROI to CPMRoI conversion. More...
|
|
virtual void | formCPMHits (const DataVector< CPMRoI > *cpmRoiVec, DataVector< CPMHits > *cpmHitsVec) const |
| form CPM hits from RoIs - single slice More...
|
|
virtual void | formCPMHits (const std::vector< const DataVector< CPMRoI > * > &cpmRoiColls, DataVector< CPMHits > *cpmHitsVec, int peak) const |
| form CPM hits from RoIs - multiple slices More...
|
|
virtual void | formCMMCPHits (const DataVector< CPMHits > *cpmHitsVec, DataVector< CMMCPHits > *cmmHitsVec) const |
| form complete CMM-CP hits from CPM hits More...
|
|
virtual void | formCMMCPHitsModule (const DataVector< CPMHits > *cpmHitsVec, DataVector< CMMCPHits > *cmmHitsMod) const |
| form partial CMM-CP hits (module) from CPM hits More...
|
|
virtual void | formCMMCPHitsCrate (const DataVector< CMMCPHits > *cmmHitsMod, DataVector< CMMCPHits > *cmmHitsCrate) const |
| form partial CMM-CP hits (crate) from module CMM-CP hits More...
|
|
virtual void | formCMMCPHitsSystem (const DataVector< CMMCPHits > *cmmHitsCrate, DataVector< CMMCPHits > *cmmHitsSys) const |
| form partial CMM-CP hits (system) from crate CMM-CP hits 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 | 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 |
|
|
void | addCMMCPHits (HitsVector &vec1, const HitsVector &vec2) const |
| Add hits from second vector to first. More...
|
|
unsigned int | addHits (unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits) const |
| Increment CPM/CMM hit word. More...
|
|
void | mergeCMMCPHits (DataVector< CMMCPHits > *cmmHitsVec1, DataVector< CMMCPHits > *cmmHitsVec2) const |
| Merge CMM-CP hits vectors. More...
|
|
void | saveCMMCPHits (DataVector< CMMCPHits > *cmmHitsVec, const HitsVector &hits0, const HitsVector &hits1, int crate, int dataId, int peak) const |
| Save non-zero CMM-CP hits. More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
This is a tool to reconstruct the L1 CPM and CMM-CP hits from RoIs. Used for offline monitoring and trigger reconstruction.
Useage: L1CPHitsTools->formCPMRoI() // convert to CPMRoI from other RoI classes L1CPHitsTools->formCPMHits() // form CPM hits from RoIs L1CPHitsTools->formCMMCPHits() // form CMM-CP hits from CPM hits
- Author
- Alan Watson / Peter Faulkner
Definition at line 48 of file L1CPHitsTools.h.
◆ ErrorVector
◆ HitsVector
◆ StoreGateSvc_t
◆ L1CPHitsTools()
LVL1::L1CPHitsTools::L1CPHitsTools |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Constructor.
Definition at line 25 of file L1CPHitsTools.cxx.
31 declareInterface<IL1CPHitsTools>(
this);
◆ ~L1CPHitsTools()
LVL1::L1CPHitsTools::~L1CPHitsTools |
( |
| ) |
|
|
virtual |
◆ addCMMCPHits()
Add hits from second vector to first.
Definition at line 275 of file L1CPHitsTools.cxx.
277 int size1 = vec1.size();
278 int size2 =
vec2.size();
279 if (size1 < size2) vec1.resize(size2);
282 HitsVector::const_iterator pos2 =
vec2.begin();
283 HitsVector::const_iterator pose2 =
vec2.end();
284 for (; pos1 != pose1 && pos2 != pose2; ++pos1, ++pos2) {
285 *pos1 =
addHits(*pos1, *pos2, 24, 24);
◆ addHits()
unsigned int LVL1::L1CPHitsTools::addHits |
( |
unsigned int |
hitMult, |
|
|
unsigned int |
hitVec, |
|
|
int |
multBits, |
|
|
int |
vecBits |
|
) |
| const |
|
private |
Increment CPM/CMM hit word.
Definition at line 291 of file L1CPHitsTools.cxx.
295 ATH_MSG_DEBUG(
"addHits: Original hitMult = " << std::hex << hitMult
296 <<
". Add hitWord = " << hitVec << std::dec);
301 int nbitsOut = multBits/nthresh;
302 int nbitsIn = vecBits/nthresh;
306 int max = (1<<nbitsOut) - 1;
307 unsigned int multMask =
max;
308 unsigned int hitMask = (1<<nbitsIn) - 1;
309 unsigned int shift = 0;
311 unsigned int hits = 0;
313 for (
int i = 0;
i < nthresh;
i++) {
314 int mult = (hitMult&multMask) + (hitVec&hitMask);
315 mult = ( (mult<=
max) ? mult :
max);
316 hits += (mult<<shift);
318 hitMult >>= nbitsOut;
324 << std::hex <<
hits << std::dec );
◆ 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
◆ finalize()
StatusCode LVL1::L1CPHitsTools::finalize |
( |
| ) |
|
|
virtual |
standard Athena-Algorithm method
Finalisation.
Definition at line 54 of file L1CPHitsTools.cxx.
56 return StatusCode::SUCCESS;
◆ formCMMCPHits()
◆ formCMMCPHitsCrate()
form partial CMM-CP hits (crate) from module CMM-CP hits
Implements LVL1::IL1CPHitsTools.
Definition at line 189 of file L1CPHitsTools.cxx.
203 for (;
pos != pose; ++
pos) {
205 int dataId =
hits->dataID();
206 if (dataId > 14)
continue;
207 int crate =
hits->crate();
208 int peak =
hits->peak();
209 if (peak > peakm) peakm = peak;
215 }
else if (crate == 1) {
218 }
else if (crate == 2) {
221 }
else if (crate == 3) {
◆ formCMMCPHitsModule()
◆ formCMMCPHitsSystem()
form partial CMM-CP hits (system) from crate CMM-CP hits
Implements LVL1::IL1CPHitsTools.
Definition at line 245 of file L1CPHitsTools.cxx.
254 for (;
pos != pose; ++
pos) {
256 if (
hits->crate() != 3)
continue;
257 int dataId =
hits->dataID();
262 int peak =
hits->peak();
263 if (peak > peakm) peakm = peak;
◆ formCPMHits() [1/2]
◆ formCPMHits() [2/2]
form CPM hits from RoIs - multiple slices
Implements LVL1::IL1CPHitsTools.
Definition at line 83 of file L1CPHitsTools.cxx.
87 ClusterProcessorModuleKey testKey;
88 std::map<unsigned int, CPMHits*> cpmHitsMap;
90 int timeslices = cpmRoiColls.size();
97 unsigned int crate = roi->crate();
98 unsigned int module = roi->cpm();
99 unsigned int key = testKey.cpmKey(crate,
module);
102 CoordinateRange
coord =
decoder.coordinate(roi->roiWord());
105 <<
coord.eta() <<
", " <<
coord.phi() <<
") " <<
", RoIWord = "
106 << std::hex << roi->roiWord() << std::dec );
108 <<
", CPM key = " <<
key );
114 if (
test==cpmHitsMap.end()){
116 << crate <<
", Module = " <<
module );
119 if (timeslices > 1) {
121 cpmHits->addHits(hitVec, hitVec);
122 cpmHits->setPeak(peak);
127 std::map<unsigned int,CPMHits*>::value_type(
key,cpmHits));
132 cpmHits =
test->second;
138 unsigned int hits0 = hitvec0[
slice];
139 unsigned int hits1 = hitvec1[
slice];
140 hits0 =
addHits(hits0, roi->roiWord()&0xFF, 24, 8);
141 hits1 =
addHits(hits1,(roi->roiWord()&0xFF00)>>8, 24, 8);
142 hitvec0[
slice] = hits0;
143 hitvec1[
slice] = hits1;
144 cpmHits->addHits(hitvec0, hitvec1);
◆ formCPMRoI()
◆ initialize()
StatusCode LVL1::L1CPHitsTools::initialize |
( |
| ) |
|
|
virtual |
standard Athena-Algorithm method
Initialisation.
Definition at line 43 of file L1CPHitsTools.cxx.
49 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.
◆ interfaceID()
const InterfaceID & LVL1::IL1CPHitsTools::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ mergeCMMCPHits()
◆ 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()
◆ saveCMMCPHits()
◆ 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_debug
bool LVL1::L1CPHitsTools::m_debug = false |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
std::vector< D3PDTest::MyVec2 > vec2
Const iterator class for DataVector/DataList.
decoder
def channelSelection(self, channelList, groupType): if groupType == self.SingleGroup: pass elif group...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
void swapElement(size_type index, value_type newElem, reference oldElem)
Swap one element out of the container.
virtual void setOwner(IDataHandleHolder *o)=0
CPMHits_v1 CPMHits
Define the latest version of the CPMHits class.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void clear()
Erase all the elements in the collection.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
static const unsigned int numOfCPThresholds
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
size_type size() const noexcept
Returns the number of elements in the collection.
CMMCPHits_v1 CMMCPHits
Define the latest version of the CMMCPHits class.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
CPMRoI_v1 CPMRoI
Define the latest version of the CPMRoI class.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.