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::CaloCondition Class Reference

#include <CaloCondition.h>

Inheritance diagram for l1t::CaloCondition:
l1t::ConditionEvaluation

Public Member Functions

 CaloCondition ()
 
 CaloCondition (const GtCondition *, const GtBoard *, const int nrL1EG, const int nrL1Jet, const int nrL1Tau, const int ifCaloEtaNumberBits)
 from base template condition (from event setup usually) More...
 
 CaloCondition (const CaloCondition &)
 
const bool evaluateCondition (const int bxEval) const
 the core function to check if the condition matches More...
 
const GtBoardgetuGtB () const
 get / set the pointer to uGt GtBoard More...
 
const CaloTemplategtCaloTemplate () const
 get / set the pointer to a Condition More...
 
const int gtCorrParDeltaPhiNrBins () const
 get / set maximum number of bins for the delta phi scales More...
 
const int gtIfCaloEtaNumberBits () const
 get / set the number of bits for eta of calorimeter objects More...
 
CaloConditionoperator= (const CaloCondition &)
 
void print (std::ostream &myCout) const
 print condition More...
 
void setGtCaloTemplate (const CaloTemplate *)
 
void setGtCorrParDeltaPhiNrBins (const int &)
 
void setGtIfCaloEtaNumberBits (const int &)
 
void setuGtB (const GtBoard *)
 set the pointer to uGT GtBoard More...
 
virtual ~CaloCondition ()
 
- 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::L1Candidate &cand) const
 function to check a single object if it matches a condition More...
 
void copy (const CaloCondition &cp)
 copy function for copy constructor and operator= More...
 
const l1t::L1CandidategetCandidate (const int bx, const int indexCand) const
 load calo candidates More...
 

Private Attributes

unsigned int m_corrParDeltaPhiNrBins
 
const CaloTemplatem_gtCaloTemplate
 pointer to a CaloTemplate More...
 
int m_ifCaloEtaNumberBits
 number of bits for eta of calorimeter objects More...
 
const GtBoardm_uGtB
 pointer to uGt GtBoard, to be able to get the trigger 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 37 of file CaloCondition.h.

Constructor & Destructor Documentation

CaloCondition::CaloCondition ( )

constructors default

Definition at line 48 of file CaloCondition.cc.

References m_corrParDeltaPhiNrBins, and m_ifCaloEtaNumberBits.

48  :
50 
53 
54 }
unsigned int m_corrParDeltaPhiNrBins
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
CaloCondition::CaloCondition ( const GtCondition caloTemplate,
const GtBoard ptrGTB,
const int  nrL1EG,
const int  nrL1Jet,
const int  nrL1Tau,
const int  ifCaloEtaNumberBits 
)

from base template condition (from event setup usually)

Definition at line 57 of file CaloCondition.cc.

References CenJet, l1t::ConditionEvaluation::m_condMaxNumberObjects, m_corrParDeltaPhiNrBins, m_gtCaloTemplate, NoIsoEG, GtCondition::objectType(), and TauJet.

61  :
63  m_gtCaloTemplate(static_cast<const CaloTemplate*>(caloTemplate)),
64  m_uGtB(ptrGTB),
65  m_ifCaloEtaNumberBits(ifCaloEtaNumberBits)
66 {
67 
69 
70  // maximum number of objects received for the evaluation of the condition
71  // retrieved before from event setup
72  // for a CondCalo, all objects ar of same type, hence it is enough to get the
73  // type for the first object
74 
75  switch ((m_gtCaloTemplate->objectType())[0]) {
76  case NoIsoEG:
77  m_condMaxNumberObjects = nrL1EG;
78  break;
79 /* case IsoEG:
80  m_condMaxNumberObjects = nrL1IsoEG;
81  break;
82 */
83  case CenJet:
84  m_condMaxNumberObjects = nrL1Jet;
85  break;
86 /* case ForJet:
87  m_condMaxNumberObjects = nrL1ForJet;
88  break;
89 */
90  case TauJet:
91  m_condMaxNumberObjects = nrL1Tau;
92  break;
93  default:
95  break;
96  }
97 
98 }
const GtBoard * m_uGtB
pointer to uGt GtBoard, to be able to get the trigger objects
unsigned int m_corrParDeltaPhiNrBins
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: GtCondition.h:89
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
CaloCondition::CaloCondition ( const CaloCondition cp)

Definition at line 117 of file CaloCondition.cc.

References copy().

117  :
119 
120  copy(cp);
121 
122 }
void copy(const CaloCondition &cp)
copy function for copy constructor and operator=
CaloCondition::~CaloCondition ( )
virtual

Definition at line 125 of file CaloCondition.cc.

125  {
126 
127  // empty
128 
129 }

Member Function Documentation

const bool CaloCondition::checkObjectParameter ( const int  iCondition,
const l1t::L1Candidate 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 509 of file CaloCondition.cc.

References CaloTemplate::ObjectParameter::etaRange, CaloTemplate::ObjectParameter::etaWindowLower, CaloTemplate::ObjectParameter::etaWindowUpper, CaloTemplate::ObjectParameter::etaWindowVetoLower, CaloTemplate::ObjectParameter::etThreshold, l1t::L1Candidate::hwEta(), l1t::L1Candidate::hwPhi(), l1t::L1Candidate::hwPt(), LogDebug, CaloTemplate::ObjectParameter::phiRange, CaloTemplate::ObjectParameter::phiWindowLower, CaloTemplate::ObjectParameter::phiWindowUpper, and CaloTemplate::ObjectParameter::phiWindowVetoLower.

509  {
510 
511  // number of objects in condition
512  int nObjInCond = m_gtCaloTemplate->nrObjects();
513 
514  if (iCondition >= nObjInCond || iCondition < 0) {
515  return false;
516  }
517 
518  // empty candidates can not be compared
519 // if (cand.empty()) {
520 // return false;
521 // }
522 
523  const CaloTemplate::ObjectParameter objPar = ( *(m_gtCaloTemplate->objectParameter()) )[iCondition];
524 
525  LogDebug("l1t|Global")
526  << "\n CaloTemplate: "
527  << "\n\t condRelativeBx = " << m_gtCaloTemplate->condRelativeBx()
528  << "\n ObjectParameter : "
529  << "\n\t etThreshold = " << objPar.etThreshold
530  << "\n\t etaRange = " << objPar.etaRange
531  << "\n\t phiRange = " << objPar.phiRange
532  << std::endl;
533 
534  LogDebug("l1t|Global")
535  << "\n l1t::Candidate : "
536  << "\n\t hwPt = " << cand.hwPt()
537  << "\n\t hwEta = " << cand.hwEta()
538  << "\n\t hwPhi = " << cand.hwPhi()
539  << std::endl;
540 
541 
542  // check energy threshold
543  if ( !checkThreshold(objPar.etThreshold, cand.hwPt(), m_gtCaloTemplate->condGEq()) ) {
544  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkThreshold" << std::endl;
545  return false;
546  }
547 
548  // check eta
549  if( !checkRangeEta(cand.hwEta(), objPar.etaWindowLower, objPar.etaWindowUpper, objPar.etaWindowVetoLower, objPar.etaWindowVetoLower) ){
550  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(eta)" << std::endl;
551  return false;
552  }
553 
554 // if (!checkBit(objPar.etaRange, cand.hwEta())) {
555 // return false;
556 // }
557 
558  // check phi
559  if( !checkRangePhi(cand.hwPhi(), objPar.phiWindowLower, objPar.phiWindowUpper, objPar.phiWindowVetoLower, objPar.phiWindowVetoLower) ){
560  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(phi)" << std::endl;
561  return false;
562  }
563 
564 // if (!checkBit(objPar.phiRange, cand.hwPhi())) {
565 // return false;
566 // }
567 
568  // particle matches if we get here
569  //LogTrace("l1t|Global")
570  // << " checkObjectParameter: calorimeter object OK, passes all requirements\n"
571  // << std::endl;
572 
573  return true;
574 }
#define LogDebug(id)
const std::vector< ObjectParameter > * objectParameter() const
Definition: CaloTemplate.h:95
int hwPhi() const
Definition: L1Candidate.cc:79
typedef for a single object template
Definition: CaloTemplate.h:58
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 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
int hwEta() const
Definition: L1Candidate.cc:74
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
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
void CaloCondition::copy ( const CaloCondition cp)
private

copy function for copy constructor and operator=

Definition at line 101 of file CaloCondition.cc.

References l1t::ConditionEvaluation::condLastResult(), l1t::ConditionEvaluation::condMaxNumberObjects(), l1t::ConditionEvaluation::getCombinationsInCond(), getuGtB(), gtCaloTemplate(), gtIfCaloEtaNumberBits(), m_corrParDeltaPhiNrBins, and l1t::ConditionEvaluation::m_verbosity.

Referenced by CaloCondition().

101  {
102 
103  m_gtCaloTemplate = cp.gtCaloTemplate();
104  m_uGtB = cp.getuGtB();
105 
106  m_ifCaloEtaNumberBits = cp.gtIfCaloEtaNumberBits();
107  m_corrParDeltaPhiNrBins = cp.m_corrParDeltaPhiNrBins;
108 
109  m_condMaxNumberObjects = cp.condMaxNumberObjects();
110  m_condLastResult = cp.condLastResult();
111  m_combinationsInCond = cp.getCombinationsInCond();
112 
113  m_verbosity = cp.m_verbosity;
114 
115 }
const GtBoard * m_uGtB
pointer to uGt GtBoard, to be able to get the trigger objects
unsigned int m_corrParDeltaPhiNrBins
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()
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
const bool CaloCondition::evaluateCondition ( const int  bxEval) const
virtual

the core function to check if the condition matches

Implements l1t::ConditionEvaluation.

Definition at line 167 of file CaloCondition.cc.

References BXVector< T >::at(), CenJet, CaloTemplate::CorrelationParameter::deltaEtaRangeLower, CaloTemplate::CorrelationParameter::deltaEtaRangeUpper, CaloTemplate::CorrelationParameter::deltaPhiRangeLower, CaloTemplate::CorrelationParameter::deltaPhiRangeUpper, BXVector< T >::getLastBX(), i, cmsHarvester::index, j, gen::k, LogDebug, LogTrace, m, NoIsoEG, BXVector< T >::size(), and TauJet.

167  {
168 
169  // number of trigger objects in the condition
170  int nObjInCond = m_gtCaloTemplate->nrObjects();
171  //LogTrace("l1t|Global") << " nObjInCond: " << nObjInCond
172  // << std::endl;
173 
174  // the candidates
175 
176  // objectType() gives the type for nrObjects() only,
177  // but in a CondCalo all objects have the same type
178  // take type from the type of the first object
179 
180  const BXVector<const l1t::L1Candidate*>* candVec;
181 
182  switch ((m_gtCaloTemplate->objectType())[0]) {
183  case NoIsoEG:
184  candVec = m_uGtB->getCandL1EG();
185  break;
186 
187  case CenJet:
188  candVec = m_uGtB->getCandL1Jet();
189  break;
190 
191  case TauJet:
192  candVec = m_uGtB->getCandL1Tau();
193  break;
194 
195  default:
196  return false;
197  break;
198  }
199 
200  // Look at objects in bx = bx + relativeBx
201  int useBx = bxEval + m_gtCaloTemplate->condRelativeBx();
202 
203  // Fail condition if attempting to get Bx outside of range
204  if( ( useBx < candVec->getFirstBX() ) ||
205  ( useBx > candVec->getLastBX() ) ) {
206  return false;
207  }
208 
209 
210  int numberObjects = candVec->size(useBx);
211  //LogTrace("l1t|Global") << " numberObjects: " << numberObjects
212  // << std::endl;
213  if (numberObjects < nObjInCond) {
214  return false;
215  }
216 
217  std::vector<int> index(numberObjects);
218 
219  for (int i = 0; i < numberObjects; ++i) {
220  index[i] = i;
221  }
222 
223  int totalLoops = 0;
224  int passLoops = 0;
225 
226  // condition result condResult set to true if at least one permutation
227  // passes all requirements
228  // all possible permutations are checked
229  bool condResult = false;
230 
231  // store the indices of the calorimeter objects
232  // from the combination evaluated in the condition
233  SingleCombInCond objectsInComb;
234  objectsInComb.reserve(nObjInCond);
235 
236  // clear the m_combinationsInCond vector
237  combinationsInCond().clear();
238 
239 
240 
242  if( nObjInCond==1 ){
243 
244  // clear the indices in the combination
245  objectsInComb.clear();
246 
247  for( int i=0; i<numberObjects; i++ ){
248 
249  totalLoops++;
250  bool passCondition = checkObjectParameter(0, *(candVec->at(useBx,i)));
251  if( passCondition ){
252  objectsInComb.push_back(i);
253  condResult = true;
254  passLoops++;
255  combinationsInCond().push_back(objectsInComb);
256  }
257  }
258  }
259  else if( nObjInCond==2 ){
260 
261  // clear the indices in the combination
262  objectsInComb.clear();
263 
264  for( int i=0; i<numberObjects; i++ ){
265  bool passCondition0i = checkObjectParameter(0, *(candVec->at(useBx,i)));
266  bool passCondition1i = checkObjectParameter(1, *(candVec->at(useBx,i)));
267 
268  if( !( passCondition0i || passCondition1i ) ) continue;
269 
270  for( int j=0; j<numberObjects; j++ ){
271  if( i==j ) continue;
272  totalLoops++;
273 
274  bool passCondition0j = checkObjectParameter(0, *(candVec->at(useBx,j)));
275  bool passCondition1j = checkObjectParameter(1, *(candVec->at(useBx,j)));
276 
277  bool pass = (
278  (passCondition0i && passCondition1j) ||
279  (passCondition0j && passCondition1i)
280  );
281 
282  if( pass ){
283 
284  if (m_gtCaloTemplate->wsc()) {
285 
286  // wsc requirements have always nObjInCond = 2
287  // one can use directly 0] and 1] to compute
288  // eta and phi differences
289  const int ObjInWscComb = 2;
290  if (nObjInCond != ObjInWscComb) {
291 
292  if (m_verbosity) {
293  edm::LogError("l1t|Global")
294  << "\n Error: "
295  << "number of particles in condition with spatial correlation = "
296  << nObjInCond << "\n it must be = " << ObjInWscComb
297  << std::endl;
298  }
299 
300  continue;
301  }
302 
305 
306  // check delta eta
307  if( !checkRangeDeltaEta( (candVec->at(useBx,i))->hwEta(), (candVec->at(useBx,j))->hwEta(), corrPar.deltaEtaRangeLower, corrPar.deltaEtaRangeUpper) ){
308  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRangeDeltaEta" << std::endl;
309  continue;
310  }
311 
312  // check delta phi
313  if( !checkRangeDeltaPhi( (candVec->at(useBx,i))->hwPhi(), (candVec->at(useBx,j))->hwPhi(),
314  corrPar.deltaPhiRangeLower, corrPar.deltaPhiRangeUpper) ){
315  LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRangeDeltaPhi" << std::endl;
316  continue;
317  }
318 
319  } // end wsc check
320 
321 
322 
323  objectsInComb.push_back(i);
324  objectsInComb.push_back(j);
325  condResult = true;
326  passLoops++;
327  combinationsInCond().push_back(objectsInComb);
328  }
329  }
330  }
331  }
332  else if( nObjInCond==3 ){
333 
334  // clear the indices in the combination
335  objectsInComb.clear();
336 
337  for( int i=0; i<numberObjects; i++ ){
338  bool passCondition0i = checkObjectParameter(0, *(candVec->at(useBx,i)));
339  bool passCondition1i = checkObjectParameter(1, *(candVec->at(useBx,i)));
340  bool passCondition2i = checkObjectParameter(2, *(candVec->at(useBx,i)));
341 
342  if( !( passCondition0i || passCondition1i || passCondition2i ) ) continue;
343 
344  for( int j=0; j<numberObjects; j++ ){
345  if( i==j ) continue;
346 
347  bool passCondition0j = checkObjectParameter(0, *(candVec->at(useBx,j)));
348  bool passCondition1j = checkObjectParameter(1, *(candVec->at(useBx,j)));
349  bool passCondition2j = checkObjectParameter(2, *(candVec->at(useBx,j)));
350 
351  if( !( passCondition0j || passCondition1j || passCondition2j ) ) continue;
352 
353  for( int k=0; k<numberObjects; k++ ){
354  if( k==i || k==j ) continue;
355  totalLoops++;
356 
357  bool passCondition0k = checkObjectParameter(0, *(candVec->at(useBx,k)));
358  bool passCondition1k = checkObjectParameter(1, *(candVec->at(useBx,k)));
359  bool passCondition2k = checkObjectParameter(2, *(candVec->at(useBx,k)));
360 
361  bool pass = (
362  (passCondition0i && passCondition1j && passCondition2k) ||
363  (passCondition0i && passCondition1k && passCondition2j) ||
364  (passCondition0j && passCondition1k && passCondition2i) ||
365  (passCondition0j && passCondition1i && passCondition2k) ||
366  (passCondition0k && passCondition1i && passCondition2j) ||
367  (passCondition0k && passCondition1j && passCondition2i)
368  );
369  if( pass ){
370  condResult = true;
371  passLoops++;
372  objectsInComb.push_back(i);
373  objectsInComb.push_back(j);
374  objectsInComb.push_back(k);
375  combinationsInCond().push_back(objectsInComb);
376  }
377  }// end loop on k
378  }// end loop on j
379  }// end loop on i
380  } // end if condition has 3 objects
381  else if( nObjInCond==4 ){
382 
383  // clear the indices in the combination
384  objectsInComb.clear();
385 
386  for( int i=0; i<numberObjects; i++ ){
387  bool passCondition0i = checkObjectParameter(0, *(candVec->at(useBx,i)));
388  bool passCondition1i = checkObjectParameter(1, *(candVec->at(useBx,i)));
389  bool passCondition2i = checkObjectParameter(2, *(candVec->at(useBx,i)));
390  bool passCondition3i = checkObjectParameter(3, *(candVec->at(useBx,i)));
391 
392  if( !( passCondition0i || passCondition1i || passCondition2i || passCondition3i ) ) continue;
393 
394  for( int j=0; j<numberObjects; j++ ){
395  if( j==i ) continue;
396 
397  bool passCondition0j = checkObjectParameter(0, *(candVec->at(useBx,j)));
398  bool passCondition1j = checkObjectParameter(1, *(candVec->at(useBx,j)));
399  bool passCondition2j = checkObjectParameter(2, *(candVec->at(useBx,j)));
400  bool passCondition3j = checkObjectParameter(3, *(candVec->at(useBx,j)));
401 
402  if( !( passCondition0j || passCondition1j || passCondition2j || passCondition3j ) ) continue;
403 
404  for( int k=0; k<numberObjects; k++ ){
405  if( k==i || k==j ) continue;
406 
407  bool passCondition0k = checkObjectParameter(0, *(candVec->at(useBx,k)));
408  bool passCondition1k = checkObjectParameter(1, *(candVec->at(useBx,k)));
409  bool passCondition2k = checkObjectParameter(2, *(candVec->at(useBx,k)));
410  bool passCondition3k = checkObjectParameter(3, *(candVec->at(useBx,k)));
411 
412  if( !( passCondition0k || passCondition1k || passCondition2k || passCondition3k ) ) continue;
413 
414  for( int m=0; m<numberObjects; m++ ){
415  if( m==i || m==j || m==k ) continue;
416  totalLoops++;
417 
418  bool passCondition0m = checkObjectParameter(0, *(candVec->at(useBx,m)));
419  bool passCondition1m = checkObjectParameter(1, *(candVec->at(useBx,m)));
420  bool passCondition2m = checkObjectParameter(2, *(candVec->at(useBx,m)));
421  bool passCondition3m = checkObjectParameter(3, *(candVec->at(useBx,m)));
422 
423  bool pass = (
424  (passCondition0i && passCondition1j && passCondition2k && passCondition3m) ||
425  (passCondition0i && passCondition1j && passCondition2m && passCondition3k) ||
426  (passCondition0i && passCondition1k && passCondition2j && passCondition3m) ||
427  (passCondition0i && passCondition1k && passCondition2m && passCondition3j) ||
428  (passCondition0i && passCondition1m && passCondition2j && passCondition3k) ||
429  (passCondition0i && passCondition1m && passCondition2k && passCondition3j) ||
430  (passCondition0j && passCondition1i && passCondition2k && passCondition3m) ||
431  (passCondition0j && passCondition1i && passCondition2m && passCondition3k) ||
432  (passCondition0j && passCondition1k && passCondition2i && passCondition3m) ||
433  (passCondition0j && passCondition1k && passCondition2m && passCondition3i) ||
434  (passCondition0j && passCondition1m && passCondition2i && passCondition3k) ||
435  (passCondition0j && passCondition1m && passCondition2k && passCondition3i) ||
436  (passCondition0k && passCondition1i && passCondition2j && passCondition3m) ||
437  (passCondition0k && passCondition1i && passCondition2m && passCondition3j) ||
438  (passCondition0k && passCondition1j && passCondition2i && passCondition3m) ||
439  (passCondition0k && passCondition1j && passCondition2m && passCondition3i) ||
440  (passCondition0k && passCondition1m && passCondition2i && passCondition3j) ||
441  (passCondition0k && passCondition1m && passCondition2j && passCondition3i) ||
442  (passCondition0m && passCondition1i && passCondition2j && passCondition3k) ||
443  (passCondition0m && passCondition1i && passCondition2k && passCondition3j) ||
444  (passCondition0m && passCondition1j && passCondition2i && passCondition3k) ||
445  (passCondition0m && passCondition1j && passCondition2k && passCondition3i) ||
446  (passCondition0m && passCondition1k && passCondition2i && passCondition3j) ||
447  (passCondition0m && passCondition1k && passCondition2j && passCondition3i)
448  );
449  if( pass ){
450  objectsInComb.push_back(i);
451  objectsInComb.push_back(j);
452  objectsInComb.push_back(k);
453  objectsInComb.push_back(m);
454  condResult = true;
455  passLoops++;
456  combinationsInCond().push_back(objectsInComb);
457  }
458  }// end loop on m
459  }// end loop on k
460  }// end loop on j
461  }// end loop on i
462  } // end if condition has 4 objects
463 
464 
465  LogTrace("l1t|Global")
466  << "\n CaloCondition: total number of permutations found: " << totalLoops
467  << "\n CaloCondition: number of permutations passing requirements: " << passLoops
468  << "\n" << std::endl;
469 
470  return condResult;
471 
472 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
const GtBoard * m_uGtB
pointer to uGt GtBoard, to be able to get the trigger objects
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
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
int j
Definition: DBlmapReader.cc:9
const BXVector< const l1t::L1Candidate * > * getCandL1Jet() const
pointer to Jet data list
Definition: GtBoard.h:149
#define LogTrace(id)
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: GtCondition.h:89
int k[5][pyjets_maxn]
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
int m_verbosity
verbosity level
const bool wsc() const
Definition: GtCondition.cc:131
const BXVector< const l1t::L1Candidate * > * getCandL1EG() const
pointer to EG data list
Definition: GtBoard.h:143
const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate &cand) const
function to check a single object if it matches a condition
typedef for correlation parameters
Definition: CaloTemplate.h:77
int getLastBX() const
const BXVector< const l1t::L1Candidate * > * getCandL1Tau() const
pointer to Tau data list
Definition: GtBoard.h:156
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
const CorrelationParameter * correlationParameter() const
Definition: CaloTemplate.h:100
const T & at(int bx, unsigned i) const
const l1t::L1Candidate * CaloCondition::getCandidate ( const int  bx,
const int  indexCand 
) const
private

load calo candidates

Definition at line 475 of file CaloCondition.cc.

References asciidump::at, CenJet, NoIsoEG, and TauJet.

475  {
476 
477  // objectType() gives the type for nrObjects() only,
478  // but in a CondCalo all objects have the same type
479  // take type from the type of the first object
480  switch ((m_gtCaloTemplate->objectType())[0]) {
481  case NoIsoEG:
482  return (m_uGtB->getCandL1EG())->at(bx,indexCand);
483  break;
484 
485  case CenJet:
486  return (m_uGtB->getCandL1Jet())->at(bx,indexCand);
487  break;
488 
489  case TauJet:
490  return (m_uGtB->getCandL1Tau())->at(bx,indexCand);
491  break;
492  default:
493  return 0;
494  break;
495  }
496 
497  return 0;
498 }
const GtBoard * m_uGtB
pointer to uGt GtBoard, to be able to get the trigger objects
const BXVector< const l1t::L1Candidate * > * getCandL1Jet() const
pointer to Jet data list
Definition: GtBoard.h:149
const std::vector< L1GtObject > & objectType() const
get / set the trigger object type(s) in the condition
Definition: GtCondition.h:89
const BXVector< const l1t::L1Candidate * > * getCandL1EG() const
pointer to EG data list
Definition: GtBoard.h:143
const BXVector< const l1t::L1Candidate * > * getCandL1Tau() const
pointer to Tau data list
Definition: GtBoard.h:156
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
list at
Definition: asciidump.py:428
const GtBoard* l1t::CaloCondition::getuGtB ( ) const
inline

get / set the pointer to uGt GtBoard

Definition at line 80 of file CaloCondition.h.

References m_uGtB.

Referenced by copy().

80  {
81  return m_uGtB;
82  }
const GtBoard * m_uGtB
pointer to uGt GtBoard, to be able to get the trigger objects
const CaloTemplate* l1t::CaloCondition::gtCaloTemplate ( ) const
inline

get / set the pointer to a Condition

Definition at line 73 of file CaloCondition.h.

References m_gtCaloTemplate.

Referenced by copy().

73  {
74  return m_gtCaloTemplate;
75  }
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
const int l1t::CaloCondition::gtCorrParDeltaPhiNrBins ( ) const
inline

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

Definition at line 95 of file CaloCondition.h.

References m_corrParDeltaPhiNrBins.

95  {
97  }
unsigned int m_corrParDeltaPhiNrBins
const int l1t::CaloCondition::gtIfCaloEtaNumberBits ( ) const
inline

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

Definition at line 88 of file CaloCondition.h.

References m_ifCaloEtaNumberBits.

Referenced by copy().

88  {
89  return m_ifCaloEtaNumberBits;
90  }
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
l1t::CaloCondition & CaloCondition::operator= ( const CaloCondition cp)

Definition at line 132 of file CaloCondition.cc.

References filterCSVwithJSON::copy.

132  {
133  copy(cp);
134  return *this;
135 }
void copy(const CaloCondition &cp)
copy function for copy constructor and operator=
void CaloCondition::print ( std::ostream &  myCout) const
virtual

print condition

Reimplemented from l1t::ConditionEvaluation.

Definition at line 576 of file CaloCondition.cc.

References l1t::ConditionEvaluation::print().

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

576  {
577 
578  m_gtCaloTemplate->print(myCout);
579 
580  myCout << " Number of bits for eta of calorimeter objects = "
581  << m_ifCaloEtaNumberBits << std::endl;
582  myCout << " Maximum number of bins for the delta phi scales = "
583  << m_corrParDeltaPhiNrBins << "\n " << std::endl;
584 
586 
587 }
unsigned int m_corrParDeltaPhiNrBins
virtual void print(std::ostream &myCout) const
print condition
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
virtual void print(std::ostream &myCout) const
print the condition
Definition: CaloTemplate.cc:98
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
void CaloCondition::setGtCaloTemplate ( const CaloTemplate caloTempl)

Definition at line 138 of file CaloCondition.cc.

138  {
139 
140  m_gtCaloTemplate = caloTempl;
141 
142 }
const CaloTemplate * m_gtCaloTemplate
pointer to a CaloTemplate
void CaloCondition::setGtCorrParDeltaPhiNrBins ( const int &  corrParDeltaPhiNrBins)

Definition at line 159 of file CaloCondition.cc.

160  {
161 
162  m_corrParDeltaPhiNrBins = corrParDeltaPhiNrBins;
163 
164 }
unsigned int m_corrParDeltaPhiNrBins
void CaloCondition::setGtIfCaloEtaNumberBits ( const int &  ifCaloEtaNumberBitsValue)

Definition at line 152 of file CaloCondition.cc.

152  {
153 
154  m_ifCaloEtaNumberBits = ifCaloEtaNumberBitsValue;
155 
156 }
int m_ifCaloEtaNumberBits
number of bits for eta of calorimeter objects
void CaloCondition::setuGtB ( const GtBoard ptrGTB)

set the pointer to uGT GtBoard

Definition at line 145 of file CaloCondition.cc.

145  {
146 
147  m_uGtB = ptrGTB;
148 
149 }
const GtBoard * m_uGtB
pointer to uGt GtBoard, to be able to get the trigger objects

Member Data Documentation

unsigned int l1t::CaloCondition::m_corrParDeltaPhiNrBins
private

Definition at line 125 of file CaloCondition.h.

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

const CaloTemplate* l1t::CaloCondition::m_gtCaloTemplate
private

pointer to a CaloTemplate

Definition at line 116 of file CaloCondition.h.

Referenced by CaloCondition(), and gtCaloTemplate().

int l1t::CaloCondition::m_ifCaloEtaNumberBits
private

number of bits for eta of calorimeter objects

Definition at line 122 of file CaloCondition.h.

Referenced by CaloCondition(), and gtIfCaloEtaNumberBits().

const GtBoard* l1t::CaloCondition::m_uGtB
private

pointer to uGt GtBoard, to be able to get the trigger objects

Definition at line 119 of file CaloCondition.h.

Referenced by getuGtB().