CMS 3D CMS Logo

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=default
 
- Public Member Functions inherited from TrackingRegionProducer
virtual ~TrackingRegionProducer ()
 

Private Attributes

const float deltaL1JetEta
 
const float deltaL1JetPhi
 
const float deltaTrackEta
 
const float deltaTrackPhi
 
const double etaCenter_
 
const bool fixedReg_
 
const float halflength
 
const edm::ParameterSet m_regionPSet
 
const float originradius
 
const double phiCenter_
 
const float ptmin
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordtoken_bfield
 
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefstoken_isoTrack
 
edm::EDGetTokenT< l1extra::L1JetParticleCollectiontoken_l1jet
 
const edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecordtoken_msmaker
 
edm::EDGetTokenT< reco::TrackCollectiontoken_trks
 
edm::EDGetTokenT< reco::VertexCollectiontoken_vertex
 
const bool useIsoTracks_
 
const bool usejets_
 
const bool usetracks_
 

Detailed Description

Definition at line 34 of file HITRegionalPixelSeedGenerator.cc.

Constructor & Destructor Documentation

◆ HITRegionalPixelSeedGenerator()

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

Definition at line 36 of file HITRegionalPixelSeedGenerator.cc.

References fixedReg_, edm::ParameterSet::getParameter(), m_regionPSet, token_isoTrack, token_l1jet, token_trks, token_vertex, useIsoTracks_, usejets_, and usetracks_.

37  : m_regionPSet(conf.getParameter<edm::ParameterSet>("RegionPSet")),
38  ptmin(m_regionPSet.getParameter<double>("ptMin")),
39  originradius(m_regionPSet.getParameter<double>("originRadius")),
40  halflength(m_regionPSet.getParameter<double>("originHalfLength")),
41  etaCenter_(m_regionPSet.getParameter<double>("etaCenter")),
42  phiCenter_(m_regionPSet.getParameter<double>("phiCenter")),
43  deltaTrackEta(m_regionPSet.getParameter<double>("deltaEtaTrackRegion")),
44  deltaTrackPhi(m_regionPSet.getParameter<double>("deltaPhiTrackRegion")),
45  deltaL1JetEta(m_regionPSet.getParameter<double>("deltaEtaL1JetRegion")),
46  deltaL1JetPhi(m_regionPSet.getParameter<double>("deltaPhiL1JetRegion")),
47  usejets_(m_regionPSet.getParameter<bool>("useL1Jets")),
48  usetracks_(m_regionPSet.getParameter<bool>("useTracks")),
49  fixedReg_(m_regionPSet.getParameter<bool>("fixedReg")),
50  useIsoTracks_(m_regionPSet.getParameter<bool>("useIsoTracks")),
53  edm::LogVerbatim("HITRegionalPixelSeedGenerator") << "Enter the HITRegionalPixelSeedGenerator";
54 
55  if (usetracks_)
59  if (useIsoTracks_)
62  if (usejets_)
63  token_l1jet =
65  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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
const edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > token_msmaker
std::vector< L1JetParticle > L1JetParticleCollection
edm::EDGetTokenT< reco::TrackCollection > token_trks
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_bfield

◆ ~HITRegionalPixelSeedGenerator()

HITRegionalPixelSeedGenerator::~HITRegionalPixelSeedGenerator ( )
overridedefault

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.cc.

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

69  {
70  std::vector<std::unique_ptr<TrackingRegion> > result;
71  float originz = 0.;
72 
73  double deltaZVertex = halflength;
74 
75  auto const& bfield = es.getData(token_bfield);
76  auto const& msmaker = es.getData(token_msmaker);
77 
78  if (usetracks_) {
80 
81  const reco::VertexCollection& vertCollection = e.get(token_vertex);
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>(globalVector,
100  GlobalPoint(0, 0, originz),
101  ptmin,
102  originradius,
103  deltaZVertex,
106  bfield,
107  &msmaker));
108  }
109  }
110 
111  if (useIsoTracks_) {
113 
114  std::vector<edm::Ref<reco::IsolatedPixelTrackCandidateCollection> > isoPixTrackRefs;
115 
116  isotracks->getObjects(trigger::TriggerTrack, isoPixTrackRefs);
117 
118  const reco::VertexCollection& vertCollection = e.get(token_vertex);
119  reco::VertexCollection::const_iterator ci = vertCollection.begin();
120 
121  if (!vertCollection.empty()) {
122  originz = ci->z();
123  } else {
124  deltaZVertex = 15.;
125  }
126 
127  GlobalVector globalVector(0, 0, 1);
128  if (isoPixTrackRefs.empty())
129  return result;
130 
131  for (uint32_t p = 0; p < isoPixTrackRefs.size(); p++) {
132  GlobalVector ptrVec((isoPixTrackRefs[p]->track())->px(),
133  (isoPixTrackRefs[p]->track())->py(),
134  (isoPixTrackRefs[p]->track())->pz());
135  globalVector = ptrVec;
136 
137  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(globalVector,
138  GlobalPoint(0, 0, originz),
139  ptmin,
140  originradius,
141  deltaZVertex,
144  bfield,
145  &msmaker));
146  }
147  }
148 
149  if (usejets_) {
151  const reco::VertexCollection& vertCollection = e.get(token_vertex);
152  reco::VertexCollection::const_iterator ci = vertCollection.begin();
153  if (!vertCollection.empty()) {
154  originz = ci->z();
155  } else {
156  deltaZVertex = 15.;
157  }
158 
159  GlobalVector globalVector(0, 0, 1);
160  if (jets->empty())
161  return result;
162 
163  for (l1extra::L1JetParticleCollection::const_iterator iJet = jets->begin(); iJet != jets->end(); iJet++) {
164  GlobalVector jetVector(iJet->p4().x(), iJet->p4().y(), iJet->p4().z());
165  GlobalPoint vertex(0, 0, originz);
166 
167  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
168  jetVector, vertex, ptmin, originradius, deltaZVertex, deltaL1JetEta, deltaL1JetPhi, bfield, &msmaker));
169  }
170  }
171  if (fixedReg_) {
172  GlobalVector fixedVector(cos(phiCenter_) * sin(2 * atan(exp(-etaCenter_))),
173  sin(phiCenter_) * sin(2 * atan(exp(-etaCenter_))),
174  cos(2 * atan(exp(-etaCenter_))));
175  GlobalPoint vertex(0, 0, originz);
176 
177  const reco::VertexCollection& vertCollection = e.get(token_vertex);
178  if (!vertCollection.empty()) {
179  // reco::VertexCollection::const_iterator ci = vertCollection.begin();
180  // originz = ci->z();
181  } else {
182  deltaZVertex = 15.;
183  }
184 
185  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
186  fixedVector, vertex, ptmin, originradius, deltaZVertex, deltaL1JetEta, deltaL1JetPhi, bfield, &msmaker));
187  }
188 
189  return result;
190  }
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
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
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > token_msmaker
edm::EDGetTokenT< reco::TrackCollection > token_trks
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > token_bfield

Member Data Documentation

◆ deltaL1JetEta

const float HITRegionalPixelSeedGenerator::deltaL1JetEta
private

Definition at line 201 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ deltaL1JetPhi

const float HITRegionalPixelSeedGenerator::deltaL1JetPhi
private

Definition at line 202 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ deltaTrackEta

const float HITRegionalPixelSeedGenerator::deltaTrackEta
private

Definition at line 199 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ deltaTrackPhi

const float HITRegionalPixelSeedGenerator::deltaTrackPhi
private

Definition at line 200 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ etaCenter_

const double HITRegionalPixelSeedGenerator::etaCenter_
private

Definition at line 197 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ fixedReg_

const bool HITRegionalPixelSeedGenerator::fixedReg_
private

Definition at line 205 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ halflength

const float HITRegionalPixelSeedGenerator::halflength
private

Definition at line 196 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ m_regionPSet

const edm::ParameterSet HITRegionalPixelSeedGenerator::m_regionPSet
private

Definition at line 193 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator().

◆ originradius

const float HITRegionalPixelSeedGenerator::originradius
private

Definition at line 195 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ phiCenter_

const double HITRegionalPixelSeedGenerator::phiCenter_
private

Definition at line 198 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ ptmin

const float HITRegionalPixelSeedGenerator::ptmin
private

Definition at line 194 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ token_bfield

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

Definition at line 211 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ token_isoTrack

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

Definition at line 209 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ token_l1jet

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

Definition at line 210 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ token_msmaker

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

Definition at line 212 of file HITRegionalPixelSeedGenerator.cc.

Referenced by regions().

◆ token_trks

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

Definition at line 207 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ token_vertex

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

Definition at line 208 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ useIsoTracks_

const bool HITRegionalPixelSeedGenerator::useIsoTracks_
private

Definition at line 206 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ usejets_

const bool HITRegionalPixelSeedGenerator::usejets_
private

Definition at line 203 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().

◆ usetracks_

const bool HITRegionalPixelSeedGenerator::usetracks_
private

Definition at line 204 of file HITRegionalPixelSeedGenerator.cc.

Referenced by HITRegionalPixelSeedGenerator(), and regions().