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 18 of file HITrackingRegionProducer.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file HITrackingRegionProducer.h.

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

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

41 {}

Member Function Documentation

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

Definition at line 44 of file HITrackingRegionProducer.h.

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

Referenced by regions().

45  {
46  //rechits
48  ev.getByLabel(theSiPixelRecHits, recHitColl);
49 
50  int numRecHits = 0;
51  //FIXME: this can be optimized quite a bit by looping only on the per-det 'items' of DetSetVector
52  for(SiPixelRecHitCollection::const_iterator recHitIdIterator = recHitColl->begin(), recHitIdIteratorEnd = recHitColl->end();
53  recHitIdIterator != recHitIdIteratorEnd; recHitIdIterator++) {
54  SiPixelRecHitCollection::DetSet hits = *recHitIdIterator;
55  DetId detId = DetId(hits.detId()); // Get the Detid object
56  unsigned int detType=detId.det(); // det type, tracker=1
57  unsigned int subid=detId.subdetId(); //subdetector type, barrel=1, fpix=2
58  PXBDetId pdetId = PXBDetId(detId);
59  unsigned int layer=0;
60  layer=pdetId.layer();
61  if(detType==1 && subid==1 && layer==1) {
62  numRecHits += hits.size();
63  }
64  }
65  return numRecHits;
66  }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
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:359
Definition: DetId.h:20
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 68 of file HITrackingRegionProducer.h.

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

68  {
69 
70  int estMult = estimateMultiplicity(ev, es);
71 
72  // fit from MC information
73  float aa = 1.90935e-04;
74  float bb = -2.90167e-01;
75  float cc = 3.86125e+02;
76 
77  float estTracks = aa*estMult*estMult+bb*estMult+cc;
78 
79  LogTrace("heavyIonHLTVertexing")<<"[HIVertexing]";
80  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: hits in the 1. layer:" << estMult << "]";
81  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: estimated number of tracks:" << estTracks << "]";
82 
83  float regTracking = 400.; //if we have more tracks -> regional tracking
84  float etaB = 10.;
85  float phiB = TMath::Pi()/2.;
86 
87  float decEta = estTracks/600.;
88  etaB = 2.5/decEta;
89 
90  if(estTracks>regTracking) {
91  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Regional Tracking]";
92  LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: eta range: -" << etaB << ", "<< etaB <<"]";
93  LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: phi range: -" << phiB << ", "<< phiB <<"]";
94  LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: factor of decrease: " << decEta*2. << "]"; // 2:from phi
95  }
96 
97  // tracking region selection
98  std::vector<TrackingRegion* > result;
99  if(estTracks>regTracking) { // regional tracking
101  }
102  else { // global tracking
103  LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Global Tracking]";
105  }
106  return
107  result;
108  }
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 117 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

GlobalPoint HITrackingRegionProducer::theOrigin
private

Definition at line 113 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::theOriginHalfLength
private

Definition at line 115 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::theOriginRadius
private

Definition at line 114 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

bool HITrackingRegionProducer::thePrecise
private

Definition at line 116 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::thePtMin
private

Definition at line 112 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

std::string HITrackingRegionProducer::theSiPixelRecHits
private

Definition at line 111 of file HITrackingRegionProducer.h.

Referenced by estimateMultiplicity(), and HITrackingRegionProducer().