Skip to content

Commit

Permalink
Merge pull request #574 from cerati/strip-triplet-seeding-steps
Browse files Browse the repository at this point in the history
strip-only triplet-based seeding steps
  • Loading branch information
ktf committed Aug 21, 2013
2 parents 146204f + e34fed6 commit 2764135
Show file tree
Hide file tree
Showing 35 changed files with 1,640 additions and 122 deletions.
@@ -1 +1,66 @@
#error "moved to plugin"
#ifndef ThirdHitPredictionFromCircle_H
#define ThirdHitPredictionFromCircle_H

#include "DataFormats/GeometryVector/interface/Basic2DVector.h"
#include "DataFormats/GeometryVector/interface/Basic3DVector.h"

#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"


class ThirdHitPredictionFromCircle {

public:
using Scalar = double;
typedef PixelRecoRange<float> Range;
typedef Basic2DVector<Scalar> Vector2D;
typedef Basic2DVector<float> VectorF2D;

ThirdHitPredictionFromCircle(const GlobalPoint & P1, const GlobalPoint & P2,
float tolerance);

float phi(float curvature, float radius) const;
float angle(float curvature, float radius) const;

Range operator()(Range curvature, float radius) const;

Range curvature(double transverseIP) const;
double curvature(const Vector2D &thirdPoint) const;
double transverseIP(const Vector2D &thirdPoint) const;

// like PixelRecoLineRZ, but makes use of the bending computation
// from the circle fit to get an actual Helix propagation
class HelixRZ {
public:
using Vector2D=ThirdHitPredictionFromCircle::Vector2D;
using Scalar=ThirdHitPredictionFromCircle::Scalar;
// using Vector2D=ThirdHitPredictionFromCircle::VectorF2D;
// using Scalar=float;

HelixRZ() : circle(0) {}
HelixRZ(const ThirdHitPredictionFromCircle *icircle,
double iz1, double z2, double curv);

Scalar zAtR(Scalar r) const;
Scalar rAtZ(Scalar z) const;

static double maxCurvature(const ThirdHitPredictionFromCircle *circle,
double z1, double z2, double z3);

private:
const ThirdHitPredictionFromCircle *circle;
Vector2D center;
Scalar curvature, radius, z1, seg, dzdu;
};

private:
friend class HelixRZ;

Scalar invCenterOnAxis(const Vector2D &thirdPoint) const;

Vector2D p1, center, axis;
Scalar delta, delta2;
float theTolerance;
};

#endif
@@ -1 +1,37 @@
#error "moved to plugin"
#ifndef ThirdHitRZPredictionBase_H
#define ThirdHitRZPredictionBase_H

/** predicts a range in r-z for the position of third hit.
* The is the base class with common code, the actual implementation
* is interfaced in the ThirdHitRZPrediction template.
* The margin is defined by hit errors and multiple scattering.
*/

#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"
#include "RecoTracker/TkTrackingRegions/interface/TkTrackingRegionsMargin.h"

class DetLayer;
class OrderedHitPair;
class MultipleScatteringParametrisation;

class ThirdHitRZPredictionBase {
public:
typedef PixelRecoRange<float> Range;
typedef TkTrackingRegionsMargin<float> Margin;

ThirdHitRZPredictionBase();
ThirdHitRZPredictionBase(float tolerance, const DetLayer* layer = 0);

const Range & detRange() const { return theDetRange; }
const Range & detSize() const { return theDetSize; }

void initTolerance(float tolerance) { theTolerance = Margin(tolerance, tolerance); }
void initLayer(const DetLayer *layer);

protected:
bool theBarrel, theForward;
Range theDetRange, theDetSize;
Margin theTolerance;
};
#endif
Expand Up @@ -5,7 +5,7 @@
#include "RecoTracker/TkHitPairs/interface/HitPairGeneratorFromLayerPair.h"
#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayers.h"
#include "RecoPixelVertexing/PixelTriplets/interface/HitTripletGeneratorFromPairAndLayersFactory.h"
#include "LayerTriplets.h"
#include "RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h"
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/EventSetup.h"
Expand Down
Expand Up @@ -3,7 +3,7 @@
#include "Geometry/CommonDetUnit/interface/GeomDetEnumerators.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "ThirdHitPredictionFromCircle.h"
#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h"
#include "TrackingTools/DetLayers/interface/DetLayer.h"
#include "MatchedHitRZCorrectionFromBending.h"

Expand Down
@@ -1,6 +1,6 @@
#include "RecoPixelVertexing/PixelTriplets/plugins/PixelTripletLargeTipGenerator.h"

#include "ThirdHitPredictionFromCircle.h"
#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h"
#include "ThirdHitRZPrediction.h"
#include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h"
#include "FWCore/Framework/interface/ESHandle.h"
Expand Down
1 change: 1 addition & 0 deletions RecoPixelVertexing/PixelTriplets/plugins/SealModule.cc
Expand Up @@ -17,3 +17,4 @@ DEFINE_EDM_PLUGIN(HitTripletGeneratorFromPairAndLayersFactory,PixelTripletNoTipG
#include "RecoTracker/TkTrackingRegions/interface/OrderedHitsGenerator.h"
#include "CombinedHitTripletGenerator.h"
DEFINE_EDM_PLUGIN(OrderedHitsGeneratorFactory, CombinedHitTripletGenerator, "StandardHitTripletGenerator");

This file was deleted.

Expand Up @@ -8,7 +8,7 @@

#include <algorithm>

#include "ThirdHitRZPredictionBase.h"
#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPredictionBase.h"

template<class Propagator>
class ThirdHitRZPrediction : public ThirdHitRZPredictionBase {
Expand Down

This file was deleted.

@@ -1,4 +1,4 @@
#include "LayerTriplets.h"
#include "RecoPixelVertexing/PixelTriplets/interface/LayerTriplets.h"

using namespace ctfseeding;
std::vector<LayerTriplets::LayerPairAndLayers> LayerTriplets::layers() const
Expand Down
Expand Up @@ -5,7 +5,7 @@
#include "RecoTracker/TkMSParametrization/interface/PixelRecoUtilities.h"
#include "RecoTracker/TkMSParametrization/interface/PixelRecoRange.h"

#include "ThirdHitPredictionFromCircle.h"
#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h"
#include "FWCore/Utilities/interface/Likely.h"

// there are tons of safety checks.
Expand Down
@@ -1,4 +1,4 @@
#include "ThirdHitRZPredictionBase.h"
#include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPredictionBase.h"
#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
#include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
Expand Down
102 changes: 102 additions & 0 deletions RecoTracker/IterativeTracking/python/PixelLessTripletStep_cff.py
@@ -0,0 +1,102 @@
import FWCore.ParameterSet.Config as cms

from RecoTracker.IterativeTracking.PixelLessStep_cff import *

# SEEDING LAYERS
pixelLessStepSeedLayers = cms.ESProducer("SeedingLayersESProducer",
ComponentName = cms.string('pixelLessStepSeedLayers'),
layerList = cms.vstring(
#TIB
'TIB1+TIB2+MTIB3',
#TIB+TID
'TIB1+TIB2+MTID1_pos','TIB1+TIB2+MTID1_neg',
#TID
'TID1_pos+TID2_pos+MTID3_pos','TID1_neg+TID2_neg+MTID3_neg',#ring 3 (mono)
'TID1_pos+TID2_pos+TID3_pos','TID1_neg+TID2_neg+TID3_neg',#ring 1-2 (matched)
#TID+TEC RING 1-3
'TID2_pos+TID3_pos+TEC1_pos','TID2_neg+TID3_neg+TEC1_neg',
'TID3_pos+TEC1_pos+TEC2_pos','TID3_neg+TEC1_neg+TEC2_neg',
#TEC RING 1-3
'TEC1_pos+TEC2_pos+TEC3_pos','TEC1_neg+TEC2_neg+TEC3_neg',
'TEC2_pos+TEC3_pos+TEC4_pos','TEC2_neg+TEC3_neg+TEC4_neg',
'TEC3_pos+TEC4_pos+TEC5_pos','TEC3_neg+TEC4_neg+TEC5_neg',
'TEC2_pos+TEC3_pos+TEC5_pos','TEC2_neg+TEC3_neg+TEC5_neg'
),
TIB = cms.PSet(
TTRHBuilder = cms.string('WithTrackAngle'),
matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
skipClusters = cms.InputTag('pixelLessStepClusters')
),
MTIB = cms.PSet(
TTRHBuilder = cms.string('WithTrackAngle'),
skipClusters = cms.InputTag('pixelLessStepClusters'),
rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit")
),
TID = cms.PSet(
matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
skipClusters = cms.InputTag('pixelLessStepClusters'),
useRingSlector = cms.bool(True),
TTRHBuilder = cms.string('WithTrackAngle'),
minRing = cms.int32(1),
maxRing = cms.int32(2)
),
MTID = cms.PSet(
rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
skipClusters = cms.InputTag('pixelLessStepClusters'),
useRingSlector = cms.bool(True),
TTRHBuilder = cms.string('WithTrackAngle'),
minRing = cms.int32(3),
maxRing = cms.int32(3)
),
TEC = cms.PSet(
matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
skipClusters = cms.InputTag('pixelLessStepClusters'),
useRingSlector = cms.bool(True),
TTRHBuilder = cms.string('WithTrackAngle'),
minRing = cms.int32(1),
maxRing = cms.int32(2)
)
)
# SEEDS
import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff
pixelLessStepSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone()
pixelLessStepSeeds.OrderedHitsFactoryPSet.SeedingLayers = 'pixelLessStepSeedLayers'
pixelLessStepSeeds.OrderedHitsFactoryPSet.ComponentName = 'StandardMultiHitGenerator'
pixelLessStepSeeds.OrderedHitsFactoryPSet.GeneratorPSet = cms.PSet(
useFixedPreFiltering = cms.bool(False),
maxElement = cms.uint32(100000),
ComponentName = cms.string('MultiHitGeneratorFromChi2'),
extraHitRPhitolerance = cms.double(0.2),
phiPreFiltering = cms.double(0.3),
extraHitRZtolerance = cms.double(0.25),
fnSigmaRZ = cms.double(2.0),
chi2VsPtCut = cms.bool(True),
pt_interv = cms.vdouble(0.7,1.0,2.0,5.0),
chi2_cuts = cms.vdouble(),
maxChi2 = cms.double(4.0),
extraPhiKDBox = cms.double(0.0),
refitHits = cms.bool(True),
ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
debug = cms.bool(False),
detIdsToDebug = cms.vint32(0,0,0)
)
pixelLessStepSeeds.SeedCreatorPSet.ComponentName = 'SeedFromConsecutiveHitsTripletOnlyCreator'
pixelLessStepSeeds.RegionFactoryPSet.RegionPSet.ptMin = 0.4
pixelLessStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength = 15.0
pixelLessStepSeeds.RegionFactoryPSet.RegionPSet.originRadius = 2.5
#pixelLessStepSeeds.SeedCreatorPSet.OriginTransverseErrorMultiplier = 1.0 #2.0 this is not used according to kevin
pixelLessStepSeeds.SeedComparitorPSet = cms.PSet(
ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
FilterAtHelixStage = cms.bool(True),
FilterPixelHits = cms.bool(False),
FilterStripHits = cms.bool(False),
ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter')
)

PixelLessStep = cms.Sequence(
pixelLessStepClusters*
pixelLessStepSeeds*
pixelLessStepTrackCandidates*
pixelLessStepTracks*
pixelLessStepSelector
)

0 comments on commit 2764135

Please sign in to comment.