CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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)
 
virtual std::vector
< std::unique_ptr
< TrackingRegion > > 
regions (const edm::Event &ev, const edm::EventSetup &es) const override
 
virtual ~L3MumuTrackingRegion ()
 
- 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::TrackCollection
theInputTrkToken
 
edm::EDGetTokenT
< MeasurementTrackerEvent
theMeasurementTrackerToken
 
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 17 of file L3MumuTrackingRegion.h.

Constructor & Destructor Documentation

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

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

21  {
22 
23  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
24 
25  theVertexTag = regionPSet.getParameter<edm::InputTag>("vertexSrc");
26  theVertex = (theVertexTag.label().length()>1);
27  theInputTrkTag = regionPSet.getParameter<edm::InputTag>("TrkSrc");
28  useVtxTks = regionPSet.getParameter<bool>("UseVtxTks");
29 
31  if (!(theVertex && useVtxTks)) theInputTrkToken= iC.consumes<reco::TrackCollection>(theInputTrkTag);
32 
33  thePtMin = regionPSet.getParameter<double>("ptMin");
34  theOriginRadius = regionPSet.getParameter<double>("originRadius");
35  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
36  theOriginZPos = regionPSet.getParameter<double>("vertexZDefault");
37 
38  theDeltaEta = regionPSet.getParameter<double>("deltaEtaRegion");
39  theDeltaPhi = regionPSet.getParameter<double>("deltaPhiRegion");
40  if (regionPSet.exists("searchOpt")){
41  m_searchOpt = regionPSet.getParameter<bool>("searchOpt");
42  }
43  else{
44  m_searchOpt = false;
45  }
48  theMeasurementTrackerToken = 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
virtual L3MumuTrackingRegion::~L3MumuTrackingRegion ( )
inlinevirtual

Definition at line 52 of file L3MumuTrackingRegion.h.

52 {}

Member Function Documentation

virtual 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, HLT_25ns10e33_v2_cff::measurementTracker, edm::Handle< T >::product(), mps_fire::result, theDeltaEta, theDeltaPhi, theInputTrkToken, theMeasurementTrackerToken, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertex, theVertexToken, useVtxTks, and HLT_25ns10e33_v2_cff::vertices.

55  {
56 
57  std::vector<std::unique_ptr<TrackingRegion> > result;
58 
63  measurementTracker = hmte.product();
64  }
65 
66  // optional constraint for vertex
67  // get highest Pt pixel vertex (if existing)
68  double deltaZVertex = theOriginHalfLength;
69  double originz = theOriginZPos;
70  if (theVertex) {
72  ev.getByToken(theVertexToken,vertices);
73  const reco::VertexCollection vertCollection = *(vertices.product());
74  reco::VertexCollection::const_iterator ci = vertCollection.begin();
75  if (vertCollection.size()>0) {
76  originz = ci->z();
77  } else {
78  originz = theOriginZPos;
79  deltaZVertex = 15.;
80  }
81  if (useVtxTks) {
82  for(ci=vertCollection.begin();ci!=vertCollection.end();ci++)
83  for (reco::Vertex::trackRef_iterator trackIt = ci->tracks_begin();trackIt != ci->tracks_end();trackIt++){
84  reco::TrackRef iTrk = (*trackIt).castTo<reco::TrackRef>() ;
85  GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz());
86  result.push_back(
87  std::make_unique<RectangularEtaPhiTrackingRegion>( dirVector, GlobalPoint(0,0,float(ci->z())),
90  true,
92  m_searchOpt) );
93  }
94  return result;
95  }
96  }
97 
100  for(reco::TrackCollection::const_iterator iTrk = trks->begin();iTrk != trks->end();iTrk++) {
101  GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz());
102  result.push_back(
103  std::make_unique<RectangularEtaPhiTrackingRegion>( dirVector, GlobalPoint(0,0,float(originz)),
106  true,
107  measurementTracker,
108  m_searchOpt) );
109  }
110  return result;
111  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< reco::TrackCollection > theInputTrkToken
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
tuple result
Definition: mps_fire.py:84
edm::EDGetTokenT< reco::VertexCollection > theVertexToken
T const * product() const
Definition: Handle.h:81
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:37
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
bool isUninitialized() const
Definition: EDGetToken.h:73

Member Data Documentation

RectangularEtaPhiTrackingRegion::UseMeasurementTracker L3MumuTrackingRegion::m_howToUseMeasurementTracker
private

Definition at line 131 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::m_searchOpt
private

Definition at line 132 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaEta
private

Definition at line 128 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaPhi
private

Definition at line 129 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::InputTag L3MumuTrackingRegion::theInputTrkTag
private

Definition at line 118 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 119 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

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

Definition at line 130 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginHalfLength
private

Definition at line 125 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginRadius
private

Definition at line 124 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginZPos
private

Definition at line 126 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::thePtMin
private

Definition at line 123 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::theVertex
private

Definition at line 116 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::InputTag L3MumuTrackingRegion::theVertexTag
private

Definition at line 115 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 117 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::useVtxTks
private

Definition at line 121 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().