BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/TofRecEvent/TofRecEvent/RecBTofHit.h
Go to the documentation of this file.
1//
2// BesIII Tof Reconstruction
3// Class: RecBTofHit
4// (Barrel Tof Hit)
5// Created by Linli Jiang (USTC) 2005/09/04
6//
7#ifndef RECBTOFHIT_H
8#define RECBTOFHIT_H
9#include "GaudiKernel/ContainedObject.h"
10#include "GaudiKernel/ObjectVector.h"
11#include "EventModel/EventModel.h"
12#include "Identifier/Identifier.h"
13
14
15extern const CLID &CLID_RecBTofHit;
16
17class RecBTofHit : virtual public ContainedObject {
18 public:
19 RecBTofHit();//{}
20 virtual ~RecBTofHit(){}
21 virtual const CLID& clID() const { return RecBTofHit::classID();}
22 static const CLID& classID() { return CLID_RecBTofHit; }
23 public:
24 int getId() const { return _Id; }
25 int getTrk() const { return _trk; }
26 Identifier getTofID()const { return _tofID; }
27 int getMod() const { return _mod; }
28 int getQual() const { return _qual; }
29 double getZHit() const { return _zHit;}
30 double getdZHit() const { return _dzHit;}
31 double getZTDC() const { return _zTDC;}
32 double getZADC() const { return _zADC;}
33 double getPhHit() const { return _phHit;}
34 double getThTrk() const { return _thTrk;}
35 double getPhTrk() const { return _phTrk;}
36 double getPh() const { return _ph;}
37 double getP() const { return _p;}
38 double getPath() const { return _path; }
39 double getTime() const { return _time; }
40 double getTof() const { return _tof; }
41 double getETof() const { return _etof; }
42 double getExpTof(int im) const { return _exptof[im]; }
43 double getTt1() const { return _tt1; }
44 double getTt2() const { return _tt2; }
45 double getETt1() const { return _ett1; }
46 double getETt2() const { return _ett2; }
47 double getTm1() const { return _tm1; }
48 double getTm2() const { return _tm2; }
49 double getETm1() const { return _etm1; }
50 double getETm2() const { return _etm2; }
51 double getTr1() const { return _tr1; }
52 double getTr2() const { return _tr2; }
53 double getEtr1() const { return _etr1; }
54 double getEtr2() const { return _etr2; }
55 double getQ1() const { return _q1; }
56 double getQ2() const { return _q2; }
57 double getEQ1() const { return _eq1; }
58 double getEQ2() const { return _eq2; }
59
60public:
61 void setId(int id){ _Id=id; }
62 void setTrk(int trk){ _trk=trk; }
63 void setTofID(Identifier tofID){ _tofID=tofID; }
64 void setMod(int mod){ _mod=mod; }
65 void setQual(int qual){ _qual=qual; }
66 void setZHit(double zHit){ _zHit=zHit; }
67 void setdZHit(double dzHit){ _dzHit=dzHit; }
68 void setZTDC(double zTDC){ _zTDC=zTDC; }
69 void setZADC(double zADC) { _zADC=zADC;}
70 void setPhHit(double phHit){ _phHit=phHit; }
71 void setThTrk(double thTrk){ _thTrk=thTrk; }
72 void setPhTrk(double phTrk){ _phTrk=phTrk; }
73 void setPh(double ph){ _ph=ph; }
74 void setP(double p){ _p=p; }
75 void setPath(double path){ _path=path; }
76 void setTime(double time){ _time=time; }
77 void setTof(double tof){ _tof=tof; }
78 void setETof(double etof){ _etof=etof; }
79 void setExpTof(double exptof,int im){ _exptof[im]=exptof; }
80 void setTt1(double tt1){ _tt1=tt1; }
81 void setTt2(double tt2){ _tt2=tt2; }
82 void setETt1(double ett1){ _ett1=ett1; }
83 void setETt2(double ett2){ _ett2=ett2; }
84 void setTm1(double tm1){ _tm1=tm1; }
85 void setTm2(double tm2){ _tm2=tm2; }
86 void setETm1(double etm1){ _etm1=etm1; }
87 void setETm2(double etm2){ _etm2=etm2; }
88 void setTr1(double tr1){ _tr1=tr1; }
89 void setTr2(double tr2){ _tr2=tr2; }
90 void setETr1(double etr1){ _etr1=etr1; }
91 void setETr2(double etr2){ _etr2=etr2; }
92 void setQ1(double q1){ _q1=q1; }
93 void setQ2(double q2){ _q2=q2; }
94 void setEQ1(double eq1){ _eq1=eq1; }
95 void setEQ2(double eq2){ _eq2=eq2; }
96// friend bool operator<(RecBTofHit* a,RecBTofHit* b);
97public://operator override
98 bool operator<(const RecBTofHit& rhs) const {
99 //std::cout<<"be called once"<<std::endl;
100 return (_q1+_q2)<(rhs.getQ1()+rhs.getQ2());
101 }
102 bool operator>(const RecBTofHit& rhs) const {
103 //std::cout<<"be called once"<<std::endl;
104 return (_q1+_q2)>(rhs.getQ1()+rhs.getQ2());
105 }
106
107 bool operator<(RecBTofHit* rhs) const{
108// std::cout<<"be call once"<<std::endl;
109 return (_q1+_q2)<(rhs->getQ1()+rhs->getQ2());
110 }
111 bool operator>(RecBTofHit* rhs) const{
112 std::cout<<"be call once"<<std::endl;
113 return (_q1+_q2)>(rhs->getQ1()+rhs->getQ2());
114 }
115public:
116 const RecBTofHit* next() const { return m_next;}//if first layer,pointer to the second one,if second one,to the first one
117 void setnext(RecBTofHit* next) { m_next=next;}
118private:
119 RecBTofHit* m_next;
120private:
121 Identifier _tofID;
122 int _Id,_mod,_qual,_trk;
123 double _zHit,_zTDC,_zADC,_dzHit,_phHit,_thTrk,_phTrk,_ph,_p,_path,_time;
124 double _tof,_etof;
125 double _exptof[5];
126 double _tt1,_tt2,_ett1,_ett2;
127 double _tm1,_tm2,_etm1,_etm2;
128 double _tr1,_tr2,_etr1,_etr2;
129 double _q1,_q2,_eq1,_eq2;
130};
131typedef ObjectVector<RecBTofHit> RecBTofHitCol;
132
133#endif
Double_t time
ObjectVector< RecBTofHit > RecBTofHitCol
const CLID & CLID_RecBTofHit
Definition: EventModel.cxx:326
const CLID & CLID_RecBTofHit
Definition: EventModel.cxx:326
bool operator<(const RecBTofHit &rhs) const
bool operator>(const RecBTofHit &rhs) const