37 #include <unordered_map> 64 std::array<edm::ESGetToken<HGCalGeometry, IdealGeometryRecord>, 1>
67 std::array<std::vector<ReferenceCountingPointer<BoundDisk> >, 1>
plusSurface_,
77 trackQuality_((iConfig.existsAs<
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")),
85 LogDebug(
"HGCalTrackCollectionProducer")
86 <<
" HGCalTrackCollectionProducer::HGCalTrackCollectionProducer " << std::endl;
94 produces<reco::PFRecTrackCollection>(
"TracksInHGCal");
95 produces<reco::PFRecTrackCollection>(
"TracksNotInHGCal");
101 constexpr
float m_pion = 0.1396;
118 std::map<float, float> zrhoCoord;
119 std::map<float, float> innerRadiusCoord;
121 const auto& firstLayerIt = theTrForms.back();
138 const auto&
tracks = *trackHandle;
140 auto outputInHGCal = std::make_unique<reco::PFRecTrackCollection>();
141 auto outputNotInHGCal = std::make_unique<reco::PFRecTrackCollection>();
143 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
147 LogDebug(
"HGCalTrackCollectionProducer") <<
"HGCalTrackCollectionProducer Track number " <<
i 148 <<
" has a goodPtResolution result of " << isGood << std::endl;
156 for (
auto det = detbegin; det != detend; ++det) {
157 LogDebug(
"HGCalTrackCollectionProducer") <<
"at HGC detector: " <<
std::distance(detbegin, det) << std::endl;
158 unsigned layer_count = 1;
159 for (
const auto&
layer : *det) {
160 LogDebug(
"HGCalTrackCollectionProducer") <<
" at DET layer: " << layer_count++ << std::endl;
162 if (piStateAtSurface.
isValid()) {
163 LogDebug(
"HGCalTrackCollectionProducer") <<
"Extrapolation is valid!" << std::endl;
167 LogDebug(
"HGCalTrackCollectionProducer")
168 <<
"(x,y,z,r)=(" <<
pt.x() <<
", " <<
pt.y() <<
", " <<
pt.z() <<
", " 169 <<
sqrt(
pt.x() *
pt.x() +
pt.y() *
pt.y()) <<
")" << std::endl;
171 LogDebug(
"HGCalTrackCollectionProducer") <<
" ETA IN BARREL REGION: " <<
track->trackRef()->eta()
172 <<
" (PT: " <<
track->trackRef()->pt() <<
")" << std::endl;
175 LogDebug(
"HGCalTrackCollectionProducer")
176 <<
" but r=" <<
pt.perp() <<
" < diskInnerRadius=" <<
diskInnerRadius_ <<
" so skipping " 180 LogDebug(
"HGCalTrackCollectionProducer")
181 <<
" but r=" <<
pt.perp() <<
" > diskOuterRadius=" <<
diskOuterRadius_ <<
" so skipping " << std::endl;
184 LogDebug(
"HGCalTrackCollectionProducer") <<
"Extrapolation is NOT valid!" << std::endl;
189 LogDebug(
"HGCalTrackCollectionProducer") <<
" Track going to outputInHGCal pt eta " <<
track->trackRef()->pt()
190 <<
" " <<
track->trackRef()->eta() << std::endl;
191 outputInHGCal->push_back(*
track);
193 outputNotInHGCal->push_back(*
track);
198 evt.
put(
std::move(outputNotInHGCal),
"TracksNotInHGCal");
std::array< edm::ESGetToken< HGCalGeometry, IdealGeometryRecord >, 1 > hgcGeometryTokens_
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Quality qualityByName(std::string const &name)
TrackQuality
track quality
std::array< std::string, 1 > hgc_names_
ParameterSet const & getParameterSet(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::array< std::vector< ReferenceCountingPointer< BoundDisk > >, 1 > minusSurface_
const std::vector< unsigned > NHitCut_
edm::EDGetTokenT< edm::View< reco::PFRecTrack > > src_
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
GlobalPoint globalPosition() const
std::array< const HGCalGeometry *, 1 > hgcGeometries_
const MagneticField * bField_
std::unique_ptr< PropagatorWithMaterial > mat_prop_
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
const bool useIterTracking_
HGCalTrackCollectionProducer(const edm::ParameterSet &)
const TrackerGeometry * tkGeom_
const reco::TrackBase::TrackQuality trackQuality_
const std::vector< double > DPtovPtCut_
std::array< std::vector< ReferenceCountingPointer< BoundDisk > >, 1 > plusSurface_
std::vector< HGCalParameters::hgtrform > getTrForms() const
void produce(edm::Event &, const edm::EventSetup &) override