CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
SeedingHitSet Class Reference

#include <SeedingHitSet.h>

Inheritance diagram for SeedingHitSet:
OrderedHitPair OrderedHitTriplet

Public Types

using ConstRecHitPointer = BaseTrackerRecHit const *
 
using RecHit = BaseTrackerRecHit
 
using RecHitPointer = BaseTrackerRecHit *
 

Public Member Functions

ConstRecHitPointer const * data () const
 
ConstRecHitPointer get (unsigned int i) const
 
ConstRecHitPointer operator[] (unsigned int i) const
 
 SeedingHitSet ()=default
 
 SeedingHitSet (ConstRecHitPointer one, ConstRecHitPointer two)
 
 SeedingHitSet (ConstRecHitPointer one, ConstRecHitPointer two, ConstRecHitPointer three)
 
 SeedingHitSet (ConstRecHitPointer one, ConstRecHitPointer two, ConstRecHitPointer three, ConstRecHitPointer four)
 
 SeedingHitSet (const std::vector< ConstRecHitPointer > &hits)
 
 SeedingHitSet (const std::initializer_list< ConstRecHitPointer > &hits)
 
unsigned int size () const
 

Static Public Member Functions

static ConstRecHitPointer nullPtr ()
 

Protected Attributes

std::vector< ConstRecHitPointertheRecHits
 

Detailed Description

Definition at line 10 of file SeedingHitSet.h.

Member Typedef Documentation

◆ ConstRecHitPointer

Definition at line 14 of file SeedingHitSet.h.

◆ RecHit

Definition at line 12 of file SeedingHitSet.h.

◆ RecHitPointer

Definition at line 13 of file SeedingHitSet.h.

Constructor & Destructor Documentation

◆ SeedingHitSet() [1/6]

SeedingHitSet::SeedingHitSet ( )
default

◆ SeedingHitSet() [2/6]

SeedingHitSet::SeedingHitSet ( ConstRecHitPointer  one,
ConstRecHitPointer  two 
)
inline

◆ SeedingHitSet() [3/6]

SeedingHitSet::SeedingHitSet ( ConstRecHitPointer  one,
ConstRecHitPointer  two,
ConstRecHitPointer  three 
)
inline

◆ SeedingHitSet() [4/6]

SeedingHitSet::SeedingHitSet ( ConstRecHitPointer  one,
ConstRecHitPointer  two,
ConstRecHitPointer  three,
ConstRecHitPointer  four 
)
inline

Definition at line 25 of file SeedingHitSet.h.

References SiPixelPI::one, and SiPixelPI::two.

◆ SeedingHitSet() [5/6]

SeedingHitSet::SeedingHitSet ( const std::vector< ConstRecHitPointer > &  hits)
inline

Definition at line 28 of file SeedingHitSet.h.

References filterCSVwithJSON::copy, HLT_2024v12_cff::distance, mps_fire::end, spr::find(), hfClusterShapes_cfi::hits, nullPtr(), size(), and theRecHits.

28  {
29  if (hits.size() >= 2) {
30  auto end = std::find(hits.begin(), hits.end(), nullPtr());
31  auto size = std::distance(hits.begin(), end);
32  if (size >= 2) {
33  theRecHits.reserve(size);
34  std::copy(hits.begin(), end, std::back_inserter(theRecHits));
35  }
36  }
37  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< ConstRecHitPointer > theRecHits
Definition: SeedingHitSet.h:58
static ConstRecHitPointer nullPtr()
Definition: SeedingHitSet.h:16
unsigned int size() const
Definition: SeedingHitSet.h:52

◆ SeedingHitSet() [6/6]

SeedingHitSet::SeedingHitSet ( const std::initializer_list< ConstRecHitPointer > &  hits)
inline

Definition at line 39 of file SeedingHitSet.h.

References filterCSVwithJSON::copy, HLT_2024v12_cff::distance, mps_fire::end, spr::find(), hfClusterShapes_cfi::hits, nullPtr(), size(), and theRecHits.

39  {
40  if (hits.size() >= 2) {
41  auto end = std::find(hits.begin(), hits.end(), nullPtr());
42  auto size = std::distance(hits.begin(), end);
43  if (size >= 2) {
44  theRecHits.reserve(size);
45  std::copy(hits.begin(), end, std::back_inserter(theRecHits));
46  }
47  }
48  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< ConstRecHitPointer > theRecHits
Definition: SeedingHitSet.h:58
static ConstRecHitPointer nullPtr()
Definition: SeedingHitSet.h:16
unsigned int size() const
Definition: SeedingHitSet.h:52

Member Function Documentation

◆ data()

ConstRecHitPointer const* SeedingHitSet::data ( ) const
inline

Definition at line 50 of file SeedingHitSet.h.

References theRecHits.

50 { return theRecHits.data(); }
std::vector< ConstRecHitPointer > theRecHits
Definition: SeedingHitSet.h:58

◆ get()

ConstRecHitPointer SeedingHitSet::get ( unsigned int  i) const
inline

◆ nullPtr()

static ConstRecHitPointer SeedingHitSet::nullPtr ( )
inlinestatic

Definition at line 16 of file SeedingHitSet.h.

Referenced by PixelTrackCleanerWrapper::clean(), and SeedingHitSet().

16 { return nullptr; }

◆ operator[]()

ConstRecHitPointer SeedingHitSet::operator[] ( unsigned int  i) const
inline

Definition at line 55 of file SeedingHitSet.h.

References mps_fire::i, and theRecHits.

55 { return theRecHits[i]; }
std::vector< ConstRecHitPointer > theRecHits
Definition: SeedingHitSet.h:58

◆ size()

unsigned int SeedingHitSet::size ( void  ) const
inline

Member Data Documentation

◆ theRecHits

std::vector<ConstRecHitPointer> SeedingHitSet::theRecHits
protected

Definition at line 58 of file SeedingHitSet.h.

Referenced by data(), get(), operator[](), SeedingHitSet(), and size().