Definition at line 130 of file HGCalTrackCollectionProducer.cc.
References funct::abs(), bField_, DEFINE_FWK_MODULE, diskInnerRadius_, diskOuterRadius_, HLT_2018_cff::distance, DPtovPtCut_, newFWLiteAna::found, edm::Event::getByToken(), TrajectoryStateOnSurface::globalPosition(), PFTrackAlgoTools::goodPtResolution(), mps_fire::i, TrajectoryStateOnSurface::isValid(), LogDebug, mat_prop_, minusSurface_, eostools::move(), NHitCut_, trajectoryStateTransform::outerStateOnSurface(), PV3DBase< T, PVType, FrameType >::perp(), plusSurface_, edm::ESHandle< T >::product(), DiDispStaMuonMonitor_cfi::pt, edm::Event::put(), mathSSE::sqrt(), src_, tkGeom_, HLT_2018_cff::track, trackQuality_, PDWG_EXOHSCP_cff::tracks, useIterTracking_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
133 const auto&
tracks = *trackHandle;
135 auto outputInHGCal = std::make_unique<reco::PFRecTrackCollection>();
136 auto outputNotInHGCal = std::make_unique<reco::PFRecTrackCollection>();
138 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
142 LogDebug(
"HGCalTrackCollectionProducer") <<
"HGCalTrackCollectionProducer Track number " <<
i 143 <<
" has a goodPtResolution result of " << isGood << std::endl;
151 for (
auto det = detbegin; det != detend; ++det) {
152 LogDebug(
"HGCalTrackCollectionProducer") <<
"at HGC detector: " <<
std::distance(detbegin, det) << std::endl;
153 unsigned layer_count = 1;
154 for (
const auto& layer : *det) {
155 LogDebug(
"HGCalTrackCollectionProducer") <<
" at DET layer: " << layer_count++ << std::endl;
157 if (piStateAtSurface.
isValid()) {
158 LogDebug(
"HGCalTrackCollectionProducer") <<
"Extrapolation is valid!" << std::endl;
162 LogDebug(
"HGCalTrackCollectionProducer")
163 <<
"(x,y,z,r)=(" << pt.
x() <<
", " << pt.
y() <<
", " << pt.
z() <<
", " 164 <<
sqrt(pt.
x() * pt.
x() + pt.
y() * pt.
y()) <<
")" << std::endl;
166 LogDebug(
"HGCalTrackCollectionProducer") <<
" ETA IN BARREL REGION: " <<
track->trackRef()->eta()
167 <<
" (PT: " <<
track->trackRef()->pt() <<
")" << std::endl;
170 LogDebug(
"HGCalTrackCollectionProducer")
175 LogDebug(
"HGCalTrackCollectionProducer")
176 <<
" but r=" << pt.
perp() <<
" > diskOuterRadius=" <<
diskOuterRadius_ <<
" so skipping " << std::endl;
179 LogDebug(
"HGCalTrackCollectionProducer") <<
"Extrapolation is NOT valid!" << std::endl;
184 LogDebug(
"HGCalTrackCollectionProducer") <<
" Track going to outputInHGCal pt eta " <<
track->trackRef()->pt()
185 <<
" " <<
track->trackRef()->eta() << std::endl;
186 outputInHGCal->push_back(*
track);
188 outputNotInHGCal->push_back(*
track);
193 evt.
put(
std::move(outputNotInHGCal),
"TracksNotInHGCal");
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
GlobalPoint globalPosition() const
std::array< std::vector< ReferenceCountingPointer< BoundDisk > >, 1 > minusSurface_
const std::vector< unsigned > NHitCut_
edm::EDGetTokenT< edm::View< reco::PFRecTrack > > src_
std::unique_ptr< PropagatorWithMaterial > mat_prop_
Abs< T >::type abs(const T &t)
const bool useIterTracking_
edm::ESHandle< MagneticField > bField_
const reco::TrackBase::TrackQuality trackQuality_
const std::vector< double > DPtovPtCut_
std::array< std::vector< ReferenceCountingPointer< BoundDisk > >, 1 > plusSurface_
edm::ESHandle< TrackerGeometry > tkGeom_
T const * product() const