Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:59

0001 #----------------------------------------------------------------------------------------------------
0002 # utility functions
0003 
0004 def SetSmearingLevel1(obj):
0005   obj.vtxStddevX = 0E-4
0006   obj.vtxStddevZ = 0
0007 
0008   obj.beamDivX45 = 0E-6
0009   obj.beamDivX56 = 0E-6
0010   obj.beamDivY45 = 0E-6
0011   obj.beamDivY56 = 0E-6
0012 
0013 def SetLevel1(process):
0014   SetSmearingLevel1(process.ctppsBeamParametersFromLHCInfoESSource)
0015 
0016   process.ppsDirectProtonSimulation.roundToPitch = False
0017 
0018 def SetSmearingLevel2(obj):
0019   obj.beamDivX45 = 0E-6
0020   obj.beamDivX56 = 0E-6
0021   obj.beamDivY45 = 0E-6
0022   obj.beamDivY56 = 0E-6
0023 
0024 def SetLevel2(process):
0025   SetSmearingLevel2(process.ctppsBeamParametersFromLHCInfoESSource)
0026 
0027   process.ppsDirectProtonSimulation.roundToPitch = False
0028 
0029 def SetLevel3(process):
0030   process.ppsDirectProtonSimulation.roundToPitch = False
0031 
0032 def SetLevel4(process):
0033   pass
0034 
0035 def SetLowTheta(process):
0036   process.generator.theta_x_sigma = 0E-6
0037   process.generator.theta_y_sigma = 0E-6
0038 
0039 def SetLargeTheta(process):
0040   pass
0041 
0042 def UseConstantXangleBetaStar(process, xangle, betaStar):
0043   for p in ctppsCompositeESSource.periods:
0044     p.ctppsLHCInfo.xangle = xangle
0045     p.ctppsLHCInfo.betaStar = betaStar
0046 
0047 def UseXangleBetaStarHistogram(process, f="", obj=""):
0048   for p in ctppsCompositeESSource.periods:
0049     p.ctppsLHCInfo.xangle = -1 # negative value indicates to use the xangle/beta* histogram
0050 
0051     if f:
0052       p.ctppsLHCInfo.xangleBetaStarHistogramFile = f
0053     if obj:
0054       p.ctppsLHCInfo.xangleBetaStarHistogramObject = obj
0055