diff --git a/Contrib/DecayAnalysis/BabarBDecayAnalysis.cc b/Contrib/DecayAnalysis/BabarBDecayAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/BabarBDecayAnalysis.cc +++ /dev/null @@ -1,153 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the BabarBDecayAnalysis class. -// - -#include "BabarBDecayAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Repository/EventGenerator.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Interface/ClassDocumentation.h" - -using namespace Herwig; - -IBPtr BabarBDecayAnalysis::clone() const { - return new_ptr(*this); -} - -IBPtr BabarBDecayAnalysis::fullclone() const { - return new_ptr(*this); -} - -void BabarBDecayAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // Rotate to CMS, extract final state particles and call analyze(particles). - set particles; - StepVector steps = event->primaryCollision()->steps(); - if (steps.size() > 2) { - for ( StepVector::const_iterator it = steps.begin()+2; - it != steps.end(); ++it ) { - (**it).select(inserter(particles), ThePEG::AllSelector()); - } - } - for(set::const_iterator it=particles.begin(); - it!=particles.end();++it) { - long id = (**it).id(); - if(!(abs(id)==ParticleID::B0||abs(id)==ParticleID::Bplus)) continue; - map count; - vector charmed; - findCharm(*it,charmed); - for(unsigned int ix=0;ix 0 ? charmed[ix]->id() : -charmed[ix]->id(); - if(abs(id)==ParticleID::B0) { - if (_b0data.find(idc) != _b0data.end()) ++count[idc]; - } - else { - if (_bplusdata.find(idc) != _bplusdata.end()) ++count[idc]; - } - } - if(abs(id)==ParticleID::B0) { - // store info - for(map::iterator it = _b0data.begin(); - it != _b0data.end(); ++it) { - long currentcount - = count.find(it->first) == count.end() ? 0 : count[it->first]; - it->second.count += currentcount; - } - } - else { - // store info - for(map::iterator it = _bplusdata.begin(); - it != _bplusdata.end(); ++it) { - long currentcount - = count.find(it->first) == count.end() ? 0 : count[it->first]; - it->second.count += currentcount; - } - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigBabarBDecayAnalysis("Herwig::BabarBDecayAnalysis", "HwDecayAnalysis.so"); - -void BabarBDecayAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the BabarBDecayAnalysis class"); - -} - -void BabarBDecayAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string filename = generator()->filename() + ".Bdecaymult"; - string dec="B0->"; - ofstream outfile(filename.c_str()); - outfile << - "\nParticle multiplicities (compared to Upsilon(4s) data):\n" - " ID Name simMult obsMult obsErr Sigma\n"; - for (map::const_iterator it = _b0data.begin(); - it != _bplusdata.end(); - ++it) { - if(it==_b0data.end()) { - it=_bplusdata.begin(); - dec="B+->"; - } - MultiplicityInfo multiplicity = it->second; - string name = dec+generator()->getParticleData(it->first)->PDGName(); - ios::fmtflags oldFlags = outfile.flags(); - outfile << std::scientific << std::showpoint - << std::setprecision(3) - << setw(7) << it->first << ' ' - << setw(17) << name << ' ' - << setw(2) << multiplicity.simMultiplicity() << " | " - << setw(2) << multiplicity.obsMultiplicity << " +/- " - << setw(2) << multiplicity.obsError << ' ' - << std::showpos << std::setprecision(1) - << multiplicity.nSigma() << ' ' - << multiplicity.bargraph() - << std::noshowpos; - outfile << '\n'; - outfile.flags(oldFlags); - } - outfile.close(); - - -} - -void BabarBDecayAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - // B0 multiplicities - _b0data[ 421 ] = MultiplicityInfo( 0.081,0.015, other); - _b0data[-421 ] = MultiplicityInfo( 0.474,0.028, other); - _b0data[ 411 ] = MultiplicityInfo( 0.023,0.013, other); - _b0data[-411 ] = MultiplicityInfo( 0.369,0.033, other); - _b0data[ 431 ] = MultiplicityInfo( 0.079,0.014, other); - _b0data[-431 ] = MultiplicityInfo( 0.103,0.021, other); - _b0data[ 4122] = MultiplicityInfo( 0.016,0.011, other); - _b0data[-4122] = MultiplicityInfo( 0.050,0.021, other); - // B+ multiplicities - _bplusdata[ 421 ] = MultiplicityInfo( 0.086,0.007, other); - _bplusdata[-421 ] = MultiplicityInfo( 0.790,0.040, other); - _bplusdata[ 411 ] = MultiplicityInfo( 0.025,0.005, other); - _bplusdata[-411 ] = MultiplicityInfo( 0.099,0.012, other); - _bplusdata[ 431 ] = MultiplicityInfo( 0.079,0.014, other); - _bplusdata[-431 ] = MultiplicityInfo( 0.011,0.004, other); - _bplusdata[ 4122] = MultiplicityInfo( 0.021,0.009, other); - _bplusdata[-4122] = MultiplicityInfo( 0.028,0.011, other); -} - -void BabarBDecayAnalysis::findCharm(tcPPtr parent,vector & charmed) { - if(parent->children().empty()) return; - for(unsigned int ix=0;ixchildren().size();++ix) { - long id = abs(parent->children()[ix]->id()); - if(id==ParticleID::Dplus || id==ParticleID::D0 || - id==ParticleID::D_splus || id==ParticleID::Lambda_cplus) { - charmed.push_back(parent->children()[ix]); - } - findCharm(parent->children()[ix],charmed); - } -} diff --git a/Contrib/DecayAnalysis/BabarBDecayAnalysis.h b/Contrib/DecayAnalysis/BabarBDecayAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/BabarBDecayAnalysis.h +++ /dev/null @@ -1,116 +0,0 @@ -// -*- C++ -*- -#ifndef THEPEG_BabarBDecayAnalysis_H -#define THEPEG_BabarBDecayAnalysis_H -// -// This is the declaration of the BabarBDecayAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Analysis/MultiplicityInfo.h" - -namespace Herwig { -using namespace ThePEG; - -/** - * Here is the documentation of the BabarBDecayAnalysis class. - * - * @see \ref BabarBDecayAnalysisInterfaces "The interfaces" - * defined for BabarBDecayAnalysis. - */ -class BabarBDecayAnalysis: public AnalysisHandler { - -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); - //@} - -public: - - /** - * 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(); - -protected: - - /** - * Member to find the charmed children of a B meson - */ - void findCharm(tcPPtr,vector & charmed); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - 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. - */ - virtual IBPtr fullclone() const; - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - BabarBDecayAnalysis & operator=(const BabarBDecayAnalysis &) = delete; - -private: - - /** - * Map of PDG codes to multiplicity info - */ - map _b0data,_bplusdata; - -}; - -} - -#endif /* THEPEG_BabarBDecayAnalysis_H */ diff --git a/Contrib/DecayAnalysis/BeamCorrelationAnalysis.cc b/Contrib/DecayAnalysis/BeamCorrelationAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/BeamCorrelationAnalysis.cc +++ /dev/null @@ -1,76 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the BeamCorrelationAnalysis class. -// - -#include "BeamCorrelationAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/EventRecord/Event.h" - -using namespace Herwig; - -void BeamCorrelationAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - PPair beam=event->primaryCollision()->primarySubProcess()->incoming(); - ParticleVector incoming=event->primaryCollision()->primarySubProcess()->outgoing(); - if(incoming.size()!=1) return; - ParticleVector outgoing=incoming[0]->children(); - if(outgoing.size()!=2) return; - int id0=incoming[0]->id(); - int id1=abs(outgoing[0]->id()); - int iloc(-1); - for(unsigned int ix=0;ix<_incoming.size();++ix) { - if(id0==_incoming[ix]&&id1==_outgoing[ix]) { - iloc=ix; - break; - } - } - if(iloc<0) { - iloc=_incoming.size(); - _incoming.push_back(id0); - _outgoing.push_back(id1); - _angle.push_back(new_ptr(Histogram(Histogram(0.,Constants::pi,200)))); - } - tPPtr in = beam.first->id()>0 ? beam.first : beam.second; - tPPtr out; - for(unsigned int ix=0;ixid()>0) out=outgoing[ix]; - } - if(!in||!out) return; - _angle[iloc]->addWeighted(in->momentum().angle(out->momentum()), - event->weight()); -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigBeamCorrelationAnalysis("Herwig::BeamCorrelationAnalysis", "HwDecayAnalysis.so"); - -void BeamCorrelationAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the BeamCorrelationAnalysis class"); - -} - -inline void BeamCorrelationAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + - string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - for(unsigned int ix=0;ix<_incoming.size();++ix) { - string title= "Angle for " + getParticleData(_incoming[ix])->PDGName() + - " -> " + getParticleData(_outgoing[ix])->PDGName() + - getParticleData(-_outgoing[ix])->PDGName(); - using namespace HistogramOptions; - _angle[ix]->topdrawOutput(output,Frame|Errorbars, - "RED",title,"", - "1/SdS/dQ", - " G G G", - "Q", - "G"); - } -} diff --git a/Contrib/DecayAnalysis/BeamCorrelationAnalysis.h b/Contrib/DecayAnalysis/BeamCorrelationAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/BeamCorrelationAnalysis.h +++ /dev/null @@ -1,117 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_BeamCorrelationAnalysis_H -#define HERWIG_BeamCorrelationAnalysis_H -// -// This is the declaration of the BeamCorrelationAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * The documentation of the BeamCorrelationAnalysis class - * is designed to plot the angle in the lab frame of an outgoing particle - * w.r.t to an incoming particle to test the spin correlations. - * - * @see \ref BeamCorrelationAnalysisInterfaces "The interfaces" - * defined for BeamCorrelationAnalysis. - */ -class BeamCorrelationAnalysis: public AnalysisHandler { - -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); - //@} - -public: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - BeamCorrelationAnalysis & operator=(const BeamCorrelationAnalysis &) = delete; - -private: - - /** - * PDG code of the outgoing particle - */ - vector _outgoing; - - /** - * PDG code of the incoming particle - */ - vector _incoming; - - /** - * Histograms - */ - vector _angle; - -}; - -} - -#endif /* HERWIG_BeamCorrelationAnalysis_H */ diff --git a/Contrib/DecayAnalysis/BranchingRatioAnalysis.cc b/Contrib/DecayAnalysis/BranchingRatioAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/BranchingRatioAnalysis.cc +++ /dev/null @@ -1,128 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the BranchingRatioAnalysis class. -// - -#include "BranchingRatioAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Interface/Reference.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void BranchingRatioAnalysis::analyze(tEventPtr event, long , int , int ) { - // find all vector particles - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).id()==_particle->id()) particles.push_back(*iter); - } - } - // analyse them - analyze(particles); -} - -void BranchingRatioAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void BranchingRatioAnalysis::analyze(tPPtr part) { - tDMPtr mode=part->decayMode(); - if(!mode) return; - if(_points.find(mode)==_points.end()) { - _points[mode]=vector(101,0.); - } - if(part->mass()>=part->dataPtr()->massMin()&& - part->mass()<=part->dataPtr()->massMax()) { - int ibin = - int((part->mass() -part->dataPtr()->massMin())/ - (part->dataPtr()->massMax()-part->dataPtr()->massMin())*100.); - if(ibin>=0&&ibin<100) { - _points[mode][ibin]+=1.; - _total[ibin]+=1.; - _points[mode][100]+=1.; - _total[100]+=1.; - } - } -} - -void BranchingRatioAnalysis::persistentOutput(PersistentOStream & os) const { - os << _particle; -} - -void BranchingRatioAnalysis::persistentInput(PersistentIStream & is, int) { - is >> _particle; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeClass -describeHerwigBranchingRatioAnalysis("Herwig::BranchingRatioAnalysis", "HwDecayAnalysis.so"); - -void BranchingRatioAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the BranchingRatioAnalysis class"); - - static Reference interfaceParticle - ("Particle", - "The particle for which the analysis is being perform", - &BranchingRatioAnalysis::_particle, false, false, true, false, false); - -} - -void BranchingRatioAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + - string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - map >::const_iterator it; - Energy step = (_particle->massMax()-_particle->massMin())/100.; - for(it=_points.begin();it!=_points.end();++it) { - output << "NEW FRAME\n"; - output << "SET FONT DUPLEX\n"; - output << "TITLE TOP \"BR for " << it->first->tag() - << "Total = " << it->second[100]/_total[100] << "\"\n"; - output << "SET LIMITS X " - << _particle->massMin()/GeV << " " - << _particle->massMax()/GeV << "\n"; - Energy mass = _particle->massMin()-0.5*step; - for(unsigned int ix=0;ixsecond.size()-1;++ix) { - mass+=step; - if(_total[ix]>0.) { - output << mass/GeV << "\t" << it->second[ix]/_total[ix] << "\n"; - } - else { - output << mass/GeV << "\t 0. \n"; - } - } - output << "HIST\n"; - output << "NEW FRAME\n"; - output << "SET FONT DUPLEX\n"; - output << "TITLE TOP \"Mass distribution for " - << it->first->tag() << "\"\n"; - mass = _particle->massMin()-0.5*step; - for(unsigned int ix=0;ixsecond.size()-1;++ix) { - mass+=step; - if(_total[ix]>0.) { - output << mass/GeV << "\t" - << it->second[ix]/it->second[100]*GeV/step - << "\n"; - } - else { - output << mass/GeV << "\t 0. \n"; - } - } - output << "HIST\n"; - } -} diff --git a/Contrib/DecayAnalysis/BranchingRatioAnalysis.h b/Contrib/DecayAnalysis/BranchingRatioAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/BranchingRatioAnalysis.h +++ /dev/null @@ -1,151 +0,0 @@ -// -*- C++ -*- -#ifndef THEPEG_BranchingRatioAnalysis_H -#define THEPEG_BranchingRatioAnalysis_H -// -// This is the declaration of the BranchingRatioAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "ThePEG/PDT/ParticleData.h" -#include "ThePEG/PDT/DecayMode.h" - -namespace Herwig { -using namespace ThePEG; - -/** - * Here is the documentation of the BranchingRatioAnalysis class. - * - * @see \ref BranchingRatioAnalysisInterfaces "The interfaces" - * defined for BranchingRatioAnalysis. - */ -class BranchingRatioAnalysis: public AnalysisHandler { - -public: - - /** - * Constructor - */ - inline BranchingRatioAnalysis() : _total(101,0.) {}; - -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: - - /** @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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - BranchingRatioAnalysis & operator=(const BranchingRatioAnalysis &) = delete; - -private: - - /** - * The particle for whihc we are performing the analysis - */ - PDPtr _particle; - - /** - * The various decay modes - */ - map > _points; - - /** - * Total entry - */ - vector _total; - -}; - -} - -#endif /* THEPEG_BranchingRatioAnalysis_H */ diff --git a/Contrib/DecayAnalysis/BtoSGammaAnalysis.cc b/Contrib/DecayAnalysis/BtoSGammaAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/BtoSGammaAnalysis.cc +++ /dev/null @@ -1,131 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the BtoSGammaAnalysis class. -// - -#include "BtoSGammaAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void BtoSGammaAnalysis::analyze(tEventPtr event, long, int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all three body B decays - tPVector particles; - for(unsigned int ix=1, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all()); - ThePEG::ParticleSet::iterator iter(part.begin()),end(part.end()); - for( ;iter!=end;++iter) { - if((abs((**iter).id())==ParticleID::Bplus||abs((**iter).id())==ParticleID::B0)) - particles.push_back(*iter); - } - } - // analyse them - analyze(particles); -} - -void BtoSGammaAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void BtoSGammaAnalysis::analyze(tPPtr part) { - Lorentz5Momentum phad; - Lorentz5Momentum pgamma; - unsigned int ngamma(0); - for(unsigned int ix=0;ixchildren().size();++ix) { - if(part->children()[ix]->id()==ParticleID::gamma) { - ++ngamma; - pgamma+=part->children()[ix]->momentum(); - } - else { - phad+=part->children()[ix]->momentum(); - } - } - if(ngamma!=1) return; - int id(part->id()); - unsigned int imode; - if(id==ParticleID::B0) imode=0; - else if(id==ParticleID::Bbar0) imode=1; - else if(id==ParticleID::Bplus) imode=2; - else if(id==ParticleID::Bminus) imode=3; - else return; - // calculate the hadronic mass - phad.rescaleMass(); - *_hadmass[imode] += phad.mass()/MeV; - pgamma.boost(-part->momentum().boostVector()); - *_spectrum[imode]+=pgamma.e()/MeV; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigBtoSGammaAnalysis("Herwig::BtoSGammaAnalysis", "HwDecayAnalysis.so"); - -void BtoSGammaAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the BtoSGammaAnalysis class"); - -} - -void BtoSGammaAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() - + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - // output the histograms - string title,temp[2],tcase; - for(unsigned int ix=0;ix<4;++ix) { - if(ix==0) { - title="B203"; - tcase=" X X"; - } - else if(ix==1) { - title="B0O203"; - tcase=" UDX X"; - } - else if(ix==2) { - title="B2+3"; - tcase=" X X"; - } - else if(ix==3) { - title="B2-3"; - tcase=" X X"; - } - temp[0] = "Hadronic Mass for " + title; - temp[1] = " " + tcase; - using namespace HistogramOptions; - _hadmass[ix]->topdrawOutput(output,Frame|Errorbars, - "RED", - temp[0],temp[1], - "1/SdS/dm/GeV2-13", - " G G X X", - "m/GeV", - " "); - temp[0]= "Photon spectrum for " + title; - temp[1]= " " + tcase; - _spectrum[ix]->topdrawOutput(output,Frame|Errorbars, - "RED", - temp[0],temp[1], - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1/GeV", - " XGX "); - } -} - -void BtoSGammaAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - for(unsigned int ix=0;ix<4;++ix) { - _hadmass.push_back(new_ptr(Histogram(850.,4500.,100))); - _spectrum.push_back(new_ptr(Histogram(0.,2800.,100))); - } -} diff --git a/Contrib/DecayAnalysis/BtoSGammaAnalysis.h b/Contrib/DecayAnalysis/BtoSGammaAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/BtoSGammaAnalysis.h +++ /dev/null @@ -1,127 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_BtoSGammaAnalysis_H -#define HERWIG_BtoSGammaAnalysis_H -// -// This is the declaration of the BtoSGammaAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the BtoSGammaAnalysis class. - * - * @see \ref BtoSGammaAnalysisInterfaces "The interfaces" - * defined for BtoSGammaAnalysis. - */ -class BtoSGammaAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - BtoSGammaAnalysis & operator=(const BtoSGammaAnalysis &) = delete; - -private: - - /** - * Histograms for the hadronic mass - */ - vector _hadmass; - - /** - * Histograms for the spectrum - */ - vector _spectrum; -}; - -} - -#endif /* HERWIG_BtoSGammaAnalysis_H */ diff --git a/Contrib/DecayAnalysis/DDalitzAnalysis.cc b/Contrib/DecayAnalysis/DDalitzAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/DDalitzAnalysis.cc +++ /dev/null @@ -1,491 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the DDalitzAnalysis class. -// - -#include "DDalitzAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/EventRecord/Event.h" - -using namespace Herwig; - - -void DDalitzAnalysis:: -findChildren(tPPtr part,ParticleVector & prod) { - if(part->children().empty()) { - prod.push_back(part); - } - else { - for(unsigned ix=0;ixchildren().size();++ix) { - findChildren(part->children()[ix],prod); - } - } -} - -void DDalitzAnalysis::analyze(tEventPtr event, long , int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all D0/Dbar0 and D+/- - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if(abs((**iter).id())==ParticleID::D0|| - abs((**iter).id())==ParticleID::Dplus|| - abs((**iter).id())==ParticleID::D_splus) { - particles.push_back(*iter); - } - } - } - // analyse them - analyze(particles); -} - -LorentzRotation DDalitzAnalysis::transform(tEventPtr ) const { - return LorentzRotation(); - // Return the Rotation to the frame in which you want to perform the analysis. -} - -void DDalitzAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void DDalitzAnalysis::analyze(tPPtr part) { - // find the stable decay products - ParticleVector products; - findChildren(part,products); - vector ppim,ppip,pk0,pkp,pkm,ppi0; - if(products.size()!=3) return; - for(unsigned int ix=0;ixid(); - if(id0==ParticleID::piplus) ppip.push_back(products[ix]->momentum()); - else if(id0==ParticleID::piminus) ppim.push_back(products[ix]->momentum()); - else if(id0==ParticleID::pi0) ppi0.push_back(products[ix]->momentum()); - else if(abs(id0)==ParticleID::K0) pk0 .push_back(products[ix]->momentum()); - else if(id0==ParticleID::K_L0) pk0 .push_back(products[ix]->momentum()); - else if(id0==ParticleID::K_S0) pk0 .push_back(products[ix]->momentum()); - else if(id0==ParticleID::Kplus) pkp.push_back(products[ix]->momentum()); - else if(id0==ParticleID::Kminus) pkm.push_back(products[ix]->momentum()); - } - Energy2 mplus,mminus,mpipi,mneut; - if(ppim.size()==1&&ppip.size()==1&&pk0.size()==1) { - if(part->id()==ParticleID::D0) { - mminus = (ppim.back()+pk0.back() ).m2(); - mplus = (ppip.back()+pk0.back() ).m2(); - mpipi = (ppip.back()+ppim.back()).m2(); - } - else { - mminus = (ppip.back()+pk0.back()).m2(); - mplus = (ppim.back()+pk0.back()).m2(); - mpipi = (ppip.back()+ppim.back()).m2(); - } - *_m2plus1 +=mplus/GeV2; - *_m2minus1 +=mminus/GeV2; - *_m2pipi1 +=mpipi/GeV2; - if(_points1.size()<200000) { - _points1.push_back(make_pair(mplus,mminus)); - } - } - else if ((ppim.size()==1&&pkp.size()==1&&ppi0.size()==1)|| - (ppip.size()==1&&pkm.size()==1&&ppi0.size()==1)) { - if(part->id()==ParticleID::D0) { - mneut =(pkm .back()+ppip.back()).m2(); - mminus=(pkm .back()+ppi0.back()).m2(); - mpipi =(ppip.back()+ppi0.back()).m2(); - } - else { - mneut =(pkp .back()+ppim.back()).m2(); - mminus=(pkp .back()+ppi0.back()).m2(); - mpipi =(ppim.back()+ppi0.back()).m2(); - } - *_m2neutral2 +=mneut/GeV2; - *_m2minus2 +=mminus/GeV2; - *_m2pipi2 +=mpipi/GeV2; - if(_points2.size()<200000) { - _points2.push_back(make_pair(mminus,mneut)); - } - } - else if ((ppip.size()==2&&pkm.size()==1)|| - (ppim.size()==2&&pkp.size()==1)) { - if(part->id()==ParticleID::Dplus) { - mplus = (pkm[0] +ppip[0]).m2(); - mminus = (pkm[0] +ppip[1]).m2(); - mpipi = (ppip[0]+ppip[1]).m2(); - } - else { - mplus = (pkp[0] +ppim[0]).m2(); - mminus = (pkp[0] +ppim[1]).m2(); - mpipi = (ppim[0]+ppim[1]).m2(); - } - if(mplusid()==ParticleID::Dplus) { - mminus = (pk0[0]+ppip[0]).m2(); - mplus = (pk0[0]+ppi0[0]).m2(); - mpipi = (ppip[0]+ppi0[0]).m2(); - } - else { - mminus = (pk0[0]+ppim[0]).m2(); - mplus = (pk0[0]+ppi0[0]).m2(); - mpipi = (ppim[0]+ppi0[0]).m2(); - } - *_m2Kpip4 += mminus/GeV2; - *_m2pipi4 += mpipi /GeV2; - *_m2Kpi04 += mplus /GeV2; - if(_points4.size()<200000) { - _points4.push_back(make_pair(mplus,mpipi)); - } - } - else if ((ppim.size()==1&&pkp.size()==1&&ppip.size()==1)|| - (ppim.size()==1&&pkm.size()==1&&ppip.size()==1)) { - unsigned int itype(0); - if(part->id()==ParticleID::Dplus) { - itype=1; - mplus = (pkp [0]+ppip[0]).m2(); - mminus = (pkp [0]+ppim[0]).m2(); - mpipi = (ppip[0]+ppim[0]).m2(); - } - else if(part->id()==ParticleID::Dminus) { - itype=1; - mplus = (pkm [0]+ppim[0]).m2(); - mminus = (pkm [0]+ppip[0]).m2(); - mpipi = (ppip[0]+ppim[0]).m2(); - } - else if(part->id()==ParticleID::D_splus) { - itype=2; - mplus = (pkp [0]+ppip[0]).m2(); - mminus = (pkp [0]+ppim[0]).m2(); - mpipi = (ppip[0]+ppim[0]).m2(); - } - else if(part->id()==ParticleID::D_sminus) { - itype=2; - mplus = (pkm [0]+ppim[0]).m2(); - mminus = (pkm [0]+ppip[0]).m2(); - mpipi = (ppip[0]+ppim[0]).m2(); - } - else return; - if(itype==1) { - *_mkppim5 +=mminus/GeV2; - *_mkppip5 +=mplus /GeV2; - *_mpippim5+=mpipi /GeV2; - _points5.push_back(make_pair(mminus,mpipi)); - } - else { - *_mkppim6 +=mminus/GeV2; - *_mkppip6 +=mplus /GeV2; - *_mpippim6+=mpipi /GeV2; - _points6.push_back(make_pair(mminus,mpipi)); - } - } - - -} - -void DDalitzAnalysis::persistentOutput(PersistentOStream & ) const { -} - -void DDalitzAnalysis::persistentInput(PersistentIStream & , int) { -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeClass -describeHerwigDDalitzAnalysis("Herwig::DDalitzAnalysis", "HwDecayAnalysis.so"); - -void DDalitzAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the DDalitzAnalysis class"); - -} - -void DDalitzAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _m2plus1->topdrawOutput(output,Frame|Errorbars,"RED", - "m0+1223 for D203RK203P2+3P2-3", - " X XX X X XW X XGX XGX X", - "1/GdG/m0+1223/GeV2-23", - " F F X XX X X X", - "m0+1223/GeV223", - " X XX X X X"); - _m2minus1->topdrawOutput(output,Frame|Errorbars,"RED", - "m0-1223 for D203RK203P2+3P2-3", - " X XX X X XW X XGX XGX X", - "1/GdG/m0-1223/GeV2-23", - " F F X XX X X X", - "m0-1223/GeV223", - " X XX X X X"); - _m2pipi1->topdrawOutput(output,Frame|Errorbars,"RED", - "m0PP1223 for D203RK203P2+3P2-3", - " XGGXX X X XW X XGX XGX X", - "1/GdG/m0PP1223/GeV2-23", - " F F XGGXX X X X", - "m0PP1223/GeV223", - " XGGXX X X X"); - _m2minus2->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2-3P2031223 for D203RK2-3P2+3P203", - " X X XGX XXX X X XW X XGX XGX X", - "1/GdG/m0K2-3P2031223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2-3P2031223/GeV223", - " X X XGX XXX X X X"); - _m2neutral2->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2-3P2+31223 for D203RK2-3P2+3P203", - " X X XGX XXX X X XW X XGX XGX X", - "1/GdG/m0K2-3P2+31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2-3P2+31223/GeV223", - " X X XGX XXX X X X"); - _m2pipi2->topdrawOutput(output,Frame|Errorbars,"RED", - "m0PP1223 for D203RK2-3P2+3P203", - " XGGXX X X XW X XGX XGX X", - "1/GdG/m0PP1223/GeV2-23", - " F F XGGXX X X X", - "m0PP1223/GeV223", - " XGGXX X X X"); - _mKpilow3->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2-3P2+31223 for D2+3RK2-3P2+3P2+3 low", - " X X XGX XXX X X XW X XGX XGX X ", - "1/GdG/m0K2-3P2+31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2-3P2+31223/GeV223", - " X X XGX XXX X X X"); - _mKpihigh3->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2-3P2+31223 for D2+3RK2-3P2+3P2+3 high", - " X X XGX XXX X X XW X XGX XGX X ", - "1/GdG/m0K2-3P2+31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2-3P2+31223/GeV223", - " X X XGX XXX X X X"); - _mKpiall3->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2-3P2+31223 for D2+3RK2-3P2+3P2+3 all", - " X X XGX XXX X X XW X XGX XGX X ", - "1/GdG/m0K2-3P2+31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2-3P2+31223/GeV223", - " X X XGX XXX X X X"); - _mpipi3->topdrawOutput(output,Frame|Errorbars,"RED", - "m0P2+3P2+31223 for D2+3RK2-3P2+3P2+3 all", - " XGX XGX XXX X X XW X XGX XGX X ", - "1/GdG/m0P2+3P2+31223/GeV2-23", - " F F XGX XGX XXX X X X", - "m0P2+3P2+31223/GeV223", - " XGX XGX XXX X X X"); - _m2Kpip4->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K203P2+31223 for D2+3RK203P2+3P203", - " X X XGX XXX X X XW X XGX XGX X", - "1/GdG/m0K203P2+31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K203P2+31223/GeV223", - " X X XGX XXX X X X"); - _m2pipi4->topdrawOutput(output,Frame|Errorbars,"RED", - "m0P203P2+31223 for D2+3RK203P2+3P203", - " XGX XGX XXX X X XW X XGX XGX X", - "1/GdG/m0P203P2+31223/GeV2-23", - " F F XGX XGX XXX X X X", - "m0P203P2+31223/GeV223", - " XGX XGX XXX X X X"); - _m2Kpi04->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K203P2-31223 for D2+3RK203P2+3P203", - " X X XGX XXX X X XW X XGX XGX X", - "1/GdG/m0K203P2-31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K203P2-31223/GeV223", - " X X XGX XXX X X X"); - _mkppim5->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2+3P2-31223 for D2+3RK2+3P2-3P2+3", - " X X XGX XXX X X XW X XGX XGX X", - "1/GdG/m0K2+3P2-31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2+3P2-31223/GeV223", - " X X XGX XXX X X X"); - _mkppip5->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2+3P2+31223 for D2+3RK2+3P2-3P2+3", - " X X XGX XXX X X XW X XGX XGX X", - "1/GdG/m0K2+3P2+31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2+3P2+31223/GeV223", - " X X XGX XXX X X X"); - _mpippim5->topdrawOutput(output,Frame|Errorbars,"RED", - "m0P2+3P2-31223 for D2+3RK2+3P2-3P2+3", - " XGX XGX XXX X X XW X XGX XGX X", - "1/GdG/m0P2+3P2-31223/GeV2-23", - " F F XGX XGX XXX X X X", - "m0P2+3P2-31223/GeV223", - " XGX XGX XXX X X X"); - _mkppim6->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2+3P2-31223 for D0s12+3RK2+3P2-3P2+3", - " X X XGX XXX X X XX XW X XGX XGX X", - "1/GdG/m0K2+3P2-31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2+3P2-31223/GeV223", - " X X XGX XXX X X X"); - _mkppip6->topdrawOutput(output,Frame|Errorbars,"RED", - "m0K2+3P2+31223 for D0s12+3RK2+3P2-3P2+3", - " X X XGX XXX X X XX XW X XGX XGX X", - "1/GdG/m0K2+3P2+31223/GeV2-23", - " F F X X XGX XXX X X X", - "m0K2+3P2+31223/GeV223", - " X X XGX XXX X X X"); - _mpippim6->topdrawOutput(output,Frame|Errorbars,"RED", - "m0P2+3P2-31223 for D0s12+3RK2+3P2-3P2+3", - " XGX XGX XXX X X XX XW X XGX XGX X", - "1/GdG/m0P2+3P2-31223/GeV2-23", - " F F XGX XGX XXX X X X", - "m0P2+3P2-31223/GeV223", - " XGX XGX XXX X X X"); - if(!_points1.empty()) { - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x 0 3 y 0 3\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for D203RK203P2+3P2-3\"\n"; - output << "case \" X XW X XGX XGX X\"\n"; - output << "title left \"m0-1223/GeV223\"\n"; - output << "case \" X XX X X X\"\n"; - output << "title bottom \"m0+1223/GeV223\"\n"; - output << "case \" X XX X X X\"\n"; - for(unsigned int ix=0;ix<_points1.size();++ix) { - output << _points1[ix].first /GeV2 << " " - << _points1[ix].second/GeV2 << "\n"; - if(ix%50000==0) output << "plot\n"; - } - output << "plot\n"; - } - if(!_points2.empty()) { - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x 0 3 y 0 3\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for D203RK2-3P2+3P203\"\n"; - output << "case \" X XW X XGX XGX X\"\n"; - output << "title left \"m0-1223/GeV223\"\n"; - output << "case \" X XX X X X\"\n"; - output << "title bottom \"m0+1223/GeV223\"\n"; - output << "case \" X XX X X X\"\n"; - for(unsigned int ix=0;ix<_points2.size();++ix) { - output << _points2[ix].first /GeV2 << " " - << _points2[ix].second/GeV2 << "\n"; - if(ix%50000==0) output << "plot\n"; - } - output << "plot\n"; - } - if(!_points3.empty()) { - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x 0 3 y 0 3\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for D2+3RK2-3P2+3P2+3\"\n"; - output << "case \" X XW X XGX XGX X\"\n"; - output << "title left \"m0K2-3P2+31223\"\n"; - output << "case \" X X XGX XXX X\"\n"; - output << "title bottom \"m0P2+3P2+31223\"\n"; - output << "case \" XGX XGX XXX X\"\n"; - for(unsigned int ix=0;ix<_points3.size();++ix) { - output << _points3[ix].first /GeV2 << " " - << _points3[ix].second/GeV2 << "\n"; - if(ix%50000==0) output << "plot\n"; - } - output << "plot\n"; - } - if(!_points4.empty()) { - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x 0 3 y 0 3\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for D2+3RK203P2+3P203\"\n"; - output << "case \" X XW X XGX XGX X\"\n"; - output << "title left \"m0P2+3P2031223\"\n"; - output << "case \" XGX XGX XXX X\"\n"; - output << "title bottom \"m0K203P2031223\"\n"; - output << "case \" X X XGX XXX X\"\n"; - for(unsigned int ix=0;ix<_points4.size();++ix) { - output << _points4[ix].first /GeV2 << " " - << _points4[ix].second/GeV2 << "\n"; - if(ix%50000==0) output << "plot\n"; - } - output << "plot\n"; - } - if(!_points5.empty()) { - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x 0 3 y 0 3\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for D2+3RK2+3P2-3P2+3\"\n"; - output << "case \" X XW X XGX XGX X\"\n"; - output << "title left \"m0P2+3P2-31223\"\n"; - output << "case \" XGX XGX XXX X\"\n"; - output << "title bottom \"m0K2+3P2-31223\"\n"; - output << "case \" X X XGX XXX X\"\n"; - for(unsigned int ix=0;ix<_points5.size();++ix) { - output << _points5[ix].first /GeV2 << " " - << _points5[ix].second/GeV2 << "\n"; - if(ix%50000==0) output << "plot\n"; - } - output << "plot\n"; - } - if(!_points6.empty()) { - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x 0 3.5 y 0 2.5\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for D0s12+3RK2+3P2-3P2+3\"\n"; - output << "case \" X XX XW X XGX XGX X\"\n"; - output << "title left \"m0P2+3P2-31223\"\n"; - output << "case \" XGX XGX XXX X\"\n"; - output << "title bottom \"m0K2+3P2-31223\"\n"; - output << "case \" X X XGX XXX X\"\n"; - for(unsigned int ix=0;ix<_points6.size();++ix) { - output << _points6[ix].first /GeV2 << " " - << _points6[ix].second/GeV2 << "\n"; - if(ix%50000==0) output << "plot\n"; - } - output << "plot\n"; - } -} - -void DDalitzAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - _m2plus1 = new_ptr(Histogram(0.,3.,200)); - _m2minus1 = new_ptr(Histogram(0.,3.,200)); - _m2pipi1 = new_ptr(Histogram(0.,2.,200)); - _m2minus2 = new_ptr(Histogram(0.,3.,200)); - _m2neutral2 = new_ptr(Histogram(0.,3.,200)); - _m2pipi2 = new_ptr(Histogram(0.,2.,200)); - _mKpilow3 = new_ptr(Histogram(0.,3.,200)); - _mKpihigh3 = new_ptr(Histogram(0.,3.,200)); - _mKpiall3 = new_ptr(Histogram(0.,3.,200)); - _mpipi3 = new_ptr(Histogram(0.,2.,200)); - _m2Kpip4 = new_ptr(Histogram(0.,3.,200)); - _m2pipi4 = new_ptr(Histogram(0.,2.,200)); - _m2Kpi04 = new_ptr(Histogram(0.,3.,200)); - _mkppim5 = new_ptr(Histogram(0.,3.,200)); - _mkppip5 = new_ptr(Histogram(0.,3.,200)); - _mpippim5 = new_ptr(Histogram(0.,3.,200)); - _mkppim6 = new_ptr(Histogram(0.,3.5,200)); - _mkppip6 = new_ptr(Histogram(0.,3.5,200)); - _mpippim6 = new_ptr(Histogram(0.,3.,200)); -} diff --git a/Contrib/DecayAnalysis/DDalitzAnalysis.h b/Contrib/DecayAnalysis/DDalitzAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/DDalitzAnalysis.h +++ /dev/null @@ -1,303 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_DDalitzAnalysis_H -#define HERWIG_DDalitzAnalysis_H -// -// This is the declaration of the DDalitzAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" -#include "ThePEG/EventRecord/Particle.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the DDalitzAnalysis class. - * - * @see \ref DDalitzAnalysisInterfaces "The interfaces" - * defined for DDalitzAnalysis. - */ -class DDalitzAnalysis: public AnalysisHandler { - -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); - - /** - * Transform the event to the desired Lorentz frame and return the - * corresponding LorentzRotation. - * @param event a pointer to the Event to be transformed. - * @return the LorentzRotation used in the transformation. - */ - virtual LorentzRotation transform(tEventPtr event) const; - - /** - * 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: - - /** @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(); - -protected: - - /** - * Find the stable decay products - */ - void findChildren(tPPtr,ParticleVector &); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - DDalitzAnalysis & operator=(const DDalitzAnalysis &) = delete; - -private: - - /** - * Histograms for \f$D^0\to \bar{K}^0\pi^+\pi^-\f$ - */ - //@{ - /** - * \f$m^2_+\f$ - */ - HistogramPtr _m2plus1; - - /** - * \f$m^2_+\f$ - */ - HistogramPtr _m2minus1; - - /** - * \f$m^2_{\pi\pi}\f$ - */ - HistogramPtr _m2pipi1; - - /** - * Vectors for the Dalitz plot - */ - vector > _points1; - //@} - - /** - * Histograms for \f$D^0\to K^-\pi^+\pi^0\f$ - */ - //@{ - /** - * Histogram for the \f$K^-\pi^+\f$ mass - */ - HistogramPtr _m2minus2; - - /** - * Histogram for the \f$\pi^+\pi^0\f$ mass - */ - HistogramPtr _m2pipi2; - - /** - * Histogram for the \f$K^-\pi^0\f$ mass - */ - HistogramPtr _m2neutral2; - - /** - * Vectors for the Dalitz plot - */ - vector > _points2; - //@} - - /** - * Histograms for \f$D^+\to K^-\pi^+\pi^+\f$ - */ - //@{ - /** - * Histogram for \f$K^-\pi^+\f$ low - */ - HistogramPtr _mKpilow3; - - /** - * Histogram for \f$K^-\pi^+\f$ high - */ - HistogramPtr _mKpihigh3; - - /** - * Histogram for \f$K^-\pi^+\f$ all - */ - HistogramPtr _mKpiall3; - - /** - * Histogram for \f$\pi^+\pi^-\f$ - */ - HistogramPtr _mpipi3; - - /** - * Vectors for the Dalitz plot - */ - vector > _points3; - //@} - - /** - * Histograms for \f$D^+\to\bar{K}^0\pi^+\pi^0\f$ - */ - //@{ - /** - * Histogram for the \f$\bar{K}^0\pi^+\f$ mass - */ - HistogramPtr _m2Kpip4; - - /** - * Histogram for the \f$\pi^+\pi^0\f$ mass - */ - HistogramPtr _m2pipi4; - - /** - * Histogram for the \f$\bar{K}^0\pi^0\f$ mass - */ - HistogramPtr _m2Kpi04; - - /** - * Vectors for the Dalitz plot - */ - vector > _points4; - //@} - - /** - * Histograms for \f$D^+\to K^+\pi^-\pi^+\f$ - */ - //@{ - /** - * Histogram for \f$K^+\pi^-\f$ - */ - HistogramPtr _mkppim5; - - /** - * Histogram for \f$K^+\pi^+\f$ - */ - HistogramPtr _mkppip5; - - /** - * Histogram for \f$\pi^+\pi^-\f$ - */ - HistogramPtr _mpippim5; - - /** - * Vectors for the Dalitz plot - */ - vector > _points5; - //@} - - /** - * Histograms for \f$D_s^+\to K^+\pi^-\pi^+\f$ - */ - //@{ - /** - * Histogram for \f$K^+\pi^-\f$ - */ - HistogramPtr _mkppim6; - - /** - * Histogram for \f$K^+\pi^+\f$ - */ - HistogramPtr _mkppip6; - - /** - * Histogram for \f$\pi^+\pi^-\f$ - */ - HistogramPtr _mpippim6; - - /** - * Vectors for the Dalitz plot - */ - vector > _points6; - //@} -}; - -} - -#endif /* HERWIG_DDalitzAnalysis_H */ diff --git a/Contrib/DecayAnalysis/EtaDecayAnalysis.cc b/Contrib/DecayAnalysis/EtaDecayAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/EtaDecayAnalysis.cc +++ /dev/null @@ -1,368 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the EtaDecayAnalysis class. -// - -#include "EtaDecayAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/EventRecord/Event.h" - -using namespace Herwig; -void EtaDecayAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // Rotate to CMS, extract final state particles and call analyze(particles). - // find all eta and eta' particles - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) - {if((**iter).id()==ParticleID::eta||(**iter).id()==ParticleID::etaprime) - {particles.push_back(*iter);}} - } - // analyse them - analyze(particles); -} - -void EtaDecayAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void EtaDecayAnalysis::analyze(tPPtr part) { - // ensure 2 or 3 decay products - if(part->children().size()!=3&&part->children().size()!=2) return; - int imeson; - if(part->id()==ParticleID::eta) imeson=0; - else if(part->id()==ParticleID::etaprime) imeson=1; - else return; - // pi0 gamma gamma analysis - if(part->children().size()==3&& - part->children()[0]->id()==ParticleID::pi0&& - part->children()[1]->id()==ParticleID::gamma&& - part->children()[2]->id()==ParticleID::gamma) { - Lorentz5Momentum ptemp= - part->children()[1]->momentum()+part->children()[2]->momentum(); - ptemp.rescaleMass(); - *_mgammagamma[imeson] +=ptemp.mass()/MeV; - ptemp=part->children()[0]->momentum()+part->children()[1]->momentum(); - ptemp.rescaleMass(); - *_mpi0gamma[imeson] +=ptemp.mass()/MeV; - ptemp=part->children()[0]->momentum()+part->children()[2]->momentum(); - ptemp.rescaleMass(); - *_mpi0gamma[imeson] +=ptemp.mass()/MeV; - } - // pi+pi-gamma analysis - else if((part->children().size()==3&& - part->children()[0]->id()==ParticleID::piplus&& - part->children()[1]->id()==ParticleID::piminus&& - part->children()[2]->id()==ParticleID::gamma)|| - (part->children().size()==2&& - part->children()[0]->id()==ParticleID::rho0&& - part->children()[1]->id()==ParticleID::gamma)) { - Lorentz5Momentum pout[3]; - if(part->children().size()==2) { - pout[0]=part->children()[0]->children()[0]->momentum(); - pout[1]=part->children()[0]->children()[1]->momentum(); - pout[2]=part->children()[1]->momentum(); - } - else { - pout[0]=part->children()[0]->momentum(); - pout[1]=part->children()[1]->momentum(); - pout[2]=part->children()[2]->momentum(); - } - Lorentz5Momentum ptemp=pout[0]+pout[1]; - ptemp.rescaleMass(); - *_mpippim[imeson]+=ptemp.mass()/MeV; - Energy egamma = - 0.5*(part->mass()*part->mass()-ptemp.mass()*ptemp.mass())/part->mass(); - *_photonenergy[imeson]+=egamma/MeV; - ptemp=pout[imeson]+pout[2];ptemp.rescaleMass(); - *_mpipgamma[imeson]+=ptemp.mass()/MeV; - ptemp=pout[1]+pout[2];ptemp.rescaleMass(); - *_mpimgamma[imeson]+=ptemp.mass()/MeV; - } - else { - vector ppim,ppip,ppi0,peta; - for(unsigned int ix=0;ixchildren().size();++ix) { - long id = part->children()[ix]->id(); - if(id==ParticleID::piplus) - ppip .push_back(part->children()[ix]->momentum()); - else if(id==ParticleID::piminus) - ppim .push_back(part->children()[ix]->momentum()); - else if(id==ParticleID::pi0) - ppi0 .push_back(part->children()[ix]->momentum()); - else if(id==ParticleID::eta) - peta .push_back(part->children()[ix]->momentum()); - } - if(ppi0.size()==3) { - *_dpi0pi0[imeson]+=(ppi0[0]+ppi0[1]).m()/MeV; - *_dpi0pi0[imeson]+=(ppi0[0]+ppi0[2]).m()/MeV; - *_dpi0pi0[imeson]+=(ppi0[1]+ppi0[2]).m()/MeV; - } - else if(ppip.size()==1&&ppim.size()==1&&ppi0.size()==1) { - *_dpi0pip[imeson]+=(ppi0[0]+ppip[0]).m()/MeV; - *_dpi0pim[imeson]+=(ppi0[0]+ppim[0]).m()/MeV; - *_dpippim[imeson]+=(ppip[0]+ppim[0]).m()/MeV; - } - else if(ppi0.size()==2&&peta.size()==1) { - *_dpi0pi0[2]+=(ppi0[0]+ppi0[1]).m()/MeV; - *_dpi0eta[0]+=(ppi0[0]+peta[0]).m()/MeV; - *_dpi0eta[0]+=(ppi0[1]+peta[0]).m()/MeV; - } - else if(ppip.size()==1&&ppim.size()==1&&peta.size()==1) { - *_dpippim[2]+=(ppip[0]+ppim[0]).m()/MeV; - *_dpipeta[0]+=(ppip[0]+peta[0]).m()/MeV; - *_dpimeta[0]+=(ppim[0]+peta[0]).m()/MeV; - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigEtaDecayAnalysis("Herwig::EtaDecayAnalysis", "HwDecayAnalysis.so"); - -void EtaDecayAnalysis::Init() { - - static ClassDocumentation documentation - ("The EtaDecayAnalysis class performs the analysis of the decays of eta and eta\'" - " mesons"); - -} - -void EtaDecayAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _mgammagamma[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "GG mass in HRP203GG", - "GG GWGX XGG", - "1/GdG/dm0GG1/MeV2-13", - " F F XGGX X X", - "m0GG1/MeV", - " XGGX "); - _mpi0gamma[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203G mass in HRP203GG", - "GX XG GWGX XGG", - "1/GdG/dm0P203G1/MeV2-13", - " F F XGX XGX X X", - "m0P203G1/MeV", - " XGX XGX "); - _mgammagamma[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "GG mass in H'RP203GG", - "GG G WGX XGG", - "1/GdG/dm0GG1/MeV2-13", - " F F XGGX X X", - "m0GG1/MeV", - " XGGX "); - _mpi0gamma[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203G mass in H'RP203GG", - "GX XG G WGX XGG", - "1/GdG/dm0P203G1/MeV2-13", - " F F XGX XGX X X", - "m0P203G1/MeV", - " XGX XGX "); - _mpipgamma[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2+3G mass in HRP2+3P2-3G", - "GX XG GWGX XGX XG", - "1/GdG/dm0P2+3G1/MeV2-13", - " F F XGX XGX X X", - "m0P2+3G1/MeV", - " XGX XGX "); - _mpimgamma[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2-3G mass in HRP2+3P2-3G", - "GX XG GWGX XGX XG", - "1/GdG/dm0P2-3G1/MeV2-13", - " F F XGX XGX X X", - "m0P2-3G1/MeV", - " XGX XGX "); - _photonenergy[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "G Energy in HRP2+3P2-3G", - "G GWGX XGX XG", - "1/GdG/dE0G1/MeV2-13", - " F F XGX X X", - "E0G1/MeV", - " XGX "); - _mpippim[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2-3P2+3 mass in HRP2+3P2-3G", - "GX XGX X GWGX XGX XG", - "1/GdG/dm0P2-3P2+31/MeV2-13", - " F F 0GX XGX X1 X X", - "m0P2-3P2+31/MeV", - " XGX XGX XX "); - _mpipgamma[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2+3G mass in H'RP2+3P2-3G", - "GX XG G WGX XGX XG", - "1/GdG/dm0P2+3G1/MeV2-13", - " F F XGX XGX X X", - "m0P2+3G1/MeV", - " XGX XGX "); - _mpimgamma[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2-3G mass in H'RP2+3P2-3G", - "GX XG G WGX XGX XG", - "1/GdG/dm0P2-3G1/MeV2-13", - " F F XGX XGX X X", - "m0P2-3G1/MeV", - " XGX XGX "); - _photonenergy[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "G Energy in H'RP2+3P2-3G", - "G G WGX XGX XG", - "1/GdG/dE0G1/MeV2-13", - " F F XGX X X", - "E0G1/MeV", - " XGX "); - _mpippim[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2-3P2+3 mass in H'RP2+3P2-3G", - "GX XGX X G WGX XGX XG", - "1/GdG/dm0P2-3P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P2-3P2+31/MeV", - " XGX XGX XX "); - _dpi0pi0[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203P203 mass in HRP203P203P203", - "GX XGX X GWGX XGX XGX X", - "1/GdG/dm0P203P2031/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2031/MeV", - " XGX XGX XX "); - _dpi0pi0[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203P203 mass in H'RP203P203P203", - "GX XGX X G WGX XGX XGX X", - "1/GdG/dm0P203P2031/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2031/MeV", - " XGX XGX XX "); - _dpippim[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2-3P2+3 mass in HRP2+3P2-3P203", - "GX XGX X GWGX XGX XGX X", - "1/GdG/dm0P2-3P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P2-3P2+31/MeV", - " XGX XGX XX "); - _dpi0pip[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203P2+3 mass in HRP2+3P2-3P203", - "GX XGX X GWGX XGX XGX X", - "1/GdG/dm0P203P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2+31/MeV", - " XGX XGX XX "); - _dpi0pim[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203P2-3 mass in HRP2+3P2-3P203", - "GX XGX X GWGX XGX XGX X", - "1/GdG/dm0P203P2-31/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2-31/MeV", - " XGX XGX XX "); - _dpi0pim[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203P2-3 mass in H'RP2+3P2-3P203", - "GX XGX X G WGX XGX XGX X", - "1/GdG/dm0P203P2-31/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2-31/MeV", - " XGX XGX XX "); - _dpi0pip[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203P2+3 mass in H'RP2+3P2-3P203", - "GX XGX X G WGX XGX XGX X", - "1/GdG/dm0P203P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2+31/MeV", - " XGX XGX XX "); - _dpippim[1]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2-3P2+3 mass in H'RP2+3P2-3P203", - "GX XGX X G WGX XGX XGX X", - "1/GdG/dm0P2-3P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P2-3P2+31/MeV", - " XGX XGX XX "); - _dpippim[2]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P2-3P2+3 mass in H'RP2+3P2-3H", - "GX XGX X G WGX XGX XG", - "1/GdG/dm0P2-3P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P2-3P2+31/MeV", - " XGX XGX XX "); - _dpipeta[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "HP2+3 mass in H'RP2+3P2-3H", - "GGX X G WGX XGX XG", - "1/GdG/dm0HP2+31/MeV2-13", - " F F XGGX XX X X", - "m0HP2+31/MeV", - " XGGX XX "); - _dpimeta[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "HP2-3 mass in H'RP2+3P2-3H", - "GGX X G WGX XGX XG", - "1/GdG/dm0HP2-31/MeV2-13", - " F F XGGX XX X X", - "m0HP2-31/MeV", - " XGGX XX "); - _dpi0pi0[2]->topdrawOutput(output,Frame|Errorbars, - "RED", - "P203P203 mass in H'RP203P203H", - "GX XGX X G WGX XGX XG", - "1/GdG/dm0P203P2031/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2031/MeV", - " XGX XGX XX "); - _dpi0eta[0]->topdrawOutput(output,Frame|Errorbars, - "RED", - "HP203 mass in H'RP203P203H", - "GGX X G WGX XGX XG", - "1/GdG/dm0HP2031/MeV2-13", - " F F XGGX XX X X", - "m0HP2031/MeV", - " XGGX XX "); -} - -void EtaDecayAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - double meta[2]={547.45, 957.78}; - for(unsigned int ix=0;ix<2;++ix) { - _mgammagamma .push_back(new_ptr(Histogram(0.,meta[ix],200))); - _mpi0gamma .push_back(new_ptr(Histogram(0.,meta[ix],200))); - _mpipgamma .push_back(new_ptr(Histogram(0.,meta[ix],200))); - _mpimgamma .push_back(new_ptr(Histogram(0.,meta[ix],200))); - _photonenergy.push_back(new_ptr(Histogram(0.,meta[ix],200))); - _mpippim .push_back(new_ptr(Histogram(0.,meta[ix],200))); - - _dpippim .push_back(new_ptr(Histogram(200.,meta[ix],200))); - _dpi0pi0 .push_back(new_ptr(Histogram(200.,meta[ix],200))); - _dpi0pip .push_back(new_ptr(Histogram(200.,meta[ix],200))); - _dpi0pim .push_back(new_ptr(Histogram(200.,meta[ix],200))); - } - _dpi0pi0.push_back(new_ptr(Histogram(200.,500.,200))); - _dpippim.push_back(new_ptr(Histogram(200.,500.,200))); - _dpipeta.push_back(new_ptr(Histogram(500.,meta[1],200))); - _dpimeta.push_back(new_ptr(Histogram(500.,meta[1],200))); - _dpi0eta.push_back(new_ptr(Histogram(500.,meta[1],200))); -} diff --git a/Contrib/DecayAnalysis/EtaDecayAnalysis.h b/Contrib/DecayAnalysis/EtaDecayAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/EtaDecayAnalysis.h +++ /dev/null @@ -1,200 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_EtaDecayAnalysis_H -#define HERWIG_EtaDecayAnalysis_H -// -// This is the declaration of the EtaDecayAnalysis class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * The EtaDecayAnalysis class performs the analysis of the decays of - * the \f$\eta\f$ and \f$\eta'\f$ mesons. - * - * @see \ref EtaDecayAnalysisInterfaces "The interfaces" - * defined for EtaDecayAnalysis. - */ -class EtaDecayAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - EtaDecayAnalysis & operator=(const EtaDecayAnalysis &) = delete; - -private: - - /** - * Histograms for the decay \f$\eta\to\pi^0\gamma\gamma\f$ - */ - //@{ - /** - * Histogram for the mass of \f$\gamma\gamma\f$ - */ - vector _mgammagamma; - - /** - * Histogrma for the mass of \f$\pi^0\gamma\f$ - */ - vector _mpi0gamma; - //@} - - /** - * Histograms for the decay \f$\eta\to\pi^+\pi^-\gamma\f$ - */ - //@{ - /** - * Histogram for the mass of \f$\pi^+\gamma\f$ - */ - vector _mpipgamma; - - /** - * Histogram for the mass of \f$\pi^-\gamma\f$ - */ - vector _mpimgamma; - - /** - * Histogram for the mass of \f$\pi^+\pi^-\f$ - */ - vector _mpippim; - - /** - * Histogram for the photon energy - */ - vector _photonenergy; - //@} - - /** - * Histograms for the decay \f$\eta\pi\pi\pi\f$ and \f$\eta'\to\eta\pi\pi\f$. - */ - //@{ - /** - * Histogram for the mass of \f$\pi^+\pi^-\f$ - */ - vector _dpippim; - - /** - * Histogram for the mass of \f$\pi^0\pi^0\f$ - */ - vector _dpi0pi0; - - /** - * Histogram for the mass of \f$\pi^0\pi^+\f$ - */ - vector _dpi0pip; - - /** - * Histogram for the mass of \f$\pi^0\pi^-\f$ - */ - vector _dpi0pim; - - /** - * Histogram for the mass of \f$\pi^+\eta\f$ - */ - vector _dpipeta; - - /** - * Histogram for the mass of \f$\pi^-\eta\f$ - */ - vector _dpimeta; - - /** - * Histogram for the mass of \f$\pi^0\eta\f$ - */ - vector _dpi0eta; - - //@} -}; - -} - -#endif /* HERWIG_EtaDecayAnalysis_H */ diff --git a/Contrib/DecayAnalysis/Makefile.in b/Contrib/DecayAnalysis/Makefile.in deleted file mode 100644 --- a/Contrib/DecayAnalysis/Makefile.in +++ /dev/null @@ -1,52 +0,0 @@ -# -*- Makefile -*- (for emacs) - -# -# This Makefile is intended for compiling Herwig++ plugins -# You can find plugins here: INSERT URL -# -# This Makefile received very little testing, -# any bug reports are very welcome! -# - -# location of include files -THEPEGINCLUDE= -HERWIGINCLUDE= -GSLINCLUDE= -LDFLAGS = -SHARED_FLAG = -INCLUDE = $(THEPEGINCLUDE) $(HERWIGINCLUDE) $(GSLINCLUDE) -# -# C++ flags -# -CXX = -CXXFLAGS = - -ALLCCFILES=$(shell echo *.cc) - -default : HwDecayAnalysis.so - -%.o : %.cc %.h - $(CXX) -fPIC $(CPPFLAGS) $(INCLUDE) $(CXXFLAGS) -c -shared $< -o $@ - -HwDecayAnalysis.so: a1DecayAnalysis.o PScalarVectorFermionsAnalysis.o\ - BabarBDecayAnalysis.o SemiLeptonicDecayAnalysis.o\ - BeamCorrelationAnalysis.o SemiLeptonicDPiAnalysis.o\ - BranchingRatioAnalysis.o Upsilon4SMultiplicityCount.o\ - BtoSGammaAnalysis.o Upsilon4SSpectrumAnalysis.o\ - DDalitzAnalysis.o VectorPScalarFermionsAnalysis.o\ - EtaDecayAnalysis.o VffGammaAnalysis.o VPPGammaAnalysis.o\ - OmegaPhi3PionAnalysis.o OniumToOniumPiPiAnalysis.o\ - ZPhotonsAnalysis.o Pi4ElectronAnalysis.o - $(CXX) -fPIC $(CPPFLAGS) $(INCLUDE) $(CXXFLAGS) \ - a1DecayAnalysis.o PScalarVectorFermionsAnalysis.o\ - BabarBDecayAnalysis.o SemiLeptonicDecayAnalysis.o\ - BeamCorrelationAnalysis.o SemiLeptonicDPiAnalysis.o\ - BranchingRatioAnalysis.o Upsilon4SMultiplicityCount.o\ - BtoSGammaAnalysis.o Upsilon4SSpectrumAnalysis.o\ - DDalitzAnalysis.o VectorPScalarFermionsAnalysis.o\ - EtaDecayAnalysis.o VffGammaAnalysis.o VPPGammaAnalysis.o\ - OmegaPhi3PionAnalysis.o OniumToOniumPiPiAnalysis.o\ - ZPhotonsAnalysis.o Pi4ElectronAnalysis.o $(SHARED_FLAG) $(LDFLAGS) -o HwDecayAnalysis.so - -clean: - rm -f $(ALLCCFILES:.cc=.o) HwDecayAnalysis.so diff --git a/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.cc b/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.cc +++ /dev/null @@ -1,240 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the OmegaPhi3PionAnalysis class. -// - -#include "OmegaPhi3PionAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/Parameter.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void OmegaPhi3PionAnalysis::analyze(tEventPtr event,long , int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all omega and phi particles - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).id()==ParticleID::omega||(**iter).id()==ParticleID::phi) { - particles.push_back(*iter); - } - } - } - // analyse them - analyze(particles); -} - -void OmegaPhi3PionAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void OmegaPhi3PionAnalysis::analyze(tPPtr part) { - Lorentz5Momentum pip,pim,pi0; unsigned int imode; - bool allowed(false); - // reorder the particles - ParticleVector children=part->children(); - if(children.size()==2) { - // vector first - if(abs(children[1]->id())%10==3) swap(children[0],children[1]); - if((children[0]->id()==113||abs(children[0]->id())==213)&& - (children[1]->id()==111||abs(children[1]->id())==211)) { - allowed=true; - vector temp; - temp.push_back(children[1]); - temp.push_back(children[0]->children()[0]); - temp.push_back(children[0]->children()[1]); - for(unsigned int ix=0;ix<3;++ix) { - if(temp[ix]->id()== 111) pi0=temp[ix]->momentum(); - if(temp[ix]->id()== 211) pip=temp[ix]->momentum(); - if(temp[ix]->id()==-211) pim=temp[ix]->momentum(); - } - } - } - else if(children.size()==3) { - // neutral pion first - if(children[1]->id()==111) swap(children[0],children[1]); - if(children[2]->id()==111) swap(children[0],children[2]); - // postive pion second - if(children[2]->id()==211) swap(children[1],children[2]); - if(children[0]->id()== 111&&children[1]->id()==211&& - children[2]->id()==-211) { - allowed=true; - pi0=children[0]->momentum(); - pip=children[1]->momentum(); - pim=children[2]->momentum(); - } - } - if(!allowed) return; - if(part->id()==ParticleID::omega) imode=0; - else if(part->id()==ParticleID::phi) imode=1; - else return; - Boost boostv(-part->momentum().boostVector()); - pi0.boost(boostv); - pip.boost(boostv); - pim.boost(boostv); - Lorentz5Momentum ptemp; - ptemp = pi0+pip;ptemp.rescaleMass(); - *_mplus[imode]+=ptemp.mass()/MeV; - ptemp = pi0+pim;ptemp.rescaleMass(); - *_mminus[imode]+=ptemp.mass()/MeV; - ptemp = pip+pim;ptemp.rescaleMass(); - *_m0[imode]+=ptemp.mass()/MeV; - Energy x = pip.e()-pim.e(); - Energy y = pi0.e()-pi0.m(); - *_xhist[imode]+=x/MeV; - *_yhist[imode]+=y/MeV; - if(_xvalue[imode].size()<_nmax) { - _xvalue[imode].push_back(x); - _yvalue[imode].push_back(y); - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigOmegaPhi3PionAnalysis("Herwig::OmegaPhi3PionAnalysis", "HwDecayAnalysis.so"); - -void OmegaPhi3PionAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the OmegaPhi3PionAnalysis class"); - - static Parameter interfaceNMax - ("MaxPoints", - "Maximum number of points for the Dalitz plots", - &OmegaPhi3PionAnalysis::_nmax, 50000, 100, 1000000, - false, false, Interface::limited); - -} - -void OmegaPhi3PionAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + - string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _xhist[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "x distribution in WRP2+3P2-3P203", - " GWGX XGX XGX X", - "1/SdS/dx/GeV2-13", - " G G X X", - "x/MeV", - " "); - _yhist[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "y distribution in WRP2+3P2-3P203", - " GWGX XGX XGX X", - "1/SdS/dy/GeV2-13", - " G G X X", - "y/MeV", - " "); - _mplus[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "R2+3 mass in WRP2+3P2-3P203", - "GX X GWGX XGX XGX X", - "1/SdS/dm0R2+31/GeV2-13", - " G G XGX XX X X", - "m0R2+31/MeV", - " XGX XX "); - _mminus[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "R2-3 mass in WRP2+3P2-3P203", - "GX X GWGX XGX XGX X", - "1/SdS/dm0R2-31/GeV2-13", - " G G XGX XX X X", - "m0R2-31/MeV", - " XGX XX "); - _m0[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "R203 mass in WRP2+3P2-3P203", - "GX X GWGX XGX XGX X", - "1/SdS/dm0R2031/GeV2-13", - " G G XGX XX X X", - "m0R2031/MeV", - " XGX XX "); - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x -250 250 y 0 250\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for W\"\n"; - output << "case \" G\"\n"; - for(unsigned int ix=0;ix<_xvalue[0].size();++ix) { - output << ounit(_xvalue[0][ix],MeV) << " " << ounit(_yvalue[0][ix],MeV) << "\n"; - } - output << "plot\n"; - _xhist[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "x distribution in FRP2+3P2-3P203", - " GWGX XGX XGX X", - "1/SdS/dx/GeV2-13", - " G G X X", - "x/MeV", - " "); - _yhist[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "y distribution in FRP2+3P2-3P203", - " GWGX XGX XGX X", - "1/SdS/dy/GeV2-13", - " G G X X", - "y/MeV", - " "); - _mplus[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "R2+3 mass in FRP2+3P2-3P203", - "GX X GWGX XGX XGX X", - "1/SdS/dm0R2+31/GeV2-13", - " G G XGX XX X X", - "m0R2+31/MeV", - " XGX XX "); - _mminus[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "R2-3 mass in FRP2+3P2-3P203", - "GX X GWGX XGX XGX X", - "1/SdS/dm0R2-31/GeV2-13", - " G G XGX XX X X", - "m0R2-31/MeV", - " XGX XX "); - _m0[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "R203 mass in FRP2+3P2-3P203", - "GX X GWGX XGX XGX X", - "1/SdS/dm0R2031/GeV2-13", - " G G XGX XX X X", - "m0R2031/MeV", - " XGX XX "); - output << "new frame\n"; - output << "set font duplex\n"; - output << "set limits x -400 400 y 0 400\n"; - output << "set order x y \n"; - output << "title top \"Dalitz plot for F\"\n"; - output << "case \" G\"\n"; - for(unsigned int ix=0;ix<_xvalue[1].size();++ix) { - output << _xvalue[1][ix]/MeV << " " << _yvalue[1][ix]/MeV << "\n"; - } - output << "plot\n"; -} - -void OmegaPhi3PionAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - for(unsigned int ix=0;ix<2;++ix) { - _xhist .push_back(new_ptr(Histogram(-400.,400. ,200))); - _yhist .push_back(new_ptr(Histogram(0. ,400. ,200))); - _mplus .push_back(new_ptr(Histogram(0. ,1000.,200))); - _mminus .push_back(new_ptr(Histogram(0. ,1000.,200))); - _m0 .push_back(new_ptr(Histogram(0. ,1000.,200))); - } - _xvalue.resize(2); - _yvalue.resize(2); -} diff --git a/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.h b/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/OmegaPhi3PionAnalysis.h +++ /dev/null @@ -1,171 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_OmegaPhi3PionAnalysis_H -#define HERWIG_OmegaPhi3PionAnalysis_H -// -// This is the declaration of the OmegaPhi3PionAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the OmegaPhi3PionAnalysis class. - * - * @see \ref OmegaPhi3PionAnalysisInterfaces "The interfaces" - * defined for OmegaPhi3PionAnalysis. - */ -class OmegaPhi3PionAnalysis: public AnalysisHandler { - -public: - - /** - * Default Constructor - */ - inline OmegaPhi3PionAnalysis() : _nmax(50000) {} - - /** @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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - OmegaPhi3PionAnalysis & operator=(const OmegaPhi3PionAnalysis &) = delete; - -private: - - /** - * Histogram for the \f$x\f$-values - */ - vector _xhist; - - /** - * Histogram for the \f$y\f$-values - */ - vector _yhist; - - /** - * Histograms for the masses - */ - //@{ - /** - * The mass of the \f$\rho^+\f$ - */ - vector _mplus; - - /** - * The mass of the \f$\rho^-\f$ - */ - vector _mminus; - - /** - * The mass of the \f$\rho^0\f$ - */ - vector _m0; - //@} - /** - * Vectors to store the \f$x\f$ and\f$y\f$ values for - */ - //@{ - /** - * The \f$x\f$ value - */ - vector > _xvalue; - - /** - * The \f$y\f$ value - */ - vector > _yvalue; - //@} - - /** - * Maximum number of points for the Dalitz plots - */ - unsigned int _nmax; -}; - -} - -#endif /* HERWIG_OmegaPhi3PionAnalysis_H */ diff --git a/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.cc b/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.cc +++ /dev/null @@ -1,134 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the OniumToOniumPiPiAnalysis class. -// - -#include "OniumToOniumPiPiAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void OniumToOniumPiPiAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - // Rotate to CMS, extract final state particles and call analyze(particles). - AnalysisHandler::analyze(event, ieve, loop, state); - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if(((**iter).id()%1000==443||(**iter).id()%1000==553)&& - (**iter).children().size()==3) particles.push_back(*iter); - } - } - // analyse them - analyze(particles); -} - -void OniumToOniumPiPiAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void OniumToOniumPiPiAnalysis::analyze(tPPtr part) { - tPPtr out; - Lorentz5Momentum q,pip; - unsigned int npi0(0),npip(0),npim(0); - for(unsigned int ix=0;ixchildren().size();++ix) { - if(part->children()[ix]->id()==ParticleID::piplus) { - ++npip; - pip=part->children()[ix]->momentum(); - q+=part->children()[ix]->momentum(); - } - else if(part->children()[ix]->id()==ParticleID::piminus) { - ++npim; - q+=part->children()[ix]->momentum(); - } - else if(part->children()[ix]->id()==ParticleID::pi0) { - ++npi0; - q+=part->children()[ix]->momentum(); - pip=part->children()[ix]->momentum(); - } - else { - out = part->children()[ix]; - } - } - // require pi+pi- or pi0pi0 - if(!(npi0==2||(npim==1&&npim==1))) return; - // require incoming and outgoing onium - if(part->id()%1000!=out->id()%1000) return; - unsigned int ix=0; bool found(false); - while(!found&&ix<_incoming.size()) { - if(_incoming[ix]==part->id()&&_outgoing[ix]==out->id()) found=true; - else ++ix; - } - if(!found) { - Energy twompi=2.*getParticleData(ParticleID::piplus)->mass(); - Energy upp = part->nominalMass()+part->dataPtr()->widthUpCut()- - out ->nominalMass()+out->dataPtr()->widthLoCut(); - ix=_incoming.size(); - _incoming.push_back(part->id()); - _outgoing.push_back(out ->id()); - _mpipi.push_back(make_pair(new_ptr(Histogram(twompi/GeV,upp/GeV,200)), - new_ptr(Histogram(twompi/GeV,upp/GeV,200)))); - _hel .push_back(make_pair(new_ptr(Histogram(-1.,1.,200)), - new_ptr(Histogram( 0.,1.,200)))); - } - // calculate the mass - q.rescaleMass(); - Energy mq=q.mass(); - // calculate the helicity angle - Boost boost = -q.boostVector(); - Lorentz5Momentum qp=out->momentum(); - Lorentz5Momentum ppi=pip; - qp.boost(boost); - q.boost(boost); - ppi.boost(boost); - double cX=-ppi.vect().unit()*qp.vect().unit(); - if(npi0==2) { - *_mpipi[ix].second+=mq/GeV; - *_hel[ix].second+=abs(cX); - } - else { - *_mpipi[ix].first+=mq/GeV; - *_hel[ix].first+=cX; - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigOniumToOniumPiPiAnalysis("Herwig::OniumToOniumPiPiAnalysis", "HwDecayAnalysis.so"); - -void OniumToOniumPiPiAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the OniumToOniumPiPiAnalysis class"); - -} - -void OniumToOniumPiPiAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - for(unsigned int ix=0;ix<_incoming.size();++ix) { - string title= - getParticleData(_incoming[ix])->PDGName() + " -> " + - getParticleData(_outgoing[ix])->PDGName(); - string temp = "Mass distrubtion for pi+pi- in " + title; - using namespace HistogramOptions; - _mpipi[ix].first->topdrawOutput(output,Frame,"BLACK",temp); - temp = "Mass distrubtion for pi0pi0 in " + title; - _mpipi[ix].second->topdrawOutput(output,Frame,"BLACK",temp); - temp = "Helicity angle for pi+pi- in " + title; - _hel[ix].first->topdrawOutput(output,Frame,"BLACK",temp); - temp = "Helicity angle for pi0pi0 in " + title; - _hel[ix].second->topdrawOutput(output,Frame,"BLACK",temp); - } -} diff --git a/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.h b/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/OniumToOniumPiPiAnalysis.h +++ /dev/null @@ -1,135 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_OniumToOniumPiPiAnalysis_H -#define HERWIG_OniumToOniumPiPiAnalysis_H -// -// This is the declaration of the OniumToOniumPiPiAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** \ingroup Analysis - * - * The OniumToOniumPiPiAnalysis class performs the analysis of the decays - * of bottom and charmonium resonances to lighter resonances and \f$\pi\pi\f$. - * - * @see \ref OniumToOniumPiPiAnalysisInterfaces "The interfaces" - * defined for OniumToOniumPiPiAnalysis. - */ -class OniumToOniumPiPiAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - OniumToOniumPiPiAnalysis & operator=(const OniumToOniumPiPiAnalysis &) = delete; - -private: - - /** - * Incoming onium states - */ - vector _incoming; - - /** - * Outgoing onium states - */ - vector _outgoing; - - /** - * Histograms for the \f$\pi^+\pi^-\f$ masses - */ - vector > _mpipi; - - /** - * Histmgrams for the helicity angles - */ - vector > _hel; - -}; - -} - -#endif /* HERWIG_OniumToOniumPiPiAnalysis_H */ diff --git a/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.cc b/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.cc +++ /dev/null @@ -1,145 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the PScalarVectorFermionsAnalysis class. -// - -#include "PScalarVectorFermionsAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include -#include -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void PScalarVectorFermionsAnalysis::analyze(tEventPtr event, long, int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all scalar particles with three children and first - // decay product is a vector - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).dataPtr()->iSpin()==PDT::Spin0&&(**iter).children().size()==3) { - particles.push_back(*iter); - } - } - } - // analyse them - analyze(particles); -} - -void PScalarVectorFermionsAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void PScalarVectorFermionsAnalysis::analyze(tPPtr part) { - ParticleVector children=part->children(); - // ensure photon first - if(children[1]->id()==ParticleID::gamma) swap(children[0],children[1]); - if(children[2]->id()==ParticleID::gamma) swap(children[0],children[2]); - // and lepton next - if(children[1]->id()<0) swap(children[1],children[2]); - long id[3]={children[0]->id(),children[1]->id(), - children[2]->id()}; - // id's of the fermions - if(id[0]!=ParticleID::gamma) return; - if(abs(id[1])!=abs(id[2])) return; - if(abs(id[1])!=11&&abs(id[1])!=13) return; - // check if we already have this decay - unsigned int ix=0; bool found(false); - while(!found&&ix<_incoming.size()) { - if(_incoming[ix]==part->id()&&_outgoingV[ix]==id[0]&&_outgoingf[ix]==abs(id[1])) - found=true; - else ++ix; - } - // create a new graph if needed - if(!found) { - ix=_incoming.size(); - _incoming.push_back(part->id()); - _outgoingV.push_back(id[0]); - _outgoingf.push_back(abs(id[1])); - _mffa.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut())/MeV, - 200))); - _mffb.push_back(new_ptr(Histogram(0.0,20,200))); - _mVf.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut())/MeV, - 200))); - _mVfbar.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut())/MeV, - 200))); - } - // add the results to the histogram - Lorentz5Momentum ptemp; - ptemp=children[1]->momentum()+children[2]->momentum(); - ptemp.rescaleMass(); - *_mffa[ix]+=ptemp.mass()/MeV; - *_mffb[ix]+=ptemp.mass()/MeV; - ptemp=children[0]->momentum()+children[1]->momentum(); - ptemp.rescaleMass(); - *_mVf[ix]+=ptemp.mass()/MeV; - ptemp=children[0]->momentum()+children[2]->momentum(); - ptemp.rescaleMass(); - *_mVfbar[ix]+=ptemp.mass()/MeV; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigPScalarVectorFermionsAnalysis("Herwig::PScalarVectorFermionsAnalysis", "HwDecayAnalysis.so"); - -void PScalarVectorFermionsAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the PScalarVectorFermionsAnalysis class"); - -} - -void PScalarVectorFermionsAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - string title,temp; - for(unsigned int ix=0;ix<_incoming.size();++ix) { - title= getParticleData(_incoming[ix])->PDGName() + - " -> " + getParticleData(_outgoingV[ix])->PDGName()+ " " + - getParticleData(_outgoingf[ix])->PDGName() + " " + - getParticleData(-_outgoingf[ix])->PDGName(); - temp = "Mass for f fbar in " +title; - using namespace HistogramOptions; - _mffa[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0l2+3l2-31/GeV2-13", - " G G X X X X XX X X", - "m0l2+3l2-31", - " X X X X XX"); - _mffb[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0l2+3l2-31/GeV2-13", - " G G X X X X XX X X", - "m0l2+3l2-31", - " X X X X XX"); - temp = "Mass for vector fermion mass in " +title; - _mVf[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0Vl2-31/GeV2-13", - " G G X X XX X X", - "m0Vl2-31", - " X X XX"); - temp = "Mass for vector fbar mass in " +title; - _mVfbar[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0Vl2+31/GeV2-13", - " G G X X XX X X", - "m0Vl2+31", - " X X XX"); - } -} - diff --git a/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.h b/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/PScalarVectorFermionsAnalysis.h +++ /dev/null @@ -1,146 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_PScalarVectorFermionsAnalysis_H -#define HERWIG_PScalarVectorFermionsAnalysis_H -// -// This is the declaration of the PScalarVectorFermionsAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the PScalarVectorFermionsAnalysis class. - * - * @see \ref PScalarVectorFermionsAnalysisInterfaces "The interfaces" - * defined for PScalarVectorFermionsAnalysis. - */ -class PScalarVectorFermionsAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - inline virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - PScalarVectorFermionsAnalysis & operator=(const PScalarVectorFermionsAnalysis &) = delete; - -private: - - /** - * PDG codes for the incoming particles - */ - vector _incoming; - - /** - * PDG codes for the outgoing vector meson - */ - vector _outgoingV; - - /** - * PDG code for the outgoing fermions - */ - vector _outgoingf; - - /** - * Histograms for the mass of the fermion-antifermion pair - */ - vector _mffa; - - /** - * Histograms for the mass of the fermion-antifermion pair - */ - vector _mffb; - - /** - * Histograms for the masses of the vector and the fermion - */ - vector _mVf; - - /** - * Histograms for the masses of the vector and the antifermion - */ - vector _mVfbar; -}; - -} - -#endif /* HERWIG_PScalarVectorFermionsAnalysis_H */ diff --git a/Contrib/DecayAnalysis/Pi4ElectronAnalysis.cc b/Contrib/DecayAnalysis/Pi4ElectronAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/Pi4ElectronAnalysis.cc +++ /dev/null @@ -1,102 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the Pi4ElectronAnalysis class. -// - -#include "Pi4ElectronAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/EventRecord/Event.h" -#include -#include -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void Pi4ElectronAnalysis::analyze(tEventPtr event, long , int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all the decaying neutral pions - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).id()==ParticleID::pi0) { - particles.push_back(*iter); - } - } - } - // analyse them - analyze(particles); -} - -void Pi4ElectronAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void Pi4ElectronAnalysis::analyze(tPPtr part) { - // check the number of children of the particle - if(part->children().size()!=4) return; - Lorentz5Momentum pe[2],pp[2]; - unsigned int ne(0),np(0); - int id; - // find the particles - unsigned int ix,iy; - for(ix=0;ixchildren().size();++ix) { - id=part->children()[ix]->id(); - if(id==ParticleID::eplus){pe[ne]=part->children()[ix]->momentum();++ne;} - else if(id==ParticleID::eminus){pp[np]=part->children()[ix]->momentum();++np;} - } - if(ne!=2||np!=2){return;} - // find the invariant masses - Lorentz5Momentum ptemp; - for(ix=0;ix<2;++ix) { - for(iy=0;iy<2;++iy) { - ptemp=pe[ix]+pp[iy]; - ptemp.rescaleMass(); - for(unsigned int iz=0;iz<_mffbar.size();++iz) { - *_mffbar[iz]+=ptemp.mass()/MeV; - } - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigPi4ElectronAnalysis("Herwig::Pi4ElectronAnalysis", "HwDecayAnalysis.so"); - -void Pi4ElectronAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the Pi4ElectronAnalysis class"); - -} - -void Pi4ElectronAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - for(unsigned int ix=0;ix<_mffbar.size();++ix) { - _mffbar[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "Mass of the e2+3e2-3 pair in P203Re2+3e2-3e2+3e2-3", - " X X X X GX XW X X X X X X X X", - "1/SdS/dm0e2+3e2-31/GeV2-13", - " G G X X X X XX X X", - "m0e2+3e2-31", - " X X X X XX"); - } -} - -void Pi4ElectronAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - _mffbar.push_back(new_ptr(Histogram(0.0,140.0,1000))); - _mffbar.push_back(new_ptr(Histogram(0.0, 20.0,100 ))); -} diff --git a/Contrib/DecayAnalysis/Pi4ElectronAnalysis.h b/Contrib/DecayAnalysis/Pi4ElectronAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/Pi4ElectronAnalysis.h +++ /dev/null @@ -1,123 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_Pi4ElectronAnalysis_H -#define HERWIG_Pi4ElectronAnalysis_H -// -// This is the declaration of the Pi4ElectronAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the Pi4ElectronAnalysis class. - * - * @see \ref Pi4ElectronAnalysisInterfaces "The interfaces" - * defined for Pi4ElectronAnalysis. - */ -class Pi4ElectronAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - inline virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - inline virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - Pi4ElectronAnalysis & operator=(const Pi4ElectronAnalysis &) = delete; - -private: - - /** - * Histogram for the mass distribution - */ - vector _mffbar; - -}; - -} - -#endif /* HERWIG_Pi4ElectronAnalysis_H */ diff --git a/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.cc b/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.cc +++ /dev/null @@ -1,163 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the SemiLeptonicDPiAnalysis class. -// - -#include "SemiLeptonicDPiAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; -using namespace ThePEG; - -void SemiLeptonicDPiAnalysis::findChildren(tPPtr part,ParticleVector & prod) { - if(part->children().empty()) { - prod.push_back(part); - } - else { - for(unsigned ix=0;ixchildren().size();++ix) { - findChildren(part->children()[ix],prod); - } - } -} - - -void SemiLeptonicDPiAnalysis::analyze(tEventPtr event, long, int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - tPVector particles; - // find B mesons - for(unsigned int ix=0; ixprimaryCollision()->steps().size();++ix) { - ThePEG::ParticleSet part=event->primaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).children().empty()) continue; - int id=abs((**iter).id()); - if(id==ParticleID::B0||id==ParticleID::Bplus) particles.push_back(*iter); - } - } - // analyse them - analyze(particles); -} - -LorentzRotation SemiLeptonicDPiAnalysis::transform(tEventPtr) const { - return LorentzRotation(); - // Return the Rotation to the frame in which you want to perform the analysis. -} - -void SemiLeptonicDPiAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void SemiLeptonicDPiAnalysis::analyze(tPPtr part) { - // find the stable decay products - ParticleVector products; - findChildren(part,products); - // check them - if(products.size()!=4) return; - // find the particles - int ipi=-1,idm=-1,il=-1,inu=-1,id; - for(unsigned int ix=0;ixid()); - if(id==ParticleID::piplus||id==ParticleID::pi0) ipi=ix; - else if(id==ParticleID::eminus||id==ParticleID::muminus|| - id==ParticleID::tauminus) il=ix; - else if(id==ParticleID::nu_e||id==ParticleID::nu_mu|| - id==ParticleID::nu_tau) inu=ix; - else if(id==ParticleID::Dplus||id==ParticleID::D0|| - id==ParticleID::Dstarplus||id==ParticleID::Dstar0) idm=ix; - } - // check we have everything - if(ipi<0||idm<0||il<0||inu<0) return; - tPPtr lep[2]={products[il],products[inu]}; - unsigned int lid=(abs(lep[0]->id())-9)/2; - unsigned int ix=0; - bool found(false); - while(!found&&ix<_incoming.size()) { - if(_incoming[ix]==part->id()&& - _outgoingD[ix]==products[idm]->id()&& - _outgoingP[ix]==products[ipi]->id()&& - lid==_outgoingL[ix]) { - found=true; - break; - } - else { - ++ix; - } - } - if(!found) { - ix=_incoming.size(); - _incoming.push_back(part->id()); - _outgoingD.push_back(products[idm]->id()); - _outgoingP.push_back(products[ipi]->id()); - _outgoingL.push_back(lid); - _energy.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut() - -products[idm]->nominalMass() - +products[idm]->dataPtr()->widthLoCut())/GeV,200))); - _scale.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut() - -products[ipi]->nominalMass() - +products[ipi]->dataPtr()->widthLoCut())/GeV,200))); - _mDpi.push_back(new_ptr(Histogram(4.0,25.,200))); - } - // add the results to the histogram - Lorentz5Momentum ptemp; - ptemp = lep[0]->momentum()+lep[1]->momentum(); - ptemp.rescaleMass(); - *_scale[ix]+=ptemp.mass()/GeV; - ptemp = products[idm]->momentum()+lep[1]->momentum(); - ptemp.rescaleMass(); - Energy ee = 1./2./part->mass()* - (part->mass()*part->mass()-ptemp.mass()*ptemp.mass()+lep[1]->mass()*lep[1]->mass()); - *_energy[ix]+=ee/GeV; - double mdpi=(products[idm]->momentum()+ - products[ipi]->momentum()).m2()/GeV2; - *_mDpi[ix]+=mdpi; -} - -void SemiLeptonicDPiAnalysis::persistentOutput(PersistentOStream &) const {} - -void SemiLeptonicDPiAnalysis::persistentInput(PersistentIStream &, int) {} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeClass -describeHerwigSemiLeptonicDPiAnalysis("Herwig::SemiLeptonicDPiAnalysis", "HwDecayAnalysis.so"); - -void SemiLeptonicDPiAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the SemiLeptonicDPiAnalysis class"); - -} - -void SemiLeptonicDPiAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream outfile(fname.c_str()); - string title,temp; - for(unsigned int ix=0;ix<_incoming.size();++ix) { - title= getParticleData(_incoming[ix])->PDGName() + - " -> " - + getParticleData(_outgoingD[ix])->PDGName()+ " " - + getParticleData(_outgoingP[ix])->PDGName()+ " " + - getParticleData(9+2*_outgoingL[ix])->PDGName() + " " + - getParticleData(10+2*_outgoingL[ix])->PDGName(); - temp = "Mass for l nu in " +title; - using namespace HistogramOptions; - _scale[ix]->topdrawOutput(outfile,Frame,"BLACK",temp); - temp = "Lepton energy for in " +title; - _energy[ix]->topdrawOutput(outfile,Frame,"BLACK",temp); - temp = "D(*) pi mass in " +title; - _mDpi[ix]->topdrawOutput(outfile,Frame,"BLACK",temp); - } -} - diff --git a/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.h b/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/SemiLeptonicDPiAnalysis.h +++ /dev/null @@ -1,180 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_SemiLeptonicDPiAnalysis_H -#define HERWIG_SemiLeptonicDPiAnalysis_H -// -// This is the declaration of the SemiLeptonicDPiAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" -#include "ThePEG/EventRecord/Event.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the SemiLeptonicDPiAnalysis class. - * - * @see \ref SemiLeptonicDPiAnalysisInterfaces "The interfaces" - * defined for SemiLeptonicDPiAnalysis. - */ -class SemiLeptonicDPiAnalysis: public AnalysisHandler { - -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); - - /** - * Transform the event to the desired Lorentz frame and return the - * corresponding LorentzRotation. - * @param event a pointer to the Event to be transformed. - * @return the LorentzRotation used in the transformation. - */ - virtual LorentzRotation transform(tEventPtr event) const; - - /** - * 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: - - /** @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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -protected: - - /** - * Find the stable decay products - */ - void findChildren(tPPtr,ParticleVector &); - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - SemiLeptonicDPiAnalysis & operator=(const SemiLeptonicDPiAnalysis &) = delete; - -private: - - /** - * The PDG code of the incoming particle - */ - vector _incoming; - - /** - * The PDG code of the outgoing D meson - */ - vector _outgoingD; - - /** - * The PDG code of the outgoing pion - */ - vector _outgoingP; - - /** - * The PDG code of the outgoing lepton - */ - vector _outgoingL; - - /** - * The energy of the leptons - */ - vector _energy; - - /** - * The mass of the lepton-neutrino pair - */ - vector _scale; - - /** - * the mass of the D pi system - */ - vector _mDpi; - -}; - -} - -#endif /* HERWIG_SemiLeptonicDPiAnalysis_H */ diff --git a/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.cc b/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.cc +++ /dev/null @@ -1,135 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the SemiLeptonicDecayAnalysis class. -// - -#include "SemiLeptonicDecayAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/EventRecord/Event.h" - -using namespace Herwig; - -void SemiLeptonicDecayAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - // Rotate to CMS, extract final state particles and call analyze(particles). - AnalysisHandler::analyze(event, ieve, loop, state); - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).dataPtr()->iSpin()==PDT::Spin0&& - (**iter).children().size()>=2&&(**iter).children().size()<=3) { - particles.push_back(*iter); - } - } - } - // analyse them - analyze(particles); -} - -void SemiLeptonicDecayAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void SemiLeptonicDecayAnalysis::analyze(tPPtr part) { - // check the number of children of the particle - // check this is a decay - tPPtr lep[2]; - if(part->children().size()==2&& - abs(part->children()[1]->id())==24&&part->children()[1]->children().size()==2) { - lep[0]=part->children()[1]->children()[0]; - lep[1]=part->children()[1]->children()[1]; - } - else if(part->children().size()==3&& - abs(part->children()[1]->id())>=11&&abs(part->children()[1]->id())<=16&& - abs(part->children()[2]->id())>=11&&abs(part->children()[2]->id())<=16) { - lep[0]=part->children()[1]; - lep[1]=part->children()[2]; - } - else { - return; - } - // find the ids of the lepton and the neutrino - int id1(abs(lep[0]->id())),id2(abs(lep[1]->id())); - unsigned int ilep(0),inu(0),loce(1),locn(1); - if(id1%2==0&&id1>11&&id1<17){inu=(id1-10)/2;locn=0;} - else if(id2%2==0&&id2>11&&id2<17){inu=(id2-10)/2;locn=1;} - if(id1%2==1&&id1>10&&id1<16){ilep=(id1-9)/2;loce=0;} - else if(id2%2==1&&id2>10&&id2<16){ilep=(id2-9)/2;loce=1;} - if(ilep==0||inu==0){return;} - unsigned int ix=0; bool found(false); - while(!found&&ix<_incoming.size()) { - if(_incoming[ix]==part->id()&&_outgoing[ix]==part->children()[0]->id()&& - ilep==_outgoingL[ix]){found=true;} - else{++ix;} - } - if(!found) { - ix=_incoming.size(); - _incoming.push_back(part->id()); - _outgoing.push_back(part->children()[0]->id()); - _outgoingL.push_back(ilep); - _energy.push_back(new_ptr(Histogram(0.0, - (part->mass()-part->children()[0]->mass())/MeV, - 200))); - _scale.push_back(new_ptr(Histogram(0.0, - (part->mass()-part->children()[0]->mass())/MeV, - 200))); - } - // add the results to the histogram - Lorentz5Momentum ptemp; - ptemp = lep[0]->momentum()+lep[1]->momentum(); - ptemp.rescaleMass(); - *_scale[ix] += ptemp.mass()/MeV; - ptemp = part->children()[0]->momentum()+lep[locn]->momentum(); - ptemp.rescaleMass(); - Energy ee = 1./2./part->mass()* - ( part->mass()*part->mass()-ptemp.mass()*ptemp.mass() - +lep[loce]->mass()*lep[loce]->mass()); - *_energy[ix] += ee/MeV; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigSemiLeptonicDecayAnalysis("Herwig::SemiLeptonicDecayAnalysis", "HwDecayAnalysis.so"); - -void SemiLeptonicDecayAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the SemiLeptonicDecayAnalysis class"); - -} - -void SemiLeptonicDecayAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - string title,temp; - for(unsigned int ix=0;ix<_incoming.size();++ix) { - title= getParticleData(_incoming[ix])->PDGName() + - " -> " + getParticleData(_outgoing[ix])->PDGName()+ " " + - getParticleData(9+2*_outgoingL[ix])->PDGName() + " " + - getParticleData(10+2*_outgoingL[ix])->PDGName(); - temp = "Mass for l nu in " +title; - using namespace HistogramOptions; - _scale[ix]->topdrawOutput(output,Frame|Errorbars, - "RED",temp,"", - "1/GdG/dm0lN1/MeV2-13", - " F F X GX X X", - "m0lN1/MeV", - " X GX "); - temp = "Lepton energy for in " +title; - _energy[ix]->topdrawOutput(output,Frame|Errorbars, - "RED",temp,"", - "1/GdG/dE0l1/MeV2-13", - " F F X X X X", - "E0l1/MeV", - " X X "); - } -} - diff --git a/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.h b/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/SemiLeptonicDecayAnalysis.h +++ /dev/null @@ -1,142 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_SemiLeptonicDecayAnalysis_H -#define HERWIG_SemiLeptonicDecayAnalysis_H -// -// This is the declaration of the SemiLeptonicDecayAnalysis class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the SemiLeptonicDecayAnalysis class. - * - * @see \ref SemiLeptonicDecayAnalysisInterfaces "The interfaces" - * defined for SemiLeptonicDecayAnalysis. - */ -class SemiLeptonicDecayAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - SemiLeptonicDecayAnalysis & operator=(const SemiLeptonicDecayAnalysis &) = delete; - -private: - - /** - * PDG codes of the decaying mesons - */ - vector _incoming; - - /** - * PDG codes of the decay products - */ - vector _outgoing; - - /** - * Identidies of the leptons - */ - vector _outgoingL; - - /** - * Histograms - */ - //@{ - /** - * The lepton energy - */ - vector _energy; - - /** - * The \f$q\f$ value - */ - vector _scale; - //@} -}; - -} - -#endif /* HERWIG_SemiLeptonicDecayAnalysis_H */ diff --git a/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.cc b/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.cc +++ /dev/null @@ -1,140 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the Upsilon4SMultiplicityCount class. -// - -#include "Upsilon4SMultiplicityCount.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Repository/EventGenerator.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/EventRecord/Event.h" - -using namespace Herwig; - -inline IBPtr Upsilon4SMultiplicityCount::clone() const { - return new_ptr(*this); -} - -inline IBPtr Upsilon4SMultiplicityCount::fullclone() const { - return new_ptr(*this); -} - -void Upsilon4SMultiplicityCount::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // Rotate to CMS, extract final state particles and call analyze(particles). - set particles; - StepVector steps = event->primaryCollision()->steps(); - if (steps.size() > 2) { - for ( StepVector::const_iterator it = steps.begin()+2; - it != steps.end(); ++it ) { - (**it).select(inserter(particles), ThePEG::AllSelector()); - } - } - if(particles.empty()) return; - map eventcount; - // get most multiplicities - for(set::const_iterator it = particles.begin(); - it != particles.end(); ++it) { - long ID = abs((*it)->id()); - // sort out neutral kaons - if(ID==ParticleID::K0) continue; - if(ID==ParticleID::K_L0||ID==ParticleID::K_S0) ID=ParticleID::K0; - // otherwise add to count - if (_data.find(ID) != _data.end()) ++eventcount[ID]; - } - // final-state charged particles - particles.clear(); - event->selectFinalState(inserter(particles)); - for(set::const_iterator it = particles.begin(); - it != particles.end(); ++it) { - if((*it)->dataPtr()->charged()) ++eventcount[0]; - } - // store info - for(map::iterator it = _data.begin(); - it != _data.end(); ++it) { - long currentcount - = eventcount.find(it->first) == eventcount.end() ? 0 - : eventcount[it->first]; - it->second.count += currentcount; - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigUpsilon4SMultiplicityCount("Herwig::Upsilon4SMultiplicityCount", "HwDecayAnalysis.so"); - -void Upsilon4SMultiplicityCount::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the Upsilon4SMultiplicityCount class"); - -} - -void Upsilon4SMultiplicityCount::dofinish() { - AnalysisHandler::dofinish(); - string filename = generator()->filename() + ".mult"; - ofstream outfile(filename.c_str());outfile << - "\nParticle multiplicities (compared to Upsilon(4s) data):\n" - " ID Name simMult obsMult obsErr Sigma\n"; - for (map::const_iterator it = _data.begin(); - it != _data.end(); - ++it) { - MultiplicityInfo multiplicity = it->second; - string name = it->first==0 ? "All chgd" : - generator()->getParticleData(it->first)->PDGName(); - ios::fmtflags oldFlags = outfile.flags(); - outfile << std::scientific << std::showpoint - << std::setprecision(3) - << setw(7) << it->first << ' ' - << setw(9) << name << ' ' - << setw(2) << multiplicity.simMultiplicity() << " | " - << setw(2) << multiplicity.obsMultiplicity << " +/- " - << setw(2) << multiplicity.obsError << ' ' - << std::showpos << std::setprecision(1) - << multiplicity.nSigma() << ' ' - << multiplicity.bargraph() - << std::noshowpos; - outfile << '\n'; - outfile.flags(oldFlags); - } - outfile.close(); -} - -void Upsilon4SMultiplicityCount::doinitrun() { - AnalysisHandler::doinitrun(); - // all charged - _data[0] = MultiplicityInfo(10.71,0.18, lightMeson); - // kaons - _data[321] = MultiplicityInfo( 2.*0.789 , 2.*0.025 , strangeMeson); - _data[311] = MultiplicityInfo( 2.*0.64 , 2.*0.04 , strangeMeson); - _data[323] = MultiplicityInfo( 2.*0.18 , 2.*0.06 , strangeMeson); - _data[313] = MultiplicityInfo( 2.*0.146 , 2.*0.026 , strangeMeson); - // light mesons - _data[211] = MultiplicityInfo( 2.*3.58 , 2.*0.07 , lightMeson); - _data[111] = MultiplicityInfo( 2.*2.35 , 2.*0.11 , lightMeson); - _data[221] = MultiplicityInfo( 2.*0.176 , 2.*0.016 , lightMeson); - _data[113] = MultiplicityInfo( 2.*0.21 , 2.*0.05 , lightMeson); - _data[333] = MultiplicityInfo( 2.*0.0342 , 2.*0.0013 , lightMeson); - // baryons - _data[2212] = MultiplicityInfo( 2.*0.08 , 2.*0.004 , lightBaryon); - _data[3122] = MultiplicityInfo( 2.*0.04 , 2.*0.005 , lightBaryon); - _data[3312] = MultiplicityInfo( 2.*0.0027 , 2.*0.006 , lightBaryon); - _data[4122] = MultiplicityInfo( 2.*0.045 , 2.*0.012 , other); - _data[4112] = MultiplicityInfo( 4.*0.0046 , 4.*0.0024 , other); - _data[4222] = MultiplicityInfo( 4.*0.0042 , 4.*0.0024 , other); - // charmonium - _data[443] = MultiplicityInfo( 2.*0.01094, 2.*0.00032, other); - _data[100443] = MultiplicityInfo( 2.*0.00307, 2.*0.00021, other); - _data[20443] = MultiplicityInfo( 2.*0.00386, 2.*0.00027, other); - _data[445] = MultiplicityInfo( 2.*0.0013 , 2.*0.0004 , other); - // D+, D0, D_s+ - _data[411] = MultiplicityInfo( 2.*0.228, 2.*0.014, other); - _data[421] = MultiplicityInfo( 2.*0.637, 2.*0.03 , other); - _data[431] = MultiplicityInfo( 2.*0.083, 2.*0.008, other); - _data[413] = MultiplicityInfo( 2.*0.225, 2.*0.015, other); - _data[423] = MultiplicityInfo( 2.*0.260, 2.*0.027, other); - _data[433] = MultiplicityInfo( 2.*0.063, 2.*0.006, other); -} diff --git a/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.h b/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/Upsilon4SMultiplicityCount.h +++ /dev/null @@ -1,110 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_Upsilon4SMultiplicityCount_H -#define HERWIG_Upsilon4SMultiplicityCount_H -// -// This is the declaration of the Upsilon4SMultiplicityCount class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Analysis/MultiplicityInfo.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the Upsilon4SMultiplicityCount class. - * - * @see \ref Upsilon4SMultiplicityCountInterfaces "The interfaces" - * defined for Upsilon4SMultiplicityCount. - */ -class Upsilon4SMultiplicityCount: public AnalysisHandler { - -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); - //@} - -public: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - 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. - */ - virtual IBPtr fullclone() const; - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - Upsilon4SMultiplicityCount & operator=(const Upsilon4SMultiplicityCount &) = delete; - -private: - - /** - * Map of PDG codes to multiplicity info - */ - map _data; - -}; - -} - -#endif /* HERWIG_Upsilon4SMultiplicityCount_H */ diff --git a/Contrib/DecayAnalysis/Upsilon4SSpectrumAnalysis.cc b/Contrib/DecayAnalysis/Upsilon4SSpectrumAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/Upsilon4SSpectrumAnalysis.cc +++ /dev/null @@ -1,389 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the Upsilon4SSpectrumAnalysis class. -// - -#include "Upsilon4SSpectrumAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/Repository/EventGenerator.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Interface/ClassDocumentation.h" - -using namespace Herwig; - -IBPtr Upsilon4SSpectrumAnalysis::clone() const { - return new_ptr(*this); -} - -IBPtr Upsilon4SSpectrumAnalysis::fullclone() const { - return new_ptr(*this); -} - -void Upsilon4SSpectrumAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // Rotate to CMS, extract final state particles and call analyze(particles). - set particles; - event->select(inserter(particles),ThePEG::AllSelector()); - set finalState; - event->selectFinalState(inserter(finalState)); - for(set::const_iterator it=finalState.begin();it!=finalState.end();++it) { - double p = (**it).momentum().vect().mag()/GeV; - switch (abs((**it).id())) { - case ParticleID::piplus: - if(abs((**it).parents()[0]->id())!=ParticleID::Lambda0&& - abs((**it).parents()[0]->id())!=ParticleID::K_S0) - if(p>=0.075&&p<=2.8) *_spectrumpipNo += p; - if(p>=0.075&&p<=2.8) *_spectrumpipAll += p; - break; - case ParticleID::Kplus: - if(p>=0.175&&p<=2.8) *_spectrumKpA +=p; - if(p>=0.2 &&p<=2.8) *_spectrumKpB +=p; - break; - case ParticleID::pplus: - if(abs((**it).parents()[0]->id())!=ParticleID::Lambda0) - if(p>=0.3&&p<=2.2) *_spectrumprotonNo += p; - if(p>=0.3&&p<=2.2) *_spectrumprotonAll += p; - case ParticleID::K_L0: - if(p>=0.2&&p<=2.7) *_spectrumK0 += p; - } - } - for(set::const_iterator it=particles.begin();it!=particles.end();++it) { - if(!(**it).children().empty()&&(**it).children()[0]->id()==(**it).id()) - continue; - double p = (**it).momentum().vect().mag()/GeV; - switch (abs((**it).id())) { - case ParticleID::pi0: - if(p<=3.) *_spectrumpi0 += p; -// case ParticleID::K_S0: -// if(p>=0.2&&p<=2.7) *_spectrumK0 += p; - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigUpsilon4SSpectrumAnalysis("Herwig::Upsilon4SSpectrumAnalysis", "HwDecayAnalysis.so"); - -void Upsilon4SSpectrumAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the Upsilon4SSpectrumAnalysis class"); - -} - -void Upsilon4SSpectrumAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + - string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - // output chi sq to log file for analysis - double chisq=0.,minfrac=0.05; - unsigned int ndegrees; - _spectrumpipNo->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for ARGUS pi+ distribution " - << "excluding K_S0 and Lambda decay products\n"; - _spectrumpipAll->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for ARGUS pi+ distribution " - << "including K_S0 and Lambda decay products\n"; - _spectrumpi0->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for Belle pi0 distribution\n"; - _spectrumKpA->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for ARGUS K+ distribution\n"; - _spectrumKpB->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for ARGUS K+ decay in flight" - << "distribution\n"; - _spectrumprotonNo->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for ARGUS proton distribution " - << "excluding Lambda decay products\n"; - _spectrumprotonAll->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for ARGUS proton distribution " - << "including Lambda decay products\n"; - _spectrumK0->chiSquared(chisq,ndegrees,minfrac); - generator()->log() << "Chi Square = " << chisq << " for " << ndegrees - << " degrees of freedom for ARGUS K0 distribution\n"; - // output the histograms - using namespace HistogramOptions; - _spectrumpipNo->topdrawOutput(output,Frame|Errorbars,"RED", - "P2+3 excluding K2030S1 and L decay products (ARGUS)", - "GXMX X XX X F ", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); - _spectrumpipAll->topdrawOutput(output,Frame|Errorbars,"RED", - "P2+3 including K2030S1 and L decay products (ARGUS)", - "GX X X XX X F ", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); - _spectrumpi0->topdrawOutput(output,Frame|Errorbars,"RED", - "P203 (Belle)", - "GX X ", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); - _spectrumKpA->topdrawOutput(output,Frame|Errorbars,"RED", - "K2+3 (ARGUS)", - " XMX", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); - _spectrumKpB->topdrawOutput(output,Frame|Errorbars,"RED", - "K2+3 decay in flight (ARGUS)", - " XMX", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); - _spectrumprotonNo->topdrawOutput(output,Frame|Errorbars,"RED", - "proton excluding L decay products (ARGUS)", - " F ", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); - _spectrumprotonAll->topdrawOutput(output,Frame|Errorbars,"RED", - "proton including L decay products (ARGUS)", - " F ", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); - _spectrumK0->topdrawOutput(output,Frame|Errorbars,"RED", - "K203 (ARGUS)", - " X X ", - "1/SdS/dp/GeV2-13"," G G X X", - "p/GeV"," "); -} - -void Upsilon4SSpectrumAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - // ARGUS pi+ spectrum excluding K^0_S and Lambda decays - double x1[]={0.075,0.100,0.125,0.150,0.175,0.200,0.225,0.250,0.275,0.300, - 0.325,0.350,0.375,0.400,0.425,0.450,0.475,0.500,0.525,0.550, - 0.575,0.600,0.625,0.650,0.675,0.700,0.725,0.750,0.775,0.800, - 0.900,1.000,1.100,1.200,1.300,1.400,1.500,1.600,1.700,1.800, - 1.900,2.000,2.100,2.200,2.300,2.400,2.500,2.600,2.700,2.800}; - double y1[]={ 8.104, 9.439, 9.967,11.238,11.217,12.208,12.153,12.148,12.194,11.811, - 11.650,11.010,10.085,10.160, 9.378, 8.957, 8.198, 7.801, 6.806, 6.175, - 6.222, 5.380, 5.309, 5.096, 4.193, 3.882, 3.939, 3.785, 3.370, 2.732, - 1.861, 1.160, 0.811, 0.622, 0.433, 0.454, 0.208, 0.141, 0.175, 0.102, - 0.090, 0.123, 0.066, 0.140, 0.010, 0.021, 0.026,-0.015,-0.011}; - double st1[]={0.255,0.273,0.283,0.310,0.335,0.351,0.365,0.369,0.367,0.363, - 0.358,0.351,0.344,0.335,0.325,0.317,0.307,0.301,0.293,0.284, - 0.273,0.267,0.258,0.251,0.247,0.238,0.232,0.224,0.222,0.112, - 0.105,0.105,0.110,0.115,0.110,0.096,0.080,0.071,0.064,0.059, - 0.053,0.049,0.044,0.038,0.035,0.031,0.027,0.025,0.024}; - double sy1[]={0.332,0.239,0.385,0.376,0.307,0.337,0.292,0.293,0.366,0.248, - 0.325,0.286,0.232,0.188,0.182,0.231,0.145,0.262,0.103,0.056, - 0.151,0.073,0.091,0.105,0.129,0.215,0.134,0.148,0.116,0.098, - 0.072,0.089,0.089,0.136,0.064,0.075,0.072,0.058,0.043,0.028, - 0.029,0.029,0.033,0.017,0.027,0.034,0.014,0.025,0.016}; - double total=0.0; - for(unsigned int ix=0;ix<49;++ix) { - total+=y1[ix]*(x1[ix+1]-x1[ix]); - st1[ix] = sqrt(sqr(st1[ix])+sqr(sy1[ix])); - } - vector bins,data,error; - bins = vector( x1, x1+50); - data = vector( y1, y1+49); - error = vector(st1,st1+49); - for(unsigned int ix=0;ix( x1, x1+50); - data = vector( y2, y2+49); - error = vector(st2,st2+49); - for(unsigned int ix=0;ix( x3, x3+46); - data = vector( y3, y3+45); - error = vector(st3,st3+45); - for(unsigned int ix=0;ix( x4, x4+27); - data = vector( y4, y4+26); - error = vector(st4,st4+26); - for(unsigned int ix=0;ix( x5, x5+20); - data = vector( y5, y5+19); - error = vector(st5,st5+19); - for(unsigned int ix=0;ix( x5, x5+20); - data = vector( y6, y6+19); - error = vector(st6,st6+19); - for(unsigned int ix=0;ix( x7, x7+21); - data = vector( y7, y7+20); - error = vector(st7,st7+20); - for(unsigned int ix=0;ix( x8, x8+31); - data = vector( y8, y8+30); - error = vector(st8,st8+30); - for(unsigned int ix=0;ix 0 || state != 0 || !event ) return; - transform(event); - // find all decaying particles - tPVector particles; - int id; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - id=abs((**iter).id()); - if((**iter).children().size()>=2&& - find(_id.begin(),_id.end(),id)!=_id.end()) - particles.push_back(*iter); - } - } -} - -void VPPGammaAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void VPPGammaAnalysis::analyze(tPPtr part) { - int imode(-1); - long id [3]={part->id(),part->children()[0]->id(),part->children()[1]->id()}; - long idb[3]; - if(part->dataPtr()->CC()) idb[0]=part->dataPtr()->CC()->id(); - else idb[0]=id[0]; - for(unsigned int ix=0;ix<2;++ix) { - if(part->children()[ix]->dataPtr()->CC()) - idb[ix+1]=part->children()[ix]->dataPtr()->CC()->id(); - else - idb[ix+1]=id[ix+1]; - } - for(unsigned int ix=0;ix<_id.size();++ix) { - if(id[0]==_id[ix]) { - if((_outgoing1[ix]==id[1]&&_outgoing2[ix]==id[2])|| - (_outgoing1[ix]==id[2]&&_outgoing2[ix]==id[1])) { - imode=ix; - } - } - else if(idb[0]==_id[ix]) { - if((_outgoing1[ix]==idb[1]&&_outgoing2[ix]==idb[2])|| - (_outgoing1[ix]==idb[2]&&_outgoing2[ix]==idb[1])) { - imode=ix; - } - } - if(imode>0) break; - } - Lorentz5Momentum pphoton; - unsigned int mult=0; - Energy emax=ZERO; - int imax=-1; - Lorentz5Momentum pferm(part->children()[0]->momentum()+ - part->children()[1]->momentum()); - pferm.boost(-part->momentum().boostVector()); - pferm.rescaleMass(); - *_masstotal[imode] += pferm.mass()/MeV; - if(part->children().size()==2) { - *_etotal[ imode]+=0.; - *_esingle[imode]+=0.; - *_eall[ imode]+=0.; - *_nphoton[imode]+=0.; - return; - } - Lorentz5Momentum ptemp; - for(unsigned int ix=2;ixchildren().size();++ix) { - if(part->children()[ix]->id()!=ParticleID::gamma){return;} - pphoton+=part->children()[ix]->momentum(); - ptemp=part->children()[ix]->momentum(); - ptemp.boost(-part->momentum().boostVector()); - *_eall[imode]+=ptemp.e()/MeV; - if(part->children()[ix]->momentum().e()>emax) { - emax=part->children()[ix]->momentum().e(); - imax=ix; - } - ++mult; - } - pphoton.boost(-part->momentum().boostVector()); - pphoton.rescaleMass(); - *_etotal[imode]+=pphoton.e()/MeV; - ptemp=part->children()[imax]->momentum(); - ptemp.boost(-part->momentum().boostVector()); - *_esingle[imode]+=ptemp.e()/MeV; - *_nphoton[imode]+=mult; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigVPPGammaAnalysis("Herwig::VPPGammaAnalysis", "HwDecayAnalysis.so"); - -void VPPGammaAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the VPPGammaAnalysis class"); - - static ParVector interfaceIncoming - ("Incoming", - "The PDG code of the incoming particle", - &VPPGammaAnalysis::_id, -1, long(0), 0, 0, - false, false, Interface::nolimits); - - static ParVector interfaceOutgoing1 - ("Outgoing1", - "The PDG code of the first outgoing particle", - &VPPGammaAnalysis::_outgoing1, -1, long(0), 0, 0, - false, false, Interface::nolimits); - - static ParVector interfaceOutgoing2 - ("Outgoing2", - "The PDG code of the second outgoing particle", - &VPPGammaAnalysis::_outgoing2, -1, long(0), 0, 0, - false, false, Interface::nolimits); - -} - -void VPPGammaAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - string titlea,titleb; - for(unsigned int ix=0;ix<_id.size();++ix) { - titlea = " for decay " + getParticleData(_id[ix])->PDGName() + " -> " - + getParticleData(_outgoing1[ix])->PDGName() + " " - + getParticleData(_outgoing2[ix])->PDGName(); - // number of photons - titleb = "Photon multiplicity " +titlea; - using namespace HistogramOptions; - _nphoton[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titleb,"" - "1/SdS/dN0G1", - " G G XGX", - "N0G1", - " XGX"); - // fermion masses - titleb = "Mass of the charged decay products "+titlea; - _masstotal[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titleb,"" - "1/SdS/dm0l2+3l2-31/GeV2-13", - " G G X X X X XX X X", - "m0l2+3l2-31", - " X X X X XX"); - // total photon energy - _masstotal[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titleb,"" - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1", - " XGX"); - titleb="Single photon energy for all events"+titlea; - _esingle[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titleb,"" - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1", - " XGX"); - // all photon - titleb="All photon energy for all events"+titlea; - _eall[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titleb,"" - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1", - " XGX"); - } -} - -void VPPGammaAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - for(unsigned int ix=0;ix<_id.size();++ix) { - double mass = getParticleData(_id[ix])->mass()/MeV; - for(unsigned iy=0;iy<3;++iy) { - _masstotal.push_back(new_ptr(Histogram(0.,mass,1000))); - _etotal.push_back(new_ptr(Histogram(0.,mass,1000))); - _eall.push_back(new_ptr(Histogram(0.,mass,1000))); - _esingle.push_back(new_ptr(Histogram(0.,mass,1000))); - _nphoton.push_back(new_ptr(Histogram(-0.5,20.5,21))); - } - } -} diff --git a/Contrib/DecayAnalysis/VPPGammaAnalysis.h b/Contrib/DecayAnalysis/VPPGammaAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/VPPGammaAnalysis.h +++ /dev/null @@ -1,173 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_VPPGammaAnalysis_H -#define HERWIG_VPPGammaAnalysis_H -// -// This is the declaration of the VPPGammaAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" -#include "ThePEG/PDT/EnumParticles.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the VPPGammaAnalysis class. - * - * @see \ref VPPGammaAnalysisInterfaces "The interfaces" - * defined for VPPGammaAnalysis. - */ -class VPPGammaAnalysis: public AnalysisHandler { - -public: - - /** - * The default constructor. - */ - VPPGammaAnalysis(); - - /** @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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - VPPGammaAnalysis & operator=(const VPPGammaAnalysis &) = delete; - -private: - - /** - * id's of the vector mesons to consider - */ - vector _id; - - /** - * id's of the outgoing decay products - */ - //@{ - /** - * First outgoing particle - */ - vector _outgoing1; - - /** - * Second outgoing particle - */ - vector _outgoing2; - //@} - - /** - * histogram for the mass - */ - vector _masstotal; - - /** - * Histograms for the energies - */ - /** - * Total photon energy - */ - vector _etotal; - - /** - * Energy of all the photons - */ - vector _eall; - - /** - * Single photon energy - */ - vector _esingle; - //@} - - /** - * histograms for the multiplicities - */ - vector _nphoton; - -}; - -} - -#endif /* HERWIG_VPPGammaAnalysis_H */ diff --git a/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.cc b/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.cc +++ /dev/null @@ -1,141 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the VectorPScalarFermionsAnalysis class. -// - -#include "VectorPScalarFermionsAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void VectorPScalarFermionsAnalysis::analyze(tEventPtr event, long, int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all vector particles - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).dataPtr()->iSpin()==PDT::Spin1&&(**iter).id()!=ParticleID::gamma&& - (**iter).children().size()==3) { - if((**iter).children()[0]->dataPtr()->iSpin()==PDT::Spin0) - particles.push_back(*iter); - } - } - } - // analyse them - analyze(particles); -} - -void VectorPScalarFermionsAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void VectorPScalarFermionsAnalysis::analyze(tPPtr part) { - long id[3]={part->children()[0]->id(),part->children()[1]->id(), - part->children()[2]->id()}; - // id's of the fermions - if(abs(id[1])!=abs(id[2])){return;} - if(abs(id[1])!=11&&abs(id[1])!=13){return;} - // check if we already have this decay - unsigned int ix=0; bool found(false); - while(!found&&ix<_incoming.size()) { - if(_incoming[ix]==part->id()&&_outgoingP[ix]==id[0]&&_outgoingf[ix]==abs(id[1])) { - found=true; - } - else { - ++ix; - } - } // create a new graph if needed - if(!found) { - ix=_incoming.size(); - _incoming.push_back(part->id()); - _outgoingP.push_back(id[0]); - _outgoingf.push_back(abs(id[1])); - _mffa.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut())/MeV, - 200))); - _mffb.push_back(new_ptr(Histogram(0.0,20,200))); - _mPf.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut())/MeV, - 200))); - _mPfbar.push_back(new_ptr(Histogram(0.0, - (part->nominalMass()+part->dataPtr()->widthUpCut())/MeV, - 200))); - } - // add the results to the histogram - Lorentz5Momentum ptemp; - ptemp=part->children()[1]->momentum()+part->children()[2]->momentum(); - ptemp.rescaleMass(); - *_mffa[ix]+=ptemp.mass()/MeV; - *_mffb[ix]+=ptemp.mass()/MeV; - ptemp=part->children()[0]->momentum()+part->children()[1]->momentum(); - ptemp.rescaleMass(); - *_mPf[ix]+=ptemp.mass()/MeV; - ptemp=part->children()[0]->momentum()+part->children()[2]->momentum(); - ptemp.rescaleMass(); - *_mPfbar[ix]+=ptemp.mass()/MeV; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigVectorPScalarFermionsAnalysis("Herwig::VectorPScalarFermionsAnalysis", "HwDecayAnalysis.so"); - -void VectorPScalarFermionsAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the VectorPScalarFermionsAnalysis class"); - -} - - -void VectorPScalarFermionsAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - string title,temp; - for(unsigned int ix=0;ix<_incoming.size();++ix) { - title= getParticleData(_incoming[ix])->PDGName() + - " -> " + getParticleData(_outgoingP[ix])->PDGName()+ " " + - getParticleData(_outgoingf[ix])->PDGName() + " " + - getParticleData(-_outgoingf[ix])->PDGName(); - temp = "Mass for f fbar in " +title; - using namespace HistogramOptions; - _mffa[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0l2+3l2-31/GeV2-13", - " G G X X X X XX X X", - "m0l2+3l2-31", - " X X X X XX"); - _mffb[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0l2+3l2-31/GeV2-13", - " G G X X X X XX X X", - "m0l2+3l2-31", - " X X X X XX"); - temp = "Mass for vector fermion mass in " +title; - _mPf[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0Pl2-31/GeV2-13", - " G G X X XX X X", - "m0Pl2-31", - " X X XX"); - temp = "Mass for vector fbar mass in " +title; - _mPfbar[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",temp,"", - "1/SdS/dm0Pl2+31/GeV2-13", - " G G X X XX X X", - "m0Pl2+31", - " X X XX"); - } -} diff --git a/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.h b/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/VectorPScalarFermionsAnalysis.h +++ /dev/null @@ -1,147 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_VectorPScalarFermionsAnalysis_H -#define HERWIG_VectorPScalarFermionsAnalysis_H -// -// This is the declaration of the VectorPScalarFermionsAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the VectorPScalarFermionsAnalysis class. - * - * @see \ref VectorPScalarFermionsAnalysisInterfaces "The interfaces" - * defined for VectorPScalarFermionsAnalysis. - */ -class VectorPScalarFermionsAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - VectorPScalarFermionsAnalysis & operator=(const VectorPScalarFermionsAnalysis &) = delete; - -private: - - /** - * PDG codes of the incoming particles - */ - vector _incoming; - - /** - * PDG codes of the outgoing pseudoscalar mesons - */ - vector _outgoingP; - - /** - * PDG codes of the outgoing fermion - */ - vector _outgoingf; - - /** - * Histograms for the mass of the fermion-antifermion pair - */ - vector _mffa; - - /** - * Histograms for the mass of the fermion-antifermion pair - */ - vector _mffb; - - /** - * Histograms for the masses of the pseudoscalar and the fermion - */ - vector _mPf; - - /** - * Histograms for the masses of the pseudoscalar and the antifermion - */ - vector _mPfbar; - -}; - -} - -#endif /* HERWIG_VectorPScalarFermionsAnalysis_H */ diff --git a/Contrib/DecayAnalysis/VffGammaAnalysis.cc b/Contrib/DecayAnalysis/VffGammaAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/VffGammaAnalysis.cc +++ /dev/null @@ -1,196 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the VffGammaAnalysis class. -// - -#include "VffGammaAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Interface/ParVector.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -VffGammaAnalysis::VffGammaAnalysis() { - // c cbar mesons - _id.push_back(443);_id.push_back(100443);_id.push_back(30443); - // b bbar mesons - _id.push_back(553);_id.push_back(100553); - _id.push_back(200553);_id.push_back(300553); -} - -void VffGammaAnalysis::analyze(tEventPtr event, long , - int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all particles - tPVector particles; - unsigned int idtemp[2]; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).children().size()>=2) { - idtemp[0]=abs((**iter).children()[0]->id()); - idtemp[1]=abs((**iter).children()[1]->id()); - if(idtemp[0]>10&&idtemp[0]<17&&idtemp[0]%2==1&& - idtemp[1]>10&&idtemp[1]<17&&idtemp[1]%2==1) { - for(unsigned int iy=0;iy<_id.size();++iy) { - if((**iter).id()==_id[iy]){particles.push_back(*iter); - } - } - } - } - } - } - // analyse them - analyze(particles); -} - -void VffGammaAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void VffGammaAnalysis::analyze(tPPtr part) { - // find the decaying particle - int imode(-1),id(part->id()); - unsigned int ix(0); - do { - if(id==_id[ix]){imode=ix;} - ++ix; - } - while(imode<0&&ix<_id.size()); - if(imode<0) return; - // find the type of lepton - imode = 3*imode+(abs(part->children()[0]->id())-11)/2; - Lorentz5Momentum pphoton; - unsigned int mult(0); - Energy emax(ZERO); - int imax=-1; - Lorentz5Momentum pferm(part->children()[0]->momentum()+ - part->children()[1]->momentum()); - pferm.boost(-part->momentum().boostVector()); - pferm.rescaleMass(); - *_masstotal[imode] += pferm.mass()/MeV; - if(part->children().size()==2) { - *_etotal[ imode]+=0.; - *_esingle[imode]+=0.; - *_eall[ imode]+=0.; - *_nphoton[imode]+=0.; - return; - } - Lorentz5Momentum ptemp; - for(unsigned int ix=2;ixchildren().size();++ix) { - if(part->children()[ix]->id()!=ParticleID::gamma){return;} - pphoton+=part->children()[ix]->momentum(); - ptemp=part->children()[ix]->momentum(); - ptemp.boost(-part->momentum().boostVector()); - *_eall[imode]+=ptemp.e()/MeV; - if(part->children()[ix]->momentum().e()>emax) { - emax=part->children()[ix]->momentum().e(); - imax=ix; - } - ++mult; - } - pphoton.boost(-part->momentum().boostVector()); - pphoton.rescaleMass(); - *_etotal[imode]+=pphoton.e()/MeV; - ptemp=part->children()[imax]->momentum(); - ptemp.boost(-part->momentum().boostVector()); - *_esingle[imode]+=ptemp.e()/MeV; - *_nphoton[imode]+=mult; -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigVffGammaAnalysis("Herwig::VffGammaAnalysis", "HwDecayAnalysis.so"); - -void VffGammaAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the VffGammaAnalysis class"); - - static ParVector interfaceId - ("Id", - "PDG codes of the particles to be analysed", - &VffGammaAnalysis::_id, -1, long(0), 0, 0, - false, false, Interface::nolimits); - -} - -inline void VffGammaAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - string titlea,titleb,titlec; - for(unsigned int ix=0;ix<_id.size();++ix) { - titlea = " for decay " + getParticleData(_id[ix])->PDGName() + " -> "; - for(unsigned int iy=0;iy<3;++iy) { - if(iy==0){titleb = titlea + "e+ e-";} - else if(iy==1){titleb = titlea + "mu+ mu-";} - else if(iy==2){titleb = titlea + "tau+ tau-";} - // number of photons - titlec = "Photon multiplicity " +titleb; - using namespace HistogramOptions; - _nphoton[3*ix+iy]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titlec,"" - "1/SdS/dN0G1", - " G G XGX", - "N0G1", - " XGX"); - // fermion masses - titlec = "Mass of the charged decay products "+titleb; - _masstotal[3*ix+iy]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titlec,"" - "1/SdS/dm0l2+3l2-31/GeV2-13", - " G G X X X X XX X X", - "m0l2+3l2-31", - " X X X X XX"); - // total photon energy - _masstotal[3*ix+iy]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titlec,"" - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1", - " XGX"); - titlec="Single photon energy for all events"+titleb; - _esingle[3*ix+iy]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titlec,"" - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1", - " XGX"); - // all photon - titlec="All photon energy for all events"+titleb; - _eall[3*ix+iy]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titlec,"" - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1", - " XGX"); - } - } -} - -inline void VffGammaAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - for(unsigned int ix=0;ix<_id.size();++ix) { - double mass = getParticleData(_id[ix])->mass()/MeV; - for(unsigned iy=0;iy<3;++iy) { - _masstotal.push_back(new_ptr(Histogram(0.,mass,1000))); - _etotal.push_back(new_ptr(Histogram(0.,mass,1000))); - _eall.push_back(new_ptr(Histogram(0.,mass,1000))); - _esingle.push_back(new_ptr(Histogram(0.,mass,1000))); - _nphoton.push_back(new_ptr(Histogram(-0.5,20.5,21))); - } - } -} diff --git a/Contrib/DecayAnalysis/VffGammaAnalysis.h b/Contrib/DecayAnalysis/VffGammaAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/VffGammaAnalysis.h +++ /dev/null @@ -1,157 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_VffGammaAnalysis_H -#define HERWIG_VffGammaAnalysis_H -// -// This is the declaration of the VffGammaAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the VffGammaAnalysis class. - * - * @see \ref VffGammaAnalysisInterfaces "The interfaces" - * defined for VffGammaAnalysis. - */ -class VffGammaAnalysis: public AnalysisHandler { - -public: - - /** - * The default constructor. - */ - VffGammaAnalysis(); - - /** @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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - VffGammaAnalysis & operator=(const VffGammaAnalysis &) = delete; - -private: - - /** - * id's of the vector mesons to consider - */ - vector _id; - - /** - * histogram for the mass - */ - vector _masstotal; - - /** - * Histograms for the energies - */ - /** - * Total photon energy - */ - vector _etotal; - - /** - * Energy of all the photons - */ - vector _eall; - - /** - * Single photon energy - */ - vector _esingle; - //@} - - /** - * Histogram for the multiplicities - */ - vector _nphoton; -}; - -} - -#endif /* HERWIG_VffGammaAnalysis_H */ diff --git a/Contrib/DecayAnalysis/ZPhotonsAnalysis.cc b/Contrib/DecayAnalysis/ZPhotonsAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/ZPhotonsAnalysis.cc +++ /dev/null @@ -1,216 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the ZPhotonsAnalysis class. -// - -#include "ZPhotonsAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/Interface/Parameter.h" -#include "ThePEG/Repository/CurrentGenerator.h" - -using namespace Herwig; - -void ZPhotonsAnalysis::analyze(tEventPtr event, long, int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - tPVector particles; - // Rotate to CMS, extract final state particles and call analyze(particles). - for(unsigned int ix=1, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all()); - ThePEG::ParticleSet::iterator iter(part.begin()),end(part.end()); - for( ;iter!=end;++iter) { - if((**iter).id()==ParticleID::Z0&&(**iter).children().size()>=2) { - particles.push_back(*iter); - } - } - } - // analyse them - analyze(particles); -} - -void ZPhotonsAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void ZPhotonsAnalysis::analyze(tPPtr part) { - // check we have the right decay - if(abs(part->children()[0]->id())!=_iferm) return; - if(abs(part->children()[1]->id())!=_iferm) return; - // pphoton is the total momentum of all photons, mult is the multiplicity, - // ix/emax is the index/energy of the most energetic photon emitted: - Lorentz5Momentum pphoton; - unsigned int mult=0; - Energy emax=ZERO; - int imax=-1; - // loop over the non-fermionic children i.e. the photons: - for(unsigned int ix=2;ixchildren().size();++ix) { - if(part->children()[ix]->id()!=ParticleID::gamma) return; - pphoton+=part->children()[ix]->momentum(); - *_etotal[4]+=part->children()[ix]->momentum().e()/MeV; - if(part->children()[ix]->momentum().e()>emax) { - emax=part->children()[ix]->momentum().e(); - imax=ix; - } - Lorentz5Momentum pf(part->children()[0]->momentum()); - Lorentz5Momentum pfb(part->children()[1]->momentum()); - if(part->children()[0]->id()<0&&part->children()[1]>0) swap(pf,pfb); - pf.boost(-part->momentum().boostVector()); - pfb.boost(-part->momentum().boostVector()); - // bin the cosine of the angle between each photon and the fermion - Lorentz5Momentum pphot(part->children()[ix]->momentum()); - pphot.boost(-part->momentum().boostVector()); - *_cphoton+=pf.vect().cosTheta(pphot.vect()); - ++mult; - } - // boost the combined fermion momentum and the total photon momentum - // to the Z/gamma rest framefermion rest frame: - Lorentz5Momentum pferm(part->children()[0]->momentum()+ - part->children()[1]->momentum()); - pferm.boost(-part->momentum().boostVector()); - pphoton.boost(-part->momentum().boostVector()); - pferm.rescaleMass(); - pphoton.rescaleMass(); - // bin the photon multiplicity of this decay: - *_nphoton+=mult; - for(unsigned int ix=0;ix<3;++ix) { - // bin the invariant mass of the fermions and the total photon energy - // in histograms of varying ranges (ix): - *_masstotal[ix]+=pferm.mass()/MeV; - if(mult>0) *_etotal[ix]+=pphoton.e()/MeV; - } - // bin the energy of the most energetic photon: - if(imax>0) *_etotal[3]+=part->children()[imax]->momentum().e()/MeV; - if(mult<20) { - // bin the difermion invariant mass and the total photon energy - // according to multiplicity: - *_mphoton[mult]+=pferm.mass()/MeV; - *_ephoton[mult]+=pphoton.e()/MeV; - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeClass -describeHerwigZPhotonsAnalysis("Herwig::ZPhotonsAnalysis", "HwDecayAnalysis.so"); - -void ZPhotonsAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the ZPhotonsAnalysis class"); - - static Parameter interfaceFermion - ("Fermion", - "Id code of fermion", - &ZPhotonsAnalysis::_iferm, 11, 11, 15, - false, false, Interface::limited); - -} - -inline void ZPhotonsAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _nphoton->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "Photon Multiplicity", - " ", - "1/SdS/dN0G1", - " G G XGX", - "N0G1", - " XGX"); - for(unsigned int ix=0;ix<3;++ix) { - _masstotal[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "Fermion mass for all events", - " ", - "1/SdS/d/GeV2-13", - " G G X X", - "m0l2+3l2-31/GeV", - " X X X X XX "); - _etotal[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "Photon Energy for all events", - " ", - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1/GeV", - " XGX "); - } - _etotal[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "Photon Energy for all events", - " ", - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1/GeV", - " XGX "); - _etotal[4]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "Photon Energy for all events", - " ", - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1/GeV", - " XGX "); - - _cphoton->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED","Photon cosine wrt fermion","", - "1/SdS/dc0G1", - " G G XGX", - "c0G1", - " XGX "); - for(unsigned int ix=0;ix<20;++ix) { - ostringstream titlea; - titlea << "Fermion mass for " << ix << " photons " << flush; - _mphoton[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titlea.str(),"", - "1/SdS/d/GeV2-13", - " G G X X", - "m0l2+3l2-31/GeV", - " X X X X XX "); - ostringstream titleb; - titleb << "photon energy for " << ix << " photons " << flush; - _ephoton[ix]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED",titleb.str(),"", - "1/SdS/dE0G1/GeV2-13", - " G G XGX X X", - "E0G1/GeV", - " XGX ");; - } -} - -inline void ZPhotonsAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - _masstotal.push_back(new_ptr(Histogram(0.,92000.,400))); - _etotal .push_back(new_ptr(Histogram(0.,92000.,400))); - _masstotal.push_back(new_ptr(Histogram(0.,80000.,200))); - _etotal .push_back(new_ptr(Histogram(0.,10000.,200))); - _masstotal.push_back(new_ptr(Histogram(80000.,92000.,200))); - _etotal .push_back(new_ptr(Histogram(10000.,92000.,200))); - for(unsigned int ix=0;ix<20;++ix) { - _mphoton.push_back(new_ptr(Histogram(0.,92000.,400))); - _ephoton.push_back(new_ptr(Histogram(0.,92000.,400))); - } - _cphoton=new_ptr(Histogram(-1.,1.,100)); - _etotal.push_back(new_ptr(Histogram(0.,92000.,400))); - _etotal.push_back(new_ptr(Histogram(0.,92000.,400))); - _nphoton=new_ptr(Histogram(-0.5,100.5,101)); -} - -void ZPhotonsAnalysis::persistentOutput(PersistentOStream & os) const { - os <<_iferm; -} - -void ZPhotonsAnalysis::persistentInput(PersistentIStream & is, int) { - is >> _iferm; -} diff --git a/Contrib/DecayAnalysis/ZPhotonsAnalysis.h b/Contrib/DecayAnalysis/ZPhotonsAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/ZPhotonsAnalysis.h +++ /dev/null @@ -1,173 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_ZPhotonsAnalysis_H -#define HERWIG_ZPhotonsAnalysis_H -// -// This is the declaration of the ZPhotonsAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the ZPhotonsAnalysis class. - * - * @see \ref ZPhotonsAnalysisInterfaces "The interfaces" - * defined for ZPhotonsAnalysis. - */ -class ZPhotonsAnalysis: public AnalysisHandler { - -public: - - /** - * Default constructor - */ - ZPhotonsAnalysis() : _iferm(11) {} - - /** @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: - - /** @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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - ZPhotonsAnalysis & operator=(const ZPhotonsAnalysis &) = delete; - -private: - - /** - * id of the fermions to look at - */ - int _iferm; - - /** - * histogram for the mass - */ - vector _masstotal; - - /** - * histogram for the energy - */ - vector _etotal; - - /** - * histogram for the mass - */ - vector _mphoton; - - /** - * histograms for the energies of different photons - */ - vector _ephoton; - - /** - * histograms for the cos thetas of different photons - */ - HistogramPtr _cphoton; - - /** - * histogram for the photon multiplicity - */ - HistogramPtr _nphoton; -}; - -} - -#endif /* HERWIG_ZPhotonsAnalysis_H */ diff --git a/Contrib/DecayAnalysis/a1DecayAnalysis.cc b/Contrib/DecayAnalysis/a1DecayAnalysis.cc deleted file mode 100644 --- a/Contrib/DecayAnalysis/a1DecayAnalysis.cc +++ /dev/null @@ -1,177 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the a1DecayAnalysis class. -// - -#include "a1DecayAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/EventRecord/Event.h" - -using namespace Herwig; - -void a1DecayAnalysis::analyze(tEventPtr event, long, int loop, int state) { - if ( loop > 0 || state != 0 || !event ) return; - transform(event); - // find all omega and phi particles - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - int id=abs((**iter).id()); - if(id==ParticleID::a_10||id==ParticleID::a_1plus) - particles.push_back(*iter); - } - } - // analyse them - analyze(particles); -} - -void a1DecayAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -void a1DecayAnalysis::analyze(tPPtr part) { - // find the pions - ParticleVector pions; - findPions(part,pions); - if(pions.size()!=3) return; - vector pip,pim,pi0; - long idp = part->id()>0 ? 211 : -211; - for(unsigned int ix=0;ixid()==idp) pip.push_back(pions[ix]->momentum()); - else if(pions[ix]->id()==111) pi0.push_back(pions[ix]->momentum()); - else if(pions[ix]->id()==-idp) pim.push_back(pions[ix]->momentum()); - } - // a_1+ -> pi+pi+pi- - if(pip.size()==2&&pim.size()==1) { - *_hist3A += (pip[0]+pip[1]).m()/MeV; - *_hist3B += (pip[0]+pim[0]).m()/MeV; - *_hist3B += (pip[1]+pim[0]).m()/MeV; - } - // a_1+ -> pi0pi0pi+ - else if(pip.size()==1&&pi0.size()==2) { - *_hist1A +=(pi0[0]+pi0[1]).m()/MeV; - *_hist1B +=(pip[0]+pi0[0]).m()/MeV; - *_hist1B +=(pip[0]+pi0[1]).m()/MeV; - } - // a_10 -> pi0pi0pi0 - else if(pi0.size()==3) { - *_hist0 +=(pi0[0]+pi0[1]).m()/MeV; - *_hist0 +=(pi0[0]+pi0[2]).m()/MeV; - *_hist0 +=(pi0[1]+pi0[2]).m()/MeV; - } - // a_10 -> pi+pi-pi0 - else if(pi0.size()==1&&pip.size()==1&&pim.size()==1) { - *_hist2A +=(pim[0]+pip[0]).m()/MeV; - *_hist2B +=(pip[0]+pi0[0]).m()/MeV; - *_hist2C +=(pim[0]+pi0[0]).m()/MeV; - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwiga1DecayAnalysis("Herwig::a1DecayAnalysis", "HwDecayAnalysis.so"); - -void a1DecayAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the a1DecayAnalysis class"); - -} - -void a1DecayAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + - string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _hist0->topdrawOutput(output,Frame|Errorbars,"RED", - "P203P203 mass in A011203RP203P203P203", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P203P2031/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2031/MeV", - " XGX XGX XX "); - _hist1A->topdrawOutput(output,Frame|Errorbars,"RED", - "P203P203 mass in A0112+3RP203P203P2+3", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P203P2031/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2031/MeV", - " XGX XGX XX "); - _hist1B->topdrawOutput(output,Frame|Errorbars,"RED", - "P203P2+3 mass in A0112+3RP203P203P2+3", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P203P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P203P2+31/MeV", - " XGX XGX XX "); - _hist2A->topdrawOutput(output,Frame|Errorbars,"RED", - "P2+3P2-3 mass in A011203RP2+3P2-3P203", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P2+3P2-31/MeV2-13", - " F F XGX XGX XX X X", - "m0P2+3P2-31/MeV", - " XGX XGX XX "); - _hist2B->topdrawOutput(output,Frame|Errorbars,"RED", - "P2+3P203 mass in A011203RP2+3P2-3P203", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P2+3P2031/MeV2-13", - " F F XGX XGX XX X X", - "m0P2+3P2031/MeV", - " XGX XGX XX "); - _hist2C->topdrawOutput(output,Frame|Errorbars,"RED", - "P2-3P203 mass in A011203RP2+3P2-3P203", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P2-3P2031/MeV2-13", - " F F XGX XGX XX X X", - "m0P2-3P2031/MeV", - " XGX XGX XX "); - _hist3A->topdrawOutput(output,Frame|Errorbars,"RED", - "P2+3P2+3 mass in A0112+3RP2+3P2+3P2-3", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P2+3P2+31/MeV2-13", - " F F XGX XGX XX X X", - "m0P2+3P2+31/MeV", - " XGX XGX XX "); - _hist3B->topdrawOutput(output,Frame|Errorbars,"RED", - "P2+3P2-3 mass in A0112+3RP2+3P2+3P2-3", - "GX XGX X X XX XWGX XGX XGX X", - "1/GdG/dm0P2+3P2-31/MeV2-13", - " F F XGX XGX XX X X", - "m0P2+3P2-31/MeV", - " XGX XGX XX "); -} - -void a1DecayAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - _hist0 = new_ptr(Histogram(0.,1500.,200)); - _hist1A = new_ptr(Histogram(0.,1500.,200)); - _hist1B = new_ptr(Histogram(0.,1500.,200)); - _hist2A = new_ptr(Histogram(0.,1500.,200)); - _hist2B = new_ptr(Histogram(0.,1500.,200)); - _hist2C = new_ptr(Histogram(0.,1500.,200)); - _hist3A = new_ptr(Histogram(0.,1500.,200)); - _hist3B = new_ptr(Histogram(0.,1500.,200)); -} - -void a1DecayAnalysis::findPions(tPPtr part,ParticleVector & pions) { - if(abs(part->id())==ParticleID::piplus||part->id()==ParticleID::pi0) { - pions.push_back(part); - return; - } - else if(!part->children().empty()) { - for(unsigned int ix=0;ixchildren().size();++ix) { - findPions(part->children()[ix],pions); - } - } -} diff --git a/Contrib/DecayAnalysis/a1DecayAnalysis.h b/Contrib/DecayAnalysis/a1DecayAnalysis.h deleted file mode 100644 --- a/Contrib/DecayAnalysis/a1DecayAnalysis.h +++ /dev/null @@ -1,179 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_a1DecayAnalysis_H -#define HERWIG_a1DecayAnalysis_H -// -// This is the declaration of the a1DecayAnalysis class. -// - -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the a1DecayAnalysis class. - * - * @see \ref a1DecayAnalysisInterfaces "The interfaces" - * defined for a1DecayAnalysis. - */ -class a1DecayAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * find the pions produced in the decay - */ - void findPions(tPPtr part,ParticleVector & pions); - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - a1DecayAnalysis & operator=(const a1DecayAnalysis &) = delete; - -private: - - /** - * Histograms for \f$a_1^0\to\pi^0\pi^0\pi^0\f$ - */ - HistogramPtr _hist0; - - /** - * Histograms for \f$a_1^+\to\pi^0\pi^0\pi^+\f$ - */ - //@{ - /** - * Mass of the \f$\pi^0\pi^0\f$ pair - */ - HistogramPtr _hist1A; - - /** - * Mass of the \f$\pi^0\pi^+\f$ pair - */ - HistogramPtr _hist1B; - //@} - - /** - * Histograms for \f$a_1^0\to\pi^+\pi^-\pi^0\f$ - */ - //@{ - /** - * Mass of the \f$\pi^+\pi^-\f$ pair - */ - HistogramPtr _hist2A; - - /** - * Mass of the \f$\pi^+\pi^0\f$ pair - */ - HistogramPtr _hist2B; - - /** - * Mass of the \f$\pi^-\pi^0\f$ pair - */ - HistogramPtr _hist2C; - //@} - - /** - * Histograms for \f$a_1^+\to\pi^+\pi^+\pi^-\f$ - */ - //@{ - /** - * Mass of the \f$\pi^+\pi^+\f$ pair - */ - HistogramPtr _hist3A; - - /** - * Mass of the \f$\pi^+\pi^-\f$ pair - */ - HistogramPtr _hist3B; - //@} -}; - -} - -#endif /* HERWIG_a1DecayAnalysis_H */ diff --git a/Contrib/TauAnalysis/Makefile.in b/Contrib/TauAnalysis/Makefile.in deleted file mode 100644 --- a/Contrib/TauAnalysis/Makefile.in +++ /dev/null @@ -1,40 +0,0 @@ -# -*- Makefile -*- (for emacs) - -# -# This Makefile is intended for compiling Herwig++ plugins -# You can find plugins here: INSERT URL -# -# This Makefile received very little testing, -# any bug reports are very welcome! -# - -# location of include files -THEPEGINCLUDE = -GSLINCLUDE = -HERWIGINCLUDE = -INCLUDE = $(THEPEGINCLUDE) $(GSLINCLUDE) $(HERWIGINCLUDE) -# -# C++ flags -# -CXX = -CXXFLAGS = -LDFLAGS = -SHARED_FLAG = - -ALLCCFILES=$(shell echo *.cc) - -default : HwTauAnalysis.so - -%.o : %.cc %.h - $(CXX) -fPIC $(CPPFLAGS) $(INCLUDE) $(CXXFLAGS) -c -shared $< -o $@ - -HwTauAnalysis.so: Tau5Pion.o TauTo2MesonAnalysis.o TauTo4MesonAnalysis.o \ - TauCorrelationAnalysis.o TauTo3MesonAnalysis.o \ - TauToLeptonsAnalysis.o - $(CXX) -fPIC $(CPPFLAGS) $(INCLUDE) $(CXXFLAGS) \ - Tau5Pion.o TauTo2MesonAnalysis.o TauTo4MesonAnalysis.o \ - TauCorrelationAnalysis.o TauTo3MesonAnalysis.o \ - TauToLeptonsAnalysis.o $(SHARED_FLAG) $(LDFLAGS) -o HwTauAnalysis.so - -clean: - rm -f $(ALLCCFILES:.cc=.o) HwTauAnalysis.so diff --git a/Contrib/TauAnalysis/Tau5Pion.cc b/Contrib/TauAnalysis/Tau5Pion.cc deleted file mode 100644 --- a/Contrib/TauAnalysis/Tau5Pion.cc +++ /dev/null @@ -1,426 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the Tau5Pion class. -// - -#include "Tau5Pion.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Interface/ClassDocumentation.h" - - -using namespace Herwig; - -void Tau5Pion::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // Rotate to CMS, extract final state particles and call analyze(particles). - tPVector hadrons=event->getFinalState(); - map taus; - for(unsigned int ix=0;ixparents().empty()) mother=mother->parents()[0]; - else mother=tPPtr(); - } - while(mother&&abs(mother->id())!=ParticleID::tauminus); - if(mother&&abs(mother->id())==ParticleID::tauminus) { - if(taus.find(mother)==taus.end()) { - taus.insert(make_pair(mother,ParticleVector())); - } - taus[mother].push_back(hadrons[ix]); - } - } - map::const_iterator tit; - for(tit=taus.begin();tit!=taus.end();++tit) { - if(tit->second.size()!=6) continue; - ParticleVector decay=tit->second; - int tsign=tit->first->id()/abs(tit->first->id()); - vector ppi0,ppip,ppim,pkp,pkm,pk0,pk0bar,peta,pgamma; - Lorentz5Momentum ptotal; - for(unsigned int ix=0;ixid()*tsign; - if(abs(id)!=ParticleID::nu_tau) ptotal+=decay[ix]->momentum(); - if( id ==ParticleID::piplus) ppip .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::piminus) ppim .push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::pi0) ppi0 .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::Kplus) pkp .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::Kminus) pkm .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::K0) pk0 .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::Kbar0) pk0bar.push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::eta) peta .push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::gamma) pgamma.push_back(decay[ix]->momentum()); - } - if(ppi0.size()==2&&ppim.size()==2&&ppip.size()==1) { - *_pipi1[0]+=(ppim[0]+ppim[1]).m()/GeV; - *_pipi1[1]+=(ppim[0]+ppip[0]).m()/GeV; - *_pipi1[2]+=(ppim[0]+ppi0[0]).m()/GeV; - *_pipi1[2]+=(ppim[0]+ppi0[1]).m()/GeV; - *_pipi1[1]+=(ppim[1]+ppip[0]).m()/GeV; - *_pipi1[2]+=(ppim[1]+ppi0[0]).m()/GeV; - *_pipi1[2]+=(ppim[1]+ppi0[1]).m()/GeV; - *_pipi1[3]+=(ppip[0]+ppi0[0]).m()/GeV; - *_pipi1[3]+=(ppip[0]+ppi0[1]).m()/GeV; - *_pipi1[4]+=(ppi0[0]+ppi0[1]).m()/GeV; - *_pipipi1[0]+=(ppim[0]+ppim[1]-ptotal).m()/GeV; - *_pipipi1[1]+=(ppim[0]+ppip[0]-ptotal).m()/GeV; - *_pipipi1[2]+=(ppim[0]+ppi0[0]-ptotal).m()/GeV; - *_pipipi1[2]+=(ppim[0]+ppi0[1]-ptotal).m()/GeV; - *_pipipi1[1]+=(ppim[1]+ppip[0]-ptotal).m()/GeV; - *_pipipi1[2]+=(ppim[1]+ppi0[0]-ptotal).m()/GeV; - *_pipipi1[2]+=(ppim[1]+ppi0[1]-ptotal).m()/GeV; - *_pipipi1[3]+=(ppip[0]+ppi0[0]-ptotal).m()/GeV; - *_pipipi1[3]+=(ppip[0]+ppi0[1]-ptotal).m()/GeV; - *_pipipi1[4]+=(ppi0[0]+ppi0[1]-ptotal).m()/GeV; - *_pipipipi1[0]+=(ptotal-ppim[0]).m()/GeV; - *_pipipipi1[0]+=(ptotal-ppim[1]).m()/GeV; - *_pipipipi1[1]+=(ptotal-ppip[0]).m()/GeV; - *_pipipipi1[2]+=(ptotal-ppi0[0]).m()/GeV; - *_pipipipi1[2]+=(ptotal-ppi0[1]).m()/GeV; - *_q1+=ptotal.m()/GeV; - } - else if(ppi0.size()==4&&ppim.size()==1) { - *_pipi2[0]+=(ppim[0]+ppi0[0]).m()/GeV; - *_pipi2[0]+=(ppim[0]+ppi0[1]).m()/GeV; - *_pipi2[0]+=(ppim[0]+ppi0[2]).m()/GeV; - *_pipi2[0]+=(ppim[0]+ppi0[3]).m()/GeV; - *_pipi2[1]+=(ppi0[0]+ppi0[1]).m()/GeV; - *_pipi2[1]+=(ppi0[0]+ppi0[2]).m()/GeV; - *_pipi2[1]+=(ppi0[0]+ppi0[3]).m()/GeV; - *_pipi2[1]+=(ppi0[1]+ppi0[2]).m()/GeV; - *_pipi2[1]+=(ppi0[1]+ppi0[3]).m()/GeV; - *_pipi2[1]+=(ppi0[2]+ppi0[3]).m()/GeV; - *_pipipi2[0]+=(ppim[0]+ppi0[0]-ptotal).m()/GeV; - *_pipipi2[0]+=(ppim[0]+ppi0[1]-ptotal).m()/GeV; - *_pipipi2[0]+=(ppim[0]+ppi0[2]-ptotal).m()/GeV; - *_pipipi2[0]+=(ppim[0]+ppi0[3]-ptotal).m()/GeV; - *_pipipi2[1]+=(ppi0[0]+ppi0[1]-ptotal).m()/GeV; - *_pipipi2[1]+=(ppi0[0]+ppi0[2]-ptotal).m()/GeV; - *_pipipi2[1]+=(ppi0[0]+ppi0[3]-ptotal).m()/GeV; - *_pipipi2[1]+=(ppi0[1]+ppi0[2]-ptotal).m()/GeV; - *_pipipi2[1]+=(ppi0[1]+ppi0[3]-ptotal).m()/GeV; - *_pipipi2[1]+=(ppi0[2]+ppi0[3]-ptotal).m()/GeV; - *_pipipipi2[0]+=(ptotal-ppim[0]).m()/GeV; - *_pipipipi2[1]+=(ptotal-ppi0[0]).m()/GeV; - *_pipipipi2[1]+=(ptotal-ppi0[1]).m()/GeV; - *_pipipipi2[1]+=(ptotal-ppi0[2]).m()/GeV; - *_pipipipi2[1]+=(ptotal-ppi0[3]).m()/GeV; - *_q2+=ptotal.m()/GeV; - } - else if(ppim.size()==3&&ppip.size()==2) { - *_pipi3[0]+=(ppip[0]+ppip[1]).m()/GeV; - *_pipi3[1]+=(ppim[0]+ppip[0]).m()/GeV; - *_pipi3[1]+=(ppim[0]+ppip[1]).m()/GeV; - *_pipi3[1]+=(ppim[1]+ppip[0]).m()/GeV; - *_pipi3[1]+=(ppim[1]+ppip[1]).m()/GeV; - *_pipi3[1]+=(ppim[2]+ppip[0]).m()/GeV; - *_pipi3[1]+=(ppim[2]+ppip[1]).m()/GeV; - *_pipi3[2]+=(ppim[0]+ppim[1]).m()/GeV; - *_pipi3[2]+=(ppim[0]+ppim[2]).m()/GeV; - *_pipi3[2]+=(ppim[1]+ppim[2]).m()/GeV; - *_pipipi3[0]+=(ppip[0]+ppip[1]-ptotal).m()/GeV; - *_pipipi3[1]+=(ppim[0]+ppip[0]-ptotal).m()/GeV; - *_pipipi3[1]+=(ppim[0]+ppip[1]-ptotal).m()/GeV; - *_pipipi3[1]+=(ppim[1]+ppip[0]-ptotal).m()/GeV; - *_pipipi3[1]+=(ppim[1]+ppip[1]-ptotal).m()/GeV; - *_pipipi3[1]+=(ppim[2]+ppip[0]-ptotal).m()/GeV; - *_pipipi3[1]+=(ppim[2]+ppip[1]-ptotal).m()/GeV; - *_pipipi3[2]+=(ppim[0]+ppim[1]-ptotal).m()/GeV; - *_pipipi3[2]+=(ppim[0]+ppim[2]-ptotal).m()/GeV; - *_pipipi3[2]+=(ppim[1]+ppim[2]-ptotal).m()/GeV; - *_pipipipi3[0]+=(ptotal-ppim[0]).m()/GeV; - *_pipipipi3[0]+=(ptotal-ppim[1]).m()/GeV; - *_pipipipi3[0]+=(ptotal-ppim[2]).m()/GeV; - *_pipipipi3[1]+=(ptotal-ppip[0]).m()/GeV; - *_pipipipi3[1]+=(ptotal-ppip[1]).m()/GeV; - *_q3+=ptotal.m()/GeV; - } - } -} - - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigTau5Pion("Herwig::Tau5Pion", "HwTauAnalysis.so"); - -void Tau5Pion::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the Tau5Pion class"); - -} - -void Tau5Pion::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _pipi1[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2-3P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2-31/GeV", - " XGX XGX XX "); - _pipi1[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2+3 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2-3P2+31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2+31/GeV", - " XGX XGX XX "); - _pipi1[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2-3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2031/GeV", - " XGX XGX XX "); - _pipi1[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2+3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2+3P2031/GeV", - " XGX XGX XX "); - _pipi1[4]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P203P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2031/GeV", - " XGX XGX XX "); - _pipipi1[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P203P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2+3P203P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2+3P203P2031/GeV", - " XGX XGX XGX XX "); - _pipipi1[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2-3P203P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2-3P203P2031/GeV", - " XGX XGX XGX XX "); - _pipipi1[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2-3P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2+3P2-3P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2+3P2-3P2031/GeV", - " XGX XGX XGX XX "); - _pipipi1[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2-3P2-3P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2-3P2-3P2031/GeV", - " XGX XGX XGX XX "); - _pipipi1[4]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2-3P2-3 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2+3P2-3P2-31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2+3P2-3P2-31/GeV", - " XGX XGX XGX XX "); - _pipipipi1[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2+32P203 mass in T2-3RN0T12P2-3P2+32P203", - "GX XGX X GX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm0P2-3P2+32P2031/GeV2-13", - " G G XGX XGX X GX XX X X", - "m0P2-3P2+32P2031/GeV", - " XGX XGX X GX XX "); - _pipipipi1[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "2P2-32P203 mass in T2-3RN0T12P2-3P2+32P203", - " GX X GX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm02P2-32P2031/GeV2-13", - " G G X GX X GX XX X X", - "m02P2-32P2031/GeV", - " X GX X GX XX "); - _pipipipi1[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "2P2-3P2+3P203 mass in T2-3RN0T12P2-3P2+32P203", - " GX XGX XGX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm02P2-3P2+3P2031/GeV2-13", - " G G X GX XGX XGX XX X X", - "m02P2-3P2+3P2031/GeV", - " X GX XGX XGX XX "); - _q1->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "2P2-3P2+32P203 mass in T2-3RN0T12P2-3P2+32P203", - " GX XGX X GX X GX XWGXGX GX XGX X GX X", - "1/SdS/dm02P2-3P2+32P2031/GeV2-13", - " G G X GX XGX X GX XX X X", - "m02P2-3P2+32P2031/GeV", - " X GX XGX X GX XX "); - _pipi2[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203 mass in T2-3RN0T1P2-34P203", - "GX XGX X GX XWGXGXGX X GX X", - "1/SdS/dm0P2-3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2031/GeV", - " XGX XGX XX "); - _pipi2[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203 mass in T2-3RN0T1P2-34P203", - "GX XGX X GX XWGXGXGX X GX X", - "1/SdS/dm0P203P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2031/GeV", - " XGX XGX XX "); - _pipipi2[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203P203 mass in T2-3RN0T1P2-34P203", - "GX XGX XGX X GX XWGXGXGX X GX X", - "1/SdS/dm0P203P203P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P203P203P2031/GeV", - " XGX XGX XGX XX "); - _pipipi2[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203P203 mass in T2-3RN0T1P2-34P203", - "GX XGX XGX X GX XWGXGXGX X GX X", - "1/SdS/dm0P2-3P203P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2-3P203P2031/GeV", - " XGX XGX XGX XX "); - _pipipipi2[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203P203P203 mass in T2-3RN0T1P2-34P203", - "GX XGX XGX XGX X GX XWGXGXGX X GX X", - "1/SdS/dm0P203P203P203P2031/GeV2-13", - " G G XGX XGX XGX XGX XX X X", - "m0P203P203P203P2031/GeV", - " XGX XGX XGX XGX XX "); - _pipipipi2[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203P203P203 mass in T2-3RN0T1P2-34P203", - "GX XGX XGX XGX X GX XWGXGXGX X GX X", - "1/SdS/dm0P2-3P203P203P2031/GeV2-13", - " G G XGX XGX XGX XGX XX X X", - "m0P2-3P203P203P2031/GeV", - " XGX XGX XGX XGX XX "); - _q2->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - " mass in T2-3RN0T1P2-34P203", - " GX XWGXGXGX X GX X", - "1/SdS/dm0P2-34P2031/GeV2-13", - " G G XGX X GX XX X X", - "m0P2-34P2031/GeV", - " XGX X GX XX "); - - - - _pipi3[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2+3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2+3P2+31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2+3P2+31/GeV", - " XGX XGX XX "); - _pipi3[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2-3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2+3P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2+3P2-31/GeV", - " XGX XGX XX "); - _pipi3[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2-3P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2-31/GeV", - " XGX XGX XX "); - _pipipi3[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3P2-3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2-3P2-3P2-31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2-3P2-3P2-31/GeV", - " XGX XGX XGX XX "); - _pipipi3[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3P2+3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2-3P2-3P2+31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2-3P2-3P2+31/GeV", - " XGX XGX XGX XX "); - _pipipi3[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2+3P2+3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2-3P2+3P2+31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2-3P2+3P2+31/GeV", - " XGX XGX XGX XX "); - _pipipipi3[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3P2+3P2+3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX XGX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2-3P2-3P2+3P2+31/GeV2-13", - " G G XGX XGX XGX XGX XX X X", - "m0P2-3P2-3P2+3P2+31/GeV", - " XGX XGX XGX XGX XX "); - _pipipipi3[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3P2-3P2+3 mass in T2-3RN0T13P2-32P2+3", - "GX XGX XGX XGX X GX XWGXGX GX X GX X", - "1/SdS/dm0P2-3P2-3P2-3P2+31/GeV2-13", - " G G XGX XGX XGX XGX XX X X", - "m0P2-3P2-3P2-3P2+31/GeV", - " XGX XGX XGX XGX XX "); - _q3->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - " mass in T2-3RN0T13P2-32P2+3", - " GX XWGXGX GX X GX X", - "1/SdS/dm03P2-32P2+1/GeV2-13", - " G G X GX X GX X X X", - "m03P2-32P2+1/GeV", - " X GX X GX X "); - -} - -void Tau5Pion::doinitrun() { - AnalysisHandler::doinitrun(); - for(unsigned int ix=0;ix<5;++ix) { - _pipi1 .push_back(new_ptr(Histogram(0.,1.8,200))); - _pipipi1.push_back(new_ptr(Histogram(0.,1.8,200))); - } - for(unsigned int ix=0;ix<3;++ix) { - _pipipipi1.push_back(new_ptr(Histogram(0.,1.8,200))); - _pipi3.push_back(new_ptr(Histogram(0.,1.8,200))); - _pipipi3.push_back(new_ptr(Histogram(0.,1.8,200))); - } - for(unsigned int ix=0;ix<2;++ix) { - _pipi2.push_back(new_ptr(Histogram(0.,1.8,200))); - _pipipi2.push_back(new_ptr(Histogram(0.,1.8,200))); - _pipipipi2.push_back(new_ptr(Histogram(0.,1.8,200))); - _pipipipi3.push_back(new_ptr(Histogram(0.,1.8,200))); - } - _q1=new_ptr(Histogram(0.,1.8,200)); - _q2=new_ptr(Histogram(0.,1.8,200)); - _q3=new_ptr(Histogram(0.,1.8,200)); -} diff --git a/Contrib/TauAnalysis/Tau5Pion.h b/Contrib/TauAnalysis/Tau5Pion.h deleted file mode 100644 --- a/Contrib/TauAnalysis/Tau5Pion.h +++ /dev/null @@ -1,187 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_Tau5Pion_H -#define HERWIG_Tau5Pion_H -// -// This is the declaration of the Tau5Pion class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the Tau5Pion class. - * - * @see \ref Tau5PionInterfaces "The interfaces" - * defined for Tau5Pion. - */ -class Tau5Pion: public AnalysisHandler { - -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); - - using AnalysisHandler::analyze; - //@} - -public: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - Tau5Pion & operator=(const Tau5Pion &) = delete; - -private: - - /** - * Histograms for the \f$\pi\pi\f$ masses - */ - //@{ - /** - * Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay - */ - vector _pipi1; - - /** - * Histograms for the \f$4\pi^02\pi^-\f$ decay - */ - vector _pipi2; - - /** - * Histograms for the \f$3\pi^-2\pi^+\f$ decay - */ - vector _pipi3; - //@} - - /** - * Histograms for the \f$\pi\pi\pi\f$ masses - */ - //@{ - /** - * Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay - */ - vector _pipipi1; - - /** - * Histograms for the \f$4\pi^02\pi^-\f$ decay - */ - vector _pipipi2; - - /** - * Histograms for the \f$3\pi^-2\pi^+\f$ decay - */ - vector _pipipi3; - //@} - - /** - * Histograms for the \f$\pi\pi\pi\pi\f$ masses - */ - //@{ - /** - * Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay - */ - vector _pipipipi1; - - /** - * Histograms for the \f$4\pi^02\pi^-\f$ decay - */ - vector _pipipipi2; - - /** - * Histograms for the \f$3\pi^-2\pi^+\f$ decay - */ - vector _pipipipi3; - //@} - - /** - * Histograms for the total hadronic mass - */ - //@{ - /** - * Histograms for the \f$2\pi^02\pi^-\pi^+\f$ decay - */ - HistogramPtr _q1; - - /** - * Histograms for the \f$4\pi^02\pi^-\f$ decay - */ - HistogramPtr _q2; - - /** - * Histograms for the \f$3\pi^-2\pi^+\f$ decay - */ - HistogramPtr _q3; - //@} -}; - -} - -#endif /* HERWIG_Tau5Pion_H */ diff --git a/Contrib/TauAnalysis/TauCorrelationAnalysis.cc b/Contrib/TauAnalysis/TauCorrelationAnalysis.cc deleted file mode 100644 --- a/Contrib/TauAnalysis/TauCorrelationAnalysis.cc +++ /dev/null @@ -1,246 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the TauCorrelationAnalysis class. -// - -#include "TauCorrelationAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/EventRecord/Event.h" -#include - -using namespace Herwig; - - -void TauCorrelationAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _phi->topdrawOutput(output,Frame|Errorbars, - "RED", - "F2*3 in h203RT2+3T2-3 with TRPN0T1", - "GX X X XWGX XGX X GWGGXGX", - "1/GdG/dF2*3", - " F F GX X", - "F2*3", - "GX X"); - _delta->topdrawOutput(output,Frame|Errorbars, - "RED", - "D2*3 in h203RT2+3T2-3 with TRPN0T1", - "GX X X XWGX XGX X GWGGXGX", - "1/GdG/dD2*3", - " F F GX X", - "D2*3", - "GX X"); - _rhoangle1->topdrawOutput(output,Frame|Errorbars, - "RED", - "F2*3 in h203RT2+3T2-3 with TRRN0T1 and y011y021>0", - "GX X X XWGX XGX X GWGGXGX X X X X ", - "1/GdG/dF2*3", - " F F GX X", - "F2*3", - "GX X"); - _rhoangle2->topdrawOutput(output,Frame|Errorbars, - "RED", - "F2*3 in h203RT2+3T2-3 with TRRN0T1 and y011y021<0", - "GX X X XWGX XGX X GWGGXGX X X X X ", - "1/GdG/dF2*3", - " F F GX X", - "F2*3", - "GX X"); -} - -void TauCorrelationAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - using Constants::pi; - _phi = new_ptr(Histogram(0.,pi,100)); - _delta = new_ptr(Histogram(3.,pi,100)); - _rhoangle1 = new_ptr(Histogram(0.,pi,100)); - _rhoangle2 = new_ptr(Histogram(0.,pi,100)); -} - -void TauCorrelationAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // find all higgs bosons particles - tPVector particles; - for(unsigned int ix=0, nstep=event->primaryCollision()->steps().size(); - ixprimaryCollision()->step(ix)->all(); - ThePEG::ParticleSet::iterator iter=part.begin(); - ThePEG::ParticleSet::iterator end=part.end(); - for( ;iter!=end;++iter) { - if((**iter).id()==ParticleID::h0) particles.push_back(*iter); - } - } - // analyse them - analyze(particles); -} - -void TauCorrelationAnalysis::analyze(const tPVector & particles) { - AnalysisHandler::analyze(particles); - // Calls analyze() for each particle. -} - -namespace { - -tPPtr findTau(tPPtr parent) { - for(unsigned int ix=0;ixchildren().size();++ix) { - if(parent->children()[ix]->id()==parent->id()) - return findTau(parent->children()[ix]); - } - return parent; -} - -} - -void TauCorrelationAnalysis::analyze(tPPtr part) { - // check the number of children of the particle - if(part->children().size()!=2) return; - // and they are tau's - if(abs(part->children()[0]->id())!=ParticleID::tauminus|| - abs(part->children()[1]->id())!=ParticleID::tauminus) return; - ParticleVector children; - for(unsigned int ix=0;ixchildren().size();++ix) - children.push_back(findTau(part->children()[ix])); - // and number of children - if(!((children[0]->children().size()==2|| - children[0]->children().size()==3)&& - (children[1]->children().size()==2|| - children[1]->children().size()==3))) return; - // call rho and pi specific analysis - analyzePi(part,children); - analyzeRho(part,children); -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigTauCorrelationAnalysis("Herwig::TauCorrelationAnalysis", "HwTauAnalysis.so"); - -void TauCorrelationAnalysis::Init() { - - static ClassDocumentation documentation - ("The TauCorrelationAnalysis class performs the analysis of correlation effects" - " in the decays of tau's produced in Higgs decay"); - -} - -void TauCorrelationAnalysis::analyzePi(tPPtr part, - ParticleVector children) { - if(children[0]->children().size()!=2|| - children[1]->children().size()!=2) return; - // now examine the decay products - tPPtr taup,taum,pim,pip,nu,nub; - for(unsigned int ix=0;ix<2;++ix) { - if(children[ix]->id()==ParticleID::tauminus) { - taum=children[ix]; - for(unsigned int ix=0;ix<2;++ix) { - if(taum->children()[ix]->id()==ParticleID::piminus) { - pim=taum->children()[ix]; - } - else if(taum->children()[ix]->id()==ParticleID::nu_tau) { - nu=taum->children()[ix]; - } - } - } - else { - taup=children[ix]; - for(unsigned int ix=0;ix<2;++ix) { - if(taup->children()[ix]->id()==ParticleID::piplus) { - pip=taup->children()[ix]; - } - else if(taup->children()[ix]->id()==ParticleID::nu_taubar) { - nub=taup->children()[ix]; - } - } - } - } - if(!taup||!taum||!pim||!pip||!nu||!nub){return;} - Boost bv(-part->momentum().boostVector()); - Lorentz5Momentum ptaup(taup->momentum());ptaup.boost(bv); - Lorentz5Momentum ptaum(taum->momentum());ptaum.boost(bv); - Lorentz5Momentum ppim( pim->momentum() );ppim.boost(bv); - Lorentz5Momentum ppip( pip->momentum() );ppip.boost(bv); - Lorentz5Momentum pnu( nu->momentum() );pnu.boost(bv); - Lorentz5Momentum pnub( nub->momentum() );pnub.boost(bv); - ThreeVector norm1(ppip.vect().cross(pnub.vect())); - ThreeVector norm2(ppim.vect().cross(pnu.vect())); - double phi=norm1.angle(norm2); - *_phi +=phi; - *_delta +=ppip.vect().angle(ppim.vect()); -} - -void TauCorrelationAnalysis::analyzeRho(tPPtr part, - ParticleVector children) { - // now examine the decay products - tPPtr taup,taum,pim,pip,nu,nub,pi0a,pi0b,rhop,rhom; - int idtemp; - for(unsigned int ix=0;ix<2;++ix) { - if(children[ix]->id()==ParticleID::tauminus) { - taum=children[ix]; - for(unsigned int iz=0;izchildren().size();++iz) { - idtemp=taum->children()[iz]->id(); - if(idtemp==-213||idtemp==-100213||idtemp==-30213) { - tPPtr rhom=taum->children()[iz]; - if(rhom->children().size()!=2) return; - for(unsigned int iy=0;iy<2;++iy) { - int idb=rhom->children()[iy]->id(); - if(idb==ParticleID::piminus) pim=rhom->children()[iy]; - else if(idb==ParticleID::pi0) pi0a=rhom->children()[iy]; - } - } - else if(idtemp==ParticleID::nu_tau) { - nu=taum->children()[iz]; - } - else if(idtemp==ParticleID::piminus) pim =taum->children()[iz]; - else if(idtemp==ParticleID::pi0) pi0a=taum->children()[iz]; - } - } - else { - taup=children[ix]; - for(unsigned int iz=0;izchildren().size();++iz) { - idtemp=taup->children()[iz]->id(); - if(idtemp==213||idtemp==100213||idtemp==30213) { - tPPtr rhop=taup->children()[iz]; - if(rhop->children().size()!=2) return; - for(unsigned int iy=0;iy<2;++iy) { - int idb=rhop->children()[iy]->id(); - if(idb==ParticleID::piplus) pip=rhop->children()[iy]; - else if(idb==ParticleID::pi0) pi0b=rhop->children()[iy]; - } - } - else if(idtemp==ParticleID::nu_taubar) { - nub=taup->children()[iz]; - } - else if(idtemp==ParticleID::piplus) pip = taup->children()[iz]; - else if(idtemp==ParticleID::pi0) pi0b = taup->children()[iz]; - } - } - } - if(!taup||!taum||!pim||!pip||!pi0a||!pi0b||!nu||!nub) return; - LorentzMomentum prest(pim ->momentum()+pip ->momentum()+ - pi0a->momentum()+pi0b->momentum()); - Boost bv(-prest.boostVector()); - Lorentz5Momentum ppim( pim->momentum() );ppim.boost(bv); - Lorentz5Momentum ppip( pip->momentum() );ppip.boost(bv); - Lorentz5Momentum ppi0a( pi0a->momentum() );ppi0a.boost(bv); - Lorentz5Momentum ppi0b( pi0b->momentum() );ppi0b.boost(bv); - ThreeVector norm1(ppip.vect().cross(ppi0b.vect())); - ThreeVector norm2(ppim.vect().cross(ppi0a.vect())); - double phi=norm1.angle(norm2); - - Lorentz5Momentum ptaup(taup->momentum()); - Lorentz5Momentum ptaum(taum->momentum()); - bv = -ptaum.boostVector(); - ppim =pim->momentum();ppim.boost(bv); - ppi0a=pi0a->momentum();ppi0a.boost(bv); - bv = -ptaup.boostVector(); - ppip =pip->momentum();ppip.boost(bv); - ppi0b=pi0b->momentum();ppi0b.boost(bv); - double y1=(ppip.e()-ppi0b.e())/(ppip.e()+ppi0b.e()); - double y2=(ppim.e()-ppi0a.e())/(ppim.e()+ppi0a.e()); - if(y1*y2>0) *_rhoangle1+=phi; - else *_rhoangle2+=phi; -} diff --git a/Contrib/TauAnalysis/TauCorrelationAnalysis.h b/Contrib/TauAnalysis/TauCorrelationAnalysis.h deleted file mode 100644 --- a/Contrib/TauAnalysis/TauCorrelationAnalysis.h +++ /dev/null @@ -1,169 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_TauCorrelationAnalysis_H -#define HERWIG_TauCorrelationAnalysis_H -// -// This is the declaration of the TauCorrelationAnalysis class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * The documentation of the TauCorrelationAnalysis class is designed to - * perform some analysis of the distributions of tau decay products in - * Higgs decays. - * - * The analysis of the pion decays is based on hep-ph/0202007 and the - * rho decays is based on hep-ph/0204292. - * - * @see \ref TauCorrelationAnalysisInterfaces "The interfaces" - * defined for TauCorrelationAnalysis. - */ -class TauCorrelationAnalysis: public AnalysisHandler { - -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: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -protected: - - /** - * Methods to perform the analysis - */ - //@{ - /** - * Analyze the given particle for correlations with pi. - * @param particle pointer to the particle to be analyzed. - */ - void analyzePi(tPPtr particle, ParticleVector children); - /** - * Analyze the given particle for correlations with rho. - * @param particle pointer to the particle to be analyzed. - */ - void analyzeRho(tPPtr particle, ParticleVector children); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - TauCorrelationAnalysis & operator=(const TauCorrelationAnalysis &) = delete; - -private: - - /** - * Histogram of the \f$\phi\f$ angle in - * \f$H\to\tau^+\tau^-\to\pi^+\bar{\nu}_tau\pi^-\nu_tau\f$ - */ - HistogramPtr _phi; - - /** - * Histogram of the \f$\delta\f$ angle in - * \f$H\to\tau^+\tau^-\to\pi^+\bar{\nu}_tau\pi^-\nu_tau\f$ - */ - HistogramPtr _delta; - - /** - * Histogram of the \f$\phi\f$ angle in - * \f$H\to\tau^+\tau^-\to\rho^+\bar{\nu}_tau\rho^-\nu_tau\f$ - */ - //@{ - /** - * First angle - */ - HistogramPtr _rhoangle1; - - /** - * Second angle - */ - HistogramPtr _rhoangle2; - //@} -}; - -} - -#endif /* HERWIG_TauCorrelationAnalysis_H */ diff --git a/Contrib/TauAnalysis/TauTo2MesonAnalysis.cc b/Contrib/TauAnalysis/TauTo2MesonAnalysis.cc deleted file mode 100644 --- a/Contrib/TauAnalysis/TauTo2MesonAnalysis.cc +++ /dev/null @@ -1,310 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the TauTo2MesonAnalysis class. -// - -#include "TauTo2MesonAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/Repository/EventGenerator.h" -#include "ThePEG/StandardModel/StandardModelBase.h" -#include "ThePEG/PDT/EnumParticles.h" - -using namespace Herwig; - -inline void TauTo2MesonAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - // BELLE data for the pipi distribution - double valsBELLE[]={0.076,0.100,0.150,0.200,0.250,0.300,0.350,0.400,0.450,0.500, - 0.550,0.600,0.650,0.700,0.750,0.800,0.850,0.900,0.950,1.000, - 1.050,1.100,1.150,1.200,1.250,1.300,1.350,1.400,1.450,1.500, - 1.550,1.600,1.650,1.700,1.750,1.800,1.850,1.900,1.950,2.000, - 2.050,2.100,2.150,2.200,2.250,2.300,2.350,2.400,2.450,2.500, - 2.550,2.600,2.650,2.700,2.750,2.800,2.850,2.900,2.950,3.000, - 3.050,3.100,3.150}; - double dvalBELLE[]={ 10.3, 64.5, 123.2, 191.2, 284.3, - 443.5, 690.8,1113.9,1781.8,2716.5, - 3260.2,2765.4,1879.6,1222.8, 816.7, - 590.1, 424.4, 324.9, 259.1, 202.0, - 175.7, 147.9, 122.6, 110.6, 97.3, - 82.1, 74.0, 63.2, 55.7, 49.3, - 43.2,331.93,298.43,263.91,198.85, - 176.86,145.50,110.07, 81.40, 64.57, - 43.10, 27.46, 20.27, 14.58, 8.89, - 3.77, 0.31, -0.69, 0.07, 1.52, - 2.62, 3.64, 4.17, 3.85, 3.16, - 3.44, 1.96, 1.86, 1.55, 0.89, - 0.32, 0.04}; - double errorstatBELLE[]={ 5.0 , 3.0 , 3.0 , 3.4 , 4.3 , 5.9 , 8.6 ,13.3 ,20.8 ,31.1 , - 37.2 ,31.7 ,21.9 ,14.6 ,10.1 , 7.7 , 5.9 , 4.9 , 4.2 , 3.6 , - 3.3 , 3.0 , 2.7 , 2.5 , 2.3 , 2.1 , 1.9 , 1.7 , 1.5 , 1.4 , - 1.3 ,11.43, 9.26, 8.89, 8.09, 6.14, 5.35, 4.61, 3.76, 3.45, - 2.76, 2.53, 2.17, 2.03, 1.82, 1.58, 1.42, 1.34, 1.26, 1.05, - 0.97, 1.01, 2.95, 1.12, 1.32, 0.99, 0.60, 0.61, 0.43, 0.42, - 0.11, 0.01}; - double errorsystBELLE[]={ 4.1 , 4.6 , 3.8 , 3.8 , 3.6 , 3.8 , 3.8 , 4.0 , 4.6 , 4.1 , - 3.8 , 3.1 , 2.3 , 1.8 , 1.3 , 1.1 , 1.0 , 0.8 , 0.9 , 0.6 , - 0.8 , 0.5 , 0.7 , 0.4 , 0.5 , 0.4 , 0.4 , 0.4 , 0.3 , 0.4 , - 0.3 , 2.33, 2.12, 2.54, 3.16, 2.85, 2.74, 2.11, 1.76, 1.78, - 1.87, 1.93, 2.11, 2.17, 2.21, 1.98, 1.45, 1.18, 1.27, 1.41, - 1.55, 1.81, 1.89, 1.66, 1.30, 1.37, 0.76, 0.71, 0.57, 0.32, - 0.12, 0.01}; - double evalBELLE[62]; - for(unsigned int ix=0;ix<62;++ix) { - evalBELLE[ix]=sqrt(sqr(errorstatBELLE[ix])+sqr(errorsystBELLE[ix])); - if(ix<31) { - dvalBELLE[ix]*=1e-3; - evalBELLE[ix]*=1e-3; - } - else { - dvalBELLE[ix]*=1e-4; - evalBELLE[ix]*=1e-4; - } - } - vector bins(valsBELLE ,valsBELLE +63); - vector data = vector(dvalBELLE ,dvalBELLE +62); - vector error = vector(evalBELLE ,evalBELLE +62); - _m2pipiBELLE= new_ptr(Histogram(bins,data,error)); - double valsCLEO[]={0.275,0.300,0.325,0.350,0.375,0.400,0.425,0.450,0.475,0.500, - 0.525,0.550,0.575,0.600,0.625,0.650,0.675,0.700,0.725,0.750, - 0.775,0.800,0.825,0.850,0.875,0.900,0.925,0.950,0.975,1.000, - 1.050,1.100,1.150,1.200,1.250,1.300,1.350,1.400,1.450,1.500, - 1.550,1.600,1.650,1.700}; - double dvalCLEO[]={ 1.5 , 8.0 , 6.0 , 8.5 , 15.6 , - 16.2 , 24.9 , 41.4 , 50.6 , 60.9 , - 79.8 , 107.4 , 144.3 , 204.5 , 269.1 , - 385.8 , 571.5 , 826.8 ,1078.4 , 1228.1 , - 1114.7 , 878.1 , 629.3 , 446.7 , 326.2 , - 262.1 , 207.3 , 158.8 , 129.6 , 202.8 , - 151.0 , 111.0 , 87.0 , 63.9 , 42.7 , - 29.2 , 18.1 , 6.98, 2.91, 0.71, - 0.59, 0.68, 0.28}; - double evalCLEO[]={ 1.4 , 2.5 , 2.6 , 2.3 , 2.6 , 2.9 , 3.1 , 3.4 , 3.7 , 4.0 , - 4.4 , 4.7 , 5.2 , 5.9 , 6.5 , 7.5 , 8.7 ,10.1 ,11.3 ,11.8 , - 11.0 , 9.6 , 7.9 , 6.6 , 5.5 , 4.9 , 4.3 , 3.7 , 3.4 , 4.8 , - 4.1 , 3.4 , 3.0 , 2.5 , 2.0 , 1.7 , 1.3 , 0.84, 0.59, 0.32, - 0.25, 0.26, 0.21}; - for(unsigned int ix=0;ix<43;++ix) { - if(ix<29) { - dvalCLEO[ix]*=1e-4/0.025; - evalCLEO[ix]*=1e-4/0.025; - } - else { - dvalCLEO[ix]*=1e-4/0.05; - evalCLEO[ix]*=1e-4/0.05; - } - } - bins = vector(valsCLEO ,valsCLEO +44); - data = vector(dvalCLEO ,dvalCLEO +43); - error = vector(evalCLEO ,evalCLEO +43); - _mpipiCLEO= new_ptr(Histogram(bins,data,error)); - _m2KpiA=new_ptr(Histogram(0.,3.15,200)); - _mKpiA =new_ptr(Histogram(0.,1.8,200)); - _m2KpiB=new_ptr(Histogram(0.,3.15,200)); - _mKpiB =new_ptr(Histogram(0.,1.8,200)); - _m2KpiC=new_ptr(Histogram(0.,3.15,200)); - _m2KpiD=new_ptr(Histogram(0.,3.15,200)); - _m2Keta=new_ptr(Histogram(0.,3.15,200)); - _mKeta =new_ptr(Histogram(0.,1.8,200)); - _m2KK =new_ptr(Histogram(0.,3.15,200)); - _mKK =new_ptr(Histogram(0.,1.8,200)); -} - -void TauTo2MesonAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - tPVector hadrons=event->getFinalState(); - map taus; - for(unsigned int ix=0;ixparents().empty()) mother=mother->parents()[0]; - else mother=tPPtr(); - } - while(mother&&abs(mother->id())!=ParticleID::tauminus); - if(mother&&abs(mother->id())==ParticleID::tauminus) { - if(taus.find(mother)==taus.end()) { - taus.insert(make_pair(mother,ParticleVector())); - } - taus[mother].push_back(hadrons[ix]); - } - } - map::const_iterator tit; - for(tit=taus.begin();tit!=taus.end();++tit) { - if(tit->second.size()!=3) continue; - ParticleVector decay=tit->second; - using Constants::pi; - unsigned int npi0(0),npip(0),nkp(0),nk0(0),neta(0); - Lorentz5Momentum pdecay; - for(unsigned int ix=0;ixid()); - if(id!=ParticleID::nu_tau) pdecay+=decay[ix]->momentum(); - if(id==ParticleID::pi0) ++npi0; - else if(id==ParticleID::piplus) ++npip; - else if(id==ParticleID::Kplus) ++nkp; - else if(id==ParticleID::K0) ++nk0; - else if(id==ParticleID::eta) ++neta; - } - double mass2 = pdecay.m2()/GeV2; - double mass = sqrt(mass2); - if(npi0==1&&npip==1) { - *_m2pipiBELLE+=mass2; - *_mpipiCLEO+=mass; - } - else if(nkp==1&&npi0==1) { - *_m2KpiA+=mass2; - *_mKpiA+=mass; - double mtau=getParticleData(ParticleID::tauminus)->mass()/GeV; - double m1=getParticleData(ParticleID::Kplus)->mass()/GeV; - double m2=getParticleData(ParticleID::pi0)->mass()/GeV; - double q=0.5*sqrt((sqr(mass2-sqr(m1)-sqr(m2))-4*sqr(m1*m2))/mass2); - double fact = sqr(mtau*mtau-mass2)*q/mass2/mass/mtau* - (2.*mass2+sqr(mtau))/3./sqr(mtau) - *generator()->standardModel()->CKM(0,1)/pow(2.,8)/pow(pi,3)*sqr(1.16637e-5/GeV2) - /(2.26501e-11*MeV)*GeV2*GeV2*GeV; - _m2KpiC->addWeighted(mass2,1./fact); - } - else if(nk0==1&&npip==1) { - *_m2KpiB+=mass2; - *_mKpiB+=mass; - double mtau=getParticleData(ParticleID::tauminus)->mass()/GeV; - double m1=getParticleData(ParticleID::K0)->mass()/GeV; - double m2=getParticleData(ParticleID::piplus)->mass()/GeV; - double q=0.5*sqrt((sqr(mass2-sqr(m1)-sqr(m2))-4*sqr(m1*m2))/mass2); - double fact = sqr(mtau*mtau-mass2)*q/mass2/mass/mtau* - (2.*mass2+sqr(mtau))/3./sqr(mtau) - *generator()->standardModel()->CKM(0,1)/pow(2.,8)/pow(pi,3)*sqr(1.16637e-5/GeV2) - /(2.26501e-11*MeV)*GeV2*GeV2*GeV; - _m2KpiD->addWeighted(mass2,1./fact); - } - else if(neta==1&&nkp==1) { - *_m2Keta+=mass2; - *_mKeta+=mass; - } - else if(nkp==1&&nk0==1) { - *_m2KK +=mass2; - *_mKK +=mass; - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigTauTo2MesonAnalysis("Herwig::TauTo2MesonAnalysis", "HwTauAnalysis.so"); - -void TauTo2MesonAnalysis::Init() { - - static ClassDocumentation documentation - ("The TauTo2MesonAnalysis class plots the mass distributions of tau decays to" - "two mesons."); - -} - -void TauTo2MesonAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _m2pipiBELLE->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P203 mass", - "GX XGX X ", - "1/SdS/dm2230P2+3P2031/GeV2-23", - " G G X XXGX XGX XX X X", - "m2230P2+3P2031/GeV223", - " X XXGX XGX XX X X"); - _mpipiCLEO->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P203 mass", - "GX XGX X ", - "1/SdS/dm0P2+3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2+3P2031/GeV", - " XGX XGX XX "); - _m2KpiA->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2+3P203 mass", - " X XGX X ", - "1/SdS/dm2230K2+3P2031/GeV2-23", - " G G X XX X XGX XX X X", - "m2230K2+3P2031/GeV223", - " X XX X XGX XX X X"); - _mKpiA->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2+3P203 mass", - " X XGX X ", - "1/SdS/dm0K2+3P2031/GeV2-13", - " G G X X XGX XX X X", - "m0K2+3P2031/GeV", - " X X XGX XX "); - _m2KpiC->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2+3P203 mass", - " X XGX X ", - "1/SdS/dm2230K2+3P2031/GeV2-23", - " G G X XX X XGX XX X X", - "m2230K2+3P2031/GeV223", - " X XX X XGX XX X X"); - _m2KpiB->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3K203 mass", - "GX X X X ", - "1/SdS/dm2230P2+3K2031/GeV2-23", - " G G X XXGX X X XX X X", - "m2230P2+3K2031/GeV223", - " X XXGX X X XX X X"); - _mKpiB->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3K203 mass", - "GX X X X ", - "1/SdS/dm0P2+3K2031/GeV2-13", - " G G XGX X X XX X X", - "m0P2+3K2031/GeV", - " XGX X X XX "); - _m2KpiD->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3K203 mass", - "GX X X X ", - "1/SdS/dm2230P2+3K2031/GeV2-23", - " G G X XXGX X X XX X X", - "m2230P2+3K2031/GeV223", - " X XXGX X X XX X X"); - _m2Keta->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2+3H mass", - " X XG ", - "1/SdS/dm2230K2+3H1/GeV2-23", - " G G X XX X XGX X X", - "m2230K2+3H1/GeV223", - " X XX X XGX X X"); - _mKeta->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2+3H mass", - " X XG ", - "1/SdS/dm0K2+3H1/GeV2-13", - " G G X X XGX X X", - "m0K2+3H1/GeV", - " X X XGX "); - _m2KK->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2+3K203 mass", - " X X X X ", - "1/SdS/dm2230K2+3K2031/GeV2-23", - " G G X XX X X X XX X X", - "m2230K2+3K2031/GeV223", - " X XX X X X XX X X"); - _mKK->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2+3K203 mass", - " X X X X ", - "1/SdS/dm0K2+3K2031/GeV2-13", - " G G X X X X XX X X", - "m0K2+3K2031/GeV", - " X X X X XX "); -} - - diff --git a/Contrib/TauAnalysis/TauTo2MesonAnalysis.h b/Contrib/TauAnalysis/TauTo2MesonAnalysis.h deleted file mode 100644 --- a/Contrib/TauAnalysis/TauTo2MesonAnalysis.h +++ /dev/null @@ -1,144 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_TauTo2MesonAnalysis_H -#define HERWIG_TauTo2MesonAnalysis_H -// -// This is the declaration of the TauTo2MesonAnalysis class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * The TauTo2MesonAnalysis class is designed to perform the analysis of the - * mass distribution of the hadronic decay products of the \f$\tau\f$ in the decays - * \f$\tau^\pm\to\nu_\tau\{\pi^\pm\pi^0,K^\pm\pi^0,K^0\pi^\pm,K^\pm\eta,K^\pm K^0\}\f$. - * In order to work the \f$\pi^0\f$, \f$K^0\f$, \f$K^\pm\f$ and \f$\eta\f$ should be - * set stable. - * - * The mass spectrum of the \f$pi^\pm\pi^0\f$ final state is compared to CLEO and - * BELLE data. - * - * @see \ref TauTo2MesonAnalysisInterfaces "The interfaces" - * defined for TauTo2MesonAnalysis. - */ -class TauTo2MesonAnalysis: public AnalysisHandler { - -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); - - using AnalysisHandler::analyze; - //@} - -public: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - - -protected: - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - TauTo2MesonAnalysis & operator=(const TauTo2MesonAnalysis &) = delete; - -private: - - /** - * Histograms for the mass plots - */ - //@{ - /** - * Mass of the pions in \f$\tau\pm\to\nu_\tau\pi^0\pi^\pm\f$ compared to BELLE - * and CLEO data. - */ - HistogramPtr _m2pipiBELLE,_mpipiCLEO; - - /** - * Mass of the Kaons and pions in \f$\tau\to K\pi\f$ - */ - HistogramPtr _m2KpiA,_m2KpiB,_mKpiA,_mKpiB,_m2KpiC,_m2KpiD; - - /** - * Mass of the \f$K\eta\f$ - */ - HistogramPtr _m2Keta,_mKeta; - - /** - * Mass of the \f$KK\f$ - */ - HistogramPtr _m2KK,_mKK; - //@} - -}; - -} - -#endif /* HERWIG_TauTo2MesonAnalysis_H */ diff --git a/Contrib/TauAnalysis/TauTo3MesonAnalysis.cc b/Contrib/TauAnalysis/TauTo3MesonAnalysis.cc deleted file mode 100644 --- a/Contrib/TauAnalysis/TauTo3MesonAnalysis.cc +++ /dev/null @@ -1,555 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the TauTo3MesonAnalysis class. -// - -#include "TauTo3MesonAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "Herwig/Utilities/Histogram.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/Interface/ClassDocumentation.h" - -using namespace Herwig; - -void TauTo3MesonAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - for(unsigned int ix=0;ix<4;++ix) { - _m3pippimpim .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3pi0pi0pim .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3kmpimkp .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3k0pimk0 .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3kmpi0k0 .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3pi0pi0km .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3kmpimpip .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3pimk0pi0 .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3pimpi0eta .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3pimpi0gamma .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3kspimks .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3klpimkl .push_back(new_ptr(Histogram(0.,1.8,200))); - _m3kspimkl .push_back(new_ptr(Histogram(0.,1.8,200))); - } -} - -void TauTo3MesonAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - - _m3pippimpim[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2-3P2-3 mass in T2-3RN0T1P2+3P2-3P2-3", - "GX XGX XGX X GX XWGXGXGX XGX XGX X", - "1/SdS/dm0P2+3P2-3P2-31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2+3P2-3P2-31/GeV", - " XGX XGX XGX XX "); - _m3pippimpim[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3 mass in T2-3RN0T1P2+3P2-3P2-3", - "GX XGX X GX XWGXGXGX XGX XGX X", - "1/SdS/dm0P2-3P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2-31/GeV", - " XGX XGX XX "); - _m3pippimpim[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2-3 mass in T2-3RN0T1P2+3P2-3P2-3", - "GX XGX X GX XWGXGXGX XGX XGX X", - "1/SdS/dm0P2+3P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2+3P2-31/GeV", - " XGX XGX XX "); - _m3pi0pi0pim[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203P203 mass in T2-3RN0T1P2-3P203P203", - "GX XGX XGX X GX XWGXGXGX XGX XGX X", - "1/SdS/dm0P2-3P203P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2-3P203P2031/GeV", - " XGX XGX XGX XX "); - _m3pi0pi0pim[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203 mass in T2-3RN0T1P2-3P203P203", - "GX XGX X GX XWGXGXGX XGX XGX X", - "1/SdS/dm0P203P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2031/GeV", - " XGX XGX XX "); - _m3pi0pi0pim[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203 mass in T2-3RN0T1P2-3P203P203", - "GX XGX X GX XWGXGXGX XGX XGX X", - "1/SdS/dm0P2-3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2031/GeV", - " XGX XGX XX "); - _m3kmpimkp[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3P2-3K2+3 mass in T2-3RN0T1K2-3P2-3K2+3", - " X XGX X X X GX XWGXGX X XGX X X X", - "1/SdS/dm0K2-3P2-3K2+31/GeV2-13", - " G G X X XGX X X XX X X", - "m0K2-3P2-3K2+31/GeV", - " X X XGX X X XX "); - _m3kmpimkp[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3P2-3 mass in T2-3RN0T1K2-3P2-3K2+3", - " X XGX X GX XWGXGX X XGX X X X", - "1/SdS/dm0K2-3P2-31/GeV2-13", - " G G X X XGX XX X X", - "m0K2-3P2-31/GeV", - " X X XGX XX "); - _m3kmpimkp[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3K2+3 mass in T2-3RN0T1K2-3P2-3K2+3", - " X X X X GX XWGXGX X XGX X X X", - "1/SdS/dm0K2-3K2+31/GeV2-13", - " G G X X X X XX X X", - "m0K2-3K2+31/GeV", - " X X X X XX "); - _m3kmpimkp[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3K2+3 mass in T2-3RN0T1K2-3P2-3K2+3", - "GX X X X GX XWGXGX X XGX X X X", - "1/SdS/dm0P2-3K2+31/GeV2-13", - " G G XGX X X XX X X", - "m0P2-3K2+31/GeV", - " XGX X X XX "); - _m3k0pimk0[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K203P2-3K0O203 mass in T2-3RN0T1K203P2-3K0O203", - " X XGX X UDX X GX XWGXGX X XGX X UDX X", - "1/SdS/dm0K203P2-3K0O2031/GeV2-13", - " G G X X XGX X UDX XX X X", - "m0K203P2-3K0O2031/GeV", - " X X XGX X UDX XX "); - _m3k0pimk0[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K203P2-3 mass in T2-3RN0T1K203P2-3K0O2033", - " X XGX X GX XWGXGX X XGX X UDX XX", - "1/SdS/dm0K203P2-31/GeV2-13", - " G G X X XGX XX X X", - "m0K203P2-31/GeV", - " X X XGX XX "); - _m3k0pimk0[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K203K0O203 mass in T2-3RN0T1K203P2-3K0O203", - " X X UDX X GX XWGXGX X XGX X UDX X", - "1/SdS/dm0K203K0O2031/GeV2-13", - " G G X X X UDX XX X X", - "m0K203K0O2031/GeV", - " X X X UDX XX "); - _m3k0pimk0[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3K0O203 mass in T2-3RN0T1K203P2-3K0O203", - "GX X UDX X GX XWGXGX X XGX X UDX X", - "1/SdS/dm0P2-3K0O2031/GeV2-13", - " G G XGX X UDX XX X X", - "m0P2-3K0O2031/GeV", - " XGX X UDX XX "); - _m3kmpi0k0[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3P203K203 mass in T2-3RN0T1K2-3P203K203", - " X XGX X X X GX XWGXGX X XGX X X X", - "1/SdS/dm0K2-3P203K2031/GeV2-13", - " G G X X XGX X X XX X X", - "m0K2-3P203K2031/GeV", - " X X XGX X X XX "); - _m3kmpi0k0[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3P203 mass in T2-3RN0T1K2-3P203K203", - " X XGX X GX XWGXGX X XGX X X X", - "1/SdS/dm0K2-3P2031/GeV2-13", - " G G X X XGX XX X X", - "m0K2-3P2031/GeV", - " X X XGX XX "); - _m3kmpi0k0[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3K203 mass in T2-3RN0T1K2-3P203K203", - " X X X X GX XWGXGX X XGX X X X", - "1/SdS/dm0K2-3K2031/GeV2-13", - " G G X X X X XX X X", - "m0K2-3K2031/GeV", - " X X X X XX "); - _m3kmpi0k0[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203K203 mass in T2-3RN0T1K2-3P203K203", - "GX X X X GX XWGXGX X XGX X X X", - "1/SdS/dm0P203K2031/GeV2-13", - " G G XGX X X XX X X", - "m0P203K2031/GeV", - " XGX X X XX "); - _m3pi0pi0km[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203K2-3 mass in T2-3RN0T1P203P203K2-3", - "GX XGX X X X GX XWGXGXGX XGX X X X", - "1/SdS/dm0P203P203K2-31/GeV2-13", - " G G XGX XGX X X XX X X", - "m0P203P203K2-31/GeV", - " XGX XGX X X XX "); - _m3pi0pi0km[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203 mass in T2-3RN0T1P203P203K2-3", - "GX XGX X GX XWGXGXGX XGX X X X", - "1/SdS/dm0P203P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2031/GeV", - " XGX XGX XX "); - _m3pi0pi0km[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203K2-3 mass in T2-3RN0T1P203P203K2-3", - "GX X X X GX XWGXGXGX XGX X X X", - "1/SdS/dm0P203K2-31/GeV2-13", - " G G XGX X X XX X X", - "m0P203K2-31/GeV", - " XGX X X XX "); - _m3kmpimpip[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3P2-3P2+3 mass in T2-3RN0T1K2-3P2-3P2+3", - " X XGX XGX X GX XWGXGX X XGX XGX X", - "1/SdS/dm0K2-3P2-3P2+31/GeV2-13", - " G G X X XGX XGX XX X X", - "m0K2-3P2-3P2+31/GeV", - " X X XGX XGX XX "); - _m3kmpimpip[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3P2-3 mass in T2-3RN0T1K2-3P2-3P2+3", - " X XGX X GX XWGXGX X XGX XGX X", - "1/SdS/dm0K2-3P2-31/GeV2-13", - " G G X X XGX XX X X", - "m0K2-3P2-31/GeV", - " X X XGX XX "); - _m3kmpimpip[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2-3P2+3 mass in T2-3RN0T1K2-3P2-3P2+3", - " X XGX X GX XWGXGX X XGX XGX X", - "1/SdS/dm0P2-3P2+31/GeV2-13", - " G G XGX XGX XX X X", - "m0K2-3P2+31/GeV", - " X X XGX XX "); - _m3kmpimpip[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2+3 mass in T2-3RN0T1K2-3P2-3P2+3", - "GX XGX X GX XWGXGX X XGX XGX X", - "1/SdS/dm0P2-3P2+31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2+31/GeV", - " XGX XGX XX "); - _m3pimk0pi0[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203K0O203 mass in T2-3RN0T1P2-3P203K0O203", - "GX XGX X UDX X GX XWGXGXGX XGX X UDX X", - "1/SdS/dm0P2-3P203K0O2031/GeV2-13", - " G G XGX XGX X UDX XX X X", - "m0P2-3P203K0O2031/GeV", - " XGX XGX X UDX XX "); - _m3pimk0pi0[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3K0O203 mass in T2-3RN0T1P2-3P203K0O203", - "GX X UDX X GX XWGXGXGX XGX X UDX X", - "1/SdS/dm0P2-3K0O2031/GeV2-13", - " G G XGX X UDX XX X X", - "m0P2-3K0O2031/GeV", - " XGX X UDX XX "); - _m3pimk0pi0[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203 mass in T2-3RN0T1P2-3P203K0O203", - "GX XGX X GX XWGXGXGX XGX X UDX X", - "1/SdS/dm0P2-3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2031/GeV", - " XGX XGX XX "); - _m3pimk0pi0[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203K0O203 mass in T2-3RN0T1P2-3P203K0O203", - "GX X UDX X GX XWGXGXGX XGX X UDX X", - "1/SdS/dm0P203K0O2031/GeV2-13", - " G G XGX X UDX XX X X", - "m0P203K0O2031/GeV", - " XGX X UDX XX "); - _m3pimpi0eta[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203H mass in T2-3RN0T1P2-3P203H", - "GX XGX XG GX XWGXGXGX XGX XG", - "1/SdS/dm0P2-3P203H1/GeV2-13", - " G G XGX XGX XGX X X", - "m0P2-3P203H1/GeV", - " XGX XGX XGX "); - _m3pimpi0eta[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203 mass in T2-3RN0T1P2-3P203H", - "GX XGX X GX XWGXGXGX XGX XG", - "1/SdS/dm0P2-3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2031/GeV", - " XGX XGX XX "); - _m3pimpi0eta[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3H mass in T2-3RN0T1P2-3P203H", - "GX XG GX XWGXGXGX XGX XG", - "1/SdS/dm0P2-3H1/GeV2-13", - " G G XGX XGX X X", - "m0P2-3H1/GeV", - " XGX XGX "); - _m3pimpi0eta[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203H mass in T2-3RN0T1P2-3P203H", - "GX XG GX XWGXGXGX XGX XG", - "1/SdS/dm0P203H1/GeV2-13", - " G G XGX XGX X X", - "m0P203H1/GeV", - " XGX XGX "); - _m3pimpi0gamma[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203G mass in T2-3RN0T1P2-3P203G", - "GX XGX XG GX XWGXGXGX XGX XG", - "1/SdS/dm0P2-3P203G1/GeV2-13", - " G G XGX XGX XGX X X", - "m0P2-3P203G1/GeV", - " XGX XGX XGX "); - _m3pimpi0gamma[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P203 mass in T2-3RN0T1P2-3P203G", - "GX XGX X GX XWGXGXGX XGX XG", - "1/SdS/dm0P2-3P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2031/GeV", - " XGX XGX XX "); - _m3pimpi0gamma[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3G mass in T2-3RN0T1P2-3P203G", - "GX XG GX XWGXGXGX XGX XG", - "1/SdS/dm0P2-3G1/GeV2-13", - " G G XGX XGX X X", - "m0P2-3G1/GeV", - " XGX XGX "); - _m3pimpi0gamma[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203G mass in T2-3RN0T1P2-3P203G", - "GX XG GX XWGXGXGX XGX XG", - "1/SdS/dm0P203G1/GeV2-13", - " G G XGX XGX X X", - "m0P203G1/GeV", - " XGX XGX "); - _m3kspimks[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030S1P2-3K2030S1 mass in T2-3RN0T1K2030S1P2-3K2030S1", - " X XX XGX X X XX X GX XWGXGX X XX XGX X X XX X", - "1/SdS/dm0K2030S1P2-3K2030S11/GeV2-13", - " G G X X XX XGX X X XX XX X X", - "m0K2030S1P2-3K2030S11/GeV", - " X X XX XGX X X XX XX "); - _m3kspimks[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030S1P2-3 mass in T2-3RN0T1K2030S1P2-3K2030S1", - " X XX XGX X GX XWGXGX X XX XGX X X XX X", - "1/SdS/dm0K2030S1P2-31/GeV2-13", - " G G X X XX XGX XX X X", - "m0K2030S1P2-31/GeV", - " X X XX XGX XX "); - _m3kspimks[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030S1K2030S1 mass in T2-3RN0T1K2030S1P2-3K2030S1", - " X XX X X XX X GX XWGXGX X XX XGX X X XX X", - "1/SdS/dm0K2030S1K2030S11/GeV2-13", - " G G X X XX X X XX XX X X", - "m0K2030S1K2030S11/GeV", - " X X XX X X XX XX "); - _m3klpimkl[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030L1P2-3K2030L1 mass in T2-3RN0T1K2030L1P2-3K2030L1", - " X XX XGX X X XX X GX XWGXGX X XX XGX X X XX X", - "1/SdS/dm0K2030L1P2-3K2030L11/GeV2-13", - " G G X X XX XGX X X XX XX X X", - "m0K2030L1P2-3K2030L11/GeV", - " X X XX XGX X X XX XX "); - _m3klpimkl[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030L1P2-3 mass in T2-3RN0T1K2030L1P2-3K2030L1", - " X XX XGX X GX XWGXGX X XX XGX X X XX X", - "1/SdS/dm0K2030L1P2-31/GeV2-13", - " G G X X XX XGX XX X X", - "m0K2030L1P2-31/GeV", - " X X XX XGX XX "); - _m3klpimkl[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030L1K2030L1 mass in T2-3RN0T1K2030L1P2-3K2030L1", - " X XX X X XX X GX XWGXGX X XX XGX X X XX X", - "1/SdS/dm0K2030L1K2030L11/GeV2-13", - " G G X X XX X X XX XX X X", - "m0K2030L1K2030L11/GeV", - " X X XX X X XX XX "); - _m3kspimkl[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030S1P2-3K0L1 mass in T2-3RN0T1K2030S1P2-3K0L1", - " X XX XGX X X X GX XWGXGX X XX XGX X X X", - "1/SdS/dm0K2030S1P2-3K0L11/GeV2-13", - " G G X X XX XGX X X XX X X", - "m0K2030S1P2-3K0L11/GeV", - " X X XX XGX X X XX "); - _m3kspimkl[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030S1P2-3 mass in T2-3RN0T1K2030S1P2-3K0L1", - " X XX XGX X GX XWGXGX X XX XGX X X X", - "1/SdS/dm0K2030S1P2-31/GeV2-13", - " G G X X XX XGX XX X X", - "m0K2030S1P2-31/GeV", - " X X XX XGX XX "); - _m3kspimkl[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "K2030S1K0L1 mass in T2-3RN0T1K2030S1K0L1", - " X XX X X X GX XWGXGX X XX X X X", - "1/SdS/dm0K2030S1K0L11/GeV2-13", - " G G X X XX X X XX X X", - "m0K2030S1K0L11/GeV", - " X X XX X X XX "); - _m3kspimkl[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "1P2-3K0L1 mass in T2-3RN0T1K2030S1P2-3K0L1", - "XGX X X X GX XWGXGX X XX XGX X X X", - "1/SdS/dm0P2-3K0L11/GeV2-13", - " G G XGX X X XX X X", - "m0P2-3K0L11/GeV", - " XGX X X XX "); -} - - - -void TauTo3MesonAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // Rotate to CMS, extract final state particles and call analyze(particles). - tPVector hadrons=event->getFinalState(); - map taus; - for(unsigned int ix=0;ixparents().empty()) mother=mother->parents()[0]; - else mother=tPPtr(); - } - while(mother&&abs(mother->id())!=ParticleID::tauminus); - if(mother&&abs(mother->id())==ParticleID::tauminus) { - if(taus.find(mother)==taus.end()) { - taus.insert(make_pair(mother,ParticleVector())); - } - taus[mother].push_back(hadrons[ix]); - } - } - map::const_iterator tit; - for(tit=taus.begin();tit!=taus.end();++tit) { - if(tit->second.size()!=4) continue; - ParticleVector decay=tit->second; - int tsign=tit->first->id()/abs(tit->first->id()); - vector ppi0,ppip,ppim,pkp,pkm,pk0,pk0bar,peta,pgamma,pkl,pks; - Lorentz5Momentum ptotal; - for(unsigned int ix=0;ixid()*tsign; - if(abs(id)!=ParticleID::nu_tau) ptotal+=decay[ix]->momentum(); - if(id==ParticleID::piplus) ppip .push_back(decay[ix]->momentum()); - else if(id==ParticleID::piminus) ppim .push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::pi0) ppi0 .push_back(decay[ix]->momentum()); - else if(id==ParticleID::Kplus) pkp .push_back(decay[ix]->momentum()); - else if(id==ParticleID::Kminus) pkm .push_back(decay[ix]->momentum()); - else if(id==ParticleID::K0) pk0 .push_back(decay[ix]->momentum()); - else if(id==ParticleID::Kbar0) pk0bar.push_back(decay[ix]->momentum()); - else if(id==ParticleID::eta) peta .push_back(decay[ix]->momentum()); - else if(id==ParticleID::gamma) pgamma.push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::K_S0) pks .push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::K_L0) pkl .push_back(decay[ix]->momentum()); - } - if(ppim.size()==2&&ppip.size()==1) { - *_m3pippimpim[0] += ptotal.m()/GeV; - *_m3pippimpim[1] += (ppim[0]+ppim[1]).m()/GeV; - *_m3pippimpim[2] += (ppim[0]+ppip[0]).m()/GeV; - *_m3pippimpim[2] += (ppim[1]+ppip[0]).m()/GeV; - } - else if(ppim.size()==1&&ppi0.size()==2) { - *_m3pi0pi0pim[0] += ptotal.m()/GeV; - *_m3pi0pi0pim[1] += (ppi0[0]+ppi0[1]).m()/GeV; - *_m3pi0pi0pim[2] += (ppi0[0]+ppim[0]).m()/GeV; - *_m3pi0pi0pim[2] += (ppi0[1]+ppim[0]).m()/GeV; - } - else if(pkm.size()==1&&pkp.size()==1&&ppim.size()==1) { - *_m3kmpimkp[0] += ptotal.m()/GeV; - *_m3kmpimkp[1] += (pkm[0]+ppim[0]).m()/GeV; - *_m3kmpimkp[2] += (pkm[0]+ pkp[0]).m()/GeV; - *_m3kmpimkp[3] += (pkp[0]+ppim[0]).m()/GeV; - } - else if(pk0.size()==1&&pk0bar.size()==1&&ppim.size()==1) { - *_m3k0pimk0[0] += ptotal.m()/GeV; - *_m3k0pimk0[1] += (pk0[0] +ppim[0] ).m()/GeV; - *_m3k0pimk0[2] += (pk0[0] +pk0bar[0]).m()/GeV; - *_m3k0pimk0[3] += (pk0bar[0]+ppim[0] ).m()/GeV; - } - else if(pk0.size()==1&&pkm.size()==1&&ppi0.size()==1) { - *_m3kmpi0k0[0] += ptotal.m()/GeV; - *_m3kmpi0k0[1] += (pkm[0]+ppi0[0]).m()/GeV; - *_m3kmpi0k0[2] += (pkm[0]+pk0[0] ).m()/GeV; - *_m3kmpi0k0[3] += (pk0[0]+ppi0[0]).m()/GeV; - } - else if(ppi0.size()==2&&pkm.size()==1) { - *_m3pi0pi0km[0] += ptotal.m()/GeV; - *_m3pi0pi0km[1] += (ppi0[0]+ppi0[1]).m()/GeV; - *_m3pi0pi0km[2] += (ppi0[0]+pkm[0] ).m()/GeV; - *_m3pi0pi0km[3] += (ppi0[1]+pkm[0] ).m()/GeV; - } - else if(pkm.size()==1&&ppim.size()==1&&ppip.size()==1) { - *_m3kmpimpip[0] += ptotal.m()/GeV; - *_m3kmpimpip[1] += (pkm[0]+ppim[0]).m()/GeV; - *_m3kmpimpip[2] += (pkm[0]+ppip[0] ).m()/GeV; - *_m3kmpimpip[3] += (ppip[0]+ppim[0] ).m()/GeV; - } - else if(ppim.size()==1&&pk0bar.size()==1&&ppi0.size()==1) { - *_m3pimk0pi0[0] += ptotal.m()/GeV; - *_m3pimk0pi0[1] += (ppim[0]+pk0bar[0]).m()/GeV; - *_m3pimk0pi0[2] += (ppim[0]+ppi0[0] ).m()/GeV; - *_m3pimk0pi0[3] += (pk0bar[0]+ppi0[0]).m()/GeV; - } - else if(ppim.size()==1&&ppi0.size()==1&&peta.size()==1) { - *_m3pimpi0eta[0] += ptotal.m()/GeV; - *_m3pimpi0eta[1] += (ppim[0]+ppi0[0]).m()/GeV; - *_m3pimpi0eta[2] += (ppim[0]+peta[0]).m()/GeV; - *_m3pimpi0eta[3] += (ppi0[0]+peta[0]).m()/GeV; - } - else if(ppim.size()==1&&ppi0.size()==1&&pgamma.size()==1) { - *_m3pimpi0gamma[0] += ptotal.m()/GeV; - *_m3pimpi0gamma[1] += (ppim[0]+ppi0[0]).m()/GeV; - *_m3pimpi0gamma[2] += (ppim[0]+pgamma[0]).m()/GeV; - *_m3pimpi0gamma[3] += (ppi0[0]+pgamma[0]).m()/GeV; - } - else if(pks.size()==2&&ppim.size()==1) { - *_m3kspimks[0] += ptotal.m()/GeV; - *_m3kspimks[1] += (ppim[0]+pks[0]).m()/GeV; - *_m3kspimks[1] += (ppim[0]+pks[1]).m()/GeV; - *_m3kspimks[2] += (pks [0]+pks[1]).m()/GeV; - } - else if(pkl.size()==2&&ppim.size()==1) { - *_m3klpimkl[0] += ptotal.m()/GeV; - *_m3klpimkl[1] += (ppim[0]+pkl[0]).m()/GeV; - *_m3klpimkl[1] += (ppim[0]+pkl[1]).m()/GeV; - *_m3klpimkl[2] += (pkl [0]+pkl[1]).m()/GeV; - } - else if(pks.size()==1&&pkl.size()==1&&ppim.size()==1) { - *_m3kspimkl[0] += ptotal.m()/GeV; - *_m3kspimkl[1] += (ppim[0]+pks[0]).m()/GeV; - *_m3kspimkl[2] += (pks[0] +pkl[0]).m()/GeV; - *_m3kspimkl[3] += (ppim[0]+pkl[0]).m()/GeV; - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigTauTo3MesonAnalysis("Herwig::TauTo3MesonAnalysis", "HwTauAnalysis.so"); - -void TauTo3MesonAnalysis::Init() { - - static ClassDocumentation documentation - ("The TauTo2MesonAnalysis class plots the mass distributions of tau decays to" - "three mesons."); - -} - diff --git a/Contrib/TauAnalysis/TauTo3MesonAnalysis.h b/Contrib/TauAnalysis/TauTo3MesonAnalysis.h deleted file mode 100644 --- a/Contrib/TauAnalysis/TauTo3MesonAnalysis.h +++ /dev/null @@ -1,187 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_TauTo3MesonAnalysis_H -#define HERWIG_TauTo3MesonAnalysis_H -// -// This is the declaration of the TauTo3MesonAnalysis class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * The TauTo3MesonAnalysis class is designed to perform the analysis of the - * mass distribution of the hadronic decay products of the \f$\tau\f$ in the decays - * - \f$\tau^-\to\nu_tau \pi^+\pi^-\pi^- \f$ - * - \f$\tau^-\to\nu_tau \pi^0\pi^0\pi^- \f$ - * - \f$\tau^-\to\nu_tau K^-K^+\pi^- \f$ - * - \f$\tau^-\to\nu_tau K^0\bar{K}^0\pi^-\f$ - * - \f$\tau^-\to\nu_tau K^-K^0\pi^0 \f$ - * - \f$\tau^-\to\nu_tau \pi^0-\pi^0K^- \f$ - * - \f$\tau^-\to\nu_tau K^-\pi^-\pi^+ \f$ - * - \f$\tau^-\to\nu_tau \pi^-K^0\pi^0 \f$ - * - \f$\tau^-\to\nu_tau \pi^-\pi^0\eta \f$ - * - \f$\tau^-\to\nu_tau \pi^-\pi^0\gamma \f$ - * - * @see \ref TauTo3MesonAnalysisInterfaces "The interfaces" - * defined for TauTo3MesonAnalysis. - */ -class TauTo3MesonAnalysis: public AnalysisHandler { - -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); - - using AnalysisHandler::analyze; - //@} - -public: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - TauTo3MesonAnalysis & operator=(const TauTo3MesonAnalysis &) = delete; - -private: - - /** - * Histograms for \f$\tau^-\to\nu_tau \pi^+\pi^-\pi^- \f$ - */ - vector _m3pippimpim; - - /** - * Histograms for \f$\tau^-\to\nu_tau \pi^0\pi^0\pi^- \f$ - */ - vector _m3pi0pi0pim; - - /** - * Histograms for \f$\tau^-\to\nu_tau K^-K^+\pi^- \f$ - */ - vector _m3kmpimkp; - - /** - * Histograms for \f$\tau^-\to\nu_tau K^0\bar{K}^0\pi^-\f$ - */ - vector _m3k0pimk0; - - /** - * Histograms for \f$\tau^-\to\nu_tau K^-K^0\pi^0 \f$ - */ - vector _m3kmpi0k0; - - /** - * Histograms for \f$\tau^-\to\nu_tau \pi^0\pi^0K^- \f$ - */ - vector _m3pi0pi0km; - - /** - * Histograms for \f$\tau^-\to\nu_tau K^-\pi^-\pi^+ \f$ - */ - vector _m3kmpimpip; - - /** - * Histograms for \f$\tau^-\to\nu_tau \pi^-K^0\pi^0 \f$ - */ - vector _m3pimk0pi0; - - /** - * Histograms for \f$\tau^-\to\nu_tau \pi^-\pi^0\eta \f$ - */ - vector _m3pimpi0eta; - - /** - * Histograms for \f$\tau^-\to\nu_tau \pi^-\pi^0\gamma \f$ - */ - vector _m3pimpi0gamma; - - /** - * Histograms for \f$\tau^-\to\nu_tau K^0_SK^0_S\pi^-\f$ - */ - vector _m3kspimks; - - /** - * Histograms for \f$\tau^-\to\nu_tau K^0_LK^0_L\pi^-\f$ - */ - vector _m3klpimkl; - - /** - * Histograms for \f$\tau^-\to\nu_tau K^0_SK^0_L\pi^-\f$ - */ - vector _m3kspimkl; - - -}; - -} - -#endif /* HERWIG_TauTo3MesonAnalysis_H */ diff --git a/Contrib/TauAnalysis/TauTo4MesonAnalysis.cc b/Contrib/TauAnalysis/TauTo4MesonAnalysis.cc deleted file mode 100644 --- a/Contrib/TauAnalysis/TauTo4MesonAnalysis.cc +++ /dev/null @@ -1,216 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the TauTo4MesonAnalysis class. -// - -#include "TauTo4MesonAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/PDT/EnumParticles.h" -#include "ThePEG/EventRecord/Event.h" - -using namespace Herwig; - -void TauTo4MesonAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - // Rotate to CMS, extract final state particles and call analyze(particles). - tPVector hadrons=event->getFinalState(); - map taus; - for(unsigned int ix=0;ixparents().empty()) mother=mother->parents()[0]; - else mother=tPPtr(); - } - while(mother&&abs(mother->id())!=ParticleID::tauminus); - if(mother&&abs(mother->id())==ParticleID::tauminus) { - if(taus.find(mother)==taus.end()) { - taus.insert(make_pair(mother,ParticleVector())); - } - taus[mother].push_back(hadrons[ix]); - } - } - map::const_iterator tit; - for(tit=taus.begin();tit!=taus.end();++tit) { - if(tit->second.size()!=5) continue; - ParticleVector decay=tit->second; - int tsign=tit->first->id()/abs(tit->first->id()); - vector ppi0,ppip,ppim,pkp,pkm,pk0,pk0bar,peta,pgamma; - Lorentz5Momentum ptotal; - for(unsigned int ix=0;ixid()*tsign; - if(abs(id)!=ParticleID::nu_tau) ptotal+=decay[ix]->momentum(); - if( id ==ParticleID::piplus) ppip .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::piminus) ppim .push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::pi0) ppi0 .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::Kplus) pkp .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::Kminus) pkm .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::K0) pk0 .push_back(decay[ix]->momentum()); - else if( id ==ParticleID::Kbar0) pk0bar.push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::eta) peta .push_back(decay[ix]->momentum()); - else if(abs(id)==ParticleID::gamma) pgamma.push_back(decay[ix]->momentum()); - } - if(ppi0.size()==3&&ppim.size()==1) { - *_mpipi[0] += (ppi0[0]+ppim[0]).m()/GeV; - *_mpipi[0] += (ppi0[1]+ppim[0]).m()/GeV; - *_mpipi[0] += (ppi0[2]+ppim[0]).m()/GeV; - *_mpipi[1] += (ppi0[0]+ppi0[1]).m()/GeV; - *_mpipi[1] += (ppi0[0]+ppi0[2]).m()/GeV; - *_mpipi[1] += (ppi0[1]+ppi0[2]).m()/GeV; - *_mpipipi[0] += (ppi0[0]+ppi0[1]+ppi0[2]).m()/GeV; - *_mpipipi[1] += (ppi0[0]+ppi0[1]+ppim[0]).m()/GeV; - *_mpipipi[1] += (ppi0[0]+ppi0[2]+ppim[0]).m()/GeV; - *_mpipipi[1] += (ppi0[1]+ppi0[2]+ppim[0]).m()/GeV; - *_mpipipipi[0] += (ppi0[0]+ppi0[1]+ppi0[2]+ppim[0]).m()/GeV; - } - else if(ppi0.size()==1&&ppip.size()==1&&ppim.size()==2) { - *_mpipi[2] +=(ppi0[0]+ppip[0]).m()/GeV; - *_mpipi[3] +=(ppi0[0]+ppim[0]).m()/GeV; - *_mpipi[3] +=(ppi0[0]+ppim[1]).m()/GeV; - *_mpipi[4] +=(ppip[0]+ppim[0]).m()/GeV; - *_mpipi[4] +=(ppip[0]+ppim[1]).m()/GeV; - *_mpipi[5] +=(ppim[0]+ppim[1]).m()/GeV; - *_mpipipi[2] += (ppi0[0]+ppip[0]+ppim[0]).m()/GeV; - *_mpipipi[2] += (ppi0[0]+ppip[0]+ppim[1]).m()/GeV; - *_mpipipi[3] += (ppip[0]+ppim[0]+ppim[1]).m()/GeV; - *_mpipipi[4] += (ppi0[0]+ppim[0]+ppim[1]).m()/GeV; - *_mpipipipi[1] += (ppi0[0]+ppip[0]+ppim[0]+ppim[1]).m()/GeV; - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigTauTo4MesonAnalysis("Herwig::TauTo4MesonAnalysis", "HwTauAnalysis.so"); - -void TauTo4MesonAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the TauTo4MesonAnalysis class"); - -} - -inline void TauTo4MesonAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _mpipi[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P2-3 mass in T2-3RN0T1P203P203P203P2-3", - "GX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2-31/GeV", - " XGX XGX XX "); - _mpipi[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203 mass in T2-3RN0T1P203P203P203P2-3", - "GX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P2031/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2031/GeV", - " XGX XGX XX "); - _mpipipi[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203P203 mass in T2-3RN0T1P203P203P203P2-3", - "GX XGX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P203P2031/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P203P203P2031/GeV", - " XGX XGX XGX XX "); - _mpipipi[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203P2-3 mass in T2-3RN0T1P203P203P203P2-3", - "GX XGX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P203P2-31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P203P203P2-31/GeV", - " XGX XGX XGX XX "); - _mpipipipi[0]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P203P203P2-3 mass in T2-3RN0T1P203P203P203P2-3", - "GX XGX XGX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P203P203P2-31/GeV2-13", - " G G XGX XGX XGX XGX XX X X", - "m0P203P203P203P2-31/GeV", - " XGX XGX XGX XGX XX "); - _mpipi[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P2+3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P2+31/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2+31/GeV", - " XGX XGX XX "); - _mpipi[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P2-3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P203P2-31/GeV", - " XGX XGX XX "); - _mpipi[4]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2-3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P2+3P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2+3P2-31/GeV", - " XGX XGX XX "); - _mpipi[5]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2-3P2-3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P2-3P2-31/GeV2-13", - " G G XGX XGX XX X X", - "m0P2-3P2-31/GeV", - " XGX XGX XX "); - _mpipipi[2]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P2+3P2-3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P2+3P2-31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P203P2+3P2-31/GeV", - " XGX XGX XGX XX "); - _mpipipi[3]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P2+3P2-3P2-3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P2+3P2-3P2-31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P2+3P2-3P2-31/GeV", - " XGX XGX XGX XX "); - _mpipipi[4]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P2-3P2-3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P2-3P2-31/GeV2-13", - " G G XGX XGX XGX XX X X", - "m0P203P2-3P2-31/GeV", - " XGX XGX XGX XX "); - _mpipipipi[1]->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "P203P2+3P2-3P2-3 mass in T2-3RN0T1P203P2+3P2-3P2-3", - "GX XGX XGX XGX X GX XWGXGXGX XGX XGX XGX X", - "1/SdS/dm0P203P2+3P2-3P2-31/GeV2-13", - " G G XGX XGX XGX XGX XX X X", - "m0P203P2+3P2-3P2-31/GeV", - " XGX XGX XGX XGX XX "); -} - -inline void TauTo4MesonAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - for(unsigned int ix=0;ix<5;++ix) { - _mpipi .push_back(new_ptr(Histogram(0.,1.8,200))); - _mpipipi.push_back(new_ptr(Histogram(0.,1.8,200))); - } - _mpipi .push_back(new_ptr(Histogram(0.,1.8,200))); - for(unsigned int ix=0;ix<2;++ix) { - _mpipipipi.push_back(new_ptr(Histogram(0.,1.8,200))); - } -} diff --git a/Contrib/TauAnalysis/TauTo4MesonAnalysis.h b/Contrib/TauAnalysis/TauTo4MesonAnalysis.h deleted file mode 100644 --- a/Contrib/TauAnalysis/TauTo4MesonAnalysis.h +++ /dev/null @@ -1,122 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_TauTo4MesonAnalysis_H -#define HERWIG_TauTo4MesonAnalysis_H -// -// This is the declaration of the TauTo4MesonAnalysis class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the TauTo4MesonAnalysis class. - * - * @see \ref TauTo4MesonAnalysisInterfaces "The interfaces" - * defined for TauTo4MesonAnalysis. - */ -class TauTo4MesonAnalysis: public AnalysisHandler { - -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); - - using AnalysisHandler::analyze; - //@} - -public: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - TauTo4MesonAnalysis & operator=(const TauTo4MesonAnalysis &) = delete; - -private: - - /** - * Histograms for the \f$\pi\pi\f$ mass distributions - */ - vector _mpipi; - - /** - * Histograms for the \f$\pi\pi\pi\f$ mass distributions - */ - vector _mpipipi; - - /** - * Histograms for the \f$\pi\pi\pi\pi\f$ mass distributions - */ - vector _mpipipipi; -}; - -} - -#endif /* HERWIG_TauTo4MesonAnalysis_H */ diff --git a/Contrib/TauAnalysis/TauToLeptonsAnalysis.cc b/Contrib/TauAnalysis/TauToLeptonsAnalysis.cc deleted file mode 100644 --- a/Contrib/TauAnalysis/TauToLeptonsAnalysis.cc +++ /dev/null @@ -1,100 +0,0 @@ -// -*- C++ -*- -// -// This is the implementation of the non-inlined, non-templated member -// functions of the TauToLeptonsAnalysis class. -// - -#include "TauToLeptonsAnalysis.h" -#include "ThePEG/Utilities/DescribeClass.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/EventRecord/Event.h" -#include "ThePEG/PDT/EnumParticles.h" - - -using namespace Herwig; - -void TauToLeptonsAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) { - AnalysisHandler::analyze(event, ieve, loop, state); - tPVector hadrons=event->getFinalState(); - map taus; - for(unsigned int ix=0;ixparents().empty()) mother=mother->parents()[0]; - else mother=tPPtr(); - } - while(mother&&abs(mother->id())!=ParticleID::tauminus); - if(mother&&abs(mother->id())==ParticleID::tauminus) { - if(taus.find(mother)==taus.end()) { - taus.insert(make_pair(mother,ParticleVector())); - } - taus[mother].push_back(hadrons[ix]); - } - } - map::const_iterator tit; - for(tit=taus.begin();tit!=taus.end();++tit) { - if(tit->second.size()!=3) continue; - vector pdecay; - int type(0); - ParticleVector decay=tit->second; - for(unsigned int ix=0;ixid()); - if(id>=11&&id<=14) { - pdecay.push_back(decay[ix]->momentum()); - if(id==11) type=1; - else if(id==13) type=2; - } - } - if(pdecay.size()==2&&type!=0) { - Lorentz5Momentum pw=pdecay[0]+pdecay[1]; - pw.rescaleMass(); - if(type==1) { - *_emode+=pw.mass()/GeV; - } - else if(type==2) { - *_mmode+=pw.mass()/GeV; - } - } - } -} - -// The following static variable is needed for the type -// description system in ThePEG. -DescribeNoPIOClass -describeHerwigTauToLeptonsAnalysis("Herwig::TauToLeptonsAnalysis", "HwTauAnalysis.so"); - -void TauToLeptonsAnalysis::Init() { - - static ClassDocumentation documentation - ("There is no documentation for the TauToLeptonsAnalysis class"); - -} - -void TauToLeptonsAnalysis::dofinish() { - AnalysisHandler::dofinish(); - string fname = generator()->filename() + string("-") + name() + string(".top"); - ofstream output(fname.c_str()); - using namespace HistogramOptions; - _emode->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "e2-3N0O0e1 mass for T2-3RN0T1e2-3N0O0e1", - " X XGUDX X GX XWGXGX X XGUDX X", - "1/SdS/dm0e2-3N0O0e11/GeV2-13", - " G G X X XGUDX XX X X", - "m0e2-3N0O0e11/GeV", - " X X XGUDX XX "); - _mmode->topdrawOutput(output,Frame|Errorbars|Ylog, - "RED", - "M2-3N0O0M1 mass for T2-3RN0T1M2-3N0O0M1", - "GX XGUDXGX GX XWGXGXGX XGUDXGX", - "1/SdS/dm0M2-3N0O0M11/GeV2-13", - " G G XGX XGUDXGXX X X", - "m0M2-3N0O0M11/GeV", - " XGX XGUDXGXX "); -} - -void TauToLeptonsAnalysis::doinitrun() { - AnalysisHandler::doinitrun(); - _emode=new_ptr(Histogram(0.,1.8,200)); - _mmode=new_ptr(Histogram(0.,1.8,200)); -} diff --git a/Contrib/TauAnalysis/TauToLeptonsAnalysis.h b/Contrib/TauAnalysis/TauToLeptonsAnalysis.h deleted file mode 100644 --- a/Contrib/TauAnalysis/TauToLeptonsAnalysis.h +++ /dev/null @@ -1,117 +0,0 @@ -// -*- C++ -*- -#ifndef HERWIG_TauToLeptonsAnalysis_H -#define HERWIG_TauToLeptonsAnalysis_H -// -// This is the declaration of the TauToLeptonsAnalysis class. -// - -#include "ThePEG/Repository/CurrentGenerator.h" -#include "ThePEG/Handlers/AnalysisHandler.h" -#include "Herwig/Utilities/Histogram.h" - -namespace Herwig { - -using namespace ThePEG; - -/** - * Here is the documentation of the TauToLeptonsAnalysis class. - * - * @see \ref TauToLeptonsAnalysisInterfaces "The interfaces" - * defined for TauToLeptonsAnalysis. - */ -class TauToLeptonsAnalysis: public AnalysisHandler { - -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); - - using AnalysisHandler::analyze; - //@} - -public: - - /** - * 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(); - -protected: - - /** @name Clone Methods. */ - //@{ - /** - * Make a simple clone of this object. - * @return a pointer to the new object. - */ - inline virtual IBPtr clone() const {return new_ptr(*this);} - - /** 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 {return new_ptr(*this);} - //@} - -protected: - - /** @name Standard Interfaced functions. */ - //@{ - /** - * Initialize this object. Called in the run phase just before - * a run begins. - */ - virtual void doinitrun(); - - /** - * Finalize this object. Called in the run phase just after a - * run has ended. Used eg. to write out statistics. - */ - virtual void dofinish(); - //@} - -private: - - /** - * The assignment operator is private and must never be called. - * In fact, it should not even be implemented. - */ - TauToLeptonsAnalysis & operator=(const TauToLeptonsAnalysis &) = delete; - -private: - - /** - * Histogram for the electron final state - */ - HistogramPtr _emode; - - /** - * Histogram for the muon final state - */ - HistogramPtr _mmode; -}; - -} - -#endif /* HERWIG_TauToLeptonsAnalysis_H */