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
|
/******* \class DTSLRecCluster *******
*
* Description:
*
* detailed description
*
* \author : Stefano Lacaprara - INFN LNL <stefano.lacaprara@pd.infn.it>
*
* Modification:
*
*********************************/
/* This Class Header */
#include "DataFormats/DTRecHit/interface/DTSLRecCluster.h"
/* Collaborating Class Header */
/* C++ Headers */
#include <iostream>
using namespace std;
/* ====================================================================== */
/* static member definition */
static AlgebraicMatrix initMatrix() {
AlgebraicMatrix m(2, 5, 0);
m[0][1] = 1;
return m;
}
const AlgebraicMatrix DTSLRecCluster::theProjectionMatrix = initMatrix();
/* Constructor */
DTSLRecCluster::DTSLRecCluster(const DTSuperLayerId id, const std::vector<DTRecHit1DPair>& pairs)
: theSlid(id), thePairs(pairs) {}
DTSLRecCluster::DTSLRecCluster(const DTSuperLayerId id,
const LocalPoint& pos,
const LocalError& err,
const std::vector<DTRecHit1DPair>& pairs)
: theSlid(id), thePos(pos), thePosError(err), thePairs(pairs) {}
/* Destructor */
/* Operations */
vector<const TrackingRecHit*> DTSLRecCluster::recHits() const {
std::vector<const TrackingRecHit*> pointersOfRecHits;
for (std::vector<DTRecHit1DPair>::const_iterator rechit = thePairs.begin(); rechit != thePairs.end(); rechit++)
pointersOfRecHits.push_back(&(*rechit));
return pointersOfRecHits;
}
vector<TrackingRecHit*> DTSLRecCluster::recHits() {
std::vector<TrackingRecHit*> pointersOfRecHits;
for (std::vector<DTRecHit1DPair>::iterator rechit = thePairs.begin(); rechit != thePairs.end(); rechit++)
pointersOfRecHits.push_back(&(*rechit));
return pointersOfRecHits;
}
ostream& operator<<(ostream& os, const DTSLRecCluster& clus) {
os << "Pos " << clus.localPosition() << " err " << clus.localPositionError() << " nHits: " << clus.nHits();
return os;
}
|