test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
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
(){}
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
virtual
OmniClusterRef
const
&
firstClusterRef
()
const
{
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
virtual
SiStripMatchedRecHit2D
*
clone
()
const
{
return
new
SiStripMatchedRecHit2D
( *
this
);}
45
#ifndef __GCCXML__
46
virtual
RecHitPointer
cloneSH
()
const
{
return
std::make_shared<SiStripMatchedRecHit2D>(*this);}
47
#endif
48
49
50
virtual
int
dimension
()
const
{
return
2;}
51
virtual
void
getKfComponents
(
KfComponentsHolder
& holder )
const
{
getKfComponents2D
(holder); }
52
53
54
55
virtual
bool
sharesInput
(
const
TrackingRecHit
* other,
SharedInputType
what)
const
;
56
57
bool
sharesInput
(
TrackerSingleRecHit
const
& other)
const
;
58
59
virtual
std::vector<const TrackingRecHit*>
recHits
()
const
;
60
61
virtual
std::vector<TrackingRecHit*>
recHits
();
62
63
virtual
bool
canImproveWithTrack
()
const
{
return
true
;}
64
private
:
65
// double dispatch
66
virtual
SiStripMatchedRecHit2D
*
clone
(
TkCloner
const
&
cloner
,
TrajectoryStateOnSurface
const
& tsos)
const
{
67
return
cloner
(*
this
,tsos).release();
68
}
69
#ifndef __GCCXML__
70
virtual
RecHitPointer
cloneSH
(
TkCloner
const
&
cloner
,
TrajectoryStateOnSurface
const
& tsos)
const
{
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::stereoClusterRef
OmniClusterRef & stereoClusterRef()
Definition:
SiStripMatchedRecHit2D.h:33
SiStripMatchedRecHit2D::recHits
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
Definition:
SiStripMatchedRecHit2D.cc:34
SiStripMatchedRecHit2D::stereoId
unsigned int stereoId() const
Definition:
SiStripMatchedRecHit2D.h:23
SiStripMatchedRecHit2D::dimension
virtual int dimension() const
Definition:
SiStripMatchedRecHit2D.h:50
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
SiStripMatchedRecHit2D::cloneSH
virtual RecHitPointer cloneSH(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const
Definition:
SiStripMatchedRecHit2D.h:70
TrackingRecHit
Definition:
TrackingRecHit.h:23
SiStripMatchedRecHit2D::sharesInput
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
Definition:
SiStripMatchedRecHit2D.cc:6
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
OmniClusterRef::stripCluster
SiStripCluster const & stripCluster() const
Definition:
OmniClusterRef.h:39
SiStripMatchedRecHit2D::cloneSH
virtual RecHitPointer cloneSH() const
Definition:
SiStripMatchedRecHit2D.h:46
SiStripMatchedRecHit2D::canImproveWithTrack
virtual bool canImproveWithTrack() const
Definition:
SiStripMatchedRecHit2D.h:63
SiStripCluster
Definition:
SiStripCluster.h:9
BaseTrackerRecHit::getKfComponents2D
void getKfComponents2D(KfComponentsHolder &holder) const
Definition:
BaseTrackerRecHit.cc:56
SiStripMatchedRecHit2D::~SiStripMatchedRecHit2D
~SiStripMatchedRecHit2D()
Definition:
SiStripMatchedRecHit2D.h:13
TkCloner.h
SiStripMatchedRecHit2D::SiStripMatchedRecHit2D
SiStripMatchedRecHit2D()
Definition:
SiStripMatchedRecHit2D.h:12
SiStripMatchedRecHit2D::monoClusterRef
OmniClusterRef const & monoClusterRef() const
Definition:
SiStripMatchedRecHit2D.h:31
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition:
TrackingRecHit.h:27
SiStripMatchedRecHit2D::clusterMono_
OmniClusterRef clusterMono_
Definition:
SiStripMatchedRecHit2D.h:76
SiStripMatchedRecHit2D::getKfComponents
virtual void getKfComponents(KfComponentsHolder &holder) const
Definition:
SiStripMatchedRecHit2D.h:51
SiStripMatchedRecHit2D::stereoHit
SiStripRecHit2D stereoHit() const
Definition:
SiStripMatchedRecHit2D.h:20
LocalError
Definition:
LocalError.h:12
BaseTrackerRecHit
Definition:
BaseTrackerRecHit.h:33
OmniClusterRef
Definition:
OmniClusterRef.h:10
SiStripMatchedRecHit2D::firstClusterRef
virtual OmniClusterRef const & firstClusterRef() const
Definition:
SiStripMatchedRecHit2D.h:27
TkCloner::makeShared
TrackingRecHit *operator()[[cms TrackingRecHit::ConstRecHitPointer makeShared(TrackingRecHit::ConstRecHitPointer const &hit, TrajectoryStateOnSurface const &tsos) const
Definition:
TkCloner.h:22
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
HLT_25ns10e33_v2_cff.cloner
tuple cloner
Definition:
HLT_25ns10e33_v2_cff.py:6536
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
SiStripMatchedRecHit2D::clone
virtual SiStripMatchedRecHit2D * clone() const
Definition:
SiStripMatchedRecHit2D.h:44
SiStripMatchedRecHit2D::clone
virtual SiStripMatchedRecHit2D * clone(TkCloner const &cloner, TrajectoryStateOnSurface const &tsos) const
Definition:
SiStripMatchedRecHit2D.h:66
TrackingRecHit::rawId
id_type rawId() const
Definition:
TrackingRecHit.h:115
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.5