GetLoader()->TreeH()->GetEntry(iPrimN);
for(Int_t iHitN=0;iHitN<Hits()->GetEntries();iHitN++){//hits loop
AliRICHhit *pHit=(AliRICHhit*)Hits()->At(iHitN);//get current hit
- TVector2 x2 = C(pHit->C())->Mrs2Pc(pHit->OutX3());//hit position in photocathode plane
+ TVector2 x2 = C(pHit->C())->Mrs2Pc(0.5*(pHit->InX3()+pHit->OutX3()));//hit position in the anod plane
Int_t iTotQdc=P()->TotQdc(x2,pHit->Eloss());//total charge produced by hit, 0 if hit in dead zone
if(iTotQdc==0) continue;
//
if(pad[0]<xmin)xmin=pad[0];if(pad[0]>xmax)xmax=pad[0];if(pad[1]<ymin)ymin=pad[1];if(pad[1]>ymax)ymax=pad[1];
}
fX/=fQdc;fY/=fQdc;//Center of Gravity
+
+ TVector2 center = AliRICHParam::Pad2Loc(AliRICHParam::Loc2Pad(TVector2(fX,fY)));
+ fX -= AliRICHParam::CogCorr(fX-center.X());
+
fShape=Int_t(100*(xmax-xmin+1)+ymax-ymin+1);//find box containing cluster
fSize+=nLocals;
fStatus=kRaw;
// horizontal angle between chambers 19.5 grad
// vertical angle between chambers 20 grad
RotY(90);//rotate around y
- fCenterX3.SetXYZ(490,0,0);fPcX3.SetXYZ(490+8-0.4,0,0);fRadX3.SetXYZ(490-2,0,0); //shift center along x by 490 cm
+ fCenterX3.SetXYZ(490,0,0);fPcX3.SetXYZ(490+8-0.2,0,0);fRadX3.SetXYZ(490-2,0,0); //shift center along x by 490 cm
switch(iChamber){
case 0: //special test beam configuration without rotation.
virtual ~AliRICHChamber() {;}
AliRICHChamber& operator=(const AliRICHChamber&) {return *this;}
- static Double_t AlphaFeedback(Int_t ) {return 0.030;} //determines number of feedback photons
+ static Double_t AlphaFeedback(Int_t ) {return 0.020;} //determines number of feedback photons updated to 9/11/04 by Di Mauro
TRotMatrix* RotMatrix() const{return fpRotMatrix;}
TString RotMatrixName() const{return "rot"+fName;}
inline static Int_t Pad2Sec(const TVector &pad); //return sector
static Bool_t IsAccepted(const TVector2 &x2) {return ( x2.X()>=0 && x2.X()<=PcSizeX() && x2.Y()>=0 && x2.Y()<=PcSizeY() )
? kTRUE:kFALSE;}
+ inline static Double_t CogCorr(Double_t x) {return 3.31267e-2*TMath::Sin(2*TMath::Pi()/PadSizeX()*x)
+ -2.66575e-3*TMath::Sin(4*TMath::Pi()/PadSizeX()*x)
+ +2.80553e-3*TMath::Sin(6*TMath::Pi()/PadSizeX()*x);}
protected:
TObjArray *fpChambers; //list of chambers
static Bool_t fgIsWireSag; //wire sagitta ON/OFF flag
//Pattern recognition wirh Stack particles
TFile *pFile = new TFile("$(HOME)/RPR.root","RECREATE","RICH Pattern Recognition");
TNtupleD *hn = new TNtupleD("hn","ntuple","Pmod:Charge:TrackTheta:TrackPhi:TrackX:TrackY:MinX:MinY:ChargeMIP:ThetaCerenkov:NPhotons:MipIndex");
+ printf("\n\n");
+ printf("Pattern Recognition done for event %5i",0);
for(Int_t iEvtN=0;iEvtN<R()->GetLoader()->GetRunLoader()->GetNumberOfEvents();iEvtN++) {
R()->GetLoader()->GetRunLoader()->GetEvent(iEvtN);
AliRICHTracker *tr = new AliRICHTracker();
tr->RecWithStack(hn);
- Info("CheckPR","Pattern Recognition done for event %i",iEvtN);
+// Info("CheckPR","Pattern Recognition done for event %i \b",iEvtN);
+ printf("\b\b\b\b\b%5i",iEvtN+1);
}
+ printf("\n\n");
pFile->Write();pFile->Close();
}