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

Private Attributes

RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
 
bool m_searchOpt
 
double theDeltaEta
 
double theDeltaPhi
 
edm::ESGetToken< MagneticField,
IdealMagneticFieldRecord
theFieldToken
 
edm::InputTag theInputTrkTag
 
edm::EDGetTokenT
< reco::TrackCollection
theInputTrkToken
 
edm::EDGetTokenT
< MeasurementTrackerEvent
theMeasurementTrackerToken
 
edm::ESGetToken
< MultipleScatteringParametrisationMaker,
TrackerMultipleScatteringRecord
theMSMakerToken
 
double theOriginHalfLength
 
double theOriginRadius
 
double theOriginZPos
 
double thePtMin
 
bool theVertex
 
edm::InputTag theVertexTag
 
edm::EDGetTokenT
< reco::VertexCollection
theVertexToken
 
bool useVtxTks
 

Detailed Description

Definition at line 21 of file L3MumuTrackingRegion.h.

Constructor & Destructor Documentation

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

Definition at line 23 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.

25  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
26 
27  theVertexTag = regionPSet.getParameter<edm::InputTag>("vertexSrc");
28  theVertex = (theVertexTag.label().length() > 1);
29  theInputTrkTag = regionPSet.getParameter<edm::InputTag>("TrkSrc");
30  useVtxTks = regionPSet.getParameter<bool>("UseVtxTks");
31 
32  if (theVertex)
34  if (!(theVertex && useVtxTks))
36 
37  thePtMin = regionPSet.getParameter<double>("ptMin");
38  theOriginRadius = regionPSet.getParameter<double>("originRadius");
39  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
40  theOriginZPos = regionPSet.getParameter<double>("vertexZDefault");
41 
42  theDeltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
43  theDeltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
44  if (regionPSet.exists("searchOpt")) {
45  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
46  } else {
47  m_searchOpt = false;
48  }
50  regionPSet.getParameter<std::string>("howToUseMeasurementTracker"));
53  iC.consumes<MeasurementTrackerEvent>(regionPSet.getParameter<edm::InputTag>("measurementTrackerName"));
54  }
55  }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
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::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
L3MumuTrackingRegion::~L3MumuTrackingRegion ( )
overridedefault

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 59 of file L3MumuTrackingRegion.h.

References edm::Event::getByToken(), edm::EventSetup::getData(), edm::EDGetTokenT< T >::isUninitialized(), m_howToUseMeasurementTracker, m_searchOpt, HLT_FULL_cff::measurementTracker, edm::Handle< T >::product(), mps_fire::result, theDeltaEta, theDeltaPhi, theFieldToken, theInputTrkToken, theMeasurementTrackerToken, theMSMakerToken, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertex, theVertexToken, useVtxTks, and beam_dqm_sourceclient-live_cfg::vertices.

60  {
61  std::vector<std::unique_ptr<TrackingRegion> > result;
62 
67  measurementTracker = hmte.product();
68  }
69  const auto& field = es.getData(theFieldToken);
70  const auto& msmaker = es.getData(theMSMakerToken);
71 
72  // optional constraint for vertex
73  // get highest Pt pixel vertex (if existing)
74  double deltaZVertex = theOriginHalfLength;
75  double originz = theOriginZPos;
76  if (theVertex) {
78  ev.getByToken(theVertexToken, vertices);
79  const reco::VertexCollection vertCollection = *(vertices.product());
80  reco::VertexCollection::const_iterator ci = vertCollection.begin();
81  if (!vertCollection.empty()) {
82  originz = ci->z();
83  } else {
84  originz = theOriginZPos;
85  deltaZVertex = 15.;
86  }
87  if (useVtxTks) {
88  for (ci = vertCollection.begin(); ci != vertCollection.end(); ci++)
89  for (reco::Vertex::trackRef_iterator trackIt = ci->tracks_begin(); trackIt != ci->tracks_end(); trackIt++) {
90  reco::TrackRef iTrk = (*trackIt).castTo<reco::TrackRef>();
91  GlobalVector dirVector((iTrk)->px(), (iTrk)->py(), (iTrk)->pz());
92  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(dirVector,
93  GlobalPoint(0, 0, float(ci->z())),
94  thePtMin,
96  deltaZVertex,
99  field,
100  &msmaker,
101  true,
104  m_searchOpt));
105  }
106  return result;
107  }
108  }
109 
112  ev.getByToken(theInputTrkToken, trks);
113  for (reco::TrackCollection::const_iterator iTrk = trks->begin(); iTrk != trks->end(); iTrk++) {
114  GlobalVector dirVector((iTrk)->px(), (iTrk)->py(), (iTrk)->pz());
115  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(dirVector,
116  GlobalPoint(0, 0, float(originz)),
117  thePtMin,
119  deltaZVertex,
120  theDeltaEta,
121  theDeltaPhi,
122  field,
123  &msmaker,
124  true,
126  measurementTracker,
127  m_searchOpt));
128  }
129  return result;
130  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< reco::TrackCollection > theInputTrkToken
tuple measurementTracker
constexpr bool isUninitialized() const noexcept
Definition: EDGetToken.h:99
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
tuple result
Definition: mps_fire.py:311
bool getData(T &iHolder) const
Definition: EventSetup.h:128
edm::EDGetTokenT< reco::VertexCollection > theVertexToken
T const * product() const
Definition: Handle.h:70
edm::ESGetToken< MultipleScatteringParametrisationMaker, TrackerMultipleScatteringRecord > theMSMakerToken
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > theFieldToken
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:38

Member Data Documentation

RectangularEtaPhiTrackingRegion::UseMeasurementTracker L3MumuTrackingRegion::m_howToUseMeasurementTracker
private

Definition at line 149 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::m_searchOpt
private

Definition at line 152 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaEta
private

Definition at line 146 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaPhi
private

Definition at line 147 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> L3MumuTrackingRegion::theFieldToken
private

Definition at line 150 of file L3MumuTrackingRegion.h.

Referenced by regions().

edm::InputTag L3MumuTrackingRegion::theInputTrkTag
private

Definition at line 136 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 137 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

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

Definition at line 148 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

Definition at line 151 of file L3MumuTrackingRegion.h.

Referenced by regions().

double L3MumuTrackingRegion::theOriginHalfLength
private

Definition at line 143 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginRadius
private

Definition at line 142 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginZPos
private

Definition at line 144 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::thePtMin
private

Definition at line 141 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::theVertex
private

Definition at line 134 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::InputTag L3MumuTrackingRegion::theVertexTag
private

Definition at line 133 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 135 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::useVtxTks
private

Definition at line 139 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().