CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CSCOverlapsBeamSplashCut Class Reference

#include <Alignment/CSCOverlapsBeamSplashCut/src/CSCOverlapsBeamSplashCut.cc>

Inheritance diagram for CSCOverlapsBeamSplashCut:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 CSCOverlapsBeamSplashCut (const edm::ParameterSet &)
 ~CSCOverlapsBeamSplashCut ()

Private Member Functions

virtual void beginJob ()
virtual void endJob ()
virtual bool filter (edm::Event &, const edm::EventSetup &)

Private Attributes

int m_maxSegments
TH1F * m_numSegments
edm::InputTag m_src

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 40 of file CSCOverlapsBeamSplashCut.cc.


Constructor & Destructor Documentation

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

Definition at line 67 of file CSCOverlapsBeamSplashCut.cc.

References m_numSegments.

   : m_src(iConfig.getParameter<edm::InputTag>("src"))
   , m_maxSegments(iConfig.getParameter<int>("maxSegments"))
{
   edm::Service<TFileService> tFileService;
   m_numSegments = tFileService->make<TH1F>("numSegments", "", 201, -0.5, 200.5);
}
CSCOverlapsBeamSplashCut::~CSCOverlapsBeamSplashCut ( )

Definition at line 76 of file CSCOverlapsBeamSplashCut.cc.

{
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)
}

Member Function Documentation

void CSCOverlapsBeamSplashCut::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDFilter.

Definition at line 103 of file CSCOverlapsBeamSplashCut.cc.

{}
void CSCOverlapsBeamSplashCut::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDFilter.

Definition at line 106 of file CSCOverlapsBeamSplashCut.cc.

{}
bool CSCOverlapsBeamSplashCut::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDFilter.

Definition at line 89 of file CSCOverlapsBeamSplashCut.cc.

References cscSegments_cfi::cscSegments, edm::Event::getByLabel(), m_maxSegments, m_numSegments, and m_src.

                                                                              {
   edm::Handle<CSCSegmentCollection> cscSegments;
   iEvent.getByLabel(m_src, cscSegments);

   m_numSegments->Fill(cscSegments->size());

   if (m_maxSegments < 0) return true;

   else if (int(cscSegments->size()) <= m_maxSegments) return true;

   else return false;
}

Member Data Documentation

Definition at line 52 of file CSCOverlapsBeamSplashCut.cc.

Referenced by filter().

Definition at line 53 of file CSCOverlapsBeamSplashCut.cc.

Referenced by CSCOverlapsBeamSplashCut(), and filter().

Definition at line 51 of file CSCOverlapsBeamSplashCut.cc.

Referenced by filter().