Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-20 02:50:21

0001 #ifndef __L1Trigger_VertexFinder_AnalysisSettings_h__
0002 #define __L1Trigger_VertexFinder_AnalysisSettings_h__
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/Utilities/interface/Exception.h"
0006 #include "L1Trigger/VertexFinder/interface/AlgoSettings.h"
0007 #include "SimTracker/Common/interface/TrackingParticleSelector.h"
0008 
0009 #include <algorithm>
0010 #include <functional>
0011 #include <vector>
0012 
0013 namespace l1tVertexFinder {
0014 
0015   class AnalysisSettings : public AlgoSettings {
0016   public:
0017     AnalysisSettings(const edm::ParameterSet& iConfig);
0018     ~AnalysisSettings() {}
0019 
0020     //=== Cuts on MC truth tracks for tracking efficiency measurements.
0021 
0022     double genMinPt() const { return genMinPt_; }
0023     double genMaxAbsEta() const { return genMaxAbsEta_; }
0024     double genMaxVertR() const { return genMaxVertR_; }
0025     double genMaxVertZ() const { return genMaxVertZ_; }
0026     const std::vector<int>& genPdgIds(bool all = false) const { return (all ? genPdgIdsAll_ : genPdgIds_); }
0027     // Additional cut on MC truth tracks for algorithmic tracking efficiency measurements.
0028     unsigned int genMinStubLayers() const { return genMinStubLayers_; }  // Min. number of layers TP made stub in.
0029 
0030     //=== Selection of MC truth tracks.
0031     const TrackingParticleSelector& tpsUseForVtxReco() const { return tpSelectorUseForVtxReco_; }
0032     const TrackingParticleSelector& tpsUse() const { return tpSelectorUse_; }
0033     const TrackingParticleSelector& tpsUseForEff() const { return tpSelectorUseForEff_; }
0034 
0035     //=== Rules for deciding when the track finding has found an L1 track candidate
0036 
0037     // Define layers using layer ID (true) or by bins in radius of 5 cm width (false)?
0038     bool useLayerID() const { return useLayerID_; }
0039 
0040     //=== Rules for deciding when a reconstructed L1 track matches a MC truth particle (i.e. tracking particle).
0041 
0042     //--- Three different ways to define if a tracking particle matches a reco track candidate. (Usually, set two of them to ultra loose).
0043     // Min. fraction of matched stubs relative to number of stubs on reco track.
0044     double minFracMatchStubsOnReco() const { return minFracMatchStubsOnReco_; }
0045     // Min. fraction of matched stubs relative to number of stubs on tracking particle.
0046     double minFracMatchStubsOnTP() const { return minFracMatchStubsOnTP_; }
0047     // Min. number of matched layers & min. number of matched PS layers..
0048     unsigned int minNumMatchLayers() const { return minNumMatchLayers_; }
0049     unsigned int minNumMatchPSLayers() const { return minNumMatchPSLayers_; }
0050     // Associate stub to TP only if the TP contributed to both its clusters? (If False, then associate even if only one cluster was made by TP).
0051     bool stubMatchStrict() const { return stubMatchStrict_; }
0052 
0053   private:
0054     // Parameter sets for differents types of configuration parameter.
0055     edm::ParameterSet genCuts_;
0056     edm::ParameterSet l1TrackDef_;
0057     edm::ParameterSet trackMatchDef_;
0058 
0059     // Cuts on truth tracking particles.
0060     double genMinPt_;
0061     double genMaxAbsEta_;
0062     double genMaxVertR_;
0063     double genMaxVertZ_;
0064     std::vector<int> genPdgIds_;
0065     std::vector<int> genPdgIdsAll_;
0066     unsigned int genMinStubLayers_;
0067 
0068     // Rules for deciding when the track-finding has found an L1 track candidate
0069     bool useLayerID_;
0070 
0071     // Rules for deciding when a reconstructed L1 track matches a MC truth particle (i.e. tracking particle).
0072     double minFracMatchStubsOnReco_;
0073     double minFracMatchStubsOnTP_;
0074     unsigned int minNumMatchLayers_;
0075     unsigned int minNumMatchPSLayers_;
0076     bool stubMatchStrict_;
0077 
0078     // Track Fitting Settings
0079     std::vector<std::string> trackFitters_;
0080     double chi2OverNdfCut_;
0081     bool detailedFitOutput_;
0082     unsigned int numTrackFitIterations_;
0083     bool killTrackFitWorstHit_;
0084     double generalResidualCut_;
0085     double killingResidualCut_;
0086 
0087     // Tracking particle selectors
0088     TrackingParticleSelector tpSelectorUseForVtxReco_;
0089     TrackingParticleSelector tpSelectorUse_;
0090     TrackingParticleSelector tpSelectorUseForEff_;
0091   };
0092 
0093 }  // end namespace l1tVertexFinder
0094 
0095 #endif