CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
l1tVertexFinder::AnalysisSettings Class Reference

#include <AnalysisSettings.h>

Inheritance diagram for l1tVertexFinder::AnalysisSettings:
l1tVertexFinder::AlgoSettings

Public Member Functions

 AnalysisSettings (const edm::ParameterSet &iConfig)
 === Get configuration parameters More...
 
double genMaxAbsEta () const
 
double genMaxVertR () const
 
double genMaxVertZ () const
 
double genMinPt () const
 
unsigned int genMinStubLayers () const
 
const std::vector< int > & genPdgIds (bool all=false) const
 
double minFracMatchStubsOnReco () const
 
double minFracMatchStubsOnTP () const
 
unsigned int minNumMatchLayers () const
 
unsigned int minNumMatchPSLayers () const
 
bool stubMatchStrict () const
 
const TrackingParticleSelectortpsUse () const
 
const TrackingParticleSelectortpsUseForEff () const
 
const TrackingParticleSelectortpsUseForVtxReco () const
 
bool useLayerID () const
 
 ~AnalysisSettings ()
 
- Public Member Functions inherited from l1tVertexFinder::AlgoSettings
 AlgoSettings (const edm::ParameterSet &iConfig)
 === Get configuration parameters More...
 
unsigned int debug () const
 
double layerIDfromRadiusBin () const
 
double trackerHalfLength () const
 
double trackerInnerRadius () const
 
double trackerOuterRadius () const
 
Algorithm vx_algo () const
 
float vx_chi2cut () const
 Chi2 cut for the Adaptive Vertex Recostruction Algorithm. More...
 
unsigned int vx_dbscan_mintracks () const
 
float vx_dbscan_pt () const
 
float vx_distance () const
 
unsigned int vx_distanceType () const
 For Agglomerative cluster algorithm, select a definition of distance between clusters. More...
 
bool vx_DoPtComp () const
 FastHisto track selection control. More...
 
bool vx_DoTightChi2 () const
 
double vx_histogram_binwidth () const
 
double vx_histogram_max () const
 
double vx_histogram_min () const
 
std::vector< double > vx_histogram_parameters () const
 FastHisto histogram parameters (min, max, width) More...
 
unsigned int vx_kmeans_iterations () const
 
unsigned int vx_kmeans_nclusters () const
 
unsigned int vx_minTracks () const
 
unsigned int vx_NStubMin () const
 
unsigned int vx_NStubPSMin () const
 
unsigned int vx_nvtx () const
 Number of vertices to return for FastHisto. More...
 
float vx_resolution () const
 
float vx_TrackMaxChi2 () const
 
float vx_TrackMaxPt () const
 
float vx_TrackMaxPtBehavior () const
 
float vx_TrackMinPt () const
 
unsigned int vx_weightedmean () const
 
float vx_width () const
 FastHisto assumed vertex width. More...
 
unsigned int vx_windowSize () const
 Window size of the sliding window. More...
 
 ~AlgoSettings ()
 

Private Attributes

double chi2OverNdfCut_
 
bool detailedFitOutput_
 
edm::ParameterSet genCuts_
 
double generalResidualCut_
 
double genMaxAbsEta_
 
double genMaxVertR_
 
double genMaxVertZ_
 
double genMinPt_
 
unsigned int genMinStubLayers_
 
std::vector< int > genPdgIds_
 
std::vector< int > genPdgIdsAll_
 
double killingResidualCut_
 
bool killTrackFitWorstHit_
 
edm::ParameterSet l1TrackDef_
 
double minFracMatchStubsOnReco_
 
double minFracMatchStubsOnTP_
 
unsigned int minNumMatchLayers_
 
unsigned int minNumMatchPSLayers_
 
unsigned int numTrackFitIterations_
 
bool stubMatchStrict_
 
TrackingParticleSelector tpSelectorUse_
 
TrackingParticleSelector tpSelectorUseForEff_
 
TrackingParticleSelector tpSelectorUseForVtxReco_
 
std::vector< std::string > trackFitters_
 
edm::ParameterSet trackMatchDef_
 
bool useLayerID_
 

Detailed Description

Definition at line 15 of file AnalysisSettings.h.

Constructor & Destructor Documentation

◆ AnalysisSettings()

l1tVertexFinder::AnalysisSettings::AnalysisSettings ( const edm::ParameterSet iConfig)

=== Get configuration parameters

Definition at line 7 of file AnalysisSettings.cc.

8  : AlgoSettings(iConfig),
9 
10  // Parameter sets for differents types of configuration parameter.
11  genCuts_(iConfig.getParameter<edm::ParameterSet>("GenCuts")),
12  l1TrackDef_(iConfig.getParameter<edm::ParameterSet>("L1TrackDef")),
13  trackMatchDef_(iConfig.getParameter<edm::ParameterSet>("TrackMatchDef")),
14 
15  //=== Cuts on MC truth tracks used for tracking efficiency measurements.
16  genMinPt_(genCuts_.getParameter<double>("GenMinPt")),
17  genMaxAbsEta_(genCuts_.getParameter<double>("GenMaxAbsEta")),
18  genMaxVertR_(genCuts_.getParameter<double>("GenMaxVertR")),
19  genMaxVertZ_(genCuts_.getParameter<double>("GenMaxVertZ")),
20  genMinStubLayers_(genCuts_.getParameter<unsigned int>("GenMinStubLayers")),
21 
22  //=== Rules for deciding when the track finding has found an L1 track candidate
23  useLayerID_(l1TrackDef_.getParameter<bool>("UseLayerID")),
24 
25  //=== Rules for deciding when a reconstructed L1 track matches a MC truth particle (i.e. tracking particle).
26  minFracMatchStubsOnReco_(trackMatchDef_.getParameter<double>("MinFracMatchStubsOnReco")),
27  minFracMatchStubsOnTP_(trackMatchDef_.getParameter<double>("MinFracMatchStubsOnTP")),
28  minNumMatchLayers_(trackMatchDef_.getParameter<unsigned int>("MinNumMatchLayers")),
29  minNumMatchPSLayers_(trackMatchDef_.getParameter<unsigned int>("MinNumMatchPSLayers")),
30  stubMatchStrict_(trackMatchDef_.getParameter<bool>("StubMatchStrict")) {
31  // If user didn't specify any PDG codes, use e,mu,pi,K,p, to avoid picking up unstable particles like Xi-.
32  std::vector<unsigned int> genPdgIdsUnsigned(genCuts_.getParameter<std::vector<unsigned int>>("GenPdgIds"));
33  std::vector<int> genPdgIdsAll_ = {11, 13, 211, 321, 2212};
34  if (genPdgIdsUnsigned.empty()) {
35  genPdgIds_.insert(genPdgIds_.begin(), genPdgIdsAll_.begin(), genPdgIdsAll_.end());
36  } else {
37  genPdgIds_.insert(genPdgIds_.begin(), genPdgIdsUnsigned.begin(), genPdgIdsUnsigned.end());
38  }
39 
40  // For simplicity, user need not distinguish particles from antiparticles in configuration file.
41  // But here we must store both explicitely in Settings, since TrackingParticleSelector expects them.
42  std::transform(genPdgIds_.begin(), genPdgIds_.end(), std::back_inserter(genPdgIds_), std::negate<int>());
43  std::transform(genPdgIdsAll_.begin(), genPdgIdsAll_.end(), std::back_inserter(genPdgIdsAll_), std::negate<int>());
44 
45  // Define the settings for the TrackingParticleSelectors
47  99999999.,
48  -genMaxAbsEta(),
49  genMaxAbsEta(),
50  genMaxVertR(),
51  genMaxVertZ(),
52  0,
53  true, //useOnlyTPfromPhysicsCollision
54  true, //useOnlyInTimeParticles
55  true,
56  false,
57  genPdgIds());
58  // Range big enough to include all TP needed to measure tracking efficiency
59  // and big enough to include any TP that might be reconstructed for fake rate measurement.
60  // Include all possible particle types here, as if some are left out, L1 tracks matching one of missing types will be declared fake.
62  9999999999,
63  -std::max(genMaxAbsEta(), 3.5),
64  std::max(genMaxAbsEta(), 3.5),
65  std::max(10.0, genMaxVertR()),
66  std::max(35.0, genMaxVertZ()),
67  0,
68  false, //useOnlyTPfromPhysicsCollisionFalse
69  false, //useOnlyInTimeParticles
70  true,
71  false,
72  genPdgIds(true));
74  9999999999,
75  -genMaxAbsEta(),
76  genMaxAbsEta(),
77  genMaxVertR(),
78  genMaxVertZ(),
79  0,
80  true, //useOnlyTPfromPhysicsCollision
81  true, //useOnlyInTimeParticles
82  true,
83  false,
84  genPdgIds());
85 
86  //--- Sanity checks
88  throw cms::Exception(
89  "Settings.cc: Invalid cfg parameters - You are setting the minimum number of layers incorrectly : type C.");
90  }

References Exception, genCuts_, genMaxAbsEta(), genMaxVertR(), genMaxVertZ(), genMinPt(), genMinStubLayers_, genPdgIds(), genPdgIds_, genPdgIdsAll_, edm::ParameterSet::getParameter(), SiStripPI::max, min(), minNumMatchLayers_, tpSelectorUse_, tpSelectorUseForEff_, tpSelectorUseForVtxReco_, and HcalDetIdTransform::transform().

◆ ~AnalysisSettings()

l1tVertexFinder::AnalysisSettings::~AnalysisSettings ( )
inline

Definition at line 18 of file AnalysisSettings.h.

18 {}

Member Function Documentation

◆ genMaxAbsEta()

double l1tVertexFinder::AnalysisSettings::genMaxAbsEta ( ) const
inline

Definition at line 23 of file AnalysisSettings.h.

23 { return genMaxAbsEta_; }

References genMaxAbsEta_.

Referenced by AnalysisSettings().

◆ genMaxVertR()

double l1tVertexFinder::AnalysisSettings::genMaxVertR ( ) const
inline

Definition at line 24 of file AnalysisSettings.h.

24 { return genMaxVertR_; }

References genMaxVertR_.

Referenced by AnalysisSettings().

◆ genMaxVertZ()

double l1tVertexFinder::AnalysisSettings::genMaxVertZ ( ) const
inline

Definition at line 25 of file AnalysisSettings.h.

25 { return genMaxVertZ_; }

References genMaxVertZ_.

Referenced by AnalysisSettings().

◆ genMinPt()

double l1tVertexFinder::AnalysisSettings::genMinPt ( ) const
inline

Definition at line 22 of file AnalysisSettings.h.

22 { return genMinPt_; }

References genMinPt_.

Referenced by AnalysisSettings().

◆ genMinStubLayers()

unsigned int l1tVertexFinder::AnalysisSettings::genMinStubLayers ( ) const
inline

Definition at line 28 of file AnalysisSettings.h.

28 { return genMinStubLayers_; } // Min. number of layers TP made stub in.

References genMinStubLayers_.

Referenced by l1tVertexFinder::TP::fillUseForAlgEff(), and l1tVertexFinder::TP::fillUseForVertexReco().

◆ genPdgIds()

const std::vector<int>& l1tVertexFinder::AnalysisSettings::genPdgIds ( bool  all = false) const
inline

Definition at line 26 of file AnalysisSettings.h.

26 { return (all ? genPdgIdsAll_ : genPdgIds_); }

References python.cmstools::all(), genPdgIds_, and genPdgIdsAll_.

Referenced by AnalysisSettings().

◆ minFracMatchStubsOnReco()

double l1tVertexFinder::AnalysisSettings::minFracMatchStubsOnReco ( ) const
inline

Definition at line 44 of file AnalysisSettings.h.

44 { return minFracMatchStubsOnReco_; }

References minFracMatchStubsOnReco_.

◆ minFracMatchStubsOnTP()

double l1tVertexFinder::AnalysisSettings::minFracMatchStubsOnTP ( ) const
inline

Definition at line 46 of file AnalysisSettings.h.

46 { return minFracMatchStubsOnTP_; }

References minFracMatchStubsOnTP_.

◆ minNumMatchLayers()

unsigned int l1tVertexFinder::AnalysisSettings::minNumMatchLayers ( ) const
inline

Definition at line 48 of file AnalysisSettings.h.

48 { return minNumMatchLayers_; }

References minNumMatchLayers_.

◆ minNumMatchPSLayers()

unsigned int l1tVertexFinder::AnalysisSettings::minNumMatchPSLayers ( ) const
inline

Definition at line 49 of file AnalysisSettings.h.

49 { return minNumMatchPSLayers_; }

References minNumMatchPSLayers_.

◆ stubMatchStrict()

bool l1tVertexFinder::AnalysisSettings::stubMatchStrict ( ) const
inline

Definition at line 51 of file AnalysisSettings.h.

51 { return stubMatchStrict_; }

References stubMatchStrict_.

Referenced by l1tVertexFinder::Stub::fillTruth().

◆ tpsUse()

const TrackingParticleSelector& l1tVertexFinder::AnalysisSettings::tpsUse ( ) const
inline

Definition at line 32 of file AnalysisSettings.h.

32 { return tpSelectorUse_; }

References tpSelectorUse_.

Referenced by l1tVertexFinder::TP::fillUse().

◆ tpsUseForEff()

const TrackingParticleSelector& l1tVertexFinder::AnalysisSettings::tpsUseForEff ( ) const
inline

Definition at line 33 of file AnalysisSettings.h.

33 { return tpSelectorUseForEff_; }

References tpSelectorUseForEff_.

Referenced by l1tVertexFinder::TP::fillUseForEff().

◆ tpsUseForVtxReco()

const TrackingParticleSelector& l1tVertexFinder::AnalysisSettings::tpsUseForVtxReco ( ) const
inline

Definition at line 31 of file AnalysisSettings.h.

31 { return tpSelectorUseForVtxReco_; }

References tpSelectorUseForVtxReco_.

Referenced by l1tVertexFinder::TP::fillUseForVertexReco().

◆ useLayerID()

bool l1tVertexFinder::AnalysisSettings::useLayerID ( ) const
inline

Definition at line 38 of file AnalysisSettings.h.

38 { return useLayerID_; }

References useLayerID_.

Referenced by l1tVertexFinder::TP::countLayers().

Member Data Documentation

◆ chi2OverNdfCut_

double l1tVertexFinder::AnalysisSettings::chi2OverNdfCut_
private

Definition at line 80 of file AnalysisSettings.h.

◆ detailedFitOutput_

bool l1tVertexFinder::AnalysisSettings::detailedFitOutput_
private

Definition at line 81 of file AnalysisSettings.h.

◆ genCuts_

edm::ParameterSet l1tVertexFinder::AnalysisSettings::genCuts_
private

Definition at line 55 of file AnalysisSettings.h.

Referenced by AnalysisSettings().

◆ generalResidualCut_

double l1tVertexFinder::AnalysisSettings::generalResidualCut_
private

Definition at line 84 of file AnalysisSettings.h.

◆ genMaxAbsEta_

double l1tVertexFinder::AnalysisSettings::genMaxAbsEta_
private

Definition at line 61 of file AnalysisSettings.h.

Referenced by genMaxAbsEta().

◆ genMaxVertR_

double l1tVertexFinder::AnalysisSettings::genMaxVertR_
private

Definition at line 62 of file AnalysisSettings.h.

Referenced by genMaxVertR().

◆ genMaxVertZ_

double l1tVertexFinder::AnalysisSettings::genMaxVertZ_
private

Definition at line 63 of file AnalysisSettings.h.

Referenced by genMaxVertZ().

◆ genMinPt_

double l1tVertexFinder::AnalysisSettings::genMinPt_
private

Definition at line 60 of file AnalysisSettings.h.

Referenced by genMinPt().

◆ genMinStubLayers_

unsigned int l1tVertexFinder::AnalysisSettings::genMinStubLayers_
private

Definition at line 66 of file AnalysisSettings.h.

Referenced by AnalysisSettings(), and genMinStubLayers().

◆ genPdgIds_

std::vector<int> l1tVertexFinder::AnalysisSettings::genPdgIds_
private

Definition at line 64 of file AnalysisSettings.h.

Referenced by AnalysisSettings(), and genPdgIds().

◆ genPdgIdsAll_

std::vector<int> l1tVertexFinder::AnalysisSettings::genPdgIdsAll_
private

Definition at line 65 of file AnalysisSettings.h.

Referenced by AnalysisSettings(), and genPdgIds().

◆ killingResidualCut_

double l1tVertexFinder::AnalysisSettings::killingResidualCut_
private

Definition at line 85 of file AnalysisSettings.h.

◆ killTrackFitWorstHit_

bool l1tVertexFinder::AnalysisSettings::killTrackFitWorstHit_
private

Definition at line 83 of file AnalysisSettings.h.

◆ l1TrackDef_

edm::ParameterSet l1tVertexFinder::AnalysisSettings::l1TrackDef_
private

Definition at line 56 of file AnalysisSettings.h.

◆ minFracMatchStubsOnReco_

double l1tVertexFinder::AnalysisSettings::minFracMatchStubsOnReco_
private

Definition at line 72 of file AnalysisSettings.h.

Referenced by minFracMatchStubsOnReco().

◆ minFracMatchStubsOnTP_

double l1tVertexFinder::AnalysisSettings::minFracMatchStubsOnTP_
private

Definition at line 73 of file AnalysisSettings.h.

Referenced by minFracMatchStubsOnTP().

◆ minNumMatchLayers_

unsigned int l1tVertexFinder::AnalysisSettings::minNumMatchLayers_
private

Definition at line 74 of file AnalysisSettings.h.

Referenced by AnalysisSettings(), and minNumMatchLayers().

◆ minNumMatchPSLayers_

unsigned int l1tVertexFinder::AnalysisSettings::minNumMatchPSLayers_
private

Definition at line 75 of file AnalysisSettings.h.

Referenced by minNumMatchPSLayers().

◆ numTrackFitIterations_

unsigned int l1tVertexFinder::AnalysisSettings::numTrackFitIterations_
private

Definition at line 82 of file AnalysisSettings.h.

◆ stubMatchStrict_

bool l1tVertexFinder::AnalysisSettings::stubMatchStrict_
private

Definition at line 76 of file AnalysisSettings.h.

Referenced by stubMatchStrict().

◆ tpSelectorUse_

TrackingParticleSelector l1tVertexFinder::AnalysisSettings::tpSelectorUse_
private

Definition at line 89 of file AnalysisSettings.h.

Referenced by AnalysisSettings(), and tpsUse().

◆ tpSelectorUseForEff_

TrackingParticleSelector l1tVertexFinder::AnalysisSettings::tpSelectorUseForEff_
private

Definition at line 90 of file AnalysisSettings.h.

Referenced by AnalysisSettings(), and tpsUseForEff().

◆ tpSelectorUseForVtxReco_

TrackingParticleSelector l1tVertexFinder::AnalysisSettings::tpSelectorUseForVtxReco_
private

Definition at line 88 of file AnalysisSettings.h.

Referenced by AnalysisSettings(), and tpsUseForVtxReco().

◆ trackFitters_

std::vector<std::string> l1tVertexFinder::AnalysisSettings::trackFitters_
private

Definition at line 79 of file AnalysisSettings.h.

◆ trackMatchDef_

edm::ParameterSet l1tVertexFinder::AnalysisSettings::trackMatchDef_
private

Definition at line 57 of file AnalysisSettings.h.

◆ useLayerID_

bool l1tVertexFinder::AnalysisSettings::useLayerID_
private

Definition at line 69 of file AnalysisSettings.h.

Referenced by useLayerID().

l1tVertexFinder::AlgoSettings::AlgoSettings
AlgoSettings(const edm::ParameterSet &iConfig)
=== Get configuration parameters
Definition: AlgoSettings.cc:7
l1tVertexFinder::AnalysisSettings::minNumMatchLayers_
unsigned int minNumMatchLayers_
Definition: AnalysisSettings.h:74
l1tVertexFinder::AnalysisSettings::genPdgIds
const std::vector< int > & genPdgIds(bool all=false) const
Definition: AnalysisSettings.h:26
l1tVertexFinder::AnalysisSettings::genMaxVertZ
double genMaxVertZ() const
Definition: AnalysisSettings.h:25
min
T min(T a, T b)
Definition: MathUtil.h:58
l1tVertexFinder::AnalysisSettings::useLayerID_
bool useLayerID_
Definition: AnalysisSettings.h:69
l1tVertexFinder::AnalysisSettings::stubMatchStrict_
bool stubMatchStrict_
Definition: AnalysisSettings.h:76
l1tVertexFinder::AnalysisSettings::tpSelectorUseForVtxReco_
TrackingParticleSelector tpSelectorUseForVtxReco_
Definition: AnalysisSettings.h:88
l1tVertexFinder::AnalysisSettings::genMinStubLayers_
unsigned int genMinStubLayers_
Definition: AnalysisSettings.h:66
l1tVertexFinder::AnalysisSettings::minNumMatchPSLayers_
unsigned int minNumMatchPSLayers_
Definition: AnalysisSettings.h:75
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25
l1tVertexFinder::AnalysisSettings::genMinPt
double genMinPt() const
Definition: AnalysisSettings.h:22
l1tVertexFinder::AnalysisSettings::genPdgIdsAll_
std::vector< int > genPdgIdsAll_
Definition: AnalysisSettings.h:65
l1tVertexFinder::AnalysisSettings::genCuts_
edm::ParameterSet genCuts_
Definition: AnalysisSettings.h:55
l1tVertexFinder::AnalysisSettings::genMaxVertZ_
double genMaxVertZ_
Definition: AnalysisSettings.h:63
l1tVertexFinder::AnalysisSettings::tpSelectorUseForEff_
TrackingParticleSelector tpSelectorUseForEff_
Definition: AnalysisSettings.h:90
reco::modules::TrackingParticleSelector
SingleObjectSelector< TrackingParticleCollection, ::TrackingParticleSelector > TrackingParticleSelector
Definition: TrackingParticleSelector.cc:17
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
l1tVertexFinder::AnalysisSettings::l1TrackDef_
edm::ParameterSet l1TrackDef_
Definition: AnalysisSettings.h:56
l1tVertexFinder::AnalysisSettings::tpSelectorUse_
TrackingParticleSelector tpSelectorUse_
Definition: AnalysisSettings.h:89
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
l1tVertexFinder::AnalysisSettings::trackMatchDef_
edm::ParameterSet trackMatchDef_
Definition: AnalysisSettings.h:57
l1tVertexFinder::AnalysisSettings::genMaxVertR
double genMaxVertR() const
Definition: AnalysisSettings.h:24
l1tVertexFinder::AnalysisSettings::genPdgIds_
std::vector< int > genPdgIds_
Definition: AnalysisSettings.h:64
l1tVertexFinder::AnalysisSettings::genMinPt_
double genMinPt_
Definition: AnalysisSettings.h:60
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
l1tVertexFinder::AnalysisSettings::genMaxAbsEta
double genMaxAbsEta() const
Definition: AnalysisSettings.h:23
l1tVertexFinder::AnalysisSettings::minFracMatchStubsOnTP_
double minFracMatchStubsOnTP_
Definition: AnalysisSettings.h:73
l1tVertexFinder::AnalysisSettings::genMaxVertR_
double genMaxVertR_
Definition: AnalysisSettings.h:62
l1tVertexFinder::AnalysisSettings::minFracMatchStubsOnReco_
double minFracMatchStubsOnReco_
Definition: AnalysisSettings.h:72
l1tVertexFinder::AnalysisSettings::genMaxAbsEta_
double genMaxAbsEta_
Definition: AnalysisSettings.h:61