CMS 3D CMS Logo

LayerHitMap.h

Go to the documentation of this file.
00001 #ifndef LayerHitMap_H
00002 #define LayerHitMap_H
00003 
00004 
00005 #include "RecoTracker/TkHitPairs/interface/TkHitPairsCacheCell.h"
00006 #include "RecoTracker/TkHitPairs/interface/TkHitPairsCellManager.h"
00007 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
00008 #include "RecoTracker/TkSeedingLayers/interface/SeedingLayer.h"
00009 #include "RecoTracker/TkSeedingLayers/interface/SeedingHit.h"
00010 #include <vector>
00011 
00012 class LayerHitMapLoop;
00013 
00014 class LayerHitMap {
00015 
00016 public:
00017   typedef PixelRecoRange<float> Range;
00018   typedef ctfseeding::SeedingHit TkHitPairsCachedHit;
00019   typedef std::vector<TkHitPairsCachedHit>::const_iterator HitIter;
00020 
00021   LayerHitMap() : theCells(0) { }
00022   LayerHitMap( const DetLayer* layer, const std::vector<ctfseeding::SeedingHit> & hits);
00023   LayerHitMap(const LayerHitMap & lhm); 
00024   ~LayerHitMap() { delete theCells; }
00025 
00026   LayerHitMapLoop loop() const;
00027   LayerHitMapLoop loop(const Range & phiRange, const Range & rzRange) const;
00028 
00029   bool empty() const { return theHits.empty(); }
00030 
00031 private:
00032   void initCells() const;
00033   int idxRz(float rz) const { return int((rz-theLayerRZmin)/theCellDeltaRZ); }
00034   TkHitPairsCacheCell & cell(int idx_rz, int idx_phi) const
00035   { return (*theCells)(idx_rz,idx_phi); } 
00036  
00037   friend class LayerHitMapLoop;
00038 
00039 private:
00040   mutable TkHitPairsCellManager * theCells;
00041   mutable std::vector<ctfseeding::SeedingHit> theHits;
00042   float theLayerRZmin, theCellDeltaRZ;
00043   float theLayerPhimin, theCellDeltaPhi; 
00044   int theNbinsRZ, theNbinsPhi;
00045 };
00046 #endif 

Generated on Tue Jun 9 17:45:48 2009 for CMSSW by  doxygen 1.5.4