30 #include "Math/SVector.h" 31 #include "Math/SMatrix.h" 53 using SVector3 = ROOT::Math::SVector<float, 3>;
54 using SMatrixSym33 = ROOT::Math::SMatrix<float, 3, 3, ROOT::Math::MatRepSym<float, 3>>;
55 using SMatrixSym66 = ROOT::Math::SMatrix<float, 6, 6, ROOT::Math::MatRepSym<float, 6>>;
67 ttrhBuilderToken_{esConsumes<TransientTrackingRecHitBuilder, TransientRecHitRecord>(
69 ttopoToken_{esConsumes<TrackerTopology, TrackerTopologyRcd>()},
70 mkFitGeomToken_{esConsumes<MkFitGeometry, TrackerRecoGeometryRecord>()},
71 mfToken_{esConsumes<MagneticField, IdealMagneticFieldRecord>()},
72 putToken_{produces<MkFitSeedWrapper>()} {}
100 auto isPlusSide = [&ttopo](
const DetId& detid) {
106 auto const& hitRange =
seed.recHits();
107 const auto lastRecHit = ttrhBuilder.
build(&*(hitRange.end() - 1));
110 const auto& gpos = stateGlobal.
position();
111 const auto& gmom = stateGlobal.momentum();
113 SVector3 mom(gmom.x(), gmom.y(), gmom.z());
115 const auto& cov = tsos.curvilinearError().matrix();
117 for (
int i = 0;
i < 5; ++
i) {
118 for (
int j =
i;
j < 5; ++
j) {
124 state.convertFromGlbCurvilinearToCCS();
125 ret.emplace_back(
state, 0, seed_index, 0,
nullptr);
126 LogTrace(
"MkFitSeedConverter") <<
"Inserted seed with index " << seed_index;
129 for (
auto const&
recHit : hitRange) {
131 throw cms::Exception(
"Assert") <<
"Encountered a seed with a hit which is not trackerHitRTTI::isFromDet()";
134 if (!baseTrkRecHit.isMatched()) {
136 const auto detId =
recHit.geographicalId();
138 detId.subdetId(), ttopo.
layer(detId),
false, ttopo.
isStereo(detId), isPlusSide(detId));
139 LogTrace(
"MkFitSeedConverter") <<
" adding hit detid " << detId.rawId() <<
" index " << clusterRef.index()
141 ret.back().addHitIdx(clusterRef.index(), ilay, 0);
144 const OmniClusterRef*
const clRefs[2] = {&matched2D.monoClusterRef(), &matched2D.stereoClusterRef()};
145 const DetId detIds[2] = {matched2D.monoId(), matched2D.stereoId()};
146 for (
int ii = 0;
ii < 2; ++
ii) {
147 const auto& detId = detIds[
ii];
149 detId.subdetId(), ttopo.
layer(detId),
false, ttopo.
isStereo(detId), isPlusSide(detId));
150 LogTrace(
"MkFitSeedConverter") <<
" adding matched hit detid " << detId.rawId() <<
" index " 151 << clRefs[
ii]->
index() <<
" ilay " << ilay;
152 ret.back().addHitIdx(clRefs[
ii]->
index(), ilay, 0);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
bool isFromDet(TrackingRecHit const &hit)
GlobalPoint position() const
const edm::ESGetToken< MkFitGeometry, TrackerRecoGeometryRecord > mkFitGeomToken_
const edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken_
ret
prodAgent to be discontinued
#define DEFINE_FWK_MODULE(type)
const GlobalTrajectoryParameters & globalParameters() const
ROOT::Math::SMatrix< float, 3, 3, ROOT::Math::MatRepSym< float, 3 > > SMatrixSym33
unsigned int index() const
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > ttopoToken_
mkfit::TrackVec convertSeeds(const edm::View< TrajectorySeed > &seeds, const TrackerTopology &ttopo, const TransientTrackingRecHitBuilder &ttrhBuilder, const MagneticField &mf, const MkFitGeometry &mkFitGeom) const
bool isStereo(const DetId &id) const
unsigned int side(const DetId &id) const
unsigned int layer(const DetId &id) const
MkFitSeedConverter(edm::ParameterSet const &iConfig)
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
const edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > ttrhBuilderToken_
bool getData(T &iHolder) const
const edm::EDPutTokenT< MkFitSeedWrapper > putToken_
mkfit::LayerNumberConverter const & layerNumberConverter() const
std::vector< Track > TrackVec
ROOT::Math::SMatrix< float, 6, 6, ROOT::Math::MatRepSym< float, 6 > > SMatrixSym66
virtual OmniClusterRef const & firstClusterRef() const =0
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
ROOT::Math::SVector< float, 3 > SVector3
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
int convertLayerNumber(int det, int lay, bool useMatched, int isStereo, bool posZ) const
~MkFitSeedConverter() override=default