Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
DataFormats
TrackerRecHit2D
interface
SiStripMatchedRecHit2D.h
Go to the documentation of this file.
1
#ifndef SiStripMatchedRecHit2D_H
2
#define SiStripMatchedRecHit2D_H
3
4
#include "
DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h
"
5
6
#include "
TkCloner.h
"
7
8
class
SiStripMatchedRecHit2D
final :
public
BaseTrackerRecHit
{
9
public
:
10
typedef
BaseTrackerRecHit
Base
;
11
12
SiStripMatchedRecHit2D
() {}
13
~SiStripMatchedRecHit2D
()
override
{}
14
15
SiStripMatchedRecHit2D
(
const
LocalPoint
& pos,
16
const
LocalError
&
err
,
17
GeomDet
const
& idet,
18
const
SiStripRecHit2D
* rMono,
19
const
SiStripRecHit2D
* rStereo)
20
:
BaseTrackerRecHit
(pos, err, idet, trackerHitRTTI::
match
),
21
clusterMono_
(rMono->omniClusterRef()),
22
clusterStereo_
(rStereo->omniClusterRef()) {}
23
24
// by value, as they will not exists anymore...
25
SiStripRecHit2D
stereoHit
()
const
{
return
SiStripRecHit2D
(
stereoId
(),
stereoClusterRef
()); }
26
SiStripRecHit2D
monoHit
()
const
{
return
SiStripRecHit2D
(
monoId
(),
monoClusterRef
()); }
27
28
unsigned
int
stereoId
()
const
{
return
rawId
() + 1; }
29
unsigned
int
monoId
()
const
{
return
rawId
() + 2; }
30
31
// (to be improved)
32
OmniClusterRef
const
&
firstClusterRef
()
const override
{
return
monoClusterRef
(); }
33
34
OmniClusterRef
const
&
stereoClusterRef
()
const
{
return
clusterStereo_
; }
35
OmniClusterRef
const
&
monoClusterRef
()
const
{
return
clusterMono_
; }
36
// Non const variants needed for cluster re-keying
37
OmniClusterRef
&
stereoClusterRef
() {
return
clusterStereo_
; }
38
OmniClusterRef
&
monoClusterRef
() {
return
clusterMono_
; }
39
40
SiStripCluster
const
&
stereoCluster
()
const
{
return
stereoClusterRef
().
stripCluster
(); }
41
SiStripCluster
const
&
monoCluster
()
const
{
return
monoClusterRef
().
stripCluster
(); }
42
43
SiStripMatchedRecHit2D
*
clone
()
const override
{
return
new
SiStripMatchedRecHit2D
(*
this
); }
44
#ifndef __GCCXML__
45
RecHitPointer
cloneSH
()
const override
{
return
std::make_shared<SiStripMatchedRecHit2D>(*this); }
46
#endif
47
48
int
dimension
()
const override
{
return
2; }
49
void
getKfComponents
(
KfComponentsHolder
& holder)
const override
{
getKfComponents2D
(holder); }
50
51
bool
sharesInput
(
const
TrackingRecHit
* other,
SharedInputType
what)
const override
;
52
53
bool
sharesInput
(
TrackerSingleRecHit
const
& other)
const
;
54
55
std::vector<const TrackingRecHit*>
recHits
()
const override
;
56
57
std::vector<TrackingRecHit*>
recHits
()
override
;
58
59
bool
canImproveWithTrack
()
const override
{
return
true
; }
60
61
private
:
62
// double dispatch
63
SiStripMatchedRecHit2D
*
clone_
(
TkCloner
const
& cloner,
TrajectoryStateOnSurface
const
& tsos)
const override
{
64
return
cloner(*
this
, tsos).release();
65
}
66
#ifndef __GCCXML__
67
RecHitPointer
cloneSH_
(
TkCloner
const
& cloner,
TrajectoryStateOnSurface
const
& tsos)
const override
{
68
return
cloner.
makeShared
(*
this
, tsos);
69
}
70
#endif
71
72
private
:
73
OmniClusterRef
clusterMono_
,
clusterStereo_
;
74
};
75
76
inline
bool
sharesClusters
(
SiStripMatchedRecHit2D
const
& h1,
77
SiStripMatchedRecHit2D
const
& h2,
78
TrackingRecHit::SharedInputType
what) {
79
bool
mono = h1.
monoClusterRef
() == h2.
monoClusterRef
();
80
bool
stereo = h1.
stereoClusterRef
() == h2.
stereoClusterRef
();
81
82
return
(what ==
TrackingRecHit::all
) ? (mono && stereo) : (mono || stereo);
83
}
84
85
#endif
TrackingRecHit::SharedInputType
SharedInputType
definition of equality via shared input
Definition:
TrackingRecHit.h:59
SiStripMatchedRecHit2D::stereoClusterRef
OmniClusterRef & stereoClusterRef()
Definition:
SiStripMatchedRecHit2D.h:37
SiStripMatchedRecHit2D::stereoId
unsigned int stereoId() const
Definition:
SiStripMatchedRecHit2D.h:28
SiStripMatchedRecHit2D::canImproveWithTrack
bool canImproveWithTrack() const override
Definition:
SiStripMatchedRecHit2D.h:59
SiStripMatchedRecHit2D::cloneSH
RecHitPointer cloneSH() const override
Definition:
SiStripMatchedRecHit2D.h:45
SiStripMatchedRecHit2D::monoCluster
SiStripCluster const & monoCluster() const
Definition:
SiStripMatchedRecHit2D.h:41
SiStripRecHit2D
Definition:
SiStripRecHit2D.h:7
SiStripMatchedRecHit2D::stereoClusterRef
OmniClusterRef const & stereoClusterRef() const
Definition:
SiStripMatchedRecHit2D.h:34
GeomDet
Definition:
GeomDet.h:27
TrackingRecHit
Definition:
TrackingRecHit.h:21
SiStripMatchedRecHit2D::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition:
SiStripMatchedRecHit2D.cc:30
TkCloner::makeShared
TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition:
TkCloner.h:24
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
TrackingRecHit::all
Definition:
TrackingRecHit.h:59
SiStripRecHit2D.h
SiStripMatchedRecHit2D
Definition:
SiStripMatchedRecHit2D.h:8
SiStripMatchedRecHit2D::Base
BaseTrackerRecHit Base
Definition:
SiStripMatchedRecHit2D.h:10
SiStripMatchedRecHit2D::firstClusterRef
OmniClusterRef const & firstClusterRef() const override
Definition:
SiStripMatchedRecHit2D.h:32
OmniClusterRef::stripCluster
SiStripCluster const & stripCluster() const
Definition:
OmniClusterRef.h:55
submitPVValidationJobs.err
tuple err
Definition:
submitPVValidationJobs.py:121
SiStripCluster
Definition:
SiStripCluster.h:8
SiStripMatchedRecHit2D::clone
SiStripMatchedRecHit2D * clone() const override
Definition:
SiStripMatchedRecHit2D.h:43
BaseTrackerRecHit::getKfComponents2D
void getKfComponents2D(KfComponentsHolder &holder) const
Definition:
BaseTrackerRecHit.cc:53
SiStripMatchedRecHit2D::sharesInput
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
Definition:
SiStripMatchedRecHit2D.cc:3
SiStripMatchedRecHit2D::~SiStripMatchedRecHit2D
~SiStripMatchedRecHit2D() override
Definition:
SiStripMatchedRecHit2D.h:13
TkCloner.h
SiStripMatchedRecHit2D::SiStripMatchedRecHit2D
SiStripMatchedRecHit2D()
Definition:
SiStripMatchedRecHit2D.h:12
SiStripMatchedRecHit2D::dimension
int dimension() const override
Definition:
SiStripMatchedRecHit2D.h:48
SiStripMatchedRecHit2D::monoClusterRef
OmniClusterRef const & monoClusterRef() const
Definition:
SiStripMatchedRecHit2D.h:35
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition:
TrackingRecHit.h:24
SiStripMatchedRecHit2D::clusterMono_
OmniClusterRef clusterMono_
Definition:
SiStripMatchedRecHit2D.h:73
SiStripMatchedRecHit2D::stereoHit
SiStripRecHit2D stereoHit() const
Definition:
SiStripMatchedRecHit2D.h:25
LocalError
Definition:
LocalError.h:12
BaseTrackerRecHit
Definition:
BaseTrackerRecHit.h:15
OmniClusterRef
Definition:
OmniClusterRef.h:12
SiStripMatchedRecHit2D::monoClusterRef
OmniClusterRef & monoClusterRef()
Definition:
SiStripMatchedRecHit2D.h:38
SiStripMatchedRecHit2D::monoHit
SiStripRecHit2D monoHit() const
Definition:
SiStripMatchedRecHit2D.h:26
Point3DBase< float, LocalTag >
SiStripMatchedRecHit2D::stereoCluster
SiStripCluster const & stereoCluster() const
Definition:
SiStripMatchedRecHit2D.h:40
TkCloner
Definition:
TkCloner.h:16
SiStripMatchedRecHit2D::getKfComponents
void getKfComponents(KfComponentsHolder &holder) const override
Definition:
SiStripMatchedRecHit2D.h:49
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition:
Utils.h:10
KfComponentsHolder
Definition:
KfComponentsHolder.h:13
SiStripMatchedRecHit2D::clone_
SiStripMatchedRecHit2D * clone_(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition:
SiStripMatchedRecHit2D.h:63
SiStripMatchedRecHit2D::monoId
unsigned int monoId() const
Definition:
SiStripMatchedRecHit2D.h:29
TrackerSingleRecHit
Definition:
TrackerSingleRecHit.h:11
SiStripMatchedRecHit2D::cloneSH_
RecHitPointer cloneSH_(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition:
SiStripMatchedRecHit2D.h:67
TrackingRecHit::rawId
id_type rawId() const
Definition:
TrackingRecHit.h:119
sharesClusters
bool sharesClusters(SiStripMatchedRecHit2D const &h1, SiStripMatchedRecHit2D const &h2, TrackingRecHit::SharedInputType what)
Definition:
SiStripMatchedRecHit2D.h:76
SiStripMatchedRecHit2D::SiStripMatchedRecHit2D
SiStripMatchedRecHit2D(const LocalPoint &pos, const LocalError &err, GeomDet const &idet, const SiStripRecHit2D *rMono, const SiStripRecHit2D *rStereo)
Definition:
SiStripMatchedRecHit2D.h:15
SiStripMatchedRecHit2D::clusterStereo_
OmniClusterRef clusterStereo_
Definition:
SiStripMatchedRecHit2D.h:73
Generated for CMSSW Reference Manual by
1.8.5