23 theLocalDirection(direction), theCovMatrix(errors), theChi2(chi2), aME11a_duplicate(
false) {
25 for(
unsigned int i=0;
i<proto_segment.size(); ++
i)
32 std::vector<const TrackingRecHit*> pointersOfRecHits;
34 pointersOfRecHits.push_back(&(*irh));
36 return pointersOfRecHits;
41 std::vector<TrackingRecHit*> pointersOfRecHits;
43 pointersOfRecHits.push_back(&(*irh));
45 return pointersOfRecHits;
74 static bool isInitialized =
false;
76 theProjectionMatrix[0][1] = 1;
77 theProjectionMatrix[1][2] = 1;
78 theProjectionMatrix[2][3] = 1;
79 theProjectionMatrix[3][4] = 1;
82 return theProjectionMatrix;
87 for(
unsigned int i=0;
i<duplicates.size(); ++
i){
95 const std::vector<CSCRecHit2D>& specificRecHits_2,
97 const std::vector<CSCRecHit2D> * rhContainer_1 = &specificRecHits_1;
98 const std::vector<CSCRecHit2D> * rhContainer_2 = &specificRecHits_2;
99 if(specificRecHits_1.size()>specificRecHits_2.size()){
100 rhContainer_2 = &specificRecHits_1;
101 rhContainer_1 = &specificRecHits_2;
104 bool shareConditionPassed =
true;
105 for ( std::vector<CSCRecHit2D>::const_iterator itRH = rhContainer_1->begin();
106 itRH != rhContainer_1->end(); ++itRH) {
108 bool sharedHit =
false;
109 for ( std::vector<CSCRecHit2D>::const_iterator itRH2 = rhContainer_2->begin();
110 itRH2 != rhContainer_2->end(); ++itRH2) {
111 if(itRH2->sharesInput(firstRecHit,sharesInput)){
117 shareConditionPassed =
false;
121 return shareConditionPassed;
150 std::vector<float> wireTimes;
151 for (std::vector<CSCRecHit2D>::const_iterator itRH =
theCSCRecHits.begin();
154 averageTime+=recHit->
tpeak();
156 wireTimes.push_back(recHit->
wireTime());
165 std::vector<float>::iterator maxHit;
166 for (std::vector<float>::iterator itWT=wireTimes.begin();
167 itWT!=wireTimes.end(); ++itWT) {
168 float diff=fabs(*itWT-averageTime);
176 averageTime=(averageTime*N-(*maxHit))/(N-1);
177 wireTimes.erase(maxHit);
AlgebraicVector parameters() const
Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y )
float tpeak() const
Fitted peaking time.
LocalError localPositionError() const
const std::vector< CSCSegment > & duplicateSegments() const
virtual bool sharesInput(const TrackingRecHit *other, SharedInputType what) const
std::vector< CSCSegment > theDuplicateSegments
void setDuplicateSegments(std::vector< CSCSegment * > &duplicates)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
virtual int degreesOfFreedom() const
Degrees of freedom of the segment fit.
LocalPoint localPosition() const
LocalVector localDirection() const
Local direction.
bool testSharesAllInSpecificRecHits(const std::vector< CSCRecHit2D > &specificRecHits_1, const std::vector< CSCRecHit2D > &specificRecHits_2, CSCRecHit2D::SharedInputType) const
CLHEP::HepMatrix AlgebraicMatrix
AlgebraicSymMatrix theCovMatrix
virtual ~CSCSegment()
Destructor.
virtual std::vector< const TrackingRecHit * > recHits() const
Access to component RecHits (if any)
const std::vector< CSCRecHit2D > & specificRecHits() const
CLHEP::HepVector AlgebraicVector
std::vector< CSCRecHit2D > theCSCRecHits
float maxDiff(float one, float two, float three, float four)
CSCSegment()
Default constructor.
virtual AlgebraicMatrix projectionMatrix() const
The projection matrix relates the trajectory state parameters to the segment parameters().
double chi2() const
Chi2 of the segment fit.
LocalVector theLocalDirection
CLHEP::HepSymMatrix AlgebraicSymMatrix
bool sharesRecHits(const CSCSegment &anotherSegment, CSCRecHit2D::SharedInputType sharesInput) const
LocalError localDirectionError() const
Error on the local direction.