BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcTrkRecon/include/MdcTrkRecon/MdcSeg.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: MdcSeg.h,v 1.11 2011/09/26 01:06:37 zhangy Exp $
4//
5// Description:
6// class to hold a superlayer track segment
7// Takes ownership of Hots that it holds.
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author(s):
13// Steve Schaffner
14// Zhang Yao(zhangyao@ihep.ac.cn) Migrate to BESIII
15//
16//------------------------------------------------------------------------
17//
18// Interface Dependencies ----------------------------------------------
19
20#ifndef MDCSEG_H
21#define MDCSEG_H
22#include "CLHEP/Alist/AList.h"
23#include "MdcTrkRecon/GmsListLink.h"
24
25class MdcSegParams;
26class MdcLine;
27class MdcSuperLayer;
28class MdcHit;
29class MdcSegInfo;
30template <class K, class V> class MdcMap;
31class MdcSegUsage;
32class MdcHitUse;
33class MdcHitMap;
34
35// definitions for quality word
36const unsigned segFullFlag = 4; // no missing hits
37const unsigned segAmbigFlag = 2;
38const unsigned segUsedFlag = 1;
39
40// Class definition
41class MdcSeg : public GmsListLink {
42public:
43 MdcSeg( double bunchT );
44 virtual ~MdcSeg();
45 double phi() const { return _phi; }
46 double slope() const { return _slope; }
47 double chisq() const { return _chisq; }
48 unsigned int quality() const { return _qual; }
49 const double* errmat() const { return _errmat; }
50 const MdcSuperLayer* superlayer() const { return _slayer; }
51 MdcSegInfo* info() const { return _info; }
52 void setInfo( MdcSegInfo* ptr );
53 void setAmbig() { _qual |= segAmbigFlag; }
54 void setUsed() { _qual |= segUsedFlag; }
55 void setFull() { _qual |= segFullFlag; }
56 void setPattern( unsigned thePatt ) { _pattern = thePatt; }
57 int segAmbig() { return ( _qual & segAmbigFlag ); }
58 int segUsed() { return ( _qual & segUsedFlag ); }
59 int segFull() { return ( _qual & segFullFlag ); }
60 unsigned segPattern() const { return _pattern; }
61 double bunchTime() { return _bunchTime; }
62
63 void plotSeg() const;
64 void plotSegAll() const;
65
66 void setValues( int nInPatt, int nhit, MdcHit* hits[], MdcLine* span,
67 const MdcSuperLayer* slay, int ambig[] );
68 void setValues( int nInPatt, double inPhi, double inSlope, double chi2, double inError[3],
69 const MdcSuperLayer* slay );
70 int addHits( MdcLine* span, MdcHit* hits[], const MdcHitMap*, double corr );
71 void markHits( const MdcMap<const MdcHit*, MdcSegUsage*>& usedHits ) const;
72
73 void append( MdcHitUse* );
74 void remove( MdcHitUse* );
75 int nHit() const;
76 MdcHitUse* hit( int i ) const { return _theList[i]; }
77
78 static MdcSegParams* segPar() { return segParam; }
79 static void setParam( MdcSegParams* segpar ) { segParam = segpar; }
80 double testCombSeg( const MdcSeg* ) const; // yzhang temp
81 double testCombSegPt() const; // yzhang temp
82 double testCombSegTheta() const; // yzhang temp
83 double testCombSegPhi() const; // yzhang temp
84 double testCombSegAmbig() const; // yzhang temp
85 // Preempt
87 MdcSeg( const MdcSeg& );
88
89private:
90 HepAList<MdcHitUse> _theList;
91 static MdcSegParams* segParam;
92 const MdcSuperLayer* _slayer;
93 double _phi;
94 double _slope;
95 double _errmat[3]; // error matrix: sig**2(phi), sig**2(phi-slope), (slope)
96 double _chisq;
97 unsigned int _qual;
98 unsigned int _pattern;
99 MdcSegInfo* _info; // ptr to whatever approach-dependent info needed; kludge
100 double _bunchTime;
101
102 void reset();
103};
104
105#endif
virtual ~MdcSeg()
double testCombSegTheta() const
void setValues(int nInPatt, int nhit, MdcHit *hits[], MdcLine *span, const MdcSuperLayer *slay, int ambig[])
void plotSeg() const
int nHit() const
double testCombSegPhi() const
double testCombSegAmbig() const
void append(MdcHitUse *)
double testCombSeg(const MdcSeg *) const
MdcSeg & operator=(const MdcSeg &)
MdcSeg(const MdcSeg &)
int addHits(MdcLine *span, MdcHit *hits[], const MdcHitMap *, double corr)
void plotSegAll() const
void setValues(int nInPatt, double inPhi, double inSlope, double chi2, double inError[3], const MdcSuperLayer *slay)
MdcSeg(double bunchT)
void remove(MdcHitUse *)
double testCombSegPt() const
void setInfo(MdcSegInfo *ptr)
void markHits(const MdcMap< const MdcHit *, MdcSegUsage * > &usedHits) const