72 LogTrace(
"Muon|RecoMuon|L2MuonProducer") <<
"constructor called" << endl;
88 theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
90 std::unique_ptr<MuonTrajectoryBuilder> trajectoryBuilder =
nullptr;
94 string typeOfBuilder = parameterSet.
existsAs<
string>(
"MuonTrajectoryBuilder")
95 ? parameterSet.
getParameter<
string>(
"MuonTrajectoryBuilder")
96 :
"StandAloneMuonTrajectoryBuilder";
97 if (typeOfBuilder ==
"StandAloneMuonTrajectoryBuilder" || typeOfBuilder.empty())
99 std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
100 else if (typeOfBuilder ==
"Exhaustive")
102 std::make_unique<ExhaustiveMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
105 <<
"No Trajectory builder associated with " << typeOfBuilder
106 <<
". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
108 std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
111 std::make_unique<MuonTrackFinder>(
std::move(trajectoryBuilder),
112 std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()),
113 std::make_unique<MuonTrajectoryCleaner>(
true),
116 produces<reco::TrackCollection>();
117 produces<reco::TrackCollection>(
"UpdatedAtVtx");
118 produces<TrackingRecHitCollection>();
119 produces<reco::TrackExtraCollection>();
120 produces<reco::TrackToTrackMap>();
122 produces<std::vector<Trajectory>>();
123 produces<TrajTrackAssociationCollection>();
125 produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed>>>>();
130 LogTrace(
"Muon|RecoMuon|L2eMuonProducer") <<
"L2MuonProducer destructor called" << endl;
137 LogTrace(metname) << endl << endl << endl;
138 LogTrace(metname) <<
"L2 Muon Reconstruction Started" << endl;
149 LogTrace(metname) <<
"Track Reconstruction" << endl;
152 LogTrace(metname) <<
"edm::Event loaded"
153 <<
"================================" << endl
161 psd0.
addUntracked<std::vector<std::string>>(
"Propagators",
163 "hltESPFastSteppingHelixPropagatorAny"
164 "hltESPFastSteppingHelixPropagatorOpposite",
166 psd0.
add<
bool>(
"RPCLayers",
true);
174 psd0.
add<
std::string>(
"Fitter",
"hltESPKFFittingSmootherForL2Muon");
175 psd0.
add<
std::string>(
"MuonRecHitBuilder",
"hltESPMuonTransientTrackingRecHitBuilder");
176 psd0.
add<
unsigned int>(
"NMinRecHits", 2);
177 psd0.
add<
bool>(
"UseSubRecHits",
false);
178 psd0.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
179 psd0.
add<
double>(
"RescaleError", 100.0);
185 psd0.
add<
bool>(
"DoRefit",
false);
186 psd0.
add<
std::string>(
"SeedPropagator",
"hltESPFastSteppingHelixPropagatorAny");
189 psd1.
add<
double>(
"NumberOfSigma", 3.0);
192 psd1.
add<
double>(
"MaxChi2", 1000.0);
195 psd2.
add<
double>(
"MaxChi2", 25.0);
196 psd2.
add<
double>(
"RescaleErrorFactor", 100.0);
197 psd2.
add<
int>(
"Granularity", 0);
198 psd2.
add<
bool>(
"ExcludeRPCFromFit",
false);
199 psd2.
add<
bool>(
"UseInvalidHits",
true);
200 psd2.
add<
bool>(
"RescaleError",
false);
203 psd1.
add<
bool>(
"EnableRPCMeasurement",
true);
205 psd1.
add<
bool>(
"EnableDTMeasurement",
true);
207 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
208 psd1.
add<
bool>(
"EnableGEMMeasurement",
false);
210 psd1.
add<
bool>(
"EnableME0Measurement",
false);
212 psd1.
add<
bool>(
"EnableCSCMeasurement",
true);
218 psd1.
add<
std::string>(
"Fitter",
"hltESPKFFittingSmootherForL2Muon");
219 psd1.
add<
std::string>(
"MuonRecHitBuilder",
"hltESPMuonTransientTrackingRecHitBuilder");
220 psd1.
add<
unsigned int>(
"NMinRecHits", 2);
221 psd1.
add<
bool>(
"UseSubRecHits",
false);
222 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
223 psd1.
add<
double>(
"RescaleError", 100.0);
226 psd0.
add<
bool>(
"DoBackwardFilter",
true);
230 psd1.
add<
double>(
"NumberOfSigma", 3.0);
234 psd1.
add<
double>(
"MaxChi2", 100.0);
237 psd2.
add<
double>(
"MaxChi2", 25.0);
238 psd2.
add<
double>(
"RescaleErrorFactor", 100.0);
239 psd2.
add<
int>(
"Granularity", 0);
240 psd2.
add<
bool>(
"ExcludeRPCFromFit",
false);
241 psd2.
add<
bool>(
"UseInvalidHits",
true);
242 psd2.
add<
bool>(
"RescaleError",
false);
245 psd1.
add<
bool>(
"EnableRPCMeasurement",
true);
247 psd1.
add<
bool>(
"EnableDTMeasurement",
true);
249 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
250 psd1.
add<
bool>(
"EnableGEMMeasurement",
false);
252 psd1.
add<
bool>(
"EnableME0Measurement",
false);
254 psd1.
add<
bool>(
"EnableCSCMeasurement",
true);
257 psd0.
add<
bool>(
"DoSeedRefit",
false);
260 desc.
add<
bool>(
"DoSeedRefit",
false);
263 psd0.
add<
std::string>(
"Smoother",
"hltESPKFTrajectorySmootherForMuonTrackLoader");
264 psd0.
add<
bool>(
"DoSmoothing",
false);
268 psd1.
add<
double>(
"MaxChi2", 1000000.0);
269 psd1.
add<std::vector<double>>(
"BeamSpotPosition",
275 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorOpposite");
276 psd1.
add<std::vector<double>>(
"BeamSpotPositionErrors",
284 psd0.
add<
bool>(
"VertexConstraint",
true);
285 psd0.
add<
std::string>(
"TTRHBuilder",
"hltESPTTRHBWithTrackAngle");
289 descriptions.
add(
"L2MuonProducer", desc);
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::unique_ptr< MuonServiceProxy > theService
the event setup proxy, it takes care the services update
const std::string metname
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
void produce(edm::Event &, const edm::EventSetup &) override
reconstruct muons
edm::InputTag theSeedCollectionLabel
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
L2MuonProducer(const edm::ParameterSet &)
constructor with config
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Log< level::Warning, false > LogWarning
~L2MuonProducer() override
destructor
std::unique_ptr< MuonTrackFinder > theTrackFinder
the track finder