CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Attributes
objMonData< T > Class Template Reference

#include <FourVectorHLTOnline.h>

Inheritance diagram for objMonData< T >:
BaseMonitor BaseMonitor

Public Member Functions

void clearSets ()
 
void clearSets ()
 
void fillL1Match (FourVectorHLTOffline *fv)
 
void fillL1OffMatch (FourVectorHLTOffline *fv)
 
void fillOnL1Match (const int l1Index, FourVectorHLTOnline *fv)
 
void fillOnL1Match (const int l1Index, FourVectorHLTOffline *fv)
 
void fillOnlineMatch (const int l1Index, FourVectorHLTOnline *fv)
 
void fillOnlineMatch (const int l1Index, FourVectorHLTOffline *fv)
 
void fillOnOffMatch (FourVectorHLTOffline *fv)
 
bool isL1TriggerType (int t)
 
bool isL1TriggerType (int t)
 
bool isTriggerType (int t)
 
bool isTriggerType (int t)
 
void matchL1Offline (const trigger::TriggerObject &l1FV, FourVectorHLTOffline *fv, const int &NL1, unsigned int &NL1OffUM)
 
void matchOnlineL1 (const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOnline *fv, const int &NOn)
 
void matchOnlineL1 (const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOffline *fv, const int &NOn)
 
void matchOnlineOffline (const trigger::TriggerObject &onlineFV, FourVectorHLTOffline *fv, const int &NOn)
 
void monitorL1 (const int l1Index, FourVectorHLTOnline *fv)
 
void monitorL1 (const int l1Index, FourVectorHLTOffline *fv)
 
void monitorOffline ()
 
void monitorOnline (const int hltIndex, const int l1Index, FourVectorHLTOnline *fv)
 
void monitorOnline (const int hltIndex, const int l1Index, FourVectorHLTOffline *fv)
 
 objMonData ()
 
 objMonData ()
 
void pushL1TriggerType (int trigType)
 
void pushL1TriggerType (int trigType)
 
void pushTriggerType (int trigType)
 
void pushTriggerType (int trigType)
 
void setBJetsFlag (bool flag)
 
void setBJetsFlag (bool flag)
 
void setL1TriggerType (std::vector< int > trigType)
 
void setL1TriggerType (std::vector< int > trigType)
 
void setL2MuFlag (bool flag)
 
void setLimits (float etaMax, float etMin, float drMatch)
 
void setLimits (float etaMax, float etMin, float drMatch, float l1drMatch, float dRRange, float thresholdFactor)
 
void setPath (FourVectorHLTOnline::PathInfoCollection::iterator v)
 
void setPath (FourVectorHLTOffline::PathInfoCollection::iterator v)
 
void setReco (edm::Handle< T > offColl)
 
void setReco (edm::Handle< T > offColl)
 
void setRecoB (edm::Handle< reco::JetTagCollection > offCollB)
 
void setRecoEle (edm::Handle< reco::GsfElectronCollection > offCollEle)
 
void setRecoMu (edm::Handle< reco::MuonCollection > offCollMu)
 
void setTriggerType (std::vector< int > trigType)
 
void setTriggerType (std::vector< int > trigType)
 
- Public Member Functions inherited from BaseMonitor
virtual ~BaseMonitor ()
 
virtual ~BaseMonitor ()
 

Public Attributes

mmset L1MCDRMatchSet
 
mmset L1OffDRMatchSet
 
mmset OffMCDRMatchSet
 
mmset OnL1DRMatchSet
 
mmset OnMCDRMatchSet
 
mmset OnOffDRMatchSet
 

Private Attributes

bool BJetsFlag_
 
float DRMatch_
 
float DRRange_
 
float EtaMax_
 
float EtMin_
 
bool fL2MuFlag
 
bool GenJetsFlag_
 
float L1DRMatch_
 
std::vector< int > l1triggerType_
 
edm::Handle< ToffColl_
 
edm::Handle
< reco::JetTagCollection
offCollB_
 
edm::Handle
< reco::GsfElectronCollection
offCollEle_
 
edm::Handle< reco::MuonCollectionoffCollMu_
 
int pdgId_
 
int pdgStatus_
 
float thresholdFactor_
 
std::vector< int > triggerType_
 
FourVectorHLTOnline::PathInfoCollection::iterator v_
 
FourVectorHLTOffline::PathInfoCollection::iterator v_
 

Detailed Description

template<class T>
class objMonData< T >

Definition at line 590 of file FourVectorHLTOnline.h.

Constructor & Destructor Documentation

template<class T >
objMonData< T >::objMonData ( )
inline
template<class T >
objMonData< T >::objMonData ( )
inline

Member Function Documentation

template<class T >
void objMonData< T >::clearSets ( void  )
virtual

Implements BaseMonitor.

Definition at line 901 of file FourVectorHLTOnline.h.

902 {
903 
904  L1OffDRMatchSet.clear();
905  L1MCDRMatchSet.clear();
906  OnOffDRMatchSet.clear();
907  OnMCDRMatchSet.clear();
908  OnL1DRMatchSet.clear();
909  OffMCDRMatchSet.clear();
910 
911 }
template<class T >
void objMonData< T >::clearSets ( )
virtual

Implements BaseMonitor.

template<class T >
void objMonData< T >::fillL1Match ( FourVectorHLTOffline fv)
virtual

Implements BaseMonitor.

Definition at line 1676 of file FourVectorHLTOffline.h.

1677 {
1678 
1679  fillL1OffMatch(fv);
1680 
1681 }
void fillL1OffMatch(FourVectorHLTOffline *fv)
template<class T >
void objMonData< T >::fillL1OffMatch ( FourVectorHLTOffline fv)

Definition at line 1449 of file FourVectorHLTOffline.h.

References FourVectorHLTOffline::cleanDRMatchSet(), prof2calltree::count, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, i, LogDebug, and funct::sin().

1450 {
1451 
1452  float NL1Off=0;
1453 
1454  if(L1OffDRMatchSet.size() > 1) {
1455 
1456  LogDebug("FourVectorHLTOffline") << " Cleaning L1Off mmset" << std::endl;
1458 
1459  }
1460  // clean the set L1-Off
1461  // now fill histos
1462  for ( mmset::iterator setIter = L1OffDRMatchSet.begin( ); setIter != L1OffDRMatchSet.end( ); setIter++ )
1463  {
1464 
1465  fimmap tempMap = *setIter;
1466 
1467  fimmap::iterator it = tempMap.begin();
1468  int i = (*it).second ;
1469  float dR = (*it).first;
1470  v_->getOffDRL1OffHisto()->Fill(dR);
1471 
1472  if (dR > L1DRMatch_) continue;
1473  if( offCollB_.isValid()) {
1474 
1475  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1476  const_iterator iter = offCollB_->begin();
1477  for (int count = 0; count < i; count++) iter++;
1478 
1479 
1480  NL1Off++;
1481  v_->getOffEtL1OffHisto()->Fill((*iter).first->pt());
1482  if((*iter).first->pt() >= thresholdFactor_*v_->getHltThreshold())
1483  v_->getOffEtaVsOffPhiL1OffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());
1484 
1485 
1486  }
1487  else if( offCollMu_.isValid()) {
1488 
1489  typedef typename reco::MuonCollection::const_iterator const_iterator;
1490  const_iterator iter = offCollMu_->begin();
1491  for (int count = 0; count < i; count++) iter++;
1492 
1493 
1494  NL1Off++;
1495  v_->getOffEtL1OffHisto()->Fill(iter->pt());
1496  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
1497  v_->getOffEtaVsOffPhiL1OffHisto()->Fill(iter->outerTrack()->innerPosition().eta(),iter->outerTrack()->innerPosition().phi());
1498 
1499  }
1500  else if( offCollEle_.isValid()) {
1501 
1502  typedef typename reco::GsfElectronCollection::const_iterator const_iterator;
1503  const_iterator iter = offCollEle_->begin();
1504  for (int count = 0; count < i; count++) iter++;
1505 
1506 
1507  NL1Off++;
1508  v_->getOffEtL1OffHisto()->Fill(iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()));
1509  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
1510  v_->getOffEtaVsOffPhiL1OffHisto()->Fill(iter->eta(),iter->phi());
1511 
1512  }
1513  else if( offColl_.isValid()) {
1514 
1515  typedef typename T::const_iterator const_iterator;
1516  const_iterator iter = offColl_->begin();
1517  for (int count = 0; count < i; count++) iter++;
1518 
1519 
1520  NL1Off++;
1521  v_->getOffEtL1OffHisto()->Fill(iter->pt());
1522  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
1523  v_->getOffEtaVsOffPhiL1OffHisto()->Fill(iter->eta(),iter->phi());
1524 
1525  }
1526 
1527  }
1528 
1529  if(NL1Off > 0) v_->getNL1OffHisto()->Fill(NL1Off);
1530 
1531 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
edm::Handle< T > offColl_
transient_vector_type::const_iterator const_iterator
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
std::multimap< float, int > fimmap
edm::Handle< reco::GsfElectronCollection > offCollEle_
edm::Handle< reco::JetTagCollection > offCollB_
FourVectorHLTOnline::PathInfoCollection::iterator v_
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::MuonCollection > offCollMu_
template<class T >
void objMonData< T >::fillOnL1Match ( const int  l1Index,
FourVectorHLTOnline fv 
)

Definition at line 848 of file FourVectorHLTOnline.h.

References FourVectorHLTOnline::cleanDRMatchSet(), prof2calltree::count, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, eta(), FourVectorHLTOnline::fTriggerObj, i, LogDebug, and phi.

849 {
850 
851  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
852  const trigger::Keys & l1k = fv->fTriggerObj->filterKeys(l1Index);
853 
854  unsigned int NOnL1=0;
855 
856  // clean the set On-L1
857  if(OnL1DRMatchSet.size() > 1) {
858 
859  LogDebug("FourVectorHLTOnline") << " Cleaning L1On mmset" << std::endl;
861 
862  }
863  // now fill histos
864  for ( mmset::iterator setIter = OnL1DRMatchSet.begin( ); setIter != OnL1DRMatchSet.end( ); setIter++ )
865  {
866 
867  fimmap tempMap = *setIter;
868 
869  fimmap::iterator it = tempMap.begin();
870  int i = (*it).second ;
871  float dR = (*it).first;
872  v_->getL1DROnL1Histo()->Fill(dR);
873 
874  if (dR > DRMatch_) continue;
875 
876  trigger::Keys::const_iterator l1ki = l1k.begin();
877  for (int count = 0; count < i; count++) l1ki++;
878 
879  NOnL1++;
880  v_->getL1EtL1OnHisto()->Fill(toc[*l1ki].pt());
881  v_->getL1EtaVsL1PhiL1OnHisto()->Fill(toc[*l1ki].eta(),toc[*l1ki].phi());
882 
883  }
884 
885  v_->getNL1OnHisto()->Fill(NOnL1);
886 
887 }
#define LogDebug(id)
edm::Handle< trigger::TriggerEvent > fTriggerObj
int i
Definition: DBlmapReader.cc:9
std::multimap< float, int > fimmap
T eta() const
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
FourVectorHLTOnline::PathInfoCollection::iterator v_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
Definition: DDAxes.h:10
template<class T >
void objMonData< T >::fillOnL1Match ( const int  l1Index,
FourVectorHLTOffline fv 
)

Definition at line 1622 of file FourVectorHLTOffline.h.

References FourVectorHLTOffline::cleanDRMatchSet(), prof2calltree::count, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, eta(), FourVectorHLTOffline::fTriggerObj, i, LogDebug, and phi.

1623 {
1624 
1625  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
1626  const trigger::Keys & l1k = fv->fTriggerObj->filterKeys(l1Index);
1627 
1628  unsigned int NOnL1=0;
1629 
1630  // clean the set On-L1
1631  if(OnL1DRMatchSet.size() > 1) {
1632 
1633  LogDebug("FourVectorHLTOffline") << " Cleaning L1On mmset" << std::endl;
1635 
1636  }
1637  // now fill histos
1638  for ( mmset::iterator setIter = OnL1DRMatchSet.begin( ); setIter != OnL1DRMatchSet.end( ); setIter++ )
1639  {
1640 
1641  fimmap tempMap = *setIter;
1642 
1643  fimmap::iterator it = tempMap.begin();
1644  int i = (*it).second ;
1645  float dR = (*it).first;
1646  v_->getL1DROnL1Histo()->Fill(dR);
1647 
1648  if (dR > L1DRMatch_) continue;
1649 
1650  trigger::Keys::const_iterator l1ki = l1k.begin();
1651  for (int count = 0; count < i; count++) l1ki++;
1652 
1653  NOnL1++;
1654  v_->getL1EtL1OnHisto()->Fill(toc[*l1ki].pt());
1655  v_->getL1EtaVsL1PhiL1OnHisto()->Fill(toc[*l1ki].eta(),toc[*l1ki].phi());
1656 
1657  }
1658 
1659  v_->getNL1OnHisto()->Fill(NOnL1);
1660 
1661 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
std::multimap< float, int > fimmap
T eta() const
FourVectorHLTOnline::PathInfoCollection::iterator v_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
edm::Handle< trigger::TriggerEvent > fTriggerObj
Definition: DDAxes.h:10
template<class T >
void objMonData< T >::fillOnlineMatch ( const int  l1Index,
FourVectorHLTOnline fv 
)
virtual

Implements BaseMonitor.

Definition at line 890 of file FourVectorHLTOnline.h.

References FourVectorHLTOnline::fTriggerObj.

891 {
892 
893 
894  if ( l1Index >= fv->fTriggerObj->sizeFilters() ) return;
895  fillOnL1Match(l1Index, fv);
896 
897 }
edm::Handle< trigger::TriggerEvent > fTriggerObj
void fillOnL1Match(const int l1Index, FourVectorHLTOnline *fv)
template<class T >
void objMonData< T >::fillOnlineMatch ( const int  l1Index,
FourVectorHLTOffline fv 
)
virtual

Implements BaseMonitor.

Definition at line 1664 of file FourVectorHLTOffline.h.

References FourVectorHLTOffline::fTriggerObj.

1665 {
1666 
1667  if(! isTriggerType(v_->getObjectType()) ) return;
1668  fillOnOffMatch(fv);
1669 
1670  if ( l1Index >= fv->fTriggerObj->sizeFilters() ) return;
1671  fillOnL1Match(l1Index, fv);
1672 
1673 }
bool isTriggerType(int t)
FourVectorHLTOnline::PathInfoCollection::iterator v_
void fillOnOffMatch(FourVectorHLTOffline *fv)
void fillOnL1Match(const int l1Index, FourVectorHLTOnline *fv)
edm::Handle< trigger::TriggerEvent > fTriggerObj
template<class T >
void objMonData< T >::fillOnOffMatch ( FourVectorHLTOffline fv)

Definition at line 1535 of file FourVectorHLTOffline.h.

References FourVectorHLTOffline::cleanDRMatchSet(), prof2calltree::count, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, i, LogDebug, and funct::sin().

1536 {
1537 
1538  unsigned int NOnOff=0;
1539 
1540  // clean the set L1-Off
1541  if(OnOffDRMatchSet.size() > 1){
1542 
1543  LogDebug("FourVectorHLTOffline") << " Cleaning OnOff mmset" << std::endl;
1545 
1546  }
1547  // now fill histos
1548  for ( mmset::iterator setIter = OnOffDRMatchSet.begin( ); setIter != OnOffDRMatchSet.end( ); setIter++ )
1549  {
1550 
1551 
1552  fimmap tempMap = *setIter;
1553 
1554  fimmap::iterator it = tempMap.begin();
1555  int i = (*it).second ;
1556  float dR = (*it).first;
1557  v_->getOffDROnOffHisto()->Fill(dR);
1558 
1559 
1560  if (dR > DRMatch_) continue;
1561 
1562  if( offCollB_.isValid()) {
1563 
1564 
1565  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1566  const_iterator iter = offCollB_->begin();
1567  for (int count = 0; count < i; count++) iter++;
1568 
1569 
1570  NOnOff++;
1571  v_->getOffEtOnOffHisto()->Fill((*iter).first->pt());
1572  if((*iter).first->pt() >= thresholdFactor_*v_->getHltThreshold())
1573  v_->getOffEtaVsOffPhiOnOffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());
1574 
1575  }
1576  else if( offCollMu_.isValid() && fL2MuFlag) {
1577 
1578  typedef typename reco::MuonCollection::const_iterator const_iterator;
1579  const_iterator iter = offCollMu_->begin();
1580  for (int count = 0; count < i; count++) iter++;
1581 
1582 
1583  NOnOff++;
1584  v_->getOffEtOnOffHisto()->Fill(iter->pt());
1585  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
1586  v_->getOffEtaVsOffPhiOnOffHisto()->Fill(iter->outerTrack()->innerPosition().eta(),iter->outerTrack()->innerPosition().phi());
1587 
1588  }
1589  else if( offCollEle_.isValid()) {
1590 
1591  typedef typename reco::GsfElectronCollection::const_iterator const_iterator;
1592  const_iterator iter = offCollEle_->begin();
1593  for (int count = 0; count < i; count++) iter++;
1594 
1595  NOnOff++;
1596  v_->getOffEtOnOffHisto()->Fill(iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()));
1597  if(iter->superCluster()->energy()*fabs(sin(iter->superCluster()->position().Theta())) >= thresholdFactor_*v_->getHltThreshold())
1598  v_->getOffEtaVsOffPhiOnOffHisto()->Fill(iter->eta(),iter->phi());
1599 
1600  }
1601  else if( offColl_.isValid()) {
1602 
1603  typedef typename T::const_iterator const_iterator;
1604  const_iterator iter = offColl_->begin();
1605  for (int count = 0; count < i; count++) iter++;
1606 
1607  NOnOff++;
1608  v_->getOffEtOnOffHisto()->Fill(iter->pt());
1609  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
1610  v_->getOffEtaVsOffPhiOnOffHisto()->Fill(iter->eta(),iter->phi());
1611 
1612  }
1613 
1614  }
1615 
1616  v_->getNOnOffHisto()->Fill(NOnOff);
1617 
1618 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
edm::Handle< T > offColl_
transient_vector_type::const_iterator const_iterator
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
std::multimap< float, int > fimmap
edm::Handle< reco::GsfElectronCollection > offCollEle_
edm::Handle< reco::JetTagCollection > offCollB_
FourVectorHLTOnline::PathInfoCollection::iterator v_
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::MuonCollection > offCollMu_
template<class T >
bool objMonData< T >::isL1TriggerType ( int  t)

Definition at line 677 of file FourVectorHLTOnline.h.

678 {
679  bool rc = false;
680 
681  for(std::vector<int>::const_iterator it = l1triggerType_.begin(); it != l1triggerType_.end(); ++it)
682  {
683 
684  if(fabs(t) == fabs(*it)) { rc = true; break; }
685 
686  } // end for
687 
688  return rc;
689 
690 }
std::vector< int > l1triggerType_
template<class T >
bool objMonData< T >::isL1TriggerType ( int  t)
template<class T >
bool objMonData< T >::isTriggerType ( int  t)
virtual

Implements BaseMonitor.

Definition at line 658 of file FourVectorHLTOnline.h.

659 {
660  bool rc = false;
661 
662  for(std::vector<int>::const_iterator it = triggerType_.begin(); it != triggerType_.end(); ++it)
663  {
664 
665  if(t == *it) { rc = true; break; }
666 
667  } // end for
668 
669  if (t==0) rc = true;
670 
671  return rc;
672 
673 }
std::vector< int > triggerType_
template<class T >
bool objMonData< T >::isTriggerType ( int  t)
virtual

Implements BaseMonitor.

template<class T >
void objMonData< T >::matchL1Offline ( const trigger::TriggerObject l1FV,
FourVectorHLTOffline fv,
const int &  NL1,
unsigned int &  NL1OffUM 
)
virtual

Implements BaseMonitor.

Definition at line 998 of file FourVectorHLTOffline.h.

References reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, trigger::TriggerObject::eta(), j, trigger::TriggerObject::phi(), and funct::sin().

999 {
1000 
1001  fimmap L1OffDRMatchMap;
1002 
1003  if (offCollB_.isValid()) {
1004 
1005  int j=0;
1006  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1007  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
1008  {
1009 
1010  float recoEta = (*iter).first->eta();
1011  float recoPhi = (*iter).first->phi();
1012  float recoPt = (*iter).first->pt();
1013 
1014  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
1015  {
1016 
1017  // fill UM histos (no matching required)
1018  if (v_->getOffEtL1OffUMHisto() != 0) {
1019  if(NL1 == 1) {
1020 
1021  NL1OffUM++;
1022  v_->getOffEtL1OffUMHisto()->Fill(recoPt);
1023 
1024  if(recoPt >= thresholdFactor_*v_->getHltThreshold())
1025  v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(recoEta,recoPhi);
1026 
1027  }
1028  }
1029 
1030  // make maps of matched objects
1031  float dR = reco::deltaR(recoEta,recoPhi,l1FV.eta(),l1FV.phi());
1032  if ( dR < DRRange_)
1033  {
1034 
1035  L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));
1036 
1037  }
1038 
1039  }
1040 
1041  j++;
1042 
1043  }
1044 
1045  }
1046  else if (offCollMu_.isValid()) {
1047 
1048  int j=0;
1049  typedef typename reco::MuonCollection::const_iterator const_iterator;
1050  for( const_iterator iter = offCollMu_->begin(), iend = offCollMu_->end(); iter != iend; ++iter )
1051  {
1052 
1053  // get Eta, Phi of the MuonDetectorTrack,
1054  // looking at the detector most inner Position
1055  // This should be close to what L1 sees
1056  float recoEta = iter->outerTrack()->innerPosition().eta();
1057  float recoPhi = iter->outerTrack()->innerPosition().phi();
1058  float recoPt = iter->pt();
1059 
1060  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
1061  {
1062 
1063  // fill UM histos (no matching required)
1064  if (v_->getOffEtL1OffUMHisto() != 0) {
1065  if(NL1 == 1) {
1066 
1067  NL1OffUM++;
1068  v_->getOffEtL1OffUMHisto()->Fill(recoPt);
1069 
1070  if(recoPt >= thresholdFactor_*v_->getHltThreshold())
1071  v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(recoEta,recoPhi);
1072 
1073  }
1074  }
1075 
1076  // make maps of matched objects
1077  float dR = reco::deltaR(recoEta,recoPhi,l1FV.eta(),l1FV.phi());
1078  if ( dR < DRRange_)
1079  {
1080 
1081  L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));
1082 
1083  }
1084 
1085  }
1086 
1087  j++;
1088 
1089  }
1090 
1091  }
1092  else if (offCollEle_.isValid()) {
1093 
1094  int j=0;
1095  typedef typename reco::GsfElectronCollection::const_iterator const_iterator;
1096  for( const_iterator iter = offCollEle_->begin(), iend = offCollEle_->end(); iter != iend; ++iter )
1097  {
1098 
1099  if (fabs(iter->eta()) <= EtaMax_ && iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()) >= EtMin_ )
1100  {
1101 
1102  if ( v_->getOffEtL1OffUMHisto() != 0) {
1103  // fill UM histos (no matching required)
1104  if(NL1 == 1) {
1105 
1106  NL1OffUM++;
1107  v_->getOffEtL1OffUMHisto()->Fill(iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()));
1108 
1109  if(iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()) >= thresholdFactor_*v_->getHltThreshold())
1110  v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(iter->eta(),iter->phi());
1111 
1112  }
1113  }
1114 
1115  // make maps of matched objects
1116  float dR = reco::deltaR(iter->eta(),iter->phi(),l1FV.eta(),l1FV.phi());
1117  if ( dR < DRRange_)
1118  {
1119 
1120  L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));
1121 
1122  }
1123 
1124  }
1125 
1126  j++;
1127 
1128  }
1129 
1130  }
1131  else if (offColl_.isValid()) {
1132 
1133  int j=0;
1134  typedef typename T::const_iterator const_iterator;
1135  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
1136  {
1137 
1138  if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >= EtMin_ )
1139  {
1140 
1141  // fill UM histos (no matching required)
1142  if (v_->getOffEtL1OffUMHisto()!= 0 ) {
1143  if(NL1 == 1) {
1144 
1145  NL1OffUM++;
1146  v_->getOffEtL1OffUMHisto()->Fill(iter->pt());
1147 
1148  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
1149  v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(iter->eta(),iter->phi());
1150 
1151  }
1152  }
1153 
1154  // make maps of matched objects
1155  float dR = reco::deltaR(iter->eta(),iter->phi(),l1FV.eta(),l1FV.phi());
1156  if ( dR < DRRange_)
1157  {
1158 
1159  L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));
1160 
1161  }
1162 
1163  }
1164 
1165  j++;
1166 
1167  }
1168 
1169  }
1170  if(! L1OffDRMatchMap.empty()) L1OffDRMatchSet.insert(L1OffDRMatchMap);
1171 
1172 }
edm::Handle< T > offColl_
transient_vector_type::const_iterator const_iterator
float phi() const
Definition: TriggerObject.h:60
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::multimap< float, int > fimmap
edm::Handle< reco::GsfElectronCollection > offCollEle_
float eta() const
Definition: TriggerObject.h:59
edm::Handle< reco::JetTagCollection > offCollB_
FourVectorHLTOnline::PathInfoCollection::iterator v_
int j
Definition: DBlmapReader.cc:9
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::MuonCollection > offCollMu_
template<class T >
void objMonData< T >::matchOnlineL1 ( const trigger::TriggerObject onlineFV,
const int &  l1Index,
FourVectorHLTOnline fv,
const int &  NOn 
)
virtual

Implements BaseMonitor.

Definition at line 788 of file FourVectorHLTOnline.h.

References reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, trigger::TriggerObject::eta(), FourVectorHLTOnline::fTriggerObj, j, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

789 {
790 
791  if ( l1Index >= fv->fTriggerObj->sizeFilters() ) return;
792 
793  unsigned int NOnL1UM=0;
794 
795  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
796  const trigger::Vids & idtype = fv->fTriggerObj->filterIds(l1Index);
797  const trigger::Keys & l1k = fv->fTriggerObj->filterKeys(l1Index);
798 
799  fimmap OnL1DRMatchMap;
800  int j=0;
801  trigger::Vids::const_iterator idtypeiter = idtype.begin();
802  for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki )
803  {
804 
805 
806 
807  if(isL1TriggerType(*idtypeiter))
808  {
809 
810  trigger::TriggerObject l1FV = toc[*l1ki];
811 
812  if ( fabs(l1FV.eta()) <= EtaMax_ && l1FV.pt() >= EtMin_ )
813  {
814 
815  // fill UM histos (no matching required)
816  if(NOn == 1) {
817 
818  NOnL1UM++;
819  v_->getL1EtL1OnUMHisto()->Fill(l1FV.pt());
820  v_->getL1EtaVsL1PhiL1OnUMHisto()->Fill(l1FV.eta(),l1FV.phi());
821 
822  }
823 
824 
825  float dR = reco::deltaR(l1FV.eta(),l1FV.phi(),onlineFV.eta(),onlineFV.phi());
826 
827  if ( dR < 1.0)
828  {
829 
830  OnL1DRMatchMap.insert(std::pair<float,int>(dR,j));
831 
832  }
833 
834  } // end if l1FV eta, pt
835 
836  } // end if isL1TriggerType
837 
838  ++idtypeiter;
839  j++;
840 
841  } // end for
842 
843  if(! OnL1DRMatchMap.empty()) OnL1DRMatchSet.insert(OnL1DRMatchMap);
844 
845 }
edm::Handle< trigger::TriggerEvent > fTriggerObj
bool isL1TriggerType(int t)
float phi() const
Definition: TriggerObject.h:60
std::multimap< float, int > fimmap
float eta() const
Definition: TriggerObject.h:59
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
FourVectorHLTOnline::PathInfoCollection::iterator v_
int j
Definition: DBlmapReader.cc:9
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
std::vector< int > Vids
template<class T >
void objMonData< T >::matchOnlineL1 ( const trigger::TriggerObject onlineFV,
const int &  l1Index,
FourVectorHLTOffline fv,
const int &  NOn 
)
virtual

Implements BaseMonitor.

Definition at line 1209 of file FourVectorHLTOffline.h.

References reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, trigger::TriggerObject::eta(), FourVectorHLTOffline::fTriggerObj, j, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

1210 {
1211 
1212  if ( l1Index >= fv->fTriggerObj->sizeFilters() ) return;
1213 
1214  unsigned int NOnL1UM=0;
1215 
1216  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
1217  const trigger::Vids & idtype = fv->fTriggerObj->filterIds(l1Index);
1218  const trigger::Keys & l1k = fv->fTriggerObj->filterKeys(l1Index);
1219 
1220  fimmap OnL1DRMatchMap;
1221  int j=0;
1222  trigger::Vids::const_iterator idtypeiter = idtype.begin();
1223  for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki )
1224  {
1225 
1226  if(isL1TriggerType(*idtypeiter))
1227  {
1228 
1229  trigger::TriggerObject l1FV = toc[*l1ki];
1230 
1231  // fill UM histos (no matching required)
1232  if (v_->getL1EtL1OnUMHisto() != 0) {
1233  if(NOn == 1) {
1234 
1235  NOnL1UM++;
1236  v_->getL1EtL1OnUMHisto()->Fill(l1FV.pt());
1237  v_->getL1EtaVsL1PhiL1OnUMHisto()->Fill(l1FV.eta(),l1FV.phi());
1238 
1239  }
1240  }
1241 
1242  float dR = reco::deltaR(l1FV.eta(),l1FV.phi(),onlineFV.eta(),onlineFV.phi());
1243 
1244  if ( dR < DRRange_)
1245  {
1246 
1247  OnL1DRMatchMap.insert(std::pair<float,int>(dR,j));
1248 
1249  }
1250 
1251  } // end if isL1TriggerType
1252 
1253  ++idtypeiter;
1254  j++;
1255 
1256  } // end for
1257 
1258  if(! OnL1DRMatchMap.empty()) OnL1DRMatchSet.insert(OnL1DRMatchMap);
1259 
1260 }
bool isL1TriggerType(int t)
float phi() const
Definition: TriggerObject.h:60
std::multimap< float, int > fimmap
float eta() const
Definition: TriggerObject.h:59
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
FourVectorHLTOnline::PathInfoCollection::iterator v_
int j
Definition: DBlmapReader.cc:9
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
edm::Handle< trigger::TriggerEvent > fTriggerObj
std::vector< int > Vids
template<class T >
void objMonData< T >::matchOnlineOffline ( const trigger::TriggerObject onlineFV,
FourVectorHLTOffline fv,
const int &  NOn 
)
virtual

Implements BaseMonitor.

Definition at line 1264 of file FourVectorHLTOffline.h.

References reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, trigger::TriggerObject::eta(), j, trigger::TriggerObject::phi(), and funct::sin().

1265 {
1266 
1267  unsigned int NOnOffUM=0;
1268 
1269  fimmap OnOffDRMatchMap;
1270 
1271  if (offCollB_.isValid()) {
1272 
1273  int j=0;
1274  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1275  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
1276  {
1277 
1278  float recoEta = (*iter).first->eta();
1279  float recoPhi = (*iter).first->phi();
1280  float recoPt = (*iter).first->pt();
1281 
1282  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
1283  {
1284 
1285 
1286  // fill UM histos (no matching required)
1287  if (v_->getOffEtOnOffUMHisto() != 0) {
1288  if(NOn == 1) {
1289 
1290  NOnOffUM++;
1291  v_->getOffEtOnOffUMHisto()->Fill(recoPt);
1292 
1293  if(recoPt >= thresholdFactor_*v_->getHltThreshold())
1294  v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(recoEta,recoPhi);
1295 
1296  }
1297  }
1298 
1299  // make maps of matched objects
1300  float dR = reco::deltaR(recoEta,recoPhi,onlineFV.eta(),onlineFV.phi());
1301  if ( dR < DRRange_)
1302  {
1303 
1304  OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));
1305 
1306  }
1307 
1308  }
1309 
1310  j++;
1311 
1312  }
1313 
1314  }
1315  else if (offCollMu_.isValid() && fL2MuFlag) {
1316 
1317  int j=0;
1318  typedef typename reco::MuonCollection::const_iterator const_iterator;
1319  for( const_iterator iter = offCollMu_->begin(), iend = offCollMu_->end(); iter != iend; ++iter )
1320  {
1321 
1322  // get Eta, Phi of the MuonDetectorTrack,
1323  // looking at the detector most inner Position
1324  // This should be close to what L1 sees
1325  float recoEta = iter->outerTrack()->innerPosition().eta();
1326  float recoPhi = iter->outerTrack()->innerPosition().phi();
1327  float recoPt = iter->pt();
1328 
1329  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
1330  {
1331  // fill UM histos (no matching required)
1332  if (v_->getOffEtOnOffUMHisto() != 0) {
1333  if(NOn == 1) {
1334 
1335  NOnOffUM++;
1336  v_->getOffEtOnOffUMHisto()->Fill(iter->pt());
1337 
1338  if(recoPt >= thresholdFactor_*v_->getHltThreshold())
1339  v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(iter->eta(),iter->phi());
1340 
1341  }
1342  }
1343 
1344  // make maps of matched objects
1345  float dR = reco::deltaR(recoEta,recoPhi,onlineFV.eta(),onlineFV.phi());
1346  if ( dR < DRRange_)
1347  {
1348 
1349  OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));
1350 
1351  }
1352 
1353  }
1354 
1355  j++;
1356 
1357 
1358  }
1359 
1360  }
1361  else if (offCollEle_.isValid()) {
1362 
1363  int j=0;
1364 
1365  typedef typename reco::GsfElectronCollection::const_iterator const_iterator;
1366  for( const_iterator iter = offCollEle_->begin(), iend = offCollEle_->end(); iter != iend; ++iter )
1367  {
1368 
1369  if (fabs(iter->eta()) <= EtaMax_ && iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()) >= EtMin_ )
1370  {
1371 
1372  // fill UM histos (no matching required)
1373  if (v_->getOffEtOnOffUMHisto() != 0) {
1374  if(NOn == 1) {
1375 
1376  NOnOffUM++;
1377  v_->getOffEtOnOffUMHisto()->Fill(iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()));
1378 
1379  if(iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()) >= thresholdFactor_*v_->getHltThreshold())
1380  v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(iter->eta(),iter->phi());
1381 
1382  }
1383  }
1384 
1385  // make maps of matched objects
1386  float dR = reco::deltaR(iter->eta(),iter->phi(),onlineFV.eta(),onlineFV.phi());
1387  if ( dR < DRRange_)
1388  {
1389 
1390  OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));
1391 
1392  }
1393 
1394  }
1395 
1396  j++;
1397 
1398 
1399  }
1400 
1401  }
1402  else if (offColl_.isValid()) {
1403 
1404  int j=0;
1405 
1406  typedef typename T::const_iterator const_iterator;
1407  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
1408  {
1409 
1410  if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >= EtMin_ )
1411  {
1412 
1413  // fill UM histos (no matching required)
1414  if (v_->getOffEtOnOffUMHisto() != 0) {
1415  if(NOn == 1) {
1416 
1417  NOnOffUM++;
1418  v_->getOffEtOnOffUMHisto()->Fill(iter->pt());
1419 
1420  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
1421  v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(iter->eta(),iter->phi());
1422 
1423  }
1424  }
1425 
1426  // make maps of matched objects
1427  float dR = reco::deltaR(iter->eta(),iter->phi(),onlineFV.eta(),onlineFV.phi());
1428  if ( dR < DRRange_)
1429  {
1430 
1431  OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));
1432 
1433  }
1434 
1435  }
1436 
1437  j++;
1438 
1439 
1440  }
1441 
1442  }
1443 
1444  if(! OnOffDRMatchMap.empty()) OnOffDRMatchSet.insert(OnOffDRMatchMap);
1445 
1446 }
edm::Handle< T > offColl_
transient_vector_type::const_iterator const_iterator
float phi() const
Definition: TriggerObject.h:60
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::multimap< float, int > fimmap
edm::Handle< reco::GsfElectronCollection > offCollEle_
float eta() const
Definition: TriggerObject.h:59
edm::Handle< reco::JetTagCollection > offCollB_
FourVectorHLTOnline::PathInfoCollection::iterator v_
int j
Definition: DBlmapReader.cc:9
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::MuonCollection > offCollMu_
template<class T >
void objMonData< T >::monitorL1 ( const int  l1Index,
FourVectorHLTOnline fv 
)
virtual

Implements BaseMonitor.

Definition at line 694 of file FourVectorHLTOnline.h.

References trigger::TriggerObject::eta(), FourVectorHLTOnline::fTriggerObj, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

695 {
696 
697  if ( l1Index >= fv->fTriggerObj->sizeFilters() ) return;
698 
699  unsigned int NL1=0;
700  unsigned int NL1OffUM=0;
701 
702  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
703  const trigger::Vids & idtype = fv->fTriggerObj->filterIds(l1Index);
704  const trigger::Keys & l1k = fv->fTriggerObj->filterKeys(l1Index);
705  bool l1accept = l1k.size() > 0;
706 
707  if(!l1accept) return;
708 
709  trigger::Vids::const_iterator idtypeiter = idtype.begin();
710 
711  for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
712 
713  trigger::TriggerObject l1FV = toc[*l1ki];
714  if(isL1TriggerType(*idtypeiter))
715  {
716 
717 
718 
719  if (fabs(l1FV.eta()) <= EtaMax_ && l1FV.pt() >= EtMin_)
720  {
721 
722  NL1++;
723 
724  v_->getL1EtL1Histo()->Fill(l1FV.pt());
725  v_->getL1EtaVsL1PhiL1Histo()->Fill(l1FV.eta(), l1FV.phi());
726 
727  }
728  else {
729 
730  continue;
731 
732  }
733 
734  } // end if isL1TriggerType
735  ++idtypeiter;
736 
737  } // end for l1ki
738 
739  if(NL1 > 0) v_->getNL1Histo()->Fill(NL1);
740  if(NL1OffUM > 0) v_->getNL1OffUMHisto()->Fill(NL1OffUM);
741 
742 }
edm::Handle< trigger::TriggerEvent > fTriggerObj
bool isL1TriggerType(int t)
float phi() const
Definition: TriggerObject.h:60
float eta() const
Definition: TriggerObject.h:59
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
FourVectorHLTOnline::PathInfoCollection::iterator v_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
std::vector< int > Vids
template<class T >
void objMonData< T >::monitorL1 ( const int  l1Index,
FourVectorHLTOffline fv 
)
virtual

Implements BaseMonitor.

Definition at line 954 of file FourVectorHLTOffline.h.

References trigger::TriggerObject::eta(), FourVectorHLTOffline::fTriggerObj, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

955 {
956 
957  if ( l1Index >= fv->fTriggerObj->sizeFilters() ) return;
958 
959  unsigned int NL1=0;
960  unsigned int NL1OffUM=0;
961 
962  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
963  const trigger::Vids & idtype = fv->fTriggerObj->filterIds(l1Index);
964  const trigger::Keys & l1k = fv->fTriggerObj->filterKeys(l1Index);
965  bool l1accept = l1k.size() > 0;
966 
967  if(!l1accept) return;
968 
969  trigger::Vids::const_iterator idtypeiter = idtype.begin();
970 
971  for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
972 
973  trigger::TriggerObject l1FV = toc[*l1ki];
974 
975  if(isL1TriggerType(*idtypeiter))
976  {
977 
978  NL1++;
979 
980  v_->getL1EtL1Histo()->Fill(l1FV.pt());
981  v_->getL1EtaVsL1PhiL1Histo()->Fill(l1FV.eta(), l1FV.phi());
982 
983  matchL1Offline(l1FV, fv, NL1, NL1OffUM);
984 
985  } // end if isL1TriggerType
986 
987  ++idtypeiter;
988 
989  } // end for l1ki
990 
991  if(NL1 > 0) v_->getNL1Histo()->Fill(NL1);
992  if(NL1OffUM > 0) v_->getNL1OffUMHisto()->Fill(NL1OffUM);
993 
994 }
bool isL1TriggerType(int t)
float phi() const
Definition: TriggerObject.h:60
float eta() const
Definition: TriggerObject.h:59
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
FourVectorHLTOnline::PathInfoCollection::iterator v_
void matchL1Offline(const trigger::TriggerObject &l1FV, FourVectorHLTOffline *fv, const int &NL1, unsigned int &NL1OffUM)
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
edm::Handle< trigger::TriggerEvent > fTriggerObj
std::vector< int > Vids
template<class T >
void objMonData< T >::monitorOffline ( void  )
virtual

Implements BaseMonitor.

Definition at line 856 of file FourVectorHLTOffline.h.

References funct::sin().

857 {
858 
859  if(! isTriggerType(v_->getObjectType()) ) return;
860 
861  unsigned int NOff = 0;
862 
863  if( offCollB_.isValid()) {
864  typedef typename reco::JetTagCollection::const_iterator const_iterator;
865  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
866  {
867 
868  float recoEta = (*iter).first->eta();
869  float recoPhi = (*iter).first->phi();
870  float recoPt = (*iter).first->pt();
871 
872 
873  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
874  {
875 
876  NOff++;
877  v_->getOffEtOffHisto()->Fill(recoPt);
878  if(recoPt >= thresholdFactor_*v_->getHltThreshold())
879  v_->getOffEtaVsOffPhiOffHisto()->Fill(recoEta, recoPhi);
880 
881  }
882  /*
883  else {
884 
885  continue;
886 
887  }
888  */
889 
890  }
891 
892  }
893  else if(offCollEle_.isValid()) {
894 
895  typedef typename reco::GsfElectronCollection::const_iterator const_iterator;
896  for( const_iterator iter = offCollEle_->begin(), iend = offCollEle_->end(); iter != iend; ++iter )
897  {
898 
899  if (fabs(iter->eta()) <= EtaMax_ && iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()) >= EtMin_ )
900  {
901 
902  NOff++;
903  v_->getOffEtOffHisto()->Fill(iter->superCluster()->energy()*sin(iter->superCluster()->position().Theta()));
904 
905  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
906  v_->getOffEtaVsOffPhiOffHisto()->Fill(iter->eta(), iter->phi());
907 
908  }
909  /*
910  else {
911 
912  continue;
913 
914  }
915  */
916 
917  }
918 
919  } // end else if
920  else if(offColl_.isValid()) {
921 
922  typedef typename T::const_iterator const_iterator;
923  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
924  {
925 
926  if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >= EtMin_ )
927  {
928 
929  NOff++;
930  v_->getOffEtOffHisto()->Fill(iter->pt());
931 
932  if(iter->pt() >= thresholdFactor_*v_->getHltThreshold())
933  v_->getOffEtaVsOffPhiOffHisto()->Fill(iter->eta(), iter->phi());
934 
935  }
936  /*
937  else {
938 
939  continue;
940 
941  }
942  */
943 
944  }
945 
946  } // end else if
947 
948  if(NOff>0)v_->getNOffHisto()->Fill(NOff);
949 
950 }
edm::Handle< T > offColl_
transient_vector_type::const_iterator const_iterator
bool isTriggerType(int t)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
edm::Handle< reco::GsfElectronCollection > offCollEle_
edm::Handle< reco::JetTagCollection > offCollB_
FourVectorHLTOnline::PathInfoCollection::iterator v_
bool isValid() const
Definition: HandleBase.h:76
template<class T >
void objMonData< T >::monitorOnline ( const int  hltIndex,
const int  l1Index,
FourVectorHLTOnline fv 
)
virtual

Implements BaseMonitor.

Definition at line 746 of file FourVectorHLTOnline.h.

References trigger::TriggerObject::eta(), FourVectorHLTOnline::fTriggerObj, gen::k, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

747 {
748 
749  //if(! isTriggerType(v_->getObjectType()) ) return;
750 
751  // Get keys of objects passed by the last filter
752  const trigger::Keys & k = fv->fTriggerObj->filterKeys(hltIndex);
753 
754  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
755 
756  unsigned int NOn=0;
757 
758  // Loop over HLT objects
759  for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
760 
761  trigger::TriggerObject onlineFV = toc[*ki];
762 
763  if (fabs(onlineFV.eta()) <= EtaMax_ && onlineFV.pt() >= EtMin_)
764  {
765 
766  NOn++;
767 
768  v_->getOnEtOnHisto()->Fill(onlineFV.pt());
769  v_->getOnOneOverEtOnHisto()->Fill(1./onlineFV.pt());
770  v_->getOnEtaVsOnPhiOnHisto()->Fill(onlineFV.eta(), onlineFV.phi());
771 
772  }
773  else {
774 
775  return;
776 
777  }
778 
779  matchOnlineL1(onlineFV,l1Index, fv, NOn);
780 
781  } // end loop over HLT objects
782 
783  if(NOn>0) v_->getNOnHisto()->Fill(NOn);
784 
785 }
edm::Handle< trigger::TriggerEvent > fTriggerObj
float phi() const
Definition: TriggerObject.h:60
void matchOnlineL1(const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOnline *fv, const int &NOn)
float eta() const
Definition: TriggerObject.h:59
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
FourVectorHLTOnline::PathInfoCollection::iterator v_
int k[5][pyjets_maxn]
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
template<class T >
void objMonData< T >::monitorOnline ( const int  hltIndex,
const int  l1Index,
FourVectorHLTOffline fv 
)
virtual

Implements BaseMonitor.

Definition at line 1176 of file FourVectorHLTOffline.h.

References trigger::TriggerObject::eta(), FourVectorHLTOffline::fTriggerObj, gen::k, trigger::TriggerObject::phi(), and trigger::TriggerObject::pt().

1177 {
1178 
1179  if(! isTriggerType(v_->getObjectType()) ) return;
1180 
1181  // Get keys of objects passed by the last filter
1182  const trigger::Keys & k = fv->fTriggerObj->filterKeys(hltIndex);
1183 
1184  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
1185 
1186  unsigned int NOn=0;
1187 
1188  // Loop over HLT objects
1189  for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
1190 
1191  trigger::TriggerObject onlineFV = toc[*ki];
1192 
1193  NOn++;
1194 
1195  v_->getOnEtOnHisto()->Fill(onlineFV.pt());
1196  v_->getOnOneOverEtOnHisto()->Fill(1./onlineFV.pt());
1197  v_->getOnEtaVsOnPhiOnHisto()->Fill(onlineFV.eta(), onlineFV.phi());
1198 
1199  matchOnlineL1(onlineFV,l1Index, fv, NOn);
1200  matchOnlineOffline(onlineFV,fv, NOn);
1201 
1202  } // end loop over HLT objects
1203 
1204  if(NOn>0) v_->getNOnHisto()->Fill(NOn);
1205 
1206 }
bool isTriggerType(int t)
float phi() const
Definition: TriggerObject.h:60
void matchOnlineL1(const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOnline *fv, const int &NOn)
float eta() const
Definition: TriggerObject.h:59
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
FourVectorHLTOnline::PathInfoCollection::iterator v_
void matchOnlineOffline(const trigger::TriggerObject &onlineFV, FourVectorHLTOffline *fv, const int &NOn)
int k[5][pyjets_maxn]
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:83
std::vector< size_type > Keys
edm::Handle< trigger::TriggerEvent > fTriggerObj
template<class T >
void objMonData< T >::pushL1TriggerType ( int  trigType)
inline

Definition at line 602 of file FourVectorHLTOnline.h.

References objMonData< T >::l1triggerType_.

602 { l1triggerType_.push_back(trigType); }
std::vector< int > l1triggerType_
template<class T >
void objMonData< T >::pushL1TriggerType ( int  trigType)
inline

Definition at line 741 of file FourVectorHLTOffline.h.

References objMonData< T >::l1triggerType_.

741 { l1triggerType_.push_back(trigType); }
std::vector< int > l1triggerType_
template<class T >
void objMonData< T >::pushTriggerType ( int  trigType)
inline

Definition at line 600 of file FourVectorHLTOnline.h.

References objMonData< T >::triggerType_.

600 { triggerType_.push_back(trigType); }
std::vector< int > triggerType_
template<class T >
void objMonData< T >::pushTriggerType ( int  trigType)
inline

Definition at line 739 of file FourVectorHLTOffline.h.

References objMonData< T >::triggerType_.

739 { triggerType_.push_back(trigType); }
std::vector< int > triggerType_
template<class T >
void objMonData< T >::setBJetsFlag ( bool  flag)
inline

Definition at line 628 of file FourVectorHLTOnline.h.

References objMonData< T >::BJetsFlag_.

Referenced by FourVectorHLTOnline::analyze().

629  {
630  BJetsFlag_ = flag;
631  }
long int flag
Definition: mlp_lapack.h:47
template<class T >
void objMonData< T >::setBJetsFlag ( bool  flag)
inline

Definition at line 777 of file FourVectorHLTOffline.h.

References objMonData< T >::BJetsFlag_.

778  {
779  BJetsFlag_ = flag;
780  }
long int flag
Definition: mlp_lapack.h:47
template<class T >
void objMonData< T >::setL1TriggerType ( std::vector< int >  trigType)
inline

Definition at line 601 of file FourVectorHLTOnline.h.

References objMonData< T >::l1triggerType_.

601 { l1triggerType_ = trigType; }
std::vector< int > l1triggerType_
template<class T >
void objMonData< T >::setL1TriggerType ( std::vector< int >  trigType)
inline

Definition at line 740 of file FourVectorHLTOffline.h.

References objMonData< T >::l1triggerType_.

740 { l1triggerType_ = trigType; }
std::vector< int > l1triggerType_
template<class T >
void objMonData< T >::setL2MuFlag ( bool  flag)
inline

Definition at line 781 of file FourVectorHLTOffline.h.

References objMonData< T >::fL2MuFlag.

782  {
783  fL2MuFlag = flag;
784  }
long int flag
Definition: mlp_lapack.h:47
template<class T >
void objMonData< T >::setLimits ( float  etaMax,
float  etMin,
float  drMatch 
)
inline
template<class T >
void objMonData< T >::setLimits ( float  etaMax,
float  etMin,
float  drMatch,
float  l1drMatch,
float  dRRange,
float  thresholdFactor 
)
inline
template<class T >
void objMonData< T >::setPath ( FourVectorHLTOnline::PathInfoCollection::iterator  v)
inlinevirtual

Implements BaseMonitor.

Definition at line 603 of file FourVectorHLTOnline.h.

References findQualityFiles::v, and objMonData< T >::v_.

603 { v_ = v; }
FourVectorHLTOnline::PathInfoCollection::iterator v_
template<class T >
void objMonData< T >::setPath ( FourVectorHLTOffline::PathInfoCollection::iterator  v)
inlinevirtual

Implements BaseMonitor.

Definition at line 742 of file FourVectorHLTOffline.h.

References findQualityFiles::v, and objMonData< T >::v_.

742 { v_ = v; }
FourVectorHLTOnline::PathInfoCollection::iterator v_
template<class T >
void objMonData< T >::setReco ( edm::Handle< T offColl)
inline

Definition at line 604 of file FourVectorHLTOnline.h.

References objMonData< T >::offColl_.

Referenced by FourVectorHLTOnline::analyze(), and FourVectorHLTOffline::analyze().

604 { offColl_ = offColl; }
edm::Handle< T > offColl_
template<class T >
void objMonData< T >::setReco ( edm::Handle< T offColl)
inline

Definition at line 743 of file FourVectorHLTOffline.h.

References objMonData< T >::offColl_.

743 { offColl_ = offColl; }
edm::Handle< T > offColl_
template<class T >
void objMonData< T >::setRecoB ( edm::Handle< reco::JetTagCollection offCollB)
inline

Definition at line 744 of file FourVectorHLTOffline.h.

References objMonData< T >::offCollB_.

Referenced by FourVectorHLTOffline::analyze().

744 { offCollB_ = offCollB; }
edm::Handle< reco::JetTagCollection > offCollB_
template<class T >
void objMonData< T >::setRecoEle ( edm::Handle< reco::GsfElectronCollection offCollEle)
inline

Definition at line 746 of file FourVectorHLTOffline.h.

References objMonData< T >::offCollEle_.

746 { offCollEle_ = offCollEle; }
edm::Handle< reco::GsfElectronCollection > offCollEle_
template<class T >
void objMonData< T >::setRecoMu ( edm::Handle< reco::MuonCollection offCollMu)
inline

Definition at line 745 of file FourVectorHLTOffline.h.

References objMonData< T >::offCollMu_.

745 { offCollMu_ = offCollMu; }
edm::Handle< reco::MuonCollection > offCollMu_
template<class T >
void objMonData< T >::setTriggerType ( std::vector< int >  trigType)
inline

Definition at line 599 of file FourVectorHLTOnline.h.

References objMonData< T >::triggerType_.

599 { triggerType_ = trigType; }
std::vector< int > triggerType_
template<class T >
void objMonData< T >::setTriggerType ( std::vector< int >  trigType)
inline

Definition at line 738 of file FourVectorHLTOffline.h.

References objMonData< T >::triggerType_.

738 { triggerType_ = trigType; }
std::vector< int > triggerType_

Member Data Documentation

template<class T >
bool objMonData< T >::BJetsFlag_
private
template<class T >
float objMonData< T >::DRMatch_
private

Definition at line 642 of file FourVectorHLTOnline.h.

Referenced by objMonData< T >::setLimits().

template<class T >
float objMonData< T >::DRRange_
private

Definition at line 797 of file FourVectorHLTOffline.h.

Referenced by objMonData< T >::setLimits().

template<class T >
float objMonData< T >::EtaMax_
private
template<class T >
float objMonData< T >::EtMin_
private
template<class T >
bool objMonData< T >::fL2MuFlag
private
template<class T >
bool objMonData< T >::GenJetsFlag_
private

Definition at line 644 of file FourVectorHLTOnline.h.

Referenced by objMonData< T >::objMonData().

template<class T >
float objMonData< T >::L1DRMatch_
private

Definition at line 796 of file FourVectorHLTOffline.h.

Referenced by objMonData< T >::setLimits().

template<class T >
mmset objMonData< T >::L1MCDRMatchSet

Definition at line 621 of file FourVectorHLTOnline.h.

template<class T >
mmset objMonData< T >::L1OffDRMatchSet

Definition at line 620 of file FourVectorHLTOnline.h.

template<class T >
std::vector< int > objMonData< T >::l1triggerType_
private
template<class T >
edm::Handle< T > objMonData< T >::offColl_
private

Definition at line 650 of file FourVectorHLTOnline.h.

Referenced by objMonData< T >::setReco().

template<class T >
edm::Handle<reco::JetTagCollection> objMonData< T >::offCollB_
private

Definition at line 808 of file FourVectorHLTOffline.h.

Referenced by objMonData< T >::setRecoB().

template<class T >
edm::Handle<reco::GsfElectronCollection> objMonData< T >::offCollEle_
private

Definition at line 810 of file FourVectorHLTOffline.h.

Referenced by objMonData< T >::setRecoEle().

template<class T >
edm::Handle<reco::MuonCollection> objMonData< T >::offCollMu_
private

Definition at line 809 of file FourVectorHLTOffline.h.

Referenced by objMonData< T >::setRecoMu().

template<class T >
mmset objMonData< T >::OffMCDRMatchSet

Definition at line 625 of file FourVectorHLTOnline.h.

template<class T >
mmset objMonData< T >::OnL1DRMatchSet

Definition at line 624 of file FourVectorHLTOnline.h.

template<class T >
mmset objMonData< T >::OnMCDRMatchSet

Definition at line 623 of file FourVectorHLTOnline.h.

template<class T >
mmset objMonData< T >::OnOffDRMatchSet

Definition at line 622 of file FourVectorHLTOnline.h.

template<class T >
int objMonData< T >::pdgId_
private

Definition at line 636 of file FourVectorHLTOnline.h.

template<class T >
int objMonData< T >::pdgStatus_
private

Definition at line 637 of file FourVectorHLTOnline.h.

template<class T >
float objMonData< T >::thresholdFactor_
private

Definition at line 798 of file FourVectorHLTOffline.h.

Referenced by objMonData< T >::setLimits().

template<class T >
std::vector< int > objMonData< T >::triggerType_
private
template<class T >
FourVectorHLTOnline::PathInfoCollection::iterator objMonData< T >::v_
private

Definition at line 652 of file FourVectorHLTOnline.h.

Referenced by objMonData< T >::setPath().

template<class T >
FourVectorHLTOffline::PathInfoCollection::iterator objMonData< T >::v_
private

Definition at line 812 of file FourVectorHLTOffline.h.