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 (const 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 (const 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< ToffColl_
 
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 663 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 1933 of file FourVectorHLTriggerOffline.h.

Referenced by FourVectorHLTriggerOffline::analyze().

1934 {
1935 
1936  L1OffDRMatchSet.clear();
1937  L1MCDRMatchSet.clear();
1938  OnOffDRMatchSet.clear();
1939  OnMCDRMatchSet.clear();
1940  OnL1DRMatchSet.clear();
1941  OffMCDRMatchSet.clear();
1942 
1943 }
template<class T >
void objMon< T >::fillL1Match ( FourVectorHLTriggerOffline fv)
inline

Definition at line 695 of file FourVectorHLTriggerOffline.h.

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

696  {
697  fillL1OffMatch(fv);
698  fillL1MCMatch(fv);
699  }
void fillL1OffMatch(FourVectorHLTriggerOffline *fv)
void fillL1MCMatch(FourVectorHLTriggerOffline *fv)
template<class T >
void objMon< T >::fillL1MCMatch ( FourVectorHLTriggerOffline fv)

Definition at line 1605 of file FourVectorHLTriggerOffline.h.

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

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

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

Definition at line 1552 of file FourVectorHLTriggerOffline.h.

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

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

1553 {
1554 
1555  float NL1Off=0;
1556 
1557  if(L1OffDRMatchSet.size() > 1) fv->cleanDRMatchSet(L1OffDRMatchSet);
1558 
1559  // clean the set L1-Off
1560  // now fill histos
1561  for ( mmset::iterator setIter = L1OffDRMatchSet.begin( ); setIter != L1OffDRMatchSet.end( ); setIter++ )
1562  {
1563 
1564  fimmap tempMap = *setIter;
1565 
1566  fimmap::iterator it = tempMap.begin();
1567  int i = (*it).second ;
1568  float dR = (*it).first;
1569  v_->getOffDRL1OffHisto()->Fill(dR);
1570 
1571  if (dR > DRMatch_) continue;
1572  if( offCollB_.isValid()) {
1573 
1574  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1575  const_iterator iter = offCollB_->begin();
1576  for (int count = 0; count < i; count++) iter++;
1577 
1578 
1579  NL1Off++;
1580  v_->getOffEtL1OffHisto()->Fill((*iter).first->pt());
1581  v_->getOffEtaVsOffPhiL1OffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());
1582 
1583 
1584  }
1585  else if( offColl_.isValid()) {
1586 
1587  typedef typename T::const_iterator const_iterator;
1588  const_iterator iter = offColl_->begin();
1589  for (int count = 0; count < i; count++) iter++;
1590 
1591 
1592  NL1Off++;
1593  v_->getOffEtL1OffHisto()->Fill(iter->pt());
1594  v_->getOffEtaVsOffPhiL1OffHisto()->Fill(iter->eta(),iter->phi());
1595 
1596  }
1597 
1598  }
1599 
1600  v_->getNL1OffHisto()->Fill(NL1Off);
1601 
1602 }
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 875 of file FourVectorHLTriggerOffline.h.

References funct::abs(), reco::LeafCandidate::eta(), i, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::modulesNew::pdgId_(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

876 {
877 
878  float NMc=0;
879 
880  if(GenJetsFlag_)
881  {
882 
883  if (! genJets_.isValid()) return;
884 
885  for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
886 
887  if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
888 
889  if(BJetsFlag_)
890  {
891  // this jet must have b in the cone
892  if(! hasBPartonInCone(gjet,0.7)) continue;
893 
894 
895  }
896 
897  NMc++;
898  v_->getMcEtMcHisto()->Fill(gjet->pt());
899  v_->getMcEtaVsMcPhiMcHisto()->Fill(gjet->eta(),gjet->phi());
900 
901 
902  } // end if Eta , Et
903 
904  } // end for
905 
906 
907  } // end if GenJetsFlag_
908  else if( genParticles_.isValid()) {
909 
910  for(size_t i = 0; i < genParticles_->size(); ++ i) {
911 
912  const reco::GenParticle & p = (*genParticles_)[i];
913  if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_ ){
914 
915  NMc++;
916  v_->getMcEtMcHisto()->Fill(p.pt());
917  v_->getMcEtaVsMcPhiMcHisto()->Fill(p.eta(),p.phi());
918 
919  }
920 
921  } // end for
922 
923  } // end if
924 
925  v_->getNMcHisto()->Fill(NMc);
926 
927 }
edm::Handle< reco::GenJetCollection > genJets_
int i
Definition: DBlmapReader.cc:9
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
virtual int pdgId() const GCC11_FINAL
PDG identifier.
bool hasBPartonInCone(reco::GenJetCollection::const_iterator gjet, float coneSize)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual int status() const GCC11_FINAL
status word
edm::Handle< reco::GenParticleCollection > genParticles_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:76
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
virtual float pt() const GCC11_FINAL
transverse momentum
template<class T >
void objMon< T >::fillOff ( )

Definition at line 823 of file FourVectorHLTriggerOffline.h.

824 {
825 
826  unsigned int NOff = 0;
827 
828  if( offCollB_.isValid()) {
829  typedef typename reco::JetTagCollection::const_iterator const_iterator;
830  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
831  {
832 
833  float recoEta = (*iter).first->eta();
834  float recoPhi = (*iter).first->phi();
835  float recoPt = (*iter).first->pt();
836 
837 
838  if (fabs(recoEta) <= EtaMax_ && recoPt >= EtMin_ )
839  {
840 
841  NOff++;
842  v_->getOffEtOffHisto()->Fill(recoPt);
843  v_->getOffEtaVsOffPhiOffHisto()->Fill(recoEta, recoPhi);
844 
845  }
846 
847  }
848 
849  }
850  else if(offColl_.isValid()) {
851 
852  typedef typename T::const_iterator const_iterator;
853  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
854  {
855 
856 
857  if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >= EtMin_ )
858  {
859 
860  NOff++;
861  v_->getOffEtOffHisto()->Fill(iter->pt());
862  v_->getOffEtaVsOffPhiOffHisto()->Fill(iter->eta(), iter->phi());
863 
864  }
865 
866  }
867 
868  } // end else if
869 
870  v_->getNOffHisto()->Fill(NOff);
871 
872 }
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 717 of file FourVectorHLTriggerOffline.h.

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

718  {
719  if(! isTriggerType(v_->getObjectType()) ) return;
720  fillOffMCMatch(fv);
721  }
bool isTriggerType(int t)
FourVectorHLTriggerOffline::PathInfoCollection::iterator v_
void fillOffMCMatch(FourVectorHLTriggerOffline *fv)
template<class T >
void objMon< T >::fillOffMCMatch ( FourVectorHLTriggerOffline fv)

Definition at line 1803 of file FourVectorHLTriggerOffline.h.

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

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

1804 {
1805 
1806  unsigned int NOffMc=0;
1807 
1808  if(GenJetsFlag_)
1809  {
1810 
1811  if (! genJets_.isValid()) return;
1812 
1813  // clean the set L1-MC
1814  if(OffMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OffMCDRMatchSet);
1815 
1816  // now fill histos
1817  for ( mmset::iterator setIter = OffMCDRMatchSet.begin( ); setIter != OffMCDRMatchSet.end( ); setIter++ )
1818  {
1819 
1820  fimmap tempMap = *setIter;
1821 
1822  fimmap::iterator it = tempMap.begin();
1823  int i = (*it).second ;
1824  float dR = (*it).first;
1825  v_->getMcDROffMcHisto()->Fill(dR);
1826 
1827  if (dR > DRMatch_) continue;
1828 
1829  reco::GenJetCollection::const_iterator gjet=genJets_->begin();
1830  for (int count = 0; count < i; count++) gjet++;
1831 
1832  NOffMc++;
1833  v_->getMcEtOffMcHisto()->Fill(gjet->pt());
1834  v_->getMcEtaVsMcPhiOffMcHisto()->Fill(gjet->eta(),gjet->phi());
1835 
1836  } // end for set
1837 
1838  } // end if GenJetsFlag_
1839  else if( genParticles_.isValid() && offColl_.isValid()) {
1840 
1841  // clean the set L1-MC
1842  if(OffMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OffMCDRMatchSet);
1843 
1844  // now fill histos
1845  for ( mmset::iterator setIter = OffMCDRMatchSet.begin( ); setIter != OffMCDRMatchSet.end( ); setIter++ )
1846  {
1847 
1848  fimmap tempMap = *setIter;
1849 
1850  fimmap::iterator it = tempMap.begin();
1851  int i = (*it).second ;
1852  float dR = (*it).first;
1853  v_->getMcDROffMcHisto()->Fill(dR);
1854 
1855  if (dR > DRMatch_) continue;
1856 
1857  const reco::GenParticle & p = (*genParticles_)[i];
1858 
1859  NOffMc++;
1860  v_->getMcEtOffMcHisto()->Fill(p.pt());
1861  v_->getMcEtaVsMcPhiOffMcHisto()->Fill(p.eta(),p.phi());
1862 
1863  }
1864 
1865  }
1866 
1867  v_->getNOffMcHisto()->Fill(NOffMc);
1868 
1869 }
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 float phi() const GCC11_FINAL
momentum azimuthal angle
void cleanDRMatchSet(mmset &tempSet)
Clean DR Match Set.
edm::Handle< reco::GenParticleCollection > genParticles_
bool isValid() const
Definition: HandleBase.h:76
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
virtual float pt() const GCC11_FINAL
transverse momentum
template<class T >
void objMon< T >::fillOnL1Match ( FourVectorHLTriggerOffline fv,
const trigger::Keys l1k,
const trigger::TriggerObjectCollection toc 
)

Definition at line 1872 of file FourVectorHLTriggerOffline.h.

References FourVectorHLTriggerOffline::cleanDRMatchSet(), prof2calltree::count, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, eta(), i, phi, and RecoTauCleanerPlugins::pt.

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

1873 {
1874 
1875  unsigned int NOnL1=0;
1876 
1877  // clean the set On-L1
1878  if(OnL1DRMatchSet.size() > 1) fv->cleanDRMatchSet(OnL1DRMatchSet);
1879  // now fill histos
1880  for ( mmset::iterator setIter = OnL1DRMatchSet.begin( ); setIter != OnL1DRMatchSet.end( ); setIter++ )
1881  {
1882 
1883  fimmap tempMap = *setIter;
1884 
1885  fimmap::iterator it = tempMap.begin();
1886  int i = (*it).second ;
1887  float dR = (*it).first;
1888  v_->getL1DROnL1Histo()->Fill(dR);
1889 
1890  if (dR > DRMatch_) continue;
1891 
1892  trigger::Keys::const_iterator l1ki = l1k.begin();
1893  for (int count = 0; count < i; count++) l1ki++;
1894 
1895  NOnL1++;
1896  v_->getL1EtL1OnHisto()->Fill(toc[*l1ki].pt());
1897  v_->getL1EtaVsL1PhiL1OnHisto()->Fill(toc[*l1ki].eta(),toc[*l1ki].phi());
1898 
1899  }
1900 
1901  v_->getNL1OnHisto()->Fill(NOnL1);
1902 
1903 }
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 706 of file FourVectorHLTriggerOffline.h.

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

707  {
708 
709  if(! isTriggerType(v_->getObjectType()) ) return;
710  fillOnOffMatch(fv);
711  fillOnMCMatch(fv);
712  fillOnL1Match(fv, l1k, toc);
713 
714  }
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 1733 of file FourVectorHLTriggerOffline.h.

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

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

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

Definition at line 1679 of file FourVectorHLTriggerOffline.h.

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

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

1680 {
1681 
1682  unsigned int NOnOff=0;
1683 
1684  // clean the set L1-Off
1685  if(OnOffDRMatchSet.size() > 1) fv->cleanDRMatchSet(OnOffDRMatchSet);
1686  // now fill histos
1687  for ( mmset::iterator setIter = OnOffDRMatchSet.begin( ); setIter != OnOffDRMatchSet.end( ); setIter++ )
1688  {
1689 
1690 
1691  fimmap tempMap = *setIter;
1692 
1693  fimmap::iterator it = tempMap.begin();
1694  int i = (*it).second ;
1695  float dR = (*it).first;
1696  v_->getOffDROnOffHisto()->Fill(dR);
1697 
1698 
1699  if (dR > DRMatch_) continue;
1700 
1701  if( offCollB_.isValid()) {
1702 
1703 
1704  typedef typename reco::JetTagCollection::const_iterator const_iterator;
1705  const_iterator iter = offCollB_->begin();
1706  for (int count = 0; count < i; count++) iter++;
1707 
1708 
1709  NOnOff++;
1710  v_->getOffEtOnOffHisto()->Fill((*iter).first->pt());
1711  v_->getOffEtaVsOffPhiOnOffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());
1712 
1713  }
1714  else if( offColl_.isValid()) {
1715 
1716  typedef typename T::const_iterator const_iterator;
1717  const_iterator iter = offColl_->begin();
1718  for (int count = 0; count < i; count++) iter++;
1719 
1720  NOnOff++;
1721  v_->getOffEtOnOffHisto()->Fill(iter->pt());
1722  v_->getOffEtaVsOffPhiOnOffHisto()->Fill(iter->eta(),iter->phi());
1723 
1724  }
1725 
1726  }
1727 
1728  v_->getNOnOffHisto()->Fill(NOnOff);
1729 
1730 }
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 1906 of file FourVectorHLTriggerOffline.h.

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

1907 {
1908 
1909  bool rc = false;
1910  if (! genParticles_.isValid()) return rc;
1911 
1912  for(size_t i = 0; i < genParticles_->size(); ++ i) {
1913 
1914  const reco::GenParticle & p = (*genParticles_)[i];
1915  if (abs(p.pdgId()) == 5){
1916 
1917  if (reco::deltaR(p.eta(),p.phi(),gjet->eta(),gjet->phi()) < coneSize){
1918 
1919  rc = true;
1920 
1921  }
1922 
1923  }
1924 
1925  }
1926 
1927 
1928  return rc;
1929 
1930 }
int i
Definition: DBlmapReader.cc:9
virtual int pdgId() const GCC11_FINAL
PDG identifier.
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
edm::Handle< reco::GenParticleCollection > genParticles_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
bool isValid() const
Definition: HandleBase.h:76
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
template<class T >
bool objMon< T >::isL1TriggerType ( int  t)

Definition at line 790 of file FourVectorHLTriggerOffline.h.

791 {
792  bool rc = false;
793 
794  for(std::vector<int>::const_iterator it = l1triggerType_.begin(); it != l1triggerType_.end(); ++it)
795  {
796 
797  if(t == *it) { rc = true; break; }
798 
799  } // end for
800 
801  return rc;
802 
803 }
std::vector< int > l1triggerType_
template<class T >
bool objMon< T >::isTriggerType ( int  t)

Definition at line 773 of file FourVectorHLTriggerOffline.h.

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

774 {
775  bool rc = false;
776 
777  for(std::vector<int>::const_iterator it = triggerType_.begin(); it != triggerType_.end(); ++it)
778  {
779 
780  if(t == *it) { rc = true; break; }
781 
782  } // end for
783 
784  return rc;
785 
786 }
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 806 of file FourVectorHLTriggerOffline.h.

References fireworks::setPath().

807 {
808 
809  setPath(v);
810 
811  if(! isTriggerType(v_->getObjectType()) ) return;
812 
813  fillMC();
814 
815  fillOff();
816 
817  if (l1accept) monitorL1(idtype, l1k, toc);
818 
819 
820 }
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)
template<class T >
void objMon< T >::monitorL1 ( const trigger::Vids idtype,
const trigger::Keys l1k,
const trigger::TriggerObjectCollection toc 
)

Definition at line 930 of file FourVectorHLTriggerOffline.h.

References funct::abs(), reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, trigger::TriggerObject::eta(), reco::LeafCandidate::eta(), i, j, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::modulesNew::pdgId_(), trigger::TriggerObject::phi(), reco::LeafCandidate::phi(), trigger::TriggerObject::pt(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

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

Definition at line 1384 of file FourVectorHLTriggerOffline.h.

References funct::abs(), reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, reco::LeafCandidate::eta(), i, j, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::modulesNew::pdgId_(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

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

References funct::abs(), reco::deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, trigger::TriggerObject::eta(), reco::LeafCandidate::eta(), i, j, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::modulesNew::pdgId_(), trigger::TriggerObject::phi(), reco::LeafCandidate::phi(), trigger::TriggerObject::pt(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

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

Definition at line 675 of file FourVectorHLTriggerOffline.h.

References objMon< T >::l1triggerType_.

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

Definition at line 673 of file FourVectorHLTriggerOffline.h.

References objMon< T >::triggerType_.

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

Definition at line 741 of file FourVectorHLTriggerOffline.h.

References objMon< T >::BJetsFlag_.

742  {
743  BJetsFlag_ = flag;
744  }
template<class T >
void objMon< T >::setGenJets ( bool  flag,
edm::Handle< reco::GenJetCollection genJets 
)
inline

Definition at line 736 of file FourVectorHLTriggerOffline.h.

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

737  {
738  GenJetsFlag_ = flag;
739  genJets_ = genJets;
740  }
edm::Handle< reco::GenJetCollection > genJets_
template<class T >
void objMon< T >::setL1TriggerType ( const std::vector< int > &  trigType)
inline

Definition at line 674 of file FourVectorHLTriggerOffline.h.

References objMon< T >::l1triggerType_.

674 { l1triggerType_ = trigType; }
std::vector< int > l1triggerType_
template<class T >
void objMon< T >::setLimits ( float  etaMax,
float  etMin,
float  drMatch 
)
inline

Definition at line 666 of file FourVectorHLTriggerOffline.h.

References objMon< T >::DRMatch_, objMon< T >::EtaMax_, and objMon< T >::EtMin_.

667  {
668  EtaMax_= etaMax;
669  EtMin_= etMin;
670  DRMatch_= drMatch;
671  }
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 676 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 677 of file FourVectorHLTriggerOffline.h.

References objMon< T >::offColl_.

Referenced by FourVectorHLTriggerOffline::analyze().

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

Definition at line 678 of file FourVectorHLTriggerOffline.h.

References objMon< T >::offCollB_.

Referenced by FourVectorHLTriggerOffline::analyze().

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

Definition at line 672 of file FourVectorHLTriggerOffline.h.

References objMon< T >::triggerType_.

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

Member Data Documentation

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

Definition at line 758 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 755 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 752 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 753 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 767 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 757 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 766 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 729 of file FourVectorHLTriggerOffline.h.

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

Definition at line 728 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 763 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 764 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 733 of file FourVectorHLTriggerOffline.h.

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

Definition at line 732 of file FourVectorHLTriggerOffline.h.

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

Definition at line 731 of file FourVectorHLTriggerOffline.h.

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

Definition at line 730 of file FourVectorHLTriggerOffline.h.

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

Definition at line 749 of file FourVectorHLTriggerOffline.h.

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

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

Definition at line 750 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