47 #define init_param(type, varname) varname(ps.getParameter<type>(#varname)) 63 void analyzePileup(
const std::vector<PileupSummaryInfo>& pInfo);
168 const unsigned nBx =
info.size();
170 ntupleData.push_back(static_cast<float>(nBx));
172 double sumpt_Lo = 0.0, sumpt_Hi = 0.0;
178 double sumpt_Lo_by_Bx[3] =
182 sumpt_Hi_by_Bx[3] = {
187 std::cout <<
"\n**** Pileup info begin" << std::endl;
189 bool isCrazy =
false;
190 for (
unsigned ibx = 0; ibx < nBx; ++ibx) {
197 const double losum = std::accumulate(lopt.begin(), lopt.end(), 0.0);
198 const double hisum = std::accumulate(hipt.begin(), hipt.end(), 0.0);
209 const unsigned idx =
bx < 0 ? 0
U : (
bx == 0 ? 1
U : 2
U);
210 npu_by_Bx[
idx] += npu;
211 sumpt_Lo_by_Bx[
idx] += losum;
212 sumpt_Hi_by_Bx[
idx] += hisum;
215 std::cout <<
"ibx " << ibx <<
" bx " <<
bx <<
" npu " << npu <<
" losum " << losum <<
" hisum " << hisum
220 std::cout <<
"**** Pileup info end\n" << std::endl;
226 for (
unsigned ibx = 0; ibx < 3; ++ibx) {
228 sumpt_Lo_by_Bx[ibx] = 0.0;
229 sumpt_Hi_by_Bx[ibx] = 0.0;
240 for (
unsigned ibx = 0; ibx < 3; ++ibx) {
252 vars +=
":nbx:npu:sumptLowCut:sumptHiCut";
254 vars +=
":npu_negbx:sumptLowCut_negbx:sumptHiCut_negbx";
255 vars +=
":npu_0bx:sumptLowCut_0bx:sumptHiCut_0bx";
256 vars +=
":npu_posbx:sumptLowCut_posbx:sumptHiCut_posbx";
259 vars +=
":estimate:pileup:uncert:uncertCode";
261 vars +=
":fjrho:fjsigma";
263 vars +=
":gridEtDensity:gridEtDensityMixed";
298 for (
unsigned ibx = 0; ibx < 3; ++ibx) {
313 std::ostringstream
os;
316 copy->SetNameTitle(newname.c_str(), newname.c_str());
318 copy->SetDirectory(
fs->getBareDirectory());
352 std::ostringstream
os;
360 h->GetXaxis()->SetTitle(
"Eta");
361 h->GetYaxis()->SetTitle(
"Phi");
362 h->GetZaxis()->SetTitle(
"Transverse Energy");
383 const double ndof =
pv->ndof();
static const std::string kSharedResource
#define init_param(type, varname)
edm::EDGetTokenT< reco::VertexCollection > srcPVsToken
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupToken
unsigned long long EventNumber_t
FFTJetPileupAnalyzer()=delete
void analyzePileup(const std::vector< PileupSummaryInfo > &pInfo)
static std::string const input
FFTJetPileupAnalyzer & operator=(const FFTJetPileupAnalyzer &)=delete
edm::EDGetTokenT< TH2D > histoToken
const std::vector< float > & getPU_sumpT_lowpT() const
edm::InputTag fastJetRhoLabel
edm::EDGetTokenT< reco::FFTJetPileupSummary > summaryToken
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< double > fastJetSigmaToken
const int getBunchCrossing() const
edm::InputTag summaryLabel
edm::InputTag fastJetSigmaLabel
char data[epos_bytes_allocation]
edm::EDGetTokenT< double > fastJetRhoToken
const std::vector< float > & getPU_sumpT_highpT() const
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > gridToken
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::vector< float > ntupleData
edm::EDGetTokenT< std::pair< double, double > > etSumToken
~FFTJetPileupAnalyzer() override
void analyze(const edm::Event &, const edm::EventSetup &) override
const int getPU_NumInteractions() const