CMS 3D CMS Logo

SUSYHighPtPhotonSkim Class Reference

High Energy Photon SUSY Skim one(two) photon(s) > xx GeV in barrel + isolation. More...

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

Inheritance diagram for SUSYHighPtPhotonSkim:

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

List of all members.

Public Member Functions

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

Private Attributes

bool IsIsolated_
double IsolationCut_
unsigned int nAccepted_
unsigned int nEvents_
double Photon1Ptmin_
double Photon2Ptmin_
edm::InputTag Photonsrc_


Detailed Description

High Energy Photon SUSY Skim one(two) photon(s) > xx GeV in barrel + isolation.

Date
2007/08/09 21:03:26
Revision
1.2

Author:
Daniele del Re - Univ. La Sapienza & INFN

Definition at line 23 of file SUSYHighPtPhotonSkim.h.


Constructor & Destructor Documentation

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

Definition at line 34 of file SUSYHighPtPhotonSkim.cc.

References edm::ParameterSet::getParameter(), IsIsolated_, IsolationCut_, Photon1Ptmin_, Photon2Ptmin_, and Photonsrc_.

00034                                                                            :
00035   nEvents_(0), nAccepted_(0)
00036 {
00037   Photonsrc_ = iConfig.getParameter<InputTag>( "Photonsrc" );
00038   Photon1Ptmin_ = 
00039     iConfig.getParameter<double>( "Photon1Ptmin");
00040   Photon2Ptmin_ = 
00041     iConfig.getParameter<double>( "Photon2Ptmin");
00042   IsIsolated_ = iConfig.getParameter<bool>( "IsIsolated");
00043   IsolationCut_ = iConfig.getParameter<double>( "IsolationCut");
00044 }

SUSYHighPtPhotonSkim::~SUSYHighPtPhotonSkim (  ) 

Definition at line 48 of file SUSYHighPtPhotonSkim.cc.

00049 {}


Member Function Documentation

void SUSYHighPtPhotonSkim::endJob ( void   )  [virtual]

Reimplemented from edm::EDFilter.

Definition at line 90 of file SUSYHighPtPhotonSkim.cc.

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

00091 {
00092   edm::LogVerbatim( "SUSYHighPtPhotonSkim" ) 
00093     << "Events read " << nEvents_
00094     << " Events accepted " << nAccepted_
00095     << "\nEfficiency " << (double)(nAccepted_)/(double)(nEvents_) 
00096     << endl;
00097 }

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

Implements edm::EDFilter.

Definition at line 53 of file SUSYHighPtPhotonSkim.cc.

References edm::Event::getByLabel(), IsIsolated_, IsolationCut_, it, nAccepted_, nEvents_, Photon1Ptmin_, Photon2Ptmin_, and Photonsrc_.

00055 {
00056   nEvents_++;
00057 
00058   typedef AssociationVector<RefProd<CandidateCollection>, vector<double> > PhotonMapCollection;
00059   Handle<PhotonMapCollection>  PhotonHandle;
00060 
00061   iEvent.getByLabel( Photonsrc_, PhotonHandle );
00062 
00063   if ( PhotonHandle->empty() ) return false;
00064 
00065   int nPhoton1 = 0;
00066   int nPhoton2 = 0;
00067 
00068   for ( PhotonMapCollection::const_iterator it = PhotonHandle->begin(); 
00069         it != PhotonHandle->end(); it++ ) {
00070 
00071     bool iso = it->second < IsolationCut_;
00072     if(!IsIsolated_) iso = 1; 
00073     
00074     if (iso && fabs(it->first->eta()) < 1.479) {       
00075       if (it->first->pt() > Photon1Ptmin_)  nPhoton1++;
00076       if (it->first->pt() > Photon2Ptmin_)  nPhoton2++;
00077     }
00078   }
00079 
00080   if ( !nPhoton1 ) return false;
00081   if ( nPhoton2<2 ) return false;
00082   
00083   nAccepted_++;
00084 
00085   return true;
00086 }


Member Data Documentation

bool SUSYHighPtPhotonSkim::IsIsolated_ [private]

Definition at line 36 of file SUSYHighPtPhotonSkim.h.

Referenced by filter(), and SUSYHighPtPhotonSkim().

double SUSYHighPtPhotonSkim::IsolationCut_ [private]

Definition at line 37 of file SUSYHighPtPhotonSkim.h.

Referenced by filter(), and SUSYHighPtPhotonSkim().

unsigned int SUSYHighPtPhotonSkim::nAccepted_ [private]

Definition at line 39 of file SUSYHighPtPhotonSkim.h.

Referenced by endJob(), and filter().

unsigned int SUSYHighPtPhotonSkim::nEvents_ [private]

Definition at line 38 of file SUSYHighPtPhotonSkim.h.

Referenced by endJob(), and filter().

double SUSYHighPtPhotonSkim::Photon1Ptmin_ [private]

Definition at line 34 of file SUSYHighPtPhotonSkim.h.

Referenced by filter(), and SUSYHighPtPhotonSkim().

double SUSYHighPtPhotonSkim::Photon2Ptmin_ [private]

Definition at line 35 of file SUSYHighPtPhotonSkim.h.

Referenced by filter(), and SUSYHighPtPhotonSkim().

edm::InputTag SUSYHighPtPhotonSkim::Photonsrc_ [private]

Definition at line 32 of file SUSYHighPtPhotonSkim.h.

Referenced by filter(), and SUSYHighPtPhotonSkim().


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