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_, edm::ConsumesCollector &&iC)
 
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
 
std::string m_measurementTracker
 
float m_originRadius
 
float m_ptMin
 
bool m_searchOpt
 
edm::EDGetTokenT
< reco::CandidateView
token_jet
 
edm::EDGetTokenT
< reco::VertexCollection
token_vertex
 

Detailed Description

Definition at line 32 of file TauRegionalPixelSeedGenerator.h.

Constructor & Destructor Documentation

TauRegionalPixelSeedGenerator::TauRegionalPixelSeedGenerator ( const edm::ParameterSet conf_,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 35 of file TauRegionalPixelSeedGenerator.h.

References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), m_deltaEta, m_deltaPhi, m_halfLength, m_howToUseMeasurementTracker, m_measurementTracker, m_originRadius, m_ptMin, m_searchOpt, AlCaHLTBitMon_QueryRunRegistry::string, token_jet, and token_vertex.

36  {
37  edm::LogInfo ("TauRegionalPixelSeedGenerator") << "Enter the TauRegionalPixelSeedGenerator";
38 
39  edm::ParameterSet regionPSet = conf_.getParameter<edm::ParameterSet>("RegionPSet");
40 
41  m_ptMin = regionPSet.getParameter<double>("ptMin");
42  m_originRadius = regionPSet.getParameter<double>("originRadius");
43  m_halfLength = regionPSet.getParameter<double>("originHalfLength");
44  m_deltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
45  m_deltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
47  token_vertex = iC.consumes<reco::VertexCollection>(regionPSet.getParameter<edm::InputTag>("vertexSrc"));
48  if (regionPSet.exists("searchOpt")){
49  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
50  }
51  else{
52  m_searchOpt = false;
53  }
56  if (regionPSet.exists("measurementTrackerName")){
57  m_measurementTracker = regionPSet.getParameter<std::string>("measurementTrackerName");
58  if (regionPSet.exists("howToUseMeasurementTracker")){
59  m_howToUseMeasurementTracker = regionPSet.getParameter<double>("howToUseMeasurementTracker");
60  }
61  }
62  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< reco::VertexCollection > token_vertex
edm::EDGetTokenT< reco::CandidateView > token_jet
virtual TauRegionalPixelSeedGenerator::~TauRegionalPixelSeedGenerator ( )
inlinevirtual

Definition at line 64 of file TauRegionalPixelSeedGenerator.h.

64 {}

Member Function Documentation

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

Implements TrackingRegionProducer.

Definition at line 67 of file TauRegionalPixelSeedGenerator.h.

References edm::Event::getByToken(), m_deltaEta, m_deltaPhi, m_halfLength, m_howToUseMeasurementTracker, m_measurementTracker, m_originRadius, m_ptMin, m_searchOpt, reco::Candidate::momentum(), query::result, token_jet, and token_vertex.

67  {
68  std::vector<TrackingRegion* > result;
69 
70  // double originZ;
71  double deltaZVertex, deltaRho;
72  GlobalPoint vertex;
73  // get the primary vertex
75  e.getByToken(token_vertex, h_vertices);
76  const reco::VertexCollection & vertices = * h_vertices;
77  if (not vertices.empty()) {
78 // originZ = vertices.front().z();
79  GlobalPoint myTmp(vertices.at(0).position().x(),vertices.at(0).position().y(), vertices.at(0).position().z());
80  vertex = myTmp;
81  deltaZVertex = m_halfLength;
82  deltaRho = m_originRadius;
83  } else {
84  // originZ = 0.;
85  GlobalPoint myTmp(0.,0.,0.);
86  vertex = myTmp;
87  deltaRho = 1.;
88  deltaZVertex = 15.;
89  }
90 
91  // get the jet direction
93  e.getByToken(token_jet, h_jets);
94 
95  for (unsigned int iJet =0; iJet < h_jets->size(); ++iJet)
96  {
97  const reco::Candidate & myJet = (*h_jets)[iJet];
98  GlobalVector jetVector(myJet.momentum().x(),myJet.momentum().y(),myJet.momentum().z());
99 // GlobalPoint vertex(0, 0, originZ);
101  vertex,
102  m_ptMin,
103  deltaRho,
104  deltaZVertex,
105  m_deltaEta,
106  m_deltaPhi,
108  true,
110  m_searchOpt);
111  result.push_back(etaphiRegion);
112  }
113 
114  return result;
115  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
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
edm::EDGetTokenT< reco::VertexCollection > token_vertex
edm::EDGetTokenT< reco::CandidateView > token_jet

Member Data Documentation

edm::ParameterSet TauRegionalPixelSeedGenerator::conf_
private

Definition at line 118 of file TauRegionalPixelSeedGenerator.h.

float TauRegionalPixelSeedGenerator::m_deltaEta
private

Definition at line 123 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_deltaPhi
private

Definition at line 124 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_halfLength
private

Definition at line 122 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

double TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
private

Definition at line 128 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

std::string TauRegionalPixelSeedGenerator::m_measurementTracker
private

Definition at line 127 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_originRadius
private

Definition at line 121 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_ptMin
private

Definition at line 120 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

bool TauRegionalPixelSeedGenerator::m_searchOpt
private

Definition at line 129 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

edm::EDGetTokenT<reco::CandidateView> TauRegionalPixelSeedGenerator::token_jet
private

Definition at line 126 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

edm::EDGetTokenT<reco::VertexCollection> TauRegionalPixelSeedGenerator::token_vertex
private

Definition at line 125 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().