Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:46:09

0001 ###############################################################
0002 # 
0003 # Configuration blocks for the TrajectoryFactories inheriting 
0004 # from TrajectoryFactoryBase.
0005 # Include this file and do e.g.
0006 # TrajectoryFactory = cms.PSet( ReferenceTrajectoryFactory)
0007 # 
0008 ###############################################################
0009 
0010 import FWCore.ParameterSet.Config as cms
0011 
0012 ###############################################################
0013 #
0014 # Common to all TrajectoryFactories
0015 #
0016 ###############################################################
0017 __muonMass = cms.double(0.10565836)
0018 
0019 TrajectoryFactoryBase = cms.PSet(
0020     PropagationDirection = cms.string('alongMomentum'), ## or "oppositeToMomentum" or "anyDirection"
0021     MaterialEffects = cms.string('Combined'), ## or "MultipleScattering" or "EnergyLoss" or "None"
0022                                               ## (see others at 'BrokenLinesTrajectoryFactory')
0023     UseProjectedHits = cms.bool(True), ## if false, projected hits are skipped
0024     UseInvalidHits = cms.bool(False), ## if false, invalid hits are skipped
0025     UseHitWithoutDet = cms.bool(True), ## if false, RecHits that are not attached to GeomDets are skipped
0026     UseBeamSpot = cms.bool(False), ## if true, the beam spot is used as a constraint via a virtual TTRecHit
0027     IncludeAPEs = cms.bool(False), ## if true, the APEs are included in the hit error
0028     AllowZeroMaterial = cms.bool(False) # if true, exceptions due to singular scatter matrices are suppressed
0029 )
0030 
0031 ###############################################################
0032 #
0033 # ReferenceTrajectoryFactory
0034 #
0035 ###############################################################
0036 ReferenceTrajectoryFactory = cms.PSet(
0037     TrajectoryFactoryBase,
0038     ParticleMass = __muonMass,
0039     TrajectoryFactoryName = cms.string('ReferenceTrajectoryFactory'),
0040     UseBzeroIfFieldOff = cms.bool(True), # if true, use BzeroReferenceTrajectory if B == 0
0041     MomentumEstimateFieldOff = cms.double(10.) # used if useBzeroIfFieldOff == True
0042 
0043 )
0044 
0045 ###############################################################
0046 #
0047 # BzeroReferenceTrajectoryFactory
0048 #
0049 ###############################################################
0050 BzeroReferenceTrajectoryFactory = cms.PSet(
0051     TrajectoryFactoryBase,
0052     ParticleMass = __muonMass,
0053     TrajectoryFactoryName = cms.string('BzeroReferenceTrajectoryFactory'),
0054     MomentumEstimate = cms.double(10.0)
0055 )
0056 
0057 ###############################################################
0058 #
0059 # DualTrajectoryFactory
0060 #
0061 ###############################################################
0062 DualTrajectoryFactory = cms.PSet(
0063     TrajectoryFactoryBase,
0064     ParticleMass = __muonMass,
0065     TrajectoryFactoryName = cms.string('DualTrajectoryFactory')
0066 )
0067 
0068 ###############################################################
0069 #
0070 # DualBzeroTrajectoryFactory
0071 #
0072 ###############################################################
0073 DualBzeroTrajectoryFactory = cms.PSet(
0074     TrajectoryFactoryBase,
0075     ParticleMass = __muonMass,
0076     TrajectoryFactoryName = cms.string('DualBzeroTrajectoryFactory'),
0077     MomentumEstimate = cms.double(10.0)
0078 )
0079 
0080 ###############################################################
0081 #
0082 # TwoBodyDecayReferenceTrajectoryFactory
0083 #
0084 ###############################################################
0085 TwoBodyDecayTrajectoryFactory = cms.PSet(
0086     TrajectoryFactoryBase,
0087     NSigmaCut = cms.double(100.0),
0088     Chi2Cut = cms.double(10000.0),
0089     ParticleProperties = cms.PSet(
0090         PrimaryMass = cms.double(91.1876),
0091         PrimaryWidth = cms.double(2.4952),
0092         SecondaryMass = cms.double(0.105658)
0093     ),
0094     ConstructTsosWithErrors = cms.bool(False),
0095     UseRefittedState = cms.bool(True),
0096     EstimatorParameters = cms.PSet(
0097         MaxIterationDifference = cms.untracked.double(0.01),
0098         RobustificationConstant = cms.untracked.double(1.0),
0099         MaxIterations = cms.untracked.int32(100),
0100         UseInvariantMass = cms.untracked.bool(True)
0101     ),
0102     TrajectoryFactoryName = cms.string('TwoBodyDecayTrajectoryFactory')
0103 )
0104 
0105 ###############################################################
0106 #
0107 # CombinedTrajectoryFactory using an instance of TwoBodyDecayTrajectoryFactory
0108 # and ReferenceTrajectoryFactory, taking the first successful.
0109 #
0110 ###############################################################
0111 CombinedTrajectoryFactory = cms.PSet(
0112     TrajectoryFactoryBase, # will not be used!
0113     TrajectoryFactoryName = cms.string('CombinedTrajectoryFactory'),
0114     # look for PSets called TwoBody and Reference:
0115     TrajectoryFactoryNames = cms.vstring(
0116         'TwoBodyDecayTrajectoryFactory,TwoBody',  # look for PSet called TwoBody
0117         'ReferenceTrajectoryFactory,Reference'),  # look for PSet called Reference
0118     useAllFactories = cms.bool(False),
0119     # now one PSet for each of the configured trajectories:
0120     TwoBody = cms.PSet( # FIXME: better by reference?
0121         TwoBodyDecayTrajectoryFactory
0122     ),
0123     Reference = cms.PSet( # FIXME: better by reference?
0124         ReferenceTrajectoryFactory
0125     )
0126 )
0127 ###############################################################
0128 #
0129 # CombinedTrajectoryFactory using two instances of BzeroReferenceTrajectoryFactory,
0130 # one propagating alongMomentum, one oppositeToMomentum.
0131 #
0132 ###############################################################
0133 # First a helper object, where I'd like to do:
0134 #BwdBzeroReferenceTrajectoryFactory = BzeroReferenceTrajectoryFactory.clone(PropagationDirection = 'oppositeToMomentum')
0135 # Since there is no clone in cms.PSet (yet?), but clone is needed for python that works by reference, 
0136 # take solution from https://hypernews.cern.ch/HyperNews/CMS/get/swDevelopment/1890/1.html:
0137 import copy
0138 BwdBzeroReferenceTrajectoryFactory = copy.deepcopy(BzeroReferenceTrajectoryFactory)
0139 BwdBzeroReferenceTrajectoryFactory.PropagationDirection = 'oppositeToMomentum'
0140 # now the PSet
0141 CombinedFwdBwdBzeroTrajectoryFactory = cms.PSet(
0142     TrajectoryFactoryBase, # will not be used!
0143     TrajectoryFactoryName = cms.string('CombinedTrajectoryFactory'),
0144 
0145     TrajectoryFactoryNames = cms.vstring(
0146         'BzeroReferenceTrajectoryFactory,FwdBzero',  # look for PSet called FwdBzero
0147         'BzeroReferenceTrajectoryFactory,BwdBzero'), # look for PSet called BwdBzero
0148     useAllFactories = cms.bool(True),
0149     
0150     # now one PSet for each of the configured trajectories:
0151     FwdBzero = cms.PSet(BzeroReferenceTrajectoryFactory), # FIXME: better by reference?
0152     BwdBzero = cms.PSet(BwdBzeroReferenceTrajectoryFactory) # FIXME: better by reference?
0153 )
0154 
0155 ###############################################################
0156 #
0157 # CombinedTrajectoryFactory using three ReferenceTrajectories:
0158 # - two instances of BzeroReferenceTrajectoryFactory,
0159 #   one propagating alongMomentum, one oppositeToMomentum,
0160 # - a DualBzeroTrajectory to start in the middle.
0161 #
0162 ###############################################################
0163 CombinedFwdBwdDualBzeroTrajectoryFactory = cms.PSet(
0164     TrajectoryFactoryBase, # will not be used!
0165     TrajectoryFactoryName = cms.string('CombinedTrajectoryFactory'),
0166 
0167     TrajectoryFactoryNames = cms.vstring(
0168         'BzeroReferenceTrajectoryFactory,FwdBzero',  # look for PSet called FwdBzero
0169         'BzeroReferenceTrajectoryFactory,BwdBzero',  # look for PSet called BwdBzero
0170         'DualBzeroTrajectoryFactory,DualBzero'),     # look for PSet called DualBzero
0171     useAllFactories = cms.bool(True),
0172 
0173     # now one PSet for each of the configured trajectories:
0174     FwdBzero  = cms.PSet(BzeroReferenceTrajectoryFactory), # FIXME: better by reference?
0175     BwdBzero  = cms.PSet(BwdBzeroReferenceTrajectoryFactory), # defined above for CombinedFwdBwdBzeroTrajectoryFactory  # FIXME: better by reference?
0176     DualBzero = cms.PSet(DualBzeroTrajectoryFactory) # FIXME: better by reference?
0177 )
0178 
0179 
0180 ###############################################################
0181 #
0182 # CombinedTrajectoryFactory using two instances of ReferenceTrajectoryFactory,
0183 # one propagating alongMomentum, one oppositeToMomentum.
0184 #
0185 ###############################################################
0186 # First a helper object, see above for CombinedFwdBwdBzeroTrajectoryFactory:
0187 BwdReferenceTrajectoryFactory = copy.deepcopy(ReferenceTrajectoryFactory)
0188 BwdReferenceTrajectoryFactory.PropagationDirection = 'oppositeToMomentum'
0189 # now the PSet
0190 CombinedFwdBwdTrajectoryFactory = cms.PSet(
0191     TrajectoryFactoryBase, # will not be used!
0192     TrajectoryFactoryName = cms.string('CombinedTrajectoryFactory'),
0193 
0194     TrajectoryFactoryNames = cms.vstring(
0195         'ReferenceTrajectoryFactory,Fwd',  # look for PSet called Fwd
0196         'ReferenceTrajectoryFactory,Bwd'), # look for PSet called Bwd
0197     useAllFactories = cms.bool(True),
0198     
0199     # now one PSet for each of the configured trajectories:
0200     Fwd = cms.PSet(ReferenceTrajectoryFactory), # FIXME: better by reference?
0201     Bwd = cms.PSet(BwdReferenceTrajectoryFactory)  # FIXME: better by reference?
0202 )
0203 
0204 ###############################################################
0205 #
0206 # CombinedTrajectoryFactory using three ReferenceTrajectories:
0207 # - two instances of ReferenceTrajectoryFactory,
0208 #   one propagating alongMomentum, one oppositeToMomentum,
0209 # - a DualTrajectory to start in the middle.
0210 #
0211 ###############################################################
0212 CombinedFwdBwdDualTrajectoryFactory = cms.PSet(
0213     TrajectoryFactoryBase, # will not be used!
0214     TrajectoryFactoryName = cms.string('CombinedTrajectoryFactory'),
0215 
0216     TrajectoryFactoryNames = cms.vstring(
0217         'ReferenceTrajectoryFactory,Fwd',  # look for PSet called Fwd
0218         'ReferenceTrajectoryFactory,Bwd',  # look for PSet called Bwd
0219         'DualTrajectoryFactory,Dual'),     # look for PSet called Dual
0220     useAllFactories = cms.bool(True),
0221 
0222     # now one PSet for each of the configured trajectories:
0223     Fwd  = cms.PSet(ReferenceTrajectoryFactory),  # FIXME: better by reference?
0224     Bwd  = cms.PSet(BwdReferenceTrajectoryFactory), # defined above for CombinedFwdBwdTrajectoryFactory # FIXME: better by reference?
0225     Dual = cms.PSet(DualTrajectoryFactory) # FIXME: better by reference?
0226 )
0227 
0228 ###############################################################
0229 #
0230 # ReferenceTrajectoryFactory with BrokenLines
0231 #
0232 ###############################################################
0233 BrokenLinesTrajectoryFactory = ReferenceTrajectoryFactory.clone(
0234     MaterialEffects = 'BrokenLinesCoarse', # same as "BrokenLines"
0235               # others are "BrokenLinesCoarsePca" == "BrokenLinesPca",
0236               #            "BrokenLinesFine", "BrokenLinesFinePca"
0237               #             or even "BreakPoints"
0238     UseInvalidHits = True # to account for multiple scattering in these layers
0239     )
0240 
0241 
0242 ###############################################################
0243 #
0244 # BzeroReferenceTrajectoryFactory with BrokenLines
0245 #
0246 ###############################################################
0247 BrokenLinesBzeroTrajectoryFactory = BzeroReferenceTrajectoryFactory.clone(
0248     MaterialEffects = 'BrokenLinesCoarse', # see BrokenLinesTrajectoryFactory
0249     UseInvalidHits = True # to account for multiple scattering in these layers
0250     )