CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TauRegionalPixelSeedGenerator.h
Go to the documentation of this file.
1 #ifndef TauRegionalPixelSeedGenerator_h
2 #define TauRegionalPixelSeedGenerator_h
3 
4 //
5 // Class: TauRegionalPixelSeedGenerator
6 
7 
21 // Math
22 #include "Math/GenVector/VectorUtil.h"
23 #include "Math/GenVector/PxPyPzE4D.h"
24 
26 
29 
30 
32  public:
33 
35  edm::LogInfo ("TauRegionalPixelSeedGenerator") << "Enter the TauRegionalPixelSeedGenerator";
36 
37  edm::ParameterSet regionPSet = conf_.getParameter<edm::ParameterSet>("RegionPSet");
38 
39  m_ptMin = regionPSet.getParameter<double>("ptMin");
40  m_originRadius = regionPSet.getParameter<double>("originRadius");
41  m_halfLength = regionPSet.getParameter<double>("originHalfLength");
42  m_deltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
43  m_deltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
44  m_jetSrc = regionPSet.getParameter<edm::InputTag>("JetSrc");
45  m_vertexSrc = regionPSet.getParameter<edm::InputTag>("vertexSrc");
46  if (regionPSet.exists("searchOpt")){
47  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
48  }
49  else{
50  m_searchOpt = false;
51  }
54  if (regionPSet.exists("measurementTrackerName")){
55  m_measurementTracker = regionPSet.getParameter<std::string>("measurementTrackerName");
56  if (regionPSet.exists("howToUseMeasurementTracker")){
57  m_howToUseMeasurementTracker = regionPSet.getParameter<double>("howToUseMeasurementTracker");
58  }
59  }
60  }
61 
63 
64 
65  virtual std::vector<TrackingRegion* > regions(const edm::Event& e, const edm::EventSetup& es) const {
66  std::vector<TrackingRegion* > result;
67 
68  // double originZ;
69  double deltaZVertex, deltaRho;
70  GlobalPoint vertex;
71  // get the primary vertex
73  e.getByLabel(m_vertexSrc, h_vertices);
74  const reco::VertexCollection & vertices = * h_vertices;
75  if (not vertices.empty()) {
76 // originZ = vertices.front().z();
77  GlobalPoint myTmp(vertices.at(0).position().x(),vertices.at(0).position().y(), vertices.at(0).position().z());
78  vertex = myTmp;
79  deltaZVertex = m_halfLength;
80  deltaRho = m_originRadius;
81  } else {
82  // originZ = 0.;
83  GlobalPoint myTmp(0.,0.,0.);
84  vertex = myTmp;
85  deltaRho = 1.;
86  deltaZVertex = 15.;
87  }
88 
89  // get the jet direction
91  e.getByLabel(m_jetSrc, h_jets);
92 
93  for (unsigned int iJet =0; iJet < h_jets->size(); ++iJet)
94  {
95  const reco::Candidate & myJet = (*h_jets)[iJet];
96  GlobalVector jetVector(myJet.momentum().x(),myJet.momentum().y(),myJet.momentum().z());
97 // GlobalPoint vertex(0, 0, originZ);
99  vertex,
100  m_ptMin,
101  deltaRho,
102  deltaZVertex,
103  m_deltaEta,
104  m_deltaPhi,
106  true,
108  m_searchOpt);
109  result.push_back(etaphiRegion);
110  }
111 
112  return result;
113  }
114 
115  private:
117 
118  float m_ptMin;
121  float m_deltaEta;
122  float m_deltaPhi;
125  std::string m_measurementTracker;
128 };
129 
130 #endif
T getParameter(std::string const &) const
TauRegionalPixelSeedGenerator(const edm::ParameterSet &conf_)
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
virtual Vector momentum() const =0
spatial momentum vector
virtual std::vector< TrackingRegion * > regions(const edm::Event &e, const edm::EventSetup &es) const
tuple result
Definition: query.py:137
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356