Debugging improvement
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Aug 2005 15:07:28 +0000 (15:07 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 23 Aug 2005 15:07:28 +0000 (15:07 +0000)
RICH/AliRICH.cxx
RICH/AliRICHParam.cxx
RICH/AliRICHParam.h
RICH/AliRICHTracker.cxx
RICH/AliRICHTracker.h

index 4a8da85832b20b9ed205f35f080cfe6b74771980..640d487f1eb5a00ac7e64ae26bdfca64cce2cab0 100644 (file)
@@ -892,7 +892,7 @@ void AliRICH::RichAna()
 //  AliTracker::SetFieldMap(magf);
 
   TFile *pFileRA = new TFile("$(HOME)/RichAna.root","RECREATE","RICH Pattern Recognition");
-  TNtupleD *hn = new TNtupleD("hn","ntuple","Pmod:Charge:TrackTheta:TrackPhi:MinX:MinY:ThetaCerenkov:NPhotons:ChargeMIP:Chamber:TOF:LengthTOF:prob1:prob2:prob3");
+  TNtupleD *hn = new TNtupleD("hn","ntuple","Pmod:Charge:TrackTheta:TrackPhi:MinX:MinY:ThetaCerenkov:NPhotons:ChargeMIP:Chamber:TOF:LengthTOF:prob1:prob2:prob3:ErrPar1:ErrPar2:ErrPar3:Th1:Th2:Th3");
    
   AliESD *pESD=new AliESD;  pTree->SetBranchAddress("ESD", &pESD);
   for(Int_t iEvtN=0;iEvtN<GetLoader()->GetRunLoader()->GetNumberOfEvents();iEvtN++) {
@@ -911,7 +911,7 @@ void AliRICH::RichAna()
         pTrRich->RecWithESD(pESD,pRich,iTrackN);
         AliESDtrack *pTrack = pESD->GetTrack(iTrackN);// get next reconstructed track
         Double_t dx,dy;
-        Double_t hnvec[20];
+        Double_t hnvec[30];
         pTrack->GetRICHdxdy(dx,dy);
         hnvec[0]=pTrack->GetP();
         hnvec[1]=pTrack->GetSign();
@@ -930,6 +930,17 @@ void AliRICH::RichAna()
         hnvec[12]=prob[0]+prob[1]+prob[2];
         hnvec[13]=prob[3];
         hnvec[14]=prob[4];
+        hnvec[15]=pTrRich->fErrPar[2];
+        hnvec[16]=pTrRich->fErrPar[3];
+        hnvec[17]=pTrRich->fErrPar[4];
+        for(Int_t i=0;i<3;i++) {
+          Double_t mass = AliRICHParam::fgMass[i+2];
+          Double_t refIndex=AliRICHParam::RefIdxC6F14(AliRICHParam::MeanCkovEnergy());
+          Double_t cosThetaTh = TMath::Sqrt(mass*mass+pTrack->GetP()*pTrack->GetP())/(refIndex*pTrack->GetP());
+          hnvec[18+i]=0;
+          if(cosThetaTh>=1) continue;
+          hnvec[18+i]= TMath::ACos(cosThetaTh);
+        }
         hn->Fill(hnvec);
       }
     }
index 07060fcbb921cced82b3f04ad9f4a3671ec321e1..3a9ee9e086fecb3669743fa3b16295553fd7a529 100644 (file)
@@ -307,6 +307,7 @@ TVector3 AliRICHParam::SigmaSinglePhoton(Int_t partID, Double_t mom, Double_t th
   v.SetX(Interpolate(fgErrChrom,pmom,theta,phi));
   v.SetY(Interpolate(fgErrGeom,pmom,theta,phi));
   v.SetZ(Interpolate(fgErrLoc,pmom,theta,phi));
+  v*=1.5; // take into account bigger errors due to multiplicity...to change in future
 
   return v;
 }//SigmaSinglePhoton
index a7829dd80abecc04dffabae355f59af48908e0e4..1d89c239cbaa085fa8de2af91d8b0c0faa083ab3 100644 (file)
@@ -145,6 +145,7 @@ public:
                                                                                                                                                       //Detector Reference System
 
   static Bool_t     fgIsAerogel;                            //aerogel geometry instead of normal RICH flag
+  static Double_t fgMass[5];                                // mass array
 protected:
   static Bool_t     fgIsRadioSrc;                           //radioactive source instead of radiators flag
   static Bool_t     fgIsTestBeam;                           //test beam geometry instead of normal RICH flag
@@ -161,7 +162,6 @@ protected:
   static Double_t fgErrChrom[4][330];                       //
   static Double_t fgErrGeom[4][330];                        //
   static Double_t fgErrLoc[4][330];                         //Chromatic, Geometric and Localization array to parametrize SigmaCerenkov
-  static Double_t fgMass[5];                                // mass array
   
   ClassDef(AliRICHParam,6)                                  //RICH main parameters class
 };
index 6ee209e26e7ead0e02fa2cca76eb201180f1b5b3..e2d91d860a29c5531bbf77e6cd54b58ac6747491 100644 (file)
@@ -94,6 +94,7 @@ void AliRICHTracker::RecWithESD(AliESD *pESD,AliRICH *pRich,Int_t iTrackN)
       Double_t richPID[AliPID::kSPECIES];
       for (Int_t iPart=0;iPart<AliPID::kSPECIES;iPart++) {
         sigmaPID[iPart] = 0;
+        fErrPar[iPart] = 0;
         for(Int_t iphot=0;iphot<pRich->Clusters(iChamber)->GetEntries();iphot++) {
           recon.SetPhotonIndex(iphot);
           if(recon.GetPhotonFlag() == 2) {
@@ -103,6 +104,7 @@ void AliRICHTracker::RecWithESD(AliESD *pESD,AliRICH *pRich,Int_t iTrackN)
         }
        if (sigmaPID[iPart]>0)
          sigmaPID[iPart] = 1/TMath::Sqrt(sigmaPID[iPart])*0.001;
+          fErrPar[iPart]=sigmaPID[iPart];
         AliDebug(1,Form("sigma for %s is %f rad",AliPID::ParticleName(iPart),sigmaPID[iPart]));
       }
       CalcProb(thetaCerenkov,pTrack->GetP(),sigmaPID,richPID);
@@ -220,7 +222,7 @@ void AliRICHTracker::CalcProb(Double_t thetaCer,Double_t pmod, Double_t *sigmaPI
   Double_t thetaTh[AliPID::kSPECIES];
   for(Int_t iPart=0;iPart<AliPID::kSPECIES;iPart++){
     height[iPart]=0;
-    Double_t mass = AliPID::ParticleMass(iPart);
+    Double_t mass = AliRICHParam::fgMass[iPart];
     Double_t refIndex=AliRICHParam::RefIdxC6F14(AliRICHParam::MeanCkovEnergy());
     Double_t cosThetaTh = TMath::Sqrt(mass*mass+pmod*pmod)/(refIndex*pmod);
     thetaTh[iPart]=0;
index ec6e99a636fdc33541af323f39941d897f535e4a..01eefb8e040590d0a17fe3347bcc6c9c02ff9de9 100644 (file)
@@ -13,7 +13,7 @@ class TTree;
 class AliRICHTracker : public AliTracker
 {
 public:
-           AliRICHTracker() :AliTracker()      {AliDebug(1,"Start.");}
+           AliRICHTracker() :AliTracker()      {for(Int_t i=0;i<5;i++)fErrPar[i]=0;AliDebug(1,"Start.");}
   virtual ~AliRICHTracker()                    {AliDebug(1,"Stop.");}
   Int_t Clusters2Tracks(AliESD *)              {AliDebug(1,"Start.");return 0;} //pure virtual from AliTracker 
   Int_t RefitInward(AliESD *)                  {AliDebug(1,"Start.");return 0;} //pure virtual from AliTracker 
@@ -24,7 +24,7 @@ public:
   void RecWithStack(TNtupleD *hn);                                              //recon from Stack in case ESD empty
   void CalcProb(Double_t thetaCer,Double_t pmod,Double_t *sigmaPID, Double_t *richPID);             // calculate pid for RICH
   Int_t LoadClusters(TTree *);                                                  //pure virtual from AliTracker 
-
+  Double_t fErrPar[5];                                                          //Temporary stored for debug purpose
 protected:
 
   Double_t fField; // magnetic field stored