CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
LowPtClusterShapeSeedComparitor Class Reference

#include <LowPtClusterShapeSeedComparitor.h>

Inheritance diagram for LowPtClusterShapeSeedComparitor:
SeedComparitor

Public Member Functions

bool compatible (const SeedingHitSet &hits) const override
 
bool compatible (const SeedingHitSet &hits, const GlobalTrajectoryParameters &helixStateAtVertex, const FastHelix &helix) const override
 
bool compatible (const TrajectoryStateOnSurface &, SeedingHitSet::ConstRecHitPointer hit) const override
 
void init (const edm::Event &e, const edm::EventSetup &es) override
 
 LowPtClusterShapeSeedComparitor (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
 ~LowPtClusterShapeSeedComparitor () override
 
- Public Member Functions inherited from SeedComparitor
virtual ~SeedComparitor ()
 

Private Attributes

edm::Handle< SiPixelClusterShapeCachethePixelClusterShapeCache
 
edm::EDGetTokenT< SiPixelClusterShapeCachethePixelClusterShapeCacheToken
 
edm::ESHandle< ClusterShapeHitFiltertheShapeFilter
 something More...
 
std::string theShapeFilterLabel_
 
edm::ESHandle< TrackerTopologytheTTopo
 

Detailed Description

Definition at line 18 of file LowPtClusterShapeSeedComparitor.h.

Constructor & Destructor Documentation

◆ LowPtClusterShapeSeedComparitor()

LowPtClusterShapeSeedComparitor::LowPtClusterShapeSeedComparitor ( const edm::ParameterSet ps,
edm::ConsumesCollector iC 
)

Definition at line 83 of file LowPtClusterShapeSeedComparitor.cc.

86  iC.consumes<SiPixelClusterShapeCache>(ps.getParameter<edm::InputTag>("clusterShapeCacheSrc"))),
87  theShapeFilterLabel_(ps.getParameter<std::string>("clusterShapeHitFilter")) {}

◆ ~LowPtClusterShapeSeedComparitor()

LowPtClusterShapeSeedComparitor::~LowPtClusterShapeSeedComparitor ( )
inlineoverride

Definition at line 21 of file LowPtClusterShapeSeedComparitor.h.

21 {}

Member Function Documentation

◆ compatible() [1/3]

bool LowPtClusterShapeSeedComparitor::compatible ( const SeedingHitSet hits) const
overridevirtual

Implements SeedComparitor.

Definition at line 97 of file LowPtClusterShapeSeedComparitor.cc.

99 {
100  assert(hits.size() == 3);
101 
103  if (filter == nullptr)
104  throw cms::Exception("LogicError") << "LowPtClusterShapeSeedComparitor: init(EventSetup) method was not called";
105 
106  // Get global positions
107  GlobalPoint globalPoss[3];
108  getGlobalPos(hits, globalPoss);
109 
110  // Get global directions
111  GlobalVector globalDirs[3];
112 
113  bool ok = getGlobalDirs(globalPoss, globalDirs);
114 
115  // Check whether shape of pixel cluster is compatible
116  // with local track direction
117 
118  if (!ok) {
119  LogDebug("LowPtClusterShapeSeedComparitor") << "curvarture 0:"
120  << "\nnHits: " << hits.size() << " will say the seed is good anyway.";
121  return true;
122  }
123 
124  for (int i = 0; i < 3; i++) {
125  const SiPixelRecHit* pixelRecHit = dynamic_cast<const SiPixelRecHit*>(hits[i]->hit());
126 
127  if (!pixelRecHit) {
128  edm::LogError("LowPtClusterShapeSeedComparitor") << "this is not a pixel cluster";
129  ok = false;
130  break;
131  }
132 
133  if (!pixelRecHit->isValid()) {
134  ok = false;
135  break;
136  }
137 
138  LogDebug("LowPtClusterShapeSeedComparitor") << "about to compute compatibility."
139  << "hit ptr: " << pixelRecHit << "global direction:" << globalDirs[i];
140 
141  if (!filter->isCompatible(*pixelRecHit, globalDirs[i], *thePixelClusterShapeCache)) {
142  LogTrace("LowPtClusterShapeSeedComparitor")
143  << " clusShape is not compatible" << HitInfo::getInfo(*hits[i]->hit(), theTTopo.product());
144 
145  ok = false;
146  break;
147  }
148  }
149 
150  return ok;
151 }

References cms::cuda::assert(), Exception, ALCARECOTkAlBeamHalo_cff::filter, HitInfo::getInfo(), hfClusterShapes_cfi::hits, mps_fire::i, TrackingRecHit::isValid(), LogDebug, LogTrace, and convertSQLiteXML::ok.

◆ compatible() [2/3]

bool LowPtClusterShapeSeedComparitor::compatible ( const SeedingHitSet hits,
const GlobalTrajectoryParameters helixStateAtVertex,
const FastHelix helix 
) const
inlineoverridevirtual

Implements SeedComparitor.

Definition at line 27 of file LowPtClusterShapeSeedComparitor.h.

29  {
30  return true;
31  }

◆ compatible() [3/3]

bool LowPtClusterShapeSeedComparitor::compatible ( const TrajectoryStateOnSurface ,
SeedingHitSet::ConstRecHitPointer  hit 
) const
inlineoverridevirtual

Implements SeedComparitor.

Definition at line 24 of file LowPtClusterShapeSeedComparitor.h.

24  {
25  return true;
26  }

◆ init()

void LowPtClusterShapeSeedComparitor::init ( const edm::Event e,
const edm::EventSetup es 
)
overridevirtual

Member Data Documentation

◆ thePixelClusterShapeCache

edm::Handle<SiPixelClusterShapeCache> LowPtClusterShapeSeedComparitor::thePixelClusterShapeCache
private

Definition at line 38 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

◆ thePixelClusterShapeCacheToken

edm::EDGetTokenT<SiPixelClusterShapeCache> LowPtClusterShapeSeedComparitor::thePixelClusterShapeCacheToken
private

Definition at line 37 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

◆ theShapeFilter

edm::ESHandle<ClusterShapeHitFilter> LowPtClusterShapeSeedComparitor::theShapeFilter
private

something

Definition at line 35 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

◆ theShapeFilterLabel_

std::string LowPtClusterShapeSeedComparitor::theShapeFilterLabel_
private

Definition at line 39 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

◆ theTTopo

edm::ESHandle<TrackerTopology> LowPtClusterShapeSeedComparitor::theTTopo
private

Definition at line 36 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

Vector3DBase
Definition: Vector3DBase.h:8
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelClusterShapeCache
Definition: SiPixelClusterShapeCache.h:43
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
LowPtClusterShapeSeedComparitor::thePixelClusterShapeCache
edm::Handle< SiPixelClusterShapeCache > thePixelClusterShapeCache
Definition: LowPtClusterShapeSeedComparitor.h:38
ClusterShapeHitFilter
Definition: ClusterShapeHitFilter.h:149
cms::cuda::assert
assert(be >=bs)
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
LowPtClusterShapeSeedComparitor::theShapeFilterLabel_
std::string theShapeFilterLabel_
Definition: LowPtClusterShapeSeedComparitor.h:39
SiPixelRecHit
Our base class.
Definition: SiPixelRecHit.h:23
LowPtClusterShapeSeedComparitor::theTTopo
edm::ESHandle< TrackerTopology > theTTopo
Definition: LowPtClusterShapeSeedComparitor.h:36
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
LowPtClusterShapeSeedComparitor::thePixelClusterShapeCacheToken
edm::EDGetTokenT< SiPixelClusterShapeCache > thePixelClusterShapeCacheToken
Definition: LowPtClusterShapeSeedComparitor.h:37
CkfComponentsRecord
Definition: CkfComponentsRecord.h:22
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
Point3DBase< float, GlobalTag >
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
LowPtClusterShapeSeedComparitor::theShapeFilter
edm::ESHandle< ClusterShapeHitFilter > theShapeFilter
something
Definition: LowPtClusterShapeSeedComparitor.h:35
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
TrackingRecHit::isValid
bool isValid() const
Definition: TrackingRecHit.h:141
edm::InputTag
Definition: InputTag.h:15
hit
Definition: SiStripHitEffFromCalibTree.cc:88
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HitInfo::getInfo
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
Definition: HitInfo.cc:19