15 produces<std::vector<PileupSummaryInfo>>();
27 auto output = std::make_unique<std::vector<PileupSummaryInfo>>();
29 evt.getByToken(src_, input);
31 for (
const auto& psu : *input) {
32 const int bunchCrossing = psu.getBunchCrossing();
33 const int bunchSpacing = psu.getBunchSpacing();
34 const int num_PU_vertices = psu.getPU_NumInteractions();
35 const float TrueNumInteractions = psu.getTrueNumInteractions();
37 std::vector<float> zpositions;
38 std::vector<float> times;
39 std::vector<float> sumpT_lowpT;
40 std::vector<float> sumpT_highpT;
41 std::vector<int> ntrks_lowpT;
42 std::vector<int> ntrks_highpT;
43 std::vector<edm::EventID> eventInfo;
44 std::vector<float> pT_hats;
46 const bool keep_details =
std::find(keepDetailedInfoFor_.begin(), keepDetailedInfoFor_.end(), bunchCrossing) !=
47 keepDetailedInfoFor_.end();
50 zpositions = psu.getPU_zpositions();
51 times = psu.getPU_times();
52 sumpT_lowpT = psu.getPU_sumpT_lowpT();
53 sumpT_highpT = psu.getPU_sumpT_highpT();
54 ntrks_lowpT = psu.getPU_ntrks_lowpT();
55 ntrks_highpT = psu.getPU_ntrks_highpT();
56 eventInfo = psu.getPU_EventID();
57 pT_hats = psu.getPU_pT_hats();
60 output->emplace_back(num_PU_vertices,
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const final
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)
PileupSummaryInfoSlimmer(const edm::ParameterSet &conf)
const std::vector< int > keepDetailedInfoFor_
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > src_