41 #include <unordered_map>
67 std::array<std::vector<ReferenceCountingPointer<BoundDisk> >, 1>
plusSurface_,
77 trackQuality_((iConfig.existsAs<
std::
string>(
"trackQuality"))
78 ?
reco::TrackBase::qualityByName(iConfig.getParameter<
std::
string>(
"trackQuality"))
80 DPtovPtCut_(iConfig.getParameter<
std::vector<double> >(
"DPtOverPtCuts_byTrackAlgo")),
81 NHitCut_(iConfig.getParameter<
std::vector<unsigned> >(
"NHitCuts_byTrackAlgo")),
82 useIterTracking_(iConfig.getParameter<
bool>(
"useIterativeTracking")) {
83 LogDebug(
"HGCalTrackCollectionProducer")
84 <<
" HGCalTrackCollectionProducer::HGCalTrackCollectionProducer " << std::endl;
89 produces<reco::PFRecTrackCollection>(
"TracksInHGCal");
90 produces<reco::PFRecTrackCollection>(
"TracksNotInHGCal");
96 constexpr
float m_pion = 0.1396;
113 std::map<float, float> zrhoCoord;
114 std::map<float, float> innerRadiusCoord;
116 const auto& firstLayerIt = theTrForms.back();
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")
171 <<
" but r=" <<
pt.perp() <<
" < diskInnerRadius=" <<
diskInnerRadius_ <<
" so skipping "
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");