38 edm::LogVerbatim(
"CosmicParametersDefinerForTP") <<
"\t in CosmicParametersDefinerForTP::momentum";
40 <<
"\t \t Original TP state: pt = " << tpr->pt() <<
", pz = " << tpr->pz();
43 LogError(
"TrackAssociation") <<
"Invalid handle!";
46 std::pair<TrackingParticleRef, TrackPSimHitRef> clusterTPpairWithDummyTP(
52 clusterTPpairWithDummyTP,
54 for (
auto ip =
range.first; ip !=
range.second; ++ip) {
59 <<
"***WARNING in CosmicParametersDefinerForTP::momentum: no GeomDet "
61 << it->detUnitId() <<
". Skipping it."
72 if (it->processType() != 0)
87 <<
"\t \t FINAL State at InnerMost Hit: pt = " << finalGV.
perp() <<
", pz = " << finalGV.
z();
93 tscblBuilder(ftsAtProduction,
bs);
95 if (tsAtClosestApproach.
isValid()) {
99 edm::LogVerbatim(
"CosmicParametersDefinerForTP") <<
"*** WARNING in CosmicParametersDefinerForTP::momentum: "
100 "tsAtClosestApproach is not valid."
105 <<
"\t \t FINAL State extrap. at PCA: pt = " <<
sqrt(momentum.x() * momentum.x() + momentum.y() * momentum.y())
106 <<
", pz = " << momentum.z() <<
"\n";
112 <<
"*** WARNING in CosmicParametersDefinerForTP::momentum: NOT found the "
116 <<
"*** FINAL Reference MOMENTUM TP (px,py,pz) = " << momentum.x() << momentum.y() << momentum.z() <<
"\n";
125 using namespace reco;
137 edm::LogVerbatim(
"CosmicParametersDefinerForTP") <<
"\t in CosmicParametersDefinerForTP::vertex";
139 <<
"\t \t Original TP state: radius = "
140 <<
sqrt(tpr->vertex().x() * tpr->vertex().x() + tpr->vertex().y() * tpr->vertex().y())
141 <<
", z = " << tpr->vertex().z();
144 LogError(
"TrackAssociation") <<
"Invalid handle!";
147 std::pair<TrackingParticleRef, TrackPSimHitRef> clusterTPpairWithDummyTP(
153 clusterTPpairWithDummyTP,
155 for (
auto ip =
range.first; ip !=
range.second; ++ip) {
160 <<
"***WARNING in CosmicParametersDefinerForTP::vertex: no GeomDet "
162 << it->detUnitId() <<
". Skipping it."
173 if (it->processType() != 0)
184 <<
"\t \t FINAL State at InnerMost Hit: radius = " << finalGP.
perp() <<
", z = " << finalGP.
z();
190 tscblBuilder(ftsAtProduction,
bs);
192 if (tsAtClosestApproach.
isValid()) {
199 edm::LogVerbatim(
"CosmicParametersDefinerForTP") <<
"*** WARNING in CosmicParametersDefinerForTP::vertex: "
200 "tsAtClosestApproach is not valid."
204 <<
"\t \t FINAL State extrap. at PCA: radius = " <<
sqrt(vertex.x() * vertex.x() + vertex.y() * vertex.y())
205 <<
", z = " << vertex.z() <<
"\n";
211 <<
"*** WARNING in CosmicParametersDefinerForTP::vertex: NOT found the "
215 <<
"*** FINAL Reference VERTEX TP V(x,y,z) = " << vertex.x() << vertex.y() << vertex.z() <<
"\n";
Log< level::Info, true > LogVerbatim
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
TrackingParticle::Vector momentum(const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrackingParticleRef &tpr) const override
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
Log< level::Error, false > LogError
const Plane & surface() const
The nominal surface of the GeomDet.
const uint16_t range(const Frame &aFrame)
math::XYZPointD Point
point in the space
bool getData(T &iHolder) const
CosmicParametersDefinerForTP(edm::ConsumesCollector iC)
bool get(ProductID const &oid, Handle< PROD > &result) const
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > geometryToken_
GlobalVector momentum() const
FTS const & trackStateAtPCA() const
GlobalPoint position() const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > mfToken_
~CosmicParametersDefinerForTP() override
TrackingParticle::Point vertex(const edm::Event &iEvent, const edm::EventSetup &iSetup, const TrackingParticleRef &tpr) const override
edm::Ref< edm::PSimHitContainer > TrackPSimHitRef
math::XYZVectorD Vector
point in the space
edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssoc