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");
48  if (regionPSet.exists("measurementTrackerName")){
49  m_measurementTracker = regionPSet.getParameter<std::string>("measurementTrackerName");
50  if (regionPSet.exists("howToUseMeasurementTracker")){
51  m_howToUseMeasurementTracker = regionPSet.getParameter<double>("howToUseMeasurementTracker");
52  }
53  }
54  }
55 
57 
58 
59  virtual std::vector<TrackingRegion* > regions(const edm::Event& e, const edm::EventSetup& es) const {
60  std::vector<TrackingRegion* > result;
61 
62  // double originZ;
63  double deltaZVertex, deltaRho;
64  GlobalPoint vertex;
65  // get the primary vertex
67  e.getByLabel(m_vertexSrc, h_vertices);
68  const reco::VertexCollection & vertices = * h_vertices;
69  if (not vertices.empty()) {
70 // originZ = vertices.front().z();
71  GlobalPoint myTmp(vertices.at(0).position().x(),vertices.at(0).position().y(), vertices.at(0).position().z());
72  vertex = myTmp;
73  deltaZVertex = m_halfLength;
74  deltaRho = m_originRadius;
75  } else {
76  // originZ = 0.;
77  GlobalPoint myTmp(0.,0.,0.);
78  vertex = myTmp;
79  deltaRho = 1.;
80  deltaZVertex = 15.;
81  }
82 
83  // get the jet direction
85  e.getByLabel(m_jetSrc, h_jets);
86 
87  for (unsigned int iJet =0; iJet < h_jets->size(); ++iJet)
88  {
89  const reco::Candidate & myJet = (*h_jets)[iJet];
90  GlobalVector jetVector(myJet.momentum().x(),myJet.momentum().y(),myJet.momentum().z());
91 // GlobalPoint vertex(0, 0, originZ);
93  vertex,
94  m_ptMin,
95  deltaRho,
96  deltaZVertex,
97  m_deltaEta,
98  m_deltaPhi,
100  true,
102  result.push_back(etaphiRegion);
103  }
104 
105  return result;
106  }
107 
108  private:
110 
111  float m_ptMin;
114  float m_deltaEta;
115  float m_deltaPhi;
118  std::string m_measurementTracker;
120 };
121 
122 #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:355