#include <HITrackingRegionProducer.h>
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 () |
Private Attributes | |
GlobalVector | theDirection |
GlobalPoint | theOrigin |
double | theOriginHalfLength |
double | theOriginRadius |
bool | thePrecise |
double | thePtMin |
std::string | theSiPixelRecHits |
Definition at line 19 of file HITrackingRegionProducer.h.
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.
{ edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet"); thePtMin = regionPSet.getParameter<double>("ptMin"); theOriginRadius = regionPSet.getParameter<double>("originRadius"); theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength"); double xPos = regionPSet.getParameter<double>("originXPos"); double yPos = regionPSet.getParameter<double>("originYPos"); double zPos = regionPSet.getParameter<double>("originZPos"); double xDir = regionPSet.getParameter<double>("directionXCoord"); double yDir = regionPSet.getParameter<double>("directionYCoord"); double zDir = regionPSet.getParameter<double>("directionZCoord"); thePrecise = regionPSet.getParameter<bool>("precise"); theSiPixelRecHits = regionPSet.getParameter<std::string>("siPixelRecHits"); theOrigin = GlobalPoint(xPos,yPos,zPos); theDirection = GlobalVector(xDir, yDir, zDir); }
virtual HITrackingRegionProducer::~HITrackingRegionProducer | ( | ) | [inline, virtual] |
Definition at line 42 of file HITrackingRegionProducer.h.
{}
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().
{ //rechits edm::Handle<SiPixelRecHitCollection> recHitColl; ev.getByLabel(theSiPixelRecHits, recHitColl); //Retrieve tracker topology from geometry edm::ESHandle<TrackerTopology> tTopo; es.get<IdealGeometryRecord>().get(tTopo); int numRecHits = 0; //FIXME: this can be optimized quite a bit by looping only on the per-det 'items' of DetSetVector for(SiPixelRecHitCollection::const_iterator recHitIdIterator = recHitColl->begin(), recHitIdIteratorEnd = recHitColl->end(); recHitIdIterator != recHitIdIteratorEnd; recHitIdIterator++) { SiPixelRecHitCollection::DetSet hits = *recHitIdIterator; DetId detId = DetId(hits.detId()); // Get the Detid object unsigned int detType=detId.det(); // det type, tracker=1 unsigned int subid=detId.subdetId(); //subdetector type, barrel=1, fpix=2 unsigned int layer=0; layer=tTopo->pxbLayer(detId); if(detType==1 && subid==1 && layer==1) { numRecHits += hits.size(); } } return numRecHits; }
virtual std::vector<TrackingRegion* > HITrackingRegionProducer::regions | ( | const edm::Event & | ev, |
const edm::EventSetup & | es | ||
) | const [inline, virtual] |
Implements TrackingRegionProducer.
Definition at line 73 of file HITrackingRegionProducer.h.
References estimateMultiplicity(), LogTrace, Pi, query::result, theDirection, theOrigin, theOriginHalfLength, theOriginRadius, thePrecise, and thePtMin.
{ int estMult = estimateMultiplicity(ev, es); // fit from MC information float aa = 1.90935e-04; float bb = -2.90167e-01; float cc = 3.86125e+02; float estTracks = aa*estMult*estMult+bb*estMult+cc; LogTrace("heavyIonHLTVertexing")<<"[HIVertexing]"; LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: hits in the 1. layer:" << estMult << "]"; LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: estimated number of tracks:" << estTracks << "]"; float regTracking = 400.; //if we have more tracks -> regional tracking float etaB = 10.; float phiB = TMath::Pi()/2.; float decEta = estTracks/600.; etaB = 2.5/decEta; if(estTracks>regTracking) { LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Regional Tracking]"; LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: eta range: -" << etaB << ", "<< etaB <<"]"; LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: phi range: -" << phiB << ", "<< phiB <<"]"; LogTrace("heavyIonHLTVertexing")<<" [Regional Tracking: factor of decrease: " << decEta*2. << "]"; // 2:from phi } // tracking region selection std::vector<TrackingRegion* > result; if(estTracks>regTracking) { // regional tracking result.push_back( new RectangularEtaPhiTrackingRegion(theDirection, theOrigin, thePtMin, theOriginRadius, theOriginHalfLength, etaB, phiB, 0, thePrecise) ); } else { // global tracking LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Global Tracking]"; result.push_back( new GlobalTrackingRegion(thePtMin, theOrigin, theOriginRadius, theOriginHalfLength, thePrecise) ); } return result; }
Definition at line 122 of file HITrackingRegionProducer.h.
Referenced by HITrackingRegionProducer(), and regions().
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().