CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
l1t::MuCondition Class Reference

#include <MuCondition.h>

Inheritance diagram for l1t::MuCondition:
l1t::ConditionEvaluation

Public Member Functions

const bool evaluateCondition (const int bxEval) const
 the core function to check if the condition matches More...
 
const int gtCorrParDeltaPhiNrBins () const
 get / set maximum number of bins for the delta phi scales More...
 
const GtBoardgtGTL () const
 get / set the pointer to GTL More...
 
const int gtIfMuEtaNumberBits () const
 get / set the number of bits for eta of muon objects More...
 
const MuonTemplategtMuonTemplate () const
 get / set the pointer to a Condition More...
 
 MuCondition ()
 
 MuCondition (const GtCondition *, const GtBoard *, const int nrL1Mu, const int ifMuEtaNumberBits)
 from base template condition (from event setup usually) More...
 
 MuCondition (const MuCondition &)
 
MuConditionoperator= (const MuCondition &)
 
void print (std::ostream &myCout) const
 print condition More...
 
void setGtCorrParDeltaPhiNrBins (const int &)
 
void setGtGTL (const GtBoard *)
 set the pointer to GTL More...
 
void setGtIfMuEtaNumberBits (const int &)
 
void setGtMuonTemplate (const MuonTemplate *)
 
virtual ~MuCondition ()
 
- Public Member Functions inherited from l1t::ConditionEvaluation
 ConditionEvaluation ()
 constructor More...
 
bool condLastResult () const
 get the latest result for the condition More...
 
int condMaxNumberObjects () const
 
void evaluateConditionStoreResult (const int bxEval)
 call evaluateCondition and save last result More...
 
CombinationsInCond const & getCombinationsInCond () const
 get all the object combinations evaluated to true in the condition More...
 
virtual std::string getNumericExpression () const
 get numeric expression More...
 
void setCondMaxNumberObjects (int condMaxNumberObjectsValue)
 
void setVerbosity (const int verbosity)
 
virtual ~ConditionEvaluation ()
 destructor More...
 

Private Member Functions

const bool checkObjectParameter (const int iCondition, const l1t::Muon &cand) const
 function to check a single object if it matches a condition More...
 
void copy (const MuCondition &cp)
 copy function for copy constructor and operator= More...
 
const l1t::MuongetCandidate (const int bx, const int indexCand) const
 load muon candidates More...
 

Private Attributes

unsigned int m_corrParDeltaPhiNrBins
 
const GtBoardm_gtGTL
 pointer to GTL, to be able to get the trigger objects More...
 
const MuonTemplatem_gtMuonTemplate
 pointer to a MuonTemplate More...
 
int m_ifMuEtaNumberBits
 number of bits for eta of muon objects More...
 

Additional Inherited Members

- Protected Member Functions inherited from l1t::ConditionEvaluation
template<class Type1 >
const bool checkBit (const Type1 &mask, const unsigned int bitNumber) const
 check if a bit with a given number is set in a mask More...
 
template<class Type1 >
const bool checkRangeDeltaEta (const unsigned int obj1Eta, const unsigned int obj2Eta, const Type1 &lowerR, const Type1 &upperR) const
 check if a value is in a given range More...
 
template<class Type1 >
const bool checkRangeDeltaPhi (const unsigned int obj1Phi, const unsigned int obj2Phi, const Type1 &lowerR, const Type1 &upperR) const
 check if a value is in a given range More...
 
template<class Type1 >
const bool checkRangeEta (const unsigned int bitNumber, const Type1 &beginR, const Type1 &endR, const Type1 &beginVetoR, const Type1 &endVetoR) const
 check if a value is in a given range and outside of a veto range More...
 
template<class Type1 >
const bool checkRangePhi (const unsigned int bitNumber, const Type1 &beginR, const Type1 &endR, const Type1 &beginVetoR, const Type1 &endVetoR) const
 check if a value is in a given range and outside of a veto range More...
 
template<class Type1 , class Type2 >
const bool checkThreshold (const Type1 &threshold, const Type2 &value, bool condGEqValue) const
 
CombinationsInCondcombinationsInCond () const
 get all the object combinations (to fill it...) More...
 
- Protected Attributes inherited from l1t::ConditionEvaluation
CombinationsInCond m_combinationsInCond
 store all the object combinations evaluated to true in the condition More...
 
bool m_condLastResult
 the last result of evaluateCondition() More...
 
int m_condMaxNumberObjects
 
int m_verbosity
 verbosity level More...
 

Detailed Description

Definition at line 36 of file MuCondition.h.

Constructor & Destructor Documentation

MuCondition::MuCondition ( )

constructors default

Definition at line 43 of file MuCondition.cc.

43  :
45 
46  // empty
47 
48 }
MuCondition::MuCondition ( const GtCondition muonTemplate,
const GtBoard ptrGTL,
const int  nrL1Mu,
const int  ifMuEtaNumberBits 
)

from base template condition (from event setup usually)

Definition at line 51 of file MuCondition.cc.

References l1t::ConditionEvaluation::m_condMaxNumberObjects, and m_corrParDeltaPhiNrBins.

53  :
55  m_gtMuonTemplate(static_cast<const MuonTemplate*>(muonTemplate)),
56  m_gtGTL(ptrGTL),
57  m_ifMuEtaNumberBits(ifMuEtaNumberBits)
58 {
60  m_condMaxNumberObjects = nrL1Mu;
61 }
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
Definition: MuCondition.h:121
unsigned int m_corrParDeltaPhiNrBins
Definition: MuCondition.h:124
const GtBoard * m_gtGTL
pointer to GTL, to be able to get the trigger objects
Definition: MuCondition.h:118
const MuonTemplate * m_gtMuonTemplate
pointer to a MuonTemplate
Definition: MuCondition.h:115
MuCondition::MuCondition ( const MuCondition cp)

Definition at line 80 of file MuCondition.cc.

References copy().

80  :
82  copy(cp);
83 }
void copy(const MuCondition &cp)
copy function for copy constructor and operator=
Definition: MuCondition.cc:64
MuCondition::~MuCondition ( )
virtual

Definition at line 86 of file MuCondition.cc.

86  {
87 
88  // empty
89 
90 }

Member Function Documentation

const bool MuCondition::checkObjectParameter ( const int  iCondition,
const l1t::Muon cand 
) const
private

function to check a single object if it matches a condition

checkObjectParameter - Compare a single particle with a numbered condition.

Parameters
iConditionThe number of the condition.
candThe candidate to compare.
Returns
The result of the comparison (false if a condition does not exist).

Definition at line 350 of file MuCondition.cc.

References MuonTemplate::ObjectParameter::charge, reco::LeafCandidate::charge(), MuonTemplate::ObjectParameter::enableIso, MuonTemplate::ObjectParameter::enableMip, MuonTemplate::ObjectParameter::etaRange, MuonTemplate::ObjectParameter::etaWindowLower, MuonTemplate::ObjectParameter::etaWindowUpper, MuonTemplate::ObjectParameter::etaWindowVetoLower, l1t::L1Candidate::hwEta(), l1t::L1Candidate::hwIso(), l1t::Muon::hwMip(), l1t::L1Candidate::hwPhi(), l1t::L1Candidate::hwPt(), l1t::L1Candidate::hwQual(), MuonTemplate::ObjectParameter::isolationLUT, LogDebug, MuonTemplate::ObjectParameter::phiHigh, MuonTemplate::ObjectParameter::phiLow, MuonTemplate::ObjectParameter::phiWindowLower, MuonTemplate::ObjectParameter::phiWindowUpper, MuonTemplate::ObjectParameter::phiWindowVetoLower, MuonTemplate::ObjectParameter::ptHighThreshold, MuonTemplate::ObjectParameter::ptLowThreshold, MuonTemplate::ObjectParameter::qualityLUT, and MuonTemplate::ObjectParameter::requestIso.

350  {
351 
352  // number of objects in condition
353  int nObjInCond = m_gtMuonTemplate->nrObjects();
354 
355  if (iCondition >= nObjInCond || iCondition < 0) {
356  return false;
357  }
358 
359 // // empty candidates can not be compared
360 // if (cand.empty()) {
361 // return false;
362 // }
363 
364  const MuonTemplate::ObjectParameter objPar =
365  ( *(m_gtMuonTemplate->objectParameter()) )[iCondition];
366 
367  // using the logic table from GTL-9U-module.pdf
368  // "Truth table for Isolation bit"
369 
370  // check thresholds:
371 
372  // value < low pt threshold
373  // fail trigger
374 
375  // low pt threshold <= value < high pt threshold & non-isolated muon:
376  // requestIso true: fail trigger
377  // requestIso false, enableIso true: fail trigger
378  // requestIso false, enableIso false: OK, trigger
379 
380  // low pt threshold <= value < high pt threshold & isolated muon:
381  // requestIso true: OK, trigger
382  // requestIso false, enableIso true: OK, trigger
383  // requestIso false, enableIso false: OK, trigger
384 
385  // value >= high pt threshold & non-isolated muon:
386  // requestIso true: fail trigger
387  // requestIso false: OK, trigger
388 
389  // value >= high pt threshold & isolated muon:
390  // OK, trigger
391 
392  LogDebug("l1t|Global")
393  << "\n MuonTemplate::ObjectParameter : "
394  << "\n\t ptHighThreshold = " << objPar.ptHighThreshold
395  << "\n\t ptLowThreshold = " << objPar.ptLowThreshold
396  << "\n\t requestIso = " << objPar.requestIso
397  << "\n\t enableIso = " << objPar.enableIso
398  << "\n\t etaRange = " << objPar.etaRange
399  << "\n\t phiLow = " << objPar.phiLow
400  << "\n\t phiHigh = " << objPar.phiHigh
401  << "\n\t phiWindowLower = " << objPar.phiWindowLower
402  << "\n\t phiWindowUpper = " << objPar.phiWindowUpper
403  << "\n\t phiWindowVetoLower = " << objPar.phiWindowVetoLower
404  << "\n\t phiWindowVetoLower = " << objPar.phiWindowVetoLower
405  << "\n\t charge = " << objPar.charge
406  << "\n\t qualityLUT = " << objPar.qualityLUT
407  << "\n\t isolationLUT = " << objPar.isolationLUT
408  << "\n\t enableMip = " << objPar.enableMip
409  << std::endl;
410 
411  LogDebug("l1t|Global")
412  << "\n l1t::Muon : "
413  << "\n\t hwPt = " << cand.hwPt()
414  << "\n\t hwEta = " << cand.hwEta()
415  << "\n\t hwPhi = " << cand.hwPhi()
416  << "\n\t hwCharge = " << cand.charge()
417  << "\n\t hwQual = " << cand.hwQual()
418  << "\n\t hwIso = " << cand.hwIso()
419  << "\n\t hwMip = " << cand.hwMip()
420  << std::endl;
421 
422 
423  if ( !checkThreshold(objPar.ptHighThreshold, cand.hwPt(), m_gtMuonTemplate->condGEq()) ) {
424  if ( !checkThreshold(objPar.ptLowThreshold, cand.hwPt(), m_gtMuonTemplate->condGEq()) ) {
425  LogDebug("l1t|Global") << "\t\t Muon Failed checkThreshold " << std::endl;
426  return false;
427  }
428  }
429 
430 
431  // check eta
432  if( !checkRangeEta(cand.hwEta(), objPar.etaWindowLower, objPar.etaWindowUpper, objPar.etaWindowVetoLower, objPar.etaWindowVetoLower) ){
433  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(eta)" << std::endl;
434  return false;
435  }
436 
437  // check phi
438  if( !checkRangePhi(cand.hwPhi(), objPar.phiWindowLower, objPar.phiWindowUpper, objPar.phiWindowVetoLower, objPar.phiWindowVetoLower) ){
439  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(phi)" << std::endl;
440  return false;
441  }
442 
443  // check charge
444  if( objPar.charge!=0 ){
445  if( (cand.charge() * objPar.charge) < 0 ){
446  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed charge requirement" << std::endl;
447  return false;
448  }
449  }
450 
451 
452 
453  // check quality ( bit check ) with quality LUT
454  // sanity check on candidate quality
455  if( cand.hwQual()>16 ){
456  LogDebug("l1t|Global") << "\t\t l1t::Candidate has out of range hwQual = " << cand.hwQual() << std::endl;
457  return false;
458  }
459  bool passQualLUT = ( (objPar.qualityLUT >> cand.hwQual()) & 1 );
460  if( !passQualLUT ){
461  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed quality requirement" << std::endl;
462  return false;
463  }
464 
465 
466  // check isolation ( bit check ) with isolation LUT
467  // sanity check on candidate isolation
468  if( cand.hwIso()>4 ){
469  LogDebug("l1t|Global") << "\t\t l1t::Candidate has out of range hwIso = " << cand.hwIso() << std::endl;
470  return false;
471  }
472  bool passIsoLUT = ( (objPar.isolationLUT >> cand.hwIso()) & 1 );
473  if( !passIsoLUT ){
474  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed isolation requirement" << std::endl;
475  return false;
476  }
477 
478  // A number of values is required to trigger (at least one).
479  // "Don’t care" means that all values are allowed.
480  // Qual = 000 means then NO MUON (GTL module)
481 
482  // if (cand.hwQual() == 0) {
483  // LogDebug("l1t|Global") << "\t\t Muon Failed hwQual() == 0" << std::endl;
484  // return false;
485  // }
486 
487  // if (objPar.qualityRange == 0) {
488  // LogDebug("l1t|Global") << "\t\t Muon Failed qualityRange == 0" << std::endl;
489  // return false;
490  // }
491  // else {
492  // if (!checkBit(objPar.qualityRange, cand.hwQual())) {
493  // LogDebug("l1t|Global") << "\t\t Muon Failed checkBit(qualityRange) " << std::endl;
494  // return false;
495  // }
496  // }
497 
498  // check mip
499  if (objPar.enableMip) {
500  if (!cand.hwMip()) {
501  LogDebug("l1t|Global") << "\t\t Muon Failed enableMip" << std::endl;
502  return false;
503  }
504  }
505 
506  // particle matches if we get here
507  //LogTrace("l1t|Global")
508  // << " checkObjectParameter: muon object OK, passes all requirements\n" << std::endl;
509 
510  return true;
511 }
#define LogDebug(id)
int hwPhi() const
Definition: L1Candidate.cc:79
int hwMip() const
Definition: Muon.cc:59
int hwIso() const
Definition: L1Candidate.cc:84
const bool checkRangePhi(const unsigned int bitNumber, const Type1 &beginR, const Type1 &endR, const Type1 &beginVetoR, const Type1 &endVetoR) const
check if a value is in a given range and outside of a veto range
const std::vector< ObjectParameter > * objectParameter() const
Definition: MuonTemplate.h:111
const int nrObjects() const
get number of trigger objects
Definition: GtCondition.cc:74
unsigned long long etaRange
Definition: MuonTemplate.h:67
virtual int charge() const
electric charge
const MuonTemplate * m_gtMuonTemplate
pointer to a MuonTemplate
Definition: MuCondition.h:115
int hwEta() const
Definition: L1Candidate.cc:74
int hwQual() const
Definition: L1Candidate.cc:89
const bool checkThreshold(const Type1 &threshold, const Type2 &value, bool condGEqValue) const
int hwPt() const
Definition: L1Candidate.cc:69
const bool condGEq() const
get / set condition GEq flag
Definition: GtCondition.h:100
const bool checkRangeEta(const unsigned int bitNumber, const Type1 &beginR, const Type1 &endR, const Type1 &beginVetoR, const Type1 &endVetoR) const
check if a value is in a given range and outside of a veto range
void MuCondition::copy ( const MuCondition cp)
private

copy function for copy constructor and operator=

Definition at line 64 of file MuCondition.cc.

References l1t::ConditionEvaluation::condLastResult(), l1t::ConditionEvaluation::condMaxNumberObjects(), l1t::ConditionEvaluation::getCombinationsInCond(), gtGTL(), gtIfMuEtaNumberBits(), gtMuonTemplate(), m_corrParDeltaPhiNrBins, and l1t::ConditionEvaluation::m_verbosity.

Referenced by MuCondition().

64  {
65 
66  m_gtMuonTemplate = cp.gtMuonTemplate();
67  m_gtGTL = cp.gtGTL();
68 
69  m_ifMuEtaNumberBits = cp.gtIfMuEtaNumberBits();
70  m_corrParDeltaPhiNrBins = cp.m_corrParDeltaPhiNrBins;
71 
72  m_condMaxNumberObjects = cp.condMaxNumberObjects();
73  m_condLastResult = cp.condLastResult();
74  m_combinationsInCond = cp.getCombinationsInCond();
75 
76  m_verbosity = cp.m_verbosity;
77 
78 }
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
Definition: MuCondition.h:121
unsigned int m_corrParDeltaPhiNrBins
Definition: MuCondition.h:124
const GtBoard * m_gtGTL
pointer to GTL, to be able to get the trigger objects
Definition: MuCondition.h:118
const MuonTemplate * m_gtMuonTemplate
pointer to a MuonTemplate
Definition: MuCondition.h:115
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
int m_verbosity
verbosity level
bool m_condLastResult
the last result of evaluateCondition()
const bool MuCondition::evaluateCondition ( const int  bxEval) const
virtual

the core function to check if the condition matches

Implements l1t::ConditionEvaluation.

Definition at line 132 of file MuCondition.cc.

References BXVector< T >::at(), MuonTemplate::CorrelationParameter::chargeCorrelation, MuonTemplate::CorrelationParameter::deltaEtaRangeLower, MuonTemplate::CorrelationParameter::deltaEtaRangeUpper, MuonTemplate::CorrelationParameter::deltaPhiRangeLower, MuonTemplate::CorrelationParameter::deltaPhiRangeUpper, BXVector< T >::getLastBX(), i, cmsHarvester::index, LogDebug, and BXVector< T >::size().

132  {
133 
134  // BLW Need to pass this as an argument
135  //const int bxEval=0; //BLW Change for BXVector
136 
137  // number of trigger objects in the condition
138  int nObjInCond = m_gtMuonTemplate->nrObjects();
139 
140  // the candidates
141  const BXVector<const l1t::Muon*>* candVec = m_gtGTL->getCandL1Mu(); //BLW Change for BXVector
142 
143  // Look at objects in bx = bx + relativeBx
144  int useBx = bxEval + m_gtMuonTemplate->condRelativeBx();
145 
146  // Fail condition if attempting to get Bx outside of range
147  if( ( useBx < candVec->getFirstBX() ) ||
148  ( useBx > candVec->getLastBX() ) ) {
149  return false;
150  }
151 
152  int numberObjects = candVec->size(useBx); //BLW Change for BXVector
153  //LogTrace("l1t|Global") << " numberObjects: " << numberObjects
154  // << std::endl;
155  if (numberObjects < nObjInCond) {
156  return false;
157  }
158 
159  std::vector<int> index(numberObjects);
160 
161  for (int i = 0; i < numberObjects; ++i) {
162  index[i] = i;
163  }
164 
165  int numberForFactorial = numberObjects - nObjInCond;
166 
167  // TEMPORARY FIX UNTIL IMPLEMENT NEW MUON CONDITIONS
168  int myfactorial = 1;
169  for( int i=numberForFactorial; i>0; i-- ) myfactorial *= i;
170 
171  int jumpIndex = 1;
172  int jump = myfactorial;//factorial(numberObjects - nObjInCond);
173 
174  int totalLoops = 0;
175  int passLoops = 0;
176 
177  // condition result condResult set to true if at least one permutation
178  // passes all requirements
179  // all possible permutations are checked
180  bool condResult = false;
181 
182  // store the indices of the muon objects
183  // from the combination evaluated in the condition
184  SingleCombInCond objectsInComb;
185  objectsInComb.reserve(nObjInCond);
186 
187  // clear the m_combinationsInCond vector
188  combinationsInCond().clear();
189 
190  do {
191 
192  if (--jumpIndex)
193  continue;
194 
195  jumpIndex = jump;
196  totalLoops++;
197 
198  // clear the indices in the combination
199  objectsInComb.clear();
200 
201  bool tmpResult = true;
202 
203  bool passCondition = false;
204  // check if there is a permutation that matches object-parameter requirements
205  for (int i = 0; i < nObjInCond; i++) {
206 
207  passCondition = checkObjectParameter(i, *(candVec->at(useBx,index[i]) )); //BLW Change for BXVector
208  tmpResult &= passCondition;
209  if( passCondition )
210  LogDebug("l1t|Global") << "===> MuCondition::evaluateCondition, CONGRATS!! This muon passed the condition." << std::endl;
211  else
212  LogDebug("l1t|Global") << "===> MuCondition::evaluateCondition, FAIL!! This muon failed the condition." << std::endl;
213  objectsInComb.push_back(index[i]);
214 
215  }
216 
217 
218  // if permutation does not match particle conditions
219  // skip charge correlation and spatial correlations
220  if ( !tmpResult) {
221 
222  continue;
223 
224  }
225 
226  // get the correlation parameters (chargeCorrelation included here also)
229 
230  // charge_correlation consists of 3 relevant bits (D2, D1, D0)
231  unsigned int chargeCorr = corrPar.chargeCorrelation;
232 
233  // charge ignore bit (D0) not set?
234  if ((chargeCorr & 1) == 0) {
235 
236  for (int i = 0; i < nObjInCond; i++) {
237  // check valid charge - skip if invalid charge
238  int chargeValid = (candVec->at(useBx,index[i]))->hwChargeValid(); //BLW Change for BXVector
239  tmpResult &= chargeValid;
240 
241  if ( chargeValid==0) { //BLW type change for New Muon Class
242  continue;
243  }
244  }
245 
246  if ( !tmpResult) {
247  continue;
248  }
249 
250 
251  if( nObjInCond > 1 ){ // more objects condition
252 
253  // find out if signs are equal
254  bool equalSigns = true;
255  for (int i = 0; i < nObjInCond-1; i++) {
256  if ((candVec->at(useBx,index[i]))->charge() != (candVec->at(useBx,index[i+1]))->charge()) { //BLW Change for BXVector
257  equalSigns = false;
258  break;
259  }
260  }
261 
262  // two or three particle condition
263  if (nObjInCond == 2 || nObjInCond == 3) {
264  if( !( ((chargeCorr & 2)!=0 && equalSigns) || ((chargeCorr & 4)!=0 && !equalSigns) ) ){
265  continue;
266  }
267  }
268  else if (nObjInCond == 4) {
269  //counter to count positive charges to determine if there are pairs
270  unsigned int posCount = 0;
271 
272  for (int i = 0; i < nObjInCond; i++) {
273  if ((candVec->at(useBx,index[i]))->charge()> 0) { //BLW Change for BXVector
274  posCount++;
275  }
276  }
277 
278  if( !( ((chargeCorr & 2)!=0 && equalSigns) || ((chargeCorr & 4)!=0 && posCount==2) ) ){
279  continue;
280  }
281  }
282  } // end require nObjInCond > 1
283  } // end signchecks
284 
285 
286  if (m_gtMuonTemplate->wsc()) {
287 
288  // wsc requirements have always nObjInCond = 2
289  // one can use directly index[0] and index[1] to compute
290  // eta and phi differences
291  const int ObjInWscComb = 2;
292  if (nObjInCond != ObjInWscComb) {
293 
294  edm::LogError("l1t|Global") << "\n Error: "
295  << "number of particles in condition with spatial correlation = " << nObjInCond
296  << "\n it must be = " << ObjInWscComb << std::endl;
297  // TODO Perhaps I should throw here an exception,
298  // since something is really wrong if nObjInCond != ObjInWscComb (=2)
299  continue;
300  }
301 
302  // check delta eta
303  if( !checkRangeDeltaEta( (candVec->at(useBx,0))->hwEta(), (candVec->at(useBx,1))->hwEta(), corrPar.deltaEtaRangeLower, corrPar.deltaEtaRangeUpper) ){
304  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRangeDeltaEta" << std::endl;
305  continue;
306  }
307 
308  // check delta phi
309  if( !checkRangeDeltaPhi( (candVec->at(useBx,0))->hwPhi(), (candVec->at(useBx,1))->hwPhi(),
310  corrPar.deltaPhiRangeLower, corrPar.deltaPhiRangeUpper) ){
311  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRangeDeltaPhi" << std::endl;
312  continue;
313  }
314 
315  } // end wsc check
316 
317  // if we get here all checks were successfull for this combination
318  // set the general result for evaluateCondition to "true"
319 
320  condResult = true;
321  passLoops++;
322  (combinationsInCond()).push_back(objectsInComb);
323 
324  } while (std::next_permutation(index.begin(), index.end()) );
325 
326  //LogTrace("l1t|Global")
327  // << "\n MuCondition: total number of permutations found: " << totalLoops
328  // << "\n MuCondition: number of permutations passing requirements: " << passLoops
329  // << "\n" << std::endl;
330 
331  return condResult;
332 
333 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
unsigned size(int bx) const
const bool checkRangeDeltaPhi(const unsigned int obj1Phi, const unsigned int obj2Phi, const Type1 &lowerR, const Type1 &upperR) const
check if a value is in a given range
const bool checkObjectParameter(const int iCondition, const l1t::Muon &cand) const
function to check a single object if it matches a condition
Definition: MuCondition.cc:350
std::vector< int > SingleCombInCond
typedefs
const int nrObjects() const
get number of trigger objects
Definition: GtCondition.cc:74
const int & condRelativeBx() const
get / set the condition relative bx
Definition: GtCondition.h:122
const GtBoard * m_gtGTL
pointer to GTL, to be able to get the trigger objects
Definition: MuCondition.h:118
const MuonTemplate * m_gtMuonTemplate
pointer to a MuonTemplate
Definition: MuCondition.h:115
const bool checkRangeDeltaEta(const unsigned int obj1Eta, const unsigned int obj2Eta, const Type1 &lowerR, const Type1 &upperR) const
check if a value is in a given range
const bool wsc() const
Definition: GtCondition.cc:131
const BXVector< const l1t::Muon * > * getCandL1Mu() const
return global muon trigger candidate
Definition: GtBoard.h:137
int getLastBX() const
const CorrelationParameter * correlationParameter() const
Definition: MuonTemplate.h:116
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
const T & at(int bx, unsigned i) const
const l1t::Muon * MuCondition::getCandidate ( const int  bx,
const int  indexCand 
) const
private

load muon candidates

Definition at line 336 of file MuCondition.cc.

References asciidump::at.

336  {
337 
338  return (m_gtGTL->getCandL1Mu())->at(bx,indexCand); //BLW Change for BXVector
339 }
const GtBoard * m_gtGTL
pointer to GTL, to be able to get the trigger objects
Definition: MuCondition.h:118
const BXVector< const l1t::Muon * > * getCandL1Mu() const
return global muon trigger candidate
Definition: GtBoard.h:137
list at
Definition: asciidump.py:428
const int l1t::MuCondition::gtCorrParDeltaPhiNrBins ( ) const
inline

get / set maximum number of bins for the delta phi scales

Definition at line 93 of file MuCondition.h.

References m_corrParDeltaPhiNrBins.

93  {
95  }
unsigned int m_corrParDeltaPhiNrBins
Definition: MuCondition.h:124
const GtBoard* l1t::MuCondition::gtGTL ( ) const
inline

get / set the pointer to GTL

Definition at line 77 of file MuCondition.h.

References m_gtGTL.

Referenced by copy().

77  {
78  return m_gtGTL;
79  }
const GtBoard * m_gtGTL
pointer to GTL, to be able to get the trigger objects
Definition: MuCondition.h:118
const int l1t::MuCondition::gtIfMuEtaNumberBits ( ) const
inline

get / set the number of bits for eta of muon objects

Definition at line 85 of file MuCondition.h.

References m_ifMuEtaNumberBits.

Referenced by copy().

85  {
86  return m_ifMuEtaNumberBits;
87  }
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
Definition: MuCondition.h:121
const MuonTemplate* l1t::MuCondition::gtMuonTemplate ( ) const
inline

get / set the pointer to a Condition

Definition at line 70 of file MuCondition.h.

References m_gtMuonTemplate.

Referenced by copy().

70  {
71  return m_gtMuonTemplate;
72  }
const MuonTemplate * m_gtMuonTemplate
pointer to a MuonTemplate
Definition: MuCondition.h:115
l1t::MuCondition & MuCondition::operator= ( const MuCondition cp)

Definition at line 93 of file MuCondition.cc.

References filterCSVwithJSON::copy.

94 {
95  copy(cp);
96  return *this;
97 }
void copy(const MuCondition &cp)
copy function for copy constructor and operator=
Definition: MuCondition.cc:64
void MuCondition::print ( std::ostream &  myCout) const
virtual

print condition

Reimplemented from l1t::ConditionEvaluation.

Definition at line 513 of file MuCondition.cc.

References l1t::ConditionEvaluation::print().

Referenced by l1t::GtBoard::runGTL().

513  {
514 
515  m_gtMuonTemplate->print(myCout);
516 
517  myCout << " Number of bits for eta of muon objects = "
518  << m_ifMuEtaNumberBits << std::endl;
519  myCout << " Maximum number of bins for the delta phi scales = "
520  << m_corrParDeltaPhiNrBins << "\n " << std::endl;
521 
523 
524 }
virtual void print(std::ostream &myCout) const
print the condition
Definition: MuonTemplate.cc:99
virtual void print(std::ostream &myCout) const
print condition
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
Definition: MuCondition.h:121
unsigned int m_corrParDeltaPhiNrBins
Definition: MuCondition.h:124
const MuonTemplate * m_gtMuonTemplate
pointer to a MuonTemplate
Definition: MuCondition.h:115
void MuCondition::setGtCorrParDeltaPhiNrBins ( const int &  corrParDeltaPhiNrBins)

Definition at line 123 of file MuCondition.cc.

124  {
125 
126  m_corrParDeltaPhiNrBins = corrParDeltaPhiNrBins;
127 
128 }
unsigned int m_corrParDeltaPhiNrBins
Definition: MuCondition.h:124
void MuCondition::setGtGTL ( const GtBoard ptrGTL)

set the pointer to GTL

Definition at line 107 of file MuCondition.cc.

107  {
108 
109  m_gtGTL = ptrGTL;
110 
111 }
const GtBoard * m_gtGTL
pointer to GTL, to be able to get the trigger objects
Definition: MuCondition.h:118
void MuCondition::setGtIfMuEtaNumberBits ( const int &  ifMuEtaNumberBitsValue)

Definition at line 115 of file MuCondition.cc.

116  {
117 
118  m_ifMuEtaNumberBits = ifMuEtaNumberBitsValue;
119 
120 }
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
Definition: MuCondition.h:121
void MuCondition::setGtMuonTemplate ( const MuonTemplate muonTempl)

Definition at line 100 of file MuCondition.cc.

100  {
101 
102  m_gtMuonTemplate = muonTempl;
103 
104 }
const MuonTemplate * m_gtMuonTemplate
pointer to a MuonTemplate
Definition: MuCondition.h:115

Member Data Documentation

unsigned int l1t::MuCondition::m_corrParDeltaPhiNrBins
private

Definition at line 124 of file MuCondition.h.

Referenced by copy(), gtCorrParDeltaPhiNrBins(), and MuCondition().

const GtBoard* l1t::MuCondition::m_gtGTL
private

pointer to GTL, to be able to get the trigger objects

Definition at line 118 of file MuCondition.h.

Referenced by gtGTL().

const MuonTemplate* l1t::MuCondition::m_gtMuonTemplate
private

pointer to a MuonTemplate

Definition at line 115 of file MuCondition.h.

Referenced by gtMuonTemplate().

int l1t::MuCondition::m_ifMuEtaNumberBits
private

number of bits for eta of muon objects

Definition at line 121 of file MuCondition.h.

Referenced by gtIfMuEtaNumberBits().