CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DynamicTruncation.h
Go to the documentation of this file.
1 #ifndef RecoMuon_GlobalTrackingTools_DynamicTruncation_h
2 #define RecoMuon_GlobalTrackingTools_DynamicTruncation_h
3 
19 #include <memory>
40 
42 
43 namespace dyt_utils {
44  enum class etaRegion { eta0p8, eta1p2, eta2p0, eta2p2, eta2p4 };
45 };
46 
48 public:
49  struct Config {
51 
56 
60  };
61 
64 
65  DynamicTruncation(Config const &, const edm::EventSetup &, const MuonServiceProxy &);
66 
68 
70  const edm::Handle<CSCSegmentCollection> &CSCSegProd) {
71  getSegs->initCSU(DTSegProd, CSCSegProd);
72  }
73 
74  void setSelector(int);
75  void setThr(const std::vector<int> &);
76  void setUpdateState(bool);
77  void setUseAPE(bool);
78  /*---- DyT v2-----*/
79  void setThrsMap(const edm::ParameterSet &);
80  void setParThrsMode(bool dytParThrsMode) { useParametrizedThr = dytParThrsMode; }
81  void setRecoP(double p) { p_reco = p; }
82  void setRecoEta(double eta) {
83  eta_reco = eta;
84  setEtaRegion();
85  }
86 
87  // Return the vector with the tracker plus the selected muon hits
89 
90  // Return the DYTInfo object
96  return dytInfo;
97  }
98 
99 private:
100  void compatibleDets(TrajectoryStateOnSurface &, std::map<int, std::vector<DetId>> &);
101  void filteringAlgo();
102  void fillSegmentMaps(std::map<int, std::vector<DetId>> &,
103  std::map<int, std::vector<DTRecSegment4D>> &,
104  std::map<int, std::vector<CSCSegment>> &);
105  void preliminaryFit(std::map<int, std::vector<DetId>>,
106  std::map<int, std::vector<DTRecSegment4D>>,
107  std::map<int, std::vector<CSCSegment>>);
108  bool chooseLayers(int &,
109  double const &,
110  DTRecSegment4D const &,
111  TrajectoryStateOnSurface const &,
112  double const &,
113  CSCSegment const &,
114  TrajectoryStateOnSurface const &);
115  void fillDYTInfos(
116  int const &, bool const &, int &, double const &, double const &, DTRecSegment4D const &, CSCSegment const &);
117  int stationfromDet(DetId const &);
121  void getThresholdFromDB(double &, DetId const &);
122  void correctThrByPAndEta(double &);
123  void getThresholdFromCFG(double &, DetId const &);
125  std::vector<DTRecSegment4D> const &,
126  double &,
127  DTRecSegment4D &,
129  void testCSCstation(
130  TrajectoryStateOnSurface &, std::vector<CSCSegment> const &, double &, CSCSegment &, TrajectoryStateOnSurface &);
131  void useSegment(DTRecSegment4D const &, TrajectoryStateOnSurface const &);
132  void useSegment(CSCSegment const &, TrajectoryStateOnSurface const &);
133  void sort(ConstRecHitContainer &);
134  void setEtaRegion();
135 
137  bool useAPE;
138  std::vector<int> Thrs;
149  std::unique_ptr<DirectMuonNavigation> navigation;
151  std::map<int, double> estimatorMap;
152  std::map<int, bool> usedStationMap;
153  std::map<int, DetId> idChamberMap;
157  std::map<DTChamberId, GlobalError> dtApeMap;
158  std::map<CSCDetId, GlobalError> cscApeMap;
161  std::unique_ptr<ChamberSegmentUtility> getSegs;
162  std::unique_ptr<ThrParameters> thrManager;
165  /* Variables for v2 */
166  double p_reco;
167  double eta_reco;
170  std::map<dyt_utils::etaRegion, std::vector<double>> parameters;
171 };
172 
173 #endif
dyt_utils::etaRegion region
DynamicTruncation(Config const &, const edm::EventSetup &, const MuonServiceProxy &)
edm::ESHandle< Propagator > propagatorPF
void setProd(const edm::Handle< DTRecSegment4DCollection > &DTSegProd, const edm::Handle< CSCSegmentCollection > &CSCSegProd)
Config(edm::ConsumesCollector)
void sort(ConstRecHitContainer &)
TrajectoryStateOnSurface currentState
const edm::ESGetToken< TrajectoryStateUpdator, TrackingComponentsRecord > updatorToken_
edm::ESHandle< Propagator > propagatorCompatibleDet
const edm::ESGetToken< MuonDetLayerGeometry, MuonRecoGeometryRecord > navMuonToken_
void setUsedStations(const std::map< int, bool > &ustMap)
Definition: DYTInfo.h:39
void useSegment(DTRecSegment4D const &, TrajectoryStateOnSurface const &)
void getThresholdFromDB(double &, DetId const &)
const edm::ESGetToken< AlignmentErrorsExtended, CSCAlignmentErrorExtendedRcd > cscAlignmentErrorsToken_
void updateWithCSChits(TrajectoryStateOnSurface &, CSCSegment const &)
void testDTstation(TrajectoryStateOnSurface &, std::vector< DTRecSegment4D > const &, double &, DTRecSegment4D &, TrajectoryStateOnSurface &)
const edm::ESGetToken< DYTThrObject, DYTThrObjectRcd > dytThresholdsToken_
std::map< int, bool > usedStationMap
std::unique_ptr< ChamberSegmentUtility > getSegs
void preliminaryFit(std::map< int, std::vector< DetId >>, std::map< int, std::vector< DTRecSegment4D >>, std::map< int, std::vector< CSCSegment >>)
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
void setRecoEta(double eta)
TrajectoryStateOnSurface prelFitState
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
void setDYTEstimators(const std::map< int, double > &dytEstMap)
Definition: DYTInfo.h:26
edm::ESHandle< MuonDetLayerGeometry > navMuon
ConstRecHitContainer result
std::map< int, DetId > idChamberMap
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
void compatibleDets(TrajectoryStateOnSurface &, std::map< int, std::vector< DetId >> &)
std::unique_ptr< ThrParameters > thrManager
const edm::ESGetToken< AlignmentErrorsExtended, DTAlignmentErrorExtendedRcd > dtAlignmentErrorsToken_
void correctThrByPAndEta(double &)
void testCSCstation(TrajectoryStateOnSurface &, std::vector< CSCSegment > const &, double &, CSCSegment &, TrajectoryStateOnSurface &)
edm::ESHandle< TrajectoryStateUpdator > updatorHandle
ConstRecHitContainer prelFitMeas
void setNStUsed(int NStUsed)
Definition: DYTInfo.h:22
TransientTrackingRecHit::ConstRecHitContainer filter(const Trajectory &)
void fillSegmentMaps(std::map< int, std::vector< DetId >> &, std::map< int, std::vector< DTRecSegment4D >> &, std::map< int, std::vector< CSCSegment >> &)
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
std::map< dyt_utils::etaRegion, std::vector< double > > parameters
reco::DYTInfo dytInfo
std::vector< int > Thrs
std::unique_ptr< DirectMuonNavigation > navigation
std::vector< ConstRecHitPointer > ConstRecHitContainer
void setThrsMap(const edm::ParameterSet &)
void setParThrsMode(bool dytParThrsMode)
Definition: DetId.h:17
std::map< DTChamberId, GlobalError > dtApeMap
void update(TrajectoryStateOnSurface &, ConstRecHitPointer)
reco::DYTInfo getDYTInfo()
const DYTThrObject * dytThresholds
void setIdChambers(const std::map< int, DetId > &IdChambersMap)
Definition: DYTInfo.h:48
void fillDYTInfos(int const &, bool const &, int &, double const &, double const &, DTRecSegment4D const &, CSCSegment const &)
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
edm::ESHandle< Propagator > propagator
std::map< int, double > estimatorMap
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
bool chooseLayers(int &, double const &, DTRecSegment4D const &, TrajectoryStateOnSurface const &, double const &, CSCSegment const &, TrajectoryStateOnSurface const &)
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > muonRecHitBuilderToken_
int stationfromDet(DetId const &)
void updateWithDThits(TrajectoryStateOnSurface &, DTRecSegment4D const &)
edm::ESHandle< MagneticField > magfield
void setThr(const std::vector< int > &)
std::map< CSCDetId, GlobalError > cscApeMap
edm::ESHandle< GlobalTrackingGeometry > theG
edm::ESHandle< CSCGeometry > cscGeom
void setRecoP(double p)
void getThresholdFromCFG(double &, DetId const &)