CMS 3D CMS Logo

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

#include <FourVectorHLTOnline.h>

Inheritance diagram for objMonData< T >:
BaseMonitor

Public Member Functions

void clearSets ()
 
void fillOnL1Match (const int l1Index, FourVectorHLTOnline *fv)
 
void fillOnlineMatch (const int l1Index, FourVectorHLTOnline *fv)
 
bool isL1TriggerType (int t)
 
bool isTriggerType (int t)
 
void matchOnlineL1 (const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOnline *fv, const int &NOn)
 
void monitorL1 (const int l1Index, FourVectorHLTOnline *fv)
 
void monitorOnline (const int hltIndex, const int l1Index, FourVectorHLTOnline *fv)
 
 objMonData ()
 
void pushL1TriggerType (int trigType)
 
void pushTriggerType (int trigType)
 
void setBJetsFlag (bool flag)
 
void setL1TriggerType (const std::vector< int > &trigType)
 
void setLimits (float etaMax, float etMin, float drMatch)
 
void setPath (FourVectorHLTOnline::PathInfoCollection::iterator v)
 
void setReco (edm::Handle< T > offColl)
 
void setTriggerType (const std::vector< int > &trigType)
 
- Public Member Functions inherited from BaseMonitor
virtual ~BaseMonitor ()
 

Public Attributes

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

Private Attributes

bool BJetsFlag_
 
float DRMatch_
 
float EtaMax_
 
float EtMin_
 
bool GenJetsFlag_
 
std::vector< int > l1triggerType_
 
edm::Handle< ToffColl_
 
int pdgId_
 
int pdgStatus_
 
std::vector< int > triggerType_
 
FourVectorHLTOnline::PathInfoCollection::iterator v_
 

Detailed Description

template<class T>
class objMonData< T >

Definition at line 600 of file FourVectorHLTOnline.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Implements BaseMonitor.

Definition at line 911 of file FourVectorHLTOnline.h.

912 {
913 
914  L1OffDRMatchSet.clear();
915  L1MCDRMatchSet.clear();
916  OnOffDRMatchSet.clear();
917  OnMCDRMatchSet.clear();
918  OnL1DRMatchSet.clear();
919  OffMCDRMatchSet.clear();
920 
921 }
template<class T >
void objMonData< T >::fillOnL1Match ( const int  l1Index,
FourVectorHLTOnline fv 
)

Definition at line 858 of file FourVectorHLTOnline.h.

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

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

Implements BaseMonitor.

Definition at line 900 of file FourVectorHLTOnline.h.

References FourVectorHLTOnline::fTriggerObj.

901 {
902 
903 
904  if ( l1Index >= fv->fTriggerObj->sizeFilters() ) return;
905  fillOnL1Match(l1Index, fv);
906 
907 }
edm::Handle< trigger::TriggerEvent > fTriggerObj
void fillOnL1Match(const int l1Index, FourVectorHLTOnline *fv)
template<class T >
bool objMonData< T >::isL1TriggerType ( int  t)

Definition at line 687 of file FourVectorHLTOnline.h.

References funct::abs().

688 {
689  bool rc = false;
690 
691  for(std::vector<int>::const_iterator it = l1triggerType_.begin(); it != l1triggerType_.end(); ++it)
692  {
693 
694  if(std::abs(t) == std::abs(*it)) { rc = true; break; }
695 
696  } // end for
697 
698  return rc;
699 
700 }
std::vector< int > l1triggerType_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
template<class T >
bool objMonData< T >::isTriggerType ( int  t)
virtual

Implements BaseMonitor.

Definition at line 668 of file FourVectorHLTOnline.h.

669 {
670  bool rc = false;
671 
672  for(std::vector<int>::const_iterator it = triggerType_.begin(); it != triggerType_.end(); ++it)
673  {
674 
675  if(t == *it) { rc = true; break; }
676 
677  } // end for
678 
679  if (t==0) rc = true;
680 
681  return rc;
682 
683 }
std::vector< int > triggerType_
template<class T >
void objMonData< T >::matchOnlineL1 ( const trigger::TriggerObject onlineFV,
const int &  l1Index,
FourVectorHLTOnline fv,
const int &  NOn 
)
virtual

Implements BaseMonitor.

Definition at line 798 of file FourVectorHLTOnline.h.

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

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

Implements BaseMonitor.

Definition at line 704 of file FourVectorHLTOnline.h.

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

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

Implements BaseMonitor.

Definition at line 756 of file FourVectorHLTOnline.h.

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

757 {
758 
759  //if(! isTriggerType(v_->getObjectType()) ) return;
760 
761  // Get keys of objects passed by the last filter
762  const trigger::Keys & k = fv->fTriggerObj->filterKeys(hltIndex);
763 
764  const trigger::TriggerObjectCollection & toc(fv->fTriggerObj->getObjects());
765 
766  unsigned int NOn=0;
767 
768  // Loop over HLT objects
769  for (trigger::Keys::const_iterator ki = k.begin(); ki !=k.end(); ++ki ) {
770 
771  trigger::TriggerObject onlineFV = toc[*ki];
772 
773  if (fabs(onlineFV.eta()) <= EtaMax_ && onlineFV.pt() >= EtMin_)
774  {
775 
776  NOn++;
777 
778  v_->getOnEtOnHisto()->Fill(onlineFV.pt());
779  v_->getOnOneOverEtOnHisto()->Fill(1./onlineFV.pt());
780  v_->getOnEtaVsOnPhiOnHisto()->Fill(onlineFV.eta(), onlineFV.phi());
781 
782  }
783  else {
784 
785  return;
786 
787  }
788 
789  matchOnlineL1(onlineFV,l1Index, fv, NOn);
790 
791  } // end loop over HLT objects
792 
793  if(NOn>0) v_->getNOnHisto()->Fill(NOn);
794 
795 }
edm::Handle< trigger::TriggerEvent > fTriggerObj
float phi() const
Definition: TriggerObject.h:58
void matchOnlineL1(const trigger::TriggerObject &onlineFV, const int &l1Index, FourVectorHLTOnline *fv, const int &NOn)
float eta() const
Definition: TriggerObject.h:57
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
FourVectorHLTOnline::PathInfoCollection::iterator v_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< size_type > Keys
template<class T >
void objMonData< T >::pushL1TriggerType ( int  trigType)
inline

Definition at line 612 of file FourVectorHLTOnline.h.

References objMonData< T >::l1triggerType_.

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

Definition at line 610 of file FourVectorHLTOnline.h.

References objMonData< T >::triggerType_.

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

Definition at line 638 of file FourVectorHLTOnline.h.

References objMonData< T >::BJetsFlag_, and archive::flag.

Referenced by FourVectorHLTOnline::analyze().

639  {
640  BJetsFlag_ = flag;
641  }
template<class T >
void objMonData< T >::setL1TriggerType ( const std::vector< int > &  trigType)
inline

Definition at line 611 of file FourVectorHLTOnline.h.

References objMonData< T >::l1triggerType_.

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

Definition at line 603 of file FourVectorHLTOnline.h.

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

Referenced by FourVectorHLTOnline::analyze().

604  {
605  EtaMax_= etaMax;
606  EtMin_= etMin;
607  DRMatch_= drMatch;
608  }
template<class T >
void objMonData< T >::setPath ( FourVectorHLTOnline::PathInfoCollection::iterator  v)
inlinevirtual

Implements BaseMonitor.

Definition at line 613 of file FourVectorHLTOnline.h.

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

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

Definition at line 614 of file FourVectorHLTOnline.h.

References objMonData< T >::offColl_.

Referenced by FourVectorHLTOnline::analyze().

614 { offColl_ = offColl; }
edm::Handle< T > offColl_
template<class T >
void objMonData< T >::setTriggerType ( const std::vector< int > &  trigType)
inline

Definition at line 609 of file FourVectorHLTOnline.h.

References objMonData< T >::triggerType_.

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

Member Data Documentation

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

Definition at line 652 of file FourVectorHLTOnline.h.

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

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

Definition at line 654 of file FourVectorHLTOnline.h.

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

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

Definition at line 631 of file FourVectorHLTOnline.h.

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

Definition at line 630 of file FourVectorHLTOnline.h.

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

Definition at line 660 of file FourVectorHLTOnline.h.

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

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

Definition at line 635 of file FourVectorHLTOnline.h.

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

Definition at line 634 of file FourVectorHLTOnline.h.

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

Definition at line 633 of file FourVectorHLTOnline.h.

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

Definition at line 632 of file FourVectorHLTOnline.h.

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

Definition at line 646 of file FourVectorHLTOnline.h.

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

Definition at line 647 of file FourVectorHLTOnline.h.

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

Definition at line 662 of file FourVectorHLTOnline.h.

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