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::TauRegionalPixelSeedGenerator ( const edm::ParameterSet conf_,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 35 of file TauRegionalPixelSeedGenerator.h.

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  }

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

◆ ~TauRegionalPixelSeedGenerator()

TauRegionalPixelSeedGenerator::~TauRegionalPixelSeedGenerator ( )
inlineoverride

Definition at line 67 of file TauRegionalPixelSeedGenerator.h.

67 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 69 of file TauRegionalPixelSeedGenerator.h.

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  }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ regions()

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.

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 
126  e.getByToken(token_measurementTracker, hmte);
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,
143  m_searchOpt));
144  }
145 
146  return result;
147  }

References MillePedeFileConverter_cfg::e, 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 AlignmentTracksFromVertexSelector_cfi::vertices.

Member Data Documentation

◆ conf_

edm::ParameterSet TauRegionalPixelSeedGenerator::conf_
private

Definition at line 150 of file TauRegionalPixelSeedGenerator.h.

Referenced by TauRegionalPixelSeedGenerator().

◆ m_deltaEta

float TauRegionalPixelSeedGenerator::m_deltaEta
private

Definition at line 155 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ m_deltaPhi

float TauRegionalPixelSeedGenerator::m_deltaPhi
private

Definition at line 156 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ m_halfLength

float TauRegionalPixelSeedGenerator::m_halfLength
private

Definition at line 154 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ m_howToUseMeasurementTracker

RectangularEtaPhiTrackingRegion::UseMeasurementTracker TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
private

Definition at line 160 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ m_originRadius

float TauRegionalPixelSeedGenerator::m_originRadius
private

Definition at line 153 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ m_ptMin

float TauRegionalPixelSeedGenerator::m_ptMin
private

Definition at line 152 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ m_searchOpt

bool TauRegionalPixelSeedGenerator::m_searchOpt
private

Definition at line 161 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ token_jet

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

Definition at line 158 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ token_measurementTracker

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

Definition at line 159 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

◆ token_vertex

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

Definition at line 157 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

TauRegionalPixelSeedGenerator::m_halfLength
float m_halfLength
Definition: TauRegionalPixelSeedGenerator.h:154
Vector3DBase
Definition: Vector3DBase.h:8
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HLTSiStripMonitoring_cff.measurementTracker
measurementTracker
Definition: HLTSiStripMonitoring_cff.py:178
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::EDGetTokenT::isUninitialized
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle< reco::VertexCollection >
AlignmentTracksFromVertexSelector_cfi.vertices
vertices
Definition: AlignmentTracksFromVertexSelector_cfi.py:5
TauRegionalPixelSeedGenerator::m_ptMin
float m_ptMin
Definition: TauRegionalPixelSeedGenerator.h:152
TauRegionalPixelSeedGenerator::conf_
edm::ParameterSet conf_
Definition: TauRegionalPixelSeedGenerator.h:150
TauRegionalPixelSeedGenerator::token_measurementTracker
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
Definition: TauRegionalPixelSeedGenerator.h:159
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
TauRegionalPixelSeedGenerator::m_deltaPhi
float m_deltaPhi
Definition: TauRegionalPixelSeedGenerator.h:156
Point3DBase< float, GlobalTag >
edm::View
Definition: CaloClusterFwd.h:14
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kNever
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:16
edm::ParameterSet
Definition: ParameterSet.h:47
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
TauRegionalPixelSeedGenerator::token_vertex
edm::EDGetTokenT< reco::VertexCollection > token_vertex
Definition: TauRegionalPixelSeedGenerator.h:157
TauRegionalPixelSeedGenerator::m_originRadius
float m_originRadius
Definition: TauRegionalPixelSeedGenerator.h:153
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::Candidate
Definition: Candidate.h:27
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
Definition: TauRegionalPixelSeedGenerator.h:160
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
mps_fire.result
result
Definition: mps_fire.py:311
TauRegionalPixelSeedGenerator::m_searchOpt
bool m_searchOpt
Definition: TauRegionalPixelSeedGenerator.h:161
TauRegionalPixelSeedGenerator::token_jet
edm::EDGetTokenT< reco::CandidateView > token_jet
Definition: TauRegionalPixelSeedGenerator.h:158
edm::ParameterDescription
Definition: ParameterDescription.h:110
edm::InputTag
Definition: InputTag.h:15
RectangularEtaPhiTrackingRegion::stringToUseMeasurementTracker
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
Definition: RectangularEtaPhiTrackingRegion.cc:82
TauRegionalPixelSeedGenerator::m_deltaEta
float m_deltaEta
Definition: TauRegionalPixelSeedGenerator.h:155
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37