Skip to content

Commit

Permalink
code-format
Browse files Browse the repository at this point in the history
  • Loading branch information
mseidel42 committed Apr 3, 2024
1 parent ba22046 commit 0d18220
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
3 changes: 1 addition & 2 deletions GeneratorInterface/RivetInterface/interface/RivetAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ namespace Rivet {
prompt_photons.acceptMuonDecays(true);
prompt_photons.acceptTauDecays(true);

LeptonFinder prompt_dressed_leptons(
prompt_leptons, prompt_photons, _lepConeSize, lepton_cut);
LeptonFinder prompt_dressed_leptons(prompt_leptons, prompt_photons, _lepConeSize, lepton_cut);
LeptonFinder dressed_leptons(charged_leptons, photons, _lepConeSize, lepton_cut);
declare(_usePromptFinalStates ? prompt_dressed_leptons : dressed_leptons, "DressedLeptons");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ void GenParticles2HepMCConverter::beginRun(edm::Run const& iRun, edm::EventSetup
xsec_ = make_shared<HepMC3::GenCrossSection>();
if (genRunInfoHandle.isValid()) {
xsec_->set_cross_section(genRunInfoHandle->internalXSec().value(), genRunInfoHandle->internalXSec().error());
}
else {
} else {
// dummy cross section
xsec_->set_cross_section(1., 0.);
}
Expand All @@ -92,7 +91,8 @@ void GenParticles2HepMCConverter::produce(edm::Event& event, const edm::EventSet

HepMC3::GenEvent* hepmc_event = new HepMC3::GenEvent();
hepmc_event->set_event_number(event.id().event());
hepmc_event->add_attribute("signal_process_id", std::make_shared<HepMC3::IntAttribute>(genEventInfoHandle->signalProcessID()));
hepmc_event->add_attribute("signal_process_id",
std::make_shared<HepMC3::IntAttribute>(genEventInfoHandle->signalProcessID()));
hepmc_event->add_attribute("event_scale", std::make_shared<HepMC3::DoubleAttribute>(genEventInfoHandle->qScale()));
hepmc_event->add_attribute("alphaQCD", std::make_shared<HepMC3::DoubleAttribute>(genEventInfoHandle->alphaQCD()));
hepmc_event->add_attribute("alphaQED", std::make_shared<HepMC3::DoubleAttribute>(genEventInfoHandle->alphaQED()));
Expand Down Expand Up @@ -123,7 +123,8 @@ void GenParticles2HepMCConverter::produce(edm::Event& event, const edm::EventSet
const reco::Candidate *parton1 = nullptr, *parton2 = nullptr;
for (unsigned int i = 0, n = genParticlesHandle->size(); i < n; ++i) {
const reco::Candidate* p = &genParticlesHandle->at(i);
HepMC3::GenParticlePtr hepmc_particle = std::make_shared<HepMC3::GenParticle>(FourVector(p->p4()), p->pdgId(), p->status());
HepMC3::GenParticlePtr hepmc_particle =
std::make_shared<HepMC3::GenParticle>(FourVector(p->p4()), p->pdgId(), p->status());

// Assign particle's generated mass from the standard particle data table
double particleMass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,13 @@ void MergedGenParticleProducer::produce(edm::Event& event, const edm::EventSetup
for (unsigned m = 0; m < old_cand.numberOfMothers(); ++m) {
dummy_mother.addMother(reco::GenParticleRef(ref, pruned_idx_map.at(old_cand.mother(m))));
unsigned int midx = pruned_idx_map.at(old_cand.mother(m));
if (midx < idx) { // update existing mother to point to dummy
if (midx < idx) { // update existing mother to point to dummy
reco::GenParticle& mother = cands->at(midx);
mother.addDaughter(reco::GenParticleRef(ref, idx));
}
else {
edm::LogWarning("MergedGenParticleProducer") << "Cannot assign to dummy photon with index " << idx << " as daughter to unprocessed particle with index " << idx << "\n";
} else {
edm::LogWarning("MergedGenParticleProducer")
<< "Cannot assign to dummy photon with index " << idx
<< " as daughter to unprocessed particle with index " << idx << "\n";
}
}
} else {
Expand Down
33 changes: 17 additions & 16 deletions GeneratorInterface/RivetInterface/src/HiggsTemplateCrossSections.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ namespace Rivet {

ConstGenVertexPtr HSvtx = nullptr;
int Nhiggs = 0;
for (const ConstGenParticlePtr& ptcl : HepMCUtils::particles(event.genEvent())) {
for (const ConstGenParticlePtr &ptcl : HepMCUtils::particles(event.genEvent())) {
// a) Reject all non-Higgs particles
if (!PID::isHiggs(ptcl->pdg_id()))
continue;
Expand Down Expand Up @@ -1073,21 +1073,22 @@ namespace Rivet {
printClassificationSummary();
double sf = m_sumw > 0 ? 1.0 / m_sumw : 1.0;
scale({hist_stage0,
hist_stage1_pTjet25,
hist_stage1_pTjet30,
hist_stage1_2_pTjet25,
hist_stage1_2_pTjet30,
hist_stage1_2_fine_pTjet25,
hist_stage1_2_fine_pTjet30,
hist_Njets25,
hist_Njets30,
hist_pT_Higgs,
hist_y_Higgs,
hist_pT_V,
hist_pT_jet1,
hist_deltay_jj,
hist_dijet_mass,
hist_pT_Hjj}, sf);
hist_stage1_pTjet25,
hist_stage1_pTjet30,
hist_stage1_2_pTjet25,
hist_stage1_2_pTjet30,
hist_stage1_2_fine_pTjet25,
hist_stage1_2_fine_pTjet30,
hist_Njets25,
hist_Njets30,
hist_pT_Higgs,
hist_y_Higgs,
hist_pT_V,
hist_pT_jet1,
hist_deltay_jj,
hist_dijet_mass,
hist_pT_Hjj},
sf);
}

/*
Expand Down

0 comments on commit 0d18220

Please sign in to comment.