Go to the documentation of this file.00001 #ifndef TrackingRegion_H
00002 #define TrackingRegion_H
00003
00009 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00010 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00011
00012 #include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
00013 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00014 #include "RecoTracker/TkTrackingRegions/interface/HitRZCompatibility.h"
00015 #include "RecoTracker/TkTrackingRegions/interface/HitEtaCheck.h"
00016 #include "RecoTracker/TkTrackingRegions/interface/HitRCheck.h"
00017 #include "RecoTracker/TkTrackingRegions/interface/HitZCheck.h"
00018
00019
00020 #include "FWCore/Framework/interface/EventSetup.h"
00021 #include "RecoTracker/TkSeedingLayers/interface/SeedingLayer.h"
00022 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00023
00024 #include <utility>
00025
00026 #include <sstream>
00027
00028 #include <vector>
00029 #include <string>
00030
00031 #include "FWCore/Utilities/interface/GCC11Compatibility.h"
00032
00033 class DetLayer;
00034 class HitRZCompatibility;
00035 class BarrelDetLayer;
00036 class ForwardDetLayer;
00037
00038 namespace edm { class Event; }
00039
00040 class TrackingRegion {
00041 public:
00042
00043 public:
00044 virtual ~TrackingRegion(){}
00045 typedef PixelRecoRange<float> Range;
00046 typedef TransientTrackingRecHit::ConstRecHitPointer Hit;
00047 typedef std::vector<Hit> Hits;
00048
00049
00050 public:
00051
00052 TrackingRegion( const GlobalVector & direction,
00053 const GlobalPoint & originPos,
00054 const Range & invPtRange,
00055 const float & originRBound,
00056 const float & originZBound)
00057 : theDirection( direction), theVertexPos( originPos),
00058 theInvPtRange( invPtRange),
00059 thePtMin(1.f/std::max( std::abs(invPtRange.max()), std::abs(invPtRange.min()) )),
00060 theVertexRBound( originRBound),
00061 theVertexZBound( originZBound) { }
00062
00063
00065 GlobalVector const & direction() const { return theDirection; }
00066
00071 GlobalPoint const & origin() const { return theVertexPos; }
00072
00074 float originRBound() const { return theVertexRBound; }
00075
00077 float originZBound() const { return theVertexZBound; }
00078
00080 float ptMin() const { return thePtMin;}
00081
00083 Range invPtRange() const { return theInvPtRange; }
00084
00085
00088 virtual HitRZCompatibility * checkRZ(const DetLayer* layer,
00089 const Hit & outerHit,
00090 const edm::EventSetup& iSetup,
00091 const DetLayer* outerlayer=0,
00092 float lr=0, float gz=0, float dr=0, float dz=0) const = 0;
00093
00094
00096 virtual Hits hits(
00097 const edm::Event& ev,
00098 const edm::EventSetup& es,
00099 const ctfseeding::SeedingLayer* layer) const = 0;
00100
00102 TrackingRegion* restrictedRegion( const GlobalPoint & originPos,
00103 const float & originRBound, const float & originZBound) const {
00104 TrackingRegion* restr = clone();
00105 restr->theVertexPos = originPos;
00106 restr->theVertexRBound = originRBound;
00107 restr->theVertexZBound = originZBound;
00108 return restr;
00109 }
00110
00111 virtual TrackingRegion* clone() const = 0;
00112
00113 virtual std::string name() const { return "TrackingRegion"; }
00114 virtual std::string print() const {
00115 std::ostringstream str;
00116 str << name() <<" dir:"<<theDirection<<" vtx:"<<theVertexPos
00117 <<" dr:"<<theVertexRBound<<" dz:"<<theVertexZBound<<" pt:"<<1./theInvPtRange.max();
00118 return str.str();
00119 }
00120
00121 void setDirection(const GlobalVector & dir ) { theDirection = dir; }
00122
00123 private:
00124
00125 GlobalVector theDirection;
00126 GlobalPoint theVertexPos;
00127 Range theInvPtRange;
00128 float thePtMin;
00129 float theVertexRBound;
00130 float theVertexZBound;
00131
00132 };
00133
00134 using TrackingRegionBase = TrackingRegion;
00135
00136 #endif