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
L1GtMuonCondition Class Reference

#include <L1GtMuonCondition.h>

Inheritance diagram for L1GtMuonCondition:
L1GtConditionEvaluation

Public Member Functions

const bool evaluateCondition () 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 L1GlobalTriggerGTLgtGTL () 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 L1GtMuonTemplategtMuonTemplate () const
 get / set the pointer to a L1GtCondition More...
 
 L1GtMuonCondition ()
 
 L1GtMuonCondition (const L1GtCondition *, const L1GlobalTriggerGTL *, const int nrL1Mu, const int ifMuEtaNumberBits)
 from base template condition (from event setup usually) More...
 
 L1GtMuonCondition (const L1GtMuonCondition &)
 
L1GtMuonConditionoperator= (const L1GtMuonCondition &)
 
void print (std::ostream &myCout) const
 print condition More...
 
void setGtCorrParDeltaPhiNrBins (const int &)
 
void setGtGTL (const L1GlobalTriggerGTL *)
 set the pointer to GTL More...
 
void setGtIfMuEtaNumberBits (const int &)
 
void setGtMuonTemplate (const L1GtMuonTemplate *)
 
virtual ~L1GtMuonCondition ()
 
- Public Member Functions inherited from L1GtConditionEvaluation
bool condLastResult () const
 get the latest result for the condition More...
 
int condMaxNumberObjects () const
 
void evaluateConditionStoreResult ()
 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...
 
 L1GtConditionEvaluation ()
 constructor More...
 
void setCondMaxNumberObjects (int condMaxNumberObjectsValue)
 
void setVerbosity (const int verbosity)
 
virtual ~L1GtConditionEvaluation ()
 destructor More...
 

Private Member Functions

const bool checkObjectParameter (const int iCondition, const L1MuGMTCand &cand) const
 function to check a single object if it matches a condition More...
 
void copy (const L1GtMuonCondition &cp)
 copy function for copy constructor and operator= More...
 
const L1MuGMTCandgetCandidate (const int indexCand) const
 load muon candidates More...
 

Private Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from L1GtConditionEvaluation
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 , class Type2 >
const bool checkThreshold (const Type1 &threshold, const Type2 &value, const bool condGEqValue) const
 
CombinationsInCondcombinationsInCond () const
 get all the object combinations (to fill it...) More...
 
- Protected Attributes inherited from L1GtConditionEvaluation
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

Description: evaluation of a CondMuon condition.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 35 of file L1GtMuonCondition.h.

Constructor & Destructor Documentation

L1GtMuonCondition::L1GtMuonCondition ( )

constructors default

Definition at line 43 of file L1GtMuonCondition.cc.

43  :
45 
46  // empty
47 
48 }
L1GtMuonCondition::L1GtMuonCondition ( const L1GtCondition muonTemplate,
const L1GlobalTriggerGTL ptrGTL,
const int  nrL1Mu,
const int  ifMuEtaNumberBits 
)

from base template condition (from event setup usually)

Definition at line 51 of file L1GtMuonCondition.cc.

References L1GtConditionEvaluation::m_condMaxNumberObjects, and m_corrParDeltaPhiNrBins.

53  :
55  m_gtMuonTemplate(static_cast<const L1GtMuonTemplate*>(muonTemplate)),
56  m_gtGTL(ptrGTL),
57  m_ifMuEtaNumberBits(ifMuEtaNumberBits)
58 {
60  m_condMaxNumberObjects = nrL1Mu;
61 }
unsigned int m_corrParDeltaPhiNrBins
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate
const L1GlobalTriggerGTL * m_gtGTL
pointer to GTL, to be able to get the trigger objects
L1GtMuonCondition::L1GtMuonCondition ( const L1GtMuonCondition cp)

Definition at line 80 of file L1GtMuonCondition.cc.

References copy().

80  :
82  copy(cp);
83 }
void copy(const L1GtMuonCondition &cp)
copy function for copy constructor and operator=
L1GtMuonCondition::~L1GtMuonCondition ( )
virtual

Definition at line 86 of file L1GtMuonCondition.cc.

86  {
87 
88  // empty
89 
90 }

Member Function Documentation

const bool L1GtMuonCondition::checkObjectParameter ( const int  iCondition,
const L1MuGMTCand 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 412 of file L1GtMuonCondition.cc.

References L1GtConditionEvaluation::checkBit(), L1GtConditionEvaluation::checkThreshold(), L1GtCondition::condGEq(), L1MuGMTCand::empty(), L1GtMuonTemplate::ObjectParameter::enableIso, L1GtMuonTemplate::ObjectParameter::enableMip, L1MuGMTCand::etaIndex(), L1GtMuonTemplate::ObjectParameter::etaRange, L1MuGMTCand::isol(), m_gtMuonTemplate, L1MuGMTCand::mip(), L1GtCondition::nrObjects(), L1GtMuonTemplate::objectParameter(), L1GtMuonTemplate::ObjectParameter::phiHigh, L1MuGMTCand::phiIndex(), L1GtMuonTemplate::ObjectParameter::phiLow, L1GtMuonTemplate::ObjectParameter::ptHighThreshold, L1MuGMTCand::ptIndex(), L1GtMuonTemplate::ObjectParameter::ptLowThreshold, L1MuGMTCand::quality(), L1GtMuonTemplate::ObjectParameter::qualityRange, and L1GtMuonTemplate::ObjectParameter::requestIso.

Referenced by evaluateCondition().

412  {
413 
414  // number of objects in condition
415  int nObjInCond = m_gtMuonTemplate->nrObjects();
416 
417  if (iCondition >= nObjInCond || iCondition < 0) {
418  return false;
419  }
420 
421  // empty candidates can not be compared
422  if (cand.empty()) {
423  return false;
424  }
425 
426  const L1GtMuonTemplate::ObjectParameter objPar =
427  ( *(m_gtMuonTemplate->objectParameter()) )[iCondition];
428 
429  // using the logic table from GTL-9U-module.pdf
430  // "Truth table for Isolation bit"
431 
432  // check thresholds:
433 
434  // value < low pt threshold
435  // fail trigger
436 
437  // low pt threshold <= value < high pt threshold & non-isolated muon:
438  // requestIso true: fail trigger
439  // requestIso false, enableIso true: fail trigger
440  // requestIso false, enableIso false: OK, trigger
441 
442  // low pt threshold <= value < high pt threshold & isolated muon:
443  // requestIso true: OK, trigger
444  // requestIso false, enableIso true: OK, trigger
445  // requestIso false, enableIso false: OK, trigger
446 
447  // value >= high pt threshold & non-isolated muon:
448  // requestIso true: fail trigger
449  // requestIso false: OK, trigger
450 
451  // value >= high pt threshold & isolated muon:
452  // OK, trigger
453 
454 
455  if ( !checkThreshold(objPar.ptHighThreshold, cand.ptIndex(), m_gtMuonTemplate->condGEq()) ) {
456 
457  if ( !checkThreshold(objPar.ptLowThreshold, cand.ptIndex(), m_gtMuonTemplate->condGEq()) ) {
458 
459  return false;
460  }
461  else {
462 
463  // check isolation
464  if ( !cand.isol() ) {
465  if (objPar.requestIso || objPar.enableIso) {
466 
467  return false;
468  }
469  }
470 
471  }
472 
473  }
474  else {
475 
476  if ( !cand.isol() ) {
477  if (objPar.requestIso) {
478 
479  return false;
480  }
481  }
482 
483  }
484 
485  // check eta
486 
487  if (!checkBit(objPar.etaRange, cand.etaIndex())) {
488  return false;
489  }
490 
491  // check phi - in the requested range (no LUT used - LUT too big for hw chip)
492  // for phiLow <= phiHigh takes [phiLow, phiHigh]
493  // for phiLow >= phiHigh takes [phiLow, phiHigh] over zero angle!
494 
495  if (objPar.phiHigh >= objPar.phiLow) {
496 
497  if (! ( (objPar.phiLow <= cand.phiIndex()) && (cand.phiIndex() <= objPar.phiHigh ) )) {
498 
499  return false;
500  }
501 
502  }
503  else { // go over zero angle!!
504  if (! ( (objPar.phiLow <= cand.phiIndex()) || (cand.phiIndex() <= objPar.phiHigh ) )) {
505 
506  return false;
507  }
508  }
509 
510  // check quality ( bit check )
511 
512  // A number of values is required to trigger (at least one).
513  // "Don’t care" means that all values are allowed.
514  // Qual = 000 means then NO MUON (GTL module)
515 
516  if (cand.quality() == 0) {
517  return false;
518  }
519 
520  if (objPar.qualityRange == 0) {
521  return false;
522  }
523  else {
524  if (!checkBit(objPar.qualityRange, cand.quality())) {
525  return false;
526  }
527  }
528 
529  // check mip
530  if (objPar.enableMip) {
531  if (!cand.mip()) {
532 
533  return false;
534  }
535  }
536 
537  // particle matches if we get here
538  //LogTrace("L1GlobalTrigger")
539  // << " checkObjectParameter: muon object OK, passes all requirements\n" << std::endl;
540 
541  return true;
542 }
const int nrObjects() const
get number of trigger objects
const bool checkBit(const Type1 &mask, const unsigned int bitNumber) const
check if a bit with a given number is set in a mask
unsigned int phiIndex() const
get phi-code
Definition: L1MuGMTCand.h:73
unsigned int etaIndex() const
get eta-code
Definition: L1MuGMTCand.h:108
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate
bool isol() const
get isolation
Definition: L1MuGMTCand.h:114
bool empty() const
is it an empty muon candidate?
Definition: L1MuGMTCand.h:64
const bool checkThreshold(const Type1 &threshold, const Type2 &value, const bool condGEqValue) const
const std::vector< ObjectParameter > * objectParameter() const
bool mip() const
get mip
Definition: L1MuGMTCand.h:117
unsigned int quality() const
get quality
Definition: L1MuGMTCand.h:93
const bool condGEq() const
get / set condition GEq flag
Definition: L1GtCondition.h:99
unsigned int ptIndex() const
get pt-code
Definition: L1MuGMTCand.h:76
void L1GtMuonCondition::copy ( const L1GtMuonCondition cp)
private

copy function for copy constructor and operator=

Definition at line 64 of file L1GtMuonCondition.cc.

References L1GtConditionEvaluation::condLastResult(), L1GtConditionEvaluation::condMaxNumberObjects(), L1GtConditionEvaluation::getCombinationsInCond(), gtGTL(), gtIfMuEtaNumberBits(), gtMuonTemplate(), L1GtConditionEvaluation::m_combinationsInCond, L1GtConditionEvaluation::m_condLastResult, L1GtConditionEvaluation::m_condMaxNumberObjects, m_corrParDeltaPhiNrBins, m_gtGTL, m_gtMuonTemplate, m_ifMuEtaNumberBits, and L1GtConditionEvaluation::m_verbosity.

Referenced by L1GtMuonCondition(), and operator=().

64  {
65 
67  m_gtGTL = cp.gtGTL();
68 
71 
75 
77 
78 }
bool m_condLastResult
the last result of evaluateCondition()
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
unsigned int m_corrParDeltaPhiNrBins
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate
const int gtIfMuEtaNumberBits() const
get / set the number of bits for eta of muon objects
const L1GlobalTriggerGTL * gtGTL() const
get / set the pointer to GTL
const L1GlobalTriggerGTL * m_gtGTL
pointer to GTL, to be able to get the trigger objects
const L1GtMuonTemplate * gtMuonTemplate() const
get / set the pointer to a L1GtCondition
CombinationsInCond const & getCombinationsInCond() const
get all the object combinations evaluated to true in the condition
bool condLastResult() const
get the latest result for the condition
const bool L1GtMuonCondition::evaluateCondition ( ) const
virtual

the core function to check if the condition matches

Implements L1GtConditionEvaluation.

Definition at line 132 of file L1GtMuonCondition.cc.

References funct::abs(), DeDxDiscriminatorTools::charge(), L1GtMuonTemplate::CorrelationParameter::chargeCorrelation, L1GtConditionEvaluation::checkBit(), checkObjectParameter(), hitfit::clear(), L1GtConditionEvaluation::combinationsInCond(), L1GtMuonTemplate::correlationParameter(), L1GtMuonTemplate::CorrelationParameter::deltaEtaRange, L1GtMuonTemplate::CorrelationParameter::deltaPhiRange0Word, L1GtMuonTemplate::CorrelationParameter::deltaPhiRange1Word, factorial(), L1GlobalTriggerGTL::getCandL1Mu(), i, getHLTprescales::index, LogTrace, m_corrParDeltaPhiNrBins, m_gtGTL, m_gtMuonTemplate, m_ifMuEtaNumberBits, L1GtConditionEvaluation::m_verbosity, L1GtCondition::nrObjects(), and L1GtCondition::wsc().

132  {
133 
134  // number of trigger objects in the condition
135  int nObjInCond = m_gtMuonTemplate->nrObjects();
136 
137  // the candidates
138  const std::vector<const L1MuGMTCand*>* candVec = m_gtGTL->getCandL1Mu();
139 
140  int numberObjects = candVec->size();
141  //LogTrace("L1GlobalTrigger") << " numberObjects: " << numberObjects
142  // << std::endl;
143  if (numberObjects < nObjInCond) {
144  return false;
145  }
146 
147  std::vector<int> index(numberObjects);
148 
149  for (int i = 0; i < numberObjects; ++i) {
150  index[i] = i;
151  }
152 
153  int jumpIndex = 1;
154  int jump = factorial(numberObjects - nObjInCond);
155 
156  int totalLoops = 0;
157  int passLoops = 0;
158 
159  // condition result condResult set to true if at least one permutation
160  // passes all requirements
161  // all possible permutations are checked
162  bool condResult = false;
163 
164  // store the indices of the muon objects
165  // from the combination evaluated in the condition
166  SingleCombInCond objectsInComb;
167  objectsInComb.reserve(nObjInCond);
168 
169  // clear the m_combinationsInCond vector
171 
172  do {
173 
174  if (--jumpIndex)
175  continue;
176 
177  jumpIndex = jump;
178  totalLoops++;
179 
180  // clear the indices in the combination
181  objectsInComb.clear();
182 
183  bool tmpResult = true;
184 
185  // check if there is a permutation that matches object-parameter requirements
186  for (int i = 0; i < nObjInCond; i++) {
187 
188  tmpResult &= checkObjectParameter(i, *(*candVec)[index[i]]);
189  objectsInComb.push_back(index[i]);
190 
191  }
192 
193  // if permutation does not match particle conditions
194  // skip charge correlation and spatial correlations
195  if ( !tmpResult) {
196 
197  continue;
198 
199  }
200 
201  // get the correlation parameters (chargeCorrelation included here also)
204 
205  // charge_correlation consists of 3 relevant bits (D2, D1, D0)
206  unsigned int chargeCorr = corrPar.chargeCorrelation;
207 
208  // charge ignore bit (D0) not set?
209  if ((chargeCorr & 1) == 0) {
210 
211  for (int i = 0; i < nObjInCond; i++) {
212  // check valid charge - skip if invalid charge
213  bool chargeValid = (*candVec)[index[i]]->charge_valid();
214  tmpResult &= chargeValid;
215 
216  if ( !chargeValid) {
217  continue;
218  }
219  }
220 
221  if ( !tmpResult) {
222  continue;
223  }
224 
225  if (nObjInCond == 1) { // one object condition
226 
227  // D2..enable pos, D1..enable neg
228  if ( ! ( ( (chargeCorr & 4) != 0 && (*candVec)[index[0]]->charge()> 0 )
229  || ( (chargeCorr & 2) != 0 && (*candVec)[index[0]]->charge() < 0 ) )) {
230 
231  continue;
232  }
233 
234  }
235  else { // more objects condition
236 
237  // find out if signs are equal
238  bool equalSigns = true;
239  for (int i = 0; i < nObjInCond-1; i++) {
240  if ((*candVec)[index[i]]->charge() != (*candVec)[index[i+1]]->charge()) {
241  equalSigns = false;
242  break;
243  }
244  }
245 
246  // two or three particle condition
247  if (nObjInCond == 2 || nObjInCond == 3) {
248  // D2..enable equal, D1..enable not equal
249  if ( ! ( ( (chargeCorr & 4) != 0 && equalSigns ) || ( (chargeCorr & 2) != 0
250  && !equalSigns ) )) {
251 
252  continue;
253  }
254  }
255 
256  // four particle condition
257  if (nObjInCond == 4) {
258  //counter to count positive charges to determine if there are pairs
259  unsigned int posCount = 0;
260 
261  for (int i = 0; i < nObjInCond; i++) {
262  if ((*candVec)[index[i]]->charge()> 0) {
263  posCount++;
264  }
265  }
266 
267  // D2..enable equal, D1..enable pairs
268  if ( ! ( ( (chargeCorr & 4) != 0 && equalSigns ) || ( (chargeCorr & 2) != 0
269  && posCount == 2 ) )) {
270 
271  continue;
272  }
273  }
274  }
275  } // end signchecks
276 
277 
278  if (m_gtMuonTemplate->wsc()) {
279 
280  // wsc requirements have always nObjInCond = 2
281  // one can use directly index[0] and index[1] to compute
282  // eta and phi differences
283  const int ObjInWscComb = 2;
284  if (nObjInCond != ObjInWscComb) {
285 
286  edm::LogError("L1GlobalTrigger") << "\n Error: "
287  << "number of particles in condition with spatial correlation = " << nObjInCond
288  << "\n it must be = " << ObjInWscComb << std::endl;
289  // TODO Perhaps I should throw here an exception,
290  // since something is really wrong if nObjInCond != ObjInWscComb (=2)
291  continue;
292  }
293 
294  unsigned int candDeltaEta;
295  unsigned int candDeltaPhi;
296 
297  // check candDeltaEta
298 
299  // get eta index and the sign bit of the eta index (MSB is the sign)
300  // signedEta[i] is the signed eta index of (*candVec)[index[i]]
301  int signedEta[ObjInWscComb];
302  int signBit[ObjInWscComb] = { 0, 0 };
303 
304  int scaleEta = 1 << (m_ifMuEtaNumberBits - 1);
305 
306  for (int i = 0; i < ObjInWscComb; ++i) {
307  signBit[i] = ((*candVec)[index[i]]->etaIndex() & scaleEta)>>(m_ifMuEtaNumberBits - 1);
308  signedEta[i] = ((*candVec)[index[i]]->etaIndex() )%scaleEta;
309 
310  if (signBit[i] == 1) {
311  signedEta[i] = (-1)*signedEta[i];
312  }
313 
314  }
315 
316  // compute candDeltaEta - add 1 if signs are different (due to +0/-0 indices)
317  candDeltaEta = static_cast<int> (std::abs(signedEta[1] - signedEta[0]))
318  + static_cast<int> (signBit[1]^signBit[0]);
319 
320  if ( !checkBit(corrPar.deltaEtaRange, candDeltaEta) ) {
321  continue;
322  }
323 
324  // check candDeltaPhi
325 
326  // calculate absolute value of candDeltaPhi
327  if ((*candVec)[index[0]]->phiIndex()> (*candVec)[index[1]]->phiIndex()) {
328  candDeltaPhi = (*candVec)[index[0]]->phiIndex() - (*candVec)[index[1]]->phiIndex();
329  }
330  else {
331  candDeltaPhi = (*candVec)[index[1]]->phiIndex() - (*candVec)[index[0]]->phiIndex();
332  }
333 
334  // check if candDeltaPhi > 180 (via delta_phi_maxbits)
335  // delta_phi contains bits for 0..180 (0 and 180 included)
336  // protect also against infinite loop...
337 
338  int nMaxLoop = 10;
339  int iLoop = 0;
340 
341  while (candDeltaPhi >= m_corrParDeltaPhiNrBins) {
342 
343  unsigned int candDeltaPhiInitial = candDeltaPhi;
344 
345  // candDeltaPhi > 180 ==> take 360 - candDeltaPhi
346  candDeltaPhi = (m_corrParDeltaPhiNrBins - 1) * 2 - candDeltaPhi;
347  if (m_verbosity) {
348  LogTrace("L1GlobalTrigger")
349  << " Initial candDeltaPhi = "
350  << candDeltaPhiInitial
351  << " > m_corrParDeltaPhiNrBins = "
353  << " ==> candDeltaPhi rescaled to: "
354  << candDeltaPhi << " [ loop index " << iLoop
355  << "; breaks after " << nMaxLoop << " loops ]\n"
356  << std::endl;
357  }
358 
359  iLoop++;
360  if (iLoop > nMaxLoop) {
361  return false;
362  }
363  }
364 
365  // delta_phi bitmask is saved in two boost::uint64_t words
366  if (candDeltaPhi < 64) {
367  if (!checkBit(corrPar.deltaPhiRange0Word, candDeltaPhi) ) {
368  continue;
369  }
370  }
371  else {
372  if (!checkBit(corrPar.deltaPhiRange1Word, (candDeltaPhi - 64))) {
373  continue;
374  }
375  }
376 
377  } // end wsc check
378 
379  // if we get here all checks were successfull for this combination
380  // set the general result for evaluateCondition to "true"
381 
382  condResult = true;
383  passLoops++;
384  (combinationsInCond()).push_back(objectsInComb);
385 
386  } while (std::next_permutation(index.begin(), index.end()) );
387 
388  //LogTrace("L1GlobalTrigger")
389  // << "\n L1GtMuonCondition: total number of permutations found: " << totalLoops
390  // << "\n L1GtMuonCondition: number of permutations passing requirements: " << passLoops
391  // << "\n" << std::endl;
392 
393  return condResult;
394 
395 }
int i
Definition: DBlmapReader.cc:9
const int nrObjects() const
get number of trigger objects
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
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
unsigned int m_corrParDeltaPhiNrBins
std::vector< int > SingleCombInCond
typedefs
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate
double charge(const std::vector< uint8_t > &Ampls)
const bool wsc() const
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const bool checkObjectParameter(const int iCondition, const L1MuGMTCand &cand) const
function to check a single object if it matches a condition
#define LogTrace(id)
const L1GlobalTriggerGTL * m_gtGTL
pointer to GTL, to be able to get the trigger objects
int factorial(int n)
factorial function
const std::vector< const L1MuGMTCand * > * getCandL1Mu() const
return global muon trigger candidate
const L1MuGMTCand * L1GtMuonCondition::getCandidate ( const int  indexCand) const
private

load muon candidates

Definition at line 398 of file L1GtMuonCondition.cc.

References L1GlobalTriggerGTL::getCandL1Mu(), and m_gtGTL.

398  {
399 
400  return (*(m_gtGTL->getCandL1Mu()))[indexCand];
401 }
const L1GlobalTriggerGTL * m_gtGTL
pointer to GTL, to be able to get the trigger objects
const std::vector< const L1MuGMTCand * > * getCandL1Mu() const
return global muon trigger candidate
const int L1GtMuonCondition::gtCorrParDeltaPhiNrBins ( ) const
inline

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

Definition at line 92 of file L1GtMuonCondition.h.

References m_corrParDeltaPhiNrBins.

92  {
94  }
unsigned int m_corrParDeltaPhiNrBins
const L1GlobalTriggerGTL* L1GtMuonCondition::gtGTL ( ) const
inline

get / set the pointer to GTL

Definition at line 76 of file L1GtMuonCondition.h.

References m_gtGTL.

Referenced by copy().

76  {
77  return m_gtGTL;
78  }
const L1GlobalTriggerGTL * m_gtGTL
pointer to GTL, to be able to get the trigger objects
const int L1GtMuonCondition::gtIfMuEtaNumberBits ( ) const
inline

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

Definition at line 84 of file L1GtMuonCondition.h.

References m_ifMuEtaNumberBits.

Referenced by copy().

84  {
85  return m_ifMuEtaNumberBits;
86  }
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
const L1GtMuonTemplate* L1GtMuonCondition::gtMuonTemplate ( ) const
inline

get / set the pointer to a L1GtCondition

Definition at line 69 of file L1GtMuonCondition.h.

References m_gtMuonTemplate.

Referenced by copy().

69  {
70  return m_gtMuonTemplate;
71  }
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate
L1GtMuonCondition & L1GtMuonCondition::operator= ( const L1GtMuonCondition cp)

Definition at line 93 of file L1GtMuonCondition.cc.

References copy().

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

print condition

Reimplemented from L1GtConditionEvaluation.

Definition at line 544 of file L1GtMuonCondition.cc.

References m_corrParDeltaPhiNrBins, m_gtMuonTemplate, m_ifMuEtaNumberBits, L1GtConditionEvaluation::print(), and L1GtMuonTemplate::print().

Referenced by L1GtCorrelationCondition::evaluateCondition(), and L1GlobalTriggerGTL::run().

544  {
545 
546  m_gtMuonTemplate->print(myCout);
547 
548  myCout << " Number of bits for eta of muon objects = "
549  << m_ifMuEtaNumberBits << std::endl;
550  myCout << " Maximum number of bins for the delta phi scales = "
551  << m_corrParDeltaPhiNrBins << "\n " << std::endl;
552 
554 
555 }
unsigned int m_corrParDeltaPhiNrBins
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate
virtual void print(std::ostream &myCout) const
print the condition
virtual void print(std::ostream &myCout) const
print condition
void L1GtMuonCondition::setGtCorrParDeltaPhiNrBins ( const int &  corrParDeltaPhiNrBins)

Definition at line 123 of file L1GtMuonCondition.cc.

References m_corrParDeltaPhiNrBins.

Referenced by L1GlobalTriggerGTL::run().

124  {
125 
126  m_corrParDeltaPhiNrBins = corrParDeltaPhiNrBins;
127 
128 }
unsigned int m_corrParDeltaPhiNrBins
void L1GtMuonCondition::setGtGTL ( const L1GlobalTriggerGTL ptrGTL)

set the pointer to GTL

Definition at line 107 of file L1GtMuonCondition.cc.

References m_gtGTL.

107  {
108 
109  m_gtGTL = ptrGTL;
110 
111 }
const L1GlobalTriggerGTL * m_gtGTL
pointer to GTL, to be able to get the trigger objects
void L1GtMuonCondition::setGtIfMuEtaNumberBits ( const int &  ifMuEtaNumberBitsValue)

Definition at line 115 of file L1GtMuonCondition.cc.

References m_ifMuEtaNumberBits.

116  {
117 
118  m_ifMuEtaNumberBits = ifMuEtaNumberBitsValue;
119 
120 }
int m_ifMuEtaNumberBits
number of bits for eta of muon objects
void L1GtMuonCondition::setGtMuonTemplate ( const L1GtMuonTemplate muonTempl)

Definition at line 100 of file L1GtMuonCondition.cc.

References m_gtMuonTemplate.

100  {
101 
102  m_gtMuonTemplate = muonTempl;
103 
104 }
const L1GtMuonTemplate * m_gtMuonTemplate
pointer to a L1GtMuonTemplate

Member Data Documentation

unsigned int L1GtMuonCondition::m_corrParDeltaPhiNrBins
private
const L1GlobalTriggerGTL* L1GtMuonCondition::m_gtGTL
private

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

Definition at line 117 of file L1GtMuonCondition.h.

Referenced by copy(), evaluateCondition(), getCandidate(), gtGTL(), and setGtGTL().

const L1GtMuonTemplate* L1GtMuonCondition::m_gtMuonTemplate
private
int L1GtMuonCondition::m_ifMuEtaNumberBits
private

number of bits for eta of muon objects

Definition at line 120 of file L1GtMuonCondition.h.

Referenced by copy(), evaluateCondition(), gtIfMuEtaNumberBits(), print(), and setGtIfMuEtaNumberBits().