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
 
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
 
float m_originRadius
 
float m_ptMin
 
bool m_searchOpt
 
edm::EDGetTokenT
< reco::CandidateView
token_jet
 
edm::EDGetTokenT
< MeasurementTrackerEvent
token_measurementTracker
 
edm::EDGetTokenT
< reco::VertexCollection
token_vertex
 

Detailed Description

Definition at line 33 of file TauRegionalPixelSeedGenerator.h.

Constructor & Destructor Documentation

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

Definition at line 36 of file TauRegionalPixelSeedGenerator.h.

References RectangularEtaPhiTrackingRegion::doubleToUseMeasurementTracker(), edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), RectangularEtaPhiTrackingRegion::kForSiStrips, RectangularEtaPhiTrackingRegion::kNever, m_deltaEta, m_deltaPhi, m_halfLength, m_howToUseMeasurementTracker, m_originRadius, m_ptMin, m_searchOpt, AlCaHLTBitMon_QueryRunRegistry::string, token_jet, token_measurementTracker, and token_vertex.

37  {
38  edm::LogInfo ("TauRegionalPixelSeedGenerator") << "Enter the TauRegionalPixelSeedGenerator";
39 
40  edm::ParameterSet regionPSet = conf_.getParameter<edm::ParameterSet>("RegionPSet");
41 
42  m_ptMin = regionPSet.getParameter<double>("ptMin");
43  m_originRadius = regionPSet.getParameter<double>("originRadius");
44  m_halfLength = regionPSet.getParameter<double>("originHalfLength");
45  m_deltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
46  m_deltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
48  token_vertex = iC.consumes<reco::VertexCollection>(regionPSet.getParameter<edm::InputTag>("vertexSrc"));
49  if (regionPSet.exists("searchOpt")){
50  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
51  }
52  else{
53  m_searchOpt = false;
54  }
56  if (regionPSet.exists("measurementTrackerName")){
57  // FIXME: when next time altering the configuration of this
58  // class, please change the types of the following parameters:
59  // - howToUseMeasurementTracker to at least int32 or to a string
60  // corresponding to the UseMeasurementTracker enumeration
61  // - measurementTrackerName to InputTag
62  if (regionPSet.exists("howToUseMeasurementTracker")){
63  m_howToUseMeasurementTracker = RectangularEtaPhiTrackingRegion::doubleToUseMeasurementTracker(regionPSet.getParameter<double>("howToUseMeasurementTracker"));
64  }
66  token_measurementTracker = iC.consumes<MeasurementTrackerEvent>(regionPSet.getParameter<std::string>("measurementTrackerName"));
67  }
68  }
69  }
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< MeasurementTrackerEvent > token_measurementTracker
edm::EDGetTokenT< reco::VertexCollection > token_vertex
static UseMeasurementTracker doubleToUseMeasurementTracker(double value)
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
edm::EDGetTokenT< reco::CandidateView > token_jet
virtual TauRegionalPixelSeedGenerator::~TauRegionalPixelSeedGenerator ( )
inlinevirtual

Definition at line 71 of file TauRegionalPixelSeedGenerator.h.

71 {}

Member Function Documentation

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

Implements TrackingRegionProducer.

Definition at line 74 of file TauRegionalPixelSeedGenerator.h.

References edm::Event::getByToken(), edm::EDGetTokenT< T >::isUninitialized(), m_deltaEta, m_deltaPhi, m_halfLength, m_howToUseMeasurementTracker, m_originRadius, m_ptMin, m_searchOpt, HLT_25ns14e33_v1_cff::measurementTracker, edm::Handle< T >::product(), query::result, token_jet, token_measurementTracker, token_vertex, and HLT_25ns14e33_v1_cff::vertices.

74  {
75  std::vector<TrackingRegion* > result;
76 
77  // double originZ;
78  double deltaZVertex, deltaRho;
79  GlobalPoint vertex;
80  // get the primary vertex
82  e.getByToken(token_vertex, h_vertices);
83  const reco::VertexCollection & vertices = * h_vertices;
84  if (not vertices.empty()) {
85 // originZ = vertices.front().z();
86  GlobalPoint myTmp(vertices.at(0).position().x(),vertices.at(0).position().y(), vertices.at(0).position().z());
87  vertex = myTmp;
88  deltaZVertex = m_halfLength;
89  deltaRho = m_originRadius;
90  } else {
91  // originZ = 0.;
92  GlobalPoint myTmp(0.,0.,0.);
93  vertex = myTmp;
94  deltaRho = 1.;
95  deltaZVertex = 15.;
96  }
97 
98  // get the jet direction
100  e.getByToken(token_jet, h_jets);
101 
106  measurementTracker = hmte.product();
107  }
108 
109  for(const reco::Candidate& myJet: *h_jets)
110  {
111  GlobalVector jetVector(myJet.momentum().x(),myJet.momentum().y(),myJet.momentum().z());
112 // GlobalPoint vertex(0, 0, originZ);
114  vertex,
115  m_ptMin,
116  deltaRho,
117  deltaZVertex,
118  m_deltaEta,
119  m_deltaPhi,
121  true,
122  measurementTracker,
123  m_searchOpt);
124  result.push_back(etaphiRegion);
125  }
126 
127  return result;
128  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
tuple result
Definition: query.py:137
edm::EDGetTokenT< reco::VertexCollection > token_vertex
T const * product() const
Definition: Handle.h:81
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
bool isUninitialized() const
Definition: EDGetToken.h:71
edm::EDGetTokenT< reco::CandidateView > token_jet

Member Data Documentation

edm::ParameterSet TauRegionalPixelSeedGenerator::conf_
private

Definition at line 131 of file TauRegionalPixelSeedGenerator.h.

float TauRegionalPixelSeedGenerator::m_deltaEta
private

Definition at line 136 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_deltaPhi
private

Definition at line 137 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_halfLength
private

Definition at line 135 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

RectangularEtaPhiTrackingRegion::UseMeasurementTracker TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
private

Definition at line 141 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_originRadius
private

Definition at line 134 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_ptMin
private

Definition at line 133 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

bool TauRegionalPixelSeedGenerator::m_searchOpt
private

Definition at line 142 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 139 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

edm::EDGetTokenT<MeasurementTrackerEvent> TauRegionalPixelSeedGenerator::token_measurementTracker
private

Definition at line 140 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 138 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().