Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F10881273
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
17 KB
Subscribers
None
View Options
diff --git a/DIPSY/FSAnalysis.cc b/DIPSY/FSAnalysis.cc
new file mode 100644
--- /dev/null
+++ b/DIPSY/FSAnalysis.cc
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+//
+// This is the implementation of the non-inlined, non-templated member
+// functions of the FSAnalysis class.
+//
+
+#include "FSAnalysis.h"
+#include "ThePEG/Interface/ClassDocumentation.h"
+#include "ThePEG/PDT/EnumParticles.h"
+
+
+#include "ThePEG/Persistency/PersistentOStream.h"
+#include "ThePEG/Persistency/PersistentIStream.h"
+
+using namespace DIPSY;
+
+FSAnalysis::FSAnalysis() {}
+
+FSAnalysis::~FSAnalysis() {}
+
+void FSAnalysis::analyze(tEventPtr event, long ieve, int loop, int state) {
+ AnalysisHandler::analyze(event, ieve, loop, state);
+
+ // First go through the gluons coming directly from DIPSY
+ SubProPtr sub = event->primarySubProcess();
+ int nglue = 0;
+ for ( int i = 0, N = sub->outgoing().size(); i < N; ++i ) {
+ PPtr p = sub->outgoing()[i];
+ if ( p->id() == ParticleID::g ) ++nglue;
+ }
+ ngbefore->fill(nglue, event->weight());
+
+ // Now find the last step before string fragmentation
+ int colstep = 0;
+ for ( int is = 0, Ns = event->primaryCollision()->steps().size(); is < Ns; ++is ) {
+ StepPtr step = event->primaryCollision()->steps()[is];
+ for ( ParticleSet::iterator it = step->particles().begin();
+ it != step->particles().end(); ++it ) {
+ PPtr p = *it;
+ if ( p->hasColour() ) colstep = is;
+ }
+ }
+
+ // Go through the gluons after the final state shower.
+ StepPtr step = event->primaryCollision()->steps()[colstep];
+ nglue = 0;
+ for ( ParticleSet::iterator it = step->particles().begin();
+ it != step->particles().end(); ++it ) {
+ PPtr p = *it;
+ if ( p->id() == ParticleID::g ) ++nglue;
+ }
+ ngafter->fill(nglue, event->weight());
+
+}
+
+LorentzRotation FSAnalysis::transform(tEventPtr event) const {
+ return LorentzRotation();
+ // Return the Rotation to the frame in which you want to perform the analysis.
+}
+
+void FSAnalysis::analyze(const tPVector & particles) {
+ AnalysisHandler::analyze(particles);
+ // Calls analyze() for each particle.
+}
+
+void FSAnalysis::analyze(tPPtr) {}
+
+IBPtr FSAnalysis::clone() const {
+ return new_ptr(*this);
+}
+
+IBPtr FSAnalysis::fullclone() const {
+ return new_ptr(*this);
+}
+
+
+void FSAnalysis::doinitrun() {
+ AnalysisHandler::doinitrun();
+ histogramFactory().initrun();
+ histogramFactory().registerClient(this);
+ histogramFactory().mkdirs("/DYMass");
+ ngbefore = histogramFactory().createHistogram1D
+ ("ngbefore",100,-0.5,99.5);
+ ngafter = histogramFactory().createHistogram1D
+ ("ngafter",100,-0.5,99.5);
+}
+
+
+void FSAnalysis::dofinish() {
+ AnalysisHandler::dofinish();
+ normalize(ngbefore);
+ normalize(ngafter);
+}
+
+void FSAnalysis::persistentOutput(PersistentOStream & os) const {
+ // *** ATTENTION *** os << ; // Add all member variable which should be written persistently here.
+}
+
+void FSAnalysis::persistentInput(PersistentIStream & is, int) {
+ // *** ATTENTION *** is >> ; // Add all member variable which should be read persistently here.
+}
+
+ClassDescription<FSAnalysis> FSAnalysis::initFSAnalysis;
+// Definition of the static class description member.
+
+void FSAnalysis::Init() {
+
+ static ClassDocumentation<FSAnalysis> documentation
+ ("There is no documentation for the FSAnalysis class");
+
+}
+
diff --git a/DIPSY/FSAnalysis.h b/DIPSY/FSAnalysis.h
new file mode 100644
--- /dev/null
+++ b/DIPSY/FSAnalysis.h
@@ -0,0 +1,205 @@
+// -*- C++ -*-
+#ifndef DIPSY_FSAnalysis_H
+#define DIPSY_FSAnalysis_H
+//
+// This is the declaration of the FSAnalysis class.
+//
+
+#include "ThePEG/Handlers/AnalysisHandler.h"
+
+namespace DIPSY {
+
+using namespace ThePEG;
+
+/**
+ * Here is the documentation of the FSAnalysis class.
+ *
+ * @see \ref FSAnalysisInterfaces "The interfaces"
+ * defined for FSAnalysis.
+ */
+class FSAnalysis: public AnalysisHandler {
+
+public:
+
+ /** @name Standard constructors and destructors. */
+ //@{
+ /**
+ * The default constructor.
+ */
+ FSAnalysis();
+
+ /**
+ * The destructor.
+ */
+ virtual ~FSAnalysis();
+ //@}
+
+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.
+ */
+ 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 number of gluons before final state shower. */
+ tH1DPtr ngbefore;
+
+ /** The number of gluons after final state shower. */
+ tH1DPtr ngafter;
+
+private:
+
+ /**
+ * The static object used to initialize the description of this class.
+ * Indicates that this is a concrete class with persistent data.
+ */
+ static ClassDescription<FSAnalysis> initFSAnalysis;
+
+ /**
+ * The assignment operator is private and must never be called.
+ * In fact, it should not even be implemented.
+ */
+ FSAnalysis & operator=(const FSAnalysis &);
+
+};
+
+}
+
+#include "ThePEG/Utilities/ClassTraits.h"
+
+namespace ThePEG {
+
+/** @cond TRAITSPECIALIZATIONS */
+
+/** This template specialization informs ThePEG about the
+ * base classes of FSAnalysis. */
+template <>
+struct BaseClassTrait<DIPSY::FSAnalysis,1> {
+ /** Typedef of the first base class of FSAnalysis. */
+ typedef AnalysisHandler NthBase;
+};
+
+/** This template specialization informs ThePEG about the name of
+ * the FSAnalysis class and the shared object where it is defined. */
+template <>
+struct ClassTraits<DIPSY::FSAnalysis>
+ : public ClassTraitsBase<DIPSY::FSAnalysis> {
+ /** Return a platform-independent class name */
+ static string className() { return "DIPSY::FSAnalysis"; }
+ /**
+ * The name of a file containing the dynamic library where the class
+ * FSAnalysis is implemented. It may also include several, space-separated,
+ * libraries if the class FSAnalysis depends on other classes (base classes
+ * excepted). In this case the listed libraries will be dynamically
+ * linked in the order they are specified.
+ */
+ static string library() { return "FSAnalysis.so"; }
+};
+
+/** @endcond */
+
+}
+
+#endif /* DIPSY_FSAnalysis_H */
diff --git a/DIPSY/Makefile.am b/DIPSY/Makefile.am
--- a/DIPSY/Makefile.am
+++ b/DIPSY/Makefile.am
@@ -1,86 +1,89 @@
mySOURCES = DipoleEventHandler.cc WaveFunction.cc SimpleProton.cc \
VirtualPhoton.cc DipoleState.cc Dipole.cc Parton.cc DipoleXSec.cc \
ImpactParameterGenerator.cc WFInfo.cc PhotonWFInfo.cc \
VectorMesonBase.cc PhotonDipoleState.cc SimpleProtonState.cc \
Emitter.cc Swinger.cc DipoleAnalysisHandler.cc \
TotalXSecAnalysis.cc EventFiller.cc DipoleAbsorber.cc \
SmallDipoleAbsorber.cc EffectiveParton.cc RealParton.cc \
RealPartonState.cc
DOCFILES = DipoleEventHandler.h WaveFunction.h SimpleProton.h VirtualPhoton.h \
DipoleState.h Dipole.h Parton.h DipoleXSec.h ImpactParameters.h \
ImpactParameterGenerator.h WFInfo.h PhotonWFInfo.h VectorMesonBase.h \
PhotonDipoleState.h SimpleProtonState.h Emitter.h Swinger.h \
DipoleAnalysisHandler.h TotalXSecAnalysis.h EventFiller.h \
DipoleAbsorber.h SmallDipoleAbsorber.h EffectiveParton.h \
RealParton.h RealPartonState.h
INCLUDEFILES = $(DOCFILES) DipoleEventHandler.icc DipoleEventHandler.fh \
WaveFunction.icc WaveFunction.fh SimpleProton.icc \
VirtualPhoton.icc DipoleState.fh DipoleState.icc Dipole.fh \
Dipole.icc Parton.fh Parton.icc DipoleXSec.fh DipoleXSec.icc \
ImpactParameters.icc ImpactParameterGenerator.fh \
ImpactParameterGenerator.icc WFInfo.fh WFInfo.icc \
PhotonWFInfo.icc VectorMesonBase.icc PhotonDipoleState.icc \
SimpleProtonState.icc Emitter.fh Emitter.icc Swinger.fh \
Swinger.icc DipoleAnalysisHandler.fh EventFiller.fh \
DipoleAbsorber.fh EffectiveParton.fh \
RealParton.fh RealPartonState.fh
pkglib_LTLIBRARIES = libDIPSY.la OldStyleEmitter.la PT1DEmitter.la \
ElasticXSecAnalysis.la LargePTDipoleAbsorber.la \
- SimpleNucleus.la RecoilSwinger.la FSDipoleOrdering.la
+ SimpleNucleus.la RecoilSwinger.la FSDipoleOrdering.la FSAnalysis.la
# Version info should be updated if any interface or persistent I/O
# function is changed
libDIPSY_la_LDFLAGS = -module -version-info 1:0:0
libDIPSY_la_SOURCES = $(mySOURCES) $(INCLUDEFILES)
OldStyleEmitter_la_LDFLAGS = -module -version-info 1:0:0
OldStyleEmitter_la_SOURCES = OldStyleEmitter.cc OldStyleEmitter.h
FSDipoleOrdering_la_LDFLAGS = -module -version-info 1:0:0
FSDipoleOrdering_la_SOURCES = FSDipoleOrdering.cc FSDipoleOrdering.h
+FSAnalysis_la_LDFLAGS = -module -version-info 1:0:0
+FSAnalysis_la_SOURCES = FSAnalysis.cc FSAnalysis.h
+
PT1DEmitter_la_LDFLAGS = -module -version-info 1:0:0
PT1DEmitter_la_SOURCES = PT1DEmitter.cc PT1DEmitter.h
ElasticXSecAnalysis_la_LDFLAGS = -module -version-info 1:0:0
ElasticXSecAnalysis_la_SOURCES = ElasticXSecAnalysis.cc ElasticXSecAnalysis.h
LargePTDipoleAbsorber_la_LDFLAGS = -module -version-info 1:0:0
LargePTDipoleAbsorber_la_SOURCES = LargePTDipoleAbsorber.cc LargePTDipoleAbsorber.h
SimpleNucleus_la_LDFLAGS = -module -version-info 1:0:0
SimpleNucleus_la_SOURCES = SimpleNucleus.cc SimpleNucleus.h \
SimpleNucleusState.cc SimpleNucleusState.h
RecoilSwinger_la_LDFLAGS = -module -version-info 1:0:0
RecoilSwinger_la_SOURCES = RecoilSwinger.cc RecoilSwinger.h
TestDIPSY.run: TestDIPSY.in libDIPSY.la OldStyleEmitter.la PT1DEmitter.la ElasticXSecAnalysis.la LargePTDipoleAbsorber.la RecoilSwinger.la
$(SETUPTHEPEG) --exitonerror -L .libs -r ../../ThePEG/lib/ThePEGDefaults.rpo TestDIPSY.in
TestDIPSY.out: TestDIPSY.run
time $(RUNTHEPEG) --tics -d 0 TestDIPSY.run
TestNucleus.run: TestNucleus.in libDIPSY.la OldStyleEmitter.la PT1DEmitter.la ElasticXSecAnalysis.la LargePTDipoleAbsorber.la SimpleNucleus.la
$(SETUPTHEPEG) --exitonerror -L .libs -r ../../ThePEG/lib/ThePEGDefaults.rpo TestNucleus.in
TestNucleus.out: TestNucleus.run
time $(RUNTHEPEG) -d 0 TestNucleus.run
ScanPPEnergies.run: ScanPPEnergies.in libDIPSY.la
$(SETUPTHEPEG) --exitonerror -L .libs -r ../../ThePEG/lib/ThePEGDefaults.rpo ScanPPEnergies.in
ScanPPEnergies.out: ScanPPEnergies.run
time $(RUNTHEPEG) -d 0 ScanPPEnergies.run
-TestFull.run: TestFull.in libDIPSY.la FSDipoleOrdering.la PT1DEmitter.la ElasticXSecAnalysis.la LargePTDipoleAbsorber.la
+TestFull.run: TestFull.in libDIPSY.la FSDipoleOrdering.la FSAnalysis.la PT1DEmitter.la ElasticXSecAnalysis.la LargePTDipoleAbsorber.la
$(SETUPTHEPEG) --exitonerror -L../../TheP8I/lib -L .libs -L ../lib -r ../../ThePEG/lib/ThePEGDefaults.rpo TestFull.in
TestFull.out: TestFull.run
time $(RUNTHEPEG) -d 0 TestFull.run
include $(top_srcdir)/Config/Makefile.aminclude
diff --git a/DIPSY/TestFull.in b/DIPSY/TestFull.in
--- a/DIPSY/TestFull.in
+++ b/DIPSY/TestFull.in
@@ -1,86 +1,88 @@
mkdir /DIPSY
cd /DIPSY
library libArCascade.so
create DIPSY::DipoleEventHandler LHCEventHandler libDIPSY.so
create DIPSY::ImpactParameterGenerator stdBGenerator
set stdBGenerator:Width 3
set LHCEventHandler:BGen stdBGenerator
create DIPSY::SimpleProton stdProton
set stdProton:Particle /Defaults/Particles/p+
create DIPSY::SimpleProton stdAntiProton
set stdAntiProton:Particle /Defaults/Particles/pbar-
create DIPSY::VirtualPhoton virtualPhoton VirtualPhoton.so
set virtualPhoton:Q2 14.0
set virtualPhoton:Particle /Defaults/Particles/gamma
#set LHCEventHandler:WFL virtualPhoton
set LHCEventHandler:WFL stdProton
set LHCEventHandler:WFR stdAntiProton
set stdProton:R 0.1
set stdProton:R0 3.0
set stdAntiProton:R 0.1
set stdAntiProton:R0 3.0
set LHCEventHandler:PreSamples 10
create DIPSY::TotalXSecAnalysis TotXSec
insert LHCEventHandler:AnalysisHandlers[0] TotXSec
# create DIPSY::ElasticXSecAnalysis ElXSec ElasticXSecAnalysis.so
# set ElXSec:NBins 10000
# set ElXSec:DeltaB 0.005
# insert LHCEventHandler:AnalysisHandlers[0] ElXSec
#cp ElXSec ElXSec1
#set ElXSec1:DeltaB 0.01
#insert LHCEventHandler:AnalysisHandlers[0] ElXSec1
#cp ElXSec ElXSec2
#set ElXSec2:DeltaB 0.02
#insert LHCEventHandler:AnalysisHandlers[0] ElXSec2
#cp ElXSec ElXSec4
#set ElXSec4:DeltaB 0.04
#insert LHCEventHandler:AnalysisHandlers[0] ElXSec4
#create DIPSY::PT1DEmitter pt1DEmitter PT1DEmitter.so
#create DIPSY::OldStyleEmitter oldEmitter OldStyleEmitter.so
create DIPSY::Emitter stdEmitter
set stdEmitter:RScale 1.0
set stdEmitter:PTScale 1.0
set LHCEventHandler:Emitter stdEmitter
create DIPSY::Swinger stdSwinger
set LHCEventHandler:Swinger stdSwinger
create DIPSY::SmallDipoleAbsorber stdAbsorber
# create DIPSY::LargePTDipoleAbsorber largePTAbsorber LargePTDipoleAbsorber.so
create DIPSY::EventFiller stdFiller
set stdFiller:DipoleAbsorber stdAbsorber
# set stdFiller:DipoleAbsorber largePTAbsorber
set LHCEventHandler:EventFiller stdFiller
create DIPSY::DipoleXSec stdXSec
set LHCEventHandler:XSecFn stdXSec
create ThePEG::FixedCMSLuminosity LHCLumi
set LHCLumi:Energy 2000.0
set LHCEventHandler:LuminosityFunction LHCLumi
set LHCEventHandler:LambdaQCD 0.17
set LHCEventHandler:RMax 3.0
set LHCEventHandler:NF 3
set LHCEventHandler:YFrametest 0.5
set LHCEventHandler:NColours 9
set LHCEventHandler:ShowHistory 0
create ThePEG::LWHFactory HFac LWHFactory.so
set HFac:StoreType flat
set HFac:Suffix dat
create ThePEG::MultiEventGenerator LHCGenerator MultiEventGenerator.so
set LHCGenerator:RandomNumberGenerator /Defaults/Random
set LHCGenerator:StandardModelParameters /Defaults/StandardModel
set LHCGenerator:EventHandler LHCEventHandler
-set LHCGenerator:NumberOfEvents 100
+set LHCGenerator:NumberOfEvents 1000
set LHCGenerator:PrintEvent 100
set LHCGenerator:DebugLevel 1
set LHCGenerator:HistogramFactory HFac
# insert LHCGenerator:DefaultObjects[0] stdEmitter
# insert LHCGenerator:DefaultObjects[0] oldStyleEmitter
# insert LHCGenerator:DefaultObjects[0] pt1DEmitter
# do LHCGenerator:AddInterface /DIPSY/LHCEventHandler:Emitter /DIPSY/stdEmitter, /DIPSY/oldStyleEmitter, /DIPSY/pt1DEmitter
# do LHCGenerator:AddInterface /DIPSY/LHCEventHandler:PreSamples 250, 1000, 4000, 16000
create TheP8I::StringFragmentation Frag8 libTheP8I.so
set LHCEventHandler:HadronizationHandler Frag8
create Ariadne::CascadeHandler AriadneCascade libArCascade.so
set LHCEventHandler:CascadeHandler AriadneCascade
create DIPSY::FSDipoleOrdering FSOrdering libArCascade.so FSDipoleOrdering.so
insert AriadneCascade:Reweighters[0] FSOrdering
+create DIPSY::FSAnalysis FSAnalysis FSAnalysis.so
+insert LHCGenerator:AnalysisHandlers[0] FSAnalysis
saverun TestFull LHCGenerator
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, May 3, 6:05 AM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4982928
Default Alt Text
(17 KB)
Attached To
rTHEPEGARIADNEHG thepegariadnehg
Event Timeline
Log In to Comment