Skip to content

Commit

Permalink
removing Pv from MINIAOSIM, the PVs are actually not stored
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto-sanchez authored and perrozzi committed Jul 19, 2017
1 parent c735270 commit aeab001
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions PhysicsTools/PatAlgos/plugins/PATPackedGenParticleProducer.cc
Expand Up @@ -49,7 +49,6 @@ namespace pat {
const edm::EDGetTokenT<reco::GenParticleCollection> GenOrigs_;
const edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > Asso_;
const edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > AssoOriginal_;
const edm::EDGetTokenT<reco::VertexCollection> PVs_;
const double maxRapidity_;
};
}
Expand All @@ -59,7 +58,6 @@ pat::PATPackedGenParticleProducer::PATPackedGenParticleProducer(const edm::Param
GenOrigs_(consumes<reco::GenParticleCollection>(iConfig.getParameter<edm::InputTag>("inputOriginal"))),
Asso_(consumes<edm::Association<reco::GenParticleCollection> >(iConfig.getParameter<edm::InputTag>("map"))),
AssoOriginal_(consumes<edm::Association<reco::GenParticleCollection> >(iConfig.getParameter<edm::InputTag>("inputCollection"))),
PVs_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("inputVertices"))),
maxRapidity_(iConfig.getParameter<double>("maxRapidity"))
{
produces< std::vector<pat::PackedGenParticle> > ();
Expand All @@ -85,16 +83,6 @@ void pat::PATPackedGenParticleProducer::produce(edm::StreamID, edm::Event& iEven
iEvent.getByToken( GenOrigs_, genOrigs);
std::vector<int> mapping(genOrigs->size(), -1);


edm::Handle<reco::VertexCollection> PVs;
iEvent.getByToken( PVs_, PVs );
reco::VertexRef PV(PVs.id());
math::XYZPoint PVpos;
if (!PVs->empty()) {
PV = reco::VertexRef(PVs, 0);
PVpos = PV->position();
}

//invert the value map from Orig2New to New2Orig
std::map< edm::Ref<reco::GenParticleCollection> , edm::Ref<reco::GenParticleCollection> > reverseMap;
for(unsigned int ic=0, nc = genOrigs->size(); ic < nc; ++ic)
Expand Down
Expand Up @@ -3,6 +3,5 @@
inputCollection = cms.InputTag("genParticles"),
map = cms.InputTag("genParticles"),
inputOriginal = cms.InputTag("genParticles"),
inputVertices = cms.InputTag("offlineSlimmedPrimaryVertices"),
maxRapidity = cms.double(6)
)

0 comments on commit aeab001

Please sign in to comment.