50 descriptions.
add(
"pfConversions",
desc);
53 typedef std::multimap<unsigned, std::vector<unsigned> >
BlockMap;
58 : pfTransformer_(nullptr),
61 produces<reco::PFRecTrackCollection>();
62 produces<reco::PFConversionCollection>();
73 auto pfConversionColl = std::make_unique<reco::PFConversionCollection>();
74 auto pfRecTrackColl = std::make_unique<reco::PFRecTrackCollection>();
93 e(0, 0) = 0.0015 * 0.0015;
94 e(1, 1) = 0.0015 * 0.0015;
101 multimap<unsigned int, unsigned int> trackmap;
102 std::vector<unsigned int> conv_coll(0);
105 for (
unsigned int icoll1 = 0; icoll1 < convColl.size(); icoll1++) {
110 bool greater_prob =
false;
111 std::vector<edm::RefToBase<reco::Track> > tracksRefColl1 = convColl[icoll1].tracks();
112 for (
unsigned it1 = 0; it1 < tracksRefColl1.size(); it1++) {
113 reco::TrackRef trackRef1 = (tracksRefColl1[it1]).castTo<reco::TrackRef>();
115 for (
unsigned int icoll2 = 0; icoll2 < convColl.size(); icoll2++) {
116 if (icoll1 == icoll2)
121 std::vector<edm::RefToBase<reco::Track> > tracksRefColl2 = convColl[icoll2].tracks();
122 for (
unsigned it2 = 0; it2 < tracksRefColl2.size(); it2++) {
123 reco::TrackRef trackRef2 = (tracksRefColl2[it2]).castTo<reco::TrackRef>();
128 for (
auto const& hit1 : trackRef1->recHits())
129 if (hit1->isValid()) {
131 for (
auto const& hit2 : trackRef2->recHits()) {
138 float size1 = trackRef1->found();
139 float size2 = trackRef2->found();
142 frac = (double)shared / size2;
144 frac = (double)shared / size1;
147 convColl[icoll1].conversionVertex().
ndof());
149 convColl[icoll2].conversionVertex().
ndof());
164 conv_coll.push_back(icoll1);
168 for (
unsigned iColl = 0; iColl < conv_coll.size(); iColl++) {
169 unsigned int collindex = conv_coll[iColl];
171 std::vector<reco::PFRecTrackRef> pfRecTkcoll;
173 std::vector<edm::RefToBase<reco::Track> > tracksRefColl = convColl[collindex].tracks();
175 for (
unsigned it = 0;
it < tracksRefColl.size();
it++) {
192 pfRecTrack.setSTIP(stip);
194 pfRecTrackColl->push_back(pfRecTrack);
reconstructed track used as an input to particle flow
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::ConversionCollection > pfConversionContainer_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
~PFConversionProducer() override
Destructor.
void produce(edm::Event &, const edm::EventSetup &) override
Produce the PFRecTrack collection.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void endRun(const edm::Run &, const edm::EventSetup &) override
std::multimap< unsigned, std::vector< unsigned > > BlockMap
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
math::Error< dimension >::type Error
covariance error matrix (3x3)
PFConversionProducer(const edm::ParameterSet &)
Constructor.
key_type key() const
Accessor for product key.
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
U second(std::pair< T, U > const &p)
bool isValid() const
is this point valid ?
math::XYZPoint Point
point in the space
float ChiSquaredProbability(double chiSquared, double nrDOF)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::VertexCollection > vtx_h
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackToken_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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