#include <AMPTHadronizer.h>
Public Member Functions | |
AMPTHadronizer (const edm::ParameterSet &) | |
const char * | classname () const |
bool | decay () |
bool | declareSpecialSettings (const std::vector< std::string >) |
bool | declareStableParticles (const std::vector< int >) |
void | finalizeEvent () |
bool | generatePartonsAndHadronize () |
bool | hadronize () |
bool | initializeForExternalPartons () |
bool | initializeForInternalPartons () |
bool | residualDecay () |
void | statistics () |
virtual | ~AMPTHadronizer () |
Private Member Functions | |
void | add_heavy_ion_rec (HepMC::GenEvent *evt) |
bool | ampt_init (const edm::ParameterSet &pset) |
HepMC::GenParticle * | build_ampt (int index, int barcode) |
HepMC::GenVertex * | build_ampt_vertex (int i, int id) |
bool | call_amptset (double efrm, std::string frame, std::string proj, std::string targ, int iap, int izp, int iat, int izt) |
bool | get_particles (HepMC::GenEvent *evt) |
void | rotateEvtPlane () |
Private Attributes | |
double | alpha_ |
int | amptmode_ |
double | bmax_ |
double | bmin_ |
double | cosphi0_ |
int | deuteronfactor_ |
int | deuteronmode_ |
int | deuteronxsec_ |
int | diquarkembedding_ |
double | diquarkpx_ |
double | diquarkpy_ |
double | diquarkx_ |
double | diquarky_ |
int | doInitialAndFinalRadiation_ |
double | dpcoal_ |
double | drcoal_ |
double | dt_ |
double | efrm_ |
HepMC::GenEvent * | evt |
std::string | frame_ |
int | iap_ |
int | iat_ |
int | izp_ |
int | izpc_ |
int | izt_ |
bool | ks0decay_ |
int | ktkick_ |
int | maxmiss_ |
double | minijetpt_ |
double | mu_ |
int | nsembd_ |
int | ntmax_ |
double | phi0_ |
bool | phidecay_ |
bool | popcornmode_ |
double | popcornpar_ |
std::string | proj_ |
double | psembd_ |
edm::ParameterSet | pset_ |
double | pthard_ |
bool | quenchingmode_ |
double | quenchingpar_ |
bool | rotate_ |
double | shadowingfactor_ |
bool | shadowingmode_ |
bool | shadowingmodflag_ |
double | sinphi0_ |
double | stringFragA_ |
double | stringFragB_ |
std::string | targ_ |
double | tmaxembd_ |
Definition at line 32 of file AMPTHadronizer.h.
AMPTHadronizer::AMPTHadronizer | ( | const edm::ParameterSet & | pset | ) |
Definition at line 53 of file AMPTHadronizer.cc.
References _amptRandomEngine.
: BaseHadronizer(pset), evt(0), pset_(pset), bmax_(pset.getParameter<double>("bMax")), bmin_(pset.getParameter<double>("bMin")), efrm_(pset.getParameter<double>("comEnergy")), frame_(pset.getParameter<string>("frame")), proj_(pset.getParameter<string>("proj")), targ_(pset.getParameter<string>("targ")), iap_(pset.getParameter<int>("iap")), izp_(pset.getParameter<int>("izp")), iat_(pset.getParameter<int>("iat")), izt_(pset.getParameter<int>("izt")), amptmode_(pset.getParameter<int>("amptmode")), ntmax_(pset.getParameter<int>("ntmax")), dt_(pset.getParameter<double>("dt")), stringFragA_(pset.getParameter<double>("stringFragA")), stringFragB_(pset.getParameter<double>("stringFragB")), popcornmode_(pset.getParameter<bool>("popcornmode")), popcornpar_(pset.getParameter<double>("popcornpar")), shadowingmode_(pset.getParameter<bool>("shadowingmode")), quenchingmode_(pset.getParameter<bool>("quenchingmode")), quenchingpar_(pset.getParameter<double>("quenchingpar")), pthard_(pset.getParameter<double>("pthard")), mu_(pset.getParameter<double>("mu")), izpc_(pset.getParameter<int>("izpc")), alpha_(pset.getParameter<double>("alpha")), dpcoal_(pset.getParameter<double>("dpcoal")), drcoal_(pset.getParameter<double>("drcoal")), ks0decay_(pset.getParameter<bool>("ks0decay")), phidecay_(pset.getParameter<bool>("phidecay")), deuteronmode_(pset.getParameter<int>("deuteronmode")), deuteronfactor_(pset.getParameter<int>("deuteronfactor")), deuteronxsec_(pset.getParameter<int>("deuteronxsec")), minijetpt_(pset.getParameter<double>("minijetpt")), maxmiss_(pset.getParameter<int>("maxmiss")), doInitialAndFinalRadiation_(pset.getParameter<int>("doInitialAndFinalRadiation")), ktkick_(pset.getParameter<int>("ktkick")), diquarkembedding_(pset.getParameter<int>("diquarkembedding")), diquarkpx_(pset.getParameter<double>("diquarkpx")), diquarkpy_(pset.getParameter<double>("diquarkpy")), diquarkx_(pset.getParameter<double>("diquarkx")), diquarky_(pset.getParameter<double>("diquarky")), phi0_(0.), sinphi0_(0.), cosphi0_(1.), rotate_(pset.getParameter<bool>("rotateEventPlane")) { // Default constructor edm::Service<RandomNumberGenerator> rng; _amptRandomEngine = &(rng->getEngine()); }
AMPTHadronizer::~AMPTHadronizer | ( | ) | [virtual] |
Definition at line 109 of file AMPTHadronizer.cc.
{ }
void AMPTHadronizer::add_heavy_ion_rec | ( | HepMC::GenEvent * | evt | ) | [private] |
Definition at line 114 of file AMPTHadronizer.cc.
References hmain1, hparnt, and phi0_.
Referenced by generatePartonsAndHadronize().
{ // heavy ion record in the final CMSSW Event HepMC::HeavyIon* hi = new HepMC::HeavyIon( hmain1.jatt, // Ncoll_hard/N of SubEvents hmain1.np, // Npart_proj hmain1.nt, // Npart_targ hmain1.n0+hmain1.n01+hmain1.n10+hmain1.n11, // Ncoll 0, // spectator_neutrons 0, // spectator_protons hmain1.n01, // N_Nwounded_collisions hmain1.n10, // Nwounded_N_collisions hmain1.n11, // Nwounded_Nwounded_collisions hparnt.hint1[18], // impact_parameter in [fm] phi0_, // event_plane_angle 0, // eccentricity hparnt.hint1[11] // sigma_inel_NN ); evt->set_heavy_ion(*hi); delete hi; }
bool AMPTHadronizer::ampt_init | ( | const edm::ParameterSet & | pset | ) | [private] |
Definition at line 264 of file AMPTHadronizer.cc.
References alpha_, amptmode_, anim, coal, deuteronfactor_, deuteronmode_, deuteronxsec_, diquarkembedding_, diquarkpx_, diquarkpy_, diquarkx_, diquarky_, doInitialAndFinalRadiation_, dpcoal_, drcoal_, dt_, embed, hparnt, input1, input2, izpc_, ks0decay_, ktkick_, ludat1, maxmiss_, minijetpt_, mu_, ntmax_, para2, para8, phidcy, phidecay_, popcorn, popcornmode_, popcornpar_, pthard_, quenchingmode_, quenchingpar_, resdcy, shadowingmode_, stringFragA_, and stringFragB_.
Referenced by initializeForInternalPartons().
{ anim.isoft=amptmode_; input2.ntmax=ntmax_; input1.dt=dt_; ludat1.parj[40]=stringFragA_; ludat1.parj[41]=stringFragB_; popcorn.ipop=popcornmode_; ludat1.parj[4]=popcornpar_; hparnt.ihpr2[5]=shadowingmode_; hparnt.ihpr2[3]=quenchingmode_; hparnt.hipr1[13]=quenchingpar_; hparnt.hipr1[7]=pthard_; para2.xmu=mu_; anim.izpc=izpc_; para2.alpha=alpha_; coal.dpcoal=dpcoal_; coal.drcoal=drcoal_; resdcy.iksdcy=ks0decay_; phidcy.iphidcy=phidecay_; para8.idpert=deuteronmode_; para8.npertd=deuteronfactor_; para8.idxsec=deuteronxsec_; phidcy.pttrig=minijetpt_; phidcy.maxmiss=maxmiss_; hparnt.ihpr2[1]=doInitialAndFinalRadiation_; hparnt.ihpr2[4]=ktkick_; embed.iembed=diquarkembedding_; embed.pxqembd=diquarkpx_; embed.pyqembd=diquarkpy_; embed.xembd=diquarkx_; embed.yembd=diquarky_; return true; }
HepMC::GenParticle * AMPTHadronizer::build_ampt | ( | int | index, |
int | barcode | ||
) | [private] |
Definition at line 137 of file AMPTHadronizer.cc.
References cosphi0_, ExpressReco_HICollisions_FallBack::e, configurableAnalysis::GenParticle, hbt, getHLTprescales::index, INVFLV, m, gen::p, sinphi0_, mathSSE::sqrt(), and ntuplemaker::status.
Referenced by get_particles().
{ // Build particle object corresponding to index in ampt float px0 = hbt.plast[index][0]; float py0 = hbt.plast[index][1]; float pz0 = hbt.plast[index][2]; float m = hbt.plast[index][3]; float px = px0*cosphi0_-py0*sinphi0_; float py = py0*cosphi0_+px0*sinphi0_; float pz = pz0; float e = sqrt(px*px+py*py+pz*pz+m*m); int status = 1; HepMC::GenParticle* p = new HepMC::GenParticle( HepMC::FourVector(px, py, pz, e), INVFLV(hbt.lblast[index]),// id status // status ); p->suggest_barcode(barcode); return p; }
HepMC::GenVertex * AMPTHadronizer::build_ampt_vertex | ( | int | i, |
int | id | ||
) | [private] |
Definition at line 166 of file AMPTHadronizer.cc.
Referenced by get_particles().
{ // build verteces for the ampt stored events HepMC::GenVertex* vertex = new HepMC::GenVertex(HepMC::FourVector(0,0,0,0),id); return vertex; }
bool AMPTHadronizer::call_amptset | ( | double | efrm, |
std::string | frame, | ||
std::string | proj, | ||
std::string | targ, | ||
int | iap, | ||
int | izp, | ||
int | iat, | ||
int | izt | ||
) | [private] |
Definition at line 257 of file AMPTHadronizer.cc.
References AMPTSET.
Referenced by initializeForInternalPartons().
{ // initialize hydjet AMPTSET(efrm,frame.data(),proj.data(),targ.data(),iap,izp,iat,izt,strlen(frame.data()),strlen(proj.data()),strlen(targ.data())); return true; }
const char * AMPTHadronizer::classname | ( | ) | const |
Definition at line 350 of file AMPTHadronizer.cc.
{ return "gen::AMPTHadronizer"; }
bool AMPTHadronizer::decay | ( | ) |
Definition at line 332 of file AMPTHadronizer.cc.
{ return true; }
bool gen::AMPTHadronizer::declareSpecialSettings | ( | const std::vector< std::string > | ) | [inline] |
Definition at line 44 of file AMPTHadronizer.h.
{ return true; }
bool AMPTHadronizer::declareStableParticles | ( | const std::vector< int > | pdg | ) |
Definition at line 314 of file AMPTHadronizer.cc.
{ return true; }
void AMPTHadronizer::finalizeEvent | ( | ) |
Definition at line 342 of file AMPTHadronizer.cc.
{
return;
}
bool AMPTHadronizer::generatePartonsAndHadronize | ( | ) |
Definition at line 173 of file AMPTHadronizer.cc.
References add_heavy_ion_rec(), AMPT, bmax_, bmin_, gen::BaseHadronizer::event(), evt, frame_, get_particles(), rotate_, and rotateEvtPlane().
{ // generate single event if(rotate_) rotateEvtPlane(); // generate a AMPT event AMPT(frame_.data(), bmin_, bmax_, strlen(frame_.data())); // event information HepMC::GenEvent *evt = new HepMC::GenEvent(); get_particles(evt); add_heavy_ion_rec(evt); event().reset(evt); return true; }
bool AMPTHadronizer::get_particles | ( | HepMC::GenEvent * | evt | ) | [private] |
Definition at line 194 of file AMPTHadronizer.cc.
References build_ampt(), build_ampt_vertex(), configurableAnalysis::GenParticle, hbt, i, and LogDebug.
Referenced by generatePartonsAndHadronize().
{ HepMC::GenVertex* vertice; vector<HepMC::GenParticle*> particles; vector<int> mother_ids; vector<HepMC::GenVertex*> prods; vertice = new HepMC::GenVertex(HepMC::FourVector(0,0,0,0),0); evt->add_vertex(vertice); if(!evt->signal_process_vertex()) evt->set_signal_process_vertex(vertice); const unsigned int knumpart = hbt.nlast; // cout<<"# of particles "<<knumpart<<" "<<hbt.nlast<<endl; for (unsigned int ipart = 0; ipart<knumpart; ipart++) { int mid = 0; particles.push_back(build_ampt(ipart,ipart+1)); prods.push_back(build_ampt_vertex(ipart,0)); mother_ids.push_back(mid); LogDebug("DecayChain")<<"Mother index : "<<mid; } // LogDebug("AMPT")<<"Number of particles in vector "<<particles.size(); // cout<<"Number of particles in vector "<<particles.size(); for (unsigned int ipart = 0; ipart<particles.size(); ipart++) { HepMC::GenParticle* part = particles[ipart]; int mid = mother_ids[ipart]; LogDebug("DecayChain")<<"Particle "<<ipart; LogDebug("DecayChain")<<"Mother's ID "<<mid; LogDebug("DecayChain")<<"Particle's PDG ID "<<part->pdg_id(); if(mid <= 0){ vertice->add_particle_out(part); continue; } if(mid > 0){ HepMC::GenParticle* mother = particles[mid]; LogDebug("DecayChain")<<"Mother's PDG ID "<<mother->pdg_id(); HepMC::GenVertex* prod_vertex = mother->end_vertex(); if(!prod_vertex){ prod_vertex = prods[ipart]; prod_vertex->add_particle_in(mother); evt->add_vertex(prod_vertex); prods[ipart]=0; // mark to protect deletion } prod_vertex->add_particle_out(part); } } // cleanup vertices not assigned to evt for (unsigned int i = 0; i<prods.size(); i++) { if(prods[i]) delete prods[i]; } return true; }
bool AMPTHadronizer::hadronize | ( | ) |
Definition at line 327 of file AMPTHadronizer.cc.
{ return false; }
bool gen::AMPTHadronizer::initializeForExternalPartons | ( | ) |
bool AMPTHadronizer::initializeForInternalPartons | ( | ) |
Definition at line 301 of file AMPTHadronizer.cc.
References ampt_init(), call_amptset(), efrm_, frame_, iap_, iat_, izp_, izt_, proj_, pset_, and targ_.
bool AMPTHadronizer::residualDecay | ( | ) |
Definition at line 337 of file AMPTHadronizer.cc.
{ return true; }
void AMPTHadronizer::rotateEvtPlane | ( | ) | [private] |
Definition at line 320 of file AMPTHadronizer.cc.
References funct::cos(), cosphi0_, phi0_, pi, gen::ranart_(), funct::sin(), and sinphi0_.
Referenced by generatePartonsAndHadronize().
void AMPTHadronizer::statistics | ( | ) |
Definition at line 346 of file AMPTHadronizer.cc.
{
return;
}
double gen::AMPTHadronizer::alpha_ [private] |
Definition at line 88 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::amptmode_ [private] |
Definition at line 75 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::bmax_ [private] |
Definition at line 63 of file AMPTHadronizer.h.
Referenced by generatePartonsAndHadronize().
double gen::AMPTHadronizer::bmin_ [private] |
Definition at line 65 of file AMPTHadronizer.h.
Referenced by generatePartonsAndHadronize().
double gen::AMPTHadronizer::cosphi0_ [private] |
Definition at line 112 of file AMPTHadronizer.h.
Referenced by build_ampt(), and rotateEvtPlane().
int gen::AMPTHadronizer::deuteronfactor_ [private] |
Definition at line 94 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::deuteronmode_ [private] |
Definition at line 93 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::deuteronxsec_ [private] |
Definition at line 95 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::diquarkembedding_ [private] |
Definition at line 100 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::diquarkpx_ [private] |
Definition at line 101 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::diquarkpy_ [private] |
Definition at line 102 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::diquarkx_ [private] |
Definition at line 103 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::diquarky_ [private] |
Definition at line 104 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::doInitialAndFinalRadiation_ [private] |
Definition at line 98 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::dpcoal_ [private] |
Definition at line 89 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::drcoal_ [private] |
Definition at line 90 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::dt_ [private] |
Definition at line 77 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::efrm_ [private] |
Definition at line 67 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
HepMC::GenEvent* gen::AMPTHadronizer::evt [private] |
Definition at line 61 of file AMPTHadronizer.h.
Referenced by generatePartonsAndHadronize().
std::string gen::AMPTHadronizer::frame_ [private] |
Definition at line 68 of file AMPTHadronizer.h.
Referenced by generatePartonsAndHadronize(), and initializeForInternalPartons().
int gen::AMPTHadronizer::iap_ [private] |
Definition at line 71 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
int gen::AMPTHadronizer::iat_ [private] |
Definition at line 73 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
int gen::AMPTHadronizer::izp_ [private] |
Definition at line 72 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
int gen::AMPTHadronizer::izpc_ [private] |
Definition at line 87 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::izt_ [private] |
Definition at line 74 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
bool gen::AMPTHadronizer::ks0decay_ [private] |
Definition at line 91 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::ktkick_ [private] |
Definition at line 99 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::maxmiss_ [private] |
Definition at line 97 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::minijetpt_ [private] |
Definition at line 96 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::mu_ [private] |
Definition at line 86 of file AMPTHadronizer.h.
Referenced by ampt_init().
int gen::AMPTHadronizer::nsembd_ [private] |
Definition at line 105 of file AMPTHadronizer.h.
int gen::AMPTHadronizer::ntmax_ [private] |
Definition at line 76 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::phi0_ [private] |
Definition at line 110 of file AMPTHadronizer.h.
Referenced by add_heavy_ion_rec(), and rotateEvtPlane().
bool gen::AMPTHadronizer::phidecay_ [private] |
Definition at line 92 of file AMPTHadronizer.h.
Referenced by ampt_init().
bool gen::AMPTHadronizer::popcornmode_ [private] |
Definition at line 80 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::popcornpar_ [private] |
Definition at line 81 of file AMPTHadronizer.h.
Referenced by ampt_init().
std::string gen::AMPTHadronizer::proj_ [private] |
Definition at line 69 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
double gen::AMPTHadronizer::psembd_ [private] |
Definition at line 106 of file AMPTHadronizer.h.
edm::ParameterSet gen::AMPTHadronizer::pset_ [private] |
Definition at line 62 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
double gen::AMPTHadronizer::pthard_ [private] |
Definition at line 85 of file AMPTHadronizer.h.
Referenced by ampt_init().
bool gen::AMPTHadronizer::quenchingmode_ [private] |
Definition at line 83 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::quenchingpar_ [private] |
Definition at line 84 of file AMPTHadronizer.h.
Referenced by ampt_init().
bool gen::AMPTHadronizer::rotate_ [private] |
Definition at line 113 of file AMPTHadronizer.h.
Referenced by generatePartonsAndHadronize().
double gen::AMPTHadronizer::shadowingfactor_ [private] |
Definition at line 109 of file AMPTHadronizer.h.
bool gen::AMPTHadronizer::shadowingmode_ [private] |
Definition at line 82 of file AMPTHadronizer.h.
Referenced by ampt_init().
bool gen::AMPTHadronizer::shadowingmodflag_ [private] |
Definition at line 108 of file AMPTHadronizer.h.
double gen::AMPTHadronizer::sinphi0_ [private] |
Definition at line 111 of file AMPTHadronizer.h.
Referenced by build_ampt(), and rotateEvtPlane().
double gen::AMPTHadronizer::stringFragA_ [private] |
Definition at line 78 of file AMPTHadronizer.h.
Referenced by ampt_init().
double gen::AMPTHadronizer::stringFragB_ [private] |
Definition at line 79 of file AMPTHadronizer.h.
Referenced by ampt_init().
std::string gen::AMPTHadronizer::targ_ [private] |
Definition at line 70 of file AMPTHadronizer.h.
Referenced by initializeForInternalPartons().
double gen::AMPTHadronizer::tmaxembd_ [private] |
Definition at line 107 of file AMPTHadronizer.h.