Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:24

0001 import math
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 from RecoJets.FFTJetProducers.fftjetcommon_cfi import *
0005 
0006 fftjet_default_recombination_scale = 0.5
0007 
0008 # FFTJet jet producer configuration
0009 fftjetJetMaker = cms.EDProducer(
0010     "FFTJetProducer",
0011     #
0012     # Label for the input clustering tree (must be sparse)
0013     treeLabel = cms.InputTag("fftjetpatreco", "FFTJetPatternRecognition"),
0014     #
0015     # Do we have the complete event at the lowest clustering tree scale?
0016     # Note that sparse clustering tree removes it by default, even if
0017     # it is inserted by the pattern recognition module.
0018     insertCompleteEvent = cms.bool(fftjet_insert_complete_event),
0019     completeEventScale = cms.double(fftjet_complete_event_scale),
0020     #
0021     # The initial set of scales used by the pattern recognition stage.
0022     # This is also the final set unless clustering tree construction
0023     # is adaptive. Needed here for reading back non-adaptive trees.
0024     InitialScales = fftjet_patreco_scales_50,
0025     #
0026     # Label for the produced objects
0027     outputLabel = cms.string("MadeByFFTJet"),
0028     #
0029     # Label for the input collection of Candidate objects
0030     src = cms.InputTag("towerMaker"),
0031     #
0032     # Type of the jets which will be produced (should be consistent with
0033     # the input collection). Valid types are "BasicJet", "GenJet", "CaloJet",
0034     # "PFJet", and "TrackJet". The algorithm might do different things
0035     # depending on the type. In particular, vertex correction may be done
0036     # for "CaloJet".
0037     jetType = cms.string("CaloJet"),
0038     #
0039     # Perform vertex correction?
0040     doPVCorrection = cms.bool(False),
0041     #
0042     # Label for the input collection of vertex objects. Meaningful
0043     # only when "doPVCorrection" is True
0044     srcPVs = cms.InputTag("offlinePrimaryVertices"),
0045     #
0046     # Anomalous calo tower definition (comes from RecoJets default)
0047     anomalous = fftjet_anomalous_tower_default,
0048     #
0049     # Magnitude correction factors (used only with gridded algorithms)
0050     etaDependentMagnutideFactors = cms.vdouble(),
0051     #
0052     # If a gridded algorithm is used, do we want to pick up the discretized
0053     # energy flow grid from the event record?
0054     reuseExistingGrid = cms.bool(False),
0055     #
0056     # If we do not reuse an existing grid, we need to provide
0057     # the grid configuration
0058     GridConfiguration = fftjet_grid_256_128,
0059     #
0060     # Maximum number of iterations allowed for the iterative jet
0061     # fitting. One-shot method is used if this number is 0 or 1.
0062     maxIterations = cms.uint32(1),
0063     #
0064     # Number of leading jets for which the iterative jet fitting must
0065     # converge before iterations are declared successful. This parameter
0066     # is not terribly meaningfule unless you know how many jets you expect
0067     # to get.
0068     nJetsRequiredToConverge = cms.uint32(10),
0069     #
0070     # The distance cutoff for the convergence. The distance between
0071     # the jets on two subsequent iterations must be less than this
0072     # cutoff in order to declare that the jet reconstruction has
0073     # converged. The distance function is defined by the "jetDistanceCalc"
0074     # parameter. Used only if "maxIterations" is larger than 1.
0075     convergenceDistance = cms.double(1.0e-6),
0076     #
0077     # Are we going to produce the set of constituents for each jet?
0078     # If we are not doing this, the code will run faster.
0079     assignConstituents = cms.bool(True),
0080     #
0081     # Are we going to resum constituents to calculate jet 4-vectors?
0082     # This only makes sense when a gridded algorithm is used in the
0083     # crisp 4-vector recombination mode to determine jet areas (note
0084     # that "recombinationDataCutoff" parameter should be negative),
0085     # and resumming is used to emulate vector algorithm recombination.
0086     resumConstituents = cms.bool(False),
0087     #
0088     # Noise sigma parameter for the background functor (the interface
0089     # to noise modeling is likely to be changed in the future)
0090     noiseLevel = cms.double(0.15),
0091     #
0092     # Number of clusters requested. Works with both "locallyAdaptive"
0093     # and "globallyAdaptive" resolution schemes.
0094     nClustersRequested = cms.uint32(4),
0095     #
0096     # Maximum eta for gridded recombination algorithms. Grid cells
0097     # with eta values ou t
0098     gridScanMaxEta = cms.double(fftjet_standard_eta_range),
0099     #
0100     # Are we going to use gridded or vector algorithm? Vector algoritms
0101     # are slightly more precise (no binning uncertainty introduced). However,
0102     # jet-by-jet jet areas can be calculated only by gridded algorithms.
0103     useGriddedAlgorithm = cms.bool(False),
0104     #
0105     # The recombination algorithm used. For vector algorithms, possible
0106     # specifications are:
0107     #   "Kernel"     -- use 4-vector recombination scheme
0108     #   "EtCentroid" -- use Et centroid (or "original Snowmass") scheme
0109     #   "EtSum"      -- set the jet direction to the precluster direction
0110     # For gridded algorithms additional specifications are available:
0111     # "FasterKernel", "FasterEtCentroid", and "FasterEtSum". See the
0112     # comments in the "FasterKernelRecombinationAlg.hh" header of the
0113     # FFTJet package for limitations of those faster algorithms.
0114     recombinationAlgorithm = cms.string("Kernel"),
0115     #
0116     # Are we going to utilize crisp or fuzzy clustering?
0117     isCrisp = cms.bool(True),
0118     #
0119     # A parameter which defines when we will attempt to split the energy
0120     # of a calorimeter cell if it is unlikely to belong to any jet and
0121     # to the noise. Works with Et-dependent membership functions only.
0122     # The default value of 0 means don't split, just assign this energy
0123     # deposition to the unclustered energy.
0124     unlikelyBgWeight = cms.double(0.0),
0125     #
0126     # The data cutoff for the gridded algorithms. Set this cutoff
0127     # to some negative number if you want to calculate jet areas
0128     # (this can also be done by turning on pile-up calculation
0129     # as a separate step.) Set it to 0 or some positive number
0130     # if you want to improve the code speed.
0131     recombinationDataCutoff = cms.double(0.0),
0132     #
0133     # The built-in precluster selection for subsequent jet reconstruction
0134     # can be performed according to the following schemes which, basically,
0135     # describe how the resolution of the Gaussian filter is chosen:
0136     #  "fixed"            -- use the same user-selected resolution across
0137     #                        the whole eta-phi space
0138     #  "maximallyStable"  -- pick up a single resolution according to
0139     #                        a jet configuration stability criterion
0140     #  "globallyAdaptive" -- pick up a single resolution which gives
0141     #                        a desired number of jets
0142     #  "locallyAdaptive"  -- use different resolutions in different parts
0143     #                        of the eta-phi space in order to maximize
0144     #                        a certain optimization criterion
0145     resolution = cms.string("fixed"),
0146     #
0147     # Scale parameter for the "fixed" and "locallyAdaptive" resolution schemes
0148     fixedScale = cms.double(0.15),
0149     #
0150     # Minimum and maximum stable scales for the "maximallyStable"
0151     # resolution scheme. Value of 0 means there is no limit, and
0152     # all scales in the clustering tree are considered.
0153     minStableScale = cms.double(0.0),
0154     maxStableScale = cms.double(0.0),
0155     #
0156     # Stability exponent for the "maximallyStable" resolution scheme
0157     stabilityAlpha = cms.double(0.5),
0158     #
0159     # The precluster discriminator which works together with the
0160     # resolution selection scheme
0161     PeakSelectorConfiguration = cms.PSet(
0162         Class = cms.string("SimplePeakSelector"),
0163         magCut = cms.double(0.1),
0164         driftSpeedCut = cms.double(1.0e100),
0165         magSpeedCut = cms.double(-1.0e100),
0166         lifeTimeCut = cms.double(-1.0e100),
0167         NNDCut = cms.double(-1.0e100),
0168         etaCut = cms.double(1.0e100),
0169         splitTimeCut = cms.double(-1.0e100),
0170         mergeTimeCut = cms.double(-1.0e100)
0171     ),
0172     #
0173     # The jet membership function
0174     jetMembershipFunction = fftjet_jet_membership_cone,
0175     #
0176     # The noise membership function
0177     bgMembershipFunction = fftjet_noise_membership_smallconst,
0178     #
0179     # The recombination scale function
0180     recoScaleCalcPeak = cms.PSet(
0181         Class = cms.string("ConstDouble"),
0182         value = cms.double(fftjet_default_recombination_scale)
0183     ),
0184     #
0185     # The function which calculates eta-to-phi bandwidth ratio
0186     # for the jet membership function. If the ratio is set to 0,
0187     # the "setScaleRatio" membership function method will never
0188     # be called, and the default ratio built into the membership
0189     # functionwill be used instead.
0190     recoScaleRatioCalcPeak = fftjet_peakfunctor_const_zero,
0191     #
0192     # The function which calculates the factor to be multiplied by
0193     # the membership function
0194     memberFactorCalcPeak = fftjet_peakfunctor_const_one,
0195     #
0196     # The following parameters must be specified if "maxIterations" value
0197     # is larger than 1. They are used in the iterative mode only.
0198     #  recoScaleCalcJet = ,
0199     #  recoScaleRatioCalcJet = ,
0200     #  memberFactorCalcJet = ,
0201     #  jetDistanceCalc = ,
0202     #
0203     recoScaleCalcJet = cms.PSet(
0204         Class = cms.string("ConstDouble"),
0205         value = cms.double(fftjet_default_recombination_scale)
0206     ),
0207     recoScaleRatioCalcJet = fftjet_peakfunctor_const_one,
0208     memberFactorCalcJet = fftjet_peakfunctor_const_one,
0209     jetDistanceCalc = fftjet_convergence_jet_distance,
0210     #
0211     # Are we going to estimate the pile-up using actual jet shapes?
0212     # Note that the following _must_ be defined if we want to do this:
0213     #   recoScaleCalcJet, recoScaleRatioCalcJet, memberFactorCalcJet,
0214     #   PileupGridConfiguration, and pileupDensityCalc
0215     calculatePileup = cms.bool(False),
0216     #
0217     # If the pile-up is estimated, do we want to subtract it?
0218     subtractPileup = cms.bool(False),
0219     #
0220     # If the pile-up is both estimated and subtracted, do we want to use
0221     # the 4-vector pile-up subtraction scheme? (The alternative is based
0222     # on scaling the jet Pt).
0223     subtractPileupAs4Vec = cms.bool(False),
0224     #
0225     # Source of the pile-up energy flow data
0226     pileupLabel = cms.InputTag("pileupestimator", "FFTJetPileupEstimatePF"),
0227     #
0228     # Label for GenJet collection in the "fromGenJets" resolution mode
0229     genJetsLabel = cms.InputTag("fftgenjetproducer", "MadeByFFTJet"),
0230     #
0231     # Max number of preclusters. Does not take into account the possibility
0232     # of further precluster removal by setting its membership factor to 0.
0233     maxInitialPreclusters = cms.uint32(2147483647),
0234     #
0235     # Parameters related to pileup shape fetching from DB
0236     pileupTableRecord = cms.string("pileupTableRecord"),
0237     pileupTableName = cms.string("pileupTableName"),
0238     pileupTableCategory = cms.string("pileupTableCategory"),
0239     loadPileupFromDB = cms.bool(False)
0240 )