Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:56

0001 #ifndef GlobalTrackingRegion_H
0002 #define GlobalTrackingRegion_H
0003 
0004 /** \class GlobalTrackingRegion
0005  * An implementation of the TrackingRegion where the region of interest is
0006  * global, ie there are no constraints on the allowed direction of particles
0007  * of interest
0008  */
0009 
0010 #include "RecoTracker/TkTrackingRegions/interface/TrackingRegion.h"
0011 #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisationMaker.h"
0012 #include <vector>
0013 
0014 class GlobalTrackingRegion final : public TrackingRegion {
0015 public:
0016   /** Construct from minimal track P_t, and origin size and position.
0017    *  The origin region is a cylinder of radius originRadius, half length 
0018    *  originHalfLength, positioned at "origin".
0019    *  This class DOES provide the possibility to displace the origin
0020    *  in the transverse plane. 
0021    *
0022    * if useMS == true, msmaker needs to be given
0023    */
0024   GlobalTrackingRegion(float ptMin,
0025                        const GlobalPoint& origin,
0026                        float originRadius,
0027                        float originHalfLength,
0028                        bool precise = false,
0029                        bool useMS = false,
0030                        const MultipleScatteringParametrisationMaker* msmaker = nullptr)
0031       : TrackingRegionBase(GlobalVector(0, 0, 0), origin, Range(-1 / ptMin, 1 / ptMin), originRadius, originHalfLength),
0032         theMSMaker(msmaker),
0033         thePrecise(precise),
0034         theUseMS(useMS) {}
0035 
0036   // obsolete constructor
0037   GlobalTrackingRegion(float ptMin = 1.,
0038                        float originRadius = 0.2,
0039                        float originHalfLength = 22.7,
0040                        float originZPos = 0.,
0041                        bool precise = false)
0042       : TrackingRegionBase(GlobalVector(0, 0, 0),
0043                            GlobalPoint(0, 0, originZPos),
0044                            Range(-1 / ptMin, 1 / ptMin),
0045                            originRadius,
0046                            originHalfLength),
0047         thePrecise(precise) {}
0048 
0049   TrackingRegion::Hits hits(const SeedingLayerSetsHits::SeedingLayer& layer) const override;
0050 
0051   std::unique_ptr<HitRZCompatibility> checkRZ(const DetLayer* layer,
0052                                               const Hit& outerHit,
0053                                               const DetLayer* outerlayer = nullptr,
0054                                               float lr = 0,
0055                                               float gz = 0,
0056                                               float dr = 0,
0057                                               float dz = 0) const override;
0058 
0059   /// Set the elements of the mask corresponding to the tracks that are compatable with the region.
0060   /// Does not reset the elements corresponding to the tracks that are not compatible.
0061   void checkTracks(reco::TrackCollection const& tracks, std::vector<bool>& mask) const override;
0062 
0063   std::unique_ptr<TrackingRegion> clone() const override { return std::make_unique<GlobalTrackingRegion>(*this); }
0064 
0065   std::string name() const override { return "GlobalTrackingRegion"; }
0066   std::string print() const override;
0067 
0068 private:
0069   const MultipleScatteringParametrisationMaker* theMSMaker = nullptr;
0070   bool thePrecise = false;
0071   bool theUseMS = false;
0072 };
0073 #endif