43 #include <unordered_map>
69 std::array<std::vector<ReferenceCountingPointer<BoundDisk> >, 1>
plusSurface_,
79 trackQuality_((iConfig.existsAs<
std::
string>(
"trackQuality"))
80 ?
reco::TrackBase::qualityByName(iConfig.getParameter<
std::
string>(
"trackQuality"))
82 DPtovPtCut_(iConfig.getParameter<
std::
vector<double> >(
"DPtOverPtCuts_byTrackAlgo")),
83 NHitCut_(iConfig.getParameter<
std::
vector<unsigned> >(
"NHitCuts_byTrackAlgo")),
84 useIterTracking_(iConfig.getParameter<
bool>(
"useIterativeTracking")) {
85 LogDebug(
"HGCalTrackCollectionProducer")
86 <<
" HGCalTrackCollectionProducer::HGCalTrackCollectionProducer " << std::endl;
91 produces<reco::PFRecTrackCollection>(
"TracksInHGCal");
92 produces<reco::PFRecTrackCollection>(
"TracksNotInHGCal");
98 constexpr
float m_pion = 0.1396;
115 std::map<float, float> zrhoCoord;
116 std::map<float, float> innerRadiusCoord;
118 const auto& firstLayerIt = theTrForms.back();
135 const auto&
tracks = *trackHandle;
137 auto outputInHGCal = std::make_unique<reco::PFRecTrackCollection>();
138 auto outputNotInHGCal = std::make_unique<reco::PFRecTrackCollection>();
140 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
144 LogDebug(
"HGCalTrackCollectionProducer") <<
"HGCalTrackCollectionProducer Track number " <<
i
145 <<
" has a goodPtResolution result of " << isGood << std::endl;
153 for (
auto det = detbegin; det != detend; ++det) {
154 LogDebug(
"HGCalTrackCollectionProducer") <<
"at HGC detector: " <<
std::distance(detbegin, det) << std::endl;
155 unsigned layer_count = 1;
156 for (
const auto& layer : *det) {
157 LogDebug(
"HGCalTrackCollectionProducer") <<
" at DET layer: " << layer_count++ << std::endl;
159 if (piStateAtSurface.
isValid()) {
160 LogDebug(
"HGCalTrackCollectionProducer") <<
"Extrapolation is valid!" << std::endl;
164 LogDebug(
"HGCalTrackCollectionProducer")
165 <<
"(x,y,z,r)=(" <<
pt.x() <<
", " <<
pt.y() <<
", " <<
pt.z() <<
", "
166 <<
sqrt(
pt.x() *
pt.x() +
pt.y() *
pt.y()) <<
")" << std::endl;
168 LogDebug(
"HGCalTrackCollectionProducer") <<
" ETA IN BARREL REGION: " <<
track->trackRef()->eta()
169 <<
" (PT: " <<
track->trackRef()->pt() <<
")" << std::endl;
172 LogDebug(
"HGCalTrackCollectionProducer")
173 <<
" but r=" <<
pt.perp() <<
" < diskInnerRadius=" <<
diskInnerRadius_ <<
" so skipping "
177 LogDebug(
"HGCalTrackCollectionProducer")
178 <<
" but r=" <<
pt.perp() <<
" > diskOuterRadius=" <<
diskOuterRadius_ <<
" so skipping " << std::endl;
181 LogDebug(
"HGCalTrackCollectionProducer") <<
"Extrapolation is NOT valid!" << std::endl;
186 LogDebug(
"HGCalTrackCollectionProducer") <<
" Track going to outputInHGCal pt eta " <<
track->trackRef()->pt()
187 <<
" " <<
track->trackRef()->eta() << std::endl;
188 outputInHGCal->push_back(*
track);
190 outputNotInHGCal->push_back(*
track);
195 evt.
put(
std::move(outputNotInHGCal),
"TracksNotInHGCal");