CMS 3D CMS Logo

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

#include <L3MumuTrackingRegion.h>

Inheritance diagram for L3MumuTrackingRegion:
TrackingRegionProducer

Public Member Functions

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

Private Attributes

RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
 
bool m_searchOpt
 
double theDeltaEta
 
double theDeltaPhi
 
edm::InputTag theInputTrkTag
 
edm::EDGetTokenT< reco::TrackCollectiontheInputTrkToken
 
edm::EDGetTokenT< MeasurementTrackerEventtheMeasurementTrackerToken
 
double theOriginHalfLength
 
double theOriginRadius
 
double theOriginZPos
 
double thePtMin
 
bool theVertex
 
edm::InputTag theVertexTag
 
edm::EDGetTokenT< reco::VertexCollectiontheVertexToken
 
bool useVtxTks
 

Detailed Description

Definition at line 17 of file L3MumuTrackingRegion.h.

Constructor & Destructor Documentation

◆ L3MumuTrackingRegion()

L3MumuTrackingRegion::L3MumuTrackingRegion ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 19 of file L3MumuTrackingRegion.h.

19  {
20  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
21 
22  theVertexTag = regionPSet.getParameter<edm::InputTag>("vertexSrc");
23  theVertex = (theVertexTag.label().length() > 1);
24  theInputTrkTag = regionPSet.getParameter<edm::InputTag>("TrkSrc");
25  useVtxTks = regionPSet.getParameter<bool>("UseVtxTks");
26 
27  if (theVertex)
29  if (!(theVertex && useVtxTks))
31 
32  thePtMin = regionPSet.getParameter<double>("ptMin");
33  theOriginRadius = regionPSet.getParameter<double>("originRadius");
34  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
35  theOriginZPos = regionPSet.getParameter<double>("vertexZDefault");
36 
37  theDeltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
38  theDeltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
39  if (regionPSet.exists("searchOpt")) {
40  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
41  } else {
42  m_searchOpt = false;
43  }
45  regionPSet.getParameter<std::string>("howToUseMeasurementTracker"));
48  iC.consumes<MeasurementTrackerEvent>(regionPSet.getParameter<edm::InputTag>("measurementTrackerName"));
49  }
50  }

References looper::cfg, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), RectangularEtaPhiTrackingRegion::kNever, edm::InputTag::label(), m_howToUseMeasurementTracker, m_searchOpt, AlCaHLTBitMon_QueryRunRegistry::string, RectangularEtaPhiTrackingRegion::stringToUseMeasurementTracker(), theDeltaEta, theDeltaPhi, theInputTrkTag, theInputTrkToken, theMeasurementTrackerToken, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertex, theVertexTag, theVertexToken, and useVtxTks.

◆ ~L3MumuTrackingRegion()

L3MumuTrackingRegion::~L3MumuTrackingRegion ( )
inlineoverride

Definition at line 52 of file L3MumuTrackingRegion.h.

52 {}

Member Function Documentation

◆ regions()

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

Implements TrackingRegionProducer.

Definition at line 54 of file L3MumuTrackingRegion.h.

55  {
56  std::vector<std::unique_ptr<TrackingRegion> > result;
57 
61  ev.getByToken(theMeasurementTrackerToken, hmte);
62  measurementTracker = hmte.product();
63  }
64 
65  // optional constraint for vertex
66  // get highest Pt pixel vertex (if existing)
67  double deltaZVertex = theOriginHalfLength;
68  double originz = theOriginZPos;
69  if (theVertex) {
71  ev.getByToken(theVertexToken, vertices);
72  const reco::VertexCollection vertCollection = *(vertices.product());
73  reco::VertexCollection::const_iterator ci = vertCollection.begin();
74  if (!vertCollection.empty()) {
75  originz = ci->z();
76  } else {
77  originz = theOriginZPos;
78  deltaZVertex = 15.;
79  }
80  if (useVtxTks) {
81  for (ci = vertCollection.begin(); ci != vertCollection.end(); ci++)
82  for (reco::Vertex::trackRef_iterator trackIt = ci->tracks_begin(); trackIt != ci->tracks_end(); trackIt++) {
83  reco::TrackRef iTrk = (*trackIt).castTo<reco::TrackRef>();
84  GlobalVector dirVector((iTrk)->px(), (iTrk)->py(), (iTrk)->pz());
85  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(dirVector,
86  GlobalPoint(0, 0, float(ci->z())),
87  thePtMin,
89  deltaZVertex,
93  true,
95  m_searchOpt));
96  }
97  return result;
98  }
99  }
100 
103  ev.getByToken(theInputTrkToken, trks);
104  for (reco::TrackCollection::const_iterator iTrk = trks->begin(); iTrk != trks->end(); iTrk++) {
105  GlobalVector dirVector((iTrk)->px(), (iTrk)->py(), (iTrk)->pz());
106  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(dirVector,
107  GlobalPoint(0, 0, float(originz)),
108  thePtMin,
110  deltaZVertex,
111  theDeltaEta,
112  theDeltaPhi,
114  true,
116  m_searchOpt));
117  }
118  return result;
119  }

References ev, edm::EDGetTokenT< T >::isUninitialized(), m_howToUseMeasurementTracker, m_searchOpt, HLTSiStripMonitoring_cff::measurementTracker, edm::Handle< T >::product(), multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, mps_fire::result, theDeltaEta, theDeltaPhi, theInputTrkToken, theMeasurementTrackerToken, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertex, theVertexToken, hltEgammaHLTExtra_cfi::trks, useVtxTks, and pwdgSkimBPark_cfi::vertices.

Member Data Documentation

◆ m_howToUseMeasurementTracker

RectangularEtaPhiTrackingRegion::UseMeasurementTracker L3MumuTrackingRegion::m_howToUseMeasurementTracker
private

Definition at line 138 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ m_searchOpt

bool L3MumuTrackingRegion::m_searchOpt
private

Definition at line 139 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theDeltaEta

double L3MumuTrackingRegion::theDeltaEta
private

Definition at line 135 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theDeltaPhi

double L3MumuTrackingRegion::theDeltaPhi
private

Definition at line 136 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theInputTrkTag

edm::InputTag L3MumuTrackingRegion::theInputTrkTag
private

Definition at line 125 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

◆ theInputTrkToken

edm::EDGetTokenT<reco::TrackCollection> L3MumuTrackingRegion::theInputTrkToken
private

Definition at line 126 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theMeasurementTrackerToken

edm::EDGetTokenT<MeasurementTrackerEvent> L3MumuTrackingRegion::theMeasurementTrackerToken
private

Definition at line 137 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theOriginHalfLength

double L3MumuTrackingRegion::theOriginHalfLength
private

Definition at line 132 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theOriginRadius

double L3MumuTrackingRegion::theOriginRadius
private

Definition at line 131 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theOriginZPos

double L3MumuTrackingRegion::theOriginZPos
private

Definition at line 133 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ thePtMin

double L3MumuTrackingRegion::thePtMin
private

Definition at line 130 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theVertex

bool L3MumuTrackingRegion::theVertex
private

Definition at line 123 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ theVertexTag

edm::InputTag L3MumuTrackingRegion::theVertexTag
private

Definition at line 122 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

◆ theVertexToken

edm::EDGetTokenT<reco::VertexCollection> L3MumuTrackingRegion::theVertexToken
private

Definition at line 124 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

◆ useVtxTks

bool L3MumuTrackingRegion::useVtxTks
private

Definition at line 128 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

Vector3DBase
Definition: Vector3DBase.h:8
L3MumuTrackingRegion::theVertex
bool theVertex
Definition: L3MumuTrackingRegion.h:123
reco::Vertex::trackRef_iterator
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
L3MumuTrackingRegion::theOriginRadius
double theOriginRadius
Definition: L3MumuTrackingRegion.h:131
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HLTSiStripMonitoring_cff.measurementTracker
measurementTracker
Definition: HLTSiStripMonitoring_cff.py:178
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
L3MumuTrackingRegion::theVertexToken
edm::EDGetTokenT< reco::VertexCollection > theVertexToken
Definition: L3MumuTrackingRegion.h:124
L3MumuTrackingRegion::theInputTrkTag
edm::InputTag theInputTrkTag
Definition: L3MumuTrackingRegion.h:125
L3MumuTrackingRegion::theOriginZPos
double theOriginZPos
Definition: L3MumuTrackingRegion.h:133
L3MumuTrackingRegion::thePtMin
double thePtMin
Definition: L3MumuTrackingRegion.h:130
edm::Handle< MeasurementTrackerEvent >
L3MumuTrackingRegion::theOriginHalfLength
double theOriginHalfLength
Definition: L3MumuTrackingRegion.h:132
edm::Ref< TrackCollection >
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
L3MumuTrackingRegion::m_searchOpt
bool m_searchOpt
Definition: L3MumuTrackingRegion.h:139
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
L3MumuTrackingRegion::theInputTrkToken
edm::EDGetTokenT< reco::TrackCollection > theInputTrkToken
Definition: L3MumuTrackingRegion.h:126
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kNever
MeasurementTrackerEvent
Definition: MeasurementTrackerEvent.h:15
edm::ParameterSet
Definition: ParameterSet.h:36
L3MumuTrackingRegion::useVtxTks
bool useVtxTks
Definition: L3MumuTrackingRegion.h:128
L3MumuTrackingRegion::theMeasurementTrackerToken
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
Definition: L3MumuTrackingRegion.h:137
L3MumuTrackingRegion::theDeltaPhi
double theDeltaPhi
Definition: L3MumuTrackingRegion.h:136
looper.cfg
cfg
Definition: looper.py:297
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
L3MumuTrackingRegion::theVertexTag
edm::InputTag theVertexTag
Definition: L3MumuTrackingRegion.h:122
hltEgammaHLTExtra_cfi.trks
trks
Definition: hltEgammaHLTExtra_cfi.py:43
mps_fire.result
result
Definition: mps_fire.py:303
L3MumuTrackingRegion::m_howToUseMeasurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
Definition: L3MumuTrackingRegion.h:138
L3MumuTrackingRegion::theDeltaEta
double theDeltaEta
Definition: L3MumuTrackingRegion.h:135
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
RectangularEtaPhiTrackingRegion::stringToUseMeasurementTracker
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
Definition: RectangularEtaPhiTrackingRegion.cc:82
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7