15 produces<std::vector<PileupSummaryInfo> >();
29 std::auto_ptr<std::vector<PileupSummaryInfo> >
output(
new std::vector<PileupSummaryInfo> );
31 evt.getByToken(src_,input);
33 for(
const auto& psu : *input ) {
34 const int bunchCrossing = psu.getBunchCrossing();
35 const int bunchSpacing = psu.getBunchSpacing();
36 const int num_PU_vertices = psu.getPU_NumInteractions();
37 const float TrueNumInteractions = psu.getTrueNumInteractions();
39 std::vector<float> zpositions;
40 std::vector<float> sumpT_lowpT;
41 std::vector<float> sumpT_highpT;
42 std::vector<int> ntrks_lowpT;
43 std::vector<int> ntrks_highpT;
45 std::vector<float> pT_hats;
47 const bool keep_details =
std::find(keepDetailedInfoFor_.begin(),
48 keepDetailedInfoFor_.end(),
49 bunchCrossing) != keepDetailedInfoFor_.end();
52 zpositions = psu.getPU_zpositions();
53 sumpT_lowpT = psu.getPU_sumpT_lowpT();
54 sumpT_highpT = psu.getPU_sumpT_highpT();
55 ntrks_lowpT = psu.getPU_ntrks_lowpT();
56 ntrks_highpT = psu.getPU_ntrks_highpT();
57 eventInfo = psu.getPU_EventID();
58 pT_hats = psu.getPU_pT_hats();
61 output->emplace_back(num_PU_vertices,
63 sumpT_lowpT, sumpT_highpT,
64 ntrks_lowpT, ntrks_highpT,
#define DEFINE_FWK_MODULE(type)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static std::string const input
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const overridefinal
PileupSummaryInfoSlimmer(const edm::ParameterSet &conf)
const std::vector< int > keepDetailedInfoFor_
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > src_