/*
$Log$
+ Revision 1.13.4.1 2002/05/31 09:37:59 hristov
+ First set of changes done by Piotr
+
+ Revision 1.13 2001/10/23 13:03:35 hristov
+ The access to several data members was changed from public to protected. The digitisation was adapted to the multi-event case (J.Chudoba)
+
+ Revision 1.12 2001/05/10 12:34:23 jbarbosa
+ Changed drwaing routines.
+
+ Revision 1.11 2001/03/14 18:21:24 jbarbosa
+ Corrected bug in digits loading.
+
+ Revision 1.10 2001/02/27 15:21:06 jbarbosa
+ Transition to SDigits.
+
Revision 1.9 2001/02/13 20:38:48 jbarbosa
Changes to make it work with new IO.
Float_t rechit[7];
- printf("PatRec started\n");
+ //printf("PatRec started\n");
AliRICH *pRICH = (AliRICH*)gAlice->GetDetector("RICH");
- TTree *treeH = gAlice->TreeH();
+ TTree *treeH = pRICH->TreeH();
ntracks =(Int_t) treeH->GetEntries();
// ntracks = 1;
for (itr=0; itr<ntracks; itr++) {
- status = TrackParam(itr,ich);
+ status = TrackParam(itr,ich,0,0);
if(status==1) continue;
//printf(" theta %f phi %f track \n",fTrackTheta,fTrackPhi);
// ring->Fill(fTrackLoc[0],fTrackLoc[1],100.);
segmentation=iChamber->GetSegmentationModel();
nent=(Int_t)gAlice->TreeD()->GetEntries();
- gAlice->TreeD()->GetEvent(1);
+ gAlice->TreeD()->GetEvent(0);
TClonesArray *pDigitss = pRICH->DigitsAddress(ich);
ndigits[ich] = pDigitss->GetEntriesFast();
printf("Digits in chamber %d: %d\n",ich,ndigits[ich]);
for (Int_t dig=0;dig<ndigits[ich];dig++) {
padI=(AliRICHDigit*) pDigitss->UncheckedAt(dig);
- x=padI->fPadX;
- y=padI->fPadY;
- q=padI->fSignal;
+ x=padI->PadX();
+ y=padI->PadY();
+ q=padI->Signal();
segmentation->GetPadC(x,y,rx,ry,rz);
//printf("Pad coordinates x:%d, Real coordinates x:%f\n",x,rx);
}
-Int_t AliRICHPatRec::TrackParam(Int_t itr, Int_t &ich)
+Int_t AliRICHPatRec::TrackParam(Int_t itr, Int_t &ich, Float_t rectheta, Float_t recphi)
{
// Get Local coordinates of track impact
//printf("Calling TrackParam\n");
gAlice->ResetHits();
- TTree *treeH = gAlice->TreeH();
+ AliRICH *pRICH = (AliRICH*)gAlice->GetDetector("RICH");
+ TTree *treeH = pRICH->TreeH();
treeH->GetEvent(itr);
- AliRICH *pRICH = (AliRICH*)gAlice->GetDetector("RICH");
AliRICHHit* mHit=(AliRICHHit*)pRICH->FirstHit(-1);
if(mHit==0) return 1;
- ich = mHit->fChamber-1;
+ ich = mHit->Chamber()-1;
trackglob[0] = mHit->X();
trackglob[1] = mHit->Y();
trackglob[2] = mHit->Z();
- pX = mHit->fMomX;
- pY = mHit->fMomY;
- pZ = mHit->fMomZ;
+ pX = mHit->MomX();
+ pY = mHit->MomY();
+ pZ = mHit->MomZ();
fTrackMom = sqrt(TMath::Power(pX,2)+TMath::Power(pY,2)+TMath::Power(pZ,2));
- thetatr = (mHit->fTheta)*(Float_t)kDegrad;
- phitr = mHit->fPhi*(Float_t)kDegrad;
- iloss = mHit->fLoss;
- part = mHit->fParticle;
+ if(recphi!=0 || rectheta!=0)
+ {
+ thetatr = rectheta;
+ phitr = recphi;
+ }
+ else
+ {
+ thetatr = mHit->Theta()*TMath::Pi()/180;
+ phitr = mHit->Phi()*TMath::Pi()/180;
+ }
+ iloss = mHit->Loss();
+ part = mHit->Particle();
iChamber = &(pRICH->Chamber(ich));
iChamber->GlobaltoLocal(trackglob,trackloc);
f1 = 46.411;
f2 = 228.71;
- phpad = PhiPad();
+ phpad = PhiPad(fTrackTheta,fTrackPhi);
for (times=0; times<=1; times++) {
bandradius[times] = DistanceFromMip( nfreon[times], nquartz[times],
emissPointLength[times],
- thetacer[times], phpad, pointsOnCathode);
+ thetacer[times], phpad, pointsOnCathode,fTrackTheta,fTrackPhi);
//printf(" ppp %f %f %f \n",pointsOnCathode);
}
Float_t AliRICHPatRec::DistanceFromMip(Float_t nfreon, Float_t nquartz,
Float_t emissPointLength, Float_t thetacer,
- Float_t phpad, Float_t pointsOnCathode[3])
+ Float_t phpad, Float_t pointsOnCathode[3], Float_t rectheta, Float_t recphi)
{
// Find the distance to MIP impact
Float_t ngas = 1.;
- magEmissPointLenght = emissPointLength/cos(fTrackTheta);
+ magEmissPointLenght = emissPointLength/cos(rectheta);
vectEmissPointLength.SetMag(magEmissPointLenght);
- vectEmissPointLength.SetTheta(fTrackTheta);
- vectEmissPointLength.SetPhi(fTrackPhi);
+ vectEmissPointLength.SetTheta(rectheta);
+ vectEmissPointLength.SetPhi(recphi);
radExitPhot2.SetTheta(thetacer);
TRotation r2;
TRotation r;
- r1. RotateY(fTrackTheta);
- r2. RotateZ(fTrackPhi);
+ r1. RotateY(rectheta);
+ r2. RotateZ(recphi);
}
-Float_t AliRICHPatRec::PhiPad()
+Float_t AliRICHPatRec::PhiPad(Float_t rectheta, Float_t recphi)
{
// ??
TRotation r2;
TRotation r;
- thetarot = - fTrackTheta;
- phirot = - fTrackPhi;
+ thetarot = - rectheta;
+ phirot = - recphi;
r1. RotateZ(phirot);
r2. RotateY(thetarot);