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
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)
 
virtual std::vector
< TrackingRegion * > 
regions (const edm::Event &ev, const edm::EventSetup &es) const
 
virtual ~HITrackingRegionProducer ()
 
- Public Member Functions inherited from TrackingRegionProducer
virtual ~TrackingRegionProducer ()
 

Private Attributes

GlobalVector theDirection
 
GlobalPoint theOrigin
 
double theOriginHalfLength
 
double theOriginRadius
 
bool thePrecise
 
double thePtMin
 
std::string theSiPixelRecHits
 

Detailed Description

Definition at line 19 of file HITrackingRegionProducer.h.

Constructor & Destructor Documentation

HITrackingRegionProducer::HITrackingRegionProducer ( const edm::ParameterSet cfg)
inline

Definition at line 23 of file HITrackingRegionProducer.h.

References edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theDirection, theOrigin, theOriginHalfLength, theOriginRadius, thePrecise, thePtMin, theSiPixelRecHits, xPos, yPos, and zPos.

23  {
24 
25  edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
26 
27  thePtMin = regionPSet.getParameter<double>("ptMin");
28  theOriginRadius = regionPSet.getParameter<double>("originRadius");
29  theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
30  double xPos = regionPSet.getParameter<double>("originXPos");
31  double yPos = regionPSet.getParameter<double>("originYPos");
32  double zPos = regionPSet.getParameter<double>("originZPos");
33  double xDir = regionPSet.getParameter<double>("directionXCoord");
34  double yDir = regionPSet.getParameter<double>("directionYCoord");
35  double zDir = regionPSet.getParameter<double>("directionZCoord");
36  thePrecise = regionPSet.getParameter<bool>("precise");
37  theSiPixelRecHits = regionPSet.getParameter<std::string>("siPixelRecHits");
38  theOrigin = GlobalPoint(xPos,yPos,zPos);
39  theDirection = GlobalVector(xDir, yDir, zDir);
40  }
T getParameter(std::string const &) const
double zPos
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
double xPos
double yPos
Global3DVector GlobalVector
Definition: GlobalVector.h:10
virtual HITrackingRegionProducer::~HITrackingRegionProducer ( )
inlinevirtual

Definition at line 42 of file HITrackingRegionProducer.h.

42 {}

Member Function Documentation

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

Definition at line 45 of file HITrackingRegionProducer.h.

References DetId::det(), edmNew::DetSet< T >::detId(), edm::EventSetup::get(), edm::Event::getByLabel(), edmNew::DetSet< T >::size(), DetId::subdetId(), and theSiPixelRecHits.

Referenced by regions().

46  {
47  //rechits
49  ev.getByLabel(theSiPixelRecHits, recHitColl);
50 
51  //Retrieve tracker topology from geometry
53  es.get<IdealGeometryRecord>().get(tTopo);
54 
55  int numRecHits = 0;
56  //FIXME: this can be optimized quite a bit by looping only on the per-det 'items' of DetSetVector
57  for(SiPixelRecHitCollection::const_iterator recHitIdIterator = recHitColl->begin(), recHitIdIteratorEnd = recHitColl->end();
58  recHitIdIterator != recHitIdIteratorEnd; recHitIdIterator++) {
59  SiPixelRecHitCollection::DetSet hits = *recHitIdIterator;
60  DetId detId = DetId(hits.detId()); // Get the Detid object
61  unsigned int detType=detId.det(); // det type, tracker=1
62  unsigned int subid=detId.subdetId(); //subdetector type, barrel=1, fpix=2
63 
64  unsigned int layer=0;
65  layer=tTopo->pxbLayer(detId);
66  if(detType==1 && subid==1 && layer==1) {
67  numRecHits += hits.size();
68  }
69  }
70  return numRecHits;
71  }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
Definition: DetId.h:20
const T & get() const
Definition: EventSetup.h:55
id_type detId() const
Definition: DetSetNew.h:72
size_type size() const
Definition: DetSetNew.h:75
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
virtual std::vector<TrackingRegion* > HITrackingRegionProducer::regions ( const edm::Event ev,
const edm::EventSetup es 
) const
inlinevirtual

Implements TrackingRegionProducer.

Definition at line 73 of file HITrackingRegionProducer.h.

References estimateMultiplicity(), LogTrace, Pi, query::result, theDirection, theOrigin, theOriginHalfLength, theOriginRadius, thePrecise, and thePtMin.

73  {
74 
75  int estMult = estimateMultiplicity(ev, es);
76 
77  // fit from MC information
78  float aa = 1.90935e-04;
79  float bb = -2.90167e-01;
80  float cc = 3.86125e+02;
81 
82  float estTracks = aa*estMult*estMult+bb*estMult+cc;
83 
84  LogTrace("heavyIonHLTVertexing")<<"[HIVertexing]";
85  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: hits in the 1. layer:" << estMult << "]";
86  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: estimated number of tracks:" << estTracks << "]";
87 
88  float regTracking = 400.; //if we have more tracks -> regional tracking
89  float etaB = 10.;
90  float phiB = TMath::Pi()/2.;
91 
92  float decEta = estTracks/600.;
93  etaB = 2.5/decEta;
94 
95  if(estTracks>regTracking) {
96  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Regional Tracking]";
97  LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: eta range: -" << etaB << ", "<< etaB <<"]";
98  LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: phi range: -" << phiB << ", "<< phiB <<"]";
99  LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: factor of decrease: " << decEta*2. << "]"; // 2:from phi
100  }
101 
102  // tracking region selection
103  std::vector<TrackingRegion* > result;
104  if(estTracks>regTracking) { // regional tracking
106  }
107  else { // global tracking
108  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Global Tracking]";
110  }
111  return
112  result;
113  }
const double Pi
int estimateMultiplicity(const edm::Event &ev, const edm::EventSetup &es) const
tuple result
Definition: query.py:137
#define LogTrace(id)

Member Data Documentation

GlobalVector HITrackingRegionProducer::theDirection
private

Definition at line 122 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

GlobalPoint HITrackingRegionProducer::theOrigin
private

Definition at line 118 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::theOriginHalfLength
private

Definition at line 120 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::theOriginRadius
private

Definition at line 119 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

bool HITrackingRegionProducer::thePrecise
private

Definition at line 121 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::thePtMin
private

Definition at line 117 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

std::string HITrackingRegionProducer::theSiPixelRecHits
private

Definition at line 116 of file HITrackingRegionProducer.h.

Referenced by estimateMultiplicity(), and HITrackingRegionProducer().