CMS 3D CMS Logo

HadSUSYdiElecSkim Class Reference

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

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

Inheritance diagram for HadSUSYdiElecSkim:

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

List of all members.

Public Member Functions

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

Private Attributes

double ElecPtmin_
edm::InputTag Elecsrc_
unsigned int nAccepted_
unsigned int nEvents_
int NminElec_
double PtmindiElec_


Detailed Description

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

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/12/09 10:54:57
Revision
1.5

Author:
Michael Tytgat, Maria Spiropulu - CERN

Definition at line 24 of file HadSUSYdiElecSkim.h.


Constructor & Destructor Documentation

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

Definition at line 40 of file HadSUSYdiElecSkim.cc.

References ElecPtmin_, Elecsrc_, edm::ParameterSet::getParameter(), NminElec_, and PtmindiElec_.

00040                                                                      :
00041   nEvents_(0), nAccepted_(0)
00042 {
00043   Elecsrc_ = iConfig.getParameter<InputTag>( "Elecsrc" );
00044   NminElec_ = iConfig.getParameter<int>( "NminElec");
00045   ElecPtmin_ = iConfig.getParameter<double>( "ElecPtmin");
00046   PtmindiElec_ = iConfig.getParameter<double>( "PtmindiElec");
00047 }

HadSUSYdiElecSkim::~HadSUSYdiElecSkim (  ) 

Definition at line 51 of file HadSUSYdiElecSkim.cc.

00052 {}


Member Function Documentation

void HadSUSYdiElecSkim::endJob ( void   )  [virtual]

Reimplemented from edm::EDFilter.

Definition at line 101 of file HadSUSYdiElecSkim.cc.

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

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

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

Implements edm::EDFilter.

Definition at line 56 of file HadSUSYdiElecSkim.cc.

References funct::cos(), ElecPtmin_, Elecsrc_, edm::Event::getByLabel(), it, nAccepted_, nEvents_, NminElec_, PtmindiElec_, funct::sin(), and funct::sqrt().

00058 {
00059   nEvents_++;
00060 
00061   Handle<GsfElectronCollection> ElecHandle;
00062 //  try {
00063     iEvent.getByLabel( Elecsrc_, ElecHandle );
00064 //  }
00065 //  catch ( cms::Exception& ex ) {
00066 //    edm::LogError( "HadSUSYdiElecSkim" ) 
00067 //      << "Unable to get Elec collection "
00068 //      << Elecsrc_.label();
00069 //    return false;
00070 //  }
00071   if ( ElecHandle->empty() ) return false;
00072   GsfElectronCollection TheElecs = *ElecHandle;
00073   std::stable_sort( TheElecs.begin(), TheElecs.end(), PtSorter() );
00074   
00075   int nElec = 0;
00076   double Pxdielec = 0., Pydielec = 0.;
00077   for ( GsfElectronCollection::const_iterator it = TheElecs.begin();
00078         it != TheElecs.end(); it++ ) {
00079     if ( (it->pt() > ElecPtmin_) 
00080          && (fabs(it->eta()) < 3.0) ) {
00081       if ( nElec < 2 ) {
00082         Pxdielec += it->p()*sin(it->theta())*cos(it->phi());
00083         Pydielec += it->p()*sin(it->theta())*sin(it->phi());
00084       }
00085       nElec++;
00086     }
00087   }
00088   
00089   if ( nElec < NminElec_ ) return false;
00090 
00091   double PtdiElec = sqrt( Pxdielec*Pxdielec + Pydielec*Pydielec );
00092   if ( PtdiElec < PtmindiElec_ ) return false;
00093     
00094   nAccepted_++;
00095 
00096   return true;
00097 }


Member Data Documentation

double HadSUSYdiElecSkim::ElecPtmin_ [private]

Definition at line 35 of file HadSUSYdiElecSkim.h.

Referenced by filter(), and HadSUSYdiElecSkim().

edm::InputTag HadSUSYdiElecSkim::Elecsrc_ [private]

Definition at line 33 of file HadSUSYdiElecSkim.h.

Referenced by filter(), and HadSUSYdiElecSkim().

unsigned int HadSUSYdiElecSkim::nAccepted_ [private]

Definition at line 38 of file HadSUSYdiElecSkim.h.

Referenced by endJob(), and filter().

unsigned int HadSUSYdiElecSkim::nEvents_ [private]

Definition at line 37 of file HadSUSYdiElecSkim.h.

Referenced by endJob(), and filter().

int HadSUSYdiElecSkim::NminElec_ [private]

Definition at line 34 of file HadSUSYdiElecSkim.h.

Referenced by filter(), and HadSUSYdiElecSkim().

double HadSUSYdiElecSkim::PtmindiElec_ [private]

Definition at line 36 of file HadSUSYdiElecSkim.h.

Referenced by filter(), and HadSUSYdiElecSkim().


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