|
ATLAS Offline Software
|
Go to the documentation of this file.
26 const std::string&
name,
31 declareInterface<IL1CPHitsTools>(
this);
49 return StatusCode::SUCCESS;
56 return StatusCode::SUCCESS;
66 for (;
pos != pose; ++
pos) {
77 std::vector<const DataVector<CPMRoI>*> cpmRoiColls(1, cpmRoiVec);
88 std::map<unsigned int, CPMHits*> cpmHitsMap;
90 int timeslices = cpmRoiColls.size();
97 unsigned int crate = roi->
crate();
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);
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];
142 hitvec0[
slice] = hits0;
143 hitvec1[
slice] = hits1;
144 cpmHits->
addHits(hitvec0, hitvec1);
173 for (;
pos != pose; ++
pos) {
175 int crate =
hits->crate();
176 int cpm =
hits->module();
177 int peak =
hits->peak();
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) {
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;
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);
293 int multBits,
int vecBits)
const
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 );
341 cmmHitsVec2->
clear();
349 int crate,
int dataId,
int peak)
const
JetConstituentVector::iterator iterator
The ClusterProcessorModuleKey object provides the key for each trigger tower depending on its eta-phi...
const std::vector< unsigned int > & HitsVec0() const
Multi-slice accessors.
std::vector< D3PDTest::MyVec2 > vec2
Const iterator class for DataVector/DataList.
void addHits(const std::vector< unsigned int > &hits0, const std::vector< unsigned int > &hits1)
Add hits to existing object.
decoder
def channelSelection(self, channelList, groupType): if groupType == self.SingleGroup: pass elif group...
void setPeak(int peak)
In multi-slice readout, need to specify which is peak slice.
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
bool msgLvl(const MSG::Level lvl) const
The CPMHits object contains the hit data produced by a given Cluster Processor Module,...
unsigned int cpmKey(unsigned int crate, unsigned int module)
calculates key from crate and module index
void swapElement(size_type index, value_type newElem, reference oldElem)
Swap one element out of the container.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
int cpm() const
Return CPM number (1-14)
CoordinateRange class declaration.
::StatusCode StatusCode
StatusCode definition for legacy code.
Summary of CP (EM/tau) hits received by the merger modules.
CPMHits_v1 CPMHits
Define the latest version of the CPMHits class.
void clear()
Erase all the elements in the collection.
uint32_t roiWord() const
Return packed RoI word.
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.
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
static const unsigned int numOfCPThresholds
const std::vector< unsigned int > & HitsVec1() const
int crate() const
Return crate number (0-1)
size_type size() const noexcept
Returns the number of elements in the collection.
CMMCPHits_v1 CMMCPHits
Define the latest version of the CMMCPHits class.
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.