Skip to content

Commit

Permalink
Make sure some default configuration parameters are only defined in a…
Browse files Browse the repository at this point in the history
… single place. Some header reorganization.
  • Loading branch information
Alexx Perloff authored and Alexx Perloff committed Jan 28, 2021
1 parent 757e021 commit c3e6667
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 80 deletions.
5 changes: 2 additions & 3 deletions L1Trigger/VertexFinder/interface/AnalysisSettings.h
@@ -1,13 +1,12 @@
#ifndef __L1Trigger_VertexFinder_AnalysisSettings_h__
#define __L1Trigger_VertexFinder_AnalysisSettings_h__

#include <vector>

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/Exception.h"

#include "L1Trigger/VertexFinder/interface/AlgoSettings.h"

#include <vector>

namespace l1tVertexFinder {

class AnalysisSettings : public AlgoSettings {
Expand Down
5 changes: 2 additions & 3 deletions L1Trigger/VertexFinder/interface/InputData.h
@@ -1,16 +1,15 @@
#ifndef __L1Trigger_VertexFinder_InputData_h__
#define __L1Trigger_VertexFinder_InputData_h__

#include <vector>

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Utilities/interface/InputTag.h"

#include "L1Trigger/VertexFinder/interface/Stub.h"
#include "L1Trigger/VertexFinder/interface/TP.h"
#include "L1Trigger/VertexFinder/interface/Vertex.h"

#include <vector>

namespace l1tVertexFinder {

class AnalysisSettings;
Expand Down
34 changes: 5 additions & 29 deletions L1Trigger/VertexFinder/python/VertexAnalyzer_cff.py
@@ -1,16 +1,17 @@
import FWCore.ParameterSet.Config as cms
from L1Trigger.VertexFinder.VertexProducer_cff import VertexProducer

L1TVertexAnalyzer = cms.EDAnalyzer('VertexAnalyzer',
tpInputTag = cms.InputTag("mix", "MergedTrackTruth"),
stubInputTag = cms.InputTag("TTStubsFromPhase2TrackerDigis", "StubAccepted"),
stubTruthInputTag = cms.InputTag("TTStubAssociatorFromPixelDigis", "StubAccepted"),
clusterTruthInputTag = cms.InputTag("TTClusterAssociatorFromPixelDigis", "ClusterAccepted"),
l1TracksInputTag = cms.InputTag("TTTracksFromTrackletEmulation", "Level1TTTracks"),
l1VerticesInputTag = cms.InputTag("VertexProducer", "l1vertices"),
l1TracksInputTag = VertexProducer.l1TracksInputTag,
l1VerticesInputTag = cms.InputTag("VertexProducer", VertexProducer.l1VertexCollectionName.value()),

#=== Cuts on MC truth particles (i.e., tracking particles) used for tracking efficiency measurements.
GenCuts = cms.PSet(
GenMinPt = cms.double(3.0),
GenMinPt = cms.double(2.0),
GenMaxAbsEta = cms.double(2.4),
GenMaxVertR = cms.double(1.0), # Maximum distance of particle production vertex from centre of CMS.
GenMaxVertZ = cms.double(30.0),
Expand Down Expand Up @@ -48,32 +49,7 @@


# === Vertex Reconstruction configuration
VertexReconstruction=cms.PSet(
Algorithm = cms.string("DBSCAN"),
# Vertex distance
VertexDistance = cms.double(.15),
# Assumed Vertex Resolution
VertexResolution = cms.double(.10),
# Distance Type for agglomerative algorithm (0: MaxDistance, 1: MinDistance, 2: MeanDistance, 3: CentralDistance)
DistanceType = cms.uint32(0),
# Minimum number of tracks to accept vertex
MinTracks = cms.uint32(2),
# Compute the z0 position of the vertex with a mean weighted with track momenta
WeightedMean = cms.bool(False),
# Chi2 cut for the Adaptive Vertex Reconstruction Algorithm
AVR_chi2cut = cms.double(5.),
# TDR algorithm assumed vertex width [cm]
TP_VertexWidth = cms.double(.15),
# Kmeans number of iterations
KmeansIterations = cms.uint32(10),
# Kmeans number of clusters
KmeansNumClusters = cms.uint32(18),
# DBSCAN pt threshold
DBSCANPtThreshold = cms.double(4.),
# DBSCAN min density tracks
DBSCANMinDensityTracks = cms.uint32(2),
VxMinTrackPt = cms.double(2.5)
),
VertexReconstruction = VertexProducer.VertexReconstruction,

# Debug printout
debug = cms.uint32(0),
Expand Down
34 changes: 4 additions & 30 deletions L1Trigger/VertexFinder/python/VertexNTupler_cff.py
@@ -1,15 +1,16 @@
import FWCore.ParameterSet.Config as cms
from L1Trigger.VertexFinder.VertexProducer_cff import VertexProducer

L1TVertexNTupler = cms.EDAnalyzer('VertexNTupler',
tpInputTag = cms.InputTag("mix", "MergedTrackTruth"),
stubInputTag = cms.InputTag("TTStubsFromPhase2TrackerDigis", "StubAccepted"),
stubTruthInputTag = cms.InputTag("TTStubAssociatorFromPixelDigis", "StubAccepted"),
clusterTruthInputTag = cms.InputTag("TTClusterAssociatorFromPixelDigis", "ClusterAccepted"),

l1TracksInputTags = cms.VInputTag( cms.InputTag("TTTracksFromTrackletEmulation", "Level1TTTracks") ),
l1TracksInputTags = cms.VInputTag( VertexProducer.l1TracksInputTag ),
l1TracksTruthMapInputTags = cms.VInputTag( cms.InputTag("TTTrackAssociatorFromPixelDigis", "Level1TTTracks") ),
l1TracksBranchNames = cms.vstring('hybrid'),
l1VertexInputTags = cms.VInputTag( cms.InputTag("VertexProducer", "l1vertices") ),
l1VertexInputTags = cms.VInputTag( cms.InputTag("VertexProducer", VertexProducer.l1VertexCollectionName.value()) ),
l1VertexTrackInputs = cms.vstring('hybrid'),
l1VertexBranchNames = cms.vstring('dbscan'),
extraL1VertexInputTags = cms.VInputTag(),
Expand Down Expand Up @@ -55,34 +56,7 @@


# === Vertex Reconstruction configuration
VertexReconstruction=cms.PSet(
Algorithm = cms.string("DBSCAN"),
# Vertex distance
VertexDistance = cms.double(.15),
# Assumed Vertex Resolution
VertexResolution = cms.double(.10),
# Distance Type for agglomerative algorithm (0: MaxDistance, 1: MinDistance, 2: MeanDistance, 3: CentralDistance)
DistanceType = cms.uint32(0),
# Minimum number of tracks to accept vertex
MinTracks = cms.uint32(2),
# Compute the z0 position of the vertex with a mean weighted with track momenta
WeightedMean = cms.bool(False),
# Chi2 cut for the Adaptive Vertex Reconstruction Algorithm
AVR_chi2cut = cms.double(5.),
# FastHisto algorithm histogram parameters (min,max,width) [cm]
TP_HistogramParameters = cms.vdouble(-14.95, 15.0, 0.1),
# FastHisto algorithm assumed vertex width [cm]
TP_VertexWidth = cms.double(.15),
# Kmeans number of iterations
KmeansIterations = cms.uint32(10),
# Kmeans number of clusters
KmeansNumClusters = cms.uint32(18),
# DBSCAN pt threshold
DBSCANPtThreshold = cms.double(4.),
# DBSCAN min density tracks
DBSCANMinDensityTracks = cms.uint32(2),
VxMinTrackPt = cms.double(2.5)
),
VertexReconstruction = VertexProducer.VertexReconstruction,

# Debug printout
debug = cms.uint32(0),
Expand Down
5 changes: 3 additions & 2 deletions L1Trigger/VertexFinder/python/VertexProducer_cff.py
Expand Up @@ -7,7 +7,7 @@
l1VertexCollectionName = cms.string("l1vertices"),

# === Vertex Reconstruction configuration
VertexReconstruction=cms.PSet(
VertexReconstruction = cms.PSet(
# Vertex Reconstruction Algorithm
Algorithm = cms.string("DBSCAN"),
# Vertex distance
Expand All @@ -34,7 +34,8 @@
DBSCANPtThreshold = cms.double(4.),
# DBSCAN min density tracks
DBSCANMinDensityTracks = cms.uint32(2),
VxMinTrackPt = cms.double(2.5)
# Minimum pt of tracks used to create vertex
VxMinTrackPt = cms.double(2.0)
),
# Debug printout
debug = cms.uint32(0)
Expand Down
19 changes: 6 additions & 13 deletions L1Trigger/VertexFinder/src/InputData.cc
@@ -1,27 +1,20 @@

#include "L1Trigger/VertexFinder/interface/InputData.h"

#include <map>

#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Utilities/interface/InputTag.h"

#include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
#include "SimDataFormats/Track/interface/SimTrack.h"

// #include "Geometry/Records/interface/StackedTrackerGeometryRecord.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"

// TTStubAssociationMap.h forgets to two needed files, so must include them here ...
#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h"
#include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
#include "SimDataFormats/Track/interface/SimTrack.h"
#include "SimTracker/TrackTriggerAssociation/interface/TTClusterAssociationMap.h"
#include "SimTracker/TrackTriggerAssociation/interface/TTStubAssociationMap.h"

#include "L1Trigger/VertexFinder/interface/AnalysisSettings.h"
#include "L1Trigger/VertexFinder/interface/InputData.h"

#include <map>

using namespace std;

Expand Down

0 comments on commit c3e6667

Please sign in to comment.