CMS 3D CMS Logo

HadSUSYdiMuonSkim Class Reference

all hadronic SUSY Skim >= 2 barrel muons 30 GeV, Pt(2muons)>150 Z-Candle, dimuon/Z trigger path More...

#include <SUSYBSMAnalysis/CSA07Skims/interface/HadSUSYdiMuonSkim.h>

Inheritance diagram for HadSUSYdiMuonSkim:

edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

virtual void endJob ()
virtual bool filter (edm::Event &, const edm::EventSetup &)
 HadSUSYdiMuonSkim (const edm::ParameterSet &)
 ~HadSUSYdiMuonSkim ()

Private Attributes

double MuonPtmin_
edm::InputTag Muonsrc_
unsigned int nAccepted_
unsigned int nEvents_
int NminMuon_
double PtmindiMuon_


Detailed Description

all hadronic SUSY Skim >= 2 barrel muons 30 GeV, Pt(2muons)>150 Z-Candle, dimuon/Z trigger path

Date
2007/07/12 09:18:45
Revision
1.1

Author:
Michael Tytgat, Maria Spiropulu - CERN
Date
2007/09/25 17:54:50
Revision
1.4

Author:
Michael Tytgat, Maria Spiropulu - CERN

Definition at line 24 of file HadSUSYdiMuonSkim.h.


Constructor & Destructor Documentation

HadSUSYdiMuonSkim::HadSUSYdiMuonSkim ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 40 of file HadSUSYdiMuonSkim.cc.

References edm::ParameterSet::getParameter(), MuonPtmin_, Muonsrc_, NminMuon_, and PtmindiMuon_.

00040                                                                      :
00041   nEvents_(0), nAccepted_(0)
00042 {
00043   Muonsrc_ = iConfig.getParameter<InputTag>( "Muonsrc" );
00044   NminMuon_ = iConfig.getParameter<int>( "NminMuon");
00045   MuonPtmin_ = iConfig.getParameter<double>( "MuonPtmin");
00046   PtmindiMuon_ = iConfig.getParameter<double>( "PtmindiMuon");
00047 }

HadSUSYdiMuonSkim::~HadSUSYdiMuonSkim (  ) 

Definition at line 51 of file HadSUSYdiMuonSkim.cc.

00052 {}


Member Function Documentation

void HadSUSYdiMuonSkim::endJob ( void   )  [virtual]

Reimplemented from edm::EDFilter.

Definition at line 101 of file HadSUSYdiMuonSkim.cc.

References lat::endl(), nAccepted_, and nEvents_.

00102 {
00103   edm::LogVerbatim( "HadSUSYdiMuonSkim" ) 
00104     << "Events read " << nEvents_
00105     << " Events accepted " << nAccepted_
00106     << "\nEfficiency " << (double)(nAccepted_)/(double)(nEvents_) 
00107     << endl;
00108 }

bool HadSUSYdiMuonSkim::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDFilter.

Definition at line 56 of file HadSUSYdiMuonSkim.cc.

References funct::cos(), edm::Event::getByLabel(), it, MuonPtmin_, Muonsrc_, nAccepted_, nEvents_, NminMuon_, PtmindiMuon_, funct::sin(), and funct::sqrt().

00058 {
00059   nEvents_++;
00060 
00061   Handle<MuonCollection> MuonHandle;
00062 //  try {
00063     iEvent.getByLabel( Muonsrc_, MuonHandle );
00064 //  }
00065 //  catch ( cms::Exception& ex ) {
00066 //    edm::LogError( "HadSUSYdiMuonSkim" ) 
00067 //      << "Unable to get Muon collection "
00068 //      << Muonsrc_.label();
00069 //    return false;
00070 //  }
00071   if ( MuonHandle->empty() ) return false;
00072   MuonCollection TheMuons = *MuonHandle;
00073   std::stable_sort( TheMuons.begin(), TheMuons.end(), PtSorter() );
00074   
00075   int nMuon = 0;
00076   double Pxdimuon = 0., Pydimuon = 0.;
00077   for ( MuonCollection::const_iterator it = TheMuons.begin();
00078         it != TheMuons.end(); it++ ) {
00079     if ( (it->pt() > MuonPtmin_) 
00080          && (fabs(it->eta()) < 3.0) ) {
00081       if ( nMuon < 2 ) {
00082         Pxdimuon += it->p()*sin(it->theta())*cos(it->phi());
00083         Pydimuon += it->p()*sin(it->theta())*sin(it->phi());
00084       }
00085       nMuon++;
00086     }
00087   }
00088   
00089   if ( nMuon < NminMuon_ ) return false;
00090 
00091   double PtdiMuon = sqrt( Pxdimuon*Pxdimuon + Pydimuon*Pydimuon );
00092   if ( PtdiMuon < PtmindiMuon_ ) return false;
00093     
00094   nAccepted_++;
00095 
00096   return true;
00097 }


Member Data Documentation

double HadSUSYdiMuonSkim::MuonPtmin_ [private]

Definition at line 35 of file HadSUSYdiMuonSkim.h.

Referenced by filter(), and HadSUSYdiMuonSkim().

edm::InputTag HadSUSYdiMuonSkim::Muonsrc_ [private]

Definition at line 33 of file HadSUSYdiMuonSkim.h.

Referenced by filter(), and HadSUSYdiMuonSkim().

unsigned int HadSUSYdiMuonSkim::nAccepted_ [private]

Definition at line 38 of file HadSUSYdiMuonSkim.h.

Referenced by endJob(), and filter().

unsigned int HadSUSYdiMuonSkim::nEvents_ [private]

Definition at line 37 of file HadSUSYdiMuonSkim.h.

Referenced by endJob(), and filter().

int HadSUSYdiMuonSkim::NminMuon_ [private]

Definition at line 34 of file HadSUSYdiMuonSkim.h.

Referenced by filter(), and HadSUSYdiMuonSkim().

double HadSUSYdiMuonSkim::PtmindiMuon_ [private]

Definition at line 36 of file HadSUSYdiMuonSkim.h.

Referenced by filter(), and HadSUSYdiMuonSkim().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:23:26 2009 for CMSSW by  doxygen 1.5.4