15 produces<std::vector<PileupSummaryInfo> >();
29 auto output = std::make_unique<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>
times;
41 std::vector<float> sumpT_lowpT;
42 std::vector<float> sumpT_highpT;
43 std::vector<int> ntrks_lowpT;
44 std::vector<int> ntrks_highpT;
46 std::vector<float> pT_hats;
48 const bool keep_details =
std::find(keepDetailedInfoFor_.begin(),
49 keepDetailedInfoFor_.end(),
50 bunchCrossing) != keepDetailedInfoFor_.end();
53 zpositions = psu.getPU_zpositions();
54 times = psu.getPU_times();
55 sumpT_lowpT = psu.getPU_sumpT_lowpT();
56 sumpT_highpT = psu.getPU_sumpT_highpT();
57 ntrks_lowpT = psu.getPU_ntrks_lowpT();
58 ntrks_highpT = psu.getPU_ntrks_highpT();
59 eventInfo = psu.getPU_EventID();
60 pT_hats = psu.getPU_pT_hats();
63 output->emplace_back(num_PU_vertices,
66 sumpT_lowpT, sumpT_highpT,
67 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_