]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updated STARLIGHT from r176 ro r188 (http://starlight.hepforge.org/svn/)
authorcmayer <Christoph.Mayer@cern.ch>
Mon, 20 Oct 2014 14:33:37 +0000 (16:33 +0200)
committercmayer <Christoph.Mayer@cern.ch>
Mon, 20 Oct 2014 14:33:37 +0000 (16:33 +0200)
16 files changed:
STARLIGHT/CMakelibStarLight.pkg
STARLIGHT/starlight/CMakeLists.txt
STARLIGHT/starlight/Makefile
STARLIGHT/starlight/Readme
STARLIGHT/starlight/TStarLight/testsl.C
STARLIGHT/starlight/cmake_modules/FindROOT.cmake
STARLIGHT/starlight/config/slight.in
STARLIGHT/starlight/include/inputParameters.h
STARLIGHT/starlight/include/randomgenerator.h
STARLIGHT/starlight/src/gammaavm.cpp
STARLIGHT/starlight/src/gammagammaleptonpair.cpp
STARLIGHT/starlight/src/inputParameters.cpp
STARLIGHT/starlight/src/randomgenerator.cpp
STARLIGHT/starlight/src/starlight.cpp
STARLIGHT/starlight/utils/ana.C
STARLIGHT/starlight/utils/convertStarlightAsciiToTree.C

index 98b25459d37e0a7d5f795e303bd85aa20a6955d9..6852a19bb5e1fbe639096c14bbf5638d2753f538 100644 (file)
@@ -80,3 +80,6 @@ endif( ALICE_TARGET STREQUAL "macosxicc")
 string(REPLACE "-Weffc++" "" PACKCXXFLAGS ${CXXFLAGS})
 
 string(REPLACE "-Weffc++" "" PACKDCXXFLAGS ${CXXFLAGSNO})
+
+string(REPLACE "-Wshadow" "-Wno-shadow" PACKCXXFLAGS ${PACKCXXFLAGS})
+string(REPLACE "-Wshadow" "-Wno-shadow" PACKDCXXFLAGS ${PACKDCXXFLAGS})
index b66349c179cb1ae94f30261e49a4c50a70b1d26f..62f48487568353de99cac0f323be887d0280aa6d 100644 (file)
@@ -20,9 +20,9 @@
 ###########################################################################
 #
 # 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
@@ -49,12 +49,9 @@ set (Starlight_VERSION_MINOR_MINOR 0)
 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)
 
@@ -74,7 +71,7 @@ option (CPP11 "Enable compilation with C++11 features" OFF)
 
 # 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)
@@ -94,14 +91,14 @@ if (CMAKE_COMPILER_IS_GNUCC)
     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()
@@ -219,21 +216,8 @@ if(ENABLE_DPMJET)
    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
@@ -241,11 +225,6 @@ 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
@@ -260,7 +239,6 @@ set(SOURCES
   src/nucleus.cpp
   src/eventchannel.cpp
   src/gammaavm.cpp
-  src/psifamily.cpp
   src/gammagammasingle.cpp
   src/photonNucleusCrossSection.cpp
   src/wideResonanceCrossSection.cpp
@@ -309,15 +287,6 @@ endif()
 # 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}"
@@ -329,6 +298,7 @@ if(ENABLE_DPMJET)
   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)
index d07c2f59db88c4682190f160e8d0072fef0b7a65..c0d98cf78fd2946063b55644b00c5c4a42ff0349 100644 (file)
@@ -484,30 +484,6 @@ src/nucleus.cpp.s:
        $(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
 
index 8edd7311a8cb03574f58402c4fbeebff79320231..3fbd227cd220adf5781ea60409b29dad3f3ba681 100644 (file)
@@ -49,8 +49,6 @@ N_EVENTS = 10    #Number of events produced
 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)
@@ -65,11 +63,10 @@ BREAKUP_MODE = 5     #Controls the nuclear breakup
 
 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
 
 
 ----------------------------------------------------------------------------
@@ -123,8 +120,3 @@ fixed types for class Particle
 
 - 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
index ce4b1af504a25a2830894b49dd7c9b8b041172ce..104ff8f9e61ecbb877b878effbe65d3190e42b13 100644 (file)
@@ -59,6 +59,7 @@ void testsl() {
       p->Momentum(v[i]);
 //       isOK = TMath::Abs(v[i].Rapidity()) <= 0.9;
     }
+    tca.Clear();
     if (!isOK) continue;
     Printf("counter, %d", counter, isOK);
     ++counter;
index 65abf93d2ec21638d84837c7d24bd108fcb0a1fc..a4ad985fd804f486bc1895df3538196a0c37622b 100644 (file)
@@ -167,11 +167,6 @@ else()
     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")
index 366a227c717af9709fcd3676b53843fb701ff691..94fe197d367991b275686b6118e0a22c05c6ca89 100644 (file)
@@ -1,3 +1,7 @@
+# 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
@@ -17,17 +21,15 @@ ETA_MIN = -10 #Minimum pseudorapidity
 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).
index fc0ec98d13218e24cd1320460d3000049253763b..34d8cc113a229fbd0006d239a52deaf844429693 100644 (file)
@@ -20,9 +20,9 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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:
 //
@@ -78,6 +78,7 @@ public:
         _parameters.add(this);
     }
     virtual ~parameterbase() {}
+
     virtual std::string validationkey() = 0;
 
     template<typename T>
@@ -107,17 +108,9 @@ class parameter : public parameterbase
 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;
 //     }
@@ -135,7 +128,7 @@ public:
     
     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; }
     
@@ -146,7 +139,7 @@ public:
     }
 
     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);
 
 
 
@@ -187,12 +180,11 @@ class inputParameters {
 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");
 
@@ -231,16 +223,6 @@ public:
        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
@@ -283,15 +265,6 @@ public:
        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
@@ -301,7 +274,7 @@ public:
        // 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
@@ -368,31 +341,21 @@ private:
        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)
 {
index 7c06da4377a25406cbeb6c6d5c612ecc03469b6e..eb18f63131b59ca03742697bf43d38dce94fb266 100644 (file)
@@ -20,9 +20,9 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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:
 //
@@ -34,7 +34,7 @@
 #ifndef RANDOMGENERATOR_H
 #define RANDOMGENERATOR_H
 #include "singleton.h"
-#include "slmutex.h"
+//#include "slmutex.h"
 
 
 class randomGenerator
@@ -48,7 +48,7 @@ class randomGenerator
        unsigned int _Mt[624];
        int _count624;
        
-       MutexPosix _mutex;
+       //      MutexPosix _mutex;
        
        randomGenerator(){}
        randomGenerator(const randomGenerator &);
index 55cda2399649eb476c195d295e0aa7bd521bb82e..b95284d6499c675ca8d7ee455a8987a9a8d39725 100644 (file)
@@ -20,9 +20,9 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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
@@ -572,7 +572,11 @@ double Gammaavectormeson::pTgamma(double E)
     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){ 
index 803d936f4353f397c3480dc8d9bd0fdb36dc18f5..cdcb458130a36a58b0d8e720bfd2af35045da134 100644 (file)
@@ -20,9 +20,9 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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
@@ -823,6 +823,9 @@ double Gammagammaleptonpair::getMass()
     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;
     }
index 472735847fe9e7cc147700f002d34423470dedd9..f4fe3eade7a056e7a81051aae3ca99a118604410 100644 (file)
@@ -20,9 +20,9 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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:
 //
@@ -88,16 +88,7 @@ inputParameters::inputParameters()
          _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
@@ -143,15 +134,6 @@ inputParameters::inputParameters()
        _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);
 }
 
 
@@ -257,6 +239,11 @@ inputParameters::configureFromFile(const std::string &configFileName)
                _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;
index 51ad33d854aed80de410c15e0ddab8cd3830ab9b..b444d61a8b5c5819fb80dbe26756db022c1315d9 100644 (file)
@@ -20,9 +20,9 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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:
 //
@@ -91,7 +91,7 @@ void randomGenerator::SetSeed(unsigned int seed)
 // 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;
@@ -112,7 +112,7 @@ double randomGenerator::Rndom(int)
 //  Produces uniformly-distributed floating points in ]0,1]
 //  Method: Mersenne Twistor
 
-   Lockguard<MutexPosix> guard(&_mutex);
+  // Lockguard<MutexPosix> guard(&_mutex);
    
    unsigned int y;
 
index 8d42db2a59c365489daeee61f5bc2b1a00a2d945..d4bb03e3167f6527bfa296f8871c2b50224c064f 100644 (file)
@@ -20,9 +20,9 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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:
 //
@@ -55,7 +55,6 @@
 #include "gammagammaleptonpair.h"
 #include "gammagammasingle.h"
 #include "gammaavm.h"
-#include "psifamily.h"
 #include "twophotonluminosity.h"
 #include "gammaaluminosity.h"
 #include "incoherentPhotonNucleusLuminosity.h"
@@ -265,6 +264,7 @@ starlight::createEventChannel()
        case ELECTRON:
        case MUON:
        case TAUON:
+        case TAUONDECAY:
                {
                        _eventChannel = new Gammagammaleptonpair(*_beamSystem);
                        if (_eventChannel)
index c3b83f925ef48e019fa980e4108775125b4c44c2..4ad4a700bc00875464824b2ecb06ed4f81e48b52 100755 (executable)
@@ -1,9 +1,12 @@
+// 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();
 }
index 795dbe23b26c535b4df5e9f93ef6a41ebcc2695e..52d00309831f6504d91e1ad1594deebd775bb388 100644 (file)
@@ -1,3 +1,19 @@
+// 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");
@@ -24,7 +39,7 @@ void readStarlightAscii(const char* inFileName  = "slight.out",
        }
        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);
 
@@ -65,12 +80,13 @@ void readStarlightAscii(const char* inFileName  = "slight.out",
                        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();
        }
@@ -81,3 +97,21 @@ void readStarlightAscii(const char* inFileName  = "slight.out",
                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;
+       }