-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
SiTrackerMultiRecHit.h
78 lines (61 loc) · 2.58 KB
/
SiTrackerMultiRecHit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef SiTrackerMultiRecHit_H
#define SiTrackerMultiRecHit_H
#include "DataFormats/TrackerRecHit2D/interface/BaseTrackerRecHit.h"
#include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
#include <vector>
#include <map>
/*
A rechit type suitable for tracking algorithm that use soft hit-to-track assignement,
such as the Deterministic Annealing Filter (DAF) or the Multi Track Filter (MTF).
it contains an OwnVector with the component rechits and a vector of weights
*/
class SiTrackerMultiRecHit : public BaseTrackerRecHit
{
public:
typedef BaseTrackerRecHit Base;
SiTrackerMultiRecHit():
theHits(),
theWeights(),
annealing_(0){}
virtual ~SiTrackerMultiRecHit(){}
SiTrackerMultiRecHit(const LocalPoint&, const LocalError&, GeomDet const & idet,
const std::vector< std::pair<const TrackingRecHit*, float> >&, double);
virtual SiTrackerMultiRecHit* clone() const {return new SiTrackerMultiRecHit(*this);}
#ifdef NO_DICT
virtual RecHitPointer cloneSH() const { return std::make_shared<SiTrackerMultiRecHit>(*this);}
#endif
virtual int dimension() const {return 2;}
virtual void getKfComponents( KfComponentsHolder & holder ) const { getKfComponents2D(holder); }
// at the momement nobody care of MultiHit!!!
// used by trackMerger (to be improved)
virtual OmniClusterRef const & firstClusterRef() const { return static_cast<BaseTrackerRecHit const *>(&theHits.front())->firstClusterRef();}
/// Access to component RecHits (if any)
virtual std::vector<const TrackingRecHit*> recHits() const;
// virtual void recHitsV(std::vector<const TrackingRecHit*> & ) const;
/// Non-const access to component RecHits (if any)
virtual std::vector<TrackingRecHit*> recHits() ;
// virtual void recHitsV(std::vector<TrackingRecHit*> & );
//vector of weights
std::vector<float> const & weights() const {return theWeights;}
std::vector<float> & weights() {return theWeights;}
//returns the weight for the i component
float weight(unsigned int i) const {return theWeights[i];}
float & weight(unsigned int i) {return theWeights[i];}
//get the annealing
virtual double getAnnealingFactor() const { return annealing_; }
bool sharesInput(const TrackingRecHit* other,
SharedInputType what) const;
private:
edm::OwnVector<TrackingRecHit> theHits;
std::vector<float> theWeights;
double annealing_;
};
// Comparison operators
inline bool operator<( const SiTrackerMultiRecHit& one, const SiTrackerMultiRecHit& other) {
if ( one.geographicalId() < other.geographicalId() ) {
return true;
} else {
return false;
}
}
#endif