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 36 of file TauRegionalPixelSeedGenerator.h.

References edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), 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.

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  }
57  // temporary until everything migrated to InputTag
59  if(regionPSet.existsAs<edm::InputTag>("measurementTrackerName")) {
60  tag = regionPSet.getParameter<edm::InputTag>("measurementTrackerName");
61  }
62  else {
63  tag = edm::InputTag(regionPSet.getParameter<std::string>("measurementTrackerName"));
64  }
65 
67  }
68  }
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 70 of file TauRegionalPixelSeedGenerator.h.

70 {}

Member Function Documentation

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

Definition at line 72 of file TauRegionalPixelSeedGenerator.h.

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

72  {
74 
75  desc.add<double>("ptMin", 5.0);
76  desc.add<double>("originHalfLength", 0.2);
77  desc.add<double>("originRadius", 0.2);
78  desc.add<double>("deltaEtaRegion", 0.1);
79  desc.add<double>("deltaPhiRegion", 0.1);
80  desc.add<edm::InputTag>("JetSrc", edm::InputTag("icone5Tau1"));
81  desc.add<edm::InputTag>("vertexSrc", edm::InputTag("pixelVertices"));
82  desc.add<bool>("searchOpt", false);
83 
84  desc.add<std::string>("howToUseMeasurementTracker", "ForSiStrips");
85 
86  // allow both InputTag and string for the moment, use InputTag as the default
87  desc.addNode(edm::ParameterDescription<edm::InputTag>("measurementTrackerName", edm::InputTag("MeasurementTrackerEvent"), true) xor
88  edm::ParameterDescription<std::string>("measurementTrackerName", "MeasurementTrackerEvent", true));
89 
90  // Only for backwards-compatibility
92  descRegion.add<edm::ParameterSetDescription>("RegionPSet", desc);
93 
94  descriptions.add("tauRegionalPixelSeedTrackingRegions", descRegion);
95  }
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 98 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, edm::Handle< T >::product(), mps_fire::result, token_jet, token_measurementTracker, token_vertex, and electrons_cff::vertices.

98  {
99  std::vector<std::unique_ptr<TrackingRegion> > result;
100 
101  // double originZ;
102  double deltaZVertex, deltaRho;
103  GlobalPoint vertex;
104  // get the primary vertex
106  e.getByToken(token_vertex, h_vertices);
107  const reco::VertexCollection & vertices = * h_vertices;
108  if (not vertices.empty()) {
109 // originZ = vertices.front().z();
110  GlobalPoint myTmp(vertices.at(0).position().x(),vertices.at(0).position().y(), vertices.at(0).position().z());
111  vertex = myTmp;
112  deltaZVertex = m_halfLength;
113  deltaRho = m_originRadius;
114  } else {
115  // originZ = 0.;
116  GlobalPoint myTmp(0.,0.,0.);
117  vertex = myTmp;
118  deltaRho = 1.;
119  deltaZVertex = 15.;
120  }
121 
122  // get the jet direction
124  e.getByToken(token_jet, h_jets);
125 
126  const MeasurementTrackerEvent *measurementTracker = nullptr;
130  measurementTracker = hmte.product();
131  }
132 
133  for(const reco::Candidate& myJet: *h_jets)
134  {
135  GlobalVector jetVector(myJet.momentum().x(),myJet.momentum().y(),myJet.momentum().z());
136 // GlobalPoint vertex(0, 0, originZ);
137  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>( jetVector,
138  vertex,
139  m_ptMin,
140  deltaRho,
141  deltaZVertex,
142  m_deltaEta,
143  m_deltaPhi,
145  true,
146  measurementTracker,
147  m_searchOpt));
148  }
149 
150  return result;
151  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
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:81
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
bool isUninitialized() const
Definition: EDGetToken.h:73
edm::EDGetTokenT< reco::CandidateView > token_jet

Member Data Documentation

edm::ParameterSet TauRegionalPixelSeedGenerator::conf_
private

Definition at line 154 of file TauRegionalPixelSeedGenerator.h.

float TauRegionalPixelSeedGenerator::m_deltaEta
private

Definition at line 159 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_deltaPhi
private

Definition at line 160 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_halfLength
private

Definition at line 158 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

RectangularEtaPhiTrackingRegion::UseMeasurementTracker TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
private

Definition at line 164 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_originRadius
private

Definition at line 157 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_ptMin
private

Definition at line 156 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

bool TauRegionalPixelSeedGenerator::m_searchOpt
private

Definition at line 165 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 162 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 163 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 161 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().