string(REPLACE "-Weffc++" "" PACKCXXFLAGS ${CXXFLAGS})
string(REPLACE "-Weffc++" "" PACKDCXXFLAGS ${CXXFLAGSNO})
+
+string(REPLACE "-Wshadow" "-Wno-shadow" PACKCXXFLAGS ${PACKCXXFLAGS})
+string(REPLACE "-Wshadow" "-Wno-shadow" PACKDCXXFLAGS ${PACKDCXXFLAGS})
###########################################################################
#
# File and Version Information:
-# $Rev:: 165 $: revision of last commit
-# $Author:: odjuvsla $: author of last commit
-# $Date:: 2013-10-06 16:18:10 +0200 #$: date of last commit
+# $Rev:: 186 $: revision of last commit
+# $Author:: jnystrand $: author of last commit
+# $Date:: 2014-09-12 02:39:02 +0200 #$: date of last commit
#
# Description:
# Starlight build file
project(starlight)
find_package (Threads)
-
# load some common cmake macros
# set path, where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
-
-message(STATUS "Using cmake module path '${CMAKE_MODULE_PATH}'")
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules ${CMAKE_MODULE_PATH})
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
message(STATUS "Using cmake module path '${CMAKE_MODULE_PATH}'")
include(CommonMacros)
# define build types
# set a default build type for single-configuration CMake generators, if no build type is set.
-set(CMAKE_BUILD_TYPE RELWITHDEBINFO)
+set(CMAKE_BUILD_TYPE Debug)
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type was specified. Setting build type to 'Release'.")
set(CMAKE_BUILD_TYPE Release)
endif()
else()
message(STATUS "GCC_VERSION<4.6")
- set(CMAKE_CXX_FLAGS "-Wall -Wextra ")
+ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror")
if(CPP11)
message(WARNING "C++11 feautures not supported for your compiler")
endif()
endif()
else()
message(STATUS "Not GCC")
- set(CMAKE_CXX_FLAGS "-Wall -Wextra")
+ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror")
if(CPP11)
message(WARNING "C++11 feautures not supported for your compiler")
endif()
else(DPMJET_FOUND)
option (ENABLE_DPMJET "Enable compilation against DPMJet" OFF)
endif(DPMJET_FOUND)
-endif(ENABLE_DPMJET)
-
-# setup TStarLight
-option (ENABLE_TSTARLIGHT "Enable ROOT interface for Starlight" OFF)
-if(ENABLE_TSTARLIGHT)
- find_package(ROOT REQUIRED)
- set(TSTARLIGHT_DICTIONARY ${CMAKE_CURRENT_BINARY_DIR}/TStarLight_dict.cxx) # set dictionary path
- root_generate_dictionary(
- "${TSTARLIGHT_DICTIONARY}" # path to dictionary to generate
- "${CMAKE_SOURCE_DIR}/TStarLight;${CMAKE_SOURCE_DIR}/include;${ROOT_INCLUDE_DIR};" # list of includes
- "${CMAKE_SOURCE_DIR}/TStarLight/TStarLight.h" # list of classes to process
- "${CMAKE_SOURCE_DIR}/TStarLight/TStarLightLinkDef.h" # ROOT linkDef file
- )
- set(SOURCES_SL TStarLight/TStarLight.cxx ${TSTARLIGHT_DICTIONARY}) # append dictionary to sources
-endif(ENABLE_TSTARLIGHT)
+ endif(ENABLE_DPMJET)
+
# set include directories
set(INCLUDE_DIRECTORIES
${PROJECT_BINARY_DIR}
# ${PYTHIA8_INCLUDE_DIR}
)
-
-if(ENABLE_TSTARLIGHT)
- set(INCLUDE_DIRECTORIES ${ROOT_INCLUDE_DIR} ${INCLUDE_DIRECTORIES})
-endif(ENABLE_TSTARLIGHT)
-
include_directories(${INCLUDE_DIRECTORIES})
# Set our source files, include the generated dictionary
src/nucleus.cpp
src/eventchannel.cpp
src/gammaavm.cpp
- src/psifamily.cpp
src/gammagammasingle.cpp
src/photonNucleusCrossSection.cpp
src/wideResonanceCrossSection.cpp
# add Starlight library to the build system
set(THIS_LIB "Starlib")
add_library(${THIS_LIB} STATIC ${SOURCES})
-
-if(ENABLE_TSTARLIGHT)
- ## build shared starlight library
- set(THIS_LIB "StarLight")
- add_library(${THIS_LIB} SHARED ${SOURCES})
- include_directories(${INCLUDE_DIRECTORIES} ${CMAKE_SOURCE_DIR}/TStarLight ${ROOT_INCLUDE_DIR})
- add_library(TStarLight SHARED ${SOURCES_SL})
-endif(ENABLE_TSTARLIGHT)
-
#make_shared_library("${THIS_LIB}" "${SOURCES}"
# "${PYTHIA8_LIBRARY}"
# "${LHAPDF_LIBRARIES}"
message(STATUS "DPMJet objects: ${DPMJET_OBJECTS}")
add_library(${DPMJET_LIB} STATIC dpmjet/dpmjetint.f ${DPMJET_OBJECTS})
set(optionalLibs ${optionalLibs} ${DPMJET_LIB})
+
endif()
if(ENABLE_PYTHIA6)
$(MAKE) -f CMakeFiles/Starlight.dir/build.make CMakeFiles/Starlight.dir/src/nucleus.cpp.s
.PHONY : src/nucleus.cpp.s
-src/psifamily.o: src/psifamily.cpp.o
-.PHONY : src/psifamily.o
-
-# target to build an object file
-src/psifamily.cpp.o:
- $(MAKE) -f CMakeFiles/Starlight.dir/build.make CMakeFiles/Starlight.dir/src/psifamily.cpp.o
-.PHONY : src/psifamily.cpp.o
-
-src/psifamily.i: src/psifamily.cpp.i
-.PHONY : src/psifamily.i
-
-# target to preprocess a source file
-src/psifamily.cpp.i:
- $(MAKE) -f CMakeFiles/Starlight.dir/build.make CMakeFiles/Starlight.dir/src/psifamily.cpp.i
-.PHONY : src/psifamily.cpp.i
-
-src/psifamily.s: src/psifamily.cpp.s
-.PHONY : src/psifamily.s
-
-# target to generate assembly for a file
-src/psifamily.cpp.s:
- $(MAKE) -f CMakeFiles/Starlight.dir/build.make CMakeFiles/Starlight.dir/src/psifamily.cpp.s
-.PHONY : src/psifamily.cpp.s
-
src/randomgenerator.o: src/randomgenerator.cpp.o
.PHONY : src/randomgenerator.o
PROD_PID = 443013 #Channel of interest (in PDG notation); currently supported options listed below
RND_SEED = 34533 #Random number seed
-OUTPUT_FORMAT = 2 #Form of the output (not considered at this state)
-
BREAKUP_MODE = 5 #Controls the nuclear breakup
# Note that this option only works for lead or gold; it should work at any energy
# 1 = hard sphere nuclei (b>2R)
INTERFERENCE = 0 #Interference (0 = off, 1 = on)
IF_STRENGTH = 1. #% of intefernce (0.0 - 0.1)
-COHERENT = 1 #Coherent=1,Incoherent=0 production for assym collisions
-INCO_FACTOR = 1. #percentage of incoherence
-BFORD = 9.5 #Deuteron slope parameter (dsig/dt = exp(BFORD*t))
INT_PT_MAX = 0.24 #Maximum pt considered, when interference is turned on
INT_PT_N_BINS =120 #Number of pt bins when interference is turned on
+COHERENT = 1 #Coherent=1,Incoherent=0 production for assym collisions
+INCO_FACTOR = 1. #percentage of incoherence
----------------------------------------------------------------------------
- changed PID of the charged KAON to 321 and neutral kaon to 310 .. it should work now for phi -> kk
-- incoherent formfactor was hardcoded for dAu events, it should now accept coherent too.
-- Had hardcoded narrow and wide resonances for VMs. The user can again select gg_or_gp (2 or 3)
-except for the psi family. This is still always narrow.
-- Changed the spin dependence for VMs going to ee/mumu(gammaavectormeson::gettheta). It was only for psi and now upsilon will follow too
-inretrospect, i should probably have done this first and merge psifamily back into gammaavm.cpp
p->Momentum(v[i]);
// isOK = TMath::Abs(v[i].Rapidity()) <= 0.9;
}
+ tca.Clear();
if (!isOK) continue;
Printf("counter, %d", counter, isOK);
++counter;
ROOT_MINOR_VERSION "${ROOT_VERSION}")
string(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+).*" "\\1"
ROOT_PATCH_VERSION "${ROOT_VERSION}")
-
- set(ROOT_FIND_VERSION_MAJOR ${ROOT_MAJOR_VERSION})
- set(ROOT_FIND_VERSION_MINOR ${ROOT_MINOR_VERSION})
- set(ROOT_FIND_VERSION_PATCH ${ROOT_PATCH_VERSION})
-
# make sure minor version is specified
if(ROOT_FIND_VERSION AND NOT ROOT_FIND_VERSION_MINOR)
message(FATAL_ERROR "When requesting a specific version of ROOT, you must provide at least the major and minor version numbers, e.g., 5.22")
+# This file is a template for J/psi production in Pb-Pb collisions at the LHC.
+#
+# to use, rename this file slight.in
+#
BEAM_1_Z = 82 #Z of projectile
BEAM_1_A = 208 #A of projectile
BEAM_2_Z = 82 #Z of target
ETA_MAX = 10 #Maximum pseudorapidity
PROD_MODE = 2 #gg or gP switch (1 = 2-photon, 2 = coherent vector meson (narrow), 3 = coherent vector meson (wide), 4 = incoherent vector meson)
N_EVENTS = 1000 #Number of events
-PROD_PID = 443013 #Channel of interest
+PROD_PID = 443013 #Channel of interest; this is j/psi --> mu+ mu-
RND_SEED = 5574533 #Random number seed
-OUTPUT_FORMAT = 2 #Form of the output
-BREAKUP_MODE = 5 #Controls the nuclear breakup
+BREAKUP_MODE = 5 #Controls the nuclear breakup; a 5 here makes no requirement on the breakup of the ions
INTERFERENCE = 0 #Interference (0 = off, 1 = on)
IF_STRENGTH = 1. #% of intefernce (0.0 - 0.1)
-COHERENT = 1 #Coherent=1,Incoherent=0
-INCO_FACTOR = 1. #percentage of incoherence
-BFORD = 9.5
INT_PT_MAX = 0.24 #Maximum pt considered, when interference is turned on
INT_PT_N_BINS =120 #Number of pt bins when interference is turned on
+COHERENT = 1 #Coherent=1,Incoherent=0
+INCO_FACTOR = 1. #percentage of incoherence
XSEC_METHOD = 1 # Set to 0 to use old method for calculating gamma-gamma luminosity
N_THREADS = 1 # Number of threads used for calculating luminosity (when using the new method)
PYTHIA_FULL_EVENTRECORD = 0 # Write full pythia information to output (vertex, parents, daughter etc).
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 176 $: revision of last commit
-// $Author:: jseger $: author of last commit
-// $Date:: 2014-06-20 22:15:20 +0200 #$: date of last commit
+// $Rev:: 181 $: revision of last commit
+// $Author:: jnystrand $: author of last commit
+// $Date:: 2014-09-12 00:37:55 +0200 #$: date of last commit
//
// Description:
//
_parameters.add(this);
}
virtual ~parameterbase() {}
+
virtual std::string validationkey() = 0;
template<typename T>
public:
// Constructor
- parameter(const std::string& name_,
- T value_,
- bool required_ = true)
- :parameterbase()
- ,_name(name_)
- , _value(value_)
- , _validate(validate)
- , _required(required_) {}
-
- virtual ~parameter() {}
+ parameter(const std::string &name, T value, bool required = true) :parameterbase(),_name(name), _value(value), _validate(validate), _required(required) {}
+ virtual ~parameter() {}
// T operator()() const {
// return _value;
// }
void setValue(T v) { _value = v; }
- void setName(std::string name_) { _name = name_; }
+ void setName(std::string name) { _name = name; }
void setRequired(bool r) { _required = r; }
}
template<typename S, bool v>
- friend std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par);
+ inline friend std::ostream& operator<<(std::ostream& os, const parameter<S,v>& par);
private:
// inputParameters is now a singleton
friend class Singleton<inputParameters>;
-public:
inputParameters();
-private:
- ~inputParameters();
public:
+ ~inputParameters();
+
bool init();
bool configureFromFile(const std::string &configFileName = "./config/slight.in");
std::string pythiaParams () const { return _pythiaParams.value(); } ///< returns parameters to be passed to pythia
bool pythiaFullEventRecord () const { return _pythiaFullEventRecord.value(); } ///< returns if the full pythia event record should be printed
int xsecCalcMethod () const { return _xsecCalcMethod.value(); } ///< returns the method used for the x-sec calculation
- int nThreads () const { return _nThreads.value(); } ///< returns the number of threads in case method 1 is used for the x-sec calc
- unsigned int nBinsQKniehl () const { return _nBinsQKniehl.value(); } ///< Number of bins in Q used for the transformation to the impact paramter space of the Kniehl function
- unsigned int nBinsEKniehl () const { return _nBinsEKniehl.value(); } ///< Number of bins in photon energy used for the Kniehl function
- unsigned int nBinsBKniehl () const { return _nBinsBKniehl.value(); } ///< Number of bins in impact parameter used for the Kniehl function
- double qMaxKniehl () const { return _qMaxKniehl.value(); } ///< Max value of Q used for the Kniehl funcion
- double eGammaMinKniehl () const { return _eGammaMinKniehl.value(); } ///< Min value of gamma energy used for the Kniehl funcion
- double eGammaMaxKniehl () const { return _eGammaMaxKniehl.value(); } ///< Max value of gamma energy used for the Kniehl funcion
- double bMinKniehl () const { return _bMinKniehl.value(); } ///< Min value of impact parameter used for the Kniehl funcion
- double bMaxKniehl () const { return _bMaxKniehl.value(); } ///< Max value of impact parameter used for the Kniehl funcion
-
starlightConstants::particleTypeEnum prodParticleType () const { return _particleType; } ///< returns type of produced particle
starlightConstants::decayTypeEnum prodParticleDecayType() const { return _decayType; } ///< returns decay type of produced particle
starlightConstants::interactionTypeEnum interactionType () const { return _interactionType; } ///< returns interaction type
void setPythiaParams (std::string v) { _pythiaParams = v; } ///< returns parameters to be passed to pythia
void setPythiaFullEventRecord (bool v) { _pythiaFullEventRecord = v; } ///< returns if the full pythia event record should be prvoided
void setXsecCalcMethod (int v) { _xsecCalcMethod = v; } ///< returns the method used for the x-sec calculation
- void setNThreads (int v) { _nThreads = v; } ///< returns the number of threads in case method 1 is used for the x-sec calc
- void setNBinsQKniehl (unsigned int v) { _nBinsQKniehl = v; } ///< Number of bins in Q used for the transformation to the impact paramter space of the Kniehl function
- void setNBinsEKniehl (unsigned int v) { _nBinsEKniehl = v; } ///< Number of bins in photon energy used for the Kniehl function
- void setNBinsBKniehl (unsigned int v) { _nBinsBKniehl = v; } ///< Number of bins in impact parameter used for the Kniehl function
- void setQMaxKniehl (double v) { _qMaxKniehl = v; } ///< Max value of Q used for the Kniehl funcion
- void setEGammaMinKniehl (double v) { _eGammaMinKniehl = v; } ///< Min value of gamma energy used for the Kniehl funcion
- void setEGammaMaxKniehl (double v) { _eGammaMaxKniehl = v; } ///< Max value of gamma energy used for the Kniehl funcion
- void setBMinKniehl (double v) { _bMinKniehl = v; } ///< Min value of impact parameter used for the Kniehl funcion
- void setBMaxKniehl (double v) { _bMaxKniehl = v; } ///< Max value of impact parameter used for the Kniehl funcion
void setProdParticleType (starlightConstants::particleTypeEnum v) { _particleType = v; } ///< returns type of produced particle
void setProdParticleDecayType (starlightConstants::decayTypeEnum v) { _decayType = v; } ///< returns decay type of produced particle
// double slopeParameter();
void setProtonEnergy (double v) { _protonEnergy = v; }
-/* template<typename T> */
+ // template<typename T>
inline bool setParameter(std::string expression);
std::ostream& print(std::ostream& out) const; ///< prints parameter summary
parameter<double, VALIDITY_CHECK> _maxGammaEnergy; ///< maximum gamma energy in case of photo nuclear processes [GeV]
parameter<std::string,NO_VALIDITY_CHECK> _pythiaParams; ///< semi-colon separated parameters to pass to pythia, e.g. "mstj(1)=0;paru(13)=0.1"
parameter<bool, NO_VALIDITY_CHECK> _pythiaFullEventRecord; ///< if the full pythia event record should be in the output
- parameter<unsigned int, VALIDITY_CHECK> _xsecCalcMethod; ///< Select x-sec calc method. (0 is standard starlight method, 1 must be used for assym. collisions (e.g. p-A), but is slow)
- parameter<unsigned int, NO_VALIDITY_CHECK> _nThreads; ///< Number of threads used in the case of using method 1 for calculating the x-sections
- parameter<unsigned int, VALIDITY_CHECK> _nBinsQKniehl; ///< Number of bins in Q used for the transformation to the impact paramter space of the Kniehl function
- parameter<unsigned int, VALIDITY_CHECK> _nBinsEKniehl; ///< Number of bins in photon energy used for the Kniehl function
- parameter<unsigned int, VALIDITY_CHECK> _nBinsBKniehl; ///< Number of bins in impact parameter used for the Kniehl function
- parameter<double, VALIDITY_CHECK> _qMaxKniehl; ///< Max value of Q used for the Kniehl funcion
- parameter<double, VALIDITY_CHECK> _eGammaMinKniehl; ///< Min value of gamma energy used for the Kniehl funcion
- parameter<double, VALIDITY_CHECK> _eGammaMaxKniehl; ///< Max value of gamma energy used for the Kniehl funcion
- parameter<double, VALIDITY_CHECK> _bMinKniehl; ///< Min value of impact parameter used for the Kniehl funcion
- parameter<double, VALIDITY_CHECK> _bMaxKniehl; ///< Max value of impact parameter used for the Kniehl funcion
-
-
+ parameter<unsigned int, VALIDITY_CHECK> _xsecCalcMethod; ///< Select x-sec calc method. (0 is standard starlight method, 1 must be used for assym. collisions (e.g. p-A), but is slow)
+
starlightConstants::particleTypeEnum _particleType;
starlightConstants::decayTypeEnum _decayType;
starlightConstants::interactionTypeEnum _interactionType;
double _beamLorentzGamma; ///< Lorentz gamma factor of the beams in CMS frame, not an input parameter
- inputParser _ip; //!
+ inputParser _ip;
};
#define inputParametersInstance Singleton<inputParameters>::instance()
-/* template<typename T> */
+//template<typename T>
inline
bool inputParameters::setParameter(std::string expression)
{
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 156 $: revision of last commit
-// $Author:: odjuvsla $: author of last commit
-// $Date:: 2013-10-06 16:17:52 +0200 #$: date of last commit
+// $Rev:: 177 $: revision of last commit
+// $Author:: jnystrand $: author of last commit
+// $Date:: 2014-09-11 20:56:53 +0200 #$: date of last commit
//
// Description:
//
#ifndef RANDOMGENERATOR_H
#define RANDOMGENERATOR_H
#include "singleton.h"
-#include "slmutex.h"
+//#include "slmutex.h"
class randomGenerator
unsigned int _Mt[624];
int _count624;
- MutexPosix _mutex;
+ // MutexPosix _mutex;
randomGenerator(){}
randomGenerator(const randomGenerator &);
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 164 $: revision of last commit
-// $Author:: odjuvsla $: author of last commit
-// $Date:: 2013-10-06 16:18:08 +0200 #$: date of last commit
+// $Rev:: 179 $: revision of last commit
+// $Author:: jnystrand $: author of last commit
+// $Date:: 2014-09-11 20:58:05 +0200 #$: date of last commit
//
// Description:
// Added incoherent t2-> pt2 selection. Following pp selection scheme
ereds = (E/_VMgamma_em)*(E/_VMgamma_em);
//sqrt(3)*E/gamma_em is p_t where the distribution is a maximum
Cm = sqrt(3.)*E/_VMgamma_em;
-
+ // If E is very small, the drawing of a pT below is extremely slow.
+ // ==> Set pT = sqrt(3.)*E/_VMgamma_em for very small E.
+ // Should have no observable consequences (JN, SRK 11-Sep-2014)
+ if( E < 0.0005 )return Cm;
+
//the amplitude of the p_t spectrum at the maximum
if( _bbs.beam1().A()==1 && _bbs.beam2().A() != 1){
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 176 $: revision of last commit
-// $Author:: jseger $: author of last commit
-// $Date:: 2014-06-20 22:15:20 +0200 #$: date of last commit
+// $Rev:: 184 $: revision of last commit
+// $Author:: jnystrand $: author of last commit
+// $Date:: 2014-09-12 00:59:43 +0200 #$: date of last commit
//
// Description:
// Nystrand 220710
case starlightConstants::TAUON:
leptonmass=starlightConstants::tauMass;
break;
+ case starlightConstants::TAUONDECAY:
+ leptonmass=starlightConstants::tauMass;
+ break;
default:
cout<<"Not a recognized lepton, Gammagammaleptonpair::getmass(), mass = 0."<<endl;
}
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 176 $: revision of last commit
-// $Author:: jseger $: author of last commit
-// $Date:: 2014-06-20 22:15:20 +0200 #$: date of last commit
+// $Rev:: 182 $: revision of last commit
+// $Author:: jnystrand $: author of last commit
+// $Date:: 2014-09-12 00:58:56 +0200 #$: date of last commit
//
// Description:
//
_maxGammaEnergy ("MAX_GAMMA_ENERGY",0, NOT_REQUIRED),
_pythiaParams ("PYTHIA_PARAMS","", NOT_REQUIRED),
_pythiaFullEventRecord ("PYTHIA_FULL_EVENTRECORD",false, NOT_REQUIRED),
- _xsecCalcMethod ("XSEC_METHOD",0, NOT_REQUIRED),
- _nThreads ("N_THREADS",1, NOT_REQUIRED),
- _nBinsQKniehl ("N_BINS_Q_KNIEHL", 0, NOT_REQUIRED),
- _nBinsEKniehl ("N_BINS_E_KNIEHL", 0, NOT_REQUIRED),
- _nBinsBKniehl ("N_BINS_B_KNIEHL", 0, NOT_REQUIRED),
- _qMaxKniehl ("Q_MAX_KNIEHL", 0, NOT_REQUIRED),
- _eGammaMinKniehl ("E_GAMMA_MIN_KNIEHL", 0, NOT_REQUIRED),
- _eGammaMaxKniehl ("E_GAMMA_MAX_KNIEHL", 0, NOT_REQUIRED),
- _bMinKniehl ("B_MIN_KNIEHL", 0, NOT_REQUIRED),
- _bMaxKniehl ("B_MAX_KNIEHL", 0, NOT_REQUIRED)
+ _xsecCalcMethod ("XSEC_METHOD",0, NOT_REQUIRED)
{
// All parameters must be initialised in initialisation list!
// If not: error: 'parameter<T, validate>::parameter() [with T = unsigned int, bool validate = true]' is private
_ip.addParameter(_pythiaParams);
_ip.addParameter(_pythiaFullEventRecord);
_ip.addParameter(_xsecCalcMethod);
- _ip.addParameter(_nThreads);
- _ip.addParameter(_nBinsBKniehl);
- _ip.addParameter(_nBinsQKniehl);
- _ip.addParameter(_nBinsEKniehl);
- _ip.addParameter(_qMaxKniehl);
- _ip.addParameter(_eGammaMaxKniehl);
- _ip.addParameter(_eGammaMinKniehl);
- _ip.addParameter(_bMaxKniehl);
- _ip.addParameter(_bMinKniehl);
}
_decayType = LEPTONPAIR;
defaultMinW = 2 * tauMass;
break;
+ case 10015: // tau+tau- pair
+ _particleType = TAUONDECAY;
+ _decayType = LEPTONPAIR;
+ defaultMinW = 2 * tauMass;
+ break;
// case 24: // W+W- pair
// _particleType = W;
// _decayType = WW;
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 156 $: revision of last commit
-// $Author:: odjuvsla $: author of last commit
-// $Date:: 2013-10-06 16:17:52 +0200 #$: date of last commit
+// $Rev:: 178 $: revision of last commit
+// $Author:: jnystrand $: author of last commit
+// $Date:: 2014-09-11 20:57:13 +0200 #$: date of last commit
//
// Description:
//
// with many zero in the bit pattern (like 2**28).
// see http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html
- Lockguard<MutexPosix> guard(&_mutex);
+ // Lockguard<MutexPosix> guard(&_mutex);
_count624 = 624;
int i,j;
// Produces uniformly-distributed floating points in ]0,1]
// Method: Mersenne Twistor
- Lockguard<MutexPosix> guard(&_mutex);
+ // Lockguard<MutexPosix> guard(&_mutex);
unsigned int y;
///////////////////////////////////////////////////////////////////////////
//
// File and Version Information:
-// $Rev:: 176 $: revision of last commit
-// $Author:: jseger $: author of last commit
-// $Date:: 2014-06-20 22:15:20 +0200 #$: date of last commit
+// $Rev:: 185 $: revision of last commit
+// $Author:: jnystrand $: author of last commit
+// $Date:: 2014-09-12 02:38:41 +0200 #$: date of last commit
//
// Description:
//
#include "gammagammaleptonpair.h"
#include "gammagammasingle.h"
#include "gammaavm.h"
-#include "psifamily.h"
#include "twophotonluminosity.h"
#include "gammaaluminosity.h"
#include "incoherentPhotonNucleusLuminosity.h"
case ELECTRON:
case MUON:
case TAUON:
+ case TAUONDECAY:
{
_eventChannel = new Gammagammaleptonpair(*_beamSystem);
if (_eventChannel)
+// this macro runs analyze.cxx, which takes as input an Ascii starlight output
+// file, slight.out, and creates a standard set of histograms, which are stored
+// in histograms.root
-#include "analyse.cxx"
+#include "analyze.cxx"
void ana()
{
- Analyse a("slight.out", 20);
+ Analyze a("slight.out", 20);
a.doAnalysis();
}
+// This macro reads a starlight output file (default name slight.out) and creates a root file
+// with TLorentzVectors for the parent and a TClonesArray of TLorentzVectors for the daughter
+// particles. The output is stored in a root file (default name starlight.root) with one branch
+// labeled "parent" and the other labeled "daughters". Any number of daughter tracks can be
+// accomodated. Daughter species currently accomodated are: electrons, muons, charged or neutral
+// pions, charged or neutral kaons, and protons.
+//
+// To use this macro, open root and then
+// type .x convertStarlightAsciiToTree.C("inputfilename", "outputfilename")
+//
+// The root file produced can be examined in a root TBrowser.
+//
+// A macro to read this root file and make some standard plots is also provided. This macro is
+// called AnalyzeTree.cxx; it can be compiled and run with the anaTree.C macro by opening root
+// and typing .x anaTree.C()
+
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
-void readStarlightAscii(const char* inFileName = "slight.out",
+void convertStarlightAsciiToTree(const char* inFileName = "slight.out",
const char* outFileName = "starlight.root")
{
- const double daughterMass = 0.13957018; // charged pion [GeV]
// create output tree
TFile* outFile = new TFile(outFileName, "RECREATE");
}
TTree* outTree = new TTree("starlightTree", "starlightTree");
TLorentzVector* parentParticle = new TLorentzVector();
- TClonesArray* daughterParticles = new TClonesArray("TLorentzVector");
+ TClonesArray* daughterParticles = new TClonesArray("TLorentzVector");
outTree->Branch("parent", "TLorentzVector", &parentParticle, 32000, -1);
outTree->Branch("daughters", "TClonesArray", &daughterParticles, 32000, -1);
lineStream.str(line);
assert(lineStream >> label >> particleCode >> momentum[0] >> momentum[1] >> momentum[2]);
assert(label == "TRACK:");
+ Double_t daughterMass = IDtoMass(particleCode);
+ if (daughterMass < 0) {break;}
const double E = sqrt( momentum[0] * momentum[0] + momentum[1] * momentum[1]
+ momentum[2] * momentum[2] + daughterMass * daughterMass);
new ( (*daughterParticles)[i] ) TLorentzVector(momentum[0], momentum[1], momentum[2], E);
*parentParticle += *(static_cast<TLorentzVector*>(daughterParticles->At(i)));
}
-
daughterParticles->Compress();
outTree->Fill();
}
delete outFile;
}
}
+
+ double IDtoMass(int particleCode){
+ double mass;
+ if (particleCode == 2 || particleCode==3) {mass = 0.0051099907;} // electron
+ else if (particleCode == 5 || particleCode==6) {mass = 0.105658389;} // muon
+ else if (particleCode == 8 || particleCode==9) {mass = 0.13956995;} // charged pion
+ else if (particleCode == 7) {mass = 0.1345766;} // neutral pion
+ else if (particleCode == 11|| particleCode==12) {mass = 0.493677;} // charged kaon
+ else if (particleCode == 10 || particleCode == 16) {mass = 0.497614;} // neutral kaon
+ else if (particleCode == 14) {mass = 0.93827231;} // proton
+ else {
+ cout << "unknown daughter particle (ID = " << particleCode << "), please modify code to accomodate" << endl;
+ mass = -1.0;
+// exit(0);
+ }
+
+ return mass;
+ }