CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
HITRegionalPixelSeedGenerator Class Reference
Inheritance diagram for HITRegionalPixelSeedGenerator:
TrackingRegionProducer

Public Member Functions

 HITRegionalPixelSeedGenerator (const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
 
std::vector< std::unique_ptr
< TrackingRegion > > 
regions (const edm::Event &e, const edm::EventSetup &es) const override
 
 ~HITRegionalPixelSeedGenerator () override
 
- Public Member Functions inherited from TrackingRegionProducer
virtual ~TrackingRegionProducer ()
 

Private Attributes

float deltaL1JetEta
 
float deltaL1JetPhi
 
float deltaTrackEta
 
float deltaTrackPhi
 
double etaCenter_
 
bool fixedReg_
 
float halflength
 
float originradius
 
double phiCenter_
 
float ptmin
 
edm::ESGetToken< MagneticField,
IdealMagneticFieldRecord
token_bfield
 
edm::EDGetTokenT
< trigger::TriggerFilterObjectWithRefs
token_isoTrack
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
token_l1jet
 
edm::ESGetToken
< MultipleScatteringParametrisationMaker,
TrackerMultipleScatteringRecord
token_msmaker
 
edm::EDGetTokenT
< reco::TrackCollection
token_trks
 
edm::EDGetTokenT
< reco::VertexCollection
token_vertex
 
bool useIsoTracks_
 
bool usejets_
 
bool usetracks_
 

Detailed Description

Definition at line 35 of file HITRegionalPixelSeedGenerator.cc.

Constructor & Destructor Documentation

HITRegionalPixelSeedGenerator::HITRegionalPixelSeedGenerator ( const edm::ParameterSet conf,
edm::ConsumesCollector &&  iC 
)
inlineexplicit

Definition at line 37 of file HITRegionalPixelSeedGenerator.cc.

References deltaL1JetEta, deltaL1JetPhi, deltaTrackEta, deltaTrackPhi, etaCenter_, fixedReg_, edm::ParameterSet::getParameter(), halflength, originradius, phiCenter_, ptmin, token_isoTrack, token_l1jet, token_trks, token_vertex, useIsoTracks_, usejets_, and usetracks_.

39  edm::LogVerbatim("HITRegionalPixelSeedGenerator") << "Enter the HITRegionalPixelSeedGenerator";
40 
41  edm::ParameterSet regionPSet = conf.getParameter<edm::ParameterSet>("RegionPSet");
42 
43  ptmin = regionPSet.getParameter<double>("ptMin");
44  originradius = regionPSet.getParameter<double>("originRadius");
45  halflength = regionPSet.getParameter<double>("originHalfLength");
46  etaCenter_ = regionPSet.getParameter<double>("etaCenter");
47  phiCenter_ = regionPSet.getParameter<double>("phiCenter");
48  deltaTrackEta = regionPSet.getParameter<double>("deltaEtaTrackRegion");
49  deltaTrackPhi = regionPSet.getParameter<double>("deltaPhiTrackRegion");
50  deltaL1JetEta = regionPSet.getParameter<double>("deltaEtaL1JetRegion");
51  deltaL1JetPhi = regionPSet.getParameter<double>("deltaPhiL1JetRegion");
52  usejets_ = regionPSet.getParameter<bool>("useL1Jets");
53  usetracks_ = regionPSet.getParameter<bool>("useTracks");
54  useIsoTracks_ = regionPSet.getParameter<bool>("useIsoTracks");
55  fixedReg_ = regionPSet.getParameter<bool>("fixedReg");
56 
57  if (usetracks_)
59  if (usetracks_ || useIsoTracks_ || fixedReg_ || usejets_)
61  if (useIsoTracks_)
64  if (usejets_)
66  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< reco::VertexCollection > token_vertex
edm::EDGetTokenT< l1extra::L1JetParticleCollection > token_l1jet
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > token_isoTrack
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > token_msmaker
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_bfield
std::vector< L1JetParticle > L1JetParticleCollection
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< reco::TrackCollection > token_trks
HITRegionalPixelSeedGenerator::~HITRegionalPixelSeedGenerator ( )
inlineoverride

Definition at line 68 of file HITRegionalPixelSeedGenerator.cc.

68 {}

Member Function Documentation

std::vector<std::unique_ptr<TrackingRegion> > HITRegionalPixelSeedGenerator::regions ( const edm::Event e,
const edm::EventSetup es 
) const
inlineoverridevirtual

Implements TrackingRegionProducer.

Definition at line 70 of file HITRegionalPixelSeedGenerator.cc.

References funct::cos(), deltaL1JetEta, deltaL1JetPhi, deltaTrackEta, deltaTrackPhi, etaCenter_, funct::exp(), fixedReg_, edm::Event::getByToken(), edm::EventSetup::getData(), halflength, fwrapper::jets, originradius, AlCaHLTBitMon_ParallelJobs::p, phiCenter_, edm::Handle< T >::product(), ptmin, mps_fire::result, funct::sin(), token_bfield, token_isoTrack, token_l1jet, token_msmaker, token_trks, token_vertex, HLT_FULL_cff::track, tracks, trigger::TriggerTrack, useIsoTracks_, usejets_, usetracks_, and beam_dqm_sourceclient-live_cfg::vertices.

70  {
71  std::vector<std::unique_ptr<TrackingRegion> > result;
72  float originz = 0.;
73 
74  double deltaZVertex = halflength;
75 
76  auto const& bfield = es.getData(token_bfield);
77  auto const& msmaker = es.getData(token_msmaker);
78 
79  if (usetracks_) {
81  e.getByToken(token_trks, tracks);
82 
84  e.getByToken(token_vertex, vertices);
85  const reco::VertexCollection vertCollection = *(vertices.product());
86  reco::VertexCollection::const_iterator ci = vertCollection.begin();
87 
88  if (!vertCollection.empty()) {
89  originz = ci->z();
90  } else {
91  deltaZVertex = 15.;
92  }
93 
94  GlobalVector globalVector(0, 0, 1);
95  if (tracks->empty())
96  return result;
97 
98  reco::TrackCollection::const_iterator itr = tracks->begin();
99  for (; itr != tracks->end(); itr++) {
100  GlobalVector ptrVec((itr)->px(), (itr)->py(), (itr)->pz());
101  globalVector = ptrVec;
102 
103  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(globalVector,
104  GlobalPoint(0, 0, originz),
105  ptmin,
106  originradius,
107  deltaZVertex,
110  bfield,
111  &msmaker));
112  }
113  }
114 
115  if (useIsoTracks_) {
117  e.getByToken(token_isoTrack, isotracks);
118 
119  std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
120 
121  isotracks->getObjects(trigger::TriggerTrack, isoPixTrackRefs);
122 
124  e.getByToken(token_vertex, vertices);
125  const reco::VertexCollection vertCollection = *(vertices.product());
126  reco::VertexCollection::const_iterator ci = vertCollection.begin();
127 
128  if (!vertCollection.empty()) {
129  originz = ci->z();
130  } else {
131  deltaZVertex = 15.;
132  }
133 
134  GlobalVector globalVector(0, 0, 1);
135  if (isoPixTrackRefs.empty())
136  return result;
137 
138  for (uint32_t p = 0; p < isoPixTrackRefs.size(); p++) {
139  GlobalVector ptrVec((isoPixTrackRefs[p]->track())->px(),
140  (isoPixTrackRefs[p]->track())->py(),
141  (isoPixTrackRefs[p]->track())->pz());
142  globalVector = ptrVec;
143 
144  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(globalVector,
145  GlobalPoint(0, 0, originz),
146  ptmin,
147  originradius,
148  deltaZVertex,
151  bfield,
152  &msmaker));
153  }
154  }
155 
156  if (usejets_) {
158  e.getByToken(token_l1jet, jets);
159 
161  e.getByToken(token_vertex, vertices);
162  const reco::VertexCollection vertCollection = *(vertices.product());
163  reco::VertexCollection::const_iterator ci = vertCollection.begin();
164  if (!vertCollection.empty()) {
165  originz = ci->z();
166  } else {
167  deltaZVertex = 15.;
168  }
169 
170  GlobalVector globalVector(0, 0, 1);
171  if (jets->empty())
172  return result;
173 
174  for (l1extra::L1JetParticleCollection::const_iterator iJet = jets->begin(); iJet != jets->end(); iJet++) {
175  GlobalVector jetVector(iJet->p4().x(), iJet->p4().y(), iJet->p4().z());
176  GlobalPoint vertex(0, 0, originz);
177 
178  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
179  jetVector, vertex, ptmin, originradius, deltaZVertex, deltaL1JetEta, deltaL1JetPhi, bfield, &msmaker));
180  }
181  }
182  if (fixedReg_) {
183  GlobalVector fixedVector(cos(phiCenter_) * sin(2 * atan(exp(-etaCenter_))),
184  sin(phiCenter_) * sin(2 * atan(exp(-etaCenter_))),
185  cos(2 * atan(exp(-etaCenter_))));
186  GlobalPoint vertex(0, 0, originz);
187 
189  e.getByToken(token_vertex, vertices);
190  const reco::VertexCollection vertCollection = *(vertices.product());
191  if (!vertCollection.empty()) {
192  // reco::VertexCollection::const_iterator ci = vertCollection.begin();
193  // originz = ci->z();
194  } else {
195  deltaZVertex = 15.;
196  }
197 
198  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
199  fixedVector, vertex, ptmin, originradius, deltaZVertex, deltaL1JetEta, deltaL1JetPhi, bfield, &msmaker));
200  }
201 
202  return result;
203  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< reco::VertexCollection > token_vertex
edm::EDGetTokenT< l1extra::L1JetParticleCollection > token_l1jet
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > token_isoTrack
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
auto const & tracks
cannot be loose
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
tuple result
Definition: mps_fire.py:311
bool getData(T &iHolder) const
Definition: EventSetup.h:128
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > token_msmaker
vector< PseudoJet > jets
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_bfield
T const * product() const
Definition: Handle.h:70
edm::EDGetTokenT< reco::TrackCollection > token_trks

Member Data Documentation

float HITRegionalPixelSeedGenerator::deltaL1JetEta
private

Definition at line 213 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

float HITRegionalPixelSeedGenerator::deltaL1JetPhi
private

Definition at line 214 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

float HITRegionalPixelSeedGenerator::deltaTrackEta
private

Definition at line 211 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

float HITRegionalPixelSeedGenerator::deltaTrackPhi
private

Definition at line 212 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

double HITRegionalPixelSeedGenerator::etaCenter_
private

Definition at line 209 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

bool HITRegionalPixelSeedGenerator::fixedReg_
private

Definition at line 217 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

float HITRegionalPixelSeedGenerator::halflength
private

Definition at line 208 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

float HITRegionalPixelSeedGenerator::originradius
private

Definition at line 207 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

double HITRegionalPixelSeedGenerator::phiCenter_
private

Definition at line 210 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

float HITRegionalPixelSeedGenerator::ptmin
private

Definition at line 206 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> HITRegionalPixelSeedGenerator::token_bfield
private

Definition at line 223 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> HITRegionalPixelSeedGenerator::token_isoTrack
private

Definition at line 221 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> HITRegionalPixelSeedGenerator::token_l1jet
private

Definition at line 222 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

edm::ESGetToken<MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord> HITRegionalPixelSeedGenerator::token_msmaker
private

Definition at line 224 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

edm::EDGetTokenT<reco::TrackCollection> HITRegionalPixelSeedGenerator::token_trks
private

Definition at line 219 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

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

Definition at line 220 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

bool HITRegionalPixelSeedGenerator::useIsoTracks_
private

Definition at line 218 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

bool HITRegionalPixelSeedGenerator::usejets_
private

Definition at line 215 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

bool HITRegionalPixelSeedGenerator::usetracks_
private

Definition at line 216 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().