CMS 3D CMS Logo

LepSUSYSkim Class Reference

di-lepton final states SUSY Skim Trigger to be implemented >= n muon, pt>3 GeV >= n electron, pt>5 GeV >= n jets, Pt_jet1>80 GeV, Pt_jet2>30 GeV MET>50 GeV Cuts values in the cfi files in the data directory More...

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

Inheritance diagram for LepSUSYSkim:

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

List of all members.

Public Member Functions

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

Private Attributes

double CaloJet1Ptmin_
double CaloJet2Ptmin_
edm::InputTag CaloJetsrc_
double CaloMetmin_
edm::InputTag CaloMETsrc_
double ElecPtmin_
edm::InputTag Elecsrc_
double MuonPtmin_
edm::InputTag Muonsrc_
unsigned int nAccepted_
unsigned int nEvents_
int NminCaloJet_
int NminElec_
int NminMuon_


Detailed Description

di-lepton final states SUSY Skim Trigger to be implemented >= n muon, pt>3 GeV >= n electron, pt>5 GeV >= n jets, Pt_jet1>80 GeV, Pt_jet2>30 GeV MET>50 GeV Cuts values in the cfi files in the data directory

Date
2007/12/09 10:54:57
Revision
1.6

Author:
Massimiliano Chioboli, Universita' and INFN, Catania Maria Spiropulu - CERN

Definition at line 31 of file LepSUSYSkim.h.


Constructor & Destructor Documentation

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

Definition at line 51 of file LepSUSYSkim.cc.

References CaloJet1Ptmin_, CaloJet2Ptmin_, CaloJetsrc_, CaloMetmin_, CaloMETsrc_, ElecPtmin_, Elecsrc_, edm::ParameterSet::getParameter(), MuonPtmin_, Muonsrc_, NminCaloJet_, NminElec_, and NminMuon_.

00051                                                          :
00052   nEvents_(0), nAccepted_(0)
00053 {
00054   Muonsrc_       = iConfig.getParameter<InputTag>( "Muonsrc" );
00055   Elecsrc_       = iConfig.getParameter<InputTag>( "Elecsrc" );
00056   CaloJetsrc_    = iConfig.getParameter<InputTag>( "CaloJetsrc" );
00057   CaloMETsrc_    = iConfig.getParameter<InputTag>( "CaloMETsrc" );
00058   NminMuon_      = iConfig.getParameter<int>( "NminMuon");
00059   MuonPtmin_     = iConfig.getParameter<double>( "MuonPtmin");
00060   NminElec_      = iConfig.getParameter<int>( "NminElec");
00061   ElecPtmin_     = iConfig.getParameter<double>( "ElecPtmin");
00062   NminCaloJet_   = iConfig.getParameter<int>( "NminCaloJet");
00063   CaloJet1Ptmin_ = iConfig.getParameter<double>( "CaloJet1Ptmin");
00064   CaloJet2Ptmin_ = iConfig.getParameter<double>( "CaloJet2Ptmin");
00065   CaloMetmin_    = iConfig.getParameter<double>( "CaloMetmin"   );
00066   
00067 }

LepSUSYSkim::~LepSUSYSkim (  ) 

Definition at line 71 of file LepSUSYSkim.cc.

00072 {}


Member Function Documentation

void LepSUSYSkim::endJob ( void   )  [virtual]

Reimplemented from edm::EDFilter.

Definition at line 201 of file LepSUSYSkim.cc.

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

00202 {
00203   edm::LogVerbatim( "LepSUSYSkim" ) 
00204     << "Events read " << nEvents_
00205     << "\nEvents accepted " << nAccepted_
00206     << "\nEfficiency " << (double)(nAccepted_)/(double)(nEvents_) 
00207     << endl;
00208 }

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

Implements edm::EDFilter.

Definition at line 76 of file LepSUSYSkim.cc.

References CaloJet1Ptmin_, CaloJet2Ptmin_, CaloJetsrc_, CaloMetmin_, CaloMETsrc_, ElecPtmin_, Elecsrc_, edm::Event::getByLabel(), it, MuonPtmin_, Muonsrc_, nAccepted_, nEvents_, NminCaloJet_, NminElec_, and NminMuon_.

00078 {
00079   nEvents_++;
00080 
00081   
00082   // Get the muon collection
00083   Handle<MuonCollection> MuonHandle;
00084 //  try {
00085     iEvent.getByLabel( Muonsrc_, MuonHandle );
00086 //  }
00087 //  catch ( cms::Exception& ex ) {
00088 //    edm::LogError( "LepSUSYSkim" ) 
00089 //      << "Unable to get Muon collection "
00090 //      << Muonsrc_.label();
00091 //    return false;
00092 //  }
00093   MuonCollection TheMuons = *MuonHandle;
00094   std::stable_sort( TheMuons.begin(), TheMuons.end(), PtSorter() );
00095 
00096   // Get the electron collection
00097   Handle<GsfElectronCollection> ElecHandle;
00098 //  try {
00099     iEvent.getByLabel( Elecsrc_, ElecHandle );
00100 //  }
00101 //  catch ( cms::Exception& ex ) {
00102 //    edm::LogError( "LepSUSYSFOSElecSkim" ) 
00103 //      << "Unable to get Elec collection "
00104 //      << Elecsrc_.label();
00105 //    return false;
00106 //  }
00107   GsfElectronCollection TheElecs = *ElecHandle;
00108   std::stable_sort( TheElecs.begin(), TheElecs.end(), PtSorter() );
00109 
00110 
00111   // Get the caloJet collection
00112   Handle<CaloJetCollection> CaloJetsHandle;
00113 //  try {
00114     iEvent.getByLabel( CaloJetsrc_, CaloJetsHandle );
00115 //  } 
00116 //  catch ( cms::Exception& ex ) {
00117 //    edm::LogError( "LepSUSYSkim" ) 
00118 //      << "Unable to get CaloJet collection "
00119 //      << CaloJetsrc_.label();
00120 //    return false;
00121 //  }
00122   CaloJetCollection TheCaloJets = *CaloJetsHandle;
00123   std::stable_sort( TheCaloJets.begin(), TheCaloJets.end(), PtSorter() );
00124 
00125   // Get the caloMetCollection
00126   Handle<CaloMETCollection> METHandle;
00127 //  try {
00128     iEvent.getByLabel( CaloMETsrc_, METHandle );
00129 //  }
00130 //  catch ( cms::Exception& ex ) {
00131 //    edm::LogError( "HadSUSYQCDSkim" )
00132 //      << "Unable to get CaloMET collection "
00133 //      << CaloMETsrc_.label();
00134 //    return false;
00135 //  }
00136   if ( METHandle->empty() ) return false;
00137 
00138 
00139 //  cout << "****************************************************" << endl;
00140 
00141   // Apply cuts on muons
00142   int nMuon = 0;
00143   for ( MuonCollection::const_iterator it = TheMuons.begin();
00144         it != TheMuons.end(); it++ ) {
00145 //    cout << "muon pt = " << it->pt() << endl;
00146 //    cout << "muon eta = " << it->eta() << endl;
00147     if ( (it->pt() > MuonPtmin_) && 
00148          (fabs(it->eta()) < 3.0) ) {
00149       nMuon++;
00150     }
00151   }
00152 //  cout << "nMuon = " << nMuon << endl;
00153   if ( nMuon < NminMuon_ ) return false;
00154    
00155   // Apply cuts on electrons
00156   int nElec = 0;
00157   for ( GsfElectronCollection::const_iterator it = TheElecs.begin();
00158         it != TheElecs.end(); it++ ) {
00159 //    cout << "elec pt = " << it->pt() << endl;
00160 //    cout << "elec eta = " << it->eta() << endl;
00161     if ( (it->pt() > ElecPtmin_) && 
00162          (fabs(it->eta()) < 3.0) ) {
00163       nElec++;
00164     }
00165   }
00166 //  cout << "nElec = " << nElec << endl;
00167   if ( nElec < NminElec_ ) return false;
00168 
00169 //  cout << "-----------------------------------------------------" << endl;
00170   // Apply cuts on Jets
00171   int nJet = 0;
00172   for ( CaloJetCollection::const_iterator it = TheCaloJets.begin(); 
00173         it != TheCaloJets.end(); it++ ) {
00174 //    cout << "jet pt = " << it->pt() << endl;
00175 //    cout << "jet eta = " << it->eta() << endl;
00176     if (fabs(it->eta()) < 3.0) nJet++;
00177   }
00178 //  cout << "nJet = " << nJet << endl;
00179   if ( nJet < NminCaloJet_ ) return false;
00180 //  cout << "TheCaloJets[0].pt() = " << TheCaloJets[0].pt() << endl;
00181 //  cout << "TheCaloJets[1].pt() = " << TheCaloJets[1].pt() << endl;
00182   if(NminCaloJet_ > 0)  {if ( TheCaloJets[0].pt() < CaloJet1Ptmin_ ) return false;}
00183   if(NminCaloJet_ > 1)  {if ( TheCaloJets[1].pt() < CaloJet2Ptmin_ ) return false;}
00184 
00185   
00186 //  cout << "-----------------------------------------------------" << endl;
00187   
00188 
00189   //apply cuts on MET
00190   double MetValue = METHandle->begin()->pt();
00191 //  cout << " met = " << MetValue << endl;
00192   if(MetValue < CaloMetmin_ ) return false;
00193  
00194   nAccepted_++;
00195 
00196   return true;
00197 }


Member Data Documentation

double LepSUSYSkim::CaloJet1Ptmin_ [private]

Definition at line 49 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

double LepSUSYSkim::CaloJet2Ptmin_ [private]

Definition at line 50 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

edm::InputTag LepSUSYSkim::CaloJetsrc_ [private]

Definition at line 42 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

double LepSUSYSkim::CaloMetmin_ [private]

Definition at line 51 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

edm::InputTag LepSUSYSkim::CaloMETsrc_ [private]

Definition at line 43 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

double LepSUSYSkim::ElecPtmin_ [private]

Definition at line 47 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

edm::InputTag LepSUSYSkim::Elecsrc_ [private]

Definition at line 41 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

double LepSUSYSkim::MuonPtmin_ [private]

Definition at line 45 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

edm::InputTag LepSUSYSkim::Muonsrc_ [private]

Definition at line 40 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

unsigned int LepSUSYSkim::nAccepted_ [private]

Definition at line 53 of file LepSUSYSkim.h.

Referenced by endJob(), and filter().

unsigned int LepSUSYSkim::nEvents_ [private]

Definition at line 52 of file LepSUSYSkim.h.

Referenced by endJob(), and filter().

int LepSUSYSkim::NminCaloJet_ [private]

Definition at line 48 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

int LepSUSYSkim::NminElec_ [private]

Definition at line 46 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().

int LepSUSYSkim::NminMuon_ [private]

Definition at line 44 of file LepSUSYSkim.h.

Referenced by filter(), and LepSUSYSkim().


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