BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
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([email protected]) Migrate to BESIII
15//
16//------------------------------------------------------------------------
17//
18// Interface Dependencies ----------------------------------------------
19
20#ifndef MDCSEG_H
21#define MDCSEG_H
23#include "CLHEP/Alist/AList.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
42{
43public:
44 MdcSeg(double bunchT);
45 virtual ~MdcSeg();
46 double phi() const {return _phi;}
47 double slope() const {return _slope;}
48 double chisq() const {return _chisq;}
49 unsigned int quality() const {return _qual;}
50 const double * errmat() const {return _errmat;}
51 const MdcSuperLayer *superlayer() const {return _slayer;}
52 MdcSegInfo *info() const {return _info;}
53 void setInfo(MdcSegInfo *ptr);
54 void setAmbig() {_qual |= segAmbigFlag;}
55 void setUsed() {_qual |= segUsedFlag;}
56 void setFull() {_qual |= segFullFlag;}
57 void setPattern(unsigned thePatt) {_pattern = thePatt;}
58 int segAmbig() {return (_qual & segAmbigFlag);}
59 int segUsed() {return (_qual & segUsedFlag);}
60 int segFull() {return (_qual & segFullFlag);}
61 unsigned segPattern() const {return _pattern;}
62 double bunchTime() {return _bunchTime;}
63
64 void plotSeg() const;
65 void plotSegAll() const;
66
67 void setValues(int nInPatt, int nhit, MdcHit *hits[], MdcLine *span,
68 const MdcSuperLayer *slay, int ambig[]);
69 void setValues(int nInPatt, double inPhi, double inSlope,
70 double chi2, double inError[3], const MdcSuperLayer *slay);
71 int addHits(MdcLine *span, MdcHit *hits[], const MdcHitMap*, double corr);
72 void markHits(const MdcMap<const MdcHit*,MdcSegUsage*>& usedHits) const;
73
74 void append(MdcHitUse*);
75 void remove(MdcHitUse*);
76 int nHit() const;
77 MdcHitUse* hit(int i) const {return _theList[i];}
78
79 static MdcSegParams *segPar() {return segParam;}
80 static void setParam(MdcSegParams *segpar) {segParam = segpar;}
81 double testCombSeg(const MdcSeg*)const;//yzhang temp
82 double testCombSegPt()const;//yzhang temp
83 double testCombSegTheta()const;//yzhang temp
84 double testCombSegPhi()const;//yzhang temp
85 double testCombSegAmbig()const;//yzhang temp
86 // Preempt
87 MdcSeg& operator= (const MdcSeg&);
88 MdcSeg(const MdcSeg &);
89
90private:
91 HepAList<MdcHitUse> _theList;
92 static MdcSegParams *segParam;
93 const MdcSuperLayer *_slayer;
94 double _phi;
95 double _slope;
96 double _errmat[3]; // error matrix: sig**2(phi), sig**2(phi-slope), (slope)
97 double _chisq;
98 unsigned int _qual;
99 unsigned int _pattern;
100 MdcSegInfo *_info; // ptr to whatever approach-dependent info needed; kludge
101 double _bunchTime;
102
103 void reset();
104};
105
106#endif
107
108
109
110
111
112
113
const unsigned segFullFlag
Definition MdcSeg.h:36
const unsigned segUsedFlag
Definition MdcSeg.h:38
const unsigned segAmbigFlag
Definition MdcSeg.h:37
void setUsed()
Definition MdcSeg.h:55
double bunchTime()
Definition MdcSeg.h:62
const MdcSuperLayer * superlayer() const
Definition MdcSeg.h:51
double testCombSegTheta() const
Definition MdcSeg.cxx:424
double chisq() const
Definition MdcSeg.h:48
void setValues(int nInPatt, int nhit, MdcHit *hits[], MdcLine *span, const MdcSuperLayer *slay, int ambig[])
Definition MdcSeg.cxx:104
static MdcSegParams * segPar()
Definition MdcSeg.h:79
const double * errmat() const
Definition MdcSeg.h:50
void plotSeg() const
Definition MdcSeg.cxx:194
int nHit() const
Definition MdcSeg.cxx:368
double testCombSegPhi() const
Definition MdcSeg.cxx:441
double testCombSegAmbig() const
Definition MdcSeg.cxx:458
void append(MdcHitUse *)
Definition MdcSeg.cxx:353
double testCombSeg(const MdcSeg *) const
Definition MdcSeg.cxx:376
void setAmbig()
Definition MdcSeg.h:54
MdcSeg & operator=(const MdcSeg &)
Definition MdcSeg.cxx:67
MdcSegInfo * info() const
Definition MdcSeg.h:52
double phi() const
Definition MdcSeg.h:46
void setFull()
Definition MdcSeg.h:56
int addHits(MdcLine *span, MdcHit *hits[], const MdcHitMap *, double corr)
Definition MdcSeg.cxx:230
int segFull()
Definition MdcSeg.h:60
int segUsed()
Definition MdcSeg.h:59
void plotSegAll() const
Definition MdcSeg.cxx:159
unsigned segPattern() const
Definition MdcSeg.h:61
MdcSeg(double bunchT)
Definition MdcSeg.cxx:35
unsigned int quality() const
Definition MdcSeg.h:49
int segAmbig()
Definition MdcSeg.h:58
virtual ~MdcSeg()
Definition MdcSeg.cxx:42
static void setParam(MdcSegParams *segpar)
Definition MdcSeg.h:80
void remove(MdcHitUse *)
Definition MdcSeg.cxx:360
double testCombSegPt() const
Definition MdcSeg.cxx:407
double slope() const
Definition MdcSeg.h:47
void setPattern(unsigned thePatt)
Definition MdcSeg.h:57
MdcHitUse * hit(int i) const
Definition MdcSeg.h:77
void setInfo(MdcSegInfo *ptr)
Definition MdcSeg.cxx:96
void markHits(const MdcMap< const MdcHit *, MdcSegUsage * > &usedHits) const
Definition MdcSeg.cxx:148