20 RecSegment(buildDetId(proto_segment.front()->cscDetId())),
22 theLocalDirection(direction), theCovMatrix(errors), theChi2(chi2), aME11a_duplicate(
false) {
24 for(
unsigned int i=0;
i<proto_segment.size(); ++
i)
31 std::vector<const TrackingRecHit*> pointersOfRecHits;
33 pointersOfRecHits.push_back(&(*irh));
35 return pointersOfRecHits;
40 std::vector<TrackingRecHit*> pointersOfRecHits;
42 pointersOfRecHits.push_back(&(*irh));
44 return pointersOfRecHits;
88 for(
unsigned int i=0;
i<duplicates.size(); ++
i){
96 const std::vector<CSCRecHit2D>& specificRecHits_2,
98 const std::vector<CSCRecHit2D> * rhContainer_1 = &specificRecHits_1;
99 const std::vector<CSCRecHit2D> * rhContainer_2 = &specificRecHits_2;
100 if(specificRecHits_1.size()>specificRecHits_2.size()){
101 rhContainer_2 = &specificRecHits_1;
102 rhContainer_1 = &specificRecHits_2;
105 bool shareConditionPassed =
true;
106 for ( std::vector<CSCRecHit2D>::const_iterator itRH = rhContainer_1->begin();
107 itRH != rhContainer_1->end(); ++itRH) {
109 bool sharedHit =
false;
110 for ( std::vector<CSCRecHit2D>::const_iterator itRH2 = rhContainer_2->begin();
111 itRH2 != rhContainer_2->end(); ++itRH2) {
112 if(itRH2->sharesInput(firstRecHit,sharesInput)){
118 shareConditionPassed =
false;
122 return shareConditionPassed;
151 std::vector<float> wireTimes;
152 for (std::vector<CSCRecHit2D>::const_iterator itRH =
theCSCRecHits.begin();
155 averageTime+=recHit->
tpeak();
157 wireTimes.push_back(recHit->
wireTime());
166 std::vector<float>::iterator maxHit;
167 for (std::vector<float>::iterator itWT=wireTimes.begin();
168 itWT!=wireTimes.end(); ++itWT) {
169 float diff=fabs(*itWT-averageTime);
177 averageTime=(averageTime*N-(*maxHit))/(N-1);
178 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)
static const AlgebraicMatrix theProjectionMatrix
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.
AlgebraicMatrix createStaticMatrix()
LocalVector theLocalDirection
CLHEP::HepSymMatrix AlgebraicSymMatrix
bool sharesRecHits(const CSCSegment &anotherSegment, CSCRecHit2D::SharedInputType sharesInput) const
volatile std::atomic< bool > shutdown_flag false
LocalError localDirectionError() const
Error on the local direction.