Main Page
Namespaces
Classes
Package Documentation
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
,
const
LocalError
& err,
GeomDet
const
& idet,
16
const
SiStripRecHit2D
* rMono,
const
SiStripRecHit2D
* rStereo):
17
BaseTrackerRecHit
(pos, err, idet,
trackerHitRTTI
::
match
),
clusterMono_
(rMono->omniClusterRef()),
clusterStereo_
(rStereo->omniClusterRef()){}
18
19
// by value, as they will not exists anymore...
20
SiStripRecHit2D
stereoHit
()
const
{
return
SiStripRecHit2D
(
stereoId
(),
stereoClusterRef
()) ;}
21
SiStripRecHit2D
monoHit
()
const
{
return
SiStripRecHit2D
(
monoId
(),
monoClusterRef
());}
22
23
unsigned
int
stereoId
()
const
{
return
rawId
()+1;}
24
unsigned
int
monoId
()
const
{
return
rawId
()+2;}
25
26
// (to be improved)
27
OmniClusterRef
const
&
firstClusterRef
()
const override
{
return
monoClusterRef
();}
28
29
30
OmniClusterRef
const
&
stereoClusterRef
()
const
{
return
clusterStereo_
;}
31
OmniClusterRef
const
&
monoClusterRef
()
const
{
return
clusterMono_
;}
32
// Non const variants needed for cluster re-keying
33
OmniClusterRef
&
stereoClusterRef
() {
return
clusterStereo_
;}
34
OmniClusterRef
&
monoClusterRef
() {
return
clusterMono_
;}
35
36
SiStripCluster
const
&
stereoCluster
()
const
{
37
return
stereoClusterRef
().
stripCluster
();
38
}
39
SiStripCluster
const
&
monoCluster
()
const
{
40
return
monoClusterRef
().
stripCluster
();
41
}
42
43
44
SiStripMatchedRecHit2D
*
clone
()
const override
{
return
new
SiStripMatchedRecHit2D
( *
this
);}
45
#ifndef __GCCXML__
46
RecHitPointer
cloneSH
()
const override
{
return
std::make_shared<SiStripMatchedRecHit2D>(*this);}
47
#endif
48
49
50
int
dimension
()
const override
{
return
2;}
51
void
getKfComponents
(
KfComponentsHolder
& holder )
const override
{
getKfComponents2D
(holder); }
52
53
54
55
bool
sharesInput
(
const
TrackingRecHit
*
other
,
SharedInputType
what)
const override
;
56
57
bool
sharesInput
(
TrackerSingleRecHit
const
& other)
const
;
58
59
std::vector<const TrackingRecHit*>
recHits
()
const override
;
60
61
std::vector<TrackingRecHit*>
recHits
()
override
;
62
63
bool
canImproveWithTrack
()
const override
{
return
true
;}
64
private
:
65
// double dispatch
66
SiStripMatchedRecHit2D
*
clone
(
TkCloner
const
& cloner,
TrajectoryStateOnSurface
const
& tsos)
const override
{
67
return
cloner(*
this
,tsos).release();
68
}
69
#ifndef __GCCXML__
70
RecHitPointer
cloneSH
(
TkCloner
const
& cloner,
TrajectoryStateOnSurface
const
& tsos)
const override
{
71
return
cloner.
makeShared
(*
this
,tsos);
72
}
73
#endif
74
75
private
:
76
OmniClusterRef
clusterMono_
,
clusterStereo_
;
77
};
78
79
80
inline
81
bool
sharesClusters
(
SiStripMatchedRecHit2D
const
& h1,
SiStripMatchedRecHit2D
const
& h2,
82
TrackingRecHit::SharedInputType
what) {
83
bool
mono = h1.
monoClusterRef
()== h2.
monoClusterRef
();
84
bool
stereo = h1.
stereoClusterRef
()== h2.
stereoClusterRef
();
85
86
return
(what==
TrackingRecHit::all
) ? (mono&&stereo) : (mono||stereo);
87
88
}
89
90
#endif
TrackingRecHit::SharedInputType
SharedInputType
definition of equality via shared input
Definition:
TrackingRecHit.h:55
SiStripMatchedRecHit2D::canImproveWithTrack
bool canImproveWithTrack() const override
Definition:
SiStripMatchedRecHit2D.h:63
SiStripMatchedRecHit2D::stereoClusterRef
OmniClusterRef & stereoClusterRef()
Definition:
SiStripMatchedRecHit2D.h:33
SiStripMatchedRecHit2D::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition:
SiStripMatchedRecHit2D.cc:34
SiStripMatchedRecHit2D::stereoId
unsigned int stereoId() const
Definition:
SiStripMatchedRecHit2D.h:23
SiStripMatchedRecHit2D::cloneSH
RecHitPointer cloneSH() const override
Definition:
SiStripMatchedRecHit2D.h:46
SiStripMatchedRecHit2D::monoCluster
SiStripCluster const & monoCluster() const
Definition:
SiStripMatchedRecHit2D.h:39
SiStripRecHit2D
Definition:
SiStripRecHit2D.h:8
SiStripMatchedRecHit2D::stereoClusterRef
OmniClusterRef const & stereoClusterRef() const
Definition:
SiStripMatchedRecHit2D.h:30
GeomDet
Definition:
GeomDet.h:29
TrackingRecHit
Definition:
TrackingRecHit.h:23
TkCloner::makeShared
TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition:
TkCloner.h:23
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:17
TrackingRecHit::all
Definition:
TrackingRecHit.h:55
SiStripRecHit2D.h
SiStripMatchedRecHit2D
Definition:
SiStripMatchedRecHit2D.h:8
SiStripMatchedRecHit2D::Base
BaseTrackerRecHit Base
Definition:
SiStripMatchedRecHit2D.h:10
SiStripMatchedRecHit2D::cloneSH
RecHitPointer cloneSH(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition:
SiStripMatchedRecHit2D.h:70
OmniClusterRef::stripCluster
SiStripCluster const & stripCluster() const
Definition:
OmniClusterRef.h:48
SiStripMatchedRecHit2D::dimension
int dimension() const override
Definition:
SiStripMatchedRecHit2D.h:50
trackerHitRTTI
Definition:
BaseTrackerRecHit.h:16
SiStripCluster
Definition:
SiStripCluster.h:9
SiStripMatchedRecHit2D::clone
SiStripMatchedRecHit2D * clone() const override
Definition:
SiStripMatchedRecHit2D.h:44
trackingPlots.other
other
Definition:
trackingPlots.py:1399
BaseTrackerRecHit::getKfComponents2D
void getKfComponents2D(KfComponentsHolder &holder) const
Definition:
BaseTrackerRecHit.cc:56
SiStripMatchedRecHit2D::~SiStripMatchedRecHit2D
~SiStripMatchedRecHit2D() override
Definition:
SiStripMatchedRecHit2D.h:13
TkCloner.h
SiStripMatchedRecHit2D::SiStripMatchedRecHit2D
SiStripMatchedRecHit2D()
Definition:
SiStripMatchedRecHit2D.h:12
SiStripMatchedRecHit2D::firstClusterRef
OmniClusterRef const & firstClusterRef() const override
Definition:
SiStripMatchedRecHit2D.h:27
SiStripMatchedRecHit2D::monoClusterRef
OmniClusterRef const & monoClusterRef() const
Definition:
SiStripMatchedRecHit2D.h:31
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition:
TrackingRecHit.h:27
pos
Definition:
PixelAliasList.h:14
SiStripMatchedRecHit2D::clusterMono_
OmniClusterRef clusterMono_
Definition:
SiStripMatchedRecHit2D.h:76
SiStripMatchedRecHit2D::stereoHit
SiStripRecHit2D stereoHit() const
Definition:
SiStripMatchedRecHit2D.h:20
LocalError
Definition:
LocalError.h:12
BaseTrackerRecHit
Definition:
BaseTrackerRecHit.h:33
OmniClusterRef
Definition:
OmniClusterRef.h:11
SiStripMatchedRecHit2D::getKfComponents
void getKfComponents(KfComponentsHolder &holder) const override
Definition:
SiStripMatchedRecHit2D.h:51
SiStripMatchedRecHit2D::monoClusterRef
OmniClusterRef & monoClusterRef()
Definition:
SiStripMatchedRecHit2D.h:34
SiStripMatchedRecHit2D::monoHit
SiStripRecHit2D monoHit() const
Definition:
SiStripMatchedRecHit2D.h:21
Point3DBase< float, LocalTag >
SiStripMatchedRecHit2D::stereoCluster
SiStripCluster const & stereoCluster() const
Definition:
SiStripMatchedRecHit2D.h:36
TkCloner
Definition:
TkCloner.h:15
SiStripMatchedRecHit2D::sharesInput
bool sharesInput(const TrackingRecHit *other, SharedInputType what) const override
Definition:
SiStripMatchedRecHit2D.cc:6
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::monoId
unsigned int monoId() const
Definition:
SiStripMatchedRecHit2D.h:24
TrackerSingleRecHit
Definition:
TrackerSingleRecHit.h:13
TrackingRecHit::rawId
id_type rawId() const
Definition:
TrackingRecHit.h:115
SiStripMatchedRecHit2D::clone
SiStripMatchedRecHit2D * clone(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const override
Definition:
SiStripMatchedRecHit2D.h:66
sharesClusters
bool sharesClusters(SiStripMatchedRecHit2D const &h1, SiStripMatchedRecHit2D const &h2, TrackingRecHit::SharedInputType what)
Definition:
SiStripMatchedRecHit2D.h:81
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:76
Generated for CMSSW Reference Manual by
1.8.11