CMS 3D CMS Logo

HITrackingRegionProducer Class Reference

#include <RecoHI/HiTracking/plugins/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, and theSiPixelRecHits.

00022                                                        { 
00023 
00024     edm::ParameterSet regionPSet = cfg.getParameter<edm::ParameterSet>("RegionPSet");
00025 
00026     thePtMin            = regionPSet.getParameter<double>("ptMin");
00027     theOriginRadius     = regionPSet.getParameter<double>("originRadius");
00028     theOriginHalfLength = regionPSet.getParameter<double>("originHalfLength");
00029     double xPos         = regionPSet.getParameter<double>("originXPos");
00030     double yPos         = regionPSet.getParameter<double>("originYPos");
00031     double zPos         = regionPSet.getParameter<double>("originZPos");
00032     double xDir         = regionPSet.getParameter<double>("directionXCoord");
00033     double yDir         = regionPSet.getParameter<double>("directionYCoord");
00034     double zDir         = regionPSet.getParameter<double>("directionZCoord");
00035     thePrecise          = regionPSet.getParameter<bool>("precise"); 
00036     theSiPixelRecHits   = regionPSet.getParameter<std::string>("siPixelRecHits");
00037     theOrigin = GlobalPoint(xPos,yPos,zPos);
00038     theDirection = GlobalVector(xDir, yDir, zDir);
00039   }   

virtual HITrackingRegionProducer::~HITrackingRegionProducer (  )  [inline, virtual]

Definition at line 41 of file HITrackingRegionProducer.h.

00041 {}


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(), detId, edm::Event::getByLabel(), PXBDetId::layer(), edm::Handle< T >::product(), DetId::subdetId(), and theSiPixelRecHits.

Referenced by regions().

00045   {
00046     //rechits
00047     edm::Handle<SiPixelRecHitCollection> recHitColl;
00048     ev.getByLabel(theSiPixelRecHits, recHitColl);
00049  
00050     SiPixelRecHitCollection::id_iterator recHitIdIterator;
00051     SiPixelRecHitCollection::id_iterator recHitIdIteratorBegin = (recHitColl.product())->id_begin();
00052     SiPixelRecHitCollection::id_iterator recHitIdIteratorEnd   = (recHitColl.product())->id_end();
00053 
00054     int numRecHits = 0;
00055     for(recHitIdIterator = recHitIdIteratorBegin;
00056         recHitIdIterator != recHitIdIteratorEnd; recHitIdIterator++) {
00057 
00058          DetId detId = DetId((*recHitIdIterator).rawId()); // Get the Detid object
00059          unsigned int detType=detId.det();    // det type, tracker=1
00060          unsigned int subid=detId.subdetId(); //subdetector type, barrel=1, fpix=2
00061          PXBDetId pdetId = PXBDetId(detId);
00062          unsigned int layer=0;
00063          layer=pdetId.layer();
00064          if(detType==1 && subid==1 && layer==1) {
00065            SiPixelRecHitCollection::range pixelrechitRange = (recHitColl.product())->get(*recHitIdIterator);
00066            SiPixelRecHitCollection::const_iterator pixelrechitRangeIteratorBegin = pixelrechitRange.first;
00067            SiPixelRecHitCollection::const_iterator pixelrechitRangeIteratorEnd = pixelrechitRange.second;
00068            SiPixelRecHitCollection::const_iterator pixeliter;
00069            for (pixeliter = pixelrechitRangeIteratorBegin ;
00070               pixeliter != pixelrechitRangeIteratorEnd; ++pixeliter) {
00071               numRecHits++;
00072            }
00073          }
00074     }
00075     return numRecHits;
00076   }

virtual std::vector<TrackingRegion* > HITrackingRegionProducer::regions ( const edm::Event ev,
const edm::EventSetup es 
) const [inline, virtual]

Implements TrackingRegionProducer.

Definition at line 78 of file HITrackingRegionProducer.h.

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

00078                                                                                                  {
00079 
00080     int estMult = estimateMultiplicity(ev, es);
00081 
00082     // fit from MC information
00083     float aa = 1.90935e-04;
00084     float bb = -2.90167e-01;
00085     float cc = 3.86125e+02;
00086 
00087     float estTracks = aa*estMult*estMult+bb*estMult+cc;
00088 
00089     LogTrace("heavyIonHLTVertexing")<<"[HIVertexing]";
00090     LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: hits in the 1. layer:" << estMult << "]";
00091     LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: estimated number of tracks:" << estTracks << "]";
00092 
00093     float regTracking = 400.;  //if we have more tracks -> regional tracking
00094     float etaB = 10.;
00095     float phiB = TMath::Pi()/2.;
00096 
00097     float decEta = estTracks/600.;
00098     etaB = 2.5/decEta;
00099 
00100     if(estTracks>regTracking) {
00101       LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Regional Tracking]";
00102       LogTrace("heavyIonHLTVertexing")<<"  [Regional Tracking: eta range: -" << etaB << ", "<< etaB <<"]";
00103       LogTrace("heavyIonHLTVertexing")<<"  [Regional Tracking: phi range: -" << phiB << ", "<< phiB <<"]";
00104       LogTrace("heavyIonHLTVertexing")<<"  [Regional Tracking: factor of decrease: " << decEta*2. << "]";  // 2:from phi
00105     }
00106 
00107     // tracking region selection
00108     std::vector<TrackingRegion* > result;
00109     if(estTracks>regTracking) {  // regional tracking
00110       result.push_back( 
00111           new RectangularEtaPhiTrackingRegion(theDirection, theOrigin, thePtMin, theOriginRadius, theOriginHalfLength, etaB, phiB, thePrecise) );
00112     }
00113     else {                       // global tracking
00114       LogTrace("heavyIonHLTVertexing")<<" [HIVertexing: Global Tracking]";
00115       result.push_back( 
00116           new GlobalTrackingRegion(thePtMin, theOrigin, theOriginRadius, theOriginHalfLength, thePrecise) );
00117     }
00118     return 
00119 result;
00120   }


Member Data Documentation

GlobalVector HITrackingRegionProducer::theDirection [private]

Definition at line 129 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

GlobalPoint HITrackingRegionProducer::theOrigin [private]

Definition at line 125 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::theOriginHalfLength [private]

Definition at line 127 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::theOriginRadius [private]

Definition at line 126 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

bool HITrackingRegionProducer::thePrecise [private]

Definition at line 128 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

double HITrackingRegionProducer::thePtMin [private]

Definition at line 124 of file HITrackingRegionProducer.h.

Referenced by HITrackingRegionProducer(), and regions().

std::string HITrackingRegionProducer::theSiPixelRecHits [private]

Definition at line 123 of file HITrackingRegionProducer.h.

Referenced by estimateMultiplicity(), and HITrackingRegionProducer().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:24:19 2009 for CMSSW by  doxygen 1.5.4