|
|
Go to the documentation of this file.
51 const int ifMuEtaNumberBits)
55 m_ifMuEtaNumberBits(ifMuEtaNumberBits) {
112 int numberObjects = candVec->size();
115 if (numberObjects < nObjInCond) {
119 std::vector<int>
index(numberObjects);
121 for (
int i = 0;
i < numberObjects; ++
i) {
126 int jump =
factorial(numberObjects - nObjInCond);
134 bool condResult =
false;
139 objectsInComb.reserve(nObjInCond);
152 objectsInComb.clear();
154 bool tmpResult =
true;
158 for (
int i = 0;
i < nObjInCond;
i++) {
160 objectsInComb.push_back(
index[
i]);
176 if ((chargeCorr & 1) == 0) {
177 for (
int i = 0;
i < nObjInCond;
i++) {
179 bool chargeValid = (*candVec)[
index[
i]]->charge_valid();
180 tmpResult &= chargeValid;
191 if (nObjInCond == 1) {
194 if (!(((chargeCorr & 4) != 0 && (*candVec)[
index[0]]->
charge() > 0) ||
195 ((chargeCorr & 2) != 0 && (*candVec)[
index[0]]->
charge() < 0))) {
202 bool equalSigns =
true;
203 for (
int i = 0;
i < nObjInCond - 1;
i++) {
211 if (nObjInCond == 2 || nObjInCond == 3) {
213 if (!(((chargeCorr & 4) != 0 && equalSigns) || ((chargeCorr & 2) != 0 && !equalSigns))) {
219 if (nObjInCond == 4) {
221 unsigned int posCount = 0;
223 for (
int i = 0;
i < nObjInCond;
i++) {
230 if (!(((chargeCorr & 4) != 0 && equalSigns) || ((chargeCorr & 2) != 0 && posCount == 2))) {
241 const int ObjInWscComb = 2;
242 if (nObjInCond != ObjInWscComb) {
244 <<
"number of particles in condition with spatial correlation = " << nObjInCond
245 <<
"\n it must be = " << ObjInWscComb << std::endl;
251 unsigned int candDeltaEta;
252 unsigned int candDeltaPhi;
258 int signedEta[ObjInWscComb];
259 int signBit[ObjInWscComb] = {0, 0};
263 for (
int i = 0;
i < ObjInWscComb; ++
i) {
265 signedEta[
i] = ((*candVec)[
index[
i]]->etaIndex()) % scaleEta;
267 if (signBit[
i] == 1) {
268 signedEta[
i] = (-1) * signedEta[
i];
275 static_cast<int>(
std::abs(signedEta[1] - signedEta[0])) + static_cast<int>(signBit[1] ^ signBit[0]);
284 if ((*candVec)[
index[0]]->phiIndex() > (*candVec)[
index[1]]->phiIndex()) {
285 candDeltaPhi = (*candVec)[
index[0]]->phiIndex() - (*candVec)[
index[1]]->phiIndex();
287 candDeltaPhi = (*candVec)[
index[1]]->phiIndex() - (*candVec)[
index[0]]->phiIndex();
298 unsigned int candDeltaPhiInitial = candDeltaPhi;
303 LogTrace(
"L1GlobalTrigger") <<
" Initial candDeltaPhi = " << candDeltaPhiInitial
305 <<
" ==> candDeltaPhi rescaled to: " << candDeltaPhi <<
" [ loop index " << iLoop
306 <<
"; breaks after " << nMaxLoop <<
" loops ]\n"
311 if (iLoop > nMaxLoop) {
317 if (candDeltaPhi < 64) {
336 }
while (std::next_permutation(
index.begin(),
index.end()));
366 if (iCondition >= nObjInCond || iCondition < 0) {
449 if (
cand.quality() == 0) {
479 myCout <<
" Number of bits for eta of muon objects = " <<
m_ifMuEtaNumberBits << std::endl;
480 myCout <<
" Maximum number of bins for the delta phi scales = " <<
m_corrParDeltaPhiNrBins <<
"\n " << std::endl;
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate
const bool checkObjectParameter(const int iCondition, const L1MuGMTCand &cand) const
function to check a single object if it matches a condition
int m_verbosity
verbosity level
unsigned long long deltaPhiRange1Word
void copy(const L1GtMuonCondition &cp)
copy function for copy constructor and operator=
const int nrObjects() const
get number of trigger objects
const std::vector< const L1MuGMTCand * > * getCandL1Mu() const
return global muon trigger candidate
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
const bool condGEq() const
get / set condition GEq flag
const CorrelationParameter * correlationParameter() const
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
L1GtMuonCondition & operator=(const L1GtMuonCondition &)
void print(std::ostream &myCout) const override
print the condition
int factorial(int n)
factorial function
const std::vector< ObjectParameter > * objectParameter() const
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
unsigned long long etaRange
const bool checkThreshold(const Type1 &threshold, const Type2 &value, const bool condGEqValue) const
bool m_condLastResult
the last result of evaluateCondition()
~L1GtMuonCondition() override
std::vector< int > SingleCombInCond
typedefs
void setGtGTL(const L1GlobalTriggerGTL *)
set the pointer to GTL
unsigned int m_corrParDeltaPhiNrBins
const bool evaluateCondition() const override
the core function to check if the condition matches
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
unsigned int qualityRange
void print(std::ostream &myCout) const override
print condition
void setGtIfMuEtaNumberBits(const int &)
const L1GlobalTriggerGTL * m_gtGTL
pointer to GTL, to be able to get the trigger objects
void clear(HadCaloObj &c)
int m_condMaxNumberObjects
unsigned long long deltaPhiRange0Word
unsigned int ptLowThreshold
unsigned int chargeCorrelation
unsigned long long deltaEtaRange
const L1MuGMTCand * getCandidate(const int indexCand) const
load muon candidates
void setGtMuonTemplate(const L1GtMuonTemplate *)
Abs< T >::type abs(const T &t)
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
unsigned int ptHighThreshold
void setGtCorrParDeltaPhiNrBins(const int &)