CMS 3D CMS Logo

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

#include <HITrackingRegionProducer.h>

Inheritance diagram for HITrackingRegionProducer:
TrackingRegionProducer

Public Member Functions

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

Private Attributes

GlobalVector theDirection
 
GlobalPoint theOrigin
 
double theOriginHalfLength
 
double theOriginRadius
 
bool thePrecise
 
double thePtMin
 
edm::InputTag theSiPixelRecHits
 
edm::EDGetTokenT< SiPixelRecHitCollectiontheSiPixelRecHitsToken
 

Detailed Description

Definition at line 20 of file HITrackingRegionProducer.h.

Constructor & Destructor Documentation

◆ HITrackingRegionProducer()

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

Definition at line 22 of file HITrackingRegionProducer.h.

22  {
23  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
24 
25  thePtMin = regionPSet.getParameter<double>("ptMin");
26  theOriginRadius = regionPSet.getParameter<double>("originRadius");
27  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
28  double xPos = regionPSet.getParameter<double>("originXPos");
29  double yPos = regionPSet.getParameter<double>("originYPos");
30  double zPos = regionPSet.getParameter<double>("originZPos");
31  double xDir = regionPSet.getParameter<double>("directionXCoord");
32  double yDir = regionPSet.getParameter<double>("directionYCoord");
33  double zDir = regionPSet.getParameter<double>("directionZCoord");
34  thePrecise = regionPSet.getParameter<bool>("precise");
35  theSiPixelRecHits = regionPSet.getParameter<edm::InputTag>("siPixelRecHits");
37  theOrigin = GlobalPoint(xPos, yPos, zPos);
38  theDirection = GlobalVector(xDir, yDir, zDir);
39  }

References looper::cfg, edm::ParameterSet::getParameter(), theDirection, theOrigin, theOriginHalfLength, theOriginRadius, thePrecise, thePtMin, theSiPixelRecHits, and theSiPixelRecHitsToken.

◆ ~HITrackingRegionProducer()

HITrackingRegionProducer::~HITrackingRegionProducer ( )
inlineoverride

Definition at line 41 of file HITrackingRegionProducer.h.

41 {}

Member Function Documentation

◆ estimateMultiplicity()

int HITrackingRegionProducer::estimateMultiplicity ( const edm::Event ev,
const edm::EventSetup es 
) const
inline

Definition at line 43 of file HITrackingRegionProducer.h.

43  {
44  //rechits
46  ev.getByToken(theSiPixelRecHitsToken, recHitColl);
47 
48  //Retrieve tracker topology from geometry
50  es.get<IdealGeometryRecord>().get(tTopo);
51 
52  int numRecHits = 0;
53  //FIXME: this can be optimized quite a bit by looping only on the per-det 'items' of DetSetVector
54  for (SiPixelRecHitCollection::const_iterator recHitIdIterator = recHitColl->begin(),
55  recHitIdIteratorEnd = recHitColl->end();
56  recHitIdIterator != recHitIdIteratorEnd;
57  recHitIdIterator++) {
58  SiPixelRecHitCollection::DetSet hits = *recHitIdIterator;
59  DetId detId = DetId(hits.detId()); // Get the Detid object
60  unsigned int detType = detId.det(); // det type, tracker=1
61  unsigned int subid = detId.subdetId(); //subdetector type, barrel=1, fpix=2
62 
63  unsigned int layer = 0;
64  layer = tTopo->pxbLayer(detId);
65  if (detType == 1 && subid == 1 && layer == 1) {
66  numRecHits += hits.size();
67  }
68  }
69  return numRecHits;
70  }

References edmNew::DetSetVector< T >::begin(), DetId::det(), edmNew::DetSetVector< T >::end(), ev, edm::EventSetup::get(), get, hfClusterShapes_cfi::hits, TrackerTopology::pxbLayer(), DetId::subdetId(), and theSiPixelRecHitsToken.

Referenced by regions().

◆ regions()

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

Implements TrackingRegionProducer.

Definition at line 72 of file HITrackingRegionProducer.h.

73  {
74  int estMult = estimateMultiplicity(ev, es);
75 
76  // fit from MC information
77  float aa = 1.90935e-04;
78  float bb = -2.90167e-01;
79  float cc = 3.86125e+02;
80 
81  float estTracks = aa * estMult * estMult + bb * estMult + cc;
82 
83  LogTrace("heavyIonHLTVertexing") << "[HIVertexing]";
84  LogTrace("heavyIonHLTVertexing") << " [HIVertexing: hits in the 1. layer:" << estMult << "]";
85  LogTrace("heavyIonHLTVertexing") << " [HIVertexing: estimated number of tracks:" << estTracks << "]";
86 
87  float regTracking = 400.; //if we have more tracks -> regional tracking
88  float etaB = 10.;
89  float phiB = TMath::Pi() / 2.;
90 
91  float decEta = estTracks / 600.;
92  etaB = 2.5 / decEta;
93 
94  if (estTracks > regTracking) {
95  LogTrace("heavyIonHLTVertexing") << " [HIVertexing: Regional Tracking]";
96  LogTrace("heavyIonHLTVertexing") << " [Regional Tracking: eta range: -" << etaB << ", " << etaB << "]";
97  LogTrace("heavyIonHLTVertexing") << " [Regional Tracking: phi range: -" << phiB << ", " << phiB << "]";
98  LogTrace("heavyIonHLTVertexing") << " [Regional Tracking: factor of decrease: " << decEta * 2.
99  << "]"; // 2:from phi
100  }
101 
102  // tracking region selection
103  std::vector<std::unique_ptr<TrackingRegion> > result;
104  if (estTracks > regTracking) { // regional tracking
105  result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
106  theDirection,
107  theOrigin,
108  thePtMin,
111  etaB,
112  phiB,
114  thePrecise));
115  } else { // global tracking
116  LogTrace("heavyIonHLTVertexing") << " [HIVertexing: Global Tracking]";
117  result.push_back(std::make_unique<GlobalTrackingRegion>(
119  }
120  return result;
121  }

References estimateMultiplicity(), ev, RectangularEtaPhiTrackingRegion::kNever, LogTrace, Pi, mps_fire::result, theDirection, theOrigin, theOriginHalfLength, theOriginRadius, thePrecise, and thePtMin.

Member Data Documentation

◆ theDirection

GlobalVector HITrackingRegionProducer::theDirection
private

Definition at line 131 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

◆ theOrigin

GlobalPoint HITrackingRegionProducer::theOrigin
private

Definition at line 127 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

◆ theOriginHalfLength

double HITrackingRegionProducer::theOriginHalfLength
private

Definition at line 129 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

◆ theOriginRadius

double HITrackingRegionProducer::theOriginRadius
private

Definition at line 128 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

◆ thePrecise

bool HITrackingRegionProducer::thePrecise
private

Definition at line 130 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

◆ thePtMin

double HITrackingRegionProducer::thePtMin
private

Definition at line 126 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

◆ theSiPixelRecHits

edm::InputTag HITrackingRegionProducer::theSiPixelRecHits
private

Definition at line 124 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer().

◆ theSiPixelRecHitsToken

edm::EDGetTokenT<SiPixelRecHitCollection> HITrackingRegionProducer::theSiPixelRecHitsToken
private

Definition at line 125 of file HITrackingRegionProducer.h.

Referenced by estimateMultiplicity(), and HITrackingRegionProducer().

HITrackingRegionProducer::theOriginRadius
double theOriginRadius
Definition: HITrackingRegionProducer.h:128
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
HITrackingRegionProducer::thePtMin
double thePtMin
Definition: HITrackingRegionProducer.h:126
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition: DetSetVectorNew.h:530
HITrackingRegionProducer::thePrecise
bool thePrecise
Definition: HITrackingRegionProducer.h:130
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
edm::Handle
Definition: AssociativeIterator.h:50
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
DetId
Definition: DetId.h:17
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
edm::ESHandle< TrackerTopology >
edmNew::DetSet
Definition: DetSetNew.h:22
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
HITrackingRegionProducer::theOriginHalfLength
double theOriginHalfLength
Definition: HITrackingRegionProducer.h:129
RectangularEtaPhiTrackingRegion::UseMeasurementTracker::kNever
edm::ParameterSet
Definition: ParameterSet.h:47
HITrackingRegionProducer::estimateMultiplicity
int estimateMultiplicity(const edm::Event &ev, const edm::EventSetup &es) const
Definition: HITrackingRegionProducer.h:43
HITrackingRegionProducer::theDirection
GlobalVector theDirection
Definition: HITrackingRegionProducer.h:131
get
#define get
cc
HITrackingRegionProducer::theSiPixelRecHitsToken
edm::EDGetTokenT< SiPixelRecHitCollection > theSiPixelRecHitsToken
Definition: HITrackingRegionProducer.h:125
looper.cfg
cfg
Definition: looper.py:297
edmNew::DetSetVector
Definition: DetSetNew.h:13
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:535
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
mps_fire.result
result
Definition: mps_fire.py:311
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
edm::InputTag
Definition: InputTag.h:15
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
HITrackingRegionProducer::theOrigin
GlobalPoint theOrigin
Definition: HITrackingRegionProducer.h:127
HITrackingRegionProducer::theSiPixelRecHits
edm::InputTag theSiPixelRecHits
Definition: HITrackingRegionProducer.h:124