13 #endif //#ifdef _WITHGBATCH_
19 printf(
"In myBetaH::myBetaH\n");
28 printf(
"In myBetaH::~myBetaH\n");
35 printf(
"In myBetaH::Clear\n");
54 fill_n(TofTimeOnLayer, 9, 0);
55 fill_n(TofXOnLayer, 9, 0);
56 fill_n(TofYOnLayer, 9, 0);
63 printf(
"In myBetaH::init\n");
75 myBetaHFiller::myBetaHFiller(){
77 printf(
"In myBetaHFiller::myBetaHFiller\n");
84 myBetaHFiller::~myBetaHFiller(){
86 printf(
"In myBetaHFiller::~myBetaHFiller\n");
91 void myBetaHFiller::Clear(Option_t* option){
93 printf(
"In myBetaHFiller::Clear\n");
101 void myBetaHFiller::init(){
103 printf(
"In myBetaHFiller::init\n");
111 void myBetaHFiller::Fill(BetaHR* _betah){
113 printf(
"In myBetaHFiller::Fill\n");
122 int QNPoints = -999999;
123 Q = betah->GetQ(QNPoints, QRMS);
125 Beta = betah->GetBeta();
126 EBetaV = betah->GetEBetaV();
127 BetaPattern = betah->GetBetaPattern();
128 Status = betah->GetStatus();
129 Chi2T = betah->GetChi2T();
130 Chi2C = betah->GetChi2C();
132 SumHit = betah->GetSumHit();
133 UseHit = betah->GetUseHit();
136 _iTrTrack = betah->iTrTrack();
139 _iEcalShower = betah->iEcalShower();
142 _iTrdTrack = betah->iTrdTrack();
145 for (
int jlayer=1; jlayer<=9; jlayer++) {
146 static AMSPoint global;
149 double zA=TkDBc::Head->GetZlayerAJ (jlayer);
150 double z= TkDBc::Head->GetZlayerJ (jlayer);
152 betah->TInterpolate (zA, global, dir, toftime,
false);
153 TofTimeOnLayer[jlayer-1]= (Double32_t )toftime;
154 TofXOnLayer[jlayer-1]=global.x();
155 TofYOnLayer[jlayer-1]=global.y();
168 Double_t myBetaHFiller::GetTofCharge(
int pattern){
173 printf(
"In myBetaHFiller::GetTofCharge\n");
182 }
else if (pattern==2){
187 Double_t tofh_q_upp = 0;
188 Double_t tofh_n_upp = 0;
189 Double_t tofh_r_upp = 0;
190 AMSPoint pnt;AMSDir dir;
double time;
191 for (
int ilay=first_layer; ilay<last_layer; ilay++) {
192 if(!betah->GetClusterHL(ilay))
continue;
193 betah->TInterpolate(betah->GetClusterHL(ilay)->Coo[2],pnt,dir,time);
194 if (!TOFGeom::IsGoodQGeom(ilay,betah->GetClusterHL(ilay)->Bar,pnt))
continue;
195 Double_t q = betah->GetQL(ilay,2);
196 if (q<=1e-6)
continue;
203 tofh_q_upp /= tofh_n_upp;
204 tofh_r_upp /= tofh_n_upp;
205 tofh_r_upp = sqrt(tofh_r_upp - tofh_q_upp*tofh_q_upp);
211 #endif //#ifdef _WITHGBATCH_