CMS 3D CMS Logo

Public Member Functions | Public Attributes | Private Attributes

objMon< T > Class Template Reference

#include <FourVectorHLTriggerOffline.h>

List of all members.

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< 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 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().

{

     L1OffDRMatchSet.clear();
     L1MCDRMatchSet.clear();
     OnOffDRMatchSet.clear();
     OnMCDRMatchSet.clear();
     OnL1DRMatchSet.clear();
     OffMCDRMatchSet.clear();

}
template<class T >
void objMon< T >::fillL1Match ( FourVectorHLTriggerOffline fv) [inline]
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, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

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

{

        unsigned int NL1Mc=0;

  if(GenJetsFlag_)
  {
  
   if (! genJets_.isValid()) return;

         // clean the set L1-MC
         if(L1MCDRMatchSet.size() > 1) fv->cleanDRMatchSet(L1MCDRMatchSet);

         float NL1Mc=0;

        // now fill histos
  for ( mmset::iterator setIter = L1MCDRMatchSet.begin( ); setIter != L1MCDRMatchSet.end( ); setIter++ ) 
  {
  
       fimmap tempMap = *setIter;
         
       fimmap::iterator it = tempMap.begin(); 
       int i  = (*it).second ;
                         float dR = (*it).first;

       v_->getMcDRL1McHisto()->Fill(dR);

       if (dR > DRMatch_) continue;

       reco::GenJetCollection::const_iterator gjet=genJets_->begin(); 
       for (int count = 0; count < i; count++) gjet++;
  
                         NL1Mc++;
       v_->getMcEtL1McHisto()->Fill(gjet->pt());
       v_->getMcEtaVsMcPhiL1McHisto()->Fill(gjet->eta(),gjet->phi());

  
         } // end for set
  
  } // end if GenJetsFlag_
        else if( genParticles_.isValid()) {
  
        // clean the set L1-MC
        if(L1MCDRMatchSet.size() > 1) fv->cleanDRMatchSet(L1MCDRMatchSet);
  
        // now fill histos
    for ( mmset::iterator setIter = L1MCDRMatchSet.begin( ); setIter != L1MCDRMatchSet.end( ); setIter++ ) 
    {
  
       fimmap tempMap = *setIter;
         
       fimmap::iterator it = tempMap.begin(); 
       int i  = (*it).second ;
                 float dR = (*it).first;
  
       v_->getMcDRL1McHisto()->Fill(dR);
  
       if (dR > DRMatch_) continue;
  
       const reco::GenParticle & p = (*genParticles_)[i];

           NL1Mc++;
           v_->getMcEtL1McHisto()->Fill(p.pt());
           v_->getMcEtaVsMcPhiL1McHisto()->Fill(p.eta(),p.phi());
  
        } // end for

 } // end else if

 v_->getNL1McHisto()->Fill(NL1Mc);

}
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().

{

  float NL1Off=0;

  if(L1OffDRMatchSet.size() > 1) fv->cleanDRMatchSet(L1OffDRMatchSet);

        // clean the set L1-Off
        // now fill histos
  for ( mmset::iterator setIter = L1OffDRMatchSet.begin( ); setIter != L1OffDRMatchSet.end( ); setIter++ ) 
  {

       fimmap tempMap = *setIter;
         
       fimmap::iterator it = tempMap.begin(); 
       int i  = (*it).second ;
                         float dR = (*it).first;
             v_->getOffDRL1OffHisto()->Fill(dR);

       if (dR > DRMatch_) continue;
       if( offCollB_.isValid()) {

         typedef typename reco::JetTagCollection::const_iterator const_iterator;
                           const_iterator iter = offCollB_->begin();
         for (int count = 0; count < i; count++) iter++;


               NL1Off++;
               v_->getOffEtL1OffHisto()->Fill((*iter).first->pt());
               v_->getOffEtaVsOffPhiL1OffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());


                        }
      else if( offColl_.isValid()) {

         typedef typename T::const_iterator const_iterator;
                           const_iterator iter = offColl_->begin();
         for (int count = 0; count < i; count++) iter++;


               NL1Off++;
               v_->getOffEtL1OffHisto()->Fill(iter->pt());
               v_->getOffEtaVsOffPhiL1OffHisto()->Fill(iter->eta(),iter->phi());

                        }

        }

        v_->getNL1OffHisto()->Fill(NL1Off);

}
template<class T >
void objMon< T >::fillMC ( )

Definition at line 861 of file FourVectorHLTriggerOffline.h.

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

{

 float NMc=0; 

 if(GenJetsFlag_)
 {

        if (! genJets_.isValid()) return;

  for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {

    if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){

       if(BJetsFlag_)
       {
                                 // this jet must have b in the cone
         if(! hasBPartonInCone(gjet,0.7))  continue;


       }

                         NMc++;
       v_->getMcEtMcHisto()->Fill(gjet->pt());
       v_->getMcEtaVsMcPhiMcHisto()->Fill(gjet->eta(),gjet->phi());


    } // end if Eta , Et

  } // end for


 } // end if GenJetsFlag_
 else if( genParticles_.isValid()) {

 for(size_t i = 0; i < genParticles_->size(); ++ i) {

   const reco::GenParticle & p = (*genParticles_)[i];
   if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_ ){
    
                NMc++;
    v_->getMcEtMcHisto()->Fill(p.pt());
    v_->getMcEtaVsMcPhiMcHisto()->Fill(p.eta(),p.phi());

         }

 } // end for

 } // end if

 v_->getNMcHisto()->Fill(NMc);

}
template<class T >
void objMon< T >::fillOff ( )

Definition at line 809 of file FourVectorHLTriggerOffline.h.

{

 unsigned int NOff = 0;

 if( offCollB_.isValid()) {
  typedef typename reco::JetTagCollection::const_iterator const_iterator;
  for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
  {

          float recoEta = (*iter).first->eta();
          float recoPhi = (*iter).first->phi();
          float recoPt = (*iter).first->pt();


    if (fabs(recoEta) <= EtaMax_ && recoPt >=  EtMin_ )
    {
           
             NOff++;
       v_->getOffEtOffHisto()->Fill(recoPt);
       v_->getOffEtaVsOffPhiOffHisto()->Fill(recoEta, recoPhi);

    }

  }

 }
 else if(offColl_.isValid()) {

  typedef typename T::const_iterator const_iterator;
  for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
  {


   if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >=  EtMin_ )
   {

           NOff++;
     v_->getOffEtOffHisto()->Fill(iter->pt());
     v_->getOffEtaVsOffPhiOffHisto()->Fill(iter->eta(), iter->phi());

   }

  }

 } // end else if

 v_->getNOffHisto()->Fill(NOff);

}
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_.

                {
      if(! isTriggerType(v_->getObjectType()) ) return;
                  fillOffMCMatch(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, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

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

{

  unsigned int NOffMc=0;

  if(GenJetsFlag_)
  {
  
   if (! genJets_.isValid()) return;

         // clean the set L1-MC
         if(OffMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OffMCDRMatchSet);

        // now fill histos
  for ( mmset::iterator setIter = OffMCDRMatchSet.begin( ); setIter != OffMCDRMatchSet.end( ); setIter++ ) 
  {
  
       fimmap tempMap = *setIter;
         
       fimmap::iterator it = tempMap.begin(); 
       int i  = (*it).second ;
                         float dR = (*it).first;
             v_->getMcDROffMcHisto()->Fill(dR);

       if (dR > DRMatch_) continue;

       reco::GenJetCollection::const_iterator gjet=genJets_->begin(); 
       for (int count = 0; count < i; count++) gjet++;
  
       NOffMc++; 
       v_->getMcEtOffMcHisto()->Fill(gjet->pt());
       v_->getMcEtaVsMcPhiOffMcHisto()->Fill(gjet->eta(),gjet->phi());
  
         } // end for set

  } // end if GenJetsFlag_
        else if( genParticles_.isValid() && offColl_.isValid()) {

        // clean the set L1-MC
        if(OffMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OffMCDRMatchSet);

        // now fill histos
  for ( mmset::iterator setIter = OffMCDRMatchSet.begin( ); setIter != OffMCDRMatchSet.end( ); setIter++ ) 
  {

     fimmap tempMap = *setIter;
       
     fimmap::iterator it = tempMap.begin(); 
     int i  = (*it).second ;
                 float dR = (*it).first;
           v_->getMcDROffMcHisto()->Fill(dR);

     if (dR > DRMatch_) continue;
          
     const reco::GenParticle & p = (*genParticles_)[i];

           NOffMc++;
           v_->getMcEtOffMcHisto()->Fill(p.pt());
           v_->getMcEtaVsMcPhiOffMcHisto()->Fill(p.eta(),p.phi());

        }

 }

 v_->getNOffMcHisto()->Fill(NOffMc);

}
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, and phi.

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

{

  unsigned int NOnL1=0;

        // clean the set On-L1
        if(OnL1DRMatchSet.size() > 1) fv->cleanDRMatchSet(OnL1DRMatchSet);
        // now fill histos
  for ( mmset::iterator setIter = OnL1DRMatchSet.begin( ); setIter != OnL1DRMatchSet.end( ); setIter++ ) 
  {

    fimmap tempMap = *setIter;
      
    fimmap::iterator it = tempMap.begin(); 
    int i  = (*it).second ;
                float dR = (*it).first;
          v_->getL1DROnL1Histo()->Fill(dR);

    if (dR > DRMatch_) continue;

    trigger::Keys::const_iterator l1ki = l1k.begin();
    for (int count = 0; count < i; count++) l1ki++;

          NOnL1++;
          v_->getL1EtL1OnHisto()->Fill(toc[*l1ki].pt());
          v_->getL1EtaVsL1PhiL1OnHisto()->Fill(toc[*l1ki].eta(),toc[*l1ki].phi());

        }

  v_->getNL1OnHisto()->Fill(NOnL1);

}
template<class T >
void objMon< T >::fillOnlineMatch ( FourVectorHLTriggerOffline fv,
const trigger::Keys l1k,
const trigger::TriggerObjectCollection toc 
) [inline]
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, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::phi(), and reco::LeafCandidate::pt().

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

{

  unsigned int NOnMc=0;

  if(GenJetsFlag_)
  {
  
   if (! genJets_.isValid()) return;

         // clean the set L1-MC
         if(OnMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OnMCDRMatchSet);

        // now fill histos
  for ( mmset::iterator setIter = OnMCDRMatchSet.begin( ); setIter != OnMCDRMatchSet.end( ); setIter++ ) 
  {
  
       fimmap tempMap = *setIter;
         
       fimmap::iterator it = tempMap.begin(); 
       int i  = (*it).second ;
                         float dR = (*it).first;
             v_->getMcDROnMcHisto()->Fill(dR);

       if (dR > DRMatch_) continue;

       reco::GenJetCollection::const_iterator gjet=genJets_->begin(); 
       for (int count = 0; count < i; count++) gjet++;
  
  
       NOnMc++; 
       v_->getMcEtOnMcHisto()->Fill(gjet->pt());
       v_->getMcEtaVsMcPhiOnMcHisto()->Fill(gjet->eta(),gjet->phi());
  
         } // end for set
  
  } // end if GenJetsFlag_
        else if( genParticles_.isValid()) {

        // clean the set L1-MC
        if(OnMCDRMatchSet.size() > 1) fv->cleanDRMatchSet(OnMCDRMatchSet);

        // now fill histos
  for ( mmset::iterator setIter = OnMCDRMatchSet.begin( ); setIter != OnMCDRMatchSet.end( ); setIter++ ) 
  {

     fimmap tempMap = *setIter;
       
     fimmap::iterator it = tempMap.begin(); 
     int i  = (*it).second ;
                 float dR = (*it).first;
           v_->getMcDROnMcHisto()->Fill(dR);

     if (dR > DRMatch_) continue;
          
     const reco::GenParticle & p = (*genParticles_)[i];

           NOnMc++;
           v_->getMcEtOnMcHisto()->Fill(p.pt());
           v_->getMcEtaVsMcPhiOnMcHisto()->Fill(p.eta(),p.phi());

        }

 }

 v_->getNOnMcHisto()->Fill(NOnMc);

}
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().

{

  unsigned int NOnOff=0;

        // clean the set L1-Off
  if(OnOffDRMatchSet.size() > 1) fv->cleanDRMatchSet(OnOffDRMatchSet);
        // now fill histos
  for ( mmset::iterator setIter = OnOffDRMatchSet.begin( ); setIter != OnOffDRMatchSet.end( ); setIter++ ) 
  {


       fimmap tempMap = *setIter;
         
       fimmap::iterator it = tempMap.begin(); 
       int i  = (*it).second ;
                         float dR = (*it).first;
             v_->getOffDROnOffHisto()->Fill(dR);
       

       if (dR > DRMatch_) continue;

       if( offCollB_.isValid()) {


         typedef typename reco::JetTagCollection::const_iterator const_iterator;
                           const_iterator iter = offCollB_->begin();
         for (int count = 0; count < i; count++) iter++;


               NOnOff++;
               v_->getOffEtOnOffHisto()->Fill((*iter).first->pt());
               v_->getOffEtaVsOffPhiOnOffHisto()->Fill((*iter).first->eta(),(*iter).first->phi());

                         }
       else if( offColl_.isValid()) {

         typedef typename T::const_iterator const_iterator;
                           const_iterator iter = offColl_->begin();
         for (int count = 0; count < i; count++) iter++;

               NOnOff++;
               v_->getOffEtOnOffHisto()->Fill(iter->pt());
               v_->getOffEtaVsOffPhiOnOffHisto()->Fill(iter->eta(),iter->phi());

                         }

        }

        v_->getNOnOffHisto()->Fill(NOnOff);

}
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, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), and reco::LeafCandidate::phi().

{

  bool rc = false;
  if (! genParticles_.isValid()) return rc;

  for(size_t i = 0; i < genParticles_->size(); ++ i) {
        
    const reco::GenParticle & p = (*genParticles_)[i];
    if (abs(p.pdgId()) == 5){ 

            if (reco::deltaR(p.eta(),p.phi(),gjet->eta(),gjet->phi()) < coneSize){

        rc = true;

            }

                 }

        }
  

        return rc;

}
template<class T >
bool objMon< T >::isL1TriggerType ( int  t)

Definition at line 776 of file FourVectorHLTriggerOffline.h.

{
  bool rc = false;

  for(std::vector<int>::const_iterator it = l1triggerType_.begin(); it != l1triggerType_.end(); ++it)
        {

         if(t == *it) { rc = true; break; }

  } // end for

        return rc;

}
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().

{
  bool rc = false;

  for(std::vector<int>::const_iterator it = triggerType_.begin(); it != triggerType_.end(); ++it)
        {

         if(t == *it) { rc = true; break; }

  } // end for

        return rc;

}
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.

References fireworks::setPath().

{

        setPath(v);
                                
                                if(! isTriggerType(v_->getObjectType()) ) return;

              fillMC();

              fillOff();

        if (l1accept) monitorL1(idtype, l1k, toc);


}
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(), reco::LeafCandidate::eta(), trigger::TriggerObject::eta(), i, j, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::LeafCandidate::phi(), trigger::TriggerObject::phi(), reco::LeafCandidate::pt(), trigger::TriggerObject::pt(), and reco::LeafCandidate::status().

{

 unsigned int NL1=0;
 unsigned int NL1McUM=0;
 unsigned int NL1OffUM=0;

 trigger::Vids::const_iterator idtypeiter = idtype.begin(); 
 for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) {

         trigger::TriggerObject l1FV = toc[*l1ki];
         if(isL1TriggerType(*idtypeiter))
         {

                        NL1++;


      if (fabs(l1FV.eta()) <= EtaMax_ && l1FV.pt() >= EtMin_)
      { 

        v_->getL1EtL1Histo()->Fill(l1FV.pt());
              v_->getL1EtaVsL1PhiL1Histo()->Fill(l1FV.eta(), l1FV.phi());

            }

      fimmap L1OffDRMatchMap;

            if (offCollB_.isValid()) {

              int j=0;
        typedef typename reco::JetTagCollection::const_iterator const_iterator;
        for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
        {

                                  float recoEta = (*iter).first->eta();
                                  float recoPhi = (*iter).first->phi();
                                  float recoPt = (*iter).first->pt();

          if (fabs(recoEta) <= EtaMax_ && recoPt >=  EtMin_ )
          {

                                    // fill UM histos (no matching required)
                                    if(NL1 == 1) {

                                                        NL1OffUM++;
                    v_->getOffEtL1OffUMHisto()->Fill(recoPt);
                    v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(recoEta,recoPhi);

                                                }

                                                 // make maps of matched objects
                  float dR = reco::deltaR(recoEta,recoPhi,l1FV.eta(),l1FV.phi());
                  if ( dR < 1.0)
                                                {

                          L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));

                                                }

          }

                j++;

                                }

                  }
            else if (offColl_.isValid()) {

              int j=0;
        typedef typename T::const_iterator const_iterator;
        for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
        {

          if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >=  EtMin_ )
          {

                                    // fill UM histos (no matching required)
                                    if(NL1 == 1) {

                                                        NL1OffUM++;
                    v_->getOffEtL1OffUMHisto()->Fill(iter->pt());
                    v_->getOffEtaVsOffPhiL1OffUMHisto()->Fill(iter->eta(),iter->phi());

                                                }

                                                // make maps of matched objects
                  float dR = reco::deltaR(iter->eta(),iter->phi(),l1FV.eta(),l1FV.phi());
                  if ( dR < 1.0) 
                                                {

                         L1OffDRMatchMap.insert(std::pair<float,int>(dR,j));

                                                }

          }

                j++;

        }

             }
       if(! L1OffDRMatchMap.empty())  L1OffDRMatchSet.insert(L1OffDRMatchMap);

                         // fillL1MCUM

            if (GenJetsFlag_ && genJets_.isValid())
                        {

              fimmap L1MCDRMatchMap;
              int j=0;

        for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
       
          if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){

                               if (BJetsFlag_) { 
                                                  
                                                         // this jet must have b in the cone
                                                   if(! hasBPartonInCone(gjet,0.7)) {

                                                                 j++;
                                                           continue;

                                                         }

                                                 }

                                     // fill UM histos (no matching required)
                                     if(NL1 == 1) {

                                                         NL1McUM++;
                     v_->getMcEtL1McUMHisto()->Fill(gjet->pt());
                     v_->getMcEtaVsMcPhiL1McUMHisto()->Fill(gjet->eta(),gjet->phi());
                                                
                                                 }

                                                 // make maps of matched objects
                   float dR = reco::deltaR(gjet->eta(),gjet->phi(),l1FV.eta(),l1FV.phi());
                   if ( dR < 1.0) 
                                                 {

                          L1MCDRMatchMap.insert(std::pair<float,int>(dR,j));

                                                 }

       
          } // end if eta, Et

                j++;
       
        } // end for genJets

        if(! L1MCDRMatchMap.empty()) { 
                                L1MCDRMatchSet.insert(L1MCDRMatchMap);
                                }

            } // end if genJets
            else if ( ! GenJetsFlag_ && genParticles_.isValid())
                        {

              fimmap L1MCDRMatchMap;
        for(size_t i = 0; i < genParticles_->size(); ++ i) 
                                {

           const reco::GenParticle & p = (*genParticles_)[i];
           if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_)
                                         { 

                                     // fill UM histos (no matching required)
                                     if(NL1 == 1) {

                                                         NL1McUM++;
                     v_->getMcEtL1McUMHisto()->Fill(p.pt());
                     v_->getMcEtaVsMcPhiL1McUMHisto()->Fill(p.eta(),p.phi());

                                                 }

                                                 // make maps of matched objects
                   float dR = reco::deltaR(p.eta(),p.phi(),l1FV.eta(),l1FV.phi());
                   if ( dR < 1.0) 
                                                 {

                          L1MCDRMatchMap.insert(std::pair<float,int>(dR,i));

                                                 }

                 } // end if pdg, status, eta, pt
        } // end for

        if(! L1MCDRMatchMap.empty()) { 
                                L1MCDRMatchSet.insert(L1MCDRMatchMap);
                                }

            } // end if genParticle_

           } // end if isL1TriggerType
     ++idtypeiter;

 } // end for l1ki

 v_->getNL1Histo()->Fill(NL1);
 v_->getNL1OffUMHisto()->Fill(NL1OffUM);
 v_->getNL1McUMHisto()->Fill(NL1McUM);

}
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, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and reco::LeafCandidate::status().

{

 unsigned int NOff=0;
 unsigned int NOffMcUM=0;

 if(! isTriggerType(v_->getObjectType()) ) return;


 if(offCollB_.isValid()) {

   typedef typename reco::JetTagCollection::const_iterator const_iterator;
   for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
   {

          NOff++;

                if (GenJetsFlag_ && genJets_.isValid())
                      {

             fimmap OffMCDRMatchMap;
                   int j=0;

             for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {

            
               if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){

                                   if (BJetsFlag_ &&  hasBPartonInCone(gjet,0.7)) { 
                                                                         
            
                             // fill UM histos (no matching required)
                       if(NOff == 1) {

                                                                         NOffMcUM++;
                   v_->getMcEtOffMcUMHisto()->Fill(gjet->pt());
                   v_->getMcEtaVsMcPhiOffMcUMHisto()->Fill(gjet->eta(),gjet->phi());
                                        
                                         }

                                         // make maps of matched objects
                        float dR = reco::deltaR(gjet->eta(),gjet->phi(),(*iter).first->eta(),(*iter).first->phi());
                        if ( dR < 1.0) 
                                         {

                               OffMCDRMatchMap.insert(std::pair<float,int>(dR,j));

                                         }

                                                    } // end if BJetsFlag_ and hasBParton
            
               } // end if eta, Et

                     j++;
            
             } // end for genJets

             if(! OffMCDRMatchMap.empty()) OffMCDRMatchSet.insert(OffMCDRMatchMap);

                } // end if genJets

   } // end for offline objects
 
 } // end if
 else if(offColl_.isValid()) {

   typedef typename T::const_iterator const_iterator;
   for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
   {

                                        NOff++;

                if (GenJetsFlag_ && genJets_.isValid())
                      {

             fimmap OffMCDRMatchMap;
                   int j=0;

             for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
            
               if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
            
                                   if (BJetsFlag_) { 
                                                  
                                                             // this jet must have b in the cone
                                                       if(! hasBPartonInCone(gjet,0.7)) { 
                                                                         
                                                                          j++;
                                                                          continue;

                                                                         }

                                                     }

                             // fill UM histos (no matching required)
                       if(NOff == 1) {

                                                                         NOffMcUM++;
                   v_->getMcEtOffMcUMHisto()->Fill(gjet->pt());
                   v_->getMcEtaVsMcPhiOffMcUMHisto()->Fill(gjet->eta(),gjet->phi());
                                        
                                         }

                                         // make maps of matched objects
                        float dR = reco::deltaR(gjet->eta(),gjet->phi(),iter->eta(),iter->phi());
                        if ( dR < 1.0) 
                                         {

                               OffMCDRMatchMap.insert(std::pair<float,int>(dR,j));

                                         }
            
               } // end if eta, Et

                     j++;
            
             } // end for genJets

             if(! OffMCDRMatchMap.empty()) OffMCDRMatchSet.insert(OffMCDRMatchMap);

                } // end if genJets

          else if (!GenJetsFlag_ && genParticles_.isValid())
                {

            fimmap OffMCDRMatchMap;
            for(size_t i = 0; i < genParticles_->size(); ++ i) 
                 {

               const reco::GenParticle & p = (*genParticles_)[i];
               if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_)
                         { 

                      // fill UM histos (no matching required)
                      if(NOff == 1) {

                                                                         NOffMcUM++;
                   v_->getMcEtOffMcUMHisto()->Fill(p.pt());
                   v_->getMcEtaVsMcPhiOffMcUMHisto()->Fill(p.eta(),p.phi());

                                 }

                                 // make maps of matched objects
                 float dR = reco::deltaR(p.eta(),p.phi(),iter->eta(),iter->phi());
                 if ( dR < 1.0) 
                                 {

                  OffMCDRMatchMap.insert(std::pair<float,int>(dR,i));

                                 }

               } // end if pdg, status, eta, pt
            } // end for

            if(! OffMCDRMatchMap.empty()) OffMCDRMatchSet.insert(OffMCDRMatchMap);

          } // end if genParticle_

   } // end for offline objects

 } // end else if

 v_->getNOffHisto()->Fill(NOff);
 v_->getNOffMcUMHisto()->Fill(NOffMcUM);

}
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(), reco::LeafCandidate::eta(), trigger::TriggerObject::eta(), i, j, AlCaHLTBitMon_ParallelJobs::p, reco::LeafCandidate::pdgId(), reco::LeafCandidate::phi(), trigger::TriggerObject::phi(), reco::LeafCandidate::pt(), trigger::TriggerObject::pt(), and reco::LeafCandidate::status().

{


                 unsigned int NOnOffUM=0;
                 unsigned int NOnMcUM=0;
                 unsigned int NOnL1UM=0;

                 if(! isTriggerType(v_->getObjectType()) ) return;

                 trigger::TriggerObject onlineFV = toc[*ki];

           NOn++;    

     if (fabs(onlineFV.eta()) <= EtaMax_ && onlineFV.pt() >= EtMin_)
     { 

       v_->getOnEtOnHisto()->Fill(onlineFV.pt());
             v_->getOnEtaVsOnPhiOnHisto()->Fill(onlineFV.eta(), onlineFV.phi());

           }


     fimmap OnOffDRMatchMap;

           if (offCollB_.isValid()) {

              int j=0;
        typedef typename reco::JetTagCollection::const_iterator const_iterator;
        for( const_iterator iter = offCollB_->begin(), iend = offCollB_->end(); iter != iend; ++iter )
        {

                                  float recoEta = (*iter).first->eta();
                                  float recoPhi = (*iter).first->phi();
                                  float recoPt = (*iter).first->pt();

          if (fabs(recoEta) <= EtaMax_ && recoPt >=  EtMin_ )
          {

                                    // fill UM histos (no matching required)
                                    if(NOn == 1) {

                                                        NOnOffUM++;
                    v_->getOffEtOnOffUMHisto()->Fill(recoPt);
                    v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(recoEta,recoPhi);

                                                }

                                                 // make maps of matched objects
                  float dR = reco::deltaR(recoEta,recoPhi,onlineFV.eta(),onlineFV.phi());
                  if ( dR < 1.0)
                                                {

                          OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));

                                                }

          }

                j++;

                                }

                  }
            else if (offColl_.isValid()) {

              int j=0;

        typedef typename T::const_iterator const_iterator;
        for( const_iterator iter = offColl_->begin(), iend = offColl_->end(); iter != iend; ++iter )
        {

          if (fabs(iter->eta()) <= EtaMax_ && iter->pt() >=  EtMin_ )
          {

                                    // fill UM histos (no matching required)
                                    if(NOn == 1) {

                                                        NOnOffUM++;
                    v_->getOffEtOnOffUMHisto()->Fill(iter->pt());
                    v_->getOffEtaVsOffPhiOnOffUMHisto()->Fill(iter->eta(),iter->phi());

                                                }

                                                 // make maps of matched objects
                  float dR = reco::deltaR(iter->eta(),iter->phi(),onlineFV.eta(),onlineFV.phi());
                  if ( dR < 1.0)
                                                {

                          OnOffDRMatchMap.insert(std::pair<float,int>(dR,j));

                                                }

          }

                j++;


        }

             }

       if(! OnOffDRMatchMap.empty())  OnOffDRMatchSet.insert(OnOffDRMatchMap);



       fimmap OnL1DRMatchMap;
             int j=0;
       trigger::Vids::const_iterator idtypeiter = idtype.begin(); 
       for (trigger::Keys::const_iterator l1ki = l1k.begin(); l1ki !=l1k.end(); ++l1ki ) 
                         {

                           

               if(isL1TriggerType(*idtypeiter))
               {

                       trigger::TriggerObject l1FV = toc[*l1ki];

                 if ( fabs(l1FV.eta()) <= EtaMax_ && l1FV.pt() >= EtMin_ )
           {

                                      // fill UM histos (no matching required)
                                      if(NOn == 1) {

                                                         NOnL1UM++;
                     v_->getL1EtL1OnUMHisto()->Fill(l1FV.pt());
                     v_->getL1EtaVsL1PhiL1OnUMHisto()->Fill(l1FV.eta(),l1FV.phi());

                                                   }


               float dR = reco::deltaR(l1FV.eta(),l1FV.phi(),onlineFV.eta(),onlineFV.phi());

                     if ( dR < 1.0) 
                                                   {

                       OnL1DRMatchMap.insert(std::pair<float,int>(dR,j));

                                                   }

                                                 } // end if l1FV eta, pt

          } // end if isL1TriggerType

                ++idtypeiter;
                j++;

            } // end for

      if(! OnL1DRMatchMap.empty()) OnL1DRMatchSet.insert(OnL1DRMatchMap);

                        // fillOnMCUM

            if (GenJetsFlag_ && genJets_.isValid())
                        {

              fimmap OnMCDRMatchMap;
              int j=0;

        for(reco::GenJetCollection::const_iterator gjet=genJets_->begin(); gjet!=genJets_->end(); gjet++) {
       
          if (fabs(gjet->eta()) <= EtaMax_ && gjet->pt() >= EtMin_ ){
       
                               if (BJetsFlag_) { 
                                                  
                                                         // this jet must have b in the cone
                                                   if(! hasBPartonInCone(gjet,0.7)) {
                                                         
                                                                 j++;
                                                           continue;

                                                         }

                                                 }
                                     // fill UM histos (no matching required)
                                     if(NOn == 1) {

                                                         NOnMcUM++;
                     v_->getMcEtOnMcUMHisto()->Fill(gjet->pt());
                     v_->getMcEtaVsMcPhiOnMcUMHisto()->Fill(gjet->eta(),gjet->phi());
                                                
                                                 }

                                                 // make maps of matched objects
                   float dR = reco::deltaR(gjet->eta(),gjet->phi(),onlineFV.eta(),onlineFV.phi());
                   if ( dR < 1.0) 
                                                 {

                          OnMCDRMatchMap.insert(std::pair<float,int>(dR,j));

                                                 }
       
          } // end if eta, Et

                j++;
       
        } // end for genJets

        if(! OnMCDRMatchMap.empty()) OnMCDRMatchSet.insert(OnMCDRMatchMap);

            } // end if genJets
            else if (!GenJetsFlag_ && genParticles_.isValid())
                        {

              fimmap OnMCDRMatchMap;
        for(size_t i = 0; i < genParticles_->size(); ++ i) 
                                {

           const reco::GenParticle & p = (*genParticles_)[i];
           if (abs(p.pdgId()) == pdgId_ && p.status() == pdgStatus_ && fabs(p.eta()) <= EtaMax_ && p.pt() >= EtMin_)
                                         { 

                                     // fill UM histos (no matching required)
                                     if(NOn == 1) {

                                                         NOnMcUM++;
                     v_->getMcEtOnMcUMHisto()->Fill(p.pt());
                     v_->getMcEtaVsMcPhiOnMcUMHisto()->Fill(p.eta(),p.phi());

                                                 }

                                                 // make maps of matched objects
                   float dR = reco::deltaR(p.eta(),p.phi(),onlineFV.eta(),onlineFV.phi());
                   if ( dR < 1.0)
                                                 {

                          OnMCDRMatchMap.insert(std::pair<float,int>(dR,i));

                                                 }
                 } // end if
        } // end for

        if(! OnMCDRMatchMap.empty()) OnMCDRMatchSet.insert(OnMCDRMatchMap);

            } 

                        v_->getNOnHisto()->Fill(NOn);
                        v_->getNOnOffUMHisto()->Fill(NOnOffUM);
                        v_->getNL1OnUMHisto()->Fill(NOnL1UM);
                        v_->getNOnMcUMHisto()->Fill(NOnMcUM);

}
template<class T >
void objMon< T >::pushL1TriggerType ( int  trigType) [inline]

Definition at line 661 of file FourVectorHLTriggerOffline.h.

References objMon< T >::l1triggerType_.

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

Definition at line 659 of file FourVectorHLTriggerOffline.h.

References objMon< T >::triggerType_.

{ triggerType_.push_back(trigType); }
template<class T >
void objMon< T >::setBJetsFlag ( bool  flag) [inline]

Definition at line 727 of file FourVectorHLTriggerOffline.h.

References objMon< T >::BJetsFlag_.

                { 
                  BJetsFlag_ = flag; 
                }
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_.

                { 
                  GenJetsFlag_ = flag;  
                        genJets_ = genJets; 
                }
template<class T >
void objMon< T >::setL1TriggerType ( std::vector< int >  trigType) [inline]

Definition at line 660 of file FourVectorHLTriggerOffline.h.

References objMon< T >::l1triggerType_.

{ l1triggerType_ = trigType; }
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_.

{ v_ = 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().

{ offColl_ = 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().

{ offCollB_ = 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_.

{ triggerType_ = trigType; }

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]