File indexing completed on 2024-04-06 12:27:07
0001 #ifndef RecoMuon_MuonSeedBuilder_H
0002 #define RecoMuon_MuonSeedBuilder_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0016 #include <RecoMuon/MeasurementDet/interface/MuonDetLayerMeasurements.h>
0017 #include <DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h>
0018 #include "FWCore/Framework/interface/ConsumesCollector.h"
0019
0020 #include <vector>
0021
0022 class DetLayer;
0023 class MuonDetLayerGeometry;
0024 class MagneticField;
0025 class MuonSeedCreator;
0026 class MuonSeedCleaner;
0027
0028 typedef std::vector<TrajectorySeed> SeedContainer;
0029
0030 class MuonSeedBuilder {
0031 public:
0032 typedef MuonTransientTrackingRecHit::MuonRecHitContainer SegmentContainer;
0033 typedef std::deque<bool> BoolContainer;
0034
0035
0036 explicit MuonSeedBuilder(const edm::ParameterSet&, edm::ConsumesCollector&);
0037
0038
0039 ~MuonSeedBuilder();
0040
0041
0042
0043
0044 void setGeometry(const MuonDetLayerGeometry* lgeom) { muonLayers = lgeom; }
0045
0046
0047 void setBField(const MagneticField* theField) { BField = theField; }
0048
0049
0050 int build(edm::Event& event, const edm::EventSetup& eventSetup, TrajectorySeedCollection& seeds);
0051
0052 std::vector<int> badSeedLayer;
0053
0054 private:
0055
0056 bool foundMatchingSegment(int type,
0057 SegmentContainer& protoTrack,
0058 SegmentContainer& segments,
0059 BoolContainer& usedSeg,
0060 float& eta_temp,
0061 float& phi_temp,
0062 int& lastLayer,
0063 bool& showeringBefore);
0064
0065
0066 std::vector<TrajectorySeed> seedCleaner(const edm::EventSetup& eventSetup, std::vector<TrajectorySeed>& seeds);
0067
0068
0069 double etaError(const GlobalPoint gp, double rErr);
0070
0071
0072 bool IdentifyShowering(SegmentContainer& segs,
0073 BoolContainer& usedSeg,
0074 float& eta_last,
0075 float& phi_last,
0076 int layer,
0077 int& NShoweringSegments);
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106 bool debug;
0107
0108
0109 bool enableDTMeasurement;
0110
0111
0112 bool enableCSCMeasurement;
0113
0114
0115 int minCSCHitsPerSegment;
0116
0117
0118 int minDTHitsPerSegment;
0119
0120
0121 float maxDeltaEtaCSC;
0122 float maxDeltaPhiCSC;
0123 float maxDeltaEtaOverlap;
0124 float maxDeltaPhiOverlap;
0125 float maxDeltaEtaDT;
0126 float maxDeltaPhiDT;
0127
0128
0129 int NShowerSeg;
0130 SegmentContainer ShoweringSegments;
0131 std::vector<int> ShoweringLayers;
0132
0133 edm::InputTag theDTSegmentLabel;
0134
0135
0136 edm::InputTag theCSCSegmentLabel;
0137
0138
0139 MuonSeedCreator* muonSeedCreate_;
0140 MuonSeedCleaner* muonSeedClean_;
0141
0142
0143 const MuonDetLayerGeometry* muonLayers;
0144
0145
0146 const MagneticField* BField;
0147
0148
0149
0150 float maxEtaResolutionDT;
0151 float maxEtaResolutionCSC;
0152 float maxPhiResolutionDT;
0153 float maxPhiResolutionCSC;
0154 float theMinMomentum;
0155
0156 MuonDetLayerMeasurements* muonMeasurements;
0157 };
0158 #endif