Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HL-LHC Beamspot in CMSSW 81X #15936

Merged
merged 8 commits into from Oct 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion Configuration/AlCa/python/GlobalTag.py
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
import sys

def checkPrefix(mainList, inputGTParams):
""" Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match
Expand Down Expand Up @@ -67,7 +68,8 @@ def GlobalTag(essource = None, globaltag = None, conditions = None):
globaltag = globaltag[5:]
if globaltag not in autoCond:
raise Exception('no correspondence for '+globaltag+'\navailable keys are\n'+','.join(autoCond.keys()))

if 'upgradePLS3' == globaltag:
sys.stderr.write('Warning: %s now points to %s, instead of POSTLS262_V1'%(globaltag,autoCond[globaltag]))
autoKey = autoCond[globaltag]
if isinstance(autoKey, tuple) or isinstance(autoKey, list):
globaltag = autoKey[0]
Expand All @@ -85,6 +87,7 @@ def GlobalTag(essource = None, globaltag = None, conditions = None):
else:
globaltag = autoKey


# if a GlobalTag globaltag is given or loaded from autoCond.py, check for optional connection string and pfn prefix
globaltag = globaltag.split(',')
if len(globaltag) > 0 :
Expand Down
6 changes: 2 additions & 4 deletions Configuration/AlCa/python/autoCond.py
Expand Up @@ -37,14 +37,12 @@
'run2_hlt_hi' : '81X_dataRun2_HLTHI_frozen_v2',
# GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2017
'phase1_2017_design' : '81X_upgrade2017_design_Candidate_2016_10_05_11_42_10',
# GlobalTag for MC production with realistic conditions for for Phase1 2017 detector
# GlobalTag for MC production with realistic conditions for Phase1 2017 detector
'phase1_2017_realistic': '81X_upgrade2017_realistic_Candidate_2016_10_05_11_41_20',
# Global Tag for MC production with development HCAL conditions for Phase1 2017 detector
'phase1_2017_hcaldev' : '81X_upgrade2017_HCALdev_Candidate_2016_10_05_11_20_17',
# GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2019
'phase1_2019_design' : 'DES19_70_V2', # placeholder (GT not meant for standard RelVal)
# GlobalTag for MC production with perfectly aligned and calibrated detector for Phase2
'phase2_design' : 'POSTLS262_V1', # placeholder (GT not meant for standard RelVal)
# GlobalTag for MC production with realistic conditions for Phase2 2023
'phase2_realistic' : '81X_upgrade2023_realistic_v1'
}
Expand Down Expand Up @@ -76,4 +74,4 @@
autoCond['upgradePLS150ns'] = ( autoCond['run2_mc_50ns'] )
autoCond['upgrade2017'] = ( autoCond['phase1_2017_design'] )
autoCond['upgrade2019'] = ( autoCond['phase1_2019_design'] )
autoCond['upgradePLS3'] = ( autoCond['phase2_design'] )
autoCond['upgradePLS3'] = ( autoCond['phase2_realistic'] )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @lgray I was wondering if there is a way of letting all these people here: https://github.com/cms-sw/cmssw/search?p=1&q=upgradePLS3&type=Code&utf8=%E2%9C%93 know that the content of their conditions is suddenly not the one they had used to have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will put in a print/warning statement in the python.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this printout should get removed in a month or so..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd propose to remove it before 8_1_0. I can take care of that once preparing the GTs for it.

12 changes: 12 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Expand Up @@ -1681,6 +1681,18 @@ def lhegensim(fragment,howMuch):
}
if cust!=None : upgradeStepDict['GenSimHLBeamSpotFull'][k]['--customise']=cust
if era is not None: upgradeStepDict['GenSimHLBeamSpotFull'][k]['--era']=era

upgradeStepDict['GenSimHLBeamSpotFull14'][k]= {'-s' : 'GEN,SIM',
'-n' : 10,
'--conditions' : gt,
'--beamspot' : 'HLLHC14TeV',
'--datatier' : 'GEN-SIM',
'--eventcontent': 'FEVTDEBUG',
'--geometry' : geom
}

if cust!=None : upgradeStepDict['GenSimHLBeamSpotFull14'][k]['--customise']=cust
if era is not None: upgradeStepDict['GenSimHLBeamSpotFull14'][k]['--era']=era
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this proposes to maintain two beamspots in the long term, or do you see switching to the HL-LHC one? (trying to avoid scenario explosions)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidlange6 This proposes two beamspots, both are HL-LHC beamspots but consistent with the COM energies of the samples (13 and 14 TeV, respectively). The distinction is made here since there are differences in the beamspot depending on the beam kinematics.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

people are planning to study 13 and 14 tev sometime soon? Ok...guess that means we can validate once and then pick on for normal validation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I just did this to make sure a physically consistent beamspot was always used given that the mix of 13 and 14 TeV workflows was already there (just take a look at runTheMatrix.py -w upgrade -n).


upgradeStepDict['DigiFull'][k] = {'-s':'DIGI:pdigi_valid,L1,DIGI2RAW,HLT:@fake',
'--conditions':gt,
Expand Down
4 changes: 3 additions & 1 deletion Configuration/PyReleaseValidation/python/relval_upgrade.py
Expand Up @@ -25,8 +25,10 @@
for frag in upgradeFragments:
k=frag[:-4]+'_'+key
stepList=[]
for step in upgradeProperties[year][key]['ScenToRun']:
for step in upgradeProperties[year][key]['ScenToRun']:
if 'Sim' in step:
if 'HLBeamSpotFull' in step and '14TeV' in frag:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should not be here. let me remember where it should go.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the only way to do it since all combinations of upgrade workflows are made and then everything is sorted out in the end. Especially since we have 14 TeV wfs mixed with 13 TeV wfs. Don't see a nicer way to do it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok- i see whats needed to clean this up - will attempt it next week

step = 'GenSimHLBeamSpotFull14'
stepList.append(k+'_'+step)
else:
stepList.append(step+'_'+key)
Expand Down
Expand Up @@ -36,6 +36,7 @@
upgradeSteps=[
'GenSimFull',
'GenSimHLBeamSpotFull',
'GenSimHLBeamSpotFull14',
'DigiFull',
'RecoFullLocal',
'RecoFullLocalPU',
Expand Down Expand Up @@ -91,38 +92,38 @@
upgradeProperties[2023] = {
'2023D1' : {
'Geom' : 'Extended2023D1',
'GT' : 'auto:run2_mc',
'GT' : 'auto:phase2_realistic',
'Custom' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2023tilted',
'Era' : 'Phase2C1',
'ScenToRun' : ['GenSimFull','DigiFull','RecoFullGlobal','HARVESTFullGlobal'],
'ScenToRun' : ['GenSimHLBeamSpotFull','DigiFull','RecoFullGlobal','HARVESTFullGlobal'],
},
'2023D2' : {
'Geom' : 'Extended2023D2',
'GT' : 'auto:run2_mc',
'GT' : 'auto:phase2_realistic',
'Custom' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2023flat',
'Era' : 'Phase2C1',
'ScenToRun' : ['GenSimFull','DigiFull','RecoFullGlobal','HARVESTFullGlobal'],
'ScenToRun' : ['GenSimHLBeamSpotFull','DigiFull','RecoFullGlobal','HARVESTFullGlobal'],
},
'2023D3' : {
'Geom' : 'Extended2023D3',
'GT' : 'auto:run2_mc',
'GT' : 'auto:phase2_realistic',
'Custom' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2023tilted',
'Era' : 'Phase2C2',
'ScenToRun' : ['GenSimFull','DigiFull','RecoFullGlobal', 'HARVESTFullGlobal'],
'ScenToRun' : ['GenSimHLBeamSpotFull','DigiFull','RecoFullGlobal', 'HARVESTFullGlobal'],
},
'2023D4' : {
'Geom' : 'Extended2023D4',
'GT' : 'auto:run2_mc',
'GT' : 'auto:phase2_realistic',
'Custom' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2023tilted4021',
'Era' : 'Phase2C2',
'ScenToRun' : ['GenSimFull','DigiFull','RecoFullLocal'],
'ScenToRun' : ['GenSimHLBeamSpotFull','DigiFull','RecoFullLocal'],
},
'2023D5' : {
'Geom' : 'Extended2023D5',
'GT' : 'auto:run2_mc',
'GT' : 'auto:phase2_realistic',
'Custom' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2023tilted',
'Era' : 'Phase2C2_timing',
'ScenToRun' : ['GenSimFull','DigiFull','RecoFullGlobal', 'HARVESTFullGlobal'],
'ScenToRun' : ['GenSimHLBeamSpotFull','DigiFull','RecoFullGlobal', 'HARVESTFullGlobal'],
}
}

Expand All @@ -140,15 +141,15 @@

#standard PU sequences
upgradeProperties[2023]['2023D1PU'] = deepcopy(upgradeProperties[2023]['2023D1'])
upgradeProperties[2023]['2023D1PU']['ScenToRun'] = ['GenSimFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']
upgradeProperties[2023]['2023D1PU']['ScenToRun'] = ['GenSimHLBeamSpotFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']
upgradeProperties[2023]['2023D2PU'] = deepcopy(upgradeProperties[2023]['2023D2'])
upgradeProperties[2023]['2023D2PU']['ScenToRun'] = ['GenSimFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']
upgradeProperties[2023]['2023D2PU']['ScenToRun'] = ['GenSimHLBeamSpotFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']
upgradeProperties[2023]['2023D3PU'] = deepcopy(upgradeProperties[2023]['2023D3'])
upgradeProperties[2023]['2023D3PU']['ScenToRun'] = ['GenSimFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']
upgradeProperties[2023]['2023D3PU']['ScenToRun'] = ['GenSimHLBeamSpotFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']
upgradeProperties[2023]['2023D4PU'] = deepcopy(upgradeProperties[2023]['2023D4'])
upgradeProperties[2023]['2023D4PU']['ScenToRun'] = ['GenSimFull','DigiFullPU','RecoFullLocalPU']
upgradeProperties[2023]['2023D4PU']['ScenToRun'] = ['GenSimHLBeamSpotFull','DigiFullPU','RecoFullLocalPU']
upgradeProperties[2023]['2023D5PU'] = deepcopy(upgradeProperties[2023]['2023D5'])
upgradeProperties[2023]['2023D5PU']['ScenToRun'] = ['GenSimFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']
upgradeProperties[2023]['2023D5PU']['ScenToRun'] = ['GenSimHLBeamSpotFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU']

#Timing PU (for now copy ScenToRun of standard PU)
upgradeProperties[2023]['2023D1TimingPU'] = deepcopy(upgradeProperties[2023]['2023D1Timing'])
Expand Down
3 changes: 3 additions & 0 deletions Configuration/StandardSequences/python/VtxSmeared.py
Expand Up @@ -35,6 +35,9 @@
'Run2PPbBoost': 'GeneratorInterface.HiGenCommon.VtxSmearedPPbBoost_cff',
'Run2PbPBoost': 'GeneratorInterface.HiGenCommon.VtxSmearedPbPBoost_cff',
'HLLHC' : 'IOMC.EventVertexGenerators.VtxSmearedHLLHC_cfi',
'HLLHC14TeV' : 'IOMC.EventVertexGenerators.VtxSmearedHLLHC14TeV_cfi',
'HLLHC_CK' : 'IOMC.EventVertexGenerators.VtxSmearedHLLHCCrabKissing_cfi',
'HLLHC_CK14TeV' : 'IOMC.EventVertexGenerators.VtxSmearedHLLHCCrabKissing14TeV_cfi',
'ShiftedCollision2015' : 'IOMC.EventVertexGenerators.VtxSmearedShiftedCollision2015_cfi',
'Shifted5mmCollision2015' : 'IOMC.EventVertexGenerators.VtxSmearedShifted5mmCollision2015_cfi',
'Shifted15mmCollision2015' : 'IOMC.EventVertexGenerators.VtxSmearedShifted15mmCollision2015_cfi',
Expand Down
115 changes: 115 additions & 0 deletions IOMC/EventVertexGenerators/interface/HLLHCEvtVtxGenerator.h
@@ -0,0 +1,115 @@
#ifndef IOMC_HLLHCEvtVtxGenerator_H
#define IOMC_HLLHCEvtVtxGenerator_H

/**
* Generate event vertices given beams sizes, crossing angle
* offset, and crab rotation.
* Attention: All values are assumed to be mm for spatial coordinates
* and ns for time.
* Attention: This class fix the the vertex time generation of HLLHCEvtVtxGenerator
*
* $Id: HLLHCEvtVtxGenerator_Fix.h,v 1.0 2015/03/15 10:34:38 Exp $
*/

#include "IOMC/EventVertexGenerators/interface/BaseEvtVtxGenerator.h"

#include <string>

namespace CLHEP {
class RandFlat;
}

namespace edm {
class ConfigurationDescriptions;
}

class HLLHCEvtVtxGenerator : public BaseEvtVtxGenerator
{
public:

HLLHCEvtVtxGenerator(const edm::ParameterSet & p);

virtual ~HLLHCEvtVtxGenerator();

static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);

/// return a new event vertex
virtual HepMC::FourVector* newVertex(CLHEP::HepRandomEngine*) ;

virtual TMatrixD* GetInvLorentzBoost() {return 0;};

private:
/** Copy constructor */
HLLHCEvtVtxGenerator(const HLLHCEvtVtxGenerator &p);

/** Copy assignment operator */
HLLHCEvtVtxGenerator& operator = (const HLLHCEvtVtxGenerator & rhs );

//spatial and time offset for mean collision
double fMeanX, fMeanY, fMeanZ, fTimeOffset;

//proton beam energy
double fEproton;

//half crossing angle
double fTheta;

//crab rotation in crossing plane
double fAlphax;

//crab frequence in crossing plane
double fOmegax;

//normalized emmittance in crossing plane
double fEpsilonx;

//beta function in crossing plane
double fBetax;

//crab rotation in parallel plane
double fAlphay;

//crab frequence in parallel plane
double fOmegay;

//normalized emmittance parallel plane
double fEpsilony;

//beta function in parallel plane
double fBetay;

//longitudinal bunch size
double fZsize;

//longitudinal beam profile
std::string fProfile;
// fProfile is one of:
// "Gaussian" and then fZsize is the width of the gaussian
// "Flat" and then fZsize is the half length of the bunch.

struct lhcbeamparams {

double betagamma;
double theta;
double alphax;
double omegax;
double epsilonx;
double betax;
double alphay;
double omegay;
double epsilony;
double betay;
double zsize;
std::string beamprofile;
};

double p1(double x, double y, double z, double t, const lhcbeamparams& par);

double p2(double x, double y, double z, double t, const lhcbeamparams& par);

double sigma(double z, double epsilon, double beta, double betagamma);

double rhoz(double z, const lhcbeamparams& par);
};

#endif
11 changes: 11 additions & 0 deletions IOMC/EventVertexGenerators/python/VtxSmearedHLLHC14TeV_cfi.py
@@ -0,0 +1,11 @@
import FWCore.ParameterSet.Config as cms

from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
HLLHCVtxSmearingParameters14TeV = HLLHCVtxSmearingParameters.clone( EprotonInGeV = cms.double(7000) )
VtxSmeared = cms.EDProducer("HLLHCEvtVtxGenerator",
HLLHCVtxSmearingParameters14TeV,
VtxSmearedCommon
)



@@ -0,0 +1,9 @@
import FWCore.ParameterSet.Config as cms

from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
HLLHCCrabKissingVtxSmearingParameters14TeV=HLLHCCrabKissingVtxSmearingParameters.clone(EprotonInGeV = cms.double(7000.0))
VtxSmeared = cms.EDProducer("HLLHCEvtVtxGenerator",
HLLHCCrabKissingVtxSmearingParameters14TeV,
VtxSmearedCommon
)

@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms

from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
VtxSmeared = cms.EDProducer("HLLHCEvtVtxGenerator",
HLLHCCrabKissingVtxSmearingParameters,
VtxSmearedCommon
)

10 changes: 10 additions & 0 deletions IOMC/EventVertexGenerators/python/VtxSmearedHLLHC_cfi.py
@@ -0,0 +1,10 @@
import FWCore.ParameterSet.Config as cms

from IOMC.EventVertexGenerators.VtxSmearedParameters_cfi import *
VtxSmeared = cms.EDProducer("HLLHCEvtVtxGenerator",
HLLHCVtxSmearingParameters,
VtxSmearedCommon
)



40 changes: 40 additions & 0 deletions IOMC/EventVertexGenerators/python/VtxSmearedParameters_cfi.py
Expand Up @@ -612,3 +612,43 @@
Y0 = cms.double(0.1676),
Z0 = cms.double(0.6707)
)

# Parameters for HL-LHC operation at 13TeV
HLLHCVtxSmearingParameters = cms.PSet(
MeanXIncm = cms.double(0.),
MeanYIncm = cms.double(0.),
MeanZIncm = cms.double(0.),
TimeOffsetInns = cms.double(0.0),
EprotonInGeV = cms.double(6500.0),
HalfCrossingAngleInurad = cms.double(295.0),
CrabAngleCrossingPlaneInurad = cms.double(295.0),
CrabFrequencyCrossingPlaneInMHz = cms.double(400.0),
NormalizedEmittanceCrossingPlaneInum = cms.double(2.5),
BetaStarCrossingPlaneInm = cms.double(0.15),
CrabAngleParallelPlaneInurad = cms.double(0.0),
CrabFrequencyParallelPlaneInMHz = cms.double(400.0),
NormalizedEmittanceParallelPlaneInum = cms.double(2.5),
BetaStarParallelPlaneInm = cms.double(0.15),
ZsizeInm = cms.double(0.075),
BeamProfile=cms.string("Gauss")
)

# Parameters for HL-LHC Crab-kissing operation 13 TeV
HLLHCCrabKissingVtxSmearingParameters = cms.PSet(
MeanXIncm = cms.double(0.),
MeanYIncm = cms.double(0.),
MeanZIncm = cms.double(0.),
TimeOffsetInns = cms.double(0.0),
EprotonInGeV = cms.double(6500.0),
HalfCrossingAngleInurad = cms.double(200.0),
CrabAngleCrossingPlaneInurad = cms.double(200.0),
CrabFrequencyCrossingPlaneInMHz = cms.double(400.0),
NormalizedEmittanceCrossingPlaneInum = cms.double(2.5),
BetaStarCrossingPlaneInm = cms.double(0.30),
CrabAngleParallelPlaneInurad = cms.double(100.0),
CrabFrequencyParallelPlaneInMHz = cms.double(400.0),
NormalizedEmittanceParallelPlaneInum = cms.double(2.5),
BetaStarParallelPlaneInm = cms.double(0.075),
ZsizeInm = cms.double(0.15),
BeamProfile=cms.string("Flat")
)