CMS 3D CMS Logo

Public Member Functions | Private Attributes

IsolationRegionAroundL3Muon Class Reference

#include <IsolationRegionAroundL3Muon.h>

Inheritance diagram for IsolationRegionAroundL3Muon:
TrackingRegionProducer

List of all members.

Public Member Functions

 IsolationRegionAroundL3Muon (const edm::ParameterSet &cfg)
virtual std::vector
< TrackingRegion * > 
regions (const edm::Event &ev, const edm::EventSetup &es) const
virtual ~IsolationRegionAroundL3Muon ()

Private Attributes

double theDeltaEta
double theDeltaPhi
edm::InputTag theInputTrkSrc
std::string theMeasurementTrackerName
double theOriginHalfLength
double theOriginRadius
double theOriginZPos
double thePtMin
std::string theVertexSrc
bool theVertexZconstrained

Detailed Description

Definition at line 14 of file IsolationRegionAroundL3Muon.h.


Constructor & Destructor Documentation

IsolationRegionAroundL3Muon::IsolationRegionAroundL3Muon ( const edm::ParameterSet cfg) [inline]

Definition at line 18 of file IsolationRegionAroundL3Muon.h.

References edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theDeltaEta, theDeltaPhi, theInputTrkSrc, theMeasurementTrackerName, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertexSrc, and theVertexZconstrained.

                                                          { 

    edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");

    theVertexSrc   = regionPSet.getParameter<std::string>("vertexSrc");
    theInputTrkSrc = regionPSet.getParameter<edm::InputTag>("TrkSrc");

    thePtMin              = regionPSet.getParameter<double>("ptMin");
    theOriginRadius       = regionPSet.getParameter<double>("originRadius");
    theOriginHalfLength   = regionPSet.getParameter<double>("originHalfLength");
    theVertexZconstrained = regionPSet.getParameter<bool>("vertexZConstrained");
    theOriginZPos  = regionPSet.getParameter<double>("vertexZDefault");

    theDeltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
    theDeltaPhi =  regionPSet.getParameter<double>("deltaPhiRegion");
    theMeasurementTrackerName = regionPSet.getParameter<std::string>("measurementTrackerName"); 
  }   
virtual IsolationRegionAroundL3Muon::~IsolationRegionAroundL3Muon ( ) [inline, virtual]

Definition at line 36 of file IsolationRegionAroundL3Muon.h.

{}

Member Function Documentation

virtual std::vector<TrackingRegion* > IsolationRegionAroundL3Muon::regions ( const edm::Event ev,
const edm::EventSetup es 
) const [inline, virtual]

Implements TrackingRegionProducer.

Definition at line 38 of file IsolationRegionAroundL3Muon.h.

References edm::Event::getByLabel(), edm::Handle< T >::product(), query::result, theDeltaEta, theDeltaPhi, theInputTrkSrc, theMeasurementTrackerName, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertexSrc, and theVertexZconstrained.

                                     {

    std::vector<TrackingRegion* > result;

    // optional constraint for vertex
    // get highest Pt pixel vertex (if existing)
    double deltaZVertex =  theOriginHalfLength;
    double originz = theOriginZPos;
    if (theVertexSrc.length()>1) {
      edm::Handle<reco::VertexCollection> vertices;
      ev.getByLabel(theVertexSrc,vertices);
      const reco::VertexCollection vertCollection = *(vertices.product());
      reco::VertexCollection::const_iterator ci = vertCollection.begin();
      if (vertCollection.size()>0) {
            originz = ci->z();
      } else {
            originz = theOriginZPos;
            deltaZVertex = 15.;
      }
    }

    edm::Handle<reco::TrackCollection> trks;
    ev.getByLabel(theInputTrkSrc, trks);

    for(reco::TrackCollection::const_iterator iTrk = trks->begin();iTrk != trks->end();iTrk++) {
      double vz = (theVertexZconstrained) ? iTrk->dz() : originz;
      GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz());
      result.push_back( 
          new RectangularEtaPhiTrackingRegion( dirVector, GlobalPoint(0,0,float(vz)), 
                                               thePtMin, theOriginRadius, deltaZVertex, theDeltaEta, theDeltaPhi,
                                               0,true,theMeasurementTrackerName) );
    }

    return result;
  }

Member Data Documentation

Definition at line 86 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 87 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 78 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 88 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 82 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 81 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 84 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 80 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 77 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().

Definition at line 83 of file IsolationRegionAroundL3Muon.h.

Referenced by IsolationRegionAroundL3Muon(), and regions().