CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trackerTFP::TrackKFin Class Reference

#include <DataFormats.h>

Inheritance diagram for trackerTFP::TrackKFin:
trackerTFP::Track< TTBV, int, int, double, double, double, double >

Public Member Functions

double cot () const
 
double cotGlobal () const
 
TTBV hitPattern () const
 
bool hitPattern (int index) const
 
double inv2R () const
 
StubKFinlayerStub (int layer) const
 
std::vector< StubKFin * > layerStubs (int layer) const
 
const TTBVmaybePattern () const
 
bool maybePattern (int index) const
 
double phiT () const
 
int sectorEta () const
 
int sectorPhi () const
 
std::vector< std::vector< StubKFin * > > stubs () const
 
 TrackKFin (const tt::FrameTrack &frame, const DataFormats *dataFormats, const std::vector< StubKFin *> &stubs)
 
 TrackKFin (const StubZHT &stub, const TTTrackRef &ttTrackRef, const TTBV &maybePattern)
 
 TrackKFin (const TTTrackRef &ttTrackRef, const DataFormats *dataFormats, const TTBV &maybePattern, double phiT, double qOverPt, double zT, double cot, int sectorPhi, int sectorEta)
 
std::vector< TTStubRefttStubRefs (const TTBV &hitPattern, const std::vector< int > &layerMap) const
 
double zT () const
 
 ~TrackKFin ()
 
- Public Member Functions inherited from trackerTFP::Track< TTBV, int, int, double, double, double, double >
tt::Frame bv () const
 
std::tuple< Ts... > data () const
 
const DataFormatsdataFormats () const
 
tt::FrameTrack frame () const
 
 operator bool () const
 
Process p () const
 
 Track (const tt::FrameTrack &frame, const DataFormats *dataFormats, Process p)
 
 Track (const Track< Others... > &track, Ts... data)
 
 Track (const Stub< Others... > &stub, const TTTrackRef &ttTrackRef, Ts... data)
 
 Track (const TTTrackRef &ttTrackRef, const DataFormats *dataFormats, Process p, Ts... data)
 
TTTrackRef ttTrackRef () const
 
 ~Track ()
 

Private Attributes

TTBV hitPattern_
 
std::vector< std::vector< StubKFin * > > stubs_
 

Additional Inherited Members

- Protected Member Functions inherited from trackerTFP::Track< TTBV, int, int, double, double, double, double >
double base (Variable v) const
 
DataFormat format (Variable v) const
 
DataFormat format (Variable v, Process p) const
 
const tt::Setupsetup () const
 
int width (Variable v) const
 
- Protected Attributes inherited from trackerTFP::Track< TTBV, int, int, double, double, double, double >
std::tuple< Ts... > data_
 
const DataFormatsdataFormats_
 
tt::FrameTrack frame_
 
Process p_
 

Detailed Description

Definition at line 894 of file DataFormats.h.

Constructor & Destructor Documentation

◆ TrackKFin() [1/3]

trackerTFP::TrackKFin::TrackKFin ( const tt::FrameTrack frame,
const DataFormats dataFormats,
const std::vector< StubKFin *> &  stubs 
)

Definition at line 416 of file DataFormats.cc.

References trackerTFP::Track< TTBV, int, int, double, double, double, double >::dataFormats(), hitPattern_, trackerTFP::kfin, trackerTFP::layer, tt::Setup::numLayers(), TTBV::set(), trackerTFP::DataFormats::setup(), stubs(), and stubs_.

417  : Track(frame, dataFormats, Process::kfin), stubs_(setup()->numLayers()), hitPattern_(0, setup()->numLayers()) {
418  vector<int> nStubs(stubs_.size(), 0);
419  for (StubKFin* stub : stubs)
420  nStubs[stub->layer()]++;
421  for (int layer = 0; layer < dataFormats->setup()->numLayers(); layer++)
422  stubs_[layer].reserve(nStubs[layer]);
423  for (StubKFin* stub : stubs) {
424  const int layer = stub->layer();
425  stubs_[layer].push_back(stub);
427  }
428  }
std::vector< std::vector< StubKFin * > > stubs_
Definition: DataFormats.h:944
Track(const tt::FrameTrack &frame, const DataFormats *dataFormats, Process p)
Definition: DataFormats.cc:393
TTBV & set()
Definition: TTBV.h:187
int numLayers() const
Definition: Setup.h:215
const tt::Setup * setup() const
Definition: DataFormats.h:488
std::vector< std::vector< StubKFin * > > stubs() const
Definition: DataFormats.h:938

◆ TrackKFin() [2/3]

trackerTFP::TrackKFin::TrackKFin ( const StubZHT stub,
const TTTrackRef ttTrackRef,
const TTBV maybePattern 
)

Definition at line 431 of file DataFormats.cc.

References trackerTFP::DataFormats::convertTrack(), trackerTFP::cot, trackerTFP::StubZHT::cot(), trackerTFP::Track< TTBV, int, int, double, double, double, double >::data_, trackerTFP::Track< TTBV, int, int, double, double, double, double >::dataFormats_, trackerTFP::DataFormat::floating(), trackerTFP::Track< TTBV, int, int, double, double, double, double >::format(), trackerTFP::Track< TTBV, int, int, double, double, double, double >::frame_, trackerTFP::inv2R, trackerTFP::StubZHT::inv2R(), trackerTFP::mht, trackerTFP::Track< TTBV, int, int, double, double, double, double >::p_, trackerTFP::phiT, trackerTFP::StubZHT::phiT(), trackerTFP::sectorEta, trackerTFP::sectorPhi, trackerTFP::zht, trackerTFP::zT, and trackerTFP::StubZHT::zT().

432  : Track(stub, ttTrackRef, maybePattern, stub.sectorPhi(), stub.sectorEta(), 0., 0., 0., 0.),
433  stubs_(setup()->numLayers()),
434  hitPattern_(0, setup()->numLayers()) {
435  get<3>(data_) = format(Variable::phiT, Process::mht).floating(stub.phiT());
436  get<4>(data_) = format(Variable::inv2R, Process::mht).floating(stub.inv2R());
437  get<5>(data_) = format(Variable::zT, Process::zht).floating(stub.zT());
438  get<6>(data_) = format(Variable::cot, Process::zht).floating(stub.cot());
440  }
const TTBV & maybePattern() const
Definition: DataFormats.h:912
std::vector< std::vector< StubKFin * > > stubs_
Definition: DataFormats.h:944
Track(const tt::FrameTrack &frame, const DataFormats *dataFormats, Process p)
Definition: DataFormats.cc:393
double floating(int i) const
Definition: DataFormats.h:94
void convertTrack(Process p, const tt::Frame &bv, std::tuple< Ts... > &data) const

◆ TrackKFin() [3/3]

trackerTFP::TrackKFin::TrackKFin ( const TTTrackRef ttTrackRef,
const DataFormats dataFormats,
const TTBV maybePattern,
double  phiT,
double  qOverPt,
double  zT,
double  cot,
int  sectorPhi,
int  sectorEta 
)

Definition at line 443 of file DataFormats.cc.

References trackerTFP::DataFormats::convertTrack(), trackerTFP::cot, trackerTFP::Track< TTBV, int, int, double, double, double, double >::data_, trackerTFP::Track< TTBV, int, int, double, double, double, double >::dataFormats_, trackerTFP::Track< TTBV, int, int, double, double, double, double >::frame_, trackerTFP::inv2R, trackerTFP::kfin, trackerTFP::Track< TTBV, int, int, double, double, double, double >::p_, trackerTFP::phiT, trackerTFP::sectorEta, trackerTFP::sectorPhi, and trackerTFP::zT.

453  stubs_(setup()->numLayers()),
454  hitPattern_(0, setup()->numLayers()) {
456  }
const TTBV & maybePattern() const
Definition: DataFormats.h:912
std::vector< std::vector< StubKFin * > > stubs_
Definition: DataFormats.h:944
Track(const tt::FrameTrack &frame, const DataFormats *dataFormats, Process p)
Definition: DataFormats.cc:393
double zT() const
Definition: DataFormats.h:922
double phiT() const
Definition: DataFormats.h:918
double cot() const
Definition: DataFormats.h:924
int sectorPhi() const
Definition: DataFormats.h:914
void convertTrack(Process p, const tt::Frame &bv, std::tuple< Ts... > &data) const
double inv2R() const
Definition: DataFormats.h:920
int sectorEta() const
Definition: DataFormats.h:916

◆ ~TrackKFin()

trackerTFP::TrackKFin::~TrackKFin ( )
inline

Definition at line 910 of file DataFormats.h.

910 {}

Member Function Documentation

◆ cot()

double trackerTFP::TrackKFin::cot ( ) const
inline

◆ cotGlobal()

double trackerTFP::TrackKFin::cotGlobal ( ) const
inline

◆ hitPattern() [1/2]

TTBV trackerTFP::TrackKFin::hitPattern ( ) const
inline

Definition at line 926 of file DataFormats.h.

References hitPattern_.

Referenced by trackerTFP::State::State(), and ttStubRefs().

926 { return hitPattern_; }

◆ hitPattern() [2/2]

bool trackerTFP::TrackKFin::hitPattern ( int  index) const
inline

Definition at line 928 of file DataFormats.h.

References hitPattern_.

◆ inv2R()

double trackerTFP::TrackKFin::inv2R ( ) const
inline

◆ layerStub()

StubKFin* trackerTFP::TrackKFin::layerStub ( int  layer) const
inline

Definition at line 934 of file DataFormats.h.

References trackerTFP::layer, and stubs_.

Referenced by trackerTFP::State::State().

934 { return stubs_[layer].front(); }
std::vector< std::vector< StubKFin * > > stubs_
Definition: DataFormats.h:944

◆ layerStubs()

std::vector<StubKFin*> trackerTFP::TrackKFin::layerStubs ( int  layer) const
inline

Definition at line 932 of file DataFormats.h.

References trackerTFP::layer, and stubs_.

Referenced by trackerTFP::State::State().

932 { return stubs_[layer]; }
std::vector< std::vector< StubKFin * > > stubs_
Definition: DataFormats.h:944

◆ maybePattern() [1/2]

const TTBV& trackerTFP::TrackKFin::maybePattern ( ) const
inline

◆ maybePattern() [2/2]

bool trackerTFP::TrackKFin::maybePattern ( int  index) const
inline

Definition at line 930 of file DataFormats.h.

References hitPattern_, and maybePattern().

Referenced by maybePattern().

◆ phiT()

double trackerTFP::TrackKFin::phiT ( ) const
inline

◆ sectorEta()

int trackerTFP::TrackKFin::sectorEta ( ) const
inline

◆ sectorPhi()

int trackerTFP::TrackKFin::sectorPhi ( ) const
inline

◆ stubs()

std::vector<std::vector<StubKFin*> > trackerTFP::TrackKFin::stubs ( ) const
inline

Definition at line 938 of file DataFormats.h.

References stubs_.

Referenced by TrackKFin(), and ttStubRefs().

938 { return stubs_; }
std::vector< std::vector< StubKFin * > > stubs_
Definition: DataFormats.h:944

◆ ttStubRefs()

vector< TTStubRef > trackerTFP::TrackKFin::ttStubRefs ( const TTBV hitPattern,
const std::vector< int > &  layerMap 
) const

Definition at line 458 of file DataFormats.cc.

References TTBV::count(), hitPattern(), trackerTFP::layer, tt::Setup::numLayers(), trackerTFP::Track< TTBV, int, int, double, double, double, double >::setup(), stubs(), and stubs_.

458  {
459  vector<TTStubRef> stubs;
460  stubs.reserve(hitPattern.count());
461  for (int layer = 0; layer < setup()->numLayers(); layer++)
462  if (hitPattern[layer])
463  stubs.push_back(stubs_[layer][layerMap[layer]]->ttStubRef());
464  return stubs;
465  }
std::vector< std::vector< StubKFin * > > stubs_
Definition: DataFormats.h:944
TTBV hitPattern() const
Definition: DataFormats.h:926
int count() const
Definition: TTBV.h:88
int numLayers() const
Definition: Setup.h:215
std::vector< std::vector< StubKFin * > > stubs() const
Definition: DataFormats.h:938

◆ zT()

double trackerTFP::TrackKFin::zT ( ) const
inline

Member Data Documentation

◆ hitPattern_

TTBV trackerTFP::TrackKFin::hitPattern_
private

Definition at line 946 of file DataFormats.h.

Referenced by hitPattern(), maybePattern(), and TrackKFin().

◆ stubs_

std::vector<std::vector<StubKFin*> > trackerTFP::TrackKFin::stubs_
private

Definition at line 944 of file DataFormats.h.

Referenced by layerStub(), layerStubs(), stubs(), TrackKFin(), and ttStubRefs().