17 typedef std::multimap<unsigned, std::vector<unsigned> >
BlockMap;
25 produces<reco::PFRecTrackCollection>();
26 produces<reco::PFConversionCollection>();
43 auto pfConversionColl = std::make_unique<reco::PFConversionCollection>();
44 auto pfRecTrackColl = std::make_unique<reco::PFRecTrackCollection>();
62 pv = &*vertex->begin();
67 e(0, 0) = 0.0015 * 0.0015;
68 e(1, 1) = 0.0015 * 0.0015;
75 multimap<unsigned int, unsigned int> trackmap;
76 std::vector<unsigned int> conv_coll(0);
79 for(
unsigned int icoll1=0; icoll1 < convColl.size(); icoll1++)
83 bool greater_prob=
false;
84 std::vector<edm::RefToBase<reco::Track> > tracksRefColl1 = convColl[icoll1].tracks();
85 for(
unsigned it1 = 0; it1 < tracksRefColl1.size(); it1++)
87 reco::TrackRef trackRef1 = (tracksRefColl1[it1]).castTo<reco::TrackRef>();
89 for(
unsigned int icoll2=0; icoll2 < convColl.size(); icoll2++)
91 if(icoll1==icoll2)
continue;
93 std::vector<edm::RefToBase<reco::Track> > tracksRefColl2 = convColl[icoll2].tracks();
94 for(
unsigned it2 = 0; it2 < tracksRefColl2.size(); it2++)
96 reco::TrackRef trackRef2 = (tracksRefColl2[it2]).castTo<reco::TrackRef>();
114 float size1=trackRef1->found();
115 float size2=trackRef2->found();
117 if(size1>size2)frac=(double)shared/size2;
118 else frac=(double)shared/size1;
125 {greater_prob=
true;
break;}
128 if(greater_prob)
break;
130 if(greater_prob)
break;
132 if(!greater_prob)conv_coll.push_back(icoll1);
136 for(
unsigned iColl=0; iColl<conv_coll.size(); iColl++)
138 unsigned int collindex=conv_coll[iColl];
140 std::vector<reco::PFRecTrackRef> pfRecTkcoll;
142 std::vector<edm::RefToBase<reco::Track> > tracksRefColl = convColl[collindex].tracks();
144 for(
unsigned it = 0; it < tracksRefColl.size(); it++)
146 reco::TrackRef trackRef = (tracksRefColl[it]).castTo<reco::TrackRef>();
166 pfRecTrack.setSTIP(stip);
168 pfRecTrackColl->push_back(pfRecTrack);
T getParameter(std::string const &) const
reconstructed track used as an input to particle flow
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::ConversionCollection > pfConversionContainer_
~PFConversionProducer() override
Destructor.
void produce(edm::Event &, const edm::EventSetup &) override
Produce the PFRecTrack collection.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void endRun(const edm::Run &, const edm::EventSetup &) override
std::multimap< unsigned, std::vector< unsigned > > BlockMap
reco::TransientTrack build(const reco::Track *p) const
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
math::Error< dimension >::type Error
covariance error matrix (3x3)
key_type key() const
Accessor for product key.
PFConversionProducer(const edm::ParameterSet &)
Constructor.
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
U second(std::pair< T, U > const &p)
math::XYZPoint Point
point in the space
float ChiSquaredProbability(double chiSquared, double nrDOF)
edm::EDGetTokenT< reco::VertexCollection > vtx_h
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
RefProd< PROD > getRefBeforePut()
bool isValid() const
is this point valid ?
XYZVectorD XYZVector
spatial vector with cartesian internal representation
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection