CMS 3D CMS Logo

DTMeantimerPatternReco.h
Go to the documentation of this file.
1 #ifndef DTSegment_DTMeantimerPatternReco_h
2 #define DTSegment_DTMeantimerPatternReco_h
3 
15 /* Base Class Headers */
17 
18 /* Collaborating Class Declarations */
19 namespace edm {
20  class ParameterSet;
21  class EventSetup;
22  // class ESHandle;
23 } // namespace edm
24 class DTSegmentUpdator;
25 class DTSegmentCleaner;
26 class DTHitPairForFit;
27 class DTSegmentCand;
28 class DTLinearFit;
29 
30 /* C++ Headers */
31 #include <vector>
32 #include <deque>
33 #include <utility>
34 
38 
39 /* ====================================================================== */
40 
41 /* Class DTMeantimerPatternReco Interface */
42 
44 public:
47 
49  ~DTMeantimerPatternReco() override;
50 
51  /* Operations */
52 
55  const std::vector<DTRecHit1DPair>& hits) override;
56 
58  std::string algoName() const override { return theAlgoName; }
59 
62  void setES(const edm::EventSetup& setup) override;
63 
64 protected:
65 private:
66  DTLinearFit* theFitter; // the linear fitter
67 
69 
70  // typedef std::pair<DTHitPairForFit*, DTEnums::DTCellSide> AssPoint;
71 
72  // create the DTHitPairForFit from the pairs for easy use
73  std::vector<std::shared_ptr<DTHitPairForFit>> initHits(const DTSuperLayer* sl,
74  const std::vector<DTRecHit1DPair>& hits);
75 
76  // search for candidate, starting from pairs of hits in different layers
77  std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
78  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits);
79 
80  // try adding more hits to a candidate
81  void addHits(DTSegmentCand* segCand,
82  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits,
83  std::vector<DTSegmentCand*>& result);
84 
85  // fit a set of left/right hits, calculate t0 and chi^2
86  DTSegmentCand* fitWithT0(DTSegmentCand* seg, const bool fitdebug);
87 
88  // check if two hist can be considered in one segment (come from different layers, not too far away etc.)
89  bool geometryFilter(const DTWireId first, const DTWireId second) const;
90 
91  bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs, DTSegmentCand* seg);
92 
93  void printPattern(std::vector<DTSegmentCand::AssPoint>& assHits, const DTHitPairForFit* hit);
94 
95 private:
97  unsigned int theMaxAllowedHits;
100  double theMaxChi2;
101  bool debug;
102  DTSegmentUpdator* theUpdator; // the updator and fitter
103  DTSegmentCleaner* theCleaner; // the cleaner
104 
105  unsigned int maxfound;
106 
108 };
109 #endif // DTSegment_DTMeantimerPatternReco_h
DTMeantimerPatternReco::theDTGeometry
edm::ESHandle< DTGeometry > theDTGeometry
Definition: DTMeantimerPatternReco.h:107
DTLinearFit
Definition: DTLinearFit.h:26
DTRecSegment2DBaseAlgo.h
DTMeantimerPatternReco::theAlgoName
std::string theAlgoName
Definition: DTMeantimerPatternReco.h:96
DTMeantimerPatternReco::maxfound
unsigned int maxfound
Definition: DTMeantimerPatternReco.h:105
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ESHandle.h
DTMeantimerPatternReco::theCleaner
DTSegmentCleaner * theCleaner
Definition: DTMeantimerPatternReco.h:103
DTMeantimerPatternReco::geometryFilter
bool geometryFilter(const DTWireId first, const DTWireId second) const
Definition: DTMeantimerPatternReco.cc:294
DTMeantimerPatternReco::initHits
std::vector< std::shared_ptr< DTHitPairForFit > > initHits(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
Definition: DTMeantimerPatternReco.cc:85
edm
HLT enums.
Definition: AlignableModifier.h:19
DTMeantimerPatternReco4D
Definition: DTMeantimerPatternReco4D.h:40
DTMeantimerPatternReco::theUpdator
DTSegmentUpdator * theUpdator
Definition: DTMeantimerPatternReco.h:102
DTMeantimerPatternReco::buildSegments
std::vector< DTSegmentCand * > buildSegments(const DTSuperLayer *sl, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits)
Definition: DTMeantimerPatternReco.cc:94
DTMeantimerPatternReco::reconstruct
edm::OwnVector< DTSLRecSegment2D > reconstruct(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits) override
this function is called in the producer
Definition: DTMeantimerPatternReco.cc:57
DTMeantimerPatternReco::debug
bool debug
Definition: DTMeantimerPatternReco.h:101
DTMeantimerPatternReco::fitWithT0
DTSegmentCand * fitWithT0(DTSegmentCand *seg, const bool fitdebug)
Definition: DTMeantimerPatternReco.cc:330
DTMeantimerPatternReco::theMaxAllowedHits
unsigned int theMaxAllowedHits
Definition: DTMeantimerPatternReco.h:97
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
DTMeantimerPatternReco::theFitter
DTLinearFit * theFitter
Definition: DTMeantimerPatternReco.h:66
DTSuperLayer
Definition: DTSuperLayer.h:24
DTMeantimerPatternReco::DTMeantimerPatternReco
DTMeantimerPatternReco(const edm::ParameterSet &pset)
Constructor.
Definition: DTMeantimerPatternReco.cc:38
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
DTSegmentUpdator
Definition: DTSegmentUpdator.h:43
DTSegmentCand.h
DTSegmentCleaner
Definition: DTSegmentCleaner.h:31
DTMeantimerPatternReco
Definition: DTMeantimerPatternReco.h:43
DTWireId
Definition: DTWireId.h:12
edm::ESHandle< DTGeometry >
DTSegmentCand
Definition: DTSegmentCand.h:34
DTMeantimerPatternReco::theMaxChi2
double theMaxChi2
Definition: DTMeantimerPatternReco.h:100
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTGeometry.h
DTMeantimerPatternReco::printPattern
void printPattern(std::vector< DTSegmentCand::AssPoint > &assHits, const DTHitPairForFit *hit)
Definition: DTMeantimerPatternReco.cc:371
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
DTMeantimerPatternReco::algoName
std::string algoName() const override
return the algo name
Definition: DTMeantimerPatternReco.h:58
DTMeantimerPatternReco::theAlphaMaxTheta
double theAlphaMaxTheta
Definition: DTMeantimerPatternReco.h:98
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::EventSetup
Definition: EventSetup.h:58
DTMeantimerPatternReco::setES
void setES(const edm::EventSetup &setup) override
Definition: DTMeantimerPatternReco.cc:79
DTMeantimerPatternReco::addHits
void addHits(DTSegmentCand *segCand, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits, std::vector< DTSegmentCand * > &result)
Definition: DTMeantimerPatternReco.cc:186
DTMeantimerPatternReco::theAlphaMaxPhi
double theAlphaMaxPhi
Definition: DTMeantimerPatternReco.h:99
DTHitPairForFit
Definition: DTHitPairForFit.h:31
DTMeantimerPatternReco::checkDoubleCandidates
bool checkDoubleCandidates(std::vector< DTSegmentCand * > &segs, DTSegmentCand *seg)
Definition: DTMeantimerPatternReco.cc:360
mps_fire.result
result
Definition: mps_fire.py:311
EventSetup
DTMeantimerPatternReco::~DTMeantimerPatternReco
~DTMeantimerPatternReco() override
Destructor.
Definition: DTMeantimerPatternReco.cc:50
hit
Definition: SiStripHitEffFromCalibTree.cc:88
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DTRecSegment2DBaseAlgo
Definition: DTRecSegment2DBaseAlgo.h:32
edm::OwnVector
Definition: OwnVector.h:24