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>
43 
44 namespace dyt_utils {
45  enum class etaRegion { eta0p8, eta1p2, eta2p0, eta2p2, eta2p4 };
46 };
47 
49 public:
52 
54 
56 
58  const edm::Handle<CSCSegmentCollection> &CSCSegProd) {
59  getSegs->initCSU(DTSegProd, CSCSegProd);
60  }
61 
62  void setSelector(int);
63  void setThr(const std::vector<int> &);
64  void setUpdateState(bool);
65  void setUseAPE(bool);
66  /*---- DyT v2-----*/
67  void setThrsMap(const edm::ParameterSet &);
68  void setParThrsMode(bool dytParThrsMode) { useParametrizedThr = dytParThrsMode; }
69  void setRecoP(double p) { p_reco = p; }
70  void setRecoEta(double eta) {
71  eta_reco = eta;
72  setEtaRegion();
73  }
74 
75  // Return the vector with the tracker plus the selected muon hits
77 
78  // Return the DYTInfo object
80  dytInfo.setNStUsed(nStationsUsed);
81  dytInfo.setDYTEstimators(estimatorMap);
82  dytInfo.setUsedStations(usedStationMap);
83  dytInfo.setIdChambers(idChamberMap);
84  return dytInfo;
85  }
86 
87 private:
88  void compatibleDets(TrajectoryStateOnSurface &, std::map<int, std::vector<DetId>> &);
89  void filteringAlgo();
90  void fillSegmentMaps(std::map<int, std::vector<DetId>> &,
91  std::map<int, std::vector<DTRecSegment4D>> &,
92  std::map<int, std::vector<CSCSegment>> &);
93  void preliminaryFit(std::map<int, std::vector<DetId>>,
94  std::map<int, std::vector<DTRecSegment4D>>,
95  std::map<int, std::vector<CSCSegment>>);
96  bool chooseLayers(int &,
97  double const &,
98  DTRecSegment4D const &,
100  double const &,
101  CSCSegment const &,
102  TrajectoryStateOnSurface const &);
103  void fillDYTInfos(
104  int const &, bool const &, int &, double const &, double const &, DTRecSegment4D const &, CSCSegment const &);
105  int stationfromDet(DetId const &);
106  void update(TrajectoryStateOnSurface &, ConstRecHitPointer);
107  void updateWithDThits(TrajectoryStateOnSurface &, DTRecSegment4D const &);
108  void updateWithCSChits(TrajectoryStateOnSurface &, CSCSegment const &);
109  void getThresholdFromDB(double &, DetId const &);
110  void correctThrByPAndEta(double &);
111  void getThresholdFromCFG(double &, DetId const &);
112  void testDTstation(TrajectoryStateOnSurface &,
113  std::vector<DTRecSegment4D> const &,
114  double &,
115  DTRecSegment4D &,
117  void testCSCstation(
118  TrajectoryStateOnSurface &, std::vector<CSCSegment> const &, double &, CSCSegment &, TrajectoryStateOnSurface &);
119  void useSegment(DTRecSegment4D const &, TrajectoryStateOnSurface const &);
120  void useSegment(CSCSegment const &, TrajectoryStateOnSurface const &);
121  void sort(ConstRecHitContainer &);
122  void setEtaRegion();
123 
124  ConstRecHitContainer result, prelFitMeas;
125  bool useAPE;
126  std::vector<int> Thrs;
139  std::map<int, double> estimatorMap;
140  std::map<int, bool> usedStationMap;
141  std::map<int, DetId> idChamberMap;
145  std::map<DTChamberId, GlobalError> dtApeMap;
146  std::map<CSCDetId, GlobalError> cscApeMap;
147  double muonPTest, muonETAest;
153  /* Variables for v2 */
154  double p_reco;
155  double eta_reco;
158  std::map<dyt_utils::etaRegion, std::vector<double>> parameters;
159 };
160 
161 #endif
DirectMuonNavigation * navigation
dyt_utils::etaRegion region
edm::ESHandle< Propagator > propagatorPF
void setProd(const edm::Handle< DTRecSegment4DCollection > &DTSegProd, const edm::Handle< CSCSegmentCollection > &CSCSegProd)
TrajectoryStateOnSurface currentState
edm::ESHandle< Propagator > propagatorCompatibleDet
std::map< int, bool > usedStationMap
ThrParameters * thrManager
void setRecoEta(double eta)
TrajectoryStateOnSurface prelFitState
edm::ESHandle< MuonDetLayerGeometry > navMuon
ConstRecHitContainer result
std::map< int, DetId > idChamberMap
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
edm::ESHandle< TrajectoryStateUpdator > updatorHandle
void setNStUsed(int NStUsed)
Definition: DYTInfo.h:22
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
ChamberSegmentUtility * getSegs
std::map< dyt_utils::etaRegion, std::vector< double > > parameters
reco::DYTInfo dytInfo
std::vector< int > Thrs
std::vector< ConstRecHitPointer > ConstRecHitContainer
void setParThrsMode(bool dytParThrsMode)
Definition: DetId.h:17
std::map< DTChamberId, GlobalError > dtApeMap
reco::DYTInfo getDYTInfo()
const DYTThrObject * dytThresholds
TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
edm::ESHandle< Propagator > propagator
#define update(a, b)
std::map< int, double > estimatorMap
edm::ESHandle< MagneticField > magfield
std::map< CSCDetId, GlobalError > cscApeMap
edm::ESHandle< GlobalTrackingGeometry > theG
edm::ESHandle< CSCGeometry > cscGeom
void setRecoP(double p)