CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HITRegionalPixelSeedGenerator Class Reference

#include <HITRegionalPixelSeedGenerator.h>

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

edm::ParameterSet conf_
 
float deltaL1JetEta
 
float deltaL1JetPhi
 
float deltaTrackEta
 
float deltaTrackPhi
 
double etaCenter_
 
bool fixedReg_
 
float halflength
 
float originradius
 
double phiCenter_
 
float ptmin
 
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefstoken_isoTrack
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectiontoken_l1jet
 
edm::EDGetTokenT< reco::TrackCollectiontoken_trks
 
edm::EDGetTokenT< reco::VertexCollectiontoken_vertex
 
bool useIsoTracks_
 
bool usejets_
 
bool usetracks_
 

Detailed Description

Definition at line 35 of file HITRegionalPixelSeedGenerator.h.

Constructor & Destructor Documentation

◆ HITRegionalPixelSeedGenerator()

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

Definition at line 37 of file HITRegionalPixelSeedGenerator.h.

37  {
38  edm::LogVerbatim("HITRegionalPixelSeedGenerator") << "Enter the HITRegionalPixelSeedGenerator";
39 
40  edm::ParameterSet regionPSet = conf_.getParameter<edm::ParameterSet>("RegionPSet");
41 
42  ptmin = regionPSet.getParameter<double>("ptMin");
43  originradius = regionPSet.getParameter<double>("originRadius");
44  halflength = regionPSet.getParameter<double>("originHalfLength");
45  etaCenter_ = regionPSet.getParameter<double>("etaCenter");
46  phiCenter_ = regionPSet.getParameter<double>("phiCenter");
47  deltaTrackEta = regionPSet.getParameter<double>("deltaEtaTrackRegion");
48  deltaTrackPhi = regionPSet.getParameter<double>("deltaPhiTrackRegion");
49  deltaL1JetEta = regionPSet.getParameter<double>("deltaEtaL1JetRegion");
50  deltaL1JetPhi = regionPSet.getParameter<double>("deltaPhiL1JetRegion");
51  usejets_ = regionPSet.getParameter<bool>("useL1Jets");
52  usetracks_ = regionPSet.getParameter<bool>("useTracks");
53  useIsoTracks_ = regionPSet.getParameter<bool>("useIsoTracks");
54  fixedReg_ = regionPSet.getParameter<bool>("fixedReg");
55 
56  if (usetracks_)
60  if (useIsoTracks_)
63  if (usejets_)
65  }

References conf_, 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_.

◆ ~HITRegionalPixelSeedGenerator()

HITRegionalPixelSeedGenerator::~HITRegionalPixelSeedGenerator ( )
inlineoverride

Definition at line 67 of file HITRegionalPixelSeedGenerator.h.

67 {}

Member Function Documentation

◆ regions()

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

Implements TrackingRegionProducer.

Definition at line 69 of file HITRegionalPixelSeedGenerator.h.

69  {
70  std::vector<std::unique_ptr<TrackingRegion> > result;
71  float originz = 0.;
72 
73  double deltaZVertex = halflength;
74 
75  if (usetracks_) {
77  e.getByToken(token_trks, tracks);
78 
80  e.getByToken(token_vertex, vertices);
81  const reco::VertexCollection vertCollection = *(vertices.product());
82  reco::VertexCollection::const_iterator ci = vertCollection.begin();
83 
84  if (!vertCollection.empty()) {
85  originz = ci->z();
86  } else {
87  deltaZVertex = 15.;
88  }
89 
90  GlobalVector globalVector(0, 0, 1);
91  if (tracks->empty())
92  return result;
93 
94  reco::TrackCollection::const_iterator itr = tracks->begin();
95  for (; itr != tracks->end(); itr++) {
96  GlobalVector ptrVec((itr)->px(), (itr)->py(), (itr)->pz());
97  globalVector = ptrVec;
98 
99  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
100  globalVector, GlobalPoint(0, 0, originz), ptmin, originradius, deltaZVertex, deltaTrackEta, deltaTrackPhi));
101  }
102  }
103 
104  if (useIsoTracks_) {
106  e.getByToken(token_isoTrack, isotracks);
107 
108  std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
109 
110  isotracks->getObjects(trigger::TriggerTrack, isoPixTrackRefs);
111 
113  e.getByToken(token_vertex, vertices);
114  const reco::VertexCollection vertCollection = *(vertices.product());
115  reco::VertexCollection::const_iterator ci = vertCollection.begin();
116 
117  if (!vertCollection.empty()) {
118  originz = ci->z();
119  } else {
120  deltaZVertex = 15.;
121  }
122 
123  GlobalVector globalVector(0, 0, 1);
124  if (isoPixTrackRefs.empty())
125  return result;
126 
127  for (uint32_t p = 0; p < isoPixTrackRefs.size(); p++) {
128  GlobalVector ptrVec((isoPixTrackRefs[p]->track())->px(),
129  (isoPixTrackRefs[p]->track())->py(),
130  (isoPixTrackRefs[p]->track())->pz());
131  globalVector = ptrVec;
132 
133  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
134  globalVector, GlobalPoint(0, 0, originz), ptmin, originradius, deltaZVertex, deltaTrackEta, deltaTrackPhi));
135  }
136  }
137 
138  if (usejets_) {
140  e.getByToken(token_l1jet, jets);
141 
143  e.getByToken(token_vertex, vertices);
144  const reco::VertexCollection vertCollection = *(vertices.product());
145  reco::VertexCollection::const_iterator ci = vertCollection.begin();
146  if (!vertCollection.empty()) {
147  originz = ci->z();
148  } else {
149  deltaZVertex = 15.;
150  }
151 
152  GlobalVector globalVector(0, 0, 1);
153  if (jets->empty())
154  return result;
155 
156  for (l1extra::L1JetParticleCollection::const_iterator iJet = jets->begin(); iJet != jets->end(); iJet++) {
157  GlobalVector jetVector(iJet->p4().x(), iJet->p4().y(), iJet->p4().z());
158  GlobalPoint vertex(0, 0, originz);
159 
160  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
161  jetVector, vertex, ptmin, originradius, deltaZVertex, deltaL1JetEta, deltaL1JetPhi));
162  }
163  }
164  if (fixedReg_) {
165  GlobalVector fixedVector(cos(phiCenter_) * sin(2 * atan(exp(-etaCenter_))),
166  sin(phiCenter_) * sin(2 * atan(exp(-etaCenter_))),
167  cos(2 * atan(exp(-etaCenter_))));
168  GlobalPoint vertex(0, 0, originz);
169 
171  e.getByToken(token_vertex, vertices);
172  const reco::VertexCollection vertCollection = *(vertices.product());
173  reco::VertexCollection::const_iterator ci = vertCollection.begin();
174  if (!vertCollection.empty()) {
175  originz = ci->z();
176  } else {
177  deltaZVertex = 15.;
178  }
179 
180  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
181  fixedVector, vertex, ptmin, originradius, deltaZVertex, deltaL1JetEta, deltaL1JetPhi));
182  }
183 
184  return result;
185  }

References funct::cos(), deltaL1JetEta, deltaL1JetPhi, deltaTrackEta, deltaTrackPhi, MillePedeFileConverter_cfg::e, etaCenter_, JetChargeProducer_cfi::exp, fixedReg_, trigger::TriggerRefsCollections::getObjects(), halflength, singleTopDQM_cfi::jets, originradius, AlCaHLTBitMon_ParallelJobs::p, phiCenter_, ptmin, multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, mps_fire::result, funct::sin(), token_isoTrack, token_l1jet, token_trks, token_vertex, HLT_FULL_cff::track, tracks, trigger::TriggerTrack, useIsoTracks_, usejets_, usetracks_, bphysicsOniaDQM_cfi::vertex, and pwdgSkimBPark_cfi::vertices.

Member Data Documentation

◆ conf_

edm::ParameterSet HITRegionalPixelSeedGenerator::conf_
private

Definition at line 188 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator().

◆ deltaL1JetEta

float HITRegionalPixelSeedGenerator::deltaL1JetEta
private

Definition at line 197 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ deltaL1JetPhi

float HITRegionalPixelSeedGenerator::deltaL1JetPhi
private

Definition at line 198 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ deltaTrackEta

float HITRegionalPixelSeedGenerator::deltaTrackEta
private

Definition at line 195 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ deltaTrackPhi

float HITRegionalPixelSeedGenerator::deltaTrackPhi
private

Definition at line 196 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ etaCenter_

double HITRegionalPixelSeedGenerator::etaCenter_
private

Definition at line 193 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ fixedReg_

bool HITRegionalPixelSeedGenerator::fixedReg_
private

Definition at line 201 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ halflength

float HITRegionalPixelSeedGenerator::halflength
private

Definition at line 192 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ originradius

float HITRegionalPixelSeedGenerator::originradius
private

Definition at line 191 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ phiCenter_

double HITRegionalPixelSeedGenerator::phiCenter_
private

Definition at line 194 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ ptmin

float HITRegionalPixelSeedGenerator::ptmin
private

Definition at line 190 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ token_isoTrack

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

Definition at line 205 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ token_l1jet

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

Definition at line 206 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ token_trks

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

Definition at line 203 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ token_vertex

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

Definition at line 204 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ useIsoTracks_

bool HITRegionalPixelSeedGenerator::useIsoTracks_
private

Definition at line 202 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ usejets_

bool HITRegionalPixelSeedGenerator::usejets_
private

Definition at line 199 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ usetracks_

bool HITRegionalPixelSeedGenerator::usetracks_
private

Definition at line 200 of file HITRegionalPixelSeedGenerator.h.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

Vector3DBase
Definition: Vector3DBase.h:8
trigger::TriggerFilterObjectWithRefs
Definition: TriggerFilterObjectWithRefs.h:35
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
HITRegionalPixelSeedGenerator::token_isoTrack
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > token_isoTrack
Definition: HITRegionalPixelSeedGenerator.h:205
HITRegionalPixelSeedGenerator::deltaTrackPhi
float deltaTrackPhi
Definition: HITRegionalPixelSeedGenerator.h:196
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HITRegionalPixelSeedGenerator::fixedReg_
bool fixedReg_
Definition: HITRegionalPixelSeedGenerator.h:201
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
HITRegionalPixelSeedGenerator::token_vertex
edm::EDGetTokenT< reco::VertexCollection > token_vertex
Definition: HITRegionalPixelSeedGenerator.h:204
trigger::TriggerTrack
Definition: TriggerTypeDefs.h:87
HITRegionalPixelSeedGenerator::token_l1jet
edm::EDGetTokenT< l1extra::L1JetParticleCollection > token_l1jet
Definition: HITRegionalPixelSeedGenerator.h:206
HITRegionalPixelSeedGenerator::usetracks_
bool usetracks_
Definition: HITRegionalPixelSeedGenerator.h:200
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
edm::Handle< reco::TrackCollection >
trigger::TriggerRefsCollections::getObjects
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
Definition: TriggerRefsCollections.h:590
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
HITRegionalPixelSeedGenerator::conf_
edm::ParameterSet conf_
Definition: HITRegionalPixelSeedGenerator.h:188
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
HITRegionalPixelSeedGenerator::halflength
float halflength
Definition: HITRegionalPixelSeedGenerator.h:192
l1extra::L1JetParticleCollection
std::vector< L1JetParticle > L1JetParticleCollection
Definition: L1JetParticleFwd.h:28
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
HITRegionalPixelSeedGenerator::deltaL1JetEta
float deltaL1JetEta
Definition: HITRegionalPixelSeedGenerator.h:197
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
HITRegionalPixelSeedGenerator::etaCenter_
double etaCenter_
Definition: HITRegionalPixelSeedGenerator.h:193
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
edm::ParameterSet
Definition: ParameterSet.h:47
HITRegionalPixelSeedGenerator::usejets_
bool usejets_
Definition: HITRegionalPixelSeedGenerator.h:199
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
HITRegionalPixelSeedGenerator::ptmin
float ptmin
Definition: HITRegionalPixelSeedGenerator.h:190
HITRegionalPixelSeedGenerator::deltaTrackEta
float deltaTrackEta
Definition: HITRegionalPixelSeedGenerator.h:195
HITRegionalPixelSeedGenerator::useIsoTracks_
bool useIsoTracks_
Definition: HITRegionalPixelSeedGenerator.h:202
HITRegionalPixelSeedGenerator::originradius
float originradius
Definition: HITRegionalPixelSeedGenerator.h:191
HITRegionalPixelSeedGenerator::deltaL1JetPhi
float deltaL1JetPhi
Definition: HITRegionalPixelSeedGenerator.h:198
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
HITRegionalPixelSeedGenerator::phiCenter_
double phiCenter_
Definition: HITRegionalPixelSeedGenerator.h:194
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
mps_fire.result
result
Definition: mps_fire.py:311
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
HITRegionalPixelSeedGenerator::token_trks
edm::EDGetTokenT< reco::TrackCollection > token_trks
Definition: HITRegionalPixelSeedGenerator.h:203
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37