|
|
Go to the documentation of this file.
29 #include "Math/SVector.h"
30 #include "Math/SMatrix.h"
33 #include "LayerNumberConverter.h"
52 using SVector3 = ROOT::Math::SVector<float, 3>;
53 using SMatrixSym33 = ROOT::Math::SMatrix<float, 3, 3, ROOT::Math::MatRepSym<float, 3>>;
54 using SMatrixSym66 = ROOT::Math::SMatrix<float, 6, 6, ROOT::Math::MatRepSym<float, 6>>;
66 ttrhBuilderToken_{esConsumes<TransientTrackingRecHitBuilder, TransientRecHitRecord>(
68 ttopoToken_{esConsumes<TrackerTopology, TrackerTopologyRcd>()},
69 mkFitGeomToken_{esConsumes<MkFitGeometry, TrackerRecoGeometryRecord>()},
70 mfToken_{esConsumes<MagneticField, IdealMagneticFieldRecord>()},
71 putToken_{produces<MkFitSeedWrapper>()} {}
99 auto isPlusSide = [&ttopo](
const DetId& detid) {
105 auto const& hitRange =
seed.recHits();
106 const auto lastRecHit = ttrhBuilder.
build(&*(hitRange.end() - 1));
109 const auto& gpos = stateGlobal.
position();
110 const auto& gmom = stateGlobal.momentum();
112 SVector3 mom(gmom.x(), gmom.y(), gmom.z());
114 const auto& cov = tsos.curvilinearError().matrix();
116 for (
int i = 0;
i < 5; ++
i) {
117 for (
int j =
i;
j < 5; ++
j) {
122 mkfit::TrackState
state(tsos.charge(),
pos, mom,
err);
123 state.convertFromGlbCurvilinearToCCS();
124 ret.emplace_back(
state, 0, seed_index, 0,
nullptr);
125 LogTrace(
"MkFitSeedConverter") <<
"Inserted seed with index " << seed_index;
128 for (
auto const&
recHit : hitRange) {
130 throw cms::Exception(
"Assert") <<
"Encountered a seed with a hit which is not trackerHitRTTI::isFromDet()";
132 const auto& clusterRef = static_cast<const BaseTrackerRecHit&>(
recHit).firstClusterRef();
133 const auto detId =
recHit.geographicalId();
135 detId.subdetId(), ttopo.
layer(detId),
false, ttopo.
isStereo(detId), isPlusSide(detId));
136 LogTrace(
"MkFitSeedConverter") <<
" addin hit detid " << detId.rawId() <<
" index " << clusterRef.index()
138 ret.back().addHitIdx(clusterRef.index(), ilay, 0);
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > ttrhBuilderToken_
ret
prodAgent to be discontinued
unsigned int side(const DetId &id) const
GlobalPoint position() const
const edm::EDPutTokenT< MkFitSeedWrapper > putToken_
mkfit::TrackVec convertSeeds(const edm::View< TrajectorySeed > &seeds, const TrackerTopology &ttopo, const TransientTrackingRecHitBuilder &ttrhBuilder, const MagneticField &mf, const MkFitGeometry &mkFitGeom) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
unsigned int layer(const DetId &id) const
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
const edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken_
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > mkFitGeomToken_
ROOT::Math::SMatrix< float, 3, 3, ROOT::Math::MatRepSym< float, 3 > > SMatrixSym33
ROOT::Math::SVector< float, 3 > SVector3
ROOT::Math::SMatrix< float, 6, 6, ROOT::Math::MatRepSym< float, 6 > > SMatrixSym66
#define DEFINE_FWK_MODULE(type)
bool isStereo(const DetId &id) const
mkfit::LayerNumberConverter const & layerNumberConverter() const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
std::vector< Track > TrackVec
bool isFromDet(TrackingRecHit const &hit)
bool getData(T &iHolder) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
MkFitSeedConverter(edm::ParameterSet const &iConfig)
~MkFitSeedConverter() override=default
T getParameter(std::string const &) const
const GlobalTrajectoryParameters & globalParameters() const
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)