39 elems.reserve(elems.size() + gsftracks->size());
41 auto SCs_end = std::partition(elems.begin(),elems.end(),
46 auto bgsf = gsftracks->cbegin();
47 auto egsf = gsftracks->cend();
48 for(
auto gsftrack = bgsf; gsftrack != egsf; ++gsftrack ) {
51 const auto& gsfextraref = basegsfref->extra();
53 if( gsfextraref.isAvailable() && gsfextraref->seedRef().isAvailable()) {
56 if( seedref.
isAvailable() && seedref->isEcalDriven() ) {
63 auto sc_elem = std::find_if(elems.begin(),SCs_end,myEqual);
64 if( sc_elem != SCs_end ) {
73 SCs_end = elems.emplace(SCs_end,scbe);
80 size_t SCs_end_position =
std::distance(elems.begin(),SCs_end);
82 const std::vector<reco::PFTrajectoryPoint>& PfGsfPoint = gsftrack->trajectoryPoints();
84 bool PassTracker =
false;
85 unsigned int IndexPout = 0;
86 for(
const auto& pfGsfPoint : PfGsfPoint) {
87 if (pfGsfPoint.isValid()){
88 int layGsfP = pfGsfPoint.layer();
89 if (layGsfP == -1) PassTracker =
true;
90 else if (PassTracker && layGsfP > 0) {
104 elems.emplace_back(temp);
106 for(
const auto& brem : gsfref->PFRecBrem() ) {
107 const unsigned TrajP = brem.indTrajPoint();
109 const double DP = brem.DeltaP();
110 const double sDP = brem.SigmaDeltaP();
115 SCs_end = elems.begin() + SCs_end_position;
117 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)