|
|
Go to the documentation of this file.
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);
197 bool condResult =
false;
202 objectsInComb.reserve(nObjInCond);
215 objectsInComb.clear();
217 bool tmpResult =
true;
221 for (
int i = 0;
i < nObjInCond;
i++) {
223 objectsInComb.push_back(
index[
i]);
236 const int ObjInWscComb = 2;
237 if (nObjInCond != ObjInWscComb) {
241 <<
"number of particles in condition with spatial correlation = " << nObjInCond
242 <<
"\n it must be = " << ObjInWscComb << std::endl;
250 unsigned int candDeltaEta;
251 unsigned int candDeltaPhi;
257 int signedEta[ObjInWscComb];
258 int signBit[ObjInWscComb] = {0, 0};
262 for (
int i = 0;
i < ObjInWscComb; ++
i) {
264 signedEta[
i] = ((*candVec)[
index[
i]]->etaIndex()) % scaleEta;
266 if (signBit[
i] == 1) {
267 signedEta[
i] = (-1) * signedEta[
i];
274 static_cast<int>(
std::abs(signedEta[1] - signedEta[0])) + static_cast<int>(signBit[1] ^ signBit[0]);
283 if ((*candVec)[
index[0]]->phiIndex() > (*candVec)[
index[1]]->phiIndex()) {
284 candDeltaPhi = (*candVec)[
index[0]]->phiIndex() - (*candVec)[
index[1]]->phiIndex();
286 candDeltaPhi = (*candVec)[
index[1]]->phiIndex() - (*candVec)[
index[0]]->phiIndex();
297 unsigned int candDeltaPhiInitial = candDeltaPhi;
302 LogTrace(
"L1GlobalTrigger") <<
" Initial candDeltaPhi = " << candDeltaPhiInitial
304 <<
" ==> candDeltaPhi rescaled to: " << candDeltaPhi <<
" [ loop index " << iLoop
305 <<
"; breaks after " << nMaxLoop <<
" loops ]\n"
310 if (iLoop > nMaxLoop) {
329 }
while (std::next_permutation(
index.begin(),
index.end()));
383 if (iCondition >= nObjInCond || iCondition < 0) {
423 myCout <<
" Maximum number of bins for the delta phi scales = " <<
m_corrParDeltaPhiNrBins <<
"\n " << std::endl;
int m_verbosity
verbosity level
~L1GtCaloCondition() override
void setGtCorrParDeltaPhiNrBins(const int &)
const bool checkObjectParameter(const int iCondition, const L1GctCand &cand) const
function to check a single object if it matches a condition
const int nrObjects() const
get number of trigger objects
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
const bool condGEq() const
get / set condition GEq flag
const bool checkBit(const Type1 &mask, const unsigned int bitNumber) const
check if a bit with a given number is set in a mask
virtual void print(std::ostream &myCout) const
print condition
int factorial(int n)
factorial function
typedef for a single object template
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
const std::vector< const L1GctCand * > * getCandL1ForJet() const
pointer to ForJet data list
const bool checkThreshold(const Type1 &threshold, const Type2 &value, const bool condGEqValue) const
bool m_condLastResult
the last result of evaluateCondition()
const L1GlobalTriggerPSB * m_gtPSB
pointer to PSB, to be able to get the trigger objects
std::vector< int > SingleCombInCond
typedefs
unsigned long long deltaPhiRange
void setGtCaloTemplate(const L1GtCaloTemplate *)
const L1GtCaloTemplate * m_gtCaloTemplate
pointer to a L1GtCaloTemplate
L1GtCaloCondition & operator=(const L1GtCaloCondition &)
const bool evaluateCondition() const override
the core function to check if the condition matches
typedef for correlation parameters
unsigned long long deltaEtaRange
void copy(const L1GtCaloCondition &cp)
copy function for copy constructor and operator=
const std::vector< const L1GctCand * > * getCandL1TauJet() const
pointer to TauJet data list
void setGtIfCaloEtaNumberBits(const int &)
const std::vector< const L1GctCand * > * getCandL1IsoEG() const
pointer to IsoEG data list
unsigned int m_corrParDeltaPhiNrBins
const std::vector< ObjectParameter > * objectParameter() const
int m_condMaxNumberObjects
void print(std::ostream &myCout) const override
print condition
const L1GctCand * getCandidate(const int indexCand) const
load calo candidates
const std::vector< const L1GctCand * > * getCandL1NoIsoEG() const
pointer to NoIsoEG data list
Log< level::Error, false > LogError
void setGtPSB(const L1GlobalTriggerPSB *)
set the pointer to PSB
const CorrelationParameter * correlationParameter() const
void print(std::ostream &myCout) const override
print the condition
ABC for GCT EM and jet candidates.
Abs< T >::type abs(const T &t)
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
const std::vector< const L1GctCand * > * getCandL1CenJet() const
pointer to CenJet data list