From ee54547fedae3717baba6183a417e8ff7be621ea Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Tue, 19 Apr 2022 13:37:51 +0200 Subject: [PATCH 1/2] Remove hydjet (1.9.1) interface --- .../python/Hydjet_Quenched_B0_2760GeV_cfi.py | 28 - .../Hydjet_Quenched_B12_5020GeV_ExtGen_cfi.py | 31 - .../python/Hydjet_Quenched_B12_5020GeV_cfi.py | 28 - .../python/Hydjet_Quenched_B8_2760GeV_cfi.py | 28 - .../Hydjet_Quenched_MinBias_2760GeV_cfi.py | 28 - .../Hydjet_Quenched_MinBias_5020GeV_cfi.py | 28 - ...ydjet_Quenched_MinBias_XeXe_5442GeV_cfi.py | 138 --- .../python/concurrentLumisDisable.py | 1 - .../AMPTInterface/test/testAMPT.py | 44 - .../HijingInterface/test/testHijingAna.py | 48 - .../HydjetInterface/BuildFile.xml | 13 - .../interface/HydjetGeneratorFilter.h | 20 - .../interface/HydjetHadronizer.h | 143 --- .../HydjetInterface/interface/HydjetWrapper.h | 114 -- .../HydjetInterface/plugins/BuildFile.xml | 5 - .../HydjetInterface/plugins/plugin.cc | 7 - .../python/customise_dileptons.py | 19 - .../python/hydjetDefaultParameters_cff.py | 239 ---- .../python/hydjetDefault_cfi.py | 30 - .../HydjetInterface/src/HepEvt.F | 10 - .../src/HydjetGeneratorFilter.cc | 3 - .../HydjetInterface/src/HydjetHadronizer.cc | 555 --------- .../HydjetInterface/test/.cvsignore | 2 - .../HydjetInterface/test/BuildFile.xml | 14 - .../HydjetInterface/test/HydjetAnalyzer.cc | 1087 ----------------- .../HydjetInterface/test/testHydjet.py | 72 -- 26 files changed, 2735 deletions(-) delete mode 100644 Configuration/Generator/python/Hydjet_Quenched_B0_2760GeV_cfi.py delete mode 100644 Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_ExtGen_cfi.py delete mode 100644 Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_cfi.py delete mode 100644 Configuration/Generator/python/Hydjet_Quenched_B8_2760GeV_cfi.py delete mode 100644 Configuration/Generator/python/Hydjet_Quenched_MinBias_2760GeV_cfi.py delete mode 100644 Configuration/Generator/python/Hydjet_Quenched_MinBias_5020GeV_cfi.py delete mode 100644 Configuration/Generator/python/Hydjet_Quenched_MinBias_XeXe_5442GeV_cfi.py delete mode 100644 GeneratorInterface/AMPTInterface/test/testAMPT.py delete mode 100644 GeneratorInterface/HijingInterface/test/testHijingAna.py delete mode 100644 GeneratorInterface/HydjetInterface/BuildFile.xml delete mode 100644 GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h delete mode 100644 GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h delete mode 100644 GeneratorInterface/HydjetInterface/interface/HydjetWrapper.h delete mode 100644 GeneratorInterface/HydjetInterface/plugins/BuildFile.xml delete mode 100644 GeneratorInterface/HydjetInterface/plugins/plugin.cc delete mode 100644 GeneratorInterface/HydjetInterface/python/customise_dileptons.py delete mode 100644 GeneratorInterface/HydjetInterface/python/hydjetDefaultParameters_cff.py delete mode 100644 GeneratorInterface/HydjetInterface/python/hydjetDefault_cfi.py delete mode 100644 GeneratorInterface/HydjetInterface/src/HepEvt.F delete mode 100644 GeneratorInterface/HydjetInterface/src/HydjetGeneratorFilter.cc delete mode 100644 GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc delete mode 100644 GeneratorInterface/HydjetInterface/test/.cvsignore delete mode 100644 GeneratorInterface/HydjetInterface/test/BuildFile.xml delete mode 100644 GeneratorInterface/HydjetInterface/test/HydjetAnalyzer.cc delete mode 100644 GeneratorInterface/HydjetInterface/test/testHydjet.py diff --git a/Configuration/Generator/python/Hydjet_Quenched_B0_2760GeV_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_B0_2760GeV_cfi.py deleted file mode 100644 index a616a27b38660..0000000000000 --- a/Configuration/Generator/python/Hydjet_Quenched_B0_2760GeV_cfi.py +++ /dev/null @@ -1,28 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.PyquenDefaultSettings_cff import * - -generator = cms.EDFilter("HydjetGeneratorFilter", - collisionParameters, - qgpParameters, - hydjetParameters, - hydjetMode = cms.string('kHydroQJets'), - PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(0), - bMin = cms.double(0), - bMax = cms.double(0), - bFixed = cms.double(0) - ) - diff --git a/Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_ExtGen_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_ExtGen_cfi.py deleted file mode 100644 index b4d10b568aae7..0000000000000 --- a/Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_ExtGen_cfi.py +++ /dev/null @@ -1,31 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.Pyquen2015Settings_cff import * - -_generator = cms.EDFilter("HydjetGeneratorFilter", - collisionParameters5020GeV, - qgpParameters, - hydjetParameters, - hydjetMode = cms.string('kHydroQJets'), - PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'myParameters', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(0), - bMin = cms.double(0), - bMax = cms.double(30), - bFixed = cms.double(12) - ) - -from GeneratorInterface.Core.ExternalGeneratorFilter import ExternalGeneratorFilter -generator = ExternalGeneratorFilter(_generator) \ No newline at end of file diff --git a/Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_cfi.py deleted file mode 100644 index 47bf2cdd5f6fb..0000000000000 --- a/Configuration/Generator/python/Hydjet_Quenched_B12_5020GeV_cfi.py +++ /dev/null @@ -1,28 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.Pyquen2015Settings_cff import * - -generator = cms.EDFilter("HydjetGeneratorFilter", - collisionParameters5020GeV, - qgpParameters, - hydjetParameters, - hydjetMode = cms.string('kHydroQJets'), - PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'myParameters', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(0), - bMin = cms.double(0), - bMax = cms.double(30), - bFixed = cms.double(12) - ) diff --git a/Configuration/Generator/python/Hydjet_Quenched_B8_2760GeV_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_B8_2760GeV_cfi.py deleted file mode 100644 index b15f47058e650..0000000000000 --- a/Configuration/Generator/python/Hydjet_Quenched_B8_2760GeV_cfi.py +++ /dev/null @@ -1,28 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.PyquenDefaultSettings_cff import * - -generator = cms.EDFilter("HydjetGeneratorFilter", - collisionParameters, - qgpParameters, - hydjetParameters, - hydjetMode = cms.string('kHydroQJets'), - PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(0), - bMin = cms.double(0), - bMax = cms.double(0), - bFixed = cms.double(8) - ) - diff --git a/Configuration/Generator/python/Hydjet_Quenched_MinBias_2760GeV_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_MinBias_2760GeV_cfi.py deleted file mode 100644 index cebaa709f800f..0000000000000 --- a/Configuration/Generator/python/Hydjet_Quenched_MinBias_2760GeV_cfi.py +++ /dev/null @@ -1,28 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.PyquenDefaultSettings_cff import * - -generator = cms.EDFilter("HydjetGeneratorFilter", - collisionParameters, - qgpParameters, - hydjetParameters, - hydjetMode = cms.string('kHydroQJets'), - PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(1), - bMin = cms.double(0), - bMax = cms.double(30), - bFixed = cms.double(0) - ) - diff --git a/Configuration/Generator/python/Hydjet_Quenched_MinBias_5020GeV_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_MinBias_5020GeV_cfi.py deleted file mode 100644 index b02fd4867dc6f..0000000000000 --- a/Configuration/Generator/python/Hydjet_Quenched_MinBias_5020GeV_cfi.py +++ /dev/null @@ -1,28 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.Pyquen2015Settings_cff import * - -generator = cms.EDFilter("HydjetGeneratorFilter", - collisionParameters5020GeV, - qgpParameters, - hydjetParameters, - hydjetMode = cms.string('kHydroQJets'), - PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'myParameters', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(1), - bMin = cms.double(0), - bMax = cms.double(30), - bFixed = cms.double(0) - ) diff --git a/Configuration/Generator/python/Hydjet_Quenched_MinBias_XeXe_5442GeV_cfi.py b/Configuration/Generator/python/Hydjet_Quenched_MinBias_XeXe_5442GeV_cfi.py deleted file mode 100644 index b0bfae6eddf76..0000000000000 --- a/Configuration/Generator/python/Hydjet_Quenched_MinBias_XeXe_5442GeV_cfi.py +++ /dev/null @@ -1,138 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.Pyquen2015Settings_cff import * -from Configuration.Generator.PythiaUESettings_cfi import * - -generator = cms.EDFilter("HydjetGeneratorFilter", - aBeamTarget = cms.double(129.0), ## beam/target atomic number - comEnergy = cms.double(5442.0), - qgpInitialTemperature = cms.double(1.), ## initial temperature of QGP; allowed range [0.2,2.0]GeV; - qgpProperTimeFormation = cms.double(0.1), ## proper time of QGP formation; allowed range [0.01,10.0]fm/c; - hadronFreezoutTemperature = cms.double(0.125), - doRadiativeEnLoss = cms.bool(True), ## if true, perform partonic radiative en loss - doCollisionalEnLoss = cms.bool(True), - qgpNumQuarkFlavor = cms.int32(0), ## number of active quark flavors in qgp; allowed values: 0,1,2,3 - sigmaInelNN = cms.double(70), - shadowingSwitch = cms.int32(1), - nMultiplicity = cms.int32(18545), - fracSoftMultiplicity = cms.double(1.), - maxLongitudinalRapidity = cms.double(3.75), - maxTransverseRapidity = cms.double(1.16), - angularSpectrumSelector = cms.int32(1), - rotateEventPlane = cms.bool(True), - allowEmptyEvents = cms.bool(False), - embeddingMode = cms.int32(0), - hydjetMode = cms.string('kHydroQJets'), - - PythiaParameters = cms.PSet( - pythiaUESettingsBlock, - hydjetPythiaDefault = cms.vstring('MSEL=0 ! user processes', - 'CKIN(3)=9.2',# ! ptMin - 'MSTP(81)=1' - ), - myParameters = cms.vstring('MDCY(310,1)=0'), - pythiaJets = cms.vstring('MSUB(11)=1', # q+q->q+q - 'MSUB(12)=1', # q+qbar->q+qbar - 'MSUB(13)=1', # q+qbar->g+g - 'MSUB(28)=1', # q+g->q+g - 'MSUB(53)=1', # g+g->q+qbar - 'MSUB(68)=1' # g+g->g+g - ), - pythiaPromptPhotons = cms.vstring('MSUB(14)=1', # q+qbar->g+gamma - 'MSUB(18)=1', # q+qbar->gamma+gamma - 'MSUB(29)=1', # q+g->q+gamma - 'MSUB(114)=1', # g+g->gamma+gamma - 'MSUB(115)=1' # g+g->g+gamma - ), - pythiaZjets = cms.vstring('MSUB(15)=1', - 'MSUB(30)=1'), - pythiaCharmoniumNRQCD = cms.vstring('MSUB(421) = 1', - 'MSUB(422) = 1', - 'MSUB(423) = 1', - 'MSUB(424) = 1', - 'MSUB(425) = 1', - 'MSUB(426) = 1', - 'MSUB(427) = 1', - 'MSUB(428) = 1', - 'MSUB(429) = 1', - 'MSUB(430) = 1', - 'MSUB(431) = 1', - 'MSUB(432) = 1', - 'MSUB(433) = 1', - 'MSUB(434) = 1', - 'MSUB(435) = 1', - 'MSUB(436) = 1', - 'MSUB(437) = 1', - 'MSUB(438) = 1', - 'MSUB(439) = 1' - ), - - pythiaBottomoniumNRQCD = cms.vstring('MSUB(461) = 1', - 'MSUB(462) = 1', - 'MSUB(463) = 1', - 'MSUB(464) = 1', - 'MSUB(465) = 1', - 'MSUB(466) = 1', - 'MSUB(467) = 1', - 'MSUB(468) = 1', - 'MSUB(469) = 1', - 'MSUB(470) = 1', - 'MSUB(471) = 1', - 'MSUB(472) = 1', - 'MSUB(473) = 1', - 'MSUB(474) = 1', - 'MSUB(475) = 1', - 'MSUB(476) = 1', - 'MSUB(477) = 1', - 'MSUB(478) = 1', - 'MSUB(479) = 1', - ), - pythiaWeakBosons = cms.vstring('MSUB(1)=1', - 'MSUB(2)=1'), - pythiaQuarkoniaSettings = cms.vstring('PARP(141)=1.16', # Matrix Elements - 'PARP(142)=0.0119', - 'PARP(143)=0.01', - 'PARP(144)=0.01', - 'PARP(145)=0.05', - 'PARP(146)=9.28', - 'PARP(147)=0.15', - 'PARP(148)=0.02', - 'PARP(149)=0.02', - 'PARP(150)=0.085', - # Meson spin - 'PARJ(13)=0.60', - 'PARJ(14)=0.162', - 'PARJ(15)=0.018', - 'PARJ(16)=0.054', - # Polarization - 'MSTP(145)=0', - 'MSTP(146)=0', - 'MSTP(147)=0', - 'MSTP(148)=1', - 'MSTP(149)=1', - # Chi_c branching ratios - 'BRAT(861)=0.202', - 'BRAT(862)=0.798', - 'BRAT(1501)=0.013', - 'BRAT(1502)=0.987', - 'BRAT(1555)=0.356', - 'BRAT(1556)=0.644' - ), - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'myParameters', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(1), - bMin = cms.double(0), - bMax = cms.double(30), - bFixed = cms.double(0) - ) diff --git a/Configuration/Generator/python/concurrentLumisDisable.py b/Configuration/Generator/python/concurrentLumisDisable.py index 763b72f95ef9b..c387400dc324b 100644 --- a/Configuration/Generator/python/concurrentLumisDisable.py +++ b/Configuration/Generator/python/concurrentLumisDisable.py @@ -4,7 +4,6 @@ "BeamHaloProducer", "CosMuoGenProducer", "Herwig7GeneratorFilter", - "HydjetGeneratorFilter", "Hydjet2GeneratorFilter", "PyquenGeneratorFilter", "Pythia6GeneratorFilter", diff --git a/GeneratorInterface/AMPTInterface/test/testAMPT.py b/GeneratorInterface/AMPTInterface/test/testAMPT.py deleted file mode 100644 index 4dce461ca6b20..0000000000000 --- a/GeneratorInterface/AMPTInterface/test/testAMPT.py +++ /dev/null @@ -1,44 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("ANA") - -process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") -process.load("Configuration.StandardSequences.Services_cff") -process.load("GeneratorInterface.HydjetInterface.hydjetDefault_cfi") - -process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10) - ) - -process.SimpleMemoryCheck = cms.Service('SimpleMemoryCheck', - ignoreTotal=cms.untracked.int32(0), - oncePerEventMode = cms.untracked.bool(False) - ) - -process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring( -#'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_1.root' -'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_2.root' -#,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_3.root' -#,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_4.root' -,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_5.root' -#,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_6.root' -#,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_7.root' -#,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_8.root' -,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_9.root' -#,'/store/user/davidlw/AMPT_B0_2760GeV_GEN/amptDefault_cfi_py_GEN_10.root' -#'/store/user/davidlw/Hydjet_Quenched_MinBias_2760GeV_MC_3XY_V24_GEN/Hydjet_Quenched_MinBias_2760GeV_MC_3XY_V24_GEN/3adac1026f47b564bed65f2efae39879/Hydjet_Quenched_MinBias_2760GeV_cfi_py_GEN_537.root' -#'file:amptDefault_cfi_py_GEN.root' -) - ) - -process.ana = cms.EDAnalyzer('AMPTAnalyzer' - ) - -process.TFileService = cms.Service('TFileService', - fileName = cms.string('treefile_ampt.root') - ) -process.p = cms.Path(process.ana) - - - - diff --git a/GeneratorInterface/HijingInterface/test/testHijingAna.py b/GeneratorInterface/HijingInterface/test/testHijingAna.py deleted file mode 100644 index e3a6d5ccfc662..0000000000000 --- a/GeneratorInterface/HijingInterface/test/testHijingAna.py +++ /dev/null @@ -1,48 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("ANA") - -process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") -process.load("Configuration.StandardSequences.Services_cff") -process.load("GeneratorInterface.HydjetInterface.hydjetDefault_cfi") - -process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10000) - ) - -process.source = cms.Source("EmptySource") - -process.generator = cms.EDFilter("HijingGeneratorFilter", - frame = cms.string('CMS '), - targ = cms.string('P '), - izp = cms.int32(82), - bMin = cms.double(0), - izt = cms.int32(1), - proj = cms.string('A '), - comEnergy = cms.double(5020.0), - iat = cms.int32(1), - bMax = cms.double(15), - iap = cms.int32(208), - rotateEventPlane = cms.bool(True) - ) - - -process.RandomNumberGeneratorService.generator.initialSeed = 6 - -process.SimpleMemoryCheck = cms.Service('SimpleMemoryCheck', - ignoreTotal=cms.untracked.int32(0), - oncePerEventMode = cms.untracked.bool(False) - ) - -process.ana = cms.EDAnalyzer('HydjetAnalyzer' - ) - -process.TFileService = cms.Service('TFileService', - fileName = cms.string('treefileR6.root') - ) - -process.p1 = cms.Path(process.generator) -process.p2 = cms.Path(process.ana) - - - - diff --git a/GeneratorInterface/HydjetInterface/BuildFile.xml b/GeneratorInterface/HydjetInterface/BuildFile.xml deleted file mode 100644 index 2ff14ccb322c4..0000000000000 --- a/GeneratorInterface/HydjetInterface/BuildFile.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h b/GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h deleted file mode 100644 index 0d33d7c575e04..0000000000000 --- a/GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef gen_HydjetGeneratorFilter_h -#define gen_HydjetGeneratorFilter_h - -#include "GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h" -#include "GeneratorInterface/Core/interface/GeneratorFilter.h" -#include "GeneratorInterface/ExternalDecays/interface/ExternalDecayDriver.h" - -namespace edm { - template <> - inline GeneratorFilter::GeneratorFilter(ParameterSet const& ps) - : hadronizer_(ps, consumesCollector()) { - init(ps); - } -} // namespace edm - -namespace gen { - typedef edm::GeneratorFilter HydjetGeneratorFilter; -} - -#endif diff --git a/GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h b/GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h deleted file mode 100644 index 2de79fcad653c..0000000000000 --- a/GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef HydjetHadronizer_h -#define HydjetHadronizer_h - -/** - \class HydjetHadronizer - \brief Interface to the HYDJET generator (since core v. 1.9.1), produces HepMC events - \version 2.0 - \authors Camelia Mironov, Yetkin Yilmaz, Andrey Belyaev -*/ - -#define PYCOMP pycomp_ - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "GeneratorInterface/Core/interface/BaseHadronizer.h" - -#include "FWCore/Utilities/interface/EDGetToken.h" -#include "FWCore/Framework/interface/EDProducer.h" -#include "FWCore/Framework/interface/ConsumesCollector.h" -#include "SimDataFormats/CrossingFrame/interface/MixCollection.h" -#include "SimDataFormats/PileupSummaryInfo/interface/PileupMixingContent.h" - -#include -#include -#include -#include - -namespace CLHEP { - class HepRandomEngine; -} - -namespace HepMC { - class GenEvent; - class GenParticle; - class GenVertex; - class FourVector; -} // namespace HepMC - -namespace gen { - class Pythia6Service; - - class HydjetHadronizer : public BaseHadronizer { - public: - HydjetHadronizer(const edm::ParameterSet&, edm::ConsumesCollector&&); - ~HydjetHadronizer() override; - - bool generatePartonsAndHadronize(); - bool hadronize(); - bool decay(); - bool residualDecay(); - bool readSettings(int); - bool initializeForExternalPartons(); - bool initializeForInternalPartons(); - bool declareStableParticles(const std::vector&); - bool declareSpecialSettings(const std::vector&) { return true; } - - void finalizeEvent(); - void statistics(); - const char* classname() const; - - private: - void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - std::vector const& doSharedResources() const override { return theSharedResources; } - - static const std::vector theSharedResources; - - void add_heavy_ion_rec(HepMC::GenEvent* evt); - HepMC::GenParticle* build_hyjet(int index, int barcode); - HepMC::GenVertex* build_hyjet_vertex(int i, int id); - bool get_particles(HepMC::GenEvent* evt); - bool call_hyinit(double energy, double a, int ifb, double bmin, double bmax, double bfix, int nh); - bool hydjet_init(const edm::ParameterSet& pset); - inline double nuclear_radius() const; - void rotateEvtPlane(); - int convertStatus(int st); - - HepMC::GenEvent* evt; - edm::ParameterSet pset_; - double abeamtarget_; ///< beam/target atomic mass number - int angularspecselector_; ///< angular emitted gluon spectrum selection - double bfixed_; ///< fixed impact param (fm); valid only if cflag_=0 - double bmax_; ///< max impact param; - ///< units of nucl radius - double bmin_; ///< min impact param; - ///< units of nucl radius - int cflag_; ///< centrality flag - ///< = 0 fixed impact param, - ///< <> 0 between bmin and bmax - bool embedding_; ///< Switch for embedding mode - double comenergy; ///< collision energy - bool doradiativeenloss_; ///< DEFAULT = true - bool docollisionalenloss_; ///< DEFAULT = true - double fracsoftmult_; ///< fraction of soft hydro induced hadronic multiplicity - ///< proportional to no of nucleon participants - ///< (1-fracsoftmult_)--- fraction of soft - ///< multiplicity proportional to the numebr - ///< of nucleon-nucleon binary collisions - ///< DEFAULT=1., allowed range [0.01,1] - double hadfreeztemp_; ///< hadron freez-out temperature - ///< DEFAULT=0.14MeV, allowed ranges [0.08,0.2]MeV - std::string hymode_; ///< Hydjet running mode - unsigned int maxEventsToPrint_; ///< Events to print if verbosity - double maxlongy_; ///< max longitudinal collective rapidity: - ///< controls width of eta-spectra - ///< DEFAULT=4, allowed range [0.01,7.0] - double maxtrany_; ///< max transverse collective rapidity: - ///< controls slope of low-pt spectra - ///< DEFAULT=1.5, allowed range [0.01,3.0] - int nsub_; ///< number of sub-events - int nhard_; ///< multiplicity of PYTHIA(+PYQUEN)-induced particles in event - int nmultiplicity_; ///< mean soft multiplicity in central PbPb - ///< automatically calculated for other centralitie and beams - int nsoft_; ///< multiplicity of HYDRO-induced particles in event - unsigned int nquarkflavor_; ///< number of active quark flavors in qgp - ///< DEFAULT=0; allowed values: 0,1,2,3. - unsigned int pythiaPylistVerbosity_; ///< pythia verbosity; def=1 - double qgpt0_; ///< initial temperature of QGP - ///< DEFAULT = 1GeV; allowed range [0.2,2.0]GeV; - double qgptau0_; ///< proper time of QGP formation - ///< DEFAULT = 0.1 fm/c; allowed range [0.01,10.0]fm/ - - double phi0_; ///< Event plane angle - double sinphi0_; - double cosphi0_; - bool rotate_; ///< Switch to rotate event plane - - unsigned int shadowingswitch_; ///< shadowing switcher - ///< 1-ON, 0-OFF - double signn_; ///< inelastic nucleon nucleon cross section [mb] - ///< DEFAULT= 58 mb - HepMC::FourVector* fVertex_; ///< Event signal vertex - std::vector signalVtx_; ///< Pset double vector to set event signal vertex - - Pythia6Service* pythia6Service_; - edm::EDGetTokenT > src_; - }; - - /** - Return the nuclear radius derived from the - beam/target atomic mass number. - */ - double HydjetHadronizer::nuclear_radius() const { return 1.15 * pow((double)abeamtarget_, 1. / 3.); } -} // namespace gen -#endif diff --git a/GeneratorInterface/HydjetInterface/interface/HydjetWrapper.h b/GeneratorInterface/HydjetInterface/interface/HydjetWrapper.h deleted file mode 100644 index 96cfa94b72e65..0000000000000 --- a/GeneratorInterface/HydjetInterface/interface/HydjetWrapper.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef GeneratorInterface_HydjetInterface_HydjetWrapper -#define GeneratorInterface_HydjetInterface_HydjetWrapper - -/** - \brief Wrapper for FORTRAN version of HYDJET - \version 2.0 - \authors Camelia Mironov -*/ - -extern "C" { -void hyinit_(double& energy, double& a, int& ifb1, double& bmin, double& bmax, double& bfix1, int& nh1); -} -#define HYINIT hyinit_ - -#define _MAXMULsize_ 150000 - -extern "C" { -void hyevnt_(double& bfix1); -} -#define HYEVNT hyevnt_ - -extern "C" { -void hyjver_(int&, int&, int&, int&); -} -#define HYJVER hyjver_ - -extern "C" { -extern struct { double psi3; } hypsi3_; -} -#define hypsi3 hypsi3_ - -extern "C" { -extern struct { - double ytfl; - double ylfl; - double Tf; - double fpart; -} hyflow_; -} -#define hyflow hyflow_ - -extern "C" { -extern struct { - double bgen; - double nbcol; - double npart; - int npyt; - int nhyd; -} hyfpar_; -} -#define hyfpar hyfpar_ - -extern "C" { -extern struct { - double bminh; - double bmaxh; - double AW; - double RA; - double npar0; - double nbco0; - double Apb; - double Rpb; - int np; - int init; - int ipr; - -} hyipar_; -} -#define hyipar hyipar_ - -extern "C" { -extern struct { - int nhj; - int nhp; - int khj[5][_MAXMULsize_]; - double phj[5][_MAXMULsize_]; - double vhj[5][_MAXMULsize_]; -} hyjets_; -} -#define hyjets hyjets_ - -extern "C" { -extern struct { - double ptmin; - double sigin; - double sigjet; - int nhsel; - int ishad; - int njet; - -} hyjpar_; -} -#define hyjpar hyjpar_ - -extern "C" { -extern struct { - int mrlu[6]; - int rrlu[100]; -} ludatr_; -} -#define ludatr ludatr_ - -extern "C" { -extern struct { - double T0u; - double tau0u; - int nfu; - int ienglu; - int ianglu; -} pyqpar_; -} -#define pyqpar pyqpar_ - -#endif diff --git a/GeneratorInterface/HydjetInterface/plugins/BuildFile.xml b/GeneratorInterface/HydjetInterface/plugins/BuildFile.xml deleted file mode 100644 index 20af64bfc5542..0000000000000 --- a/GeneratorInterface/HydjetInterface/plugins/BuildFile.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/GeneratorInterface/HydjetInterface/plugins/plugin.cc b/GeneratorInterface/HydjetInterface/plugins/plugin.cc deleted file mode 100644 index 75a242d0a604a..0000000000000 --- a/GeneratorInterface/HydjetInterface/plugins/plugin.cc +++ /dev/null @@ -1,7 +0,0 @@ -// -// - -#include "FWCore/Framework/interface/MakerMacros.h" -#include "GeneratorInterface/HydjetInterface/interface/HydjetGeneratorFilter.h" -using gen::HydjetGeneratorFilter; -DEFINE_FWK_MODULE(HydjetGeneratorFilter); diff --git a/GeneratorInterface/HydjetInterface/python/customise_dileptons.py b/GeneratorInterface/HydjetInterface/python/customise_dileptons.py deleted file mode 100644 index 9df4d7b15f03d..0000000000000 --- a/GeneratorInterface/HydjetInterface/python/customise_dileptons.py +++ /dev/null @@ -1,19 +0,0 @@ - -def customise(process): - - process.generator.PythiaParameters.hydjetPythiaDefault = cms.vstring('MSEL=0 ! user processes', - 'CKIN(3)=6.',# ! ptMin - 'MSTP(81)=0' - ) - - process.generator.PythiaParameters.parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - return process diff --git a/GeneratorInterface/HydjetInterface/python/hydjetDefaultParameters_cff.py b/GeneratorInterface/HydjetInterface/python/hydjetDefaultParameters_cff.py deleted file mode 100644 index e1f6267972746..0000000000000 --- a/GeneratorInterface/HydjetInterface/python/hydjetDefaultParameters_cff.py +++ /dev/null @@ -1,239 +0,0 @@ -#Default Pythia Paramters for Hydjet & Pyquen - -import FWCore.ParameterSet.Config as cms - -from Configuration.Generator.PythiaUESettings_cfi import * - -collisionParameters4TeV = cms.PSet(aBeamTarget = cms.double(208.0), ## beam/target atomic number - comEnergy = cms.double(4000.0) - ) - -collisionParameters2760GeV = cms.PSet(aBeamTarget = cms.double(208.0), ## beam/target atomic number - comEnergy = cms.double(2760.0) - ) - -collisionParameters5020GeV = cms.PSet(aBeamTarget = cms.double(208.0), ## beam/target atomic number - comEnergy = cms.double(5020.0) - ) - -qgpParameters = cms.PSet(qgpInitialTemperature = cms.double(1.), ## initial temperature of QGP; allowed range [0.2,2.0]GeV; - qgpProperTimeFormation = cms.double(0.1), ## proper time of QGP formation; allowed range [0.01,10.0]fm/c; - hadronFreezoutTemperature = cms.double(0.125), - doRadiativeEnLoss = cms.bool(True), ## if true, perform partonic radiative en loss - doCollisionalEnLoss = cms.bool(True), - qgpNumQuarkFlavor = cms.int32(0), ## number of active quark flavors in qgp; allowed values: 0,1,2,3 - ) - -hydjetParameters = cms.PSet(sigmaInelNN = cms.double(70), - shadowingSwitch = cms.int32(1), - nMultiplicity = cms.int32(18545), - fracSoftMultiplicity = cms.double(1.), - maxLongitudinalRapidity = cms.double(3.75), - maxTransverseRapidity = cms.double(1.160), - rotateEventPlane = cms.bool(True), - allowEmptyEvents = cms.bool(False), - angularSpectrumSelector = cms.int32(0), ## angular emitted gluon spectrum : - embeddingMode = cms.int32(0) - ) - -pyquenPythiaDefaultBlock = cms.PSet( - pythiaUESettingsBlock, - hydjetPythiaDefault = cms.vstring('MSEL=0 ! user processes', - 'CKIN(3)=9.2',# ! ptMin - 'MSTP(81)=1' - ), - ppDefault = cms.vstring('MSEL=1 ! QCD hight pT processes (only jets)', - 'CKIN(3)=10.',# ! ptMin - 'MSTP(81)=1' - ), - pythiaHirootDefault = cms.vstring('MSEL=0', # ! Only user defined processes, - 'MSTU(21)=1', # ! to avoid stopping run', - 'PARU(14)=1.', # ! tolerance parameter to adjust fragmentation', - 'MSTP(81)=0', # ! pp multiple scattering off', - 'PMAS(5,1)=4.8', # ! b quark mass', - 'PMAS(6,1)=175.0', # ! t quark mass' - 'CKIN(3)=7.',# ! ptMin - 'MSTJ(22)=2', - 'PARJ(71)=10.', # Decays only if life time < 10mm - 'PARP(67)=1.', - 'PARP(82)=1.9', - 'PARP(85)=0.33', - 'PARP(86)=0.66', - 'PARP(89)=1000.', - 'PARP(91)=1.0', - 'MSTJ(11)=3', - 'MSTJ(22)=2' - ), - ppJets = cms.vstring('MSEL=1 ! QCD hight pT processes'), - customProcesses = cms.vstring('MSEL=0 ! User processes'), - pythiaJets = cms.vstring('MSUB(11)=1', # q+q->q+q - 'MSUB(12)=1', # q+qbar->q+qbar - 'MSUB(13)=1', # q+qbar->g+g - 'MSUB(28)=1', # q+g->q+g - 'MSUB(53)=1', # g+g->q+qbar - 'MSUB(68)=1' # g+g->g+g - ), - pythiaPromptPhotons = cms.vstring('MSUB(14)=1', # q+qbar->g+gamma - 'MSUB(18)=1', # q+qbar->gamma+gamma - 'MSUB(29)=1', # q+g->q+gamma - 'MSUB(114)=1', # g+g->gamma+gamma - 'MSUB(115)=1' # g+g->g+gamma - ), - - pythiaWeakBosons = cms.vstring('MSUB(1)=1', - 'MSUB(2)=1'), - - pythiaZjets = cms.vstring('MSUB(15)=1', - 'MSUB(30)=1'), - - pythiaCharmoniumNRQCD = cms.vstring('MSUB(421) = 1', - 'MSUB(422) = 1', - 'MSUB(423) = 1', - 'MSUB(424) = 1', - 'MSUB(425) = 1', - 'MSUB(426) = 1', - 'MSUB(427) = 1', - 'MSUB(428) = 1', - 'MSUB(429) = 1', - 'MSUB(430) = 1', - 'MSUB(431) = 1', - 'MSUB(432) = 1', - 'MSUB(433) = 1', - 'MSUB(434) = 1', - 'MSUB(435) = 1', - 'MSUB(436) = 1', - 'MSUB(437) = 1', - 'MSUB(438) = 1', - 'MSUB(439) = 1' - ), - - pythiaBottomoniumNRQCD = cms.vstring('MSUB(461) = 1', - 'MSUB(462) = 1', - 'MSUB(463) = 1', - 'MSUB(464) = 1', - 'MSUB(465) = 1', - 'MSUB(466) = 1', - 'MSUB(467) = 1', - 'MSUB(468) = 1', - 'MSUB(469) = 1', - 'MSUB(470) = 1', - 'MSUB(471) = 1', - 'MSUB(472) = 1', - 'MSUB(473) = 1', - 'MSUB(474) = 1', - 'MSUB(475) = 1', - 'MSUB(476) = 1', - 'MSUB(477) = 1', - 'MSUB(478) = 1', - 'MSUB(479) = 1', - ), - - pythiaQuarkoniaSettings = cms.vstring('PARP(141)=1.16', # Matrix Elements - 'PARP(142)=0.0119', - 'PARP(143)=0.01', - 'PARP(144)=0.01', - 'PARP(145)=0.05', - 'PARP(146)=9.28', - 'PARP(147)=0.15', - 'PARP(148)=0.02', - 'PARP(149)=0.02', - 'PARP(150)=0.085', - # Meson spin - 'PARJ(13)=0.60', - 'PARJ(14)=0.162', - 'PARJ(15)=0.018', - 'PARJ(16)=0.054', - # Polarization - 'MSTP(145)=0', - 'MSTP(146)=0', - 'MSTP(147)=0', - 'MSTP(148)=1', - 'MSTP(149)=1', - # Chi_c branching ratios - 'BRAT(861)=0.202', - 'BRAT(862)=0.798', - 'BRAT(1501)=0.013', - 'BRAT(1502)=0.987', - 'BRAT(1555)=0.356', - 'BRAT(1556)=0.644' - ), - - pythiaZtoMuons = cms.vstring("MDME(174,1)=0", # !Z decay into d dbar, - "MDME(175,1)=0", # !Z decay into u ubar, - "MDME(176,1)=0", # !Z decay into s sbar, - "MDME(177,1)=0", # !Z decay into c cbar, - "MDME(178,1)=0", # !Z decay into b bbar, - "MDME(179,1)=0", # !Z decay into t tbar, - "MDME(182,1)=0", # !Z decay into e- e+, - "MDME(183,1)=0", # !Z decay into nu_e nu_ebar, - "MDME(184,1)=1", # !Z decay into mu- mu+, - "MDME(185,1)=0", # !Z decay into nu_mu nu_mubar, - "MDME(186,1)=0", # !Z decay into tau- tau+, - "MDME(187,1)=0" # !Z decay into nu_tau nu_taubar - ), - - - pythiaZtoElectrons = cms.vstring("MDME(174,1)=0", # !Z decay into d dbar, - "MDME(175,1)=0", # !Z decay into u ubar, - "MDME(176,1)=0", # !Z decay into s sbar, - "MDME(177,1)=0", # !Z decay into c cbar, - "MDME(178,1)=0", # !Z decay into b bbar, - "MDME(179,1)=0", # !Z decay into t tbar, - "MDME(182,1)=1", # !Z decay into e- e+, - "MDME(183,1)=0", # !Z decay into nu_e nu_ebar, - "MDME(184,1)=0", # !Z decay into mu- mu+, - "MDME(185,1)=0", # !Z decay into nu_mu nu_mubar, - "MDME(186,1)=0", # !Z decay into tau- tau+, - "MDME(187,1)=0" # !Z decay into nu_tau nu_taubar - ), - - pythiaZtoMuonsAndElectrons = cms.vstring("MDME(174,1)=0", # !Z decay into d dbar, - "MDME(175,1)=0", # !Z decay into u ubar, - "MDME(176,1)=0", # !Z decay into s sbar, - "MDME(177,1)=0", # !Z decay into c cbar, - "MDME(178,1)=0", # !Z decay into b bbar, - "MDME(179,1)=0", # !Z decay into t tbar, - "MDME(182,1)=1", # !Z decay into e- e+, - "MDME(183,1)=0", # !Z decay into nu_e nu_ebar, - "MDME(184,1)=1", # !Z decay into mu- mu+, - "MDME(185,1)=0", # !Z decay into nu_mu nu_mubar, - "MDME(186,1)=0", # !Z decay into tau- tau+, - "MDME(187,1)=0" # !Z decay into nu_tau nu_taubar - ), - - pythiaUpsilonToMuons = cms.vstring('BRAT(1034) = 0 ', # switch off', - 'BRAT(1035) = 1 ', # switch on', - 'BRAT(1036) = 0 ', # switch off', - 'BRAT(1037) = 0 ', # switch off', - 'BRAT(1038) = 0 ', # switch off', - 'BRAT(1039) = 0 ', # switch off', - 'BRAT(1040) = 0 ', # switch off', - 'BRAT(1041) = 0 ', # switch off', - 'BRAT(1042) = 0 ', # switch off', - 'MDME(1034,1) = 0 ', # switch off', - 'MDME(1035,1) = 1 ', # switch on', - 'MDME(1036,1) = 0 ', # switch off', - 'MDME(1037,1) = 0 ', # switch off', - 'MDME(1038,1) = 0 ', # switch off', - 'MDME(1039,1) = 0 ', # switch off', - 'MDME(1040,1) = 0 ', # switch off', - 'MDME(1041,1) = 0 ', # switch off', - 'MDME(1042,1) = 0 ', # switch off' - ), - - pythiaJpsiToMuons = cms.vstring('BRAT(858) = 0 ', # switch off', - 'BRAT(859) = 1 ', # switch on', - 'BRAT(860) = 0 ', # switch off', - 'MDME(858,1) = 0 ', # switch off', - 'MDME(859,1) = 1 ', # switch on', - 'MDME(860,1) = 0 ', # switch off' - ), - - pythiaMuonCandidates = cms.vstring( - 'CKIN(3)=20', - 'MSTJ(22)=2', - 'PARJ(71)=40.' - ), - myParameters = cms.vstring('MDCY(310,1)=0') - -) diff --git a/GeneratorInterface/HydjetInterface/python/hydjetDefault_cfi.py b/GeneratorInterface/HydjetInterface/python/hydjetDefault_cfi.py deleted file mode 100644 index b4acf35dc8070..0000000000000 --- a/GeneratorInterface/HydjetInterface/python/hydjetDefault_cfi.py +++ /dev/null @@ -1,30 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -source = cms.Source("EmptySource") - -from GeneratorInterface.HydjetInterface.hydjetDefaultParameters_cff import * - -generator = cms.EDFilter("HydjetGeneratorFilter", - collisionParameters5020GeV, - qgpParameters, - hydjetParameters, - hydjetMode = cms.string('kHydroQJets'), - PythiaParameters = cms.PSet(pyquenPythiaDefaultBlock, - # Quarkonia and Weak Bosons added back upon dilepton group's request. - parameterSets = cms.vstring('pythiaUESettings', - 'hydjetPythiaDefault', - 'myParameters', - 'pythiaJets', - 'pythiaPromptPhotons', - 'pythiaZjets', - 'pythiaBottomoniumNRQCD', - 'pythiaCharmoniumNRQCD', - 'pythiaQuarkoniaSettings', - 'pythiaWeakBosons' - ) - ), - cFlag = cms.int32(1), - bMin = cms.double(0), - bMax = cms.double(30), - bFixed = cms.double(0) - ) diff --git a/GeneratorInterface/HydjetInterface/src/HepEvt.F b/GeneratorInterface/HydjetInterface/src/HepEvt.F deleted file mode 100644 index 26f85adfc4031..0000000000000 --- a/GeneratorInterface/HydjetInterface/src/HepEvt.F +++ /dev/null @@ -1,10 +0,0 @@ - - - subroutine ihepevt - - -#include "SimDataFormats/GeneratorProducts/interface/stdhep.inc" -#include "SimDataFormats/GeneratorProducts/interface/hepev4.inc" - - return - end diff --git a/GeneratorInterface/HydjetInterface/src/HydjetGeneratorFilter.cc b/GeneratorInterface/HydjetInterface/src/HydjetGeneratorFilter.cc deleted file mode 100644 index 43b21edce9991..0000000000000 --- a/GeneratorInterface/HydjetInterface/src/HydjetGeneratorFilter.cc +++ /dev/null @@ -1,3 +0,0 @@ - - -#include "GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h" diff --git a/GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc b/GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc deleted file mode 100644 index 1d4e9d4da1b72..0000000000000 --- a/GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc +++ /dev/null @@ -1,555 +0,0 @@ -/** - \brief Interface to the HYDJET generator (since core v. 1.9.1), produces HepMC events - \version 2.2 - \authors Camelia Mironov, Andrey Belyaev -*/ - -#include -#include - -#include "FWCore/Concurrency/interface/SharedResourceNames.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/Run.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/EDMException.h" - -#include "GeneratorInterface/Core/interface/FortranInstance.h" -#include "GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h" -#include "GeneratorInterface/HydjetInterface/interface/HydjetWrapper.h" -#include "GeneratorInterface/Pythia6Interface/interface/Pythia6Declarations.h" -#include "GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h" - -#include "HepMC/IO_HEPEVT.h" -#include "HepMC/PythiaWrapper6_4.h" -#include "HepMC/GenEvent.h" -#include "HepMC/HeavyIon.h" -#include "HepMC/SimpleVector.h" - -#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" -#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" -#include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h" -#include "SimDataFormats/HiGenData/interface/GenHIEvent.h" - -using namespace edm; -using namespace std; -using namespace gen; - -int HydjetHadronizer::convertStatus(int st) { - if (st <= 0) - return 0; - if (st <= 10) - return 1; - if (st <= 20) - return 2; - if (st <= 30) - return 3; - else - return st; -} - -const std::vector HydjetHadronizer::theSharedResources = {edm::SharedResourceNames::kPythia6, - gen::FortranInstance::kFortranInstance}; - -//_____________________________________________________________________ -HydjetHadronizer::HydjetHadronizer(const ParameterSet& pset, edm::ConsumesCollector&& iC) - : BaseHadronizer(pset), - evt(nullptr), - pset_(pset), - abeamtarget_(pset.getParameter("aBeamTarget")), - angularspecselector_(pset.getParameter("angularSpectrumSelector")), - bfixed_(pset.getParameter("bFixed")), - bmax_(pset.getParameter("bMax")), - bmin_(pset.getParameter("bMin")), - cflag_(pset.getParameter("cFlag")), - embedding_(pset.getParameter("embeddingMode")), - comenergy(pset.getParameter("comEnergy")), - doradiativeenloss_(pset.getParameter("doRadiativeEnLoss")), - docollisionalenloss_(pset.getParameter("doCollisionalEnLoss")), - fracsoftmult_(pset.getParameter("fracSoftMultiplicity")), - hadfreeztemp_(pset.getParameter("hadronFreezoutTemperature")), - hymode_(pset.getParameter("hydjetMode")), - maxEventsToPrint_(pset.getUntrackedParameter("maxEventsToPrint", 1)), - maxlongy_(pset.getParameter("maxLongitudinalRapidity")), - maxtrany_(pset.getParameter("maxTransverseRapidity")), - nsub_(0), - nhard_(0), - nmultiplicity_(pset.getParameter("nMultiplicity")), - nsoft_(0), - nquarkflavor_(pset.getParameter("qgpNumQuarkFlavor")), - pythiaPylistVerbosity_(pset.getUntrackedParameter("pythiaPylistVerbosity", 0)), - qgpt0_(pset.getParameter("qgpInitialTemperature")), - qgptau0_(pset.getParameter("qgpProperTimeFormation")), - phi0_(0.), - sinphi0_(0.), - cosphi0_(1.), - rotate_(pset.getParameter("rotateEventPlane")), - shadowingswitch_(pset.getParameter("shadowingSwitch")), - signn_(pset.getParameter("sigmaInelNN")), - fVertex_(nullptr), - pythia6Service_(new Pythia6Service(pset)) { - // Default constructor - - if (pset.exists("signalVtx")) - signalVtx_ = pset.getUntrackedParameter >("signalVtx"); - - if (signalVtx_.size() == 4) { - if (!fVertex_) - fVertex_ = new HepMC::FourVector(); - LogDebug("EventSignalVertex") << "Setting event signal vertex " - << " x = " << signalVtx_.at(0) << " y = " << signalVtx_.at(1) - << " z= " << signalVtx_.at(2) << " t = " << signalVtx_.at(3) << endl; - fVertex_->set(signalVtx_.at(0), signalVtx_.at(1), signalVtx_.at(2), signalVtx_.at(3)); - } - - // PYLIST Verbosity Level - // Valid PYLIST arguments are: 1, 2, 3, 5, 7, 11, 12, 13 - pythiaPylistVerbosity_ = pset.getUntrackedParameter("pythiaPylistVerbosity", 0); - LogDebug("PYLISTverbosity") << "Pythia PYLIST verbosity level = " << pythiaPylistVerbosity_; - - //Max number of events printed on verbosity level - maxEventsToPrint_ = pset.getUntrackedParameter("maxEventsToPrint", 0); - LogDebug("Events2Print") << "Number of events to be printed = " << maxEventsToPrint_; - - if (embedding_) { - cflag_ = 0; - src_ = iC.consumes >( - pset.getUntrackedParameter("backgroundLabel", edm::InputTag("mix", "generatorSmeared"))); - } - - int cm = 1, va, vb, vc; - HYJVER(cm, va, vb, vc); - HepMC::HEPEVT_Wrapper::set_max_number_entries(4000); -} - -//_____________________________________________________________________ -HydjetHadronizer::~HydjetHadronizer() { - // destructor - call_pystat(1); - delete pythia6Service_; -} - -//_____________________________________________________________________ -void HydjetHadronizer::doSetRandomEngine(CLHEP::HepRandomEngine* v) { pythia6Service_->setRandomEngine(v); } - -//_____________________________________________________________________ -void HydjetHadronizer::add_heavy_ion_rec(HepMC::GenEvent* evt) { - // heavy ion record in the final CMSSW Event - double npart = hyfpar.npart; - int nproj = static_cast(npart / 2); - int ntarg = static_cast(npart - nproj); - - HepMC::HeavyIon* hi = new HepMC::HeavyIon(nsub_, // Ncoll_hard/N of SubEvents - nproj, // Npart_proj - ntarg, // Npart_targ - static_cast(hyfpar.nbcol), // Ncoll - 0, // spectator_neutrons - 0, // spectator_protons - 0, // N_Nwounded_collisions - 0, // Nwounded_N_collisions - 0, // Nwounded_Nwounded_collisions - hyfpar.bgen * nuclear_radius(), // impact_parameter in [fm] - phi0_, // event_plane_angle - 0, //hypsi3.psi3, // eccentricity - hyjpar.sigin // sigma_inel_NN - ); - - evt->set_heavy_ion(*hi); - delete hi; -} - -//___________________________________________________________________ -HepMC::GenParticle* HydjetHadronizer::build_hyjet(int index, int barcode) { - // Build particle object corresponding to index in hyjets (soft+hard) - double x0 = hyjets.phj[0][index]; - double y0 = hyjets.phj[1][index]; - - double x = x0 * cosphi0_ - y0 * sinphi0_; - double y = y0 * cosphi0_ + x0 * sinphi0_; - - HepMC::GenParticle* p = new HepMC::GenParticle(HepMC::FourVector(x, // px - y, // py - hyjets.phj[2][index], // pz - hyjets.phj[3][index]), // E - hyjets.khj[1][index], // id - convertStatus(hyjets.khj[0][index] // status - )); - - p->suggest_barcode(barcode); - return p; -} - -//___________________________________________________________________ -HepMC::GenVertex* HydjetHadronizer::build_hyjet_vertex(int i, int id) { - // build verteces for the hyjets stored events - double x0 = hyjets.vhj[0][i]; - double y0 = hyjets.vhj[1][i]; - double x = x0 * cosphi0_ - y0 * sinphi0_; - double y = y0 * cosphi0_ + x0 * sinphi0_; - double z = hyjets.vhj[2][i]; - double t = hyjets.vhj[4][i]; - - HepMC::GenVertex* vertex = new HepMC::GenVertex(HepMC::FourVector(x, y, z, t), id); - return vertex; -} - -//___________________________________________________________________ - -bool HydjetHadronizer::generatePartonsAndHadronize() { - Pythia6Service::InstanceWrapper guard(pythia6Service_); - - // generate single event - if (embedding_) { - const edm::Event& e = getEDMEvent(); - HepMC::GenVertex* genvtx = nullptr; - const HepMC::GenEvent* inev = nullptr; - Handle > cf; - e.getByToken(src_, cf); - MixCollection mix(cf.product()); - if (mix.size() < 1) { - throw cms::Exception("MatchVtx") << "Mixing has " << mix.size() << " sub-events, should have been at least 1" - << endl; - } - const HepMCProduct& bkg = mix.getObject(0); - if (!(bkg.isVtxGenApplied())) { - throw cms::Exception("MatchVtx") << "Input background does not have smeared vertex!" << endl; - } else { - inev = bkg.GetEvent(); - } - - genvtx = inev->signal_process_vertex(); - - if (!genvtx) - throw cms::Exception("MatchVtx") << "Input background does not have signal process vertex!" << endl; - - double aX, aY, aZ, aT; - - aX = genvtx->position().x(); - aY = genvtx->position().y(); - aZ = genvtx->position().z(); - aT = genvtx->position().t(); - - if (!fVertex_) { - fVertex_ = new HepMC::FourVector(); - } - LogInfo("MatchVtx") << " setting vertex " - << " aX " << aX << " aY " << aY << " aZ " << aZ << " aT " << aT << endl; - fVertex_->set(aX, aY, aZ, aT); - - const HepMC::HeavyIon* hi = inev->heavy_ion(); - - if (hi) { - bfixed_ = (hi->impact_parameter()) / nuclear_radius(); - phi0_ = hi->event_plane_angle(); - sinphi0_ = sin(phi0_); - cosphi0_ = cos(phi0_); - } else { - LogWarning("EventEmbedding") << "Background event does not have heavy ion record!"; - } - - } else if (rotate_) - rotateEvtPlane(); - - nsoft_ = 0; - nhard_ = 0; - - edm::LogInfo("HYDJETmode") << "##### HYDJET nhsel = " << hyjpar.nhsel; - edm::LogInfo("HYDJETfpart") << "##### HYDJET fpart = " << hyflow.fpart; - edm::LogInfo("HYDJETtf") << "##### HYDJET hadron freez-out temp, Tf = " << hyflow.Tf; - edm::LogInfo("HYDJETinTemp") << "##### HYDJET: QGP init temperature, T0 =" << pyqpar.T0u; - edm::LogInfo("HYDJETinTau") << "##### HYDJET: QGP formation time,tau0 =" << pyqpar.tau0u; - - int ntry = 0; - while (nsoft_ == 0 && nhard_ == 0) { - if (ntry > 100) { - edm::LogError("HydjetEmptyEvent") << "##### HYDJET: No Particles generated, Number of tries =" << ntry; - - // Throw an exception. Use the EventCorruption exception since it maps onto SkipEvent - // which is what we want to do here. - - std::ostringstream sstr; - sstr << "HydjetHadronizerProducer: No particles generated after " << ntry << " tries.\n"; - edm::Exception except(edm::errors::EventCorruption, sstr.str()); - throw except; - } else { - HYEVNT(bfixed_); - nsoft_ = hyfpar.nhyd; - nsub_ = hyjpar.njet; - nhard_ = hyfpar.npyt; - ++ntry; - } - } - - if (hyjpar.nhsel < 3) - nsub_++; - - // event information - std::unique_ptr evt = std::make_unique(); - std::unique_ptr HepMCEvt = std::make_unique(); - - if (nhard_ > 0 || nsoft_ > 0) - get_particles(evt.get()); - - evt->set_signal_process_id(pypars.msti[0]); // type of the process - evt->set_event_scale(pypars.pari[16]); // Q^2 - add_heavy_ion_rec(evt.get()); - - if (fVertex_) { - // generate new vertex & apply the shift - // Copy the HepMC::GenEvent - HepMCEvt = std::make_unique(evt.get()); - HepMCEvt->applyVtxGen(fVertex_); - evt = std::make_unique(*HepMCEvt->GetEvent()); - } - - HepMC::HEPEVT_Wrapper::check_hepevt_consistency(); - LogDebug("HEPEVT_info") << "Ev numb: " << HepMC::HEPEVT_Wrapper::event_number() - << " Entries number: " << HepMC::HEPEVT_Wrapper::number_entries() << " Max. entries " - << HepMC::HEPEVT_Wrapper::max_number_entries() << std::endl; - - event() = std::move(evt); - return true; -} - -//_____________________________________________________________________ -bool HydjetHadronizer::get_particles(HepMC::GenEvent* evt) { - // Hard particles. The first nhard_ lines from hyjets array. - // Pythia/Pyquen sub-events (sub-collisions) for a given event - // Return T/F if success/failure - // Create particles from lujet entries, assign them into vertices and - // put the vertices in the GenEvent, for each SubEvent - // The SubEvent information is kept by storing indeces of main vertices - // of subevents as a vector in GenHIEvent. - - LogDebug("Hydjet") << " Number of sub events " << nsub_; - LogDebug("Hydjet") << " Number of hard events " << hyjpar.njet; - LogDebug("Hydjet") << " Number of hard particles " << nhard_; - LogDebug("Hydjet") << " Number of soft particles " << nsoft_; - LogDebug("Hydjet") << " nhard_ + nsoft_ = " << nhard_ + nsoft_ << " hyjets.nhj = " << hyjets.nhj << endl; - - int ihy = 0; - int isub = -1; - int isub_l = -1; - int stab = 0; - - vector primary_particle(hyjets.nhj); - vector particle(hyjets.nhj); - - HepMC::GenVertex* sub_vertices = nullptr; // just initialization - - // contain the last index in for each subevent - vector index(nsub_); - - while (ihy < hyjets.nhj) { - isub = std::floor((hyjets.khj[2][ihy] / 50000)); - int hjoffset = isub * 50000; - - if (isub != isub_l) { - sub_vertices = new HepMC::GenVertex(HepMC::FourVector(0, 0, 0, 0), isub); - evt->add_vertex(sub_vertices); - if (!evt->signal_process_vertex()) - evt->set_signal_process_vertex(sub_vertices); - index[isub] = ihy - 1; - isub_l = isub; - } - - if (convertStatus(hyjets.khj[0][ihy]) == 1) - stab++; - LogDebug("Hydjet_array") << ihy << " MULTin ev.:" << hyjets.nhj << " SubEv.#" << isub << " Part #" << ihy + 1 - << ", PDG: " << hyjets.khj[1][ihy] << " (st. " << convertStatus(hyjets.khj[0][ihy]) - << ") mother=" << hyjets.khj[2][ihy] - (isub * 50000) + index[isub] + 1 << " (" - << hyjets.khj[2][ihy] << "), childs (" - << hyjets.khj[3][ihy] - (isub * 50000) + index[isub] + 1 << "-" - << hyjets.khj[4][ihy] - (isub * 50000) + index[isub] + 1 << "), vtx (" - << hyjets.vhj[0][ihy] << "," << hyjets.vhj[1][ihy] << "," << hyjets.vhj[2][ihy] << ") " - << std::endl; - - if (hyjets.khj[2][ihy] == 0) { - primary_particle[ihy] = build_hyjet(ihy, ihy + 1); - if (!sub_vertices) - LogError("Hydjet_array") << "##### HYDJET2: Vertex not initialized!"; - else - sub_vertices->add_particle_out(primary_particle[ihy]); - LogDebug("Hydjet_array") << " ---> " << ihy + 1 << std::endl; - } else { - particle[ihy] = build_hyjet(ihy, ihy + 1); - int mid = hyjets.khj[2][ihy] - hjoffset + index[isub]; - int mid_t = mid; - while (((mid + 1) < ihy) && (std::abs(hyjets.khj[1][mid]) < 100) && - (hyjets.khj[3][mid + 1] - hjoffset + index[isub] <= ihy)) - mid++; - if (std::abs(hyjets.khj[1][mid]) < 100) - mid = mid_t; - - HepMC::GenParticle* mother = primary_particle.at(mid); - HepMC::GenVertex* prods = build_hyjet_vertex(ihy, isub); - - if (!mother) { - mother = particle[mid]; - primary_particle[mid] = mother; - } - - HepMC::GenVertex* prod_vertex = mother->end_vertex(); - if (!prod_vertex) { - prod_vertex = prods; - prod_vertex->add_particle_in(mother); - LogDebug("Hydjet_array") << " <--- " << mid + 1 << std::endl; - evt->add_vertex(prod_vertex); - prods = nullptr; - } - - prod_vertex->add_particle_out(particle[ihy]); - LogDebug("Hydjet_array") << " ---" << mid + 1 << "---> " << ihy + 1 << std::endl; - delete prods; - } - ihy++; - } - LogDebug("Hydjet_array") << " MULTin ev.:" << hyjets.nhj << ", last index: " << ihy - 1 - << ", Sub events: " << isub + 1 << ", stable particles: " << stab << std::endl; - - return true; -} - -//______________________________________________________________ -bool HydjetHadronizer::call_hyinit(double energy, double a, int ifb, double bmin, double bmax, double bfix, int nh) { - // initialize hydjet - - pydatr.mrpy[2] = 1; - HYINIT(energy, a, ifb, bmin, bmax, bfix, nh); - return true; -} - -//______________________________________________________________ -bool HydjetHadronizer::hydjet_init(const ParameterSet& pset) { - // set hydjet options - - // hydjet running mode mode - // kHydroOnly --- nhsel=0 jet production off (pure HYDRO event), nhsel=0 - // kHydroJets --- nhsle=1 jet production on, jet quenching off (HYDRO+njet*PYTHIA events) - // kHydroQJet --- nhsel=2 jet production & jet quenching on (HYDRO+njet*PYQUEN events) - // kJetsOnly --- nhsel=3 jet production on, jet quenching off, HYDRO off (njet*PYTHIA events) - // kQJetsOnly --- nhsel=4 jet production & jet quenching on, HYDRO off (njet*PYQUEN events) - - if (hymode_ == "kHydroOnly") - hyjpar.nhsel = 0; - else if (hymode_ == "kHydroJets") - hyjpar.nhsel = 1; - else if (hymode_ == "kHydroQJets") - hyjpar.nhsel = 2; - else if (hymode_ == "kJetsOnly") - hyjpar.nhsel = 3; - else if (hymode_ == "kQJetsOnly") - hyjpar.nhsel = 4; - else - hyjpar.nhsel = 2; - - // fraction of soft hydro induced multiplicity - hyflow.fpart = fracsoftmult_; - - // hadron freez-out temperature - hyflow.Tf = hadfreeztemp_; - - // maximum longitudinal collective rapidity - hyflow.ylfl = maxlongy_; - - // maximum transverse collective rapidity - hyflow.ytfl = maxtrany_; - - // shadowing on=1, off=0 - hyjpar.ishad = shadowingswitch_; - - // set inelastic nucleon-nucleon cross section - hyjpar.sigin = signn_; - - // angular emitted gluon spectrum selection - pyqpar.ianglu = angularspecselector_; - - // number of active quark flavors in qgp - pyqpar.nfu = nquarkflavor_; - - // initial temperature of QGP - pyqpar.T0u = qgpt0_; - - // proper time of QGP formation - pyqpar.tau0u = qgptau0_; - - // type of medium induced partonic energy loss - if (doradiativeenloss_ && docollisionalenloss_) { - edm::LogInfo("HydjetEnLoss") << "##### Radiative AND Collisional partonic energy loss ON ####"; - pyqpar.ienglu = 0; - } else if (doradiativeenloss_) { - edm::LogInfo("HydjetenLoss") << "##### Only RADIATIVE partonic energy loss ON ####"; - pyqpar.ienglu = 1; - } else if (docollisionalenloss_) { - edm::LogInfo("HydjetEnLoss") << "##### Only COLLISIONAL partonic energy loss ON ####"; - pyqpar.ienglu = 2; - } else { - edm::LogInfo("HydjetEnLoss") << "##### Radiative AND Collisional partonic energy loss ON ####"; - pyqpar.ienglu = 0; - } - return true; -} - -//_____________________________________________________________________ - -bool HydjetHadronizer::readSettings(int) { - Pythia6Service::InstanceWrapper guard(pythia6Service_); - pythia6Service_->setGeneralParams(); - - return true; -} - -//_____________________________________________________________________ - -bool HydjetHadronizer::initializeForInternalPartons() { - Pythia6Service::InstanceWrapper guard(pythia6Service_); - // pythia6Service_->setGeneralParams(); - - // the input impact parameter (bxx_) is in [fm]; transform in [fm/RA] for hydjet usage - const float ra = nuclear_radius(); - LogInfo("RAScaling") << "Nuclear radius(RA) = " << ra; - bmin_ /= ra; - bmax_ /= ra; - bfixed_ /= ra; - - // hydjet running options - hydjet_init(pset_); - // initialize hydjet - LogInfo("HYDJETinAction") << "##### Calling HYINIT(" << comenergy << "," << abeamtarget_ << "," << cflag_ << "," - << bmin_ << "," << bmax_ << "," << bfixed_ << "," << nmultiplicity_ << ") ####"; - call_hyinit(comenergy, abeamtarget_, cflag_, bmin_, bmax_, bfixed_, nmultiplicity_); - return true; -} - -bool HydjetHadronizer::declareStableParticles(const std::vector& _pdg) { - std::vector pdg = _pdg; - for (size_t i = 0; i < pdg.size(); i++) { - int pyCode = pycomp_(pdg[i]); - std::ostringstream pyCard; - pyCard << "MDCY(" << pyCode << ",1)=0"; - std::cout << pyCard.str() << std::endl; - call_pygive(pyCard.str()); - } - return true; -} - -//________________________________________________________________ -void HydjetHadronizer::rotateEvtPlane() { - const double pi = 3.14159265358979; - phi0_ = 2. * pi * gen::pyr_(nullptr) - pi; - sinphi0_ = sin(phi0_); - cosphi0_ = cos(phi0_); -} - -//________________________________________________________________ -bool HydjetHadronizer::hadronize() { return false; } - -bool HydjetHadronizer::decay() { return true; } - -bool HydjetHadronizer::residualDecay() { return true; } - -void HydjetHadronizer::finalizeEvent() {} - -void HydjetHadronizer::statistics() {} - -const char* HydjetHadronizer::classname() const { return "gen::HydjetHadronizer"; } diff --git a/GeneratorInterface/HydjetInterface/test/.cvsignore b/GeneratorInterface/HydjetInterface/test/.cvsignore deleted file mode 100644 index e928d5c699f15..0000000000000 --- a/GeneratorInterface/HydjetInterface/test/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -PoolFileCatalog.xml -*.root diff --git a/GeneratorInterface/HydjetInterface/test/BuildFile.xml b/GeneratorInterface/HydjetInterface/test/BuildFile.xml deleted file mode 100644 index 63b6a80814f6d..0000000000000 --- a/GeneratorInterface/HydjetInterface/test/BuildFile.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/GeneratorInterface/HydjetInterface/test/HydjetAnalyzer.cc b/GeneratorInterface/HydjetInterface/test/HydjetAnalyzer.cc deleted file mode 100644 index bee9966052092..0000000000000 --- a/GeneratorInterface/HydjetInterface/test/HydjetAnalyzer.cc +++ /dev/null @@ -1,1087 +0,0 @@ -/** - \class HydjetAnalyzer - \brief HepMC events analyzer - \version 2.1 - \authors Yetkin Yilmaz, Andrey Belyaev -*/ - -// system include files -#include -#include -#include -#include -#include - -// user include files -#include "FWCore/Framework/interface/one/EDAnalyzer.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" - -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" - -#include "FWCore/ServiceRegistry/interface/Service.h" - -#include "CommonTools/UtilAlgos/interface/TFileService.h" - -#include "DataFormats/HepMCCandidate/interface/GenParticle.h" -#include "SimDataFormats/CrossingFrame/interface/MixCollection.h" -#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" -#include "SimDataFormats/HiGenData/interface/GenHIEvent.h" -#include "SimDataFormats/Vertex/interface/SimVertex.h" -#include "SimDataFormats/Vertex/interface/SimVertexContainer.h" - -#include "HepMC/GenEvent.h" -#include "HepMC/HeavyIon.h" - -#include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h" - -// root include file -#include "TFile.h" -#include "TNtuple.h" -#include "TH1.h" - -#include "FWCore/Framework/interface/ConsumesCollector.h" -#include "FWCore/Framework/interface/EDProducer.h" -#include "FWCore/Utilities/interface/EDGetToken.h" - -using namespace edm; -using namespace std; -namespace { - static const int MAXPARTICLES = 5000000; - static const int ETABINS = 3; // Fix also in branch string -} // namespace -struct HydjetEvent { - int event; - float b; - float npart; - float ncoll; - float nhard; - float phi0; - float scale; - int n[ETABINS]; - float ptav[ETABINS]; - int mult; - float px[MAXPARTICLES]; - float py[MAXPARTICLES]; - float pz[MAXPARTICLES]; - float e[MAXPARTICLES]; - float pseudoRapidity[MAXPARTICLES]; - float pt[MAXPARTICLES]; - float eta[MAXPARTICLES]; - float phi[MAXPARTICLES]; - int pdg[MAXPARTICLES]; - int chg[MAXPARTICLES]; - - float vx; - float vy; - float vz; - float vr; -}; -class HydjetAnalyzer : public edm::one::EDAnalyzer { -public: - explicit HydjetAnalyzer(const edm::ParameterSet &); - ~HydjetAnalyzer(); - -private: - void beginJob() final; - void analyze(const edm::Event &, const edm::EventSetup &) final; - void endJob() final; - // ----------member data --------------------------- - std::ofstream out_b; - std::string fBFileName; - std::ofstream out_n; - std::string fNFileName; - std::ofstream out_m; - std::string fMFileName; - TTree *hydjetTree_; - HydjetEvent hev_; - TNtuple *nt; - std::string output; // Output filename - bool doAnalysis_; - bool printLists_; - bool doCF_; - bool doVertex_; - bool useHepMCProduct_; - bool doHI_; - bool doParticles_; - double etaMax_; - double ptMin_; - bool doHistos_, userHistos_; - - float *ptBins; - float *etaBins; - float *phiBins; - float *v2ptBins; - float *v2etaBins; - - vector uPtBins_; - vector uEtaBins_; - vector uPhiBins_; - vector uV2ptBins_; - vector uV2etaBins_; - - int uPDG_1; - int uPDG_2; - int uPDG_3; - int uStatus_; - int nintPt = 0; - int nintEta = 0; - int nintPhi = 0; - int nintV2pt = 0; - int nintV2eta = 0; - - double minPt = 0.; - double minEta = 0.; - double minPhi = 0.; - double minV2pt = 0.; - double minV2eta = 0.; - - double maxPt = 0.; - double maxEta = 0.; - double maxPhi = 0.; - double maxV2pt = 0.; - double maxV2eta = 0.; - - double upTetaCut_ = 0.; - double downTetaCut_ = -1.; - const double pi = 3.14159265358979; - - edm::EDGetTokenT srcT_; - edm::EDGetTokenT> srcTmix_; - - edm::InputTag genParticleSrc_; - edm::InputTag genHIsrc_; - edm::InputTag simVerticesTag_; - edm::ESGetToken pdtToken_; - - //common - TH1D *dhpt; - TH1D *dhpt_ch; - - TH1D *dhphi; - TH1D *dhphi_ch; - - TH1D *dhv2pt; - TH1D *dhv0pt; - - TH1D *dhv2eta; - TH1D *dhv0eta; - - TH1D *dheta; - TH1D *dheta_ch; - - TH1D *hNev; - - //Users - TH1D *uhpt; - TH1D *uhpth; - TH1D *uhptj; - - TH1D *uhpt_db; - TH1D *uhpth_db; - TH1D *uhptj_db; - - TH1D *uhNpart; - TH1D *uhNparth; - TH1D *uhNpartj; - - TH1D *uhNpart_db; - TH1D *uhNparth_db; - TH1D *uhNpartj_db; - - TH1D *uhPtNpart; - TH1D *uhPtNparth; - TH1D *uhPtNpartj; - - TH1D *uhPtNpart_db; - TH1D *uhPtNparth_db; - TH1D *uhPtNpartj_db; - - TH1D *uhv2Npart; - TH1D *uhv2Nparth; - TH1D *uhv2Npartj; - - TH1D *uhv2Npart_db; - TH1D *uhv2Nparth_db; - TH1D *uhv2Npartj_db; - - TH1D *uheta; - TH1D *uhetah; - TH1D *uhetaj; - - TH1D *uhphi; - TH1D *uhphih; - TH1D *uhphij; - - TH1D *uhv2pt; - TH1D *uhv2pth; - TH1D *uhv2ptj; - - TH1D *uhv3pt; - TH1D *uhv4pt; - TH1D *uhv5pt; - TH1D *uhv6pt; - - TH1D *uhv0pt; - TH1D *uhv0pth; - TH1D *uhv0ptj; - - TH1D *uhv2pt_db; - TH1D *uhv2pth_db; - TH1D *uhv2ptj_db; - - TH1D *uhv3pt_db; - TH1D *uhv4pt_db; - TH1D *uhv5pt_db; - TH1D *uhv6pt_db; - - TH1D *uhv0pt_db; - TH1D *uhv0pth_db; - TH1D *uhv0ptj_db; - - TH1D *uhv2eta; - TH1D *uhv2etah; - TH1D *uhv2etaj; - - TH1D *uhv3eta; - TH1D *uhv4eta; - TH1D *uhv5eta; - TH1D *uhv6eta; - - TH1D *uhv0eta; - TH1D *uhv0etah; - TH1D *uhv0etaj; - - TH1D *uhv2eta_db; - TH1D *uhv2etah_db; - TH1D *uhv2etaj_db; - - TH1D *uhv3eta_db; - TH1D *uhv4eta_db; - TH1D *uhv5eta_db; - TH1D *uhv6eta_db; - - TH1D *uhv0eta_db; - TH1D *uhv0etah_db; - TH1D *uhv0etaj_db; -}; - -HydjetAnalyzer::HydjetAnalyzer(const edm::ParameterSet &iConfig) { - fBFileName = iConfig.getUntrackedParameter("output_b", "b_values.txt"); - fNFileName = iConfig.getUntrackedParameter("output_n", "n_values.txt"); - fMFileName = iConfig.getUntrackedParameter("output_m", "m_values.txt"); - doAnalysis_ = iConfig.getUntrackedParameter("doAnalysis", false); - useHepMCProduct_ = iConfig.getUntrackedParameter("useHepMCProduct", true); - printLists_ = iConfig.getUntrackedParameter("printLists", false); - doCF_ = iConfig.getUntrackedParameter("doMixed", false); - doVertex_ = iConfig.getUntrackedParameter("doVertex", false); - if (doVertex_) { - simVerticesTag_ = iConfig.getParameter("simVerticesTag"); - } - etaMax_ = iConfig.getUntrackedParameter("etaMax", 2.); - ptMin_ = iConfig.getUntrackedParameter("ptMin", 0); - srcT_ = mayConsume( - iConfig.getUntrackedParameter("src", edm::InputTag("generator", "unsmeared"))); - srcTmix_ = consumes>( - iConfig.getUntrackedParameter("srcMix", edm::InputTag("mix", "generatorSmeared"))); - - genParticleSrc_ = iConfig.getUntrackedParameter("src", edm::InputTag("hiGenParticles")); - genHIsrc_ = iConfig.getUntrackedParameter("src", edm::InputTag("heavyIon")); - - if (useHepMCProduct_) - pdtToken_ = esConsumes(); - doParticles_ = iConfig.getUntrackedParameter("doParticles", false); - doHistos_ = iConfig.getUntrackedParameter("doHistos", false); - if (doHistos_) { - userHistos_ = iConfig.getUntrackedParameter("userHistos", false); - if (userHistos_) { - uStatus_ = iConfig.getUntrackedParameter("uStatus"); - uPDG_1 = iConfig.getUntrackedParameter("uPDG_1"); - uPDG_2 = iConfig.getUntrackedParameter("uPDG_2", uPDG_1); - uPDG_3 = iConfig.getUntrackedParameter("uPDG_3", uPDG_1); - upTetaCut_ = iConfig.getUntrackedParameter("uPTetaCut", 0.8); - downTetaCut_ = iConfig.getUntrackedParameter("dPTetaCut", -1.); - uPtBins_ = iConfig.getUntrackedParameter>("PtBins"); - uEtaBins_ = iConfig.getUntrackedParameter>("EtaBins"); - uPhiBins_ = iConfig.getUntrackedParameter>("PhiBins"); - uV2ptBins_ = iConfig.getUntrackedParameter>("v2PtBins"); - uV2etaBins_ = iConfig.getUntrackedParameter>("v2EtaBins"); - - //Pt - int PtSize = uPtBins_.size(); - if (PtSize > 1) { - ptBins = new float[PtSize]; - nintPt = PtSize - 1; - for (int k = 0; k < PtSize; k++) { - ptBins[k] = uPtBins_[k]; - } - } else { - nintPt = iConfig.getUntrackedParameter("nintPt"); - maxPt = iConfig.getUntrackedParameter("maxPt"); - minPt = iConfig.getUntrackedParameter("minPt"); - ptBins = new float[nintPt + 1]; - for (int k = 0; k < nintPt + 1; k++) { - ptBins[k] = minPt + k * ((maxPt - minPt) / nintPt); - } - } - - //Eta - int EtaSize = uEtaBins_.size(); - if (EtaSize > 1) { - etaBins = new float[EtaSize]; - nintEta = EtaSize - 1; - for (int k = 0; k < EtaSize; k++) { - etaBins[k] = uEtaBins_[k]; - } - } else { - nintEta = iConfig.getUntrackedParameter("nintEta"); - maxEta = iConfig.getUntrackedParameter("maxEta"); - minEta = iConfig.getUntrackedParameter("minEta"); - etaBins = new float[nintEta + 1]; - for (int k = 0; k < nintEta + 1; k++) { - etaBins[k] = minEta + k * ((maxEta - minEta) / nintEta); - } - } - - //Phi - int PhiSize = uPhiBins_.size(); - if (PhiSize > 1) { - phiBins = new float[PhiSize]; - nintPhi = PhiSize - 1; - for (int k = 0; k < PhiSize; k++) { - phiBins[k] = uPhiBins_[k]; - } - } else { - nintPhi = iConfig.getUntrackedParameter("nintPhi"); - maxPhi = iConfig.getUntrackedParameter("maxPhi"); - minPhi = iConfig.getUntrackedParameter("minPhi"); - phiBins = new float[nintPhi + 1]; - for (int k = 0; k < nintPhi + 1; k++) { - phiBins[k] = minPhi + k * ((maxPhi - minPhi) / nintPhi); - } - } - - //v2Pt - int v2PtSize = uV2ptBins_.size(); - if (v2PtSize > 1) { - v2ptBins = new float[v2PtSize]; - nintV2pt = v2PtSize - 1; - for (int k = 0; k < v2PtSize; k++) { - v2ptBins[k] = uV2ptBins_[k]; - } - } else { - nintV2pt = iConfig.getUntrackedParameter("nintV2pt"); - maxV2pt = iConfig.getUntrackedParameter("maxV2pt"); - minV2pt = iConfig.getUntrackedParameter("minV2pt"); - v2ptBins = new float[nintV2pt + 1]; - for (int k = 0; k < nintV2pt + 1; k++) { - v2ptBins[k] = minV2pt + k * ((maxV2pt - minV2pt) / nintV2pt); - } - } - - //v2Eta - int v2EtaSize = uV2etaBins_.size(); - if (v2EtaSize > 1) { - v2etaBins = new float[v2EtaSize]; - nintV2eta = v2EtaSize - 1; - for (int k = 0; k < v2EtaSize; k++) { - v2etaBins[k] = uV2etaBins_[k]; - } - } else { - nintV2eta = iConfig.getUntrackedParameter("nintV2eta"); - maxV2eta = iConfig.getUntrackedParameter("maxV2eta"); - minV2eta = iConfig.getUntrackedParameter("minV2eta"); - v2etaBins = new float[nintV2eta + 1]; - for (int k = 0; k < nintV2eta + 1; k++) { - v2etaBins[k] = minV2eta + k * ((maxV2eta - minV2eta) / nintV2eta); - } - } - } //user histo - } //do histo -} -HydjetAnalyzer::~HydjetAnalyzer() {} - -// ------------ method called to for each event ------------ -void HydjetAnalyzer::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) { - using namespace edm; - using namespace HepMC; - hev_.event = iEvent.id().event(); - for (int ieta = 0; ieta < ETABINS; ++ieta) { - hev_.n[ieta] = 0; - hev_.ptav[ieta] = 0; - } - hev_.mult = 0; - double phi0 = 0.; - double phi3 = 0.; - double b = -1.; - double v2, v3, v4, v5, v6; - double scale = -1.; - int npart = -1; - int ncoll = -1; - int nhard = -1; - double vx = -99.; - double vy = -99.; - double vz = -99.; - double vr = -99.; - const GenEvent *evt; - int nmix = -1; - int np = 0; - int sig = -1; - int src = -1; - if (useHepMCProduct_) { - edm::ESHandle pdt = iSetup.getHandle(pdtToken_); - - if (doCF_) { - Handle> cf; - iEvent.getByToken(srcTmix_, cf); - MixCollection mix(cf.product()); - nmix = mix.size(); - //cout << "Mix Collection Size: " << mix.size() <<", pileup size: " <::iterator mbegin = mix.begin(); - MixCollection::iterator mend = mix.end(); - for (MixCollection::iterator mixit = mbegin; mixit != mend; ++mixit) { - const GenEvent *subevt = (*mixit).GetEvent(); - int all = subevt->particles_size(); - //cout << "Subevent size: " << all << " Subevent type (1-signal): "<< (mixit).getTrigger()<<" Source type (pileup=0, cosmics=1, beam halo+ =2, beam halo- =3): "<< (mixit).getSourceType()<<" Bunchcrossing number: "<< mixit.bunch()<<" Impact: " <heavy_ion()->impact_parameter()<particles_begin(); - HepMC::GenEvent::particle_const_iterator end = subevt->particles_end(); - for (HepMC::GenEvent::particle_const_iterator it = begin; it != end; ++it) { - if ((*it)->status() == 1) { - int pdg_id = (*it)->pdg_id(); - float eta = (*it)->momentum().eta(); - float phi = (*it)->momentum().phi(); - float pt = (*it)->momentum().perp(); - const ParticleData *part = pdt->particle(pdg_id); - int charge = static_cast(part->charge()); - hev_.pt[hev_.mult] = pt; - hev_.eta[hev_.mult] = eta; - hev_.phi[hev_.mult] = phi; - hev_.pdg[hev_.mult] = pdg_id; - hev_.chg[hev_.mult] = charge; - - //cout << "Mix Particles: pt= " << pt<<" eta="<(part->charge()); - hev_.px[hev_.mult] = px; - hev_.py[hev_.mult] = py; - hev_.pz[hev_.mult] = pz; - hev_.e[hev_.mult] = e; - hev_.pseudoRapidity[hev_.mult] = pseudoRapidity; - hev_.pt[hev_.mult] = pt; - hev_.eta[hev_.mult] = eta; - hev_.phi[hev_.mult] = phi; - hev_.pdg[hev_.mult] = pdg_id; - hev_.chg[hev_.mult] = charge; - - phi = phi - phi0; - /// - double phiTrue; - if (phi > pi) { - phiTrue = phi - (2 * pi); - } else if (phi < (-1 * pi)) { - phiTrue = phi + (2 * pi); - } else { - phiTrue = phi; - } - /// - v2 = std::cos(2 * (phiTrue)); - v3 = std::cos(3 * (phiTrue - phi3)); - v4 = std::cos(4 * (phiTrue)); - v5 = std::cos(5 * (phiTrue - phi3)); - v6 = std::cos(6 * (phiTrue)); - - if (doHistos_) { - //common histos - if ((*it)->status() < 10) { //status 1 - dheta->Fill(eta); - - if (std::abs(eta) < 0.8) { - dhpt->Fill(pt); - dhphi->Fill(phiTrue); - } - - if (std::abs(pdg_id) == 211 || std::abs(pdg_id) == 321 || std::abs(pdg_id) == 2212) { //ch - - if (std::abs(eta) < 0.8) { - dhv0pt->Fill(pt, 1.); - dhv2pt->Fill(pt, v2); - dhpt_ch->Fill(pt); - dhphi_ch->Fill(phiTrue); - } - - dhv0eta->Fill(eta, 1.); - dhv2eta->Fill(eta, v2); - dheta_ch->Fill(eta); - } //ch - } //status 1 - - //user histos - if (userHistos_ && ((uStatus_ == 3) || (((*it)->status() < 10) && (uStatus_ == 1)) || - (((*it)->status() > 10) && (uStatus_ == 2)))) { //user status - - //set1 - if (std::abs(pdg_id) == uPDG_1 || std::abs(pdg_id) == uPDG_2 || std::abs(pdg_id) == uPDG_3) { //uPDG - if ((uStatus_ == 3) && ((*it)->status() < 10)) - cout << "ustatus=3, but stab. part. found!!!" << endl; - - if (std::abs(eta) > downTetaCut_ && std::abs(eta) < upTetaCut_) { //eta cut - - uhv0pt->Fill(pt, 1.); - uhv2pt->Fill(pt, v2); - uhv3pt->Fill(pt, v3); - uhv4pt->Fill(pt, v4); - uhv5pt->Fill(pt, v5); - uhv6pt->Fill(pt, v6); - - uhv0pt_db->Fill(pt, 1.); - uhv2pt_db->Fill(pt, v2); - uhv3pt_db->Fill(pt, v3); - uhv4pt_db->Fill(pt, v4); - uhv5pt_db->Fill(pt, v5); - uhv6pt_db->Fill(pt, v6); - - if (pt >= 1.5 && pt < 10.) { - uhv2Npart->Fill(npart, v2); - uhv2Npart_db->Fill(npart, v2); - - uhPtNpart->Fill(npart, pt); - uhPtNpart_db->Fill(npart, pt); - - uhNpart->Fill(npart, 1.); - uhNpart_db->Fill(npart, 1.); - } - - uhpt->Fill(pt); - uhpt_db->Fill(pt); - uhphi->Fill(phiTrue); - - if (((*it)->status() == 16) || ((*it)->status() == 6)) { //hydro - uhv0pth->Fill(pt, 1.); - uhv2pth->Fill(pt, v2); - - uhv0pth_db->Fill(pt, 1.); - uhv2pth_db->Fill(pt, v2); - - if (pt >= 1.5 && pt < 10.) { - uhv2Nparth->Fill(npart, v2); - uhv2Nparth_db->Fill(npart, v2); - } - - uhPtNparth->Fill(npart, pt); - uhPtNparth_db->Fill(npart, pt); - - uhpth->Fill(pt); - uhpth_db->Fill(pt); - uhphih->Fill(phiTrue); - } - - if (((*it)->status() == 17) || ((*it)->status() == 7)) { //jet - uhv0ptj->Fill(pt, 1.); - uhv2ptj->Fill(pt, v2); - - uhv0ptj_db->Fill(pt, 1.); - uhv2ptj_db->Fill(pt, v2); - - if (pt >= 1.5 && pt < 10.) { - uhv2Npartj->Fill(npart, v2); - uhv2Npartj_db->Fill(npart, v2); - } - - uhPtNpartj->Fill(npart, pt); - uhPtNpartj_db->Fill(npart, pt); - - uhptj->Fill(pt); - uhptj_db->Fill(pt); - uhphij->Fill(phiTrue); - } - } //eta cut - - uheta->Fill(eta); - - uhv0eta->Fill(eta, 1.); - uhv2eta->Fill(eta, v2); - uhv3eta->Fill(eta, v3); - uhv4eta->Fill(eta, v4); - uhv5eta->Fill(eta, v5); - uhv6eta->Fill(eta, v6); - - uhv0eta_db->Fill(eta, 1.); - uhv2eta_db->Fill(eta, v2); - uhv3eta_db->Fill(eta, v3); - uhv4eta_db->Fill(eta, v4); - uhv5eta_db->Fill(eta, v5); - uhv6eta_db->Fill(eta, v6); - - if (((*it)->status() == 16) || ((*it)->status() == 6)) { //hydro - uhv2etah->Fill(eta, v2); - uhv0etah->Fill(eta, 1.); - - uhv2etah_db->Fill(eta, v2); - uhv0etah_db->Fill(eta, 1.); - - uhetah->Fill(eta); - } - if (((*it)->status() == 17) || ((*it)->status() == 7)) { //jet - uhv2etaj->Fill(eta, v2); - uhv0etaj->Fill(eta, 1.); - - uhv2etaj_db->Fill(eta, v2); - uhv0etaj_db->Fill(eta, 1.); - - uhetaj->Fill(eta); - } - } //uPDG - - } //user status - - } //doHistos_ - - eta = fabs(eta); - int etabin = 0; - if (eta > 0.5) - etabin = 1; - if (eta > 1.) - etabin = 2; - if (eta < 2.) { - hev_.ptav[etabin] += pt; - ++(hev_.n[etabin]); - } - ++(hev_.mult); - } - } - } - } else { // not HepMC - edm::Handle parts; - iEvent.getByLabel(genParticleSrc_, parts); - for (unsigned int i = 0; i < parts->size(); ++i) { - const reco::GenParticle &p = (*parts)[i]; - hev_.pt[hev_.mult] = p.pt(); - hev_.eta[hev_.mult] = p.eta(); - hev_.phi[hev_.mult] = p.phi(); - hev_.pdg[hev_.mult] = p.pdgId(); - hev_.chg[hev_.mult] = p.charge(); - double eta = fabs(p.eta()); - - int etabin = 0; - if (eta > 0.5) - etabin = 1; - if (eta > 1.) - etabin = 2; - if (eta < 2.) { - hev_.ptav[etabin] += p.pt(); - ++(hev_.n[etabin]); - } - ++(hev_.mult); - } - if (doHI_) { - edm::Handle higen; - iEvent.getByLabel(genHIsrc_, higen); - } - } - - if (doVertex_) { - edm::Handle simVertices; - iEvent.getByLabel(simVerticesTag_, simVertices); - - if (!simVertices.isValid()) - throw cms::Exception("FatalError") << "No vertices found\n"; - int inum = 0; - - edm::SimVertexContainer::const_iterator it = simVertices->begin(); - SimVertex vertex = (*it); - cout << " Vertex position " << inum << " " << vertex.position().rho() << " " << vertex.position().z() << endl; - vx = vertex.position().x(); - vy = vertex.position().y(); - vz = vertex.position().z(); - vr = vertex.position().rho(); - } - - for (int i = 0; i < 3; ++i) { - hev_.ptav[i] = hev_.ptav[i] / hev_.n[i]; - } - - hev_.b = b; - hev_.scale = scale; - hev_.npart = npart; - hev_.ncoll = ncoll; - hev_.nhard = nhard; - hev_.phi0 = phi0; - hev_.vx = vx; - hev_.vy = vy; - hev_.vz = vz; - hev_.vr = vr; - - if (doAnalysis_) { - nt->Fill(nmix, np, src, sig); - hydjetTree_->Fill(); - } - - //event counter - if (doHistos_) { - hNev->Fill(1., 1); - } -} -// ------------ method called once each job just before starting event loop ------------ -void HydjetAnalyzer::beginJob() { - if (printLists_) { - out_b.open(fBFileName.c_str()); - if (out_b.good() == false) - throw cms::Exception("BadFile") << "Can\'t open file " << fBFileName; - out_n.open(fNFileName.c_str()); - if (out_n.good() == false) - throw cms::Exception("BadFile") << "Can\'t open file " << fNFileName; - out_m.open(fMFileName.c_str()); - if (out_m.good() == false) - throw cms::Exception("BadFile") << "Can\'t open file " << fMFileName; - } - - if (doHistos_) { - if (userHistos_) { - //pt - uhpt = new TH1D("uhpt", "uhpt", nintPt, ptBins); - uhptj = new TH1D("uhptj", "uhptj", nintPt, ptBins); - uhpth = new TH1D("uhpth", "uhpth", nintPt, ptBins); - - //pt_db - uhpt_db = new TH1D("uhpt_db", "uhpt_db", 1000, 0.0000000000001, 100.); - uhptj_db = new TH1D("uhptj_db", "uhptj_db", 1000, 0.0000000000001, 100.); - uhpth_db = new TH1D("uhpth_db", "uhpth_db", 1000, 0.0000000000001, 100.); - - //eta - uheta = new TH1D("uheta", "uheta", nintEta, etaBins); - uhetaj = new TH1D("uhetaj", "uhetaj", nintEta, etaBins); - uhetah = new TH1D("uhetah", "uhetah", nintEta, etaBins); - - //phi - uhphi = new TH1D("uhphi", "uhphi", nintPhi, phiBins); - uhphij = new TH1D("uhphij", "uhphij", nintPhi, phiBins); - uhphih = new TH1D("uhphih", "uhphih", nintPhi, phiBins); - - const int NbinNpar = 5; - const double BinsNpart[NbinNpar + 1] = {0., 29., 90., 202., 346., 400.}; - - //ptNpart - uhNpart = new TH1D("uhNpart", "uhNpart", NbinNpar, BinsNpart); - uhNpartj = new TH1D("uhNpartj", "uhNpartj", NbinNpar, BinsNpart); - uhNparth = new TH1D("uhNparth", "uhNparth", NbinNpar, BinsNpart); - - //ptNpart_db - uhNpart_db = new TH1D("uhNpart_db", "uhNpart_db", 400, 0., 400.); - uhNpartj_db = new TH1D("uhNpartj_db", "uhNpartj_db", 400, 0., 400.); - uhNparth_db = new TH1D("uhNparth_db", "uhNparth_db", 400, 0., 400.); - - //ptNpart - uhPtNpart = new TH1D("uhptNpart", "uhptNpart", NbinNpar, BinsNpart); - uhPtNpartj = new TH1D("uhptNpartj", "uhptNpartj", NbinNpar, BinsNpart); - uhPtNparth = new TH1D("uhptNparth", "uhptNparth", NbinNpar, BinsNpart); - - //ptNpart_db - uhPtNpart_db = new TH1D("uhptNpart_db", "uhptNpart_db", 400, 0., 400.); - uhPtNpartj_db = new TH1D("uhptNpartj_db", "uhptNpartj_db", 400, 0., 400.); - uhPtNparth_db = new TH1D("uhptNparth_db", "uhptNparth_db", 400, 0., 400.); - - //v2Npart - uhv2Npart = new TH1D("uhv2Npart", "uhv2Npart", NbinNpar, BinsNpart); - uhv2Npartj = new TH1D("uhv2Npartj", "uhv2Npartj", NbinNpar, BinsNpart); - uhv2Nparth = new TH1D("uhv2Nparth", "uhv2Nparth", NbinNpar, BinsNpart); - - //v2Npart_db - uhv2Npart_db = new TH1D("uhv2Npart_db", "uhv2Npart_db", 400, 0., 400.); - uhv2Npartj_db = new TH1D("uhv2Npartj_db", "uhv2Npartj_db", 400, 0., 400.); - uhv2Nparth_db = new TH1D("uhv2Nparth_db", "uhv2Nparth_db", 400, 0., 400.); - - //v0pt - uhv0pt = new TH1D("uhv0pt", "uhv0pt", nintV2pt, v2ptBins); - uhv0ptj = new TH1D("uhv0ptj", "uhv0ptj", nintV2pt, v2ptBins); - uhv0pth = new TH1D("uhv0pth", "uhv0pth", nintV2pt, v2ptBins); - - //v2pt - uhv2pt = new TH1D("uhv2pt", "uhv2pt", nintV2pt, v2ptBins); - uhv2ptj = new TH1D("uhv2ptj", "uhv2ptj", nintV2pt, v2ptBins); - uhv2pth = new TH1D("uhv2pth", "uhv2pth", nintV2pt, v2ptBins); - - uhv3pt = new TH1D("uhv3pt", "uhv3pt", nintV2pt, v2ptBins); - uhv4pt = new TH1D("uhv4pt", "uhv4pt", nintV2pt, v2ptBins); - uhv5pt = new TH1D("uhv5pt", "uhv5pt", nintV2pt, v2ptBins); - uhv6pt = new TH1D("uhv6pt", "uhv6pt", nintV2pt, v2ptBins); - - //v0pt - uhv0pt_db = new TH1D("uhv0pt_db", "uhv0pt_db", 200, 0.0, 10.); - uhv0ptj_db = new TH1D("uhv0ptj_db", "uhv0ptj_db", 200, 0.0, 10.); - uhv0pth_db = new TH1D("uhv0pth_db", "uhv0pth_db", 200, 0.0, 10.); - - //v2pt_db - uhv2pt_db = new TH1D("uhv2pt_db", "uhv2pt_db", 200, 0.0, 10.); - uhv2ptj_db = new TH1D("uhv2ptj_db", "uhv2ptj_db", 200, 0.0, 10.); - uhv2pth_db = new TH1D("uhv2pth_db", "uhv2pth_db", 200, 0.0, 10.); - - uhv3pt_db = new TH1D("uhv3pt_db", "uhv3pt_db", 200, 0.0, 10.); - uhv4pt_db = new TH1D("uhv4pt_db", "uhv4pt_db", 200, 0.0, 10.); - uhv5pt_db = new TH1D("uhv5pt_db", "uhv5pt_db", 200, 0.0, 10.); - uhv6pt_db = new TH1D("uhv6pt_db", "uhv6pt_db", 200, 0.0, 10.); - - //v0eta - uhv0eta = new TH1D("uhv0eta", "uhv0eta", nintV2eta, v2etaBins); - uhv0etaj = new TH1D("uhv0etaj", "uhv0etaj", nintV2eta, v2etaBins); - uhv0etah = new TH1D("uhv0etah", "uhv0etah", nintV2eta, v2etaBins); - - //v2eta - uhv2eta = new TH1D("uhv2eta", "uhv2eta", nintV2eta, v2etaBins); - uhv2etaj = new TH1D("uhv2etaj", "uhv2etaj", nintV2eta, v2etaBins); - uhv2etah = new TH1D("uhv2etah", "uhv2etah", nintV2eta, v2etaBins); - - uhv3eta = new TH1D("uhv3eta", "uhv3eta", nintV2eta, v2etaBins); - uhv4eta = new TH1D("uhv4eta", "uhv4eta", nintV2eta, v2etaBins); - uhv5eta = new TH1D("uhv5eta", "uhv5eta", nintV2eta, v2etaBins); - uhv6eta = new TH1D("uhv6eta", "uhv6eta", nintV2eta, v2etaBins); - - //v0eta_db - uhv0eta_db = new TH1D("uhv0eta_db", "uhv0eta_db", 200, -5, 5.); - uhv0etaj_db = new TH1D("uhv0etaj_db", "uhv0etaj_db", 200, -5, 5.); - uhv0etah_db = new TH1D("uhv0etah_db", "uhv0etah_db", 200, -5, 5.); - - //v2eta_db - uhv2eta_db = new TH1D("uhv2eta_db", "uhv2eta_db", 200, -5, 5.); - uhv2etaj_db = new TH1D("uhv2etaj_db", "uhv2etaj_db", 200, -5, 5.); - uhv2etah_db = new TH1D("uhv2etah_db", "uhv2etah_db", 200, -5, 5.); - - uhv3eta_db = new TH1D("uhv3eta_db", "uhv3eta_db", 200, -5, 5.); - uhv4eta_db = new TH1D("uhv4eta_db", "uhv4eta_db", 200, -5, 5.); - uhv5eta_db = new TH1D("uhv5eta_db", "uhv5eta_db", 200, -5, 5.); - uhv6eta_db = new TH1D("uhv6eta_db", "uhv6eta_db", 200, -5, 5.); - } - - dhpt = new TH1D("dhpt", "dhpt", 1000, 0.0000000000001, 100.); - dhpt_ch = new TH1D("dhpt_ch", "dhpt_ch", 1000, 0.0000000000001, 100.); - - dhphi = new TH1D("dhphi", "dhphi", 1000, -3.14159265358979, 3.14159265358979); - dhphi_ch = new TH1D("dhphi_ch", "dhphi_ch", 1000, -3.14159265358979, 3.14159265358979); - - dhv2pt = new TH1D("dhv2pt", "dhv2pt", 200, 0.0, 10.); - dhv0pt = new TH1D("dhv0pt", "dhv0pt", 200, 0.0, 10.); - - dhv2eta = new TH1D("dhv2eta", "dhv2eta", 200, -5, 5.); - dhv0eta = new TH1D("dhv0eta", "dhv0eta", 200, -5, 5.); - - dheta = new TH1D("dheta", "dheta", 1000, -10., 10.); - dheta_ch = new TH1D("dheta_ch", "dheta_ch", 1000, -10., 10.); - - hNev = new TH1D("hNev", "hNev", 1, 0., 2.); - } - - if (doAnalysis_) { - usesResource(TFileService::kSharedResource); - edm::Service f; - nt = f->make("nt", "Mixing Analysis", "mix:np:src:sig"); - hydjetTree_ = f->make("hi", "Tree of Hydjet Events"); - hydjetTree_->Branch("event", &hev_.event, "event/I"); - hydjetTree_->Branch("b", &hev_.b, "b/F"); - hydjetTree_->Branch("npart", &hev_.npart, "npart/F"); - hydjetTree_->Branch("ncoll", &hev_.ncoll, "ncoll/F"); - hydjetTree_->Branch("nhard", &hev_.nhard, "nhard/F"); - hydjetTree_->Branch("phi0", &hev_.phi0, "phi0/F"); - hydjetTree_->Branch("scale", &hev_.scale, "scale/F"); - hydjetTree_->Branch("n", hev_.n, "n[3]/I"); - hydjetTree_->Branch("ptav", hev_.ptav, "ptav[3]/F"); - if (doParticles_) { - hydjetTree_->Branch("mult", &hev_.mult, "mult/I"); - hydjetTree_->Branch("px", hev_.px, "px[mult]/F"); - hydjetTree_->Branch("py", hev_.py, "py[mult]/F"); - hydjetTree_->Branch("pz", hev_.pz, "pz[mult]/F"); - hydjetTree_->Branch("e", hev_.e, "e[mult]/F"); - hydjetTree_->Branch("pseudoRapidity", hev_.pseudoRapidity, "pseudoRapidity[mult]/F"); - hydjetTree_->Branch("pt", hev_.pt, "pt[mult]/F"); - hydjetTree_->Branch("eta", hev_.eta, "eta[mult]/F"); - hydjetTree_->Branch("phi", hev_.phi, "phi[mult]/F"); - hydjetTree_->Branch("pdg", hev_.pdg, "pdg[mult]/I"); - hydjetTree_->Branch("chg", hev_.chg, "chg[mult]/I"); - - hydjetTree_->Branch("vx", &hev_.vx, "vx/F"); - hydjetTree_->Branch("vy", &hev_.vy, "vy/F"); - hydjetTree_->Branch("vz", &hev_.vz, "vz/F"); - hydjetTree_->Branch("vr", &hev_.vr, "vr/F"); - } - } -} -// ------------ method called once each job just after ending the event loop ------------ -void HydjetAnalyzer::endJob() { - if (doHistos_) { - dhpt->Write(); - dheta->Write(); - dhphi->Write(); - dhv0pt->Write(); - dhv2pt->Write(); - dhv0eta->Write(); - dhv2eta->Write(); - - dhpt_ch->Write(); - dheta_ch->Write(); - hNev->Write(); - if (userHistos_) { - uhpt->Write(); - uhpth->Write(); - uhptj->Write(); - - uhpt_db->Write(); - uhpth_db->Write(); - uhptj_db->Write(); - - uhNpart->Write(); - uhNparth->Write(); - uhNpartj->Write(); - - uhNpart_db->Write(); - uhNparth_db->Write(); - uhNpartj_db->Write(); - - uhPtNpart->Write(); - uhPtNparth->Write(); - uhPtNpartj->Write(); - - uhPtNpart_db->Write(); - uhPtNparth_db->Write(); - uhPtNpartj_db->Write(); - - uhv2Npart->Write(); - uhv2Nparth->Write(); - uhv2Npartj->Write(); - - uhv2Npart_db->Write(); - uhv2Nparth_db->Write(); - uhv2Npartj_db->Write(); - - uheta->Write(); - uhetah->Write(); - uhetaj->Write(); - uhphi->Write(); - uhphih->Write(); - uhphij->Write(); - - uhv0eta->Write(); - uhv0etah->Write(); - uhv0etaj->Write(); - - uhv0eta_db->Write(); - uhv0etah_db->Write(); - uhv0etaj_db->Write(); - - uhv0pt->Write(); - uhv0pth->Write(); - uhv0ptj->Write(); - - uhv0pt_db->Write(); - uhv0pth_db->Write(); - uhv0ptj_db->Write(); - - uhv2eta->Write(); - uhv2etah->Write(); - uhv2etaj->Write(); - - uhv2eta_db->Write(); - uhv2etah_db->Write(); - uhv2etaj_db->Write(); - - uhv2pt->Write(); - uhv2pth->Write(); - uhv2ptj->Write(); - - uhv2pt_db->Write(); - uhv2pth_db->Write(); - uhv2ptj_db->Write(); - - uhv3eta->Write(); - uhv4eta->Write(); - uhv5eta->Write(); - uhv6eta->Write(); - - uhv3eta_db->Write(); - uhv4eta_db->Write(); - uhv5eta_db->Write(); - uhv6eta_db->Write(); - - uhv3pt->Write(); - uhv4pt->Write(); - uhv5pt->Write(); - uhv6pt->Write(); - - uhv3pt_db->Write(); - uhv4pt_db->Write(); - uhv5pt_db->Write(); - uhv6pt_db->Write(); - } - } -} -//define this as a plug-in -DEFINE_FWK_MODULE(HydjetAnalyzer); diff --git a/GeneratorInterface/HydjetInterface/test/testHydjet.py b/GeneratorInterface/HydjetInterface/test/testHydjet.py deleted file mode 100644 index 4f7a63d3e663f..0000000000000 --- a/GeneratorInterface/HydjetInterface/test/testHydjet.py +++ /dev/null @@ -1,72 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("ANA") - -process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") -process.load("Configuration.StandardSequences.Services_cff") -process.load("GeneratorInterface.HydjetInterface.hydjetDefault_cfi") - -process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService", - generator = cms.PSet( - initialSeed = cms.untracked.uint32(123456789), - engineName = cms.untracked.string('HepJamesRandom') - ) -) - -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(100) - ) - -process.ana = cms.EDAnalyzer('HydjetAnalyzer', - - doHistos = cms.untracked.bool(True), - userHistos = cms.untracked.bool(False), - - # Settings for USER histos - - uStatus = cms.untracked.int32(2), # 1 - it's 1,2,3,4,5 of Pythia status; 2 - 11,12,13,14,15; 3 - All - uPDG_1 = cms.untracked.int32(443), - uPDG_2 = cms.untracked.int32(-443), - - ### Eta cut for pT dep. dist. - uPTetaCut = cms.untracked.double(4.), - dPTetaCut = cms.untracked.double(2.5), - - ### Vectors of bins borders (when 0 - uniform bins would be used) - PtBins = cms.untracked.vdouble(0.,1.,2.,3.,4.,5.,6.,8.,12.,16.,20.), - EtaBins = cms.untracked.vdouble(0.), - PhiBins = cms.untracked.vdouble(0.), - v2EtaBins = cms.untracked.vdouble(0.), - v2PtBins = cms.untracked.vdouble(0.,1.,2.,3.,4.,6.,8.,12.,16.,20.), - - ### Settings for uniform bins - nintPt = cms.untracked.int32(1000), - nintEta = cms.untracked.int32(100), - nintPhi = cms.untracked.int32(100), - nintV2pt = cms.untracked.int32(100), - nintV2eta = cms.untracked.int32(100), - - minPt = cms.untracked.double(0.), - minEta = cms.untracked.double(-10.), - minPhi = cms.untracked.double(-3.14159265358979), - minV2pt = cms.untracked.double(0.), - minV2eta = cms.untracked.double(-10.), - - maxPt = cms.untracked.double(100.), - maxEta = cms.untracked.double(10.), - maxPhi = cms.untracked.double(3.14159265358979), - maxV2pt = cms.untracked.double(10.), - maxV2eta = cms.untracked.double(10.), - -) - - -#process.generator.signalVtx = cms.untracked.vdouble(0.,0.,0.,0.) # Signal event vertex option, to set it by hand (instead of smearing) - -process.TFileService = cms.Service('TFileService', - fileName = cms.string('Hydjet1_MB_5020GeV.root') -) - -process.p = cms.Path(process.generator*process.ana) - - From fdc972c735dda6c116425563a95f3088fb7ae386 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Tue, 19 Apr 2022 15:25:50 +0200 Subject: [PATCH 2/2] Missed one reference --- .../PyquenInterface/test/pyquenEcalTrig.py | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 GeneratorInterface/PyquenInterface/test/pyquenEcalTrig.py diff --git a/GeneratorInterface/PyquenInterface/test/pyquenEcalTrig.py b/GeneratorInterface/PyquenInterface/test/pyquenEcalTrig.py deleted file mode 100644 index df7ceed9bc237..0000000000000 --- a/GeneratorInterface/PyquenInterface/test/pyquenEcalTrig.py +++ /dev/null @@ -1,32 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("ANA") - -process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi") -process.load("Configuration.StandardSequences.Services_cff") - -process.load("GeneratorInterface.PyquenInterface.pyquenEcalTrig_cfi") - - -process.source = cms.Source("EmptySource") - -process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10) - ) - -process.SimpleMemoryCheck = cms.Service('SimpleMemoryCheck', - ignoreTotal=cms.untracked.int32(0), - oncePerEventMode = cms.untracked.bool(False) - ) - -process.ana = cms.EDAnalyzer('HydjetAnalyzer' - ) - -process.TFileService = cms.Service('TFileService', - fileName = cms.string('treefile.root') - ) - -process.p = cms.Path(process.generator*process.ana) - - - -