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
 
unsigned int vx_dbscan_mintracks () const
 
float vx_dbscan_pt () const
 
float vx_distance () const
 
unsigned int vx_distanceType () const
 
bool vx_DoPtComp () const
 
bool vx_DoQualityCuts () const
 
bool vx_DoTightChi2 () const
 
double vx_histogram_binwidth () const
 
double vx_histogram_max () const
 
double vx_histogram_min () const
 
int vx_histogram_numbins () const
 
std::vector< double > vx_histogram_parameters () const
 
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
 
std::string vx_pattrec_graph () const
 
Precision vx_precision () const
 
float vx_resolution () const
 
float vx_TrackMaxChi2 () const
 
float vx_TrackMaxPt () const
 
float vx_TrackMaxPtBehavior () const
 
float vx_TrackMinPt () const
 
std::string vx_trkw_graph () const
 
unsigned int vx_weightedmean () const
 
float vx_width () const
 
unsigned int vx_windowSize () const
 
 ~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.

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

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  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const std::vector< int > & genPdgIds(bool all=false) const
TrackingParticleSelector tpSelectorUseForVtxReco_
TrackingParticleSelector tpSelectorUseForEff_
TrackingParticleSelector tpSelectorUse_
AlgoSettings(const edm::ParameterSet &iConfig)
=== Get configuration parameters
Definition: AlgoSettings.cc:7
SingleObjectSelector< TrackingParticleCollection, ::TrackingParticleSelector > TrackingParticleSelector
unsigned transform(const HcalDetId &id, unsigned transformCode)

◆ ~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.

References genMaxAbsEta_.

Referenced by AnalysisSettings().

◆ genMaxVertR()

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

Definition at line 24 of file AnalysisSettings.h.

References genMaxVertR_.

Referenced by AnalysisSettings().

◆ genMaxVertZ()

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

Definition at line 25 of file AnalysisSettings.h.

References genMaxVertZ_.

Referenced by AnalysisSettings().

◆ genMinPt()

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

Definition at line 22 of file AnalysisSettings.h.

References genMinPt_.

Referenced by AnalysisSettings().

◆ genMinStubLayers()

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

Definition at line 28 of file AnalysisSettings.h.

References genMinStubLayers_.

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

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

◆ genPdgIds()

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

Definition at line 26 of file AnalysisSettings.h.

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

Referenced by AnalysisSettings().

26 { return (all ? genPdgIdsAll_ : genPdgIds_); }
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:25

◆ minFracMatchStubsOnReco()

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

Definition at line 44 of file AnalysisSettings.h.

References minFracMatchStubsOnReco_.

◆ minFracMatchStubsOnTP()

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

Definition at line 46 of file AnalysisSettings.h.

References minFracMatchStubsOnTP_.

◆ minNumMatchLayers()

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

Definition at line 48 of file AnalysisSettings.h.

References minNumMatchLayers_.

◆ minNumMatchPSLayers()

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

Definition at line 49 of file AnalysisSettings.h.

References minNumMatchPSLayers_.

◆ stubMatchStrict()

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

Definition at line 51 of file AnalysisSettings.h.

References stubMatchStrict_.

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

◆ tpsUse()

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

Definition at line 32 of file AnalysisSettings.h.

References tpSelectorUse_.

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

32 { return tpSelectorUse_; }
TrackingParticleSelector tpSelectorUse_

◆ tpsUseForEff()

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

Definition at line 33 of file AnalysisSettings.h.

References tpSelectorUseForEff_.

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

33 { return tpSelectorUseForEff_; }
TrackingParticleSelector tpSelectorUseForEff_

◆ tpsUseForVtxReco()

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

Definition at line 31 of file AnalysisSettings.h.

References tpSelectorUseForVtxReco_.

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

31 { return tpSelectorUseForVtxReco_; }
TrackingParticleSelector tpSelectorUseForVtxReco_

◆ useLayerID()

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

Definition at line 38 of file AnalysisSettings.h.

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().