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
< TrackingRegion * > 
regions (const edm::Event &ev, const edm::EventSetup &es) const
 
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 RectangularEtaPhiTrackingRegion::doubleToUseMeasurementTracker(), edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), RectangularEtaPhiTrackingRegion::kForSiStrips, RectangularEtaPhiTrackingRegion::kNever, m_howToUseMeasurementTracker, m_searchOpt, AlCaHLTBitMon_QueryRunRegistry::string, 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  }
47  if (regionPSet.exists("measurementTrackerName")){
48  // FIXME: when next time altering the configuration of this
49  // class, please change the types of the following parameters:
50  // - howToUseMeasurementTracker to at least int32 or to a string
51  // corresponding to the UseMeasurementTracker enumeration
52  // - measurementTrackerName to InputTag
53  if (regionPSet.exists("howToUseMeasurementTracker")){
55  }
57  theMeasurementTrackerToken = iC.consumes<MeasurementTrackerEvent>(regionPSet.getParameter<std::string>("measurementTrackerName"));
58  }
59  }
60  }
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:13
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< reco::VertexCollection > theVertexToken
static UseMeasurementTracker doubleToUseMeasurementTracker(double value)
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerToken
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_howToUseMeasurementTracker
virtual L3MumuTrackingRegion::~L3MumuTrackingRegion ( )
inlinevirtual

Definition at line 62 of file L3MumuTrackingRegion.h.

62 {}

Member Function Documentation

virtual std::vector<TrackingRegion* > L3MumuTrackingRegion::regions ( const edm::Event ev,
const edm::EventSetup es 
) const
inlinevirtual

Implements TrackingRegionProducer.

Definition at line 64 of file L3MumuTrackingRegion.h.

References edm::Event::getByToken(), edm::EDGetTokenT< T >::isUninitialized(), m_howToUseMeasurementTracker, m_searchOpt, edm::Handle< T >::product(), query::result, theDeltaEta, theDeltaPhi, theInputTrkToken, theMeasurementTrackerToken, theOriginHalfLength, theOriginRadius, theOriginZPos, thePtMin, theVertex, theVertexToken, and useVtxTks.

65  {
66 
67  std::vector<TrackingRegion* > result;
68 
69  const MeasurementTrackerEvent *measurementTracker = nullptr;
73  measurementTracker = hmte.product();
74  }
75 
76  // optional constraint for vertex
77  // get highest Pt pixel vertex (if existing)
78  double deltaZVertex = theOriginHalfLength;
79  double originz = theOriginZPos;
80  if (theVertex) {
82  ev.getByToken(theVertexToken,vertices);
83  const reco::VertexCollection vertCollection = *(vertices.product());
84  reco::VertexCollection::const_iterator ci = vertCollection.begin();
85  if (vertCollection.size()>0) {
86  originz = ci->z();
87  } else {
88  originz = theOriginZPos;
89  deltaZVertex = 15.;
90  }
91  if (useVtxTks) {
92  for(ci=vertCollection.begin();ci!=vertCollection.end();ci++)
93  for (reco::Vertex::trackRef_iterator trackIt = ci->tracks_begin();trackIt != ci->tracks_end();trackIt++){
94  reco::TrackRef iTrk = (*trackIt).castTo<reco::TrackRef>() ;
95  GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz());
96  result.push_back(
97  new RectangularEtaPhiTrackingRegion( dirVector, GlobalPoint(0,0,float(ci->z())),
100  true,
101  measurementTracker,
102  m_searchOpt) );
103  }
104  return result;
105  }
106  }
107 
110  for(reco::TrackCollection::const_iterator iTrk = trks->begin();iTrk != trks->end();iTrk++) {
111  GlobalVector dirVector((iTrk)->px(),(iTrk)->py(),(iTrk)->pz());
112  result.push_back(
113  new RectangularEtaPhiTrackingRegion( dirVector, GlobalPoint(0,0,float(originz)),
116  true,
117  measurementTracker,
118  m_searchOpt) );
119  }
120  return result;
121  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
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
tuple result
Definition: query.py:137
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:71

Member Data Documentation

RectangularEtaPhiTrackingRegion::UseMeasurementTracker L3MumuTrackingRegion::m_howToUseMeasurementTracker
private

Definition at line 141 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::m_searchOpt
private

Definition at line 142 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaEta
private

Definition at line 138 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theDeltaPhi
private

Definition at line 139 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::InputTag L3MumuTrackingRegion::theInputTrkTag
private

Definition at line 128 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 129 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

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

Definition at line 140 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginHalfLength
private

Definition at line 135 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginRadius
private

Definition at line 134 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::theOriginZPos
private

Definition at line 136 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

double L3MumuTrackingRegion::thePtMin
private

Definition at line 133 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::theVertex
private

Definition at line 126 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

edm::InputTag L3MumuTrackingRegion::theVertexTag
private

Definition at line 125 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion().

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

Definition at line 127 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().

bool L3MumuTrackingRegion::useVtxTks
private

Definition at line 131 of file L3MumuTrackingRegion.h.

Referenced by L3MumuTrackingRegion(), and regions().