CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/FastSimulation/EgammaElectronAlgos/interface/FastPixelHitMatcher.h

Go to the documentation of this file.
00001 #ifndef FastPixelHitMatcher_H
00002 #define FastPixelHitMatcher_H
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:    EgammaElectronAlgos
00007 // Class:      FastPixelHitMatcher
00008 //
00017 //
00018 // Original Author:  Patrick Janot.
00019 //
00020 //
00021 
00022 #include "TrackingTools/TransientTrackingRecHit/interface/GenericTransientTrackingRecHit.h"
00023 #include <vector>
00024 
00029 class TrackerGeometry;
00030 class GeometricSearchTracker;
00031 class TrackerInteractionGeometry;
00032 class TrackerLayer;
00033 class TrackerRecHit;
00034 class TrackingRecHit;
00035 class ParticlePropagator;
00036 class MagneticFieldMap;
00037 
00038 class FastPixelHitMatcher{
00039 
00040  public:
00041   //RC
00042   typedef TransientTrackingRecHit::ConstRecHitPointer   ConstRecHitPointer;
00043   typedef TransientTrackingRecHit::RecHitPointer        RecHitPointer;
00044   typedef TransientTrackingRecHit::RecHitContainer      RecHitContainer;
00045 
00046 
00047   FastPixelHitMatcher(float,float,float,float,float,float,float,float,float,float,float,float,bool);
00048 
00049   virtual ~FastPixelHitMatcher();
00050 
00051   void setES(const MagneticFieldMap* aFieldMap,
00052              const TrackerGeometry* aTrackerGeometry,
00053              const GeometricSearchTracker* geomSearchTracker,
00054              const TrackerInteractionGeometry* interactionGeometry);
00055 
00056   std::vector< std::pair<ConstRecHitPointer,ConstRecHitPointer> >
00057     compatibleHits(const GlobalPoint& xmeas,
00058                    const GlobalPoint& vprim,
00059                    float energy,
00060                    std::vector<TrackerRecHit>& theHits);
00061 
00062   inline double getVertex() { return vertex; }
00063 
00064   void set1stLayer (float ephimin, float ephimax,
00065                     float pphimin, float pphimax) {
00066 
00067     ephi1min = ephimin;
00068     ephi1max = ephimax;
00069     pphi1min = pphimin;
00070     pphi1max = pphimax;
00071 
00072   }
00073 
00074   void set2ndLayer (float phimin, float phimax) {
00075     phi2min = phimin;
00076     phi2max = phimax;
00077   }
00078 
00079   bool isASeed(const ParticlePropagator& myElec,
00080                const ParticlePropagator& myPosi,
00081                const GlobalPoint& theVertex,
00082                double rCluster,
00083                double zCluster,
00084                const TrackerRecHit& hit1,
00085                const TrackerRecHit& hit2);
00086 
00087   bool propagateToLayer(ParticlePropagator& myPart,
00088                         const GlobalPoint& theVertex,
00089                         GlobalPoint& theHit,
00090                         double phimin,
00091                         double phimax,
00092                         unsigned layer);
00093 
00094   double zVertex(double zCluster,
00095                  double rCluster,
00096                  GlobalPoint& theHit);
00097 
00098   bool checkRZCompatibility(double zCluster,double rCluster,
00099                             double zVertex,
00100                             float rzMin, float rzMax,
00101                             GlobalPoint& theHit,
00102                             bool forward);
00103 
00104 
00105   void set1stLayerZRange(double zmin1, double zmax1) {
00106     z1max = zmax1;
00107     z1min = zmin1;
00108   }
00109 
00110  private:
00111 
00112   RecHitContainer hitsInTrack;
00113 
00114   float ephi1min, ephi1max;
00115   float pphi1min, pphi1max;
00116   float phi2min, phi2max;
00117   float z1min, z1max;
00118   float z2minB, z2maxB;
00119   float r2minF, r2maxF;
00120   float rMinI, rMaxI;
00121   bool searchInTIDTEC;
00122 
00123   const TrackerGeometry* theTrackerGeometry;
00124   const MagneticField* theMagneticField;
00125   const GeometricSearchTracker* theGeomSearchTracker;
00126   const TrackerInteractionGeometry* _theGeometry;
00127   const MagneticFieldMap* theFieldMap;
00128   std::vector<const TrackerLayer*> thePixelLayers;
00129   double vertex;
00130 
00131 
00132 };
00133 
00134 #endif
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142