29 auto gsftracks =
e.getHandle(
_src);
30 elems.reserve(elems.size() + gsftracks->size());
35 auto bgsf = gsftracks->cbegin();
36 auto egsf = gsftracks->cend();
37 for (
auto gsftrack = bgsf; gsftrack != egsf; ++gsftrack) {
40 const auto& gsfextraref = basegsfref->extra();
42 if (gsfextraref.isAvailable() && gsfextraref->seedRef().isAvailable()) {
44 if (seedref.
isAvailable() && seedref->isEcalDriven()) {
52 auto sc_elem = std::find_if(elems.begin(), SCs_end, myEqual);
53 if (sc_elem != SCs_end) {
60 SCs_end = elems.emplace(SCs_end, scbe);
67 size_t SCs_end_position =
std::distance(elems.begin(), SCs_end);
69 const std::vector<reco::PFTrajectoryPoint>& PfGsfPoint = gsftrack->trajectoryPoints();
70 unsigned int c_gsf = 0;
71 bool PassTracker =
false;
72 unsigned int IndexPout = 0;
73 for (
const auto& pfGsfPoint : PfGsfPoint) {
74 if (pfGsfPoint.isValid()) {
75 int layGsfP = pfGsfPoint.layer();
78 else if (PassTracker && layGsfP > 0) {
79 IndexPout = c_gsf - 1;
91 elems.emplace_back(
temp);
93 for (
const auto& brem : gsfref->PFRecBrem()) {
94 const unsigned TrajP = brem.indTrajPoint();
96 const double DP = brem.DeltaP();
97 const double sDP = brem.SigmaDeltaP();
102 SCs_end = elems.begin() + SCs_end_position;
104 elems.shrink_to_fit();
uint32_t cc[maxCellsPerHit]
bool isNonnull() const
Checks for non-null.
void setFromGsfElectron(bool val)
set provenance
void importToBlock(const edm::Event &, ElementList &) const override
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::vector< GsfPFRecTrack > GsfPFRecTrackCollection
collection of GsfPFRecTrack objects
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< std::unique_ptr< reco::PFBlockElement > > ElementList
GSFTrackImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
edm::EDGetTokenT< reco::GsfPFRecTrackCollection > _src
const bool _superClustersArePF
void setFromPFSuperCluster(bool val)