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
objMon< T > Class Template Reference

#include <FourVectorHLTriggerOffline.h>

Public Member Functions

void clearSets ()
 
void fillL1Match (FourVectorHLTriggerOffline *fv)
 
void fillL1MCMatch (FourVectorHLTriggerOffline *fv)
 
void fillL1OffMatch (FourVectorHLTriggerOffline *fv)
 
void fillMC ()
 
void fillOff ()
 
void fillOffMatch (FourVectorHLTriggerOffline *fv)
 
void fillOffMCMatch (FourVectorHLTriggerOffline *fv)
 
void fillOnL1Match (FourVectorHLTriggerOffline *fv, const trigger::Keys &l1k, const trigger::TriggerObjectCollection &toc)
 
void fillOnlineMatch (FourVectorHLTriggerOffline *fv, const trigger::Keys &l1k, const trigger::TriggerObjectCollection &toc)
 
void fillOnMCMatch (FourVectorHLTriggerOffline *fv)
 
void fillOnOffMatch (FourVectorHLTriggerOffline *fv)
 
bool hasBPartonInCone (reco::GenJetCollection::const_iterator gjet, float coneSize)
 
bool isL1TriggerType (int t)
 
bool isTriggerType (int t)
 
void monitorDenominator (FourVectorHLTriggerOffline::PathInfoCollection::iterator v, bool l1accept, const trigger::Vids &idtype, const trigger::Keys &l1k, const trigger::TriggerObjectCollection &toc)
 
void monitorL1 (const trigger::Vids &idtype, const trigger::Keys &l1k, const trigger::TriggerObjectCollection &toc)
 
void monitorOffline (FourVectorHLTriggerOffline *fv)
 
void monitorOnline (const trigger::Vids &idtype, const trigger::Keys &l1k, trigger::Keys::const_iterator ki, const trigger::TriggerObjectCollection &toc, unsigned int &NOn)
 
 objMon ()
 
void pushL1TriggerType (int trigType)
 
void pushTriggerType (int trigType)
 
void setBJetsFlag (bool flag)
 
void setGenJets (bool flag, edm::Handle< reco::GenJetCollection > genJets)
 
void setL1TriggerType (std::vector< int > trigType)
 
void setLimits (float etaMax, float etMin, float drMatch)
 
void setMC (edm::Handle< reco::GenParticleCollection > genParticles, int pdgId, int status)
 
void setPath (FourVectorHLTriggerOffline::PathInfoCollection::iterator v)
 
void setReco (edm::Handle< T > offColl)
 
void setRecoB (edm::Handle< reco::JetTagCollection > offCollB)
 
void setTriggerType (std::vector< int > trigType)
 

Public Attributes

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

Private Attributes

bool BJetsFlag_
 
float DRMatch_
 
float EtaMax_
 
float EtMin_
 
edm::Handle
< reco::GenJetCollection
genJets_
 
bool GenJetsFlag_
 
edm::Handle
< reco::GenParticleCollection
genParticles_
 
std::vector< int > l1triggerType_
 
edm::Handle< T > offColl_
 
edm::Handle
< reco::JetTagCollection
offCollB_
 
int pdgId_
 
int pdgStatus_
 
std::vector< int > triggerType_
 
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
 

Detailed Description

template<class T>
class objMon< T >

Definition at line 649 of file FourVectorHLTriggerOffline.h.

Constructor & Destructor Documentation

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

Member Function Documentation

template<class T >
void objMon< T >::clearSets ( void  )

Definition at line 1919 of file FourVectorHLTriggerOffline.h.

Referenced by FourVectorHLTriggerOffline::analyze().

1920 {
1921 
1922  L1OffDRMatchSet.clear();
1923  L1MCDRMatchSet.clear();
1924  OnOffDRMatchSet.clear();
1925  OnMCDRMatchSet.clear();
1926  OnL1DRMatchSet.clear();
1927  OffMCDRMatchSet.clear();
1928 
1929 }
template<class T >
void objMon< T >::fillL1Match ( FourVectorHLTriggerOffline fv)
inline

Definition at line 681 of file FourVectorHLTriggerOffline.h.

References objMon< T >::fillL1MCMatch(), and objMon< T >::fillL1OffMatch().

682  {
683  fillL1OffMatch(fv);
684  fillL1MCMatch(fv);
685  }
void fillL1OffMatch(FourVectorHLTriggerOffline *fv)
void fillL1MCMatch(FourVectorHLTriggerOffline *fv)
template<class T >
void objMon< T >::fillL1MCMatch ( FourVectorHLTriggerOffline fv)

Definition at line 1591 of file FourVectorHLTriggerOffline.h.

References FourVectorHLTriggerOffline::cleanDRMatchSet(), prof2calltree::count, reco::LeafCandidate::eta(), i, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

Referenced by objMon< T >::fillL1Match().

1592 {
1593 
1594  unsigned int NL1Mc=0;
1595 
1596  if(GenJetsFlag_)
1597  {
1598 
1599  if (! genJets_.isValid()) return;
1600 
1601  // clean the set L1-MC
1602  if(L1MCDRMatchSet.size() > 1) fv->cleanDRMatchSet(L1MCDRMatchSet);
1603 
1604  float NL1Mc=0;
1605 
1606  // now fill histos
1607  for ( mmset::iterator setIter = L1MCDRMatchSet.begin( ); setIter != L1MCDRMatchSet.end( ); setIter++ )
1608  {
1609 
1610  fimmap tempMap = *setIter;
1611 
1612  fimmap::iterator it = tempMap.begin();
1613  int i = (*it).second ;
1614  float dR = (*it).first;
1615 
1616  v_->getMcDRL1McHisto()->Fill(dR);
1617 
1618  if (dR > DRMatch_) continue;
1619 
1620  reco::GenJetCollection::const_iterator gjet=genJets_->begin();
1621  for (int count = 0; count < i; count++) gjet++;
1622 
1623  NL1Mc++;
1624  v_->getMcEtL1McHisto()->Fill(gjet->pt());
1625  v_->getMcEtaVsMcPhiL1McHisto()->Fill(gjet->eta(),gjet->phi());
1626 
1627 
1628  } // end for set
1629 
1630  } // end if GenJetsFlag_
1631  else if( genParticles_.isValid()) {
1632 
1633  // clean the set L1-MC
1634  if(L1MCDRMatchSet.size() > 1) fv->cleanDRMatchSet(L1MCDRMatchSet);
1635 
1636  // now fill histos
1637  for ( mmset::iterator setIter = L1MCDRMatchSet.begin( ); setIter != L1MCDRMatchSet.end( ); setIter++ )
1638  {
1639 
1640  fimmap tempMap = *setIter;
1641 
1642  fimmap::iterator it = tempMap.begin();
1643  int i = (*it).second ;
1644  float dR = (*it).first;
1645 
1646  v_->getMcDRL1McHisto()->Fill(dR);
1647 
1648  if (dR > DRMatch_) continue;
1649 
1650  const reco::GenParticle & p = (*genParticles_)[i];
1651 
1652  NL1Mc++;
1653  v_->getMcEtL1McHisto()->Fill(p.pt());
1654  v_->getMcEtaVsMcPhiL1McHisto()->Fill(p.eta(),p.phi());
1655 
1656  } // end for
1657 
1658  } // end else if
1659 
1660  v_->getNL1McHisto()->Fill(NL1Mc);
1661 
1662 }
edm::Handle< reco::GenJetCollection > genJets_
int i
Definition: DBlmapReader.cc:9
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
std::multimap< float, int > fimmap
virtual double eta() const
momentum pseudorapidity
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
edm::Handle< reco::GenParticleCollection > genParticles_
bool isValid() const
Definition: HandleBase.h:76
virtual double pt() const
transverse momentum
virtual double phi() const
momentum azimuthal angle
template<class T >
void objMon< T >::fillL1OffMatch ( FourVectorHLTriggerOffline fv)

Definition at line 1538 of file FourVectorHLTriggerOffline.h.

References FourVectorHLTriggerOffline::cleanDRMatchSet(), prof2calltree::count, and i.

Referenced by objMon< T >::fillL1Match().

1539 {
1540 
1541  float NL1Off=0;
1542 
1543  if(L1OffDRMatchSet.size() > 1) fv->cleanDRMatchSet(L1OffDRMatchSet);
1544 
1545  // clean the set L1-Off
1546  // now fill histos
1547  for ( mmset::iterator setIter = L1OffDRMatchSet.begin( ); setIter != L1OffDRMatchSet.end( ); setIter++ )
1548  {
1549 
1550  fimmap tempMap = *setIter;
1551 
1552  fimmap::iterator it = tempMap.begin();
1553  int i = (*it).second ;
1554  float dR = (*it).first;
1555  v_->getOffDRL1OffHisto()->Fill(dR);
1556 
1557  if (dR > DRMatch_) continue;
1558  if( offCollB_.isValid()) {
1559 
1560  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1561  const_iterator iter = offCollB_->begin();
1562  for (int count = 0; count < i; count++) iter++;
1563 
1564 
1565  NL1Off++;
1566  v_->getOffEtL1OffHisto()->Fill((*iter).first->pt());
1567  v_->getOffEtaVsOffPhiL1OffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());
1568 
1569 
1570  }
1571  else if( offColl_.isValid()) {
1572 
1573  typedef typename T::const_iterator const_iterator;
1574  const_iterator iter = offColl_->begin();
1575  for (int count = 0; count < i; count++) iter++;
1576 
1577 
1578  NL1Off++;
1579  v_->getOffEtL1OffHisto()->Fill(iter->pt());
1580  v_->getOffEtaVsOffPhiL1OffHisto()->Fill(iter->eta(),iter->phi());
1581 
1582  }
1583 
1584  }
1585 
1586  v_->getNL1OffHisto()->Fill(NL1Off);
1587 
1588 }
int i
Definition: DBlmapReader.cc:9
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
transient_vector_type::const_iterator const_iterator
edm::Handle< T > offColl_
std::multimap< float, int > fimmap
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::JetTagCollection > offCollB_
template<class T >
void objMon< T >::fillMC ( )

Definition at line 861 of file FourVectorHLTriggerOffline.h.

References abs, reco::LeafCandidate::eta(), i, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::pdgId(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

862 {
863 
864  float NMc=0;
865 
866  if(GenJetsFlag_)
867  {
868 
869  if (! genJets_.isValid()) return;
870 
871  for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
872 
873  if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
874 
875  if(BJetsFlag_)
876  {
877  // this jet must have b in the cone
878  if(! hasBPartonInCone(gjet,0.7)) continue;
879 
880 
881  }
882 
883  NMc++;
884  v_->getMcEtMcHisto()->Fill(gjet->pt());
885  v_->getMcEtaVsMcPhiMcHisto()->Fill(gjet->eta(),gjet->phi());
886 
887 
888  } // end if Eta , Et
889 
890  } // end for
891 
892 
893  } // end if GenJetsFlag_
894  else if( genParticles_.isValid()) {
895 
896  for(size_t i = 0; i < genParticles_->size(); ++ i) {
897 
898  const reco::GenParticle & p = (*genParticles_)[i];
899  if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_ ){
900 
901  NMc++;
902  v_->getMcEtMcHisto()->Fill(p.pt());
903  v_->getMcEtaVsMcPhiMcHisto()->Fill(p.eta(),p.phi());
904 
905  }
906 
907  } // end for
908 
909  } // end if
910 
911  v_->getNMcHisto()->Fill(NMc);
912 
913 }
edm::Handle< reco::GenJetCollection > genJets_
int i
Definition: DBlmapReader.cc:9
virtual int pdgId() const
PDG identifier.
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
virtual int status() const
status word
bool hasBPartonInCone(reco::GenJetCollection::const_iterator gjet, float coneSize)
#define abs(x)
Definition: mlp_lapack.h:159
virtual double eta() const
momentum pseudorapidity
edm::Handle< reco::GenParticleCollection > genParticles_
bool isValid() const
Definition: HandleBase.h:76
virtual double pt() const
transverse momentum
virtual double phi() const
momentum azimuthal angle
template<class T >
void objMon< T >::fillOff ( )

Definition at line 809 of file FourVectorHLTriggerOffline.h.

810 {
811 
812  unsigned int NOff = 0;
813 
814  if( offCollB_.isValid()) {
815  typedef typename reco::JetTagCollection::const_iterator const_iterator;
816  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
817  {
818 
819  float recoEta = (*iter).first->eta();
820  float recoPhi = (*iter).first->phi();
821  float recoPt = (*iter).first->pt();
822 
823 
824  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
825  {
826 
827  NOff++;
828  v_->getOffEtOffHisto()->Fill(recoPt);
829  v_->getOffEtaVsOffPhiOffHisto()->Fill(recoEta, recoPhi);
830 
831  }
832 
833  }
834 
835  }
836  else if(offColl_.isValid()) {
837 
838  typedef typename T::const_iterator const_iterator;
839  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
840  {
841 
842 
843  if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >= EtMin_ )
844  {
845 
846  NOff++;
847  v_->getOffEtOffHisto()->Fill(iter->pt());
848  v_->getOffEtaVsOffPhiOffHisto()->Fill(iter->eta(), iter->phi());
849 
850  }
851 
852  }
853 
854  } // end else if
855 
856  v_->getNOffHisto()->Fill(NOff);
857 
858 }
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
transient_vector_type::const_iterator const_iterator
edm::Handle< T > offColl_
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::JetTagCollection > offCollB_
template<class T >
void objMon< T >::fillOffMatch ( FourVectorHLTriggerOffline fv)
inline

Definition at line 703 of file FourVectorHLTriggerOffline.h.

References objMon< T >::fillOffMCMatch(), objMon< T >::isTriggerType(), and objMon< T >::v_.

704  {
705  if(! isTriggerType(v_->getObjectType()) ) return;
706  fillOffMCMatch(fv);
707  }
bool isTriggerType(int t)
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
void fillOffMCMatch(FourVectorHLTriggerOffline *fv)
template<class T >
void objMon< T >::fillOffMCMatch ( FourVectorHLTriggerOffline fv)

Definition at line 1789 of file FourVectorHLTriggerOffline.h.

References FourVectorHLTriggerOffline::cleanDRMatchSet(), prof2calltree::count, reco::LeafCandidate::eta(), i, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

Referenced by objMon< T >::fillOffMatch().

1790 {
1791 
1792  unsigned int NOffMc=0;
1793 
1794  if(GenJetsFlag_)
1795  {
1796 
1797  if (! genJets_.isValid()) return;
1798 
1799  // clean the set L1-MC
1800  if(OffMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OffMCDRMatchSet);
1801 
1802  // now fill histos
1803  for ( mmset::iterator setIter = OffMCDRMatchSet.begin( ); setIter != OffMCDRMatchSet.end( ); setIter++ )
1804  {
1805 
1806  fimmap tempMap = *setIter;
1807 
1808  fimmap::iterator it = tempMap.begin();
1809  int i = (*it).second ;
1810  float dR = (*it).first;
1811  v_->getMcDROffMcHisto()->Fill(dR);
1812 
1813  if (dR > DRMatch_) continue;
1814 
1815  reco::GenJetCollection::const_iterator gjet=genJets_->begin();
1816  for (int count = 0; count < i; count++) gjet++;
1817 
1818  NOffMc++;
1819  v_->getMcEtOffMcHisto()->Fill(gjet->pt());
1820  v_->getMcEtaVsMcPhiOffMcHisto()->Fill(gjet->eta(),gjet->phi());
1821 
1822  } // end for set
1823 
1824  } // end if GenJetsFlag_
1825  else if( genParticles_.isValid() && offColl_.isValid()) {
1826 
1827  // clean the set L1-MC
1828  if(OffMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OffMCDRMatchSet);
1829 
1830  // now fill histos
1831  for ( mmset::iterator setIter = OffMCDRMatchSet.begin( ); setIter != OffMCDRMatchSet.end( ); setIter++ )
1832  {
1833 
1834  fimmap tempMap = *setIter;
1835 
1836  fimmap::iterator it = tempMap.begin();
1837  int i = (*it).second ;
1838  float dR = (*it).first;
1839  v_->getMcDROffMcHisto()->Fill(dR);
1840 
1841  if (dR > DRMatch_) continue;
1842 
1843  const reco::GenParticle & p = (*genParticles_)[i];
1844 
1845  NOffMc++;
1846  v_->getMcEtOffMcHisto()->Fill(p.pt());
1847  v_->getMcEtaVsMcPhiOffMcHisto()->Fill(p.eta(),p.phi());
1848 
1849  }
1850 
1851  }
1852 
1853  v_->getNOffMcHisto()->Fill(NOffMc);
1854 
1855 }
edm::Handle< reco::GenJetCollection > genJets_
int i
Definition: DBlmapReader.cc:9
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
edm::Handle< T > offColl_
std::multimap< float, int > fimmap
virtual double eta() const
momentum pseudorapidity
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
edm::Handle< reco::GenParticleCollection > genParticles_
bool isValid() const
Definition: HandleBase.h:76
virtual double pt() const
transverse momentum
virtual double phi() const
momentum azimuthal angle
template<class T >
void objMon< T >::fillOnL1Match ( FourVectorHLTriggerOffline fv,
const trigger::Keys l1k,
const trigger::TriggerObjectCollection toc 
)

Definition at line 1858 of file FourVectorHLTriggerOffline.h.

References FourVectorHLTriggerOffline::cleanDRMatchSet(), prof2calltree::count, eta(), i, phi, and ExpressReco_HICollisions_FallBack::pt.

Referenced by objMon< T >::fillOnlineMatch().

1859 {
1860 
1861  unsigned int NOnL1=0;
1862 
1863  // clean the set On-L1
1864  if(OnL1DRMatchSet.size() > 1) fv->cleanDRMatchSet(OnL1DRMatchSet);
1865  // now fill histos
1866  for ( mmset::iterator setIter = OnL1DRMatchSet.begin( ); setIter != OnL1DRMatchSet.end( ); setIter++ )
1867  {
1868 
1869  fimmap tempMap = *setIter;
1870 
1871  fimmap::iterator it = tempMap.begin();
1872  int i = (*it).second ;
1873  float dR = (*it).first;
1874  v_->getL1DROnL1Histo()->Fill(dR);
1875 
1876  if (dR > DRMatch_) continue;
1877 
1878  trigger::Keys::const_iterator l1ki = l1k.begin();
1879  for (int count = 0; count < i; count++) l1ki++;
1880 
1881  NOnL1++;
1882  v_->getL1EtL1OnHisto()->Fill(toc[*l1ki].pt());
1883  v_->getL1EtaVsL1PhiL1OnHisto()->Fill(toc[*l1ki].eta(),toc[*l1ki].phi());
1884 
1885  }
1886 
1887  v_->getNL1OnHisto()->Fill(NOnL1);
1888 
1889 }
int i
Definition: DBlmapReader.cc:9
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
std::multimap< float, int > fimmap
T eta() const
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
Definition: DDAxes.h:10
template<class T >
void objMon< T >::fillOnlineMatch ( FourVectorHLTriggerOffline fv,
const trigger::Keys l1k,
const trigger::TriggerObjectCollection toc 
)
inline

Definition at line 692 of file FourVectorHLTriggerOffline.h.

References objMon< T >::fillOnL1Match(), objMon< T >::fillOnMCMatch(), objMon< T >::fillOnOffMatch(), objMon< T >::isTriggerType(), and objMon< T >::v_.

693  {
694 
695  if(! isTriggerType(v_->getObjectType()) ) return;
696  fillOnOffMatch(fv);
697  fillOnMCMatch(fv);
698  fillOnL1Match(fv, l1k, toc);
699 
700  }
bool isTriggerType(int t)
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
void fillOnOffMatch(FourVectorHLTriggerOffline *fv)
void fillOnMCMatch(FourVectorHLTriggerOffline *fv)
void fillOnL1Match(FourVectorHLTriggerOffline *fv, const trigger::Keys &l1k, const trigger::TriggerObjectCollection &toc)
template<class T >
void objMon< T >::fillOnMCMatch ( FourVectorHLTriggerOffline fv)

Definition at line 1719 of file FourVectorHLTriggerOffline.h.

References FourVectorHLTriggerOffline::cleanDRMatchSet(), prof2calltree::count, reco::LeafCandidate::eta(), i, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

Referenced by objMon< T >::fillOnlineMatch().

1720 {
1721 
1722  unsigned int NOnMc=0;
1723 
1724  if(GenJetsFlag_)
1725  {
1726 
1727  if (! genJets_.isValid()) return;
1728 
1729  // clean the set L1-MC
1730  if(OnMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OnMCDRMatchSet);
1731 
1732  // now fill histos
1733  for ( mmset::iterator setIter = OnMCDRMatchSet.begin( ); setIter != OnMCDRMatchSet.end( ); setIter++ )
1734  {
1735 
1736  fimmap tempMap = *setIter;
1737 
1738  fimmap::iterator it = tempMap.begin();
1739  int i = (*it).second ;
1740  float dR = (*it).first;
1741  v_->getMcDROnMcHisto()->Fill(dR);
1742 
1743  if (dR > DRMatch_) continue;
1744 
1745  reco::GenJetCollection::const_iterator gjet=genJets_->begin();
1746  for (int count = 0; count < i; count++) gjet++;
1747 
1748 
1749  NOnMc++;
1750  v_->getMcEtOnMcHisto()->Fill(gjet->pt());
1751  v_->getMcEtaVsMcPhiOnMcHisto()->Fill(gjet->eta(),gjet->phi());
1752 
1753  } // end for set
1754 
1755  } // end if GenJetsFlag_
1756  else if( genParticles_.isValid()) {
1757 
1758  // clean the set L1-MC
1759  if(OnMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OnMCDRMatchSet);
1760 
1761  // now fill histos
1762  for ( mmset::iterator setIter = OnMCDRMatchSet.begin( ); setIter != OnMCDRMatchSet.end( ); setIter++ )
1763  {
1764 
1765  fimmap tempMap = *setIter;
1766 
1767  fimmap::iterator it = tempMap.begin();
1768  int i = (*it).second ;
1769  float dR = (*it).first;
1770  v_->getMcDROnMcHisto()->Fill(dR);
1771 
1772  if (dR > DRMatch_) continue;
1773 
1774  const reco::GenParticle & p = (*genParticles_)[i];
1775 
1776  NOnMc++;
1777  v_->getMcEtOnMcHisto()->Fill(p.pt());
1778  v_->getMcEtaVsMcPhiOnMcHisto()->Fill(p.eta(),p.phi());
1779 
1780  }
1781 
1782  }
1783 
1784  v_->getNOnMcHisto()->Fill(NOnMc);
1785 
1786 }
edm::Handle< reco::GenJetCollection > genJets_
int i
Definition: DBlmapReader.cc:9
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
std::multimap< float, int > fimmap
virtual double eta() const
momentum pseudorapidity
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
edm::Handle< reco::GenParticleCollection > genParticles_
bool isValid() const
Definition: HandleBase.h:76
virtual double pt() const
transverse momentum
virtual double phi() const
momentum azimuthal angle
template<class T >
void objMon< T >::fillOnOffMatch ( FourVectorHLTriggerOffline fv)

Definition at line 1665 of file FourVectorHLTriggerOffline.h.

References FourVectorHLTriggerOffline::cleanDRMatchSet(), prof2calltree::count, and i.

Referenced by objMon< T >::fillOnlineMatch().

1666 {
1667 
1668  unsigned int NOnOff=0;
1669 
1670  // clean the set L1-Off
1671  if(OnOffDRMatchSet.size() > 1) fv->cleanDRMatchSet(OnOffDRMatchSet);
1672  // now fill histos
1673  for ( mmset::iterator setIter = OnOffDRMatchSet.begin( ); setIter != OnOffDRMatchSet.end( ); setIter++ )
1674  {
1675 
1676 
1677  fimmap tempMap = *setIter;
1678 
1679  fimmap::iterator it = tempMap.begin();
1680  int i = (*it).second ;
1681  float dR = (*it).first;
1682  v_->getOffDROnOffHisto()->Fill(dR);
1683 
1684 
1685  if (dR > DRMatch_) continue;
1686 
1687  if( offCollB_.isValid()) {
1688 
1689 
1690  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1691  const_iterator iter = offCollB_->begin();
1692  for (int count = 0; count < i; count++) iter++;
1693 
1694 
1695  NOnOff++;
1696  v_->getOffEtOnOffHisto()->Fill((*iter).first->pt());
1697  v_->getOffEtaVsOffPhiOnOffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());
1698 
1699  }
1700  else if( offColl_.isValid()) {
1701 
1702  typedef typename T::const_iterator const_iterator;
1703  const_iterator iter = offColl_->begin();
1704  for (int count = 0; count < i; count++) iter++;
1705 
1706  NOnOff++;
1707  v_->getOffEtOnOffHisto()->Fill(iter->pt());
1708  v_->getOffEtaVsOffPhiOnOffHisto()->Fill(iter->eta(),iter->phi());
1709 
1710  }
1711 
1712  }
1713 
1714  v_->getNOnOffHisto()->Fill(NOnOff);
1715 
1716 }
int i
Definition: DBlmapReader.cc:9
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
transient_vector_type::const_iterator const_iterator
edm::Handle< T > offColl_
std::multimap< float, int > fimmap
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
bool isValid() const
Definition: HandleBase.h:76
edm::Handle< reco::JetTagCollection > offCollB_
template<class T >
bool objMon< T >::hasBPartonInCone ( reco::GenJetCollection::const_iterator  gjet,
float  coneSize 
)

Definition at line 1892 of file FourVectorHLTriggerOffline.h.

References abs, reco::deltaR(), reco::LeafCandidate::eta(), i, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::pdgId(), and reco::LeafCandidate::phi().

1893 {
1894 
1895  bool rc = false;
1896  if (! genParticles_.isValid()) return rc;
1897 
1898  for(size_t i = 0; i < genParticles_->size(); ++ i) {
1899 
1900  const reco::GenParticle & p = (*genParticles_)[i];
1901  if (abs(p.pdgId()) == 5){
1902 
1903  if (reco::deltaR(p.eta(),p.phi(),gjet->eta(),gjet->phi()) < coneSize){
1904 
1905  rc = true;
1906 
1907  }
1908 
1909  }
1910 
1911  }
1912 
1913 
1914  return rc;
1915 
1916 }
int i
Definition: DBlmapReader.cc:9
virtual int pdgId() const
PDG identifier.
#define abs(x)
Definition: mlp_lapack.h:159
virtual double eta() const
momentum pseudorapidity
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
edm::Handle< reco::GenParticleCollection > genParticles_
bool isValid() const
Definition: HandleBase.h:76
virtual double phi() const
momentum azimuthal angle
template<class T >
bool objMon< T >::isL1TriggerType ( int  t)

Definition at line 776 of file FourVectorHLTriggerOffline.h.

777 {
778  bool rc = false;
779 
780  for(std::vector<int>::const_iterator it = l1triggerType_.begin(); it != l1triggerType_.end(); ++it)
781  {
782 
783  if(t == *it) { rc = true; break; }
784 
785  } // end for
786 
787  return rc;
788 
789 }
std::vector< int > l1triggerType_
template<class T >
bool objMon< T >::isTriggerType ( int  t)

Definition at line 759 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::fillOffMatch(), and objMon< T >::fillOnlineMatch().

760 {
761  bool rc = false;
762 
763  for(std::vector<int>::const_iterator it = triggerType_.begin(); it != triggerType_.end(); ++it)
764  {
765 
766  if(t == *it) { rc = true; break; }
767 
768  } // end for
769 
770  return rc;
771 
772 }
std::vector< int > triggerType_
template<class T >
void objMon< T >::monitorDenominator ( FourVectorHLTriggerOffline::PathInfoCollection::iterator  v,
bool  l1accept,
const trigger::Vids idtype,
const trigger::Keys l1k,
const trigger::TriggerObjectCollection toc 
)

Definition at line 792 of file FourVectorHLTriggerOffline.h.

793 {
794 
795  setPath(v);
796 
797  if(! isTriggerType(v_->getObjectType()) ) return;
798 
799  fillMC();
800 
801  fillOff();
802 
803  if (l1accept) monitorL1(idtype, l1k, toc);
804 
805 
806 }
bool isTriggerType(int t)
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
void monitorL1(const trigger::Vids &idtype, const trigger::Keys &l1k, const trigger::TriggerObjectCollection &toc)
void setPath(FourVectorHLTriggerOffline::PathInfoCollection::iterator v)
mathSSE::Vec4< T > v
template<class T >
void objMon< T >::monitorL1 ( const trigger::Vids idtype,
const trigger::Keys l1k,
const trigger::TriggerObjectCollection toc 
)

Definition at line 916 of file FourVectorHLTriggerOffline.h.

References abs, reco::deltaR(), trigger::TriggerObject::eta(), reco::LeafCandidate::eta(), i, j, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::pdgId(), trigger::TriggerObject::phi(), reco::LeafCandidate::phi(), trigger::TriggerObject::pt(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

917 {
918 
919  unsigned int NL1=0;
920  unsigned int NL1McUM=0;
921  unsigned int NL1OffUM=0;
922 
923  trigger::Vids::const_iterator idtypeiter = idtype.begin();
924  for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {
925 
926  trigger::TriggerObject l1FV = toc[*l1ki];
927  if(isL1TriggerType(*idtypeiter))
928  {
929 
930  NL1++;
931 
932 
933  if (fabs(l1FV.eta()) <= EtaMax_ && l1FV.pt() >= EtMin_)
934  {
935 
936  v_->getL1EtL1Histo()->Fill(l1FV.pt());
937  v_->getL1EtaVsL1PhiL1Histo()->Fill(l1FV.eta(), l1FV.phi());
938 
939  }
940 
941  fimmap L1OffDRMatchMap;
942 
943  if (offCollB_.isValid()) {
944 
945  int j=0;
946  typedef typename reco::JetTagCollection::const_iterator const_iterator;
947  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
948  {
949 
950  float recoEta = (*iter).first->eta();
951  float recoPhi = (*iter).first->phi();
952  float recoPt = (*iter).first->pt();
953 
954  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
955  {
956 
957  // fill UM histos (no matching required)
958  if(NL1 == 1) {
959 
960  NL1OffUM++;
961  v_->getOffEtL1OffUMHisto()->Fill(recoPt);
962  v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(recoEta,recoPhi);
963 
964  }
965 
966  // make maps of matched objects
967  float dR = reco::deltaR(recoEta,recoPhi,l1FV.eta(),l1FV.phi());
968  if ( dR < 1.0)
969  {
970 
971  L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));
972 
973  }
974 
975  }
976 
977  j++;
978 
979  }
980 
981  }
982  else if (offColl_.isValid()) {
983 
984  int j=0;
985  typedef typename T::const_iterator const_iterator;
986  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
987  {
988 
989  if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >= EtMin_ )
990  {
991 
992  // fill UM histos (no matching required)
993  if(NL1 == 1) {
994 
995  NL1OffUM++;
996  v_->getOffEtL1OffUMHisto()->Fill(iter->pt());
997  v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(iter->eta(),iter->phi());
998 
999  }
1000 
1001  // make maps of matched objects
1002  float dR = reco::deltaR(iter->eta(),iter->phi(),l1FV.eta(),l1FV.phi());
1003  if ( dR < 1.0)
1004  {
1005 
1006  L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));
1007 
1008  }
1009 
1010  }
1011 
1012  j++;
1013 
1014  }
1015 
1016  }
1017  if(! L1OffDRMatchMap.empty()) L1OffDRMatchSet.insert(L1OffDRMatchMap);
1018 
1019  // fillL1MCUM
1021 
1022  if (GenJetsFlag_ && genJets_.isValid())
1023  {
1024 
1025  fimmap L1MCDRMatchMap;
1026  int j=0;
1027 
1028  for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
1029 
1030  if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
1031 
1032  if (BJetsFlag_) {
1033 
1034  // this jet must have b in the cone
1035  if(! hasBPartonInCone(gjet,0.7)) {
1036 
1037  j++;
1038  continue;
1039 
1040  }
1041 
1042  }
1043 
1044  // fill UM histos (no matching required)
1045  if(NL1 == 1) {
1046 
1047  NL1McUM++;
1048  v_->getMcEtL1McUMHisto()->Fill(gjet->pt());
1049  v_->getMcEtaVsMcPhiL1McUMHisto()->Fill(gjet->eta(),gjet->phi());
1050 
1051  }
1052 
1053  // make maps of matched objects
1054  float dR = reco::deltaR(gjet->eta(),gjet->phi(),l1FV.eta(),l1FV.phi());
1055  if ( dR < 1.0)
1056  {
1057 
1058  L1MCDRMatchMap.insert(std::pair<float,int>(dR,j));
1059 
1060  }
1061 
1062 
1063  } // end if eta, Et
1064 
1065  j++;
1066 
1067  } // end for genJets
1068 
1069  if(! L1MCDRMatchMap.empty()) {
1070  L1MCDRMatchSet.insert(L1MCDRMatchMap);
1071  }
1072 
1073  } // end if genJets
1074  else if ( ! GenJetsFlag_ && genParticles_.isValid())
1075  {
1076 
1077  fimmap L1MCDRMatchMap;
1078  for(size_t i = 0; i < genParticles_->size(); ++ i)
1079  {
1080 
1081  const reco::GenParticle & p = (*genParticles_)[i];
1082  if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_)
1083  {
1084 
1085  // fill UM histos (no matching required)
1086  if(NL1 == 1) {
1087 
1088  NL1McUM++;
1089  v_->getMcEtL1McUMHisto()->Fill(p.pt());
1090  v_->getMcEtaVsMcPhiL1McUMHisto()->Fill(p.eta(),p.phi());
1091 
1092  }
1093 
1094  // make maps of matched objects
1095  float dR = reco::deltaR(p.eta(),p.phi(),l1FV.eta(),l1FV.phi());
1096  if ( dR < 1.0)
1097  {
1098 
1099  L1MCDRMatchMap.insert(std::pair<float,int>(dR,i));
1100 
1101  }
1102 
1103  } // end if pdg, status, eta, pt
1104  } // end for
1105 
1106  if(! L1MCDRMatchMap.empty()) {
1107  L1MCDRMatchSet.insert(L1MCDRMatchMap);
1108  }
1109 
1110  } // end if genParticle_
1111 
1112  } // end if isL1TriggerType
1113  ++idtypeiter;
1114 
1115  } // end for l1ki
1116 
1117  v_->getNL1Histo()->Fill(NL1);
1118  v_->getNL1OffUMHisto()->Fill(NL1OffUM);
1119  v_->getNL1McUMHisto()->Fill(NL1McUM);
1120 
1121 }
edm::Handle< reco::GenJetCollection > genJets_
int i
Definition: DBlmapReader.cc:9
virtual int pdgId() const
PDG identifier.
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
transient_vector_type::const_iterator const_iterator
float phi() const
Definition: TriggerObject.h:60
edm::Handle< T > offColl_
virtual int status() const
status word
bool hasBPartonInCone(reco::GenJetCollection::const_iterator gjet, float coneSize)
std::multimap< float, int > fimmap
#define abs(x)
Definition: mlp_lapack.h:159
float eta() const
Definition: TriggerObject.h:59
virtual double eta() const
momentum pseudorapidity
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
edm::Handle< reco::GenParticleCollection > genParticles_
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
virtual double pt() const
transverse momentum
edm::Handle< reco::JetTagCollection > offCollB_
virtual double phi() const
momentum azimuthal angle
bool isL1TriggerType(int t)
template<class T >
void objMon< T >::monitorOffline ( FourVectorHLTriggerOffline fv)

Definition at line 1370 of file FourVectorHLTriggerOffline.h.

References abs, reco::deltaR(), reco::LeafCandidate::eta(), i, j, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::pdgId(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

1371 {
1372 
1373  unsigned int NOff=0;
1374  unsigned int NOffMcUM=0;
1375 
1376  if(! isTriggerType(v_->getObjectType()) ) return;
1377 
1378 
1379  if(offCollB_.isValid()) {
1380 
1381  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1382  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
1383  {
1384 
1385  NOff++;
1386 
1387  if (GenJetsFlag_ && genJets_.isValid())
1388  {
1389 
1390  fimmap OffMCDRMatchMap;
1391  int j=0;
1392 
1393  for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
1394 
1395 
1396  if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
1397 
1398  if (BJetsFlag_ && hasBPartonInCone(gjet,0.7)) {
1399 
1400 
1401  // fill UM histos (no matching required)
1402  if(NOff == 1) {
1403 
1404  NOffMcUM++;
1405  v_->getMcEtOffMcUMHisto()->Fill(gjet->pt());
1406  v_->getMcEtaVsMcPhiOffMcUMHisto()->Fill(gjet->eta(),gjet->phi());
1407 
1408  }
1409 
1410  // make maps of matched objects
1411  float dR = reco::deltaR(gjet->eta(),gjet->phi(),(*iter).first->eta(),(*iter).first->phi());
1412  if ( dR < 1.0)
1413  {
1414 
1415  OffMCDRMatchMap.insert(std::pair<float,int>(dR,j));
1416 
1417  }
1418 
1419  } // end if BJetsFlag_ and hasBParton
1420 
1421  } // end if eta, Et
1422 
1423  j++;
1424 
1425  } // end for genJets
1426 
1427  if(! OffMCDRMatchMap.empty()) OffMCDRMatchSet.insert(OffMCDRMatchMap);
1428 
1429  } // end if genJets
1430 
1431  } // end for offline objects
1432 
1433  } // end if
1434  else if(offColl_.isValid()) {
1435 
1436  typedef typename T::const_iterator const_iterator;
1437  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
1438  {
1439 
1440  NOff++;
1441 
1442  if (GenJetsFlag_ && genJets_.isValid())
1443  {
1444 
1445  fimmap OffMCDRMatchMap;
1446  int j=0;
1447 
1448  for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
1449 
1450  if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
1451 
1452  if (BJetsFlag_) {
1453 
1454  // this jet must have b in the cone
1455  if(! hasBPartonInCone(gjet,0.7)) {
1456 
1457  j++;
1458  continue;
1459 
1460  }
1461 
1462  }
1463 
1464  // fill UM histos (no matching required)
1465  if(NOff == 1) {
1466 
1467  NOffMcUM++;
1468  v_->getMcEtOffMcUMHisto()->Fill(gjet->pt());
1469  v_->getMcEtaVsMcPhiOffMcUMHisto()->Fill(gjet->eta(),gjet->phi());
1470 
1471  }
1472 
1473  // make maps of matched objects
1474  float dR = reco::deltaR(gjet->eta(),gjet->phi(),iter->eta(),iter->phi());
1475  if ( dR < 1.0)
1476  {
1477 
1478  OffMCDRMatchMap.insert(std::pair<float,int>(dR,j));
1479 
1480  }
1481 
1482  } // end if eta, Et
1483 
1484  j++;
1485 
1486  } // end for genJets
1487 
1488  if(! OffMCDRMatchMap.empty()) OffMCDRMatchSet.insert(OffMCDRMatchMap);
1489 
1490  } // end if genJets
1491 
1492  else if (!GenJetsFlag_ && genParticles_.isValid())
1493  {
1494 
1495  fimmap OffMCDRMatchMap;
1496  for(size_t i = 0; i < genParticles_->size(); ++ i)
1497  {
1498 
1499  const reco::GenParticle & p = (*genParticles_)[i];
1500  if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_)
1501  {
1502 
1503  // fill UM histos (no matching required)
1504  if(NOff == 1) {
1505 
1506  NOffMcUM++;
1507  v_->getMcEtOffMcUMHisto()->Fill(p.pt());
1508  v_->getMcEtaVsMcPhiOffMcUMHisto()->Fill(p.eta(),p.phi());
1509 
1510  }
1511 
1512  // make maps of matched objects
1513  float dR = reco::deltaR(p.eta(),p.phi(),iter->eta(),iter->phi());
1514  if ( dR < 1.0)
1515  {
1516 
1517  OffMCDRMatchMap.insert(std::pair<float,int>(dR,i));
1518 
1519  }
1520 
1521  } // end if pdg, status, eta, pt
1522  } // end for
1523 
1524  if(! OffMCDRMatchMap.empty()) OffMCDRMatchSet.insert(OffMCDRMatchMap);
1525 
1526  } // end if genParticle_
1527 
1528  } // end for offline objects
1529 
1530  } // end else if
1531 
1532  v_->getNOffHisto()->Fill(NOff);
1533  v_->getNOffMcUMHisto()->Fill(NOffMcUM);
1534 
1535 }
edm::Handle< reco::GenJetCollection > genJets_
bool isTriggerType(int t)
int i
Definition: DBlmapReader.cc:9
virtual int pdgId() const
PDG identifier.
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
transient_vector_type::const_iterator const_iterator
edm::Handle< T > offColl_
virtual int status() const
status word
bool hasBPartonInCone(reco::GenJetCollection::const_iterator gjet, float coneSize)
std::multimap< float, int > fimmap
#define abs(x)
Definition: mlp_lapack.h:159
virtual double eta() const
momentum pseudorapidity
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
edm::Handle< reco::GenParticleCollection > genParticles_
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
virtual double pt() const
transverse momentum
edm::Handle< reco::JetTagCollection > offCollB_
virtual double phi() const
momentum azimuthal angle
template<class T >
void objMon< T >::monitorOnline ( const trigger::Vids idtype,
const trigger::Keys l1k,
trigger::Keys::const_iterator  ki,
const trigger::TriggerObjectCollection toc,
unsigned int &  NOn 
)

Definition at line 1124 of file FourVectorHLTriggerOffline.h.

References abs, reco::deltaR(), trigger::TriggerObject::eta(), reco::LeafCandidate::eta(), i, j, L1TEmulatorMonitor_cff::p, reco::LeafCandidate::pdgId(), trigger::TriggerObject::phi(), reco::LeafCandidate::phi(), trigger::TriggerObject::pt(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

1125 {
1126 
1127 
1128  unsigned int NOnOffUM=0;
1129  unsigned int NOnMcUM=0;
1130  unsigned int NOnL1UM=0;
1131 
1132  if(! isTriggerType(v_->getObjectType()) ) return;
1133 
1134  trigger::TriggerObject onlineFV = toc[*ki];
1135 
1136  NOn++;
1137 
1138  if (fabs(onlineFV.eta()) <= EtaMax_ && onlineFV.pt() >= EtMin_)
1139  {
1140 
1141  v_->getOnEtOnHisto()->Fill(onlineFV.pt());
1142  v_->getOnEtaVsOnPhiOnHisto()->Fill(onlineFV.eta(), onlineFV.phi());
1143 
1144  }
1145 
1146 
1147  fimmap OnOffDRMatchMap;
1148 
1149  if (offCollB_.isValid()) {
1150 
1151  int j=0;
1152  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1153  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
1154  {
1155 
1156  float recoEta = (*iter).first->eta();
1157  float recoPhi = (*iter).first->phi();
1158  float recoPt = (*iter).first->pt();
1159 
1160  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
1161  {
1162 
1163  // fill UM histos (no matching required)
1164  if(NOn == 1) {
1165 
1166  NOnOffUM++;
1167  v_->getOffEtOnOffUMHisto()->Fill(recoPt);
1168  v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(recoEta,recoPhi);
1169 
1170  }
1171 
1172  // make maps of matched objects
1173  float dR = reco::deltaR(recoEta,recoPhi,onlineFV.eta(),onlineFV.phi());
1174  if ( dR < 1.0)
1175  {
1176 
1177  OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));
1178 
1179  }
1180 
1181  }
1182 
1183  j++;
1184 
1185  }
1186 
1187  }
1188  else if (offColl_.isValid()) {
1189 
1190  int j=0;
1191 
1192  typedef typename T::const_iterator const_iterator;
1193  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
1194  {
1195 
1196  if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >= EtMin_ )
1197  {
1198 
1199  // fill UM histos (no matching required)
1200  if(NOn == 1) {
1201 
1202  NOnOffUM++;
1203  v_->getOffEtOnOffUMHisto()->Fill(iter->pt());
1204  v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(iter->eta(),iter->phi());
1205 
1206  }
1207 
1208  // make maps of matched objects
1209  float dR = reco::deltaR(iter->eta(),iter->phi(),onlineFV.eta(),onlineFV.phi());
1210  if ( dR < 1.0)
1211  {
1212 
1213  OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));
1214 
1215  }
1216 
1217  }
1218 
1219  j++;
1220 
1221 
1222  }
1223 
1224  }
1225 
1226  if(! OnOffDRMatchMap.empty()) OnOffDRMatchSet.insert(OnOffDRMatchMap);
1227 
1228 
1229 
1230  fimmap OnL1DRMatchMap;
1231  int j=0;
1232  trigger::Vids::const_iterator idtypeiter = idtype.begin();
1233  for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki )
1234  {
1235 
1236 
1237 
1238  if(isL1TriggerType(*idtypeiter))
1239  {
1240 
1241  trigger::TriggerObject l1FV = toc[*l1ki];
1242 
1243  if ( fabs(l1FV.eta()) <= EtaMax_ && l1FV.pt() >= EtMin_ )
1244  {
1245 
1246  // fill UM histos (no matching required)
1247  if(NOn == 1) {
1248 
1249  NOnL1UM++;
1250  v_->getL1EtL1OnUMHisto()->Fill(l1FV.pt());
1251  v_->getL1EtaVsL1PhiL1OnUMHisto()->Fill(l1FV.eta(),l1FV.phi());
1252 
1253  }
1254 
1255 
1256  float dR = reco::deltaR(l1FV.eta(),l1FV.phi(),onlineFV.eta(),onlineFV.phi());
1257 
1258  if ( dR < 1.0)
1259  {
1260 
1261  OnL1DRMatchMap.insert(std::pair<float,int>(dR,j));
1262 
1263  }
1264 
1265  } // end if l1FV eta, pt
1266 
1267  } // end if isL1TriggerType
1268 
1269  ++idtypeiter;
1270  j++;
1271 
1272  } // end for
1273 
1274  if(! OnL1DRMatchMap.empty()) OnL1DRMatchSet.insert(OnL1DRMatchMap);
1275 
1276  // fillOnMCUM
1278 
1279  if (GenJetsFlag_ && genJets_.isValid())
1280  {
1281 
1282  fimmap OnMCDRMatchMap;
1283  int j=0;
1284 
1285  for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
1286 
1287  if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
1288 
1289  if (BJetsFlag_) {
1290 
1291  // this jet must have b in the cone
1292  if(! hasBPartonInCone(gjet,0.7)) {
1293 
1294  j++;
1295  continue;
1296 
1297  }
1298 
1299  }
1300  // fill UM histos (no matching required)
1301  if(NOn == 1) {
1302 
1303  NOnMcUM++;
1304  v_->getMcEtOnMcUMHisto()->Fill(gjet->pt());
1305  v_->getMcEtaVsMcPhiOnMcUMHisto()->Fill(gjet->eta(),gjet->phi());
1306 
1307  }
1308 
1309  // make maps of matched objects
1310  float dR = reco::deltaR(gjet->eta(),gjet->phi(),onlineFV.eta(),onlineFV.phi());
1311  if ( dR < 1.0)
1312  {
1313 
1314  OnMCDRMatchMap.insert(std::pair<float,int>(dR,j));
1315 
1316  }
1317 
1318  } // end if eta, Et
1319 
1320  j++;
1321 
1322  } // end for genJets
1323 
1324  if(! OnMCDRMatchMap.empty()) OnMCDRMatchSet.insert(OnMCDRMatchMap);
1325 
1326  } // end if genJets
1327  else if (!GenJetsFlag_ && genParticles_.isValid())
1328  {
1329 
1330  fimmap OnMCDRMatchMap;
1331  for(size_t i = 0; i < genParticles_->size(); ++ i)
1332  {
1333 
1334  const reco::GenParticle & p = (*genParticles_)[i];
1335  if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_)
1336  {
1337 
1338  // fill UM histos (no matching required)
1339  if(NOn == 1) {
1340 
1341  NOnMcUM++;
1342  v_->getMcEtOnMcUMHisto()->Fill(p.pt());
1343  v_->getMcEtaVsMcPhiOnMcUMHisto()->Fill(p.eta(),p.phi());
1344 
1345  }
1346 
1347  // make maps of matched objects
1348  float dR = reco::deltaR(p.eta(),p.phi(),onlineFV.eta(),onlineFV.phi());
1349  if ( dR < 1.0)
1350  {
1351 
1352  OnMCDRMatchMap.insert(std::pair<float,int>(dR,i));
1353 
1354  }
1355  } // end if
1356  } // end for
1357 
1358  if(! OnMCDRMatchMap.empty()) OnMCDRMatchSet.insert(OnMCDRMatchMap);
1359 
1360  }
1361 
1362  v_->getNOnHisto()->Fill(NOn);
1363  v_->getNOnOffUMHisto()->Fill(NOnOffUM);
1364  v_->getNL1OnUMHisto()->Fill(NOnL1UM);
1365  v_->getNOnMcUMHisto()->Fill(NOnMcUM);
1366 
1367 }
edm::Handle< reco::GenJetCollection > genJets_
bool isTriggerType(int t)
int i
Definition: DBlmapReader.cc:9
virtual int pdgId() const
PDG identifier.
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
transient_vector_type::const_iterator const_iterator
float phi() const
Definition: TriggerObject.h:60
edm::Handle< T > offColl_
virtual int status() const
status word
bool hasBPartonInCone(reco::GenJetCollection::const_iterator gjet, float coneSize)
std::multimap< float, int > fimmap
#define abs(x)
Definition: mlp_lapack.h:159
float eta() const
Definition: TriggerObject.h:59
virtual double eta() const
momentum pseudorapidity
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:24
edm::Handle< reco::GenParticleCollection > genParticles_
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
virtual double pt() const
transverse momentum
edm::Handle< reco::JetTagCollection > offCollB_
virtual double phi() const
momentum azimuthal angle
bool isL1TriggerType(int t)
template<class T >
void objMon< T >::pushL1TriggerType ( int  trigType)
inline

Definition at line 661 of file FourVectorHLTriggerOffline.h.

References objMon< T >::l1triggerType_.

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

Definition at line 659 of file FourVectorHLTriggerOffline.h.

References objMon< T >::triggerType_.

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

Definition at line 727 of file FourVectorHLTriggerOffline.h.

References objMon< T >::BJetsFlag_.

728  {
729  BJetsFlag_ = flag;
730  }
long int flag
Definition: mlp_lapack.h:47
template<class T >
void objMon< T >::setGenJets ( bool  flag,
edm::Handle< reco::GenJetCollection genJets 
)
inline

Definition at line 722 of file FourVectorHLTriggerOffline.h.

References objMon< T >::genJets_, and objMon< T >::GenJetsFlag_.

723  {
724  GenJetsFlag_ = flag;
725  genJets_ = genJets;
726  }
edm::Handle< reco::GenJetCollection > genJets_
long int flag
Definition: mlp_lapack.h:47
template<class T >
void objMon< T >::setL1TriggerType ( std::vector< int >  trigType)
inline

Definition at line 660 of file FourVectorHLTriggerOffline.h.

References objMon< T >::l1triggerType_.

660 { l1triggerType_ = trigType; }
std::vector< int > l1triggerType_
template<class T >
void objMon< T >::setLimits ( float  etaMax,
float  etMin,
float  drMatch 
)
inline
template<class T >
void objMon< T >::setMC ( edm::Handle< reco::GenParticleCollection genParticles,
int  pdgId,
int  status 
)
inline
template<class T >
void objMon< T >::setPath ( FourVectorHLTriggerOffline::PathInfoCollection::iterator  v)
inline

Definition at line 662 of file FourVectorHLTriggerOffline.h.

References v, and objMon< T >::v_.

662 { v_ = v; }
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
mathSSE::Vec4< T > v
template<class T >
void objMon< T >::setReco ( edm::Handle< T >  offColl)
inline

Definition at line 663 of file FourVectorHLTriggerOffline.h.

References objMon< T >::offColl_.

Referenced by FourVectorHLTriggerOffline::analyze().

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

Definition at line 664 of file FourVectorHLTriggerOffline.h.

References objMon< T >::offCollB_.

Referenced by FourVectorHLTriggerOffline::analyze().

664 { offCollB_ = offCollB; }
edm::Handle< reco::JetTagCollection > offCollB_
template<class T >
void objMon< T >::setTriggerType ( std::vector< int >  trigType)
inline

Definition at line 658 of file FourVectorHLTriggerOffline.h.

References objMon< T >::triggerType_.

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

Member Data Documentation

template<class T >
bool objMon< T >::BJetsFlag_
private

Definition at line 744 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::objMon(), and objMon< T >::setBJetsFlag().

template<class T >
float objMon< T >::DRMatch_
private

Definition at line 741 of file FourVectorHLTriggerOffline.h.

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

template<class T >
float objMon< T >::EtaMax_
private

Definition at line 738 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::objMon(), and objMon< T >::setLimits().

template<class T >
float objMon< T >::EtMin_
private

Definition at line 739 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::objMon(), and objMon< T >::setLimits().

template<class T >
edm::Handle<reco::GenJetCollection> objMon< T >::genJets_
private

Definition at line 753 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::setGenJets().

template<class T >
bool objMon< T >::GenJetsFlag_
private

Definition at line 743 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::objMon(), and objMon< T >::setGenJets().

template<class T >
edm::Handle<reco::GenParticleCollection> objMon< T >::genParticles_
private

Definition at line 752 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::setMC().

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

Definition at line 715 of file FourVectorHLTriggerOffline.h.

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

Definition at line 714 of file FourVectorHLTriggerOffline.h.

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

Definition at line 749 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 750 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 719 of file FourVectorHLTriggerOffline.h.

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

Definition at line 718 of file FourVectorHLTriggerOffline.h.

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

Definition at line 717 of file FourVectorHLTriggerOffline.h.

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

Definition at line 716 of file FourVectorHLTriggerOffline.h.

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

Definition at line 735 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::setMC().

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

Definition at line 736 of file FourVectorHLTriggerOffline.h.

Referenced by objMon< T >::setMC().

template<class T >
std::vector<int> objMon< T >::triggerType_
private
template<class T >
FourVectorHLTriggerOffline::PathInfoCollection::iterator objMon< T >::v_
private