33 const std::vector<TriggerThreshold *> *caloThresholds)
120 const std::vector<TriggerThreshold *> *caloThresholds)
132 const vector<unsigned int> passed_thresholds =
136 std::map<int, TriggerThreshold *> thrMap;
138 for (std::vector<TriggerThreshold *>::const_iterator it =
139 caloThresholds->begin();
140 it != caloThresholds->end(); ++it)
145 int num = (*it)->thresholdNumber();
146 thrMap.insert(std::map<int, TriggerThreshold *>::value_type(num, (*it)));
154 int ieta = int((
m_coordRange.etaRange().min() + 0.025) / 0.1) +
158 for (vector<unsigned int>::const_iterator itp = passed_thresholds.begin();
159 itp != passed_thresholds.end(); ++itp)
161 std::map<int, TriggerThreshold *>::const_iterator thr =
162 thrMap.find(*itp - 1);
163 if (thr != thrMap.end())
166 thr->second->triggerThresholdValue(ieta, iphi);
172 m_emIsolation.insert(std::map<int, unsigned int>::value_type(
177 std::map<int, unsigned int>::value_type(*itp, ctv->
hadVetoCount()));
182 std::map<int, TrigT1CaloDefs::ClusterAlgorithm>::value_type(*itp,
206 std::string triggerType =
210 int ieta = int((
m_coordRange.etaRange().min() + 0.025) / 0.1) +
217 for (std::vector<TriggerThreshold *>::const_iterator it =
218 caloThresholds->begin();
219 it != caloThresholds->end(); ++it) {
220 if ((*it)->type() == triggerType) {
227 unsigned int etCut = ctv->
ptcut();
231 bool isolationPassed =
true;
234 if ((isolMask & (1 << bit)) && !(isolWord & (1 << bit)))
235 isolationPassed =
false;
238 int num = (*it)->thresholdNumber();
240 std::map<int, unsigned int>::value_type(num, etCut));
242 std::map<int, unsigned int>::value_type(num, isolMask));
247 std::map<int, TrigT1CaloDefs::ClusterAlgorithm>::value_type(
271 int ieta = int((
m_coordRange.etaRange().min() + 0.025) / 0.1) +
277 for (
const shared_ptr<TrigConf::L1Threshold> &thr : l1menu->thresholds(triggerType))
287 unsigned int etCut = std::round(caloThr->thrValue(ieta));
288 unsigned int etCounts = caloThr->thrValueCounts(ieta);
292 unsigned int isolMask = 0;
293 if (triggerType ==
"EM")
298 isolMask = emThr->isolationMask(ieta);
301 else if (triggerType ==
"TAU")
306 isolMask = tauThr->isolationMask();
309 bool isolationPassed =
true;
312 if ((isolMask & (1 << bit)) && !(isolWord & (1 << bit)))
314 isolationPassed =
false;
318 if (eTPassed && isolationPassed)
320 int num = thr->mapping();
395std::vector<unsigned int> *
398 std::vector<unsigned int> *newVec =
new std::vector<unsigned int>;
406 for (
unsigned int iTh = 0; iTh <= nThresh; ++iTh) {
407 std::map<int, unsigned int>::const_iterator it =
410 newVec->push_back(iTh);
421 std::map<int, unsigned int>::const_iterator it =
438 std::map<int, unsigned int>::const_iterator it =
m_isolationMask.find(thresh);
454 std::map<int, unsigned int>::const_iterator it =
m_emIsolation.find(thresh);
float et(const xAOD::jFexSRJetRoI *j)
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
CoordinateRange class declaration.
This class defines the reconstructed em/tau hadron ROI.
virtual unsigned int isolation() const
returns roi isolation results (Run 2 only)
virtual double eta() const
returns eta coord of ROI
unsigned long int m_roiWord
this is the actual format of the data sent from the LVL1 hardware.
virtual TrigT1CaloDefs::RoIType roiType() const
returns roi type (EM = TrigT1CaloDefs::EMRoIWordType, Tau = TrigT1CaloDefs::TauRoIWordType,...
CoordinateRange m_coordRange
this contains the coordinate range worked out from the RoIWord hardware coord (i.e.
void constructRun3(const TrigConf::L1Menu *const l1menu)
TrigT1CaloDefs::ClusterAlgorithm thresholdType(unsigned int thresh) const
returns the type of the threshold, which is either EMAlg or TauAlg.
void constructRun2(const std::vector< TrigConf::TriggerThreshold * > *caloThresholds)
Content of RoI word different in Run 2.
unsigned int hadIsolation(unsigned int thresh) const
returns the value of the hadronic layer isolation ring for the threshold passed.
void constructRun1(const std::vector< TrigConf::TriggerThreshold * > *caloThresholds)
The "construct" call unpacks the RoIWord and copies information about the passed thresholds from the ...
std::map< int, unsigned int > m_hadIsolation
virtual unsigned int et() const
returns roi ET (Run 2 only)
virtual unsigned int crate() const
returns CP crate number
std::map< int, unsigned int > m_emIsolation
unsigned int triggerThreshold(unsigned int thresh) const
returns the value of the trigger threshold for the threshold passed.
std::map< int, TrigT1CaloDefs::ClusterAlgorithm > m_thresholdType
virtual unsigned int roiWord() const
returns roi word
std::map< int, unsigned int > m_hadCoreIsolation
unsigned int hadCoreIsolation(unsigned int thresh) const
returns the value of the hadronic layer core isolation for the threshold passed.
unsigned long int m_thresholdMask
bool isValidThreshold(unsigned int thresh) const
returns true if thresh is a valid threshold number
unsigned int isolationMask(unsigned int thresh) const
returns the isolation bits required for the threshold passed (Run 2)
virtual unsigned int fpga() const
returns FPGA number
CPRoIDecoder * m_decoder
Used for decoding RoI word.
unsigned int thresholdPattern() const
returns bitmask of passed thresholds
TrigT1CaloDefs::RoIType m_type
Stored properties of the RoI:
bool passedThreshold(unsigned int threshold_number) const
returns TRUE if threshold number threshold_number has been passed by this ROI.
virtual double phi() const
returns phi coord of ROI
virtual unsigned int localcoord() const
returns local coordinate within FPGA
std::vector< unsigned int > * thresholdsPassed() const
returns a vector of thresholds passed.
std::map< int, unsigned int > m_triggerThresholdValue
std::map< int, unsigned int > m_isolationMask
RecEmTauRoI & operator=(const RecEmTauRoI &obj)
unsigned int emIsolation(unsigned int thresh) const
returns the value of the em isolation ring for the threshold passed.
const CoordinateRange & coord() const
returns the CoordinateRange.
virtual unsigned int module() const
returns CPM number
static const unsigned int numOfCPThresholds
static const unsigned int Error
static const unsigned int numOfTauCMXThresholds
static const unsigned int numOfIsolationBits
static const unsigned int numOfEMCMXThresholds
float globalEmScale() const
int emIsolationCount() const
uint16_t isolationMask() const
virtual int thresholdValueCount() const override
int hadIsolationCount() const
static std::string & typeAsString(TriggerType tt)
const CaloInfo & caloInfo() const
const std::string & type() const
Forward iterator to traverse the main components of the trigger configuration.