Skip to content

Commit

Permalink
Merge pull request #3818 from thspeer/switchOffClusterShape
Browse files Browse the repository at this point in the history
Tracking: Switch off cluster shape in step6 seeding
  • Loading branch information
davidlange6 committed May 14, 2014
2 parents cd166fa + a4acb64 commit 39e8432
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
Expand Up @@ -164,6 +164,9 @@ class ClusterShapeHitFilter

~ClusterShapeHitFilter();

void setShapeCuts(bool cutOnPixelShape, bool cutOnStripShape) {
cutOnPixelShape_ = cutOnPixelShape; cutOnStripShape_ = cutOnStripShape;}

void setChargeCuts(bool cutOnPixelCharge, float minGoodPixelCharge,
bool cutOnStripCharge, float minGoodStripCharge) {
cutOnPixelCharge_ = cutOnPixelCharge; minGoodPixelCharge_= minGoodPixelCharge;
Expand Down Expand Up @@ -248,6 +251,7 @@ class ClusterShapeHitFilter
float theAngle[6];
bool cutOnPixelCharge_, cutOnStripCharge_;
float minGoodPixelCharge_, minGoodStripCharge_;
bool cutOnPixelShape_, cutOnStripShape_;
bool checkClusterCharge(DetId detId, const SiStripCluster& cluster, const LocalVector & ldir) const;
bool checkClusterCharge(DetId detId, const SiPixelCluster& cluster, const LocalVector & ldir) const;
};
Expand Down
Expand Up @@ -51,6 +51,7 @@ class ClusterShapeHitFilterESProducer : public edm::ESProducer
const std::string use_PixelShapeFile;
bool cutOnPixelCharge_, cutOnStripCharge_;
float minGoodPixelCharge_, minGoodStripCharge_;
bool cutOnPixelShape_, cutOnStripShape_;
};

#endif
Expand Up @@ -55,6 +55,7 @@ ClusterShapeHitFilter::ClusterShapeHitFilter
// Load strip limits
loadStripLimits();
cutOnPixelCharge_ = cutOnStripCharge_ = false;
cutOnPixelShape_ = cutOnStripShape_ = true;
}

/*****************************************************************************/
Expand Down Expand Up @@ -306,6 +307,7 @@ bool ClusterShapeHitFilter::isCompatible
{
// Get detector
if (cutOnPixelCharge_ && (!checkClusterCharge(recHit.geographicalId(), *(recHit.cluster()), ldir))) return false;
if (!cutOnPixelShape_) return true;

const PixelData & pd = getpd(recHit,ipd);

Expand Down Expand Up @@ -387,6 +389,7 @@ bool ClusterShapeHitFilter::isCompatible
float pred;

if (cutOnStripCharge_ && (!checkClusterCharge(detId, cluster, ldir))) return false;
if (!cutOnStripShape_) return true;

if(getSizes(detId, cluster, ldir, meas, pred))
{
Expand Down
Expand Up @@ -19,6 +19,8 @@ ClusterShapeHitFilterESProducer::ClusterShapeHitFilterESProducer
cutOnStripCharge_ = iConfig.exists("minGoodStripCharge");
minGoodPixelCharge_= (cutOnPixelCharge_ ? iConfig.getParameter<double>("minGoodPixelCharge") : 0);
minGoodStripCharge_= (cutOnStripCharge_ ? iConfig.getParameter<double>("minGoodStripCharge") : 0);
cutOnPixelShape_ = (iConfig.exists("doPixelShapeCut") ? iConfig.getParameter<bool>("doPixelShapeCut") : true);
cutOnStripShape_ = (iConfig.exists("doStripShapeCut") ? iConfig.getParameter<bool>("doStripShapeCut") : true);

edm::LogInfo("ClusterShapeHitFilterESProducer")
<< " with name: " << componentName;
Expand Down Expand Up @@ -67,6 +69,7 @@ ClusterShapeHitFilterESProducer::produce
pixel.product(),
strip.product(),
&use_PixelShapeFile));
aFilter->setShapeCuts(cutOnPixelShape_, cutOnStripShape_);
aFilter->setChargeCuts(cutOnPixelCharge_, minGoodPixelCharge_, cutOnStripCharge_,
minGoodStripCharge_);
return aFilter;
Expand Down
3 changes: 2 additions & 1 deletion RecoTracker/IterativeTracking/python/TobTecStep_cff.py
Expand Up @@ -100,7 +100,8 @@
tobTecStepClusterShapeHitFilter = RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi.ClusterShapeHitFilterESProducer.clone(
ComponentName = cms.string('tobTecStepClusterShapeHitFilter'),
PixelShapeFile= cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape.par'),
minGoodStripCharge = cms.double(2069)
minGoodStripCharge = cms.double(2069),
doStripShapeCut = cms.bool(False)
)

import RecoTracker.TkSeedGenerator.GlobalMixedSeeds_cff
Expand Down

0 comments on commit 39e8432

Please sign in to comment.