1 #include "HepMC/GenEvent.h" 2 #include "HepMC/GenParticle.h" 8 #include "HepMC/GenEvent.h" 9 #include "HepMC/HeavyIon.h" 15 using namespace HepMC;
28 for (
int ibin = 0; ibin < 3; ibin++) {
29 dnchdeta[ibin] = ibooker.
book1D(Form(
"dnchdeta%d", ibin),
";#eta;dN^{ch}/d#eta", 100, -6.0, 6.0);
31 dnchdpt[ibin] = ibooker.
book1D(Form(
"dnchdpt%d", ibin),
";p_{T};dN^{ch}/dp_{T}", 200, 0.0, 100.0);
33 b[ibin] = ibooker.
book1D(Form(
"b%d", ibin),
";b[fm];events", 100, 0.0, 20.0);
34 dnchdphi[ibin] = ibooker.
book1D(Form(
"dnchdphi%d", ibin),
";#phi;dN^{ch}/d#phi", 100, -3.2, 3.2);
37 rp = ibooker.
book1D(
"phi0",
";#phi_{RP};events", 100, -3.2, 3.2);
46 const HepMC::HeavyIon*
hi = evt->heavy_ion();
52 double ip = hi->impact_parameter();
53 phi0 = hi->event_plane_angle();
62 else if (ip < 7.145 && ip > 5.045)
64 else if (ip < 15.202 && ip > 14.283)
74 HepMC::GenEvent::particle_const_iterator
begin = evt->particles_begin();
75 HepMC::GenEvent::particle_const_iterator
end = evt->particles_end();
76 for (HepMC::GenEvent::particle_const_iterator it = begin; it !=
end; ++it) {
78 if ((*it)->status() != 1)
82 int pdg_id = (*it)->pdg_id();
84 int charge =
static_cast<int>(part->charge());
88 float eta = (*it)->momentum().eta();
89 float phi = (*it)->momentum().phi();
90 float pt = (*it)->momentum().perp();
92 dnchdeta[cbin]->Fill(eta);
93 dnchdpt[cbin]->Fill(pt);
96 double p = phi - phi0;
101 dnchdphi[cbin]->Fill(p);
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setCurrentFolder(std::string const &fullpath)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
bool getData(T &iHolder) const
#define DEFINE_FWK_MODULE(type)
HiBasicGenTest(const edm::ParameterSet &)
HepPDT::ParticleData ParticleData
const HepMC::GenEvent * GetEvent() const
~HiBasicGenTest() override