41 elems.reserve(elems.size() + gsftracks->size());
43 auto SCs_end = std::partition(elems.begin(),elems.end(),
44 [](
const ElementType&
a){
47 size_t SCs_end_position =
std::distance(elems.begin(),SCs_end);
49 auto bgsf = gsftracks->cbegin();
50 auto egsf = gsftracks->cend();
51 for(
auto gsftrack = bgsf; gsftrack != egsf; ++gsftrack ) {
54 const auto& gsfextraref = basegsfref->extra();
56 if( gsfextraref.isAvailable() && gsfextraref->seedRef().isAvailable()) {
59 if( seedref.
isAvailable() && seedref->isEcalDriven() ) {
66 auto sc_elem = std::find_if(elems.begin(),SCs_end,myEqual);
67 if( sc_elem != SCs_end ) {
76 SCs_end = elems.insert(SCs_end,ElementType(scbe));
85 const std::vector<reco::PFTrajectoryPoint>& PfGsfPoint
86 = gsftrack->trajectoryPoints();
88 bool PassTracker =
false;
90 unsigned int IndexPout = 0;
91 for(
auto itPfGsfPoint = PfGsfPoint.begin();
92 itPfGsfPoint!= PfGsfPoint.end();++itPfGsfPoint) {
93 if (itPfGsfPoint->isValid()){
94 int layGsfP = itPfGsfPoint->layer();
95 if (layGsfP == -1) PassTracker =
true;
96 if (PassTracker && layGsfP > 0 && GetPout ==
false) {
111 elems.emplace_back(temp);
113 for(
const auto& brem : gsfref->PFRecBrem() ) {
114 const unsigned TrajP = brem.indTrajPoint();
116 const double DP = brem.DeltaP();
117 const double sDP = brem.SigmaDeltaP();
122 SCs_end = elems.begin() + SCs_end_position;
124 elems.shrink_to_fit();
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setFromGsfElectron(bool val)
set provenance
GSFTrackImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Container::value_type value_type
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)