47 #define init_param(type, varname) varname(ps.getParameter<type>(#varname)) 64 void analyzePileup(
const std::vector<PileupSummaryInfo>& pInfo);
167 const unsigned nBx = info.size();
169 ntupleData.push_back(static_cast<float>(nBx));
171 double sumpt_Lo = 0.0, sumpt_Hi = 0.0;
177 double sumpt_Lo_by_Bx[3] =
181 sumpt_Hi_by_Bx[3] = {
186 std::cout <<
"\n**** Pileup info begin" << std::endl;
188 bool isCrazy =
false;
189 for (
unsigned ibx = 0; ibx < nBx; ++ibx) {
196 const double losum = std::accumulate(lopt.begin(), lopt.end(), 0.0);
197 const double hisum = std::accumulate(hipt.begin(), hipt.end(), 0.0);
208 const unsigned idx = bx < 0 ? 0
U : (bx == 0 ? 1
U : 2
U);
209 npu_by_Bx[
idx] += npu;
210 sumpt_Lo_by_Bx[
idx] += losum;
211 sumpt_Hi_by_Bx[
idx] += hisum;
214 std::cout <<
"ibx " << ibx <<
" bx " << bx <<
" npu " << npu <<
" losum " << losum <<
" hisum " << hisum
219 std::cout <<
"**** Pileup info end\n" << std::endl;
225 for (
unsigned ibx = 0; ibx < 3; ++ibx) {
227 sumpt_Lo_by_Bx[ibx] = 0.0;
228 sumpt_Hi_by_Bx[ibx] = 0.0;
239 for (
unsigned ibx = 0; ibx < 3; ++ibx) {
251 vars +=
":nbx:npu:sumptLowCut:sumptHiCut";
253 vars +=
":npu_negbx:sumptLowCut_negbx:sumptHiCut_negbx";
254 vars +=
":npu_0bx:sumptLowCut_0bx:sumptHiCut_0bx";
255 vars +=
":npu_posbx:sumptLowCut_posbx:sumptHiCut_posbx";
258 vars +=
":estimate:pileup:uncert:uncertCode";
260 vars +=
":fjrho:fjsigma";
262 vars +=
":gridEtDensity:gridEtDensityMixed";
297 for (
unsigned ibx = 0; ibx < 3; ++ibx) {
310 TH2D*
copy =
new TH2D(*input);
312 std::ostringstream os;
313 os << copy->GetName() <<
'_' <<
counter <<
'_' <<
totalNpu <<
'_' << runnumber <<
'_' << eventnumber;
315 copy->SetNameTitle(newname.c_str(), newname.c_str());
351 std::ostringstream os;
352 os <<
"FFTJetGrid_" <<
counter <<
'_' <<
totalNpu <<
'_' << runnumber <<
'_' << eventnumber;
359 h->GetXaxis()->SetTitle(
"Eta");
360 h->GetYaxis()->SetTitle(
"Phi");
361 h->GetZaxis()->SetTitle(
"Transverse Energy");
380 if (!pvCollection->empty())
381 for (reco::VertexCollection::const_iterator
pv = pvCollection->begin();
pv != pvCollection->end(); ++
pv) {
382 const double ndof =
pv->ndof();
389 assert(
ntupleData.size() ==
static_cast<unsigned>(
nt->GetNvar()));
EventNumber_t event() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
#define init_param(type, varname)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
int uncertaintyCode() const
edm::EDGetTokenT< reco::VertexCollection > srcPVsToken
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileupToken
unsigned long long EventNumber_t
FFTJetPileupAnalyzer()=delete
T * make(const Args &...args) const
make new ROOT object
unsigned nEtaBins() const
const int getBunchCrossing() const
void analyzePileup(const std::vector< PileupSummaryInfo > &pInfo)
static std::string const input
FFTJetPileupAnalyzer & operator=(const FFTJetPileupAnalyzer &)=delete
const double * data() const
edm::EDGetTokenT< TH2D > histoToken
edm::InputTag fastJetRhoLabel
#define DEFINE_FWK_MODULE(type)
const std::vector< float > & getPU_sumpT_highpT() const
TDirectory * getBareDirectory(const std::string &subdir="") const
edm::EDGetTokenT< reco::FFTJetPileupSummary > summaryToken
unsigned nPhiBins() const
float pileupRhoUncertainty() const
edm::EDGetTokenT< double > fastJetSigmaToken
edm::InputTag summaryLabel
edm::InputTag fastJetSigmaLabel
const int getPU_NumInteractions() const
char data[epos_bytes_allocation]
float uncalibratedQuantile() const
edm::EDGetTokenT< double > fastJetRhoToken
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > gridToken
std::vector< float > ntupleData
edm::EDGetTokenT< std::pair< double, double > > etSumToken
~FFTJetPileupAnalyzer() override
void analyze(const edm::Event &, const edm::EventSetup &) override
const std::vector< float > & getPU_sumpT_lowpT() const
double phiBin0Edge() const