CMS 3D CMS Logo

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>
41 
43 
44 namespace dyt_utils {
45  enum class etaRegion { eta0p8, eta1p2, eta2p0, eta2p2, eta2p4 };
46 };
47 
49 public:
50  struct Config {
52 
57 
61  };
62 
65 
66  DynamicTruncation(Config const &, const edm::EventSetup &, const MuonServiceProxy &);
67 
69 
71  const edm::Handle<CSCSegmentCollection> &CSCSegProd) {
72  getSegs->initCSU(DTSegProd, CSCSegProd);
73  }
74 
75  void setSelector(int);
76  void setThr(const std::vector<int> &);
77  void setUpdateState(bool);
78  void setUseAPE(bool);
79  /*---- DyT v2-----*/
80  void setThrsMap(const edm::ParameterSet &);
81  void setParThrsMode(bool dytParThrsMode) { useParametrizedThr = dytParThrsMode; }
82  void setRecoP(double p) { p_reco = p; }
83  void setRecoEta(double eta) {
84  eta_reco = eta;
85  setEtaRegion();
86  }
87 
88  // Return the vector with the tracker plus the selected muon hits
90 
91  // Return the DYTInfo object
97  return dytInfo;
98  }
99 
100 private:
101  void compatibleDets(TrajectoryStateOnSurface &, std::map<int, std::vector<DetId>> &);
102  void filteringAlgo();
103  void fillSegmentMaps(std::map<int, std::vector<DetId>> &,
104  std::map<int, std::vector<DTRecSegment4D>> &,
105  std::map<int, std::vector<CSCSegment>> &);
106  void preliminaryFit(std::map<int, std::vector<DetId>>,
107  std::map<int, std::vector<DTRecSegment4D>>,
108  std::map<int, std::vector<CSCSegment>>);
109  bool chooseLayers(int &,
110  double const &,
111  DTRecSegment4D const &,
112  TrajectoryStateOnSurface const &,
113  double const &,
114  CSCSegment const &,
115  TrajectoryStateOnSurface const &);
116  void fillDYTInfos(
117  int const &, bool const &, int &, double const &, double const &, DTRecSegment4D const &, CSCSegment const &);
118  int stationfromDet(DetId const &);
122  void getThresholdFromDB(double &, DetId const &);
123  void correctThrByPAndEta(double &);
124  void getThresholdFromCFG(double &, DetId const &);
126  std::vector<DTRecSegment4D> const &,
127  double &,
128  DTRecSegment4D &,
130  void testCSCstation(
131  TrajectoryStateOnSurface &, std::vector<CSCSegment> const &, double &, CSCSegment &, TrajectoryStateOnSurface &);
132  void useSegment(DTRecSegment4D const &, TrajectoryStateOnSurface const &);
133  void useSegment(CSCSegment const &, TrajectoryStateOnSurface const &);
134  void sort(ConstRecHitContainer &);
135  void setEtaRegion();
136 
138  bool useAPE;
139  std::vector<int> Thrs;
150  std::unique_ptr<DirectMuonNavigation> navigation;
152  std::map<int, double> estimatorMap;
153  std::map<int, bool> usedStationMap;
154  std::map<int, DetId> idChamberMap;
158  std::map<DTChamberId, GlobalError> dtApeMap;
159  std::map<CSCDetId, GlobalError> cscApeMap;
162  std::unique_ptr<ChamberSegmentUtility> getSegs;
163  std::unique_ptr<ThrParameters> thrManager;
166  /* Variables for v2 */
167  double p_reco;
168  double eta_reco;
171  std::map<dyt_utils::etaRegion, std::vector<double>> parameters;
172 };
173 
174 #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
Definition: Config.py:1
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 &)