20 _isSecondary(conf.getParameter<bool>(
"gsfsAreSecondary")),
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() ) {
64 auto sc_elem = std::find_if(elems.begin(),SCs_end,myEqual);
65 if( sc_elem != SCs_end ) {
74 SCs_end = elems.insert(SCs_end,ElementType(scbe));
81 SCs_end_position = std::distance(elems.begin(),SCs_end);
83 const std::vector<reco::PFTrajectoryPoint>& PfGsfPoint
84 = gsftrack->trajectoryPoints();
86 bool PassTracker =
false;
88 unsigned int IndexPout = 0;
89 for(
auto itPfGsfPoint = PfGsfPoint.begin();
90 itPfGsfPoint!= PfGsfPoint.end();++itPfGsfPoint) {
91 if (itPfGsfPoint->isValid()){
92 int layGsfP = itPfGsfPoint->layer();
93 if (layGsfP == -1) PassTracker =
true;
94 if (PassTracker && layGsfP > 0 && GetPout ==
false) {
109 elems.emplace_back(temp);
111 for(
const auto& brem : gsfref->PFRecBrem() ) {
112 const unsigned TrajP = brem.indTrajPoint();
114 const double DP = brem.DeltaP();
115 const double sDP = brem.SigmaDeltaP();
120 SCs_end = elems.begin() + SCs_end_position;
122 elems.shrink_to_fit();
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setFromGsfElectron(bool val)
set provenance
void importToBlock(const edm::Event &, ElementList &) const override
GSFTrackImporter(const edm::ParameterSet &conf, edm::ConsumesCollector &sumes)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool isNonnull() const
Checks for non-null.
std::vector< GsfPFRecTrack > GsfPFRecTrackCollection
collection of GsfPFRecTrack objects
virtual void setTrackType(TrackType trType, bool value)
the trackType
Container::value_type value_type
#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)