26 return StatusCode::SUCCESS;
33 return StatusCode::SUCCESS;
41 std::vector<unsigned int>& tauCMXData,
int slice)
const {
56 int iPhiMin = crate*16;
57 int iEtaMin = (
module-1)*4 - 28;
61 for (
int iChip = 0; iChip < 8; ++iChip) {
62 for (
int iSide = 0; iSide < 2; ++iSide) {
63 for (
int iPhi = 0; iPhi < 2; ++iPhi) {
64 int ip = iPhiMin + 2*iChip + iPhi;
65 for (
int iEta = 0; iEta < 2; ++iEta) {
66 int ie = iEtaMin + 2*iSide + iEta;
68 float eta = ie*0.1 + 0.05;
84 int location = (iSide << 2) + (iPhi << 1) + iEta;
87 rois->push_back(emRoI);
89 unsigned int offset = iChip*2 + iSide;
90 emCMXData[0] |= (1 << offset);
92 unsigned int lc = (iPhi << 1) + iEta;
96 emCMXData[0] += (isol<<18);
97 emCMXData[0] += (lc<<16);
100 emCMXData[1] += (
et<<8);
101 emCMXData[1] += (isol<<18);
102 emCMXData[1] += (lc<<16);
106 emCMXData[2] += (isol<<18);
107 emCMXData[2] += (lc<<16);
110 emCMXData[2] += (
et<<8);
111 emCMXData[3] += (isol<<10);
112 emCMXData[3] += (lc<<8);
116 emCMXData[3] += (isol<<18);
117 emCMXData[3] += (lc<<16);
128 int location = (iSide << 2) + (iPhi << 1) + iEta;
131 rois->push_back(tauRoI);
133 unsigned int offset = iChip*2 + iSide;
134 tauCMXData[0] |= (1 << offset);
136 unsigned int lc = (iPhi << 1) + iEta;
140 tauCMXData[0] += (isol<<18);
141 tauCMXData[0] += (lc<<16);
144 tauCMXData[1] += (
et<<8);
145 tauCMXData[1] += (isol<<18);
146 tauCMXData[1] += (lc<<16);
150 tauCMXData[2] += (isol<<18);
151 tauCMXData[2] += (lc<<16);
154 tauCMXData[2] += (
et<<8);
155 tauCMXData[3] += (isol<<10);
156 tauCMXData[3] += (lc<<8);
160 tauCMXData[3] += (isol<<18);
161 tauCMXData[3] += (lc<<16);
174 for (
unsigned int word = 0; word < 4; ++word) {
175 unsigned int parity = 1;
176 for (
unsigned int bit = 0; bit < 24; ++bit)
if ( ( (emCMXData[word]>>bit) & 1) > 0 ) parity++;
178 emCMXData[word] |= (parity<<23);
181 for (
unsigned int bit = 0; bit < 24; ++bit)
if ( ( (tauCMXData[word]>>bit) & 1) > 0 ) parity++;
183 tauCMXData[word] |= (parity<<23);
202 for (xAOD::CPMTowerMap_t::iterator it = towers->begin(); it != towers->end(); ++it) {
222 std::map<int, int> analysed;
223 xAOD::CPMTowerMap_t::const_iterator cpmt = towers->begin();
224 for ( ; cpmt != towers->end(); ++cpmt) {
225 double eta = (*cpmt).second->eta();
226 double phi = (*cpmt).second->phi();
227 for (
int i = -1; i <= 0; ++i) {
228 for (
int j = -1; j <= 0; ++j) {
229 double tempEta =
eta + i*0.1;
230 double tempPhi =
phi + j*0.1;
231 int key = testKey.
ttKey(tempPhi,tempEta);
232 std::map<int, int>::iterator test = analysed.find(key);
233 if (test == analysed.end()) {
234 analysed.insert(std::map<int, int>::value_type(key,1));
241 if (emRoI != 0) rois->push_back(emRoI);
247 if (tauRoI != 0) rois->push_back(tauRoI);
265 findRoIs(l1menu, towers, tobs, slice);
268 for (xAOD::CPMTowerMap_t::iterator it = towers->begin(); it != towers->end(); ++it) {
287 std::map<int, int> analysed;
288 xAOD::CPMTowerMap_t::const_iterator cpmt = towers->begin();
289 for ( ; cpmt != towers->end(); ++cpmt) {
290 double eta = (*cpmt).second->eta();
291 double phi = (*cpmt).second->phi();
292 for (
int i = -1; i <= 0; ++i) {
293 for (
int j = -1; j <= 0; ++j) {
294 double tempEta =
eta + i*0.1;
295 double tempPhi =
phi + j*0.1;
296 int key = testKey.
ttKey(tempPhi,tempEta);
297 std::map<int, int>::iterator test = analysed.find(key);
298 if (test == analysed.end()) {
299 analysed.insert(std::map<int, int>::value_type(key,1));
321 for( it = cpmts->
begin(); it != cpmts->
end(); ++it ){
322 double TriggerTowerEta=(*it)->eta();
323 if (fabs(TriggerTowerEta) < 2.5) {
324 double TriggerTowerPhi=(*it)->phi();
325 int key = testKey.
ttKey(TriggerTowerPhi,TriggerTowerEta);
326 xAOD::CPMTowerMap_t::iterator test=towers->find( key );
327 if (test != towers->end()){
331 std::vector<uint8_t> emEt = (*it)->emEnergyVec();
332 std::vector<uint8_t> hadEt = (*it)->hadEnergyVec();
333 bool nonZero =
false;
334 for (std::vector<uint8_t>::iterator it2 = emEt.begin(); it2 != emEt.end(); ++it2)
335 if ((*it2) > 0) nonZero =
true;
336 for (std::vector<uint8_t>::iterator it2 = hadEt.begin(); it2 != hadEt.end(); ++it2)
337 if ((*it2) > 0) nonZero =
true;
338 if (nonZero) towers->insert(xAOD::CPMTowerMap_t::value_type(key,(*it)));
365 float RoIphi =
coord.phi();
366 float RoIeta =
coord.eta();
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
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.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
void clear()
Erase all the elements in the collection.
This is an internal class, used in the EM/Tau trigger.
int EMIsolWord()
Returns EM isolation word (5 bits)
int TauIsolWord()
Returns Tau isolation word (5 bits)
int EMClusET()
Returns EM cluster ET, limited to 8 bits.
bool isTauRoI()
Report whether this passed as a Tau TOB.
xAOD::CPMTobRoI * EMCPMTobRoI()
Create CPMTobRoIs and return pointers to them.
int TauClusET()
Returns Tau cluster ET, limited to 8 bits.
xAOD::CPMTobRoI * TauCPMTobRoI()
Returns CPMTobRoI for TAU hypothesis, provided TAU Tob conditions passed.
bool isEMRoI()
Report whether this passed as an EM TOB.
CoordinateRange class declaration.
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
CPMTobRoI_v1 CPMTobRoI
Define the latest version of the CPMTobRoI class.
std::map< int, const CPMTower * > CPMTowerMap_t
CPMTobRoIContainer_v1 CPMTobRoIContainer
Define the latest version of the CPMTobRoI class.
Extra patterns decribing particle interation process.