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.
getParameter<
string>(
"MuonTrajectoryBuilder");
95 if (typeOfBuilder ==
"StandAloneMuonTrajectoryBuilder" || typeOfBuilder.empty())
97 std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
98 else if (typeOfBuilder ==
"Exhaustive")
100 std::make_unique<ExhaustiveMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
103 <<
"No Trajectory builder associated with " << typeOfBuilder
104 <<
". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
106 std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
109 std::make_unique<MuonTrackFinder>(
std::move(trajectoryBuilder),
110 std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()),
111 std::make_unique<MuonTrajectoryCleaner>(
true),
114 produces<reco::TrackCollection>();
115 produces<reco::TrackCollection>(
"UpdatedAtVtx");
116 produces<TrackingRecHitCollection>();
117 produces<reco::TrackExtraCollection>();
118 produces<reco::TrackToTrackMap>();
120 produces<std::vector<Trajectory>>();
121 produces<TrajTrackAssociationCollection>();
123 produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed>>>>();
128 LogTrace(
"Muon|RecoMuon|L2eMuonProducer") <<
"L2MuonProducer destructor called" << endl;
135 LogTrace(metname) << endl << endl << endl;
136 LogTrace(metname) <<
"L2 Muon Reconstruction Started" << endl;
147 LogTrace(metname) <<
"Track Reconstruction" << endl;
150 LogTrace(metname) <<
"edm::Event loaded"
151 <<
"================================" << endl
159 psd0.
addUntracked<std::vector<std::string>>(
"Propagators",
161 "hltESPFastSteppingHelixPropagatorAny"
162 "hltESPFastSteppingHelixPropagatorOpposite",
164 psd0.
add<
bool>(
"RPCLayers",
true);
172 psd0.
add<
std::string>(
"Fitter",
"hltESPKFFittingSmootherForL2Muon");
173 psd0.
add<
std::string>(
"MuonRecHitBuilder",
"hltESPMuonTransientTrackingRecHitBuilder");
174 psd0.
add<
unsigned int>(
"NMinRecHits", 2);
175 psd0.
add<
bool>(
"UseSubRecHits",
false);
176 psd0.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
177 psd0.
add<
double>(
"RescaleError", 100.0);
183 psd0.
add<
bool>(
"DoRefit",
false);
184 psd0.
add<
std::string>(
"SeedPropagator",
"hltESPFastSteppingHelixPropagatorAny");
187 psd1.
add<
double>(
"NumberOfSigma", 3.0);
190 psd1.
add<
double>(
"MaxChi2", 1000.0);
193 psd2.
add<
double>(
"MaxChi2", 25.0);
194 psd2.
add<
double>(
"RescaleErrorFactor", 100.0);
195 psd2.
add<
int>(
"Granularity", 0);
196 psd2.
add<
bool>(
"ExcludeRPCFromFit",
false);
197 psd2.
add<
bool>(
"UseInvalidHits",
true);
198 psd2.
add<
bool>(
"RescaleError",
false);
201 psd1.
add<
bool>(
"EnableRPCMeasurement",
true);
203 psd1.
add<
bool>(
"EnableDTMeasurement",
true);
205 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
206 psd1.
add<
bool>(
"EnableGEMMeasurement",
false);
208 psd1.
add<
bool>(
"EnableME0Measurement",
false);
210 psd1.
add<
bool>(
"EnableCSCMeasurement",
true);
216 psd1.
add<
std::string>(
"Fitter",
"hltESPKFFittingSmootherForL2Muon");
217 psd1.
add<
std::string>(
"MuonRecHitBuilder",
"hltESPMuonTransientTrackingRecHitBuilder");
218 psd1.
add<
unsigned int>(
"NMinRecHits", 2);
219 psd1.
add<
bool>(
"UseSubRecHits",
false);
220 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
221 psd1.
add<
double>(
"RescaleError", 100.0);
224 psd0.
add<
bool>(
"DoBackwardFilter",
true);
228 psd1.
add<
double>(
"NumberOfSigma", 3.0);
232 psd1.
add<
double>(
"MaxChi2", 100.0);
235 psd2.
add<
double>(
"MaxChi2", 25.0);
236 psd2.
add<
double>(
"RescaleErrorFactor", 100.0);
237 psd2.
add<
int>(
"Granularity", 0);
238 psd2.
add<
bool>(
"ExcludeRPCFromFit",
false);
239 psd2.
add<
bool>(
"UseInvalidHits",
true);
240 psd2.
add<
bool>(
"RescaleError",
false);
243 psd1.
add<
bool>(
"EnableRPCMeasurement",
true);
245 psd1.
add<
bool>(
"EnableDTMeasurement",
true);
247 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorAny");
248 psd1.
add<
bool>(
"EnableGEMMeasurement",
false);
250 psd1.
add<
bool>(
"EnableME0Measurement",
false);
252 psd1.
add<
bool>(
"EnableCSCMeasurement",
true);
255 psd0.
add<
bool>(
"DoSeedRefit",
false);
258 desc.
add<
bool>(
"DoSeedRefit",
false);
261 psd0.
add<
std::string>(
"Smoother",
"hltESPKFTrajectorySmootherForMuonTrackLoader");
262 psd0.
add<
bool>(
"DoSmoothing",
false);
266 psd1.
add<
double>(
"MaxChi2", 1000000.0);
267 psd1.
add<std::vector<double>>(
"BeamSpotPosition",
273 psd1.
add<
std::string>(
"Propagator",
"hltESPFastSteppingHelixPropagatorOpposite");
274 psd1.
add<std::vector<double>>(
"BeamSpotPositionErrors",
282 psd0.
add<
bool>(
"VertexConstraint",
true);
283 psd0.
add<
std::string>(
"TTRHBuilder",
"hltESPTTRHBWithTrackAngle");
287 descriptions.
add(
"L2MuonProducer", desc);
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