20 typedef std::multimap<unsigned, std::vector<unsigned> >
BlockMap;
28 produces<reco::PFRecTrackCollection>();
29 produces<reco::PFConversionCollection>();
46 auto_ptr< reco::PFConversionCollection >
48 auto_ptr< reco::PFRecTrackCollection >
69 pv = &*vertex->begin();
74 e(0, 0) = 0.0015 * 0.0015;
75 e(1, 1) = 0.0015 * 0.0015;
82 multimap<unsigned int, unsigned int> trackmap;
83 std::vector<unsigned int> conv_coll(0);
86 for(
unsigned int icoll1=0; icoll1 < convColl.size(); icoll1++)
90 bool greater_prob=
false;
91 std::vector<edm::RefToBase<reco::Track> > tracksRefColl1 = convColl[icoll1].tracks();
92 for(
unsigned it1 = 0; it1 < tracksRefColl1.size(); it1++)
94 reco::TrackRef trackRef1 = (tracksRefColl1[it1]).castTo<reco::TrackRef>();
96 for(
unsigned int icoll2=0; icoll2 < convColl.size(); icoll2++)
98 if(icoll1==icoll2)
continue;
100 std::vector<edm::RefToBase<reco::Track> > tracksRefColl2 = convColl[icoll2].tracks();
101 for(
unsigned it2 = 0; it2 < tracksRefColl2.size(); it2++)
103 reco::TrackRef trackRef2 = (tracksRefColl2[it2]).castTo<reco::TrackRef>();
121 float size1=trackRef1->found();
122 float size2=trackRef2->found();
124 if(size1>size2)frac=(double)shared/size2;
125 else frac=(double)shared/size1;
128 like1=
ChiSquaredProbability(convColl[icoll1].conversionVertex().chi2(), convColl[icoll1].conversionVertex().ndof());
129 like2=
ChiSquaredProbability(convColl[icoll2].conversionVertex().chi2(), convColl[icoll2].conversionVertex().ndof());
132 {greater_prob=
true;
break;}
135 if(greater_prob)
break;
137 if(greater_prob)
break;
139 if(!greater_prob)conv_coll.push_back(icoll1);
143 for(
unsigned iColl=0; iColl<conv_coll.size(); iColl++)
145 unsigned int collindex=conv_coll[iColl];
147 std::vector<reco::PFRecTrackRef> pfRecTkcoll;
149 std::vector<edm::RefToBase<reco::Track> > tracksRefColl = convColl[collindex].tracks();
151 for(
unsigned it = 0; it < tracksRefColl.size(); it++)
153 reco::TrackRef trackRef = (tracksRefColl[it]).castTo<reco::TrackRef>();
173 pfRecTrack.setSTIP(stip);
175 pfRecTrackColl->push_back(pfRecTrack);
182 iEvent.
put(pfRecTrackColl);
183 iEvent.
put(pfConversionColl);
edm::InputTag pfTrackContainer_
T getParameter(std::string const &) const
reconstructed track used as an input to particle flow
virtual void produce(edm::Event &, const edm::EventSetup &) override
Produce the PFRecTrack collection.
virtual 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)
std::vector< PFConversion > PFConversionCollection
collection of PFConversion objects
PFConversionProducer(const edm::ParameterSet &)
Constructor.
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
U second(std::pair< T, U > const &p)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
float ChiSquaredProbability(double chiSquared, double nrDOF)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RefProd< PROD > getRefBeforePut()
bool isValid() const
is this point valid ?
XYZVectorD XYZVector
spatial vector with cartesian internal representation
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
key_type key() const
Accessor for product key.
T const * product() const
edm::InputTag pfConversionContainer_
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
~PFConversionProducer()
Destructor.
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects