More information on this package is here.
//Begin_Html <!--
/* -->
<h1>TECPBClass</h1>
<pre>
Modified:
Maurik (2/3/00) Comments.
</pre>
This class is used to access the
ECPB
bank data written into the ROOT DST by WriteRootDST
It was generated automatically from the ddl file in
packages/bankdefs/ecpb.ddl
and later hand edited to provide comments and additional modifications.
The details on how exactly each variable is defined have to be extraced
from the RECSIS code.
<pre>
<p>Modified:
Will Morrison 11/05
</p><p> Added a GetUVW function that calculates the U, V, and W coordinates
in the EC.
</p>
<!-- */
// --> End_Html
#include "TECPBClass.h"
ClassImp(TECPBClass)
TECPBClass::TECPBClass(TECPBClass *TmpECPB){
Scht = TmpECPB->Scht;
Etot = TmpECPB->Etot;
Ein = TmpECPB->Ein;
Eout = TmpECPB->Eout;
Time = TmpECPB->Time;
Path = TmpECPB->Path;
X = TmpECPB->X;
Y = TmpECPB->Y;
Z = TmpECPB->Z;
M2_hit = TmpECPB->M2_hit;
M3_hit = TmpECPB->M3_hit;
M4_hit = TmpECPB->M4_hit;
Innstr = TmpECPB->Innstr;
Outstr = TmpECPB->Outstr;
Chi2ec = TmpECPB->Chi2ec;
Status = TmpECPB->Status;
}
void TECPBClass::GetUVW(Float_t* u, Float_t* v, Float_t* w)
{
TVector3 DetCo = TVector3(X,Y,Z);
GetUVW(u,v,w,DetCo);
}
void TECPBClass::GetUVW(Float_t* u, Float_t* v, Float_t* w,TVector3 DetCo)
{
const Float_t Pi = TMath::Pi();
Float_t phi = atan2(DetCo.Y(),DetCo.X())*180./Pi;
if (phi<0.) phi+=360.; phi=phi+30.; if(phi>360.) phi-=360.;
Float_t ec_phi = (Pi/3)*int(phi/60.);
DetCo.RotateZ(-ec_phi);
TVector3 SectCo = TVector3(DetCo);
Float_t xx = SectCo.X();
SectCo.SetX(SectCo.Y());
SectCo.SetY(xx);
Float_t ec_the = Pi*25.0/180;
SectCo.RotateX(ec_the);
SectCo.SetZ(SectCo.Z()-510.32);
Float_t ylow = -182.974;
Float_t yhi = 189.956;
Float_t rho = 1.097620706;
Float_t tanrho = tan(rho);
Float_t sinrho = sin(rho);
Float_t cosrho = cos(rho);
*u = (SectCo.Y()-ylow)/sinrho;
*v = (yhi-ylow)/tanrho - SectCo.X() + (yhi-SectCo.Y())/tanrho;
*w = ( (yhi-ylow)/tanrho + SectCo.X() + (yhi-SectCo.Y())/tanrho )/(2*cosrho);
}
void TECPBClass::Print(){
cout << "ScHt " << Scht << endl;
cout << "Etot " << Etot << endl;
cout << "Ein " << Ein << endl;
cout << "Eout " << Eout << endl;
cout << "Time " << Time << endl;
cout << "Path " << Path << endl;
cout << "X " << X << endl;
cout << "Y " << Y << endl;
cout << "Z " << Z << endl;
cout << "M2_hit " << M2_hit << endl;
cout << "M3_hit " << M3_hit << endl;
cout << "M4_hit " << M4_hit << endl;
cout << "InnStr " << Innstr << endl;
cout << "OutStr " << Outstr << endl;
cout << "Chi2EC " << Chi2ec << endl;
cout << "Status " << Status << endl;
}
Author: Maurik Holtrop
Last update: ClasTool/ClasBanks:$Name: $:$Id: TECPBClass.cc,v 1.6 2007/03/01 22:26:59 holtrop Exp $
CopyLeft - This code is freely available.
ROOT Home page - ClasTool Class index - Class Hierarchy - Top of the page