Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F11221929
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
25 KB
Subscribers
None
View Options
diff --git a/Analysis/VV_ME_Analysis.cc b/Analysis/VV_ME_Analysis.cc
--- a/Analysis/VV_ME_Analysis.cc
+++ b/Analysis/VV_ME_Analysis.cc
@@ -1,427 +1,445 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the VV_ME_Analysis class.
//
#include "VV_ME_Analysis.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/EventRecord/Event.h"
#include "ThePEG/PDT/EnumParticles.h"
#include "ThePEG/PDT/ParticleData.h"
#include "ThePEG/PDF/BeamParticleData.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include "Herwig++/Utilities/Histogram.h"
using namespace Herwig;
using namespace ThePEG;
using namespace std;
Histogram cos3_h(-1., 1.,40) , cos4_h(-1., 1.,40) ;
Histogram HT34_h(0.,500.,25) ;
Histogram eta3_h(-6.,6.,100) , pt3_h(0.,200.,100) ;
Histogram eta4_h(-6.,6.,100) , pt4_h(0.,200.,100) ;
Histogram eta34_h(-6.,6.,100) , y34_h(-5.,5.,100) , pt34_h(0.,500.,25);
Histogram m34wz_h(70.,100.,100) ;
Histogram eta5_h(-6.,6.,100) , pt5_h(0.,200.,100) ;
Histogram eta6_h(-6.,6.,100) , pt6_h(0.,200.,100) ;
Histogram eta56_h(-6.,6.,100) , y56_h(-5.,5.,100) , pt56_h(0.,150.,30);
Histogram m56_h(75.0,100.0,100) ;
Histogram HT3456_h(0.,500.,25) ;
Histogram y3456_h(-4.,4.,80) , m3456_h(0.,1000.,100);
-Histogram th1_h(0.,Constants::pi,32), th2_h(-Constants::pi,Constants::pi,32);
+Histogram th1_h(0.,3.2,32) , th2_h(-3.2,3.2,32);
VV_ME_Analysis::~VV_ME_Analysis() {}
void VV_ME_Analysis::analyze(tEventPtr event, long ieve, int loop, int state) {
// Store the initial state particles.
- inbound=event->incoming();
+ inbound_ = event->incoming();
// Store all of the final state particles as leptons.
- leptons=event->getFinalState();
+ leptons_ = event->getFinalState();
// Extract the emitted parton
tPVector::iterator pit;
- int nemitted(0);
- for(pit=leptons.begin();pit!=leptons.end();++pit) {
+ nemitted_ = 0;
+ for(pit=leptons_.begin();pit!=leptons_.end();++pit) {
if((*pit)->id()==21||abs((*pit)->id())<=6) {
if((*pit)->parents().size()==0) continue;
if(((*pit)->parents()[0]->id()==21)||abs((*pit)->parents()[0]->id())<=6) {
- emitted = *pit;
- nemitted++;
+ emitted_ = *pit;
+ nemitted_++;
}
}
}
- if(nemitted>1)
+ if(nemitted_>1)
throw Exception() << "VV_ME_Analysis::analyze"
<< "\nMore than one QCD charge in the final state"
<< "\nCan't tell what the NLO emitted parton is."
<< Exception::warning;
// Now delete everything else in leptons which is not a lepton!
- for(pit=leptons.begin();pit!=leptons.end();++pit)
+ for(pit=leptons_.begin();pit!=leptons_.end();++pit)
if(!(abs((*pit)->id())>=11&&abs((*pit)->id())<=16)) {
- leptons.erase(pit);
+ leptons_.erase(pit);
--pit;
}
// Make sure that leptons has only 4 entries (2 bosons * 2-2-body decays).
- assert(leptons.size()==4);
+ assert(leptons_.size()==4);
// Make sure all final-state leptons have parents.
- for (unsigned int i=0; i<leptons.size(); i++)
- assert(leptons[i]->parents().size()>0);
+ for (unsigned int i=0; i<leptons_.size(); i++)
+ assert(leptons_[i]->parents().size()>0);
// Go get the parents of the leptons W+ W- / W+ Z / W- Z / Z Z
tPVector bosons;
tPPtr aBoson;
- for(unsigned int ix=0;ix<leptons.size();ix++) {
- aBoson = leptons[ix]->parents()[0];
- while(leptons[ix]->id()==aBoson->id()&&leptons[ix]->parents().size()>0)
+ for(unsigned int ix=0;ix<leptons_.size();ix++) {
+ aBoson = leptons_[ix]->parents()[0];
+ while(leptons_[ix]->id()==aBoson->id()&&leptons_[ix]->parents().size()>0)
aBoson = aBoson->parents()[0];
bosons.push_back(aBoson);
}
// Get rid of duplicate entries in bosons:
tPVector::iterator qit;
for(pit=bosons.begin();pit!=bosons.end();++pit)
for(qit=pit;qit!=bosons.end();++qit)
if((*qit)->id()==(*pit)->id()) {
bosons.erase(qit);
break;
}
// Attempt to order bosons according mcfm notation.
if(abs(bosons[0]->id())==abs(bosons[1]->id())) {
// Either W W or Z Z here. Swap so that the W+ is the first entry.
if(bosons[0]->id()==-24) swap(bosons[0],bosons[1]);
if(bosons[0]->id()== 23 &&
(abs(bosons[1]->children()[0]->id())==13 ||
abs(bosons[1]->children()[0]->id())==14 ))
swap(bosons[0],bosons[1]);
} else {
// Either W+ Z or W- Z here. Swap so that the W is first entry.
if(bosons[0]->id()== 23) swap(bosons[0],bosons[1]);
}
// Boson children are ordered fermion, anti-fermion in the mcfm convention.
if(bosons[0]->children()[0]->id()>0) {
- leptons[0]=bosons[0]->children()[0];
- leptons[1]=bosons[0]->children()[1];
+ leptons_[0]=bosons[0]->children()[0];
+ leptons_[1]=bosons[0]->children()[1];
} else {
- leptons[0]=bosons[0]->children()[1];
- leptons[1]=bosons[0]->children()[0];
+ leptons_[0]=bosons[0]->children()[1];
+ leptons_[1]=bosons[0]->children()[0];
}
if(bosons[1]->children()[0]->id()>0) {
- leptons[2]=bosons[1]->children()[0];
- leptons[3]=bosons[1]->children()[1];
+ leptons_[2]=bosons[1]->children()[0];
+ leptons_[3]=bosons[1]->children()[1];
} else {
- leptons[2]=bosons[1]->children()[1];
- leptons[3]=bosons[1]->children()[0];
+ leptons_[2]=bosons[1]->children()[1];
+ leptons_[3]=bosons[1]->children()[0];
}
// For debugging; check that entries are what mcfm says they should be.
-// if(leptons[0]->id()!=14||leptons[1]->id()!=-13||
-// leptons[2]->id()!=12||leptons[3]->id()!=-12) {
// cout << "\n\n\n\n\n";
-// cout << "leptons[0] " << *leptons[0] << endl;
-// cout << "leptons[1] " << *leptons[1] << endl;
-// cout << "leptons[2] " << *leptons[2] << endl;
-// cout << "leptons[3] " << *leptons[3] << endl;
-// }
+// cout << "leptons_[0] " << *leptons_[0] << endl;
+// cout << "leptons_[1] " << *leptons_[1] << endl;
+// cout << "leptons_[2] " << *leptons_[2] << endl;
+// cout << "leptons_[3] " << *leptons_[3] << endl;
AnalysisHandler::analyze( event, ieve, loop, state);
}
void VV_ME_Analysis::analyze(const tPVector & particles) {
+ epsilon_ = 1.e-10;
+
vector<Lorentz5Momentum> p;
- for(int i=0;i<=3;i++) p.push_back(leptons[i]->momentum());
- if(emitted) p.push_back(emitted->momentum());
+ for(int i=0;i<=3;i++) p.push_back(leptons_[i]->momentum());
+ if(emitted_) p.push_back(emitted_->momentum());
assert(p.size()==4||p.size()==5);
int offset(-3);
Lorentz5Momentum p34, p56, p3456;
p34 = p[offset+3]+p[offset+4];
p56 = p[offset+5]+p[offset+6];
p3456 = p34+p56;
Lorentz5Momentum p34rest(0.*GeV,0.*GeV,0.*GeV,p34.m(),p34.m());
Lorentz5Momentum p3_Vrest, p4_Vrest;
p3_Vrest = boostx(p[offset+3], p34, p34rest);
p4_Vrest = boostx(p[offset+4], p34, p34rest);
// cos(theta_p3) in the p34 rest frame:
cos3_h.addWeighted(p3_Vrest.cosTheta(),1.);
// cos(theta_p4) in the p34 rest frame:
cos4_h.addWeighted(p4_Vrest.cosTheta(),1.);
// Scalar sum of pts of p3 & p4:
HT34_h.addWeighted((p[offset+3].perp()+p[offset+4].perp())/GeV,1.);
// p3:
eta3_h.addWeighted(p[offset+3].eta(),1.);
pt3_h.addWeighted(p[offset+3].perp()/GeV,1.);
// p4:
eta4_h.addWeighted(p[offset+4].eta(),1.);
pt4_h.addWeighted(p[offset+4].perp()/GeV,1.);
// First vector boson:
eta34_h.addWeighted(p34.eta(),1.);
y34_h.addWeighted(p34.rapidity(),1.);
pt34_h.addWeighted(p34.perp()/GeV,1.);
m34wz_h.addWeighted(sqrt(p34.m2())/GeV,1.);
// p5:
eta5_h.addWeighted(p[offset+5].eta(),1.);
pt5_h.addWeighted(p[offset+5].perp()/GeV,1.);
// p6:
eta6_h.addWeighted(p[offset+6].eta(),1.);
pt6_h.addWeighted(p[offset+6].perp()/GeV,1.);
// Second vector boson:
m56_h.addWeighted(sqrt(p56.m2())/GeV,1.);
eta56_h.addWeighted(p56.eta(),1.);
y56_h.addWeighted(p56.rapidity(),1.);
pt56_h.addWeighted(p56.perp()/GeV,1.);
// Scalar sum of all lepton pts:
HT3456_h.addWeighted((p[offset+3].perp()+p[offset+4].perp()
+p[offset+5].perp()+p[offset+6].perp()
)/GeV,1.);
y3456_h.addWeighted(p3456.rapidity(),1.);
m3456_h.addWeighted(sqrt(p3456.m2())/GeV,1.);
// The theta Born variables:
- assert(abs(inbound.first->children()[0]->id())<7);
- assert(abs(inbound.second->children()[0]->id())<7);
- Lorentz5Momentum pplus(inbound.first->children()[0]->momentum());
- Lorentz5Momentum pminus(inbound.second->children()[0]->momentum());
+ assert(abs(inbound_.first->children()[0]->id())<7);
+ assert(abs(inbound_.second->children()[0]->id())<7);
+ Lorentz5Momentum pplus(inbound_.first->children()[0]->momentum());
+ Lorentz5Momentum pminus(inbound_.second->children()[0]->momentum());
Lorentz5Momentum p3456rest(0.*GeV,0.*GeV,0.*GeV,p3456.m(),p3456.m());
// Boost everything to the diboson rest frame:
pplus = boostx(pplus , p3456, p3456rest);
pminus = boostx(pminus, p3456, p3456rest);
p34 = boostx(p34 , p3456, p3456rest);
p56 = boostx(p56 , p3456, p3456rest);
+ double sinthpplus (pplus.perp() /pplus.vect().mag() );
+ double sinthpminus(pminus.perp()/pminus.vect().mag());
+ if(nemitted_==0&&(sinthpplus>epsilon_||sinthpminus>epsilon_))
+ throw Exception() << "VV_ME_Analysis::analyze\n"
+ << "Found 0 emitted partons but\n"
+ << "sin(theta_pplus) = " << sinthpplus << "\n"
+ << "sin(theta_pminus) = " << sinthpminus << "\n"
+ << Exception::warning;
// Get the rotation that puts pplus on the z-axis (zrot):
- LorentzRotation zrot(hwurot(pplus,1.,0.));
- // Now rotate everything using this matrix
- pplus *= zrot;
- pminus *= zrot;
- p34 *= zrot;
- p56 *= zrot;
- // Get the rotation that puts the transverse bit
- // of pminus on the +y axis (xyrot):
- LorentzRotation xyrot(hwurot(pplus,pminus.x()/pminus.vect().mag(),
- pminus.y()/pminus.vect().mag()));
- // Now rotate everything using this matrix
- pplus *= xyrot;
- pminus *= xyrot;
- p34 *= xyrot;
- p56 *= xyrot;
+ if(sinthpplus>epsilon_) {
+ LorentzRotation zrot(hwurot(pplus,1.,0.));
+ // Now rotate everything using this matrix
+ pplus *= zrot;
+ pminus *= zrot;
+ p34 *= zrot;
+ p56 *= zrot;
+ }
+ if(sinthpminus>epsilon_) {
+ // Get the rotation that puts the transverse bit
+ // of pminus on the +y axis (xyrot):
+ LorentzRotation xyrot(hwurot(pplus,pminus.x()/pminus.perp(),
+ pminus.y()/pminus.perp()));
+
+ // Now rotate everything using this matrix
+ pplus *= xyrot;
+ pminus *= xyrot;
+ p34 *= xyrot;
+ p56 *= xyrot;
+ }
// Now get the Born variables
th1_h.addWeighted(acos(p34.z()/p34.vect().mag()),1.);
th2_h.addWeighted(atan2(p34.x(),p34.y()),1.);
AnalysisHandler::analyze(particles);
}
void VV_ME_Analysis::analyze(tPPtr part) {
//find electron (and positron) with highest pt
//check to see this is the same as the Z pt
// if( part->id() == ParticleID::eminus ) {
// cerr<< "id is: "<<part->id()<<" pt = "<< part->momentum().perp() / GeV<<" \n ";
// }
}
void VV_ME_Analysis::persistentOutput(PersistentOStream & os) const {
// *** ATTENTION *** os << ; // Add all member variable which should be written persistently here.
}
void VV_ME_Analysis::persistentInput(PersistentIStream & is, int) {
// *** ATTENTION *** is >> ; // Add all member variable which should be read persistently here.
}
ClassDescription<VV_ME_Analysis> VV_ME_Analysis::initVV_ME_Analysis;
// Definition of the static class description member.
void VV_ME_Analysis::Init() {
static ClassDocumentation<VV_ME_Analysis> documentation
("There is no documentation for the VV_ME_Analysis class");
}
void VV_ME_Analysis::dofinish() {
AnalysisHandler::dofinish();
ofstream file;
string fname = generator()->filename()+string("_")+name()+string(".top");
// Normalise the histograms
// cos(theta_p3) in the p34 rest frame:
cos3_h.normaliseToCrossSection();
cos3_h.prefactor(cos3_h.prefactor()*1.e6);
// cos(theta_p4) in the p34 rest frame:
cos4_h.normaliseToCrossSection();
cos4_h.prefactor(cos4_h.prefactor()*1.e6);
// Scalar sum of pts of p3 & p4:
HT34_h.normaliseToCrossSection();
HT34_h.prefactor(HT34_h.prefactor()*1.e6);
// p3:
eta3_h.normaliseToCrossSection();
eta3_h.prefactor(eta3_h.prefactor()*1.e6);
pt3_h.normaliseToCrossSection();
pt3_h.prefactor(pt3_h.prefactor()*1.e6);
// p4:
eta4_h.normaliseToCrossSection();
eta4_h.prefactor(eta4_h.prefactor()*1.e6);
pt4_h.normaliseToCrossSection();
pt4_h.prefactor(pt4_h.prefactor()*1.e6);
// First vector boson:
eta34_h.normaliseToCrossSection();
eta34_h.prefactor(eta34_h.prefactor()*1.e6);
y34_h.normaliseToCrossSection();
y34_h.prefactor(y34_h.prefactor()*1.e6);
pt34_h.normaliseToCrossSection();
pt34_h.prefactor(pt34_h.prefactor()*1.e6);
m34wz_h.normaliseToCrossSection();
m34wz_h.prefactor(m34wz_h.prefactor()*1.e6);
// p5:
eta5_h.normaliseToCrossSection();
eta5_h.prefactor(eta5_h.prefactor()*1.e6);
pt5_h.normaliseToCrossSection();
pt5_h.prefactor(pt5_h.prefactor()*1.e6);
// p6:
eta6_h.normaliseToCrossSection();
eta6_h.prefactor(eta6_h.prefactor()*1.e6);
pt6_h.normaliseToCrossSection();
pt6_h.prefactor(pt6_h.prefactor()*1.e6);
// Second vector boson:
m56_h.normaliseToCrossSection();
m56_h.prefactor(m56_h.prefactor()*1.e6);
eta56_h.normaliseToCrossSection();
eta56_h.prefactor(eta56_h.prefactor()*1.e6);
y56_h.normaliseToCrossSection();
y56_h.prefactor(y56_h.prefactor()*1.e6);
pt56_h.normaliseToCrossSection();
pt56_h.prefactor(pt56_h.prefactor()*1.e6);
// Scalar sum of all lepton pts:
HT3456_h.normaliseToCrossSection();
HT3456_h.prefactor(HT3456_h.prefactor()*1.e6);
y3456_h.normaliseToCrossSection();
y3456_h.prefactor(y3456_h.prefactor()*1.e6);
m3456_h.normaliseToCrossSection();
m3456_h.prefactor(m3456_h.prefactor()*1.e6);
// The theta Born variables:
th1_h.normaliseToCrossSection();
th1_h.prefactor(th1_h.prefactor()*1.e6);
th2_h.normaliseToCrossSection();
th2_h.prefactor(th2_h.prefactor()*1.e6);
file.open(fname.c_str());
using namespace HistogramOptions;
// cos(theta_p3) in the p34 rest frame:
// Lepton:
cos3_h.topdrawOutput(file,Frame,"RED","cos3 distribution: all wgts");
// cos(theta_p4) in the p34 rest frame:
cos4_h.topdrawOutput(file,Frame,"RED","cos4 distribution: all wgts");
// Scalar sum of pts of p3 & p4:
HT34_h.topdrawOutput(file,Frame,"RED","HT34 distribution: all wgts");
// p3:
eta3_h.topdrawOutput(file,Frame,"RED","eta3 distribution: all wgts");
pt3_h.topdrawOutput(file,Frame,"RED","pt3 distribution: all wgts");
// p4:
eta4_h.topdrawOutput(file,Frame,"RED","eta4 distribution: all wgts");
pt4_h.topdrawOutput(file,Frame,"RED","pt4 distribution: all wgts");
// First vector boson:
eta34_h.topdrawOutput(file,Frame,"RED","eta34 distribution: all wgts");
y34_h.topdrawOutput(file,Frame,"RED","y34 distribution: all wgts");
pt34_h.topdrawOutput(file,Frame,"RED","pt34 low mass: all wgts");
m34wz_h.topdrawOutput(file,Frame,"RED","m34 low mass: all wgts");
// p5:
eta5_h.topdrawOutput(file,Frame,"RED","eta5 distribution: all wgts");
pt5_h.topdrawOutput(file,Frame,"RED","pt5 distribution: all wgts");
// p6:
eta6_h.topdrawOutput(file,Frame,"RED","eta6 distribution: all wgts");
pt6_h.topdrawOutput(file,Frame,"RED","pt6 distribution: all wgts");
// Second vector boson:
m56_h.topdrawOutput(file,Frame,"RED","m56 distribution: all wgts");
eta56_h.topdrawOutput(file,Frame,"RED","eta56 distribution: all wgts");
y56_h.topdrawOutput(file,Frame,"RED","y56 distribution: all wgts");
pt56_h.topdrawOutput(file,Frame,"RED","pt56 distribution: all wgts");
// Scalar sum of all lepton pts:
HT3456_h.topdrawOutput(file,Frame,"RED","HT3456 distribution: all wgts");
y3456_h.topdrawOutput(file,Frame,"RED","y3456 distribution: all wgts");
m3456_h.topdrawOutput(file,Frame,"RED","m3456 distribution: all wgts");
// The theta Born variables:
th1_h.topdrawOutput(file,Frame,"RED","theta1 distribution: all wgts");
th2_h.topdrawOutput(file,Frame,"RED","theta2 distribution: all wgts");
file.close();
}
Lorentz5Momentum VV_ME_Analysis::boostx(Lorentz5Momentum p_in,
- Lorentz5Momentum pt,
- Lorentz5Momentum ptt){
+ Lorentz5Momentum pt,
+ Lorentz5Momentum ptt){
// Boost input vector p_in to output vector p_out using the same
// transformation as required to boost massive vector pt to ptt
Lorentz5Momentum p_tmp,p_out;
Vector3<double> beta;
Energy mass, bdotp;
double gam;
- if (pt.m2()<0.*GeV2) {
+ if (pt.m2()<0.*GeV2)
throw Exception() << "pt.m2()<0. in boostx, pt.m2() = "
<< pt.m2()/GeV2
<< Exception::runerror;
- }
+
mass = sqrt(pt.m2());
// boost to the rest frame of pt
gam = pt.e()/mass;
-
+
beta = -pt.vect()*(1./pt.e());
bdotp = beta*p_in.vect();
-
+
Lorentz5Momentum tmp_vec;
tmp_vec.setVect(beta*gam*((p_in.e()+gam*(p_in.e()+bdotp))/(1.+gam)));
tmp_vec.setE(0.*GeV);
tmp_vec.setMass(0.*GeV);
p_tmp = p_in + tmp_vec;
p_tmp.setE(gam*(p_in.e()+bdotp));
-
+
// boost from rest frame of pt to frame in which pt is identical
// with ptt, thus completing the transformation
gam = ptt.e()/mass;
beta = ptt/ptt.e();
bdotp = beta*p_tmp.vect();
-
+
p_out.setVect(p_tmp.vect()+gam*beta*((p_out.e()+p_tmp.e())/(1.+gam)));
p_out.setE(gam*(p_tmp.e()+bdotp));
p_out.rescaleMass();
-
+
return p_out;
}
LorentzRotation VV_ME_Analysis::hwurot(Lorentz5Momentum p,double cp,double sp) {
//-----------------------------------------------------------------------
// r is a rotation matrix to get from vector p the z-axis, followed by
- // a rotation by psi about the z-axis, where cp = cos(psi), sp = sin(psi)
+ // a rotation by phi about the z-axis, where cp = cos(phi), sp = sin(phi)
//-----------------------------------------------------------------------
+ if(fabs(cp*cp+sp*sp-1.)>epsilon_)
+ throw Exception() << "VV_ME_Analysis::hwurot"
+ << "\nInconsistent input: cos(phi)^2+sin(phi)^2 = "
+ << cp*cp+sp*sp
+ << Exception::warning;
+
LorentzRotation rxy;
LorentzRotation ryz;
LorentzRotation raz;
raz.setRotateZ(atan2(cp,sp));
if(p.perp()/p.vect().mag()>=1.e-10) {
rxy.setRotateZ(atan2(p.x(),p.y()));
p *= rxy;
ryz.setRotateX(acos(p.z()/p.vect().mag()));
p *= ryz;
return raz*ryz*rxy;
}
else {
return raz;
}
}
diff --git a/Analysis/VV_ME_Analysis.h b/Analysis/VV_ME_Analysis.h
--- a/Analysis/VV_ME_Analysis.h
+++ b/Analysis/VV_ME_Analysis.h
@@ -1,225 +1,235 @@
// -*- C++ -*-
#ifndef HERWIG_VV_ME_Analysis_H
#define HERWIG_VV_ME_Analysis_H
//
// This is the declaration of the VV_ME_Analysis class.
//
#include "ThePEG/Repository/CurrentGenerator.h"
#include "ThePEG/Repository/EventGenerator.h"
#include "ThePEG/Handlers/AnalysisHandler.h"
#include "VV_ME_Analysis.fh"
#include "Herwig++/Utilities/Histogram.h"
namespace Herwig {
using namespace ThePEG;
/**
* Here is the documentation of the VV_ME_Analysis class.
*
* @see \ref VV_ME_AnalysisInterfaces "The interfaces"
* defined for VV_ME_Analysis.
*/
class VV_ME_Analysis: public AnalysisHandler {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* The default constructor.
*/
inline VV_ME_Analysis();
/**
* The copy constructor.
*/
inline VV_ME_Analysis(const VV_ME_Analysis &);
/**
* The destructor.
*/
virtual ~VV_ME_Analysis();
//@}
public:
/** @name Virtual functions required by the AnalysisHandler class. */
//@{
/**
* Analyze a given Event. Note that a fully generated event
* may be presented several times, if it has been manipulated in
* between. The default version of this function will call transform
* to make a lorentz transformation of the whole event, then extract
* all final state particles and call analyze(tPVector) of this
* analysis object and those of all associated analysis objects. The
* default version will not, however, do anything on events which
* have not been fully generated, or have been manipulated in any
* way.
* @param event pointer to the Event to be analyzed.
* @param ieve the event number.
* @param loop the number of times this event has been presented.
* If negative the event is now fully generated.
* @param state a number different from zero if the event has been
* manipulated in some way since it was last presented.
*/
virtual void analyze(tEventPtr event, long ieve, int loop, int state);
/**
* Analyze the given vector of particles. The default version calls
* analyze(tPPtr) for each of the particles.
* @param particles the vector of pointers to particles to be analyzed
*/
virtual void analyze(const tPVector & particles);
/**
* Analyze the given particle.
* @param particle pointer to the particle to be analyzed.
*/
virtual void analyze(tPPtr particle);
//@}
public:
/**
* A pair of the incoming hadrons.
*/
- PPair inbound;
+ PPair inbound_;
/**
* A vector of the final state leptons.
*/
- tPVector leptons;
+ tPVector leptons_;
/**
- * A vector of the final state leptons.
+ * A pointer to the / an emitted parton.
*/
- tPPtr emitted;
+ tPPtr emitted_;
+
+ /**
+ * A counter for the number of emitted partons detected.
+ */
+ int nemitted_;
+
+ /**
+ * A very small parameter to determine if rotations etc should be applied.
+ */
+ double epsilon_;
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* The standard Init function used to initialize the interfaces.
* Called exactly once for each class by the class description system
* before the main function starts or
* when this class is dynamically loaded.
*/
static void Init();
/**
* Finalize this object. Called in the run phase just after a
* run has ended. Used eg. to write out statistics.
*/
virtual void dofinish();
protected:
/**
* Function to return a specific boost to the rest frame of the
* leptons to histogram the polar angles in this frame. This is
* verbatim c++ translation of mcfm/src/Singletop/boostx.f.
*/
Lorentz5Momentum boostx(Lorentz5Momentum p_in, Lorentz5Momentum pt,
Lorentz5Momentum ptt);
/**
* This function is stolen from fortran herwig, in order to maintain
* consistency with the fortran analysis in mcfm. It takes a vector
* p and returns the rotation matrix which when applied to p aligns
* it along the z-axis and follows this with an azimuthal rotation
* of cp = cos(phi), sp = sin(phi).
*/
LorentzRotation hwurot(Lorentz5Momentum p, double cp, double sp);
/** @name Clone Methods. */
//@{
/**
* Make a simple clone of this object.
* @return a pointer to the new object.
*/
inline virtual IBPtr clone() const;
/** Make a clone of this object, possibly modifying the cloned object
* to make it sane.
* @return a pointer to the new object.
*/
inline virtual IBPtr fullclone() const;
//@}
// If needed, insert declarations of virtual function defined in the
// InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
private:
/**
* The static object used to initialize the description of this class.
* Indicates that this is a concrete class with persistent data.
*/
static ClassDescription<VV_ME_Analysis> initVV_ME_Analysis;
/**
* The assignment operator is private and must never be called.
* In fact, it should not even be implemented.
*/
VV_ME_Analysis & operator=(const VV_ME_Analysis &);
};
}
#include "ThePEG/Utilities/ClassTraits.h"
namespace ThePEG {
/** @cond TRAITSPECIALIZATIONS */
/** This template specialization informs ThePEG about the
* base classes of VV_ME_Analysis. */
template <>
struct BaseClassTrait<Herwig::VV_ME_Analysis,1> {
/** Typedef of the first base class of VV_ME_Analysis. */
typedef AnalysisHandler NthBase;
};
/** This template specialization informs ThePEG about the name of
* the VV_ME_Analysis class and the shared object where it is defined. */
template <>
struct ClassTraits<Herwig::VV_ME_Analysis>
: public ClassTraitsBase<Herwig::VV_ME_Analysis> {
/** Return a platform-independent class name */
static string className() { return "Herwig::VV_ME_Analysis"; }
/**
* The name of a file containing the dynamic library where the class
* VV_ME_Analysis is implemented. It may also include several, space-separated,
* libraries if the class VV_ME_Analysis depends on other classes (base classes
* excepted). In this case the listed libraries will be dynamically
* linked in the order they are specified.
*/
static string library() { return "HwVV_ME_Analysis.so"; }
};
/** @endcond */
}
#include "VV_ME_Analysis.icc"
#endif /* HERWIG_VV_ME_Analysis_H */
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, May 14, 11:08 AM (23 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5111353
Default Alt Text
(25 KB)
Attached To
rHERWIGHG herwighg
Event Timeline
Log In to Comment