|
|
Go to the documentation of this file.
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");
edm::EDGetTokenT< edm::View< reco::PFRecTrack > > src_
void produce(edm::Event &, const edm::EventSetup &) override
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
GlobalPoint globalPosition() const
TrackQuality
track quality
const bool useIterTracking_
const std::vector< double > DPtovPtCut_
std::array< std::string, 1 > hgc_names_
#define DEFINE_FWK_MODULE(type)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
std::array< const HGCalGeometry *, 1 > hgcGeometries_
std::unique_ptr< PropagatorWithMaterial > mat_prop_
const std::vector< unsigned > NHitCut_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr std::array< uint8_t, layerIndexSize > layer
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< HGCalParameters::hgtrform > getTrForms() const
std::array< std::vector< ReferenceCountingPointer< BoundDisk > >, 1 > minusSurface_
const MagneticField * bField_
const reco::TrackBase::TrackQuality trackQuality_
bool getData(T &iHolder) const
std::array< std::vector< ReferenceCountingPointer< BoundDisk > >, 1 > plusSurface_
T getParameter(std::string const &) const
Quality qualityByName(std::string const &name)
std::array< edm::ESGetToken< HGCalGeometry, IdealGeometryRecord >, 1 > hgcGeometryTokens_
Abs< T >::type abs(const T &t)
HGCalTrackCollectionProducer(const edm::ParameterSet &)
ParameterSet const & getParameterSet(std::string const &) const
const TrackerGeometry * tkGeom_