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

Constructor & Destructor Documentation

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

Definition at line 38 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.

39  {
40  edm::LogInfo ("TauRegionalPixelSeedGenerator") << "Enter the TauRegionalPixelSeedGenerator";
41 
42  edm::ParameterSet regionPSet = conf_.getParameter<edm::ParameterSet>("RegionPSet");
43 
44  m_ptMin = regionPSet.getParameter<double>("ptMin");
45  m_originRadius = regionPSet.getParameter<double>("originRadius");
46  m_halfLength = regionPSet.getParameter<double>("originHalfLength");
47  m_deltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
48  m_deltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
50  token_vertex = iC.consumes<reco::VertexCollection>(regionPSet.getParameter<edm::InputTag>("vertexSrc"));
51  if (regionPSet.exists("searchOpt")){
52  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
53  }
54  else{
55  m_searchOpt = false;
56  }
59  // temporary until everything migrated to InputTag
61  if(regionPSet.existsAs<edm::InputTag>("measurementTrackerName")) {
62  tag = regionPSet.getParameter<edm::InputTag>("measurementTrackerName");
63  }
64  else {
65  tag = edm::InputTag(regionPSet.getParameter<std::string>("measurementTrackerName"));
66  }
67 
69  }
70  }
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 72 of file TauRegionalPixelSeedGenerator.h.

72 {}

Member Function Documentation

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

Definition at line 74 of file TauRegionalPixelSeedGenerator.h.

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

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

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

float TauRegionalPixelSeedGenerator::m_deltaEta
private

Definition at line 161 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_deltaPhi
private

Definition at line 162 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_halfLength
private

Definition at line 160 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

RectangularEtaPhiTrackingRegion::UseMeasurementTracker TauRegionalPixelSeedGenerator::m_howToUseMeasurementTracker
private

Definition at line 166 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_originRadius
private

Definition at line 159 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

float TauRegionalPixelSeedGenerator::m_ptMin
private

Definition at line 158 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

bool TauRegionalPixelSeedGenerator::m_searchOpt
private

Definition at line 167 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 164 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 165 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().

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

Definition at line 163 of file TauRegionalPixelSeedGenerator.h.

Referenced by regions(), and TauRegionalPixelSeedGenerator().