33 elems.reserve(elems.size() + gsftracks->size());
38 auto bgsf = gsftracks->cbegin();
39 auto egsf = gsftracks->cend();
40 for (
auto gsftrack = bgsf; gsftrack != egsf; ++gsftrack) {
43 const auto& gsfextraref = basegsfref->extra();
45 if (gsfextraref.isAvailable() && gsfextraref->seedRef().isAvailable()) {
47 if (seedref.
isAvailable() && seedref->isEcalDriven()) {
55 auto sc_elem = std::find_if(elems.begin(), SCs_end, myEqual);
56 if (sc_elem != SCs_end) {
63 SCs_end = elems.emplace(SCs_end, scbe);
70 size_t SCs_end_position =
std::distance(elems.begin(), SCs_end);
72 const std::vector<reco::PFTrajectoryPoint>& PfGsfPoint = gsftrack->trajectoryPoints();
73 unsigned int c_gsf = 0;
74 bool PassTracker =
false;
75 unsigned int IndexPout = 0;
76 for (
const auto& pfGsfPoint : PfGsfPoint) {
77 if (pfGsfPoint.isValid()) {
78 int layGsfP = pfGsfPoint.layer();
81 else if (PassTracker && layGsfP > 0) {
82 IndexPout = c_gsf - 1;
94 elems.emplace_back(temp);
96 for (
const auto& brem : gsfref->PFRecBrem()) {
97 const unsigned TrajP = brem.indTrajPoint();
99 const double DP = brem.DeltaP();
100 const double sDP = brem.SigmaDeltaP();
105 SCs_end = elems.begin() + SCs_end_position;
107 elems.shrink_to_fit();
bool isNonnull() const
Checks for non-null.
void setFromGsfElectron(bool val)
set provenance
GSFTrackImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
std::vector< GsfPFRecTrack > GsfPFRecTrackCollection
collection of GsfPFRecTrack objects
void importToBlock(const edm::Event &, ElementList &) const override
void setTrackType(TrackType trType, bool value) override
the trackType
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
edm::EDGetTokenT< reco::GsfPFRecTrackCollection > _src
const bool _superClustersArePF
void setFromPFSuperCluster(bool val)