CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TauRegionalPixelSeedGenerator Class Reference

#include <TauRegionalPixelSeedGenerator.h>

Inheritance diagram for TauRegionalPixelSeedGenerator:
TrackingRegionProducer

Public Member Functions

virtual std::vector
< TrackingRegion * > 
regions (const edm::Event &e, const edm::EventSetup &es) const
 
 TauRegionalPixelSeedGenerator (const edm::ParameterSet &conf_)
 
virtual ~TauRegionalPixelSeedGenerator ()
 
- Public Member Functions inherited from TrackingRegionProducer
virtual ~TrackingRegionProducer ()
 

Private Attributes

edm::ParameterSet conf_
 
float m_deltaEta
 
float m_deltaPhi
 
float m_halfLength
 
double m_howToUseMeasurementTracker
 
edm::InputTag m_jetSrc
 
std::string m_measurementTracker
 
float m_originRadius
 
float m_ptMin
 
bool m_searchOpt
 
edm::InputTag m_vertexSrc
 

Detailed Description

Definition at line 31 of file TauRegionalPixelSeedGenerator.h.

Constructor & Destructor Documentation

TauRegionalPixelSeedGenerator::TauRegionalPixelSeedGenerator ( const edm::ParameterSet conf_)
inlineexplicit

Definition at line 34 of file TauRegionalPixelSeedGenerator.h.

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

34  {
35  edm::LogInfo ("TauRegionalPixelSeedGenerator") << "Enter the TauRegionalPixelSeedGenerator";
36 
37  edm::ParameterSet regionPSet = conf_.getParameter<edm::ParameterSet>("RegionPSet");
38 
39  m_ptMin = regionPSet.getParameter<double>("ptMin");
40  m_originRadius = regionPSet.getParameter<double>("originRadius");
41  m_halfLength = regionPSet.getParameter<double>("originHalfLength");
42  m_deltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
43  m_deltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
44  m_jetSrc = regionPSet.getParameter<edm::InputTag>("JetSrc");
45  m_vertexSrc = regionPSet.getParameter<edm::InputTag>("vertexSrc");
46  if (regionPSet.exists("searchOpt")){
47  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
48  }
49  else{
50  m_searchOpt = false;
51  }
54  if (regionPSet.exists("measurementTrackerName")){
55  m_measurementTracker = regionPSet.getParameter<std::string>("measurementTrackerName");
56  if (regionPSet.exists("howToUseMeasurementTracker")){
57  m_howToUseMeasurementTracker = regionPSet.getParameter<double>("howToUseMeasurementTracker");
58  }
59  }
60  }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
virtual TauRegionalPixelSeedGenerator::~TauRegionalPixelSeedGenerator ( )
inlinevirtual

Definition at line 62 of file TauRegionalPixelSeedGenerator.h.

62 {}

Member Function Documentation

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

Implements TrackingRegionProducer.

Definition at line 65 of file TauRegionalPixelSeedGenerator.h.

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

65  {
66  std::vector<TrackingRegion* > result;
67 
68  // double originZ;
69  double deltaZVertex, deltaRho;
70  GlobalPoint vertex;
71  // get the primary vertex
73  e.getByLabel(m_vertexSrc, h_vertices);
74  const reco::VertexCollection & vertices = * h_vertices;
75  if (not vertices.empty()) {
76 // originZ = vertices.front().z();
77  GlobalPoint myTmp(vertices.at(0).position().x(),vertices.at(0).position().y(), vertices.at(0).position().z());
78  vertex = myTmp;
79  deltaZVertex = m_halfLength;
80  deltaRho = m_originRadius;
81  } else {
82  // originZ = 0.;
83  GlobalPoint myTmp(0.,0.,0.);
84  vertex = myTmp;
85  deltaRho = 1.;
86  deltaZVertex = 15.;
87  }
88 
89  // get the jet direction
91  e.getByLabel(m_jetSrc, h_jets);
92 
93  for (unsigned int iJet =0; iJet < h_jets->size(); ++iJet)
94  {
95  const reco::Candidate & myJet = (*h_jets)[iJet];
96  GlobalVector jetVector(myJet.momentum().x(),myJet.momentum().y(),myJet.momentum().z());
97 // GlobalPoint vertex(0, 0, originZ);
99  vertex,
100  m_ptMin,
101  deltaRho,
102  deltaZVertex,
103  m_deltaEta,
104  m_deltaPhi,
106  true,
108  m_searchOpt);
109  result.push_back(etaphiRegion);
110  }
111 
112  return result;
113  }
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
virtual Vector momentum() const =0
spatial momentum vector
tuple result
Definition: query.py:137
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356

Member Data Documentation

edm::ParameterSet TauRegionalPixelSeedGenerator::conf_
private

Definition at line 116 of file TauRegionalPixelSeedGenerator.h.

float TauRegionalPixelSeedGenerator::m_deltaEta
private

Definition at line 121 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_deltaPhi
private

Definition at line 122 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_halfLength
private

Definition at line 120 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

double TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
private

Definition at line 126 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

edm::InputTag TauRegionalPixelSeedGenerator::m_jetSrc
private

Definition at line 123 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

std::string TauRegionalPixelSeedGenerator::m_measurementTracker
private

Definition at line 125 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_originRadius
private

Definition at line 119 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_ptMin
private

Definition at line 118 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

bool TauRegionalPixelSeedGenerator::m_searchOpt
private

Definition at line 127 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

edm::InputTag TauRegionalPixelSeedGenerator::m_vertexSrc
private

Definition at line 124 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().