56 const int nrL1NoIsoEG,
61 const int ifCaloEtaNumberBits)
65 m_ifCaloEtaNumberBits(ifCaloEtaNumberBits) {
152 const std::vector<const L1GctCand *> *candVec;
175 int numberObjects = candVec->size();
178 if (numberObjects < nObjInCond) {
182 std::vector<int>
index(numberObjects);
184 for (
int i = 0;
i < numberObjects; ++
i) {
189 int jump =
factorial(numberObjects - nObjInCond);
194 bool condResult =
false;
199 objectsInComb.reserve(nObjInCond);
211 objectsInComb.clear();
213 bool tmpResult =
true;
217 for (
int i = 0;
i < nObjInCond;
i++) {
219 objectsInComb.push_back(
index[
i]);
232 const int ObjInWscComb = 2;
233 if (nObjInCond != ObjInWscComb) {
237 <<
"number of particles in condition with spatial correlation = " << nObjInCond
238 <<
"\n it must be = " << ObjInWscComb << std::endl;
246 unsigned int candDeltaEta;
247 unsigned int candDeltaPhi;
253 int signedEta[ObjInWscComb];
254 int signBit[ObjInWscComb] = {0, 0};
258 for (
int i = 0;
i < ObjInWscComb; ++
i) {
260 signedEta[
i] = ((*candVec)[
index[
i]]->etaIndex()) % scaleEta;
262 if (signBit[
i] == 1) {
263 signedEta[
i] = (-1) * signedEta[
i];
270 static_cast<int>(
std::abs(signedEta[1] - signedEta[0])) + static_cast<int>(signBit[1] ^ signBit[0]);
279 if ((*candVec)[
index[0]]->phiIndex() > (*candVec)[
index[1]]->phiIndex()) {
280 candDeltaPhi = (*candVec)[
index[0]]->phiIndex() - (*candVec)[
index[1]]->phiIndex();
282 candDeltaPhi = (*candVec)[
index[1]]->phiIndex() - (*candVec)[
index[0]]->phiIndex();
293 unsigned int candDeltaPhiInitial = candDeltaPhi;
298 LogTrace(
"L1GlobalTrigger") <<
" Initial candDeltaPhi = " << candDeltaPhiInitial
300 <<
" ==> candDeltaPhi rescaled to: " << candDeltaPhi <<
" [ loop index " << iLoop
301 <<
"; breaks after " << nMaxLoop <<
" loops ]\n" 306 if (iLoop > nMaxLoop) {
324 }
while (std::next_permutation(
index.begin(),
index.end()));
371 if (iCondition >= nObjInCond || iCondition < 0) {
411 myCout <<
" Maximum number of bins for the delta phi scales = " <<
m_corrParDeltaPhiNrBins <<
"\n " << std::endl;
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
const std::vector< const L1GctCand * > * getCandL1ForJet() const
pointer to ForJet data list
~L1GtCaloCondition() override
int m_verbosity
verbosity level
const bool checkObjectParameter(const int iCondition, const L1GctCand &cand) const
function to check a single object if it matches a condition
const std::vector< ObjectParameter > * objectParameter() const
bool m_condLastResult
the last result of evaluateCondition()
const bool checkBit(const Type1 &mask, const unsigned int bitNumber) const
check if a bit with a given number is set in a mask
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
const std::vector< const L1GctCand * > * getCandL1CenJet() const
pointer to CenJet data list
unsigned long long deltaPhiRange
std::vector< int > SingleCombInCond
typedefs
const L1GlobalTriggerPSB * m_gtPSB
pointer to PSB, to be able to get the trigger objects
unsigned long long deltaEtaRange
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
Log< level::Error, false > LogError
virtual void print(std::ostream &myCout) const
print condition
const CorrelationParameter * correlationParameter() const
void print(std::ostream &myCout) const override
print the condition
void setGtCaloTemplate(const L1GtCaloTemplate *)
const bool evaluateCondition() const override
the core function to check if the condition matches
const std::vector< const L1GctCand * > * getCandL1IsoEG() const
pointer to IsoEG data list
const L1GtCaloTemplate * m_gtCaloTemplate
pointer to a L1GtCaloTemplate
const bool checkThreshold(const Type1 &threshold, const Type2 &value, const bool condGEqValue) const
L1GtCaloCondition & operator=(const L1GtCaloCondition &)
const std::vector< const L1GctCand * > * getCandL1NoIsoEG() const
pointer to NoIsoEG data list
void setGtIfCaloEtaNumberBits(const int &)
Abs< T >::type abs(const T &t)
void copy(const L1GtCaloCondition &cp)
copy function for copy constructor and operator=
typedef for a single object template
unsigned int m_corrParDeltaPhiNrBins
typedef for correlation parameters
void print(std::ostream &myCout) const override
print condition
const L1GctCand * getCandidate(const int indexCand) const
load calo candidates
const bool condGEq() const
get / set condition GEq flag
int m_condMaxNumberObjects
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
void setGtPSB(const L1GlobalTriggerPSB *)
set the pointer to PSB
const std::vector< const L1GctCand * > * getCandL1TauJet() const
pointer to TauJet data list
ABC for GCT EM and jet candidates.
int factorial(int n)
factorial function
const int nrObjects() const
get number of trigger objects
void setGtCorrParDeltaPhiNrBins(const int &)