|
| MkFitOutputConverter (edm::ParameterSet const &iConfig) |
|
| ~MkFitOutputConverter () override=default |
|
| EDProducer ()=default |
|
| EDProducer (const EDProducer &)=delete |
|
bool | hasAbilityToProduceInBeginLumis () const final |
|
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
|
bool | hasAbilityToProduceInBeginRuns () const final |
|
bool | hasAbilityToProduceInEndLumis () const final |
|
bool | hasAbilityToProduceInEndProcessBlocks () const final |
|
bool | hasAbilityToProduceInEndRuns () const final |
|
EDProducer & | operator= (const EDProducer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
| EDProducerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDProducerBase () override |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
|
| ProducerBase () |
|
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
|
std::vector< bool > const & | recordProvenanceList () const |
|
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
|
std::function< void(BranchDescription const &)> | registrationCallback () const |
| used by the fwk to register list of products More...
|
|
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
|
TypeLabelList const & | typeLabelList () const |
| used by the fwk to register the list of products of this module More...
|
|
| ~ProducerBase () noexcept(false) override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
void | selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
std::pair< TrajectoryStateOnSurface, const GeomDet * > | backwardFit (const FreeTrajectoryState &fts, const edm::OwnVector< TrackingRecHit > &hits, const Propagator &propagatorAlong, const Propagator &propagatorOpposite, const TkClonerImpl &hitCloner, bool lastHitWasInvalid, bool lastHitWasChanged) const |
|
TrackCandidateCollection | convertCandidates (const MkFitOutputWrapper &mkFitOutput, const mkfit::EventOfHits &eventOfHits, const MkFitClusterIndexToHit &pixelClusterIndexToHit, const MkFitClusterIndexToHit &stripClusterIndexToHit, const edm::View< TrajectorySeed > &seeds, const MagneticField &mf, const Propagator &propagatorAlong, const Propagator &propagatorOpposite, const TkClonerImpl &hitCloner, const std::vector< const DetLayer * > &detLayers, const mkfit::TrackVec &mkFitSeeds) const |
|
std::pair< TrajectoryStateOnSurface, const GeomDet * > | convertInnermostState (const FreeTrajectoryState &fts, const edm::OwnVector< TrackingRecHit > &hits, const Propagator &propagatorAlong, const Propagator &propagatorOpposite) const |
|
void | produce (edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override |
|
|
typedef EDProducerBase | ModuleType |
|
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > > |
|
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
|
typedef ProductLabels | Labels |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces () |
| declare what type of product will make and with which optional label More...
|
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces () |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces () |
|
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<BranchType B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<Transition B> |
BranchAliasSetter | produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true) |
|
template<typename ProductType , Transition B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<class ProductType > |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
template<typename ProductType , BranchType B> |
BranchAliasSetterT< ProductType > | produces (std::string instanceName) |
|
ProducesCollector | producesCollector () |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Definition at line 58 of file MkFitOutputConverter.cc.
Definition at line 323 of file MkFitOutputConverter.cc.
334 for (
int i =
hits.size() - 1;
i >= 0; --
i) {
345 const auto& lastHitSurface = firstHits.front()->det()->surface();
349 if (lastHitWasInvalid || lastHitWasChanged) {
350 LogTrace(
"MkFitOutputConverter") <<
"Propagating first opposite, then along, because lastHitWasInvalid? "
351 << lastHitWasInvalid <<
" or lastHitWasChanged? " << lastHitWasChanged;
354 const auto lastHitSubdet = firstHits.front()->geographicalId().subdetId();
355 const auto& surfacePos = lastHitSurface.position();
356 const auto& lastHitPos = firstHits.front()->globalPosition();
357 bool doSwitch =
false;
359 doSwitch = (surfacePos.perp2() < lastHitPos.perp2());
361 doSwitch = (surfacePos.z() < lastHitPos.z());
365 <<
"Propagating first opposite, then along, because surface is inner than the hit; surface perp2 "
366 << surfacePos.perp() <<
" hit " << lastHitPos.perp2() <<
" surface z " << surfacePos.z() <<
" hit "
374 if (!tsosDouble.first.isValid()) {
375 LogDebug(
"MkFitOutputConverter") <<
"Propagating to startingState failed, trying in another direction next";
378 auto& startingState = tsosDouble.first;
380 if (!startingState.isValid()) {
382 <<
"startingState is not valid, FTS was\n"
383 << fts <<
" last hit surface surface:"
384 <<
"\n position " << lastHitSurface.
position() <<
"\n phiSpan " << lastHitSurface.phiSpan().first <<
","
385 << lastHitSurface.phiSpan().first <<
"\n rSpan " << lastHitSurface.rSpan().first <<
","
386 << lastHitSurface.rSpan().first <<
"\n zSpan " << lastHitSurface.zSpan().first <<
","
387 << lastHitSurface.zSpan().first;
388 return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
392 startingState.rescaleError(100.);
398 &
propagatorAlong, &aKFUpdator, &aChi2MeasurementEstimator, firstHits.size(),
nullptr, &hitCloner);
409 LogDebug(
"MkFitOutputConverter") <<
"using a backward fit of :" << firstHits.size() <<
" hits, starting from:\n"
410 << startingState <<
" to get the estimate of the initial state of the track.";
413 edm::LogWarning(
"MkFitOutputConverter") <<
"FitTester: first hits fit failed";
414 return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
427 LogDebug(
"MkFitOutputConverter") <<
"the initial state is found to be:\n:" << firstState
428 <<
"\n it's field pointer is: " << firstState.magneticField()
429 <<
"\n the pointer from the state of the back fit was: "
432 return std::make_pair(firstState, firstMeas.
recHit()->det());
References hfClusterShapes_cfi::hits, mps_fire::i, PixelPluginsPhase0_cfi::isBarrel, Trajectory::isValid(), Trajectory::lastMeasurement(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), LogDebug, LogTrace, TrajectoryStateOnSurface::magneticField(), oppositeToMomentum, FreeTrajectoryState::position(), Propagator::propagateWithPath(), HLT_FULL_cff::propagatorAlong, HLT_FULL_cff::propagatorOpposite, TrajectoryMeasurement::recHit(), TrajectoryStateOnSurface::rescaleError(), TrajectoryFitter::standard, TrajectoryStateOnSurface::surface(), std::swap(), and TrajectoryMeasurement::updatedState().
Referenced by convertCandidates().
TrackCandidateCollection MkFitOutputConverter::convertCandidates |
( |
const MkFitOutputWrapper & |
mkFitOutput, |
|
|
const mkfit::EventOfHits & |
eventOfHits, |
|
|
const MkFitClusterIndexToHit & |
pixelClusterIndexToHit, |
|
|
const MkFitClusterIndexToHit & |
stripClusterIndexToHit, |
|
|
const edm::View< TrajectorySeed > & |
seeds, |
|
|
const MagneticField & |
mf, |
|
|
const Propagator & |
propagatorAlong, |
|
|
const Propagator & |
propagatorOpposite, |
|
|
const TkClonerImpl & |
hitCloner, |
|
|
const std::vector< const DetLayer * > & |
detLayers, |
|
|
const mkfit::TrackVec & |
mkFitSeeds |
|
) |
| const |
|
private |
Definition at line 174 of file MkFitOutputConverter.cc.
194 LogTrace(
"MkFitOutputConverter") <<
"Candidate " << candIndex <<
" pT " <<
cand.pT() <<
" eta " <<
cand.momEta()
195 <<
" phi " <<
cand.momPhi() <<
" chi2 " <<
cand.chi2();
203 bool lastHitInvalid =
false;
205 const auto& hitOnTrack =
cand.getHitOnTrack(
i);
206 LogTrace(
"MkFitOutputConverter") <<
" hit on layer " << hitOnTrack.layer <<
" index " << hitOnTrack.index;
207 if (hitOnTrack.index < 0) {
218 const auto* detLayer = detLayers.at(hitOnTrack.layer);
219 if (detLayer ==
nullptr) {
220 throw cms::Exception(
"LogicError") <<
"DetLayer for layer index " << hitOnTrack.layer <<
" is null!";
225 lastHitInvalid =
true;
228 auto const&
hits =
isPixel ? pixelClusterIndexToHit.
hits() : stripClusterIndexToHit.
hits();
230 auto const& thit = static_cast<BaseTrackerRecHit const&>(*
hits[hitOnTrack.index]);
231 if (thit.firstClusterRef().isPixel() || thit.detUnit()->type().isEndcap()) {
232 recHits.push_back(
hits[hitOnTrack.index]->clone());
234 recHits.push_back(std::make_unique<SiStripRecHit1D>(
235 thit.localPosition(),
238 thit.firstClusterRef()));
240 LogTrace(
"MkFitOutputConverter") <<
" pos " <<
recHits.back().globalPosition().x() <<
" "
241 <<
recHits.back().globalPosition().y() <<
" "
242 <<
recHits.back().globalPosition().z() <<
" mag2 "
243 <<
recHits.back().globalPosition().mag2() <<
" detid "
244 <<
recHits.back().geographicalId().rawId() <<
" cluster " << hitOnTrack.index;
245 lastHitInvalid =
false;
249 const auto lastHitId =
recHits.back().geographicalId();
253 recHits.sort([](
const auto&
a,
const auto&
b) {
254 const auto asub =
a.geographicalId().subdetId();
255 const auto bsub =
b.geographicalId().subdetId();
261 const auto& apos =
a.globalPosition();
262 const auto& bpos =
b.globalPosition();
265 return apos.perp2() < bpos.perp2();
270 const bool lastHitChanged = (
recHits.back().geographicalId() != lastHitId);
273 const auto seedIndex =
cand.label();
274 LogTrace(
"MkFitOutputConverter") <<
" from seed " << seedIndex <<
" seed hits";
278 state.convertFromCCSToGlbCurvilinear();
279 const auto& param =
state.parameters;
282 for (
int i = 0;
i < 5; ++
i) {
283 for (
int j =
i;
j < 5; ++
j) {
292 if (!fts.curvilinearError().posDef()) {
293 edm::LogWarning(
"MkFitOutputConverter") <<
"Curvilinear error not pos-def\n"
294 << fts.curvilinearError().matrix() <<
"\ncandidate ignored";
302 if (!tsosDet.first.isValid()) {
304 <<
"Backward fit of candidate " << candIndex <<
" failed, ignoring the candidate";
315 seeds.refAt(seedIndex),
References a, funct::abs(), b, backwardFit(), HLT_FULL_cff::candidates, convertInnermostState(), submitPVResolutionJobs::err, InitialStepPreSplitting_cff::eventOfHits, Exception, hfClusterShapes_cfi::hits, MkFitClusterIndexToHit::hits(), mps_fire::i, PixelPluginsPhase0_cfi::isBarrel, fastTrackerRecHitType::isPixel(), dqmiolumiharvest::j, LogTrace, SiStripPI::max, nhits, convertSQLitetoXML_cfg::output, trajectoryStateTransform::persistentState(), MkFitOutputWrapper::propagatedToFirstLayer(), HLT_FULL_cff::propagatorAlong, HLT_FULL_cff::propagatorOpposite, FastTrackerRecHitMaskProducer_cfi::recHits, DetachedQuadStep_cff::seeds, MkFitOutputWrapper::tracks(), and UNINITIALIZED.
Referenced by produce().