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 ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 19 of file L3MumuTrackingRegion.h.

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

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  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::TrackCollection > theInputTrkToken
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
edm::EDGetTokenT< reco::VertexCollection > theVertexToken
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
L3MumuTrackingRegion::~L3MumuTrackingRegion ( )
inlineoverride

Definition at line 52 of file L3MumuTrackingRegion.h.

52 {}

Member Function Documentation

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.

References edm::Event::getByToken(), 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, useVtxTks, and pwdgSkimBPark_cfi::vertices.

55  {
56  std::vector<std::unique_ptr<TrackingRegion> > result;
57 
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,
115  measurementTracker,
116  m_searchOpt));
117  }
118  return result;
119  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
edm::EDGetTokenT< reco::TrackCollection > theInputTrkToken
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< reco::VertexCollection > theVertexToken
T const * product() const
Definition: Handle.h:69
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
bool isUninitialized() const
Definition: EDGetToken.h:70
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:37

Member Data Documentation

RectangularEtaPhiTrackingRegion::UseMeasurementTracker L3MumuTrackingRegion::m_howToUseMeasurementTracker
private

Definition at line 138 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::m_searchOpt
private

Definition at line 139 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaEta
private

Definition at line 135 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaPhi
private

Definition at line 136 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::InputTag L3MumuTrackingRegion::theInputTrkTag
private

Definition at line 125 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 126 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

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

Definition at line 137 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginHalfLength
private

Definition at line 132 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginRadius
private

Definition at line 131 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginZPos
private

Definition at line 133 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::thePtMin
private

Definition at line 130 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::theVertex
private

Definition at line 123 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::InputTag L3MumuTrackingRegion::theVertexTag
private

Definition at line 122 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 124 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::useVtxTks
private

Definition at line 128 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().