CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
TauRegionalPixelSeedGenerator Class Reference

#include <TauRegionalPixelSeedGenerator.h>

Inheritance diagram for TauRegionalPixelSeedGenerator:
TrackingRegionProducer

Public Member Functions

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

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

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::CandidateViewtoken_jet
 
edm::EDGetTokenT< MeasurementTrackerEventtoken_measurementTracker
 
edm::EDGetTokenT< reco::VertexCollectiontoken_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 35 of file TauRegionalPixelSeedGenerator.h.

References edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), HLT_2018_cff::InputTag, RectangularEtaPhiTrackingRegion::kNever, m_deltaEta, m_deltaPhi, m_halfLength, m_howToUseMeasurementTracker, m_originRadius, m_ptMin, m_searchOpt, AlCaHLTBitMon_QueryRunRegistry::string, RectangularEtaPhiTrackingRegion::stringToUseMeasurementTracker(), GlobalPosition_Frontier_DevDB_cff::tag, token_jet, token_measurementTracker, and token_vertex.

35  {
36  edm::LogInfo("TauRegionalPixelSeedGenerator") << "Enter the TauRegionalPixelSeedGenerator";
37 
38  edm::ParameterSet regionPSet = conf_.getParameter<edm::ParameterSet>("RegionPSet");
39 
40  m_ptMin = regionPSet.getParameter<double>("ptMin");
41  m_originRadius = regionPSet.getParameter<double>("originRadius");
42  m_halfLength = regionPSet.getParameter<double>("originHalfLength");
43  m_deltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
44  m_deltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
46  token_vertex = iC.consumes<reco::VertexCollection>(regionPSet.getParameter<edm::InputTag>("vertexSrc"));
47  if (regionPSet.exists("searchOpt")) {
48  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
49  } else {
50  m_searchOpt = false;
51  }
53  regionPSet.getParameter<std::string>("howToUseMeasurementTracker"));
55  // temporary until everything migrated to InputTag
57  if (regionPSet.existsAs<edm::InputTag>("measurementTrackerName")) {
58  tag = regionPSet.getParameter<edm::InputTag>("measurementTrackerName");
59  } else {
60  tag = edm::InputTag(regionPSet.getParameter<std::string>("measurementTrackerName"));
61  }
62 
64  }
65  }
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
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
edm::EDGetTokenT< reco::VertexCollection > token_vertex
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
edm::EDGetTokenT< reco::CandidateView > token_jet
TauRegionalPixelSeedGenerator::~TauRegionalPixelSeedGenerator ( )
inlineoverride

Definition at line 67 of file TauRegionalPixelSeedGenerator.h.

67 {}

Member Function Documentation

static void TauRegionalPixelSeedGenerator::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 69 of file TauRegionalPixelSeedGenerator.h.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

69  {
71 
72  desc.add<double>("ptMin", 5.0);
73  desc.add<double>("originHalfLength", 0.2);
74  desc.add<double>("originRadius", 0.2);
75  desc.add<double>("deltaEtaRegion", 0.1);
76  desc.add<double>("deltaPhiRegion", 0.1);
77  desc.add<edm::InputTag>("JetSrc", edm::InputTag("icone5Tau1"));
78  desc.add<edm::InputTag>("vertexSrc", edm::InputTag("pixelVertices"));
79  desc.add<bool>("searchOpt", false);
80 
81  desc.add<std::string>("howToUseMeasurementTracker", "ForSiStrips");
82 
83  // allow both InputTag and string for the moment, use InputTag as the default
85  "measurementTrackerName", edm::InputTag("MeasurementTrackerEvent"), true) xor
86  edm::ParameterDescription<std::string>("measurementTrackerName", "MeasurementTrackerEvent", true));
87 
88  // Only for backwards-compatibility
90  descRegion.add<edm::ParameterSetDescription>("RegionPSet", desc);
91 
92  descriptions.add("tauRegionalPixelSeedTrackingRegions", descRegion);
93  }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector<std::unique_ptr<TrackingRegion> > TauRegionalPixelSeedGenerator::regions ( const edm::Event e,
const edm::EventSetup es 
) const
inlineoverridevirtual

Implements TrackingRegionProducer.

Definition at line 95 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, HLTSiStripMonitoring_cff::measurementTracker, edm::Handle< T >::product(), mps_fire::result, token_jet, token_measurementTracker, token_vertex, bphysicsOniaDQM_cfi::vertex, and pwdgSkimBPark_cfi::vertices.

95  {
96  std::vector<std::unique_ptr<TrackingRegion> > result;
97 
98  // double originZ;
99  double deltaZVertex, deltaRho;
101  // get the primary vertex
103  e.getByToken(token_vertex, h_vertices);
104  const reco::VertexCollection& vertices = *h_vertices;
105  if (not vertices.empty()) {
106  // originZ = vertices.front().z();
107  GlobalPoint myTmp(vertices.at(0).position().x(), vertices.at(0).position().y(), vertices.at(0).position().z());
108  vertex = myTmp;
109  deltaZVertex = m_halfLength;
110  deltaRho = m_originRadius;
111  } else {
112  // originZ = 0.;
113  GlobalPoint myTmp(0., 0., 0.);
114  vertex = myTmp;
115  deltaRho = 1.;
116  deltaZVertex = 15.;
117  }
118 
119  // get the jet direction
121  e.getByToken(token_jet, h_jets);
122 
127  measurementTracker = hmte.product();
128  }
129 
130  for (const reco::Candidate& myJet : *h_jets) {
131  GlobalVector jetVector(myJet.momentum().x(), myJet.momentum().y(), myJet.momentum().z());
132  // GlobalPoint vertex(0, 0, originZ);
133  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(jetVector,
134  vertex,
135  m_ptMin,
136  deltaRho,
137  deltaZVertex,
138  m_deltaEta,
139  m_deltaPhi,
141  true,
142  measurementTracker,
143  m_searchOpt));
144  }
145 
146  return result;
147  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
edm::EDGetTokenT< reco::VertexCollection > token_vertex
T const * product() const
Definition: Handle.h:69
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
bool isUninitialized() const
Definition: EDGetToken.h:70
edm::EDGetTokenT< reco::CandidateView > token_jet

Member Data Documentation

edm::ParameterSet TauRegionalPixelSeedGenerator::conf_
private

Definition at line 150 of file TauRegionalPixelSeedGenerator.h.

float TauRegionalPixelSeedGenerator::m_deltaEta
private

Definition at line 155 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_deltaPhi
private

Definition at line 156 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_halfLength
private

Definition at line 154 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

RectangularEtaPhiTrackingRegion::UseMeasurementTracker TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
private

Definition at line 160 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_originRadius
private

Definition at line 153 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_ptMin
private

Definition at line 152 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

bool TauRegionalPixelSeedGenerator::m_searchOpt
private

Definition at line 161 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 158 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 159 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 157 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().