CMS 3D CMS Logo

Public Member Functions | Private Attributes

TauRegionalPixelSeedGenerator Class Reference

#include <TauRegionalPixelSeedGenerator.h>

Inheritance diagram for TauRegionalPixelSeedGenerator:
TrackingRegionProducer

List of all members.

Public Member Functions

virtual std::vector
< TrackingRegion * > 
regions (const edm::Event &e, const edm::EventSetup &es) const
 TauRegionalPixelSeedGenerator (const edm::ParameterSet &conf_)
virtual ~TauRegionalPixelSeedGenerator ()

Private Attributes

edm::ParameterSet conf_
float m_deltaEta
float m_deltaPhi
float m_halfLength
edm::InputTag m_jetSrc
float m_originRadius
float m_ptMin
edm::InputTag m_vertexSrc

Detailed Description

Definition at line 32 of file TauRegionalPixelSeedGenerator.h.


Constructor & Destructor Documentation

TauRegionalPixelSeedGenerator::TauRegionalPixelSeedGenerator ( const edm::ParameterSet conf_) [inline, explicit]

Definition at line 35 of file TauRegionalPixelSeedGenerator.h.

References edm::ParameterSet::getParameter(), m_deltaEta, m_deltaPhi, m_halfLength, m_jetSrc, m_originRadius, m_ptMin, and m_vertexSrc.

                                                                        {
      edm::LogInfo ("TauRegionalPixelSeedGenerator") << "Enter the TauRegionalPixelSeedGenerator";

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

      m_ptMin        = regionPSet.getParameter<double>("ptMin");
      m_originRadius = regionPSet.getParameter<double>("originRadius");
      m_halfLength   = regionPSet.getParameter<double>("originHalfLength");
      m_deltaEta     = regionPSet.getParameter<double>("deltaEtaRegion");
      m_deltaPhi     = regionPSet.getParameter<double>("deltaPhiRegion");
      m_jetSrc       = regionPSet.getParameter<edm::InputTag>("JetSrc");
      m_vertexSrc    = regionPSet.getParameter<edm::InputTag>("vertexSrc");
    }
virtual TauRegionalPixelSeedGenerator::~TauRegionalPixelSeedGenerator ( ) [inline, virtual]

Definition at line 49 of file TauRegionalPixelSeedGenerator.h.

{}

Member Function Documentation

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

Implements TrackingRegionProducer.

Definition at line 52 of file TauRegionalPixelSeedGenerator.h.

References edm::Event::getByLabel(), m_deltaEta, m_deltaPhi, m_halfLength, m_jetSrc, m_originRadius, m_ptMin, m_vertexSrc, reco::Candidate::momentum(), query::result, and ExpressReco_HICollisions_FallBack::vertices.

                                                                                                  {
      std::vector<TrackingRegion* > result;

      //      double originZ;
      double deltaZVertex, deltaRho;
        GlobalPoint vertex;
      // get the primary vertex
      edm::Handle<reco::VertexCollection> h_vertices;
      e.getByLabel(m_vertexSrc, h_vertices);
      const reco::VertexCollection & vertices = * h_vertices;
      if (not vertices.empty()) {
//        originZ      = vertices.front().z();
        GlobalPoint myTmp(vertices.at(0).position().x(),vertices.at(0).position().y(), vertices.at(0).position().z());
          vertex = myTmp;
          deltaZVertex = m_halfLength;
          deltaRho = m_originRadius;
      } else {
  //      originZ      =  0.;
          GlobalPoint myTmp(0.,0.,0.);
          vertex = myTmp;
          deltaRho = 1.;
         deltaZVertex = 15.;
      }
      
      // get the jet direction
      edm::Handle<edm::View<reco::Candidate> > h_jets;
      e.getByLabel(m_jetSrc, h_jets);
      
      for (unsigned int iJet =0; iJet < h_jets->size(); ++iJet)
        {
          const reco::Candidate & myJet = (*h_jets)[iJet];
          GlobalVector jetVector(myJet.momentum().x(),myJet.momentum().y(),myJet.momentum().z());
//          GlobalPoint  vertex(0, 0, originZ);
          RectangularEtaPhiTrackingRegion* etaphiRegion = new RectangularEtaPhiTrackingRegion( jetVector,
                                                                                               vertex,
                                                                                               m_ptMin,
                                                                                               deltaRho,
                                                                                               deltaZVertex,
                                                                                               m_deltaEta,
                                                                                               m_deltaPhi );
          result.push_back(etaphiRegion);
      }

      return result;
    }

Member Data Documentation

Definition at line 99 of file TauRegionalPixelSeedGenerator.h.

Definition at line 104 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

Definition at line 105 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

Definition at line 103 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

Definition at line 106 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

Definition at line 102 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

Definition at line 101 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

Definition at line 107 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().