CMS 3D CMS Logo

Public Member Functions | Private Attributes

HITrackingRegionProducer Class Reference

#include <HITrackingRegionProducer.h>

Inheritance diagram for HITrackingRegionProducer:
TrackingRegionProducer

List of all members.

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

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.

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

{}

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().

  {
    //rechits
    edm::Handle<SiPixelRecHitCollection> recHitColl;
    ev.getByLabel(theSiPixelRecHits, recHitColl);
    
    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
      PXBDetId pdetId = PXBDetId(detId);
      unsigned int layer=0;
      layer=pdetId.layer();
      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 68 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;
  }

Member Data Documentation

Definition at line 117 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

Definition at line 113 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

Definition at line 115 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

Definition at line 114 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

Definition at line 116 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

Definition at line 112 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

Definition at line 111 of file HITrackingRegionProducer.h.

Referenced by estimateMultiplicity(), and HITrackingRegionProducer().