CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CSCTruthTest Class Reference

#include <CSCTruthTest.h>

Inheritance diagram for CSCTruthTest:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)

Private Attributes

const edm::ParameterSetconf_

Detailed Description

Definition at line 7 of file CSCTruthTest.h.


Constructor & Destructor Documentation

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

Definition at line 8 of file CSCTruthTest.cc.

                                                        :
  conf_(iConfig)
{

}
CSCTruthTest::~CSCTruthTest ( )

Definition at line 15 of file CSCTruthTest.cc.

{
 
}

Member Function Documentation

void CSCTruthTest::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 21 of file CSCTruthTest.cc.

References MuonTruth::analyze(), conf_, gather_cfg::cout, edm::Event::getByLabel(), and MuonTruth::muonFraction().

{
  using namespace edm;
  
  Handle<CSCRecHit2DCollection> cscRecHits;
  iEvent.getByLabel("csc2DRecHits",cscRecHits);

  MuonTruth theTruth(iEvent,iSetup,conf_);

  for(CSCRecHit2DCollection::const_iterator recHitItr = cscRecHits->begin();
      recHitItr != cscRecHits->end(); recHitItr++)
  {
     theTruth.analyze(*recHitItr);
     std::cout << theTruth.muonFraction() << " " << recHitItr->cscDetId() << std::endl;
  }
}

Member Data Documentation

Definition at line 16 of file CSCTruthTest.h.

Referenced by analyze().