]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHReconstructor.cxx
Using default Root containers for Root tags bigger than v4-00-01. Removing fast wrapp...
[u/mrichter/AliRoot.git] / RICH / AliRICHReconstructor.cxx
CommitLineData
121a60bd 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
121a60bd 16
17///////////////////////////////////////////////////////////////////////////////
18// //
19// class for RICH reconstruction //
20// //
21///////////////////////////////////////////////////////////////////////////////
22
23
24#include "AliRICHReconstructor.h"
121a60bd 25#include "AliRICHClusterFinder.h"
998b831f 26#include "AliRICHHelix.h"
27#include <AliRunLoader.h>
28#include <AliRun.h>
29#include <AliESD.h>
121a60bd 30
31ClassImp(AliRICHReconstructor)
32
998b831f 33//__________________________________________________________________________________________________
34void AliRICHReconstructor::Reconstruct(AliRunLoader* pAL) const
121a60bd 35{
998b831f 36//Finds clusters out of digits
37 AliDebug(1,"Start cluster finder.");AliRICHClusterFinder clus(GetRICH(pAL)); clus.Exec();
121a60bd 38}
998b831f 39//__________________________________________________________________________________________________
40void AliRICHReconstructor::FillESD(AliRunLoader* /*pAL*/, AliESD* pESD) const
121a60bd 41{
998b831f 42//This methode fills AliESDtrack with information from RICH
43 AliDebug(1,Form("Start with %i tracks",pESD->GetNumberOfTracks()));
44/* const Double_t masses[5]={0.000511,0.105658,0.139567,0.493677,0.93828};//electron,muon,pion,kaon,proton
45 const Double_t refIndex = 1.29052;
121a60bd 46
998b831f 47 Double_t thetaTh[5];
48 Double_t sinThetaThNorm;
49 Double_t sigmaThetaTh[5];
50 Double_t height[5];
51 Double_t totalHeight=0;
52 Double_t x[3],p[3]; //tmp storage for track parameters
53
54 for(Int_t iTrackN=0;iTrackN<pESD->GetNumberOfTracks();iTrackN++){//ESD tracks loop
55 AliESDtrack *pTrack = pESD->GetTrack(iTrackN);// get next reconstructed track
56// if((pTrack->GetStatus()&AliESDtrack::kTOFout)==0) continue; //ignore tracks not recontructed by TOF
57 pTrack->GetXYZ(x); pTrack->GetPxPyPz(p); Double_t pmod=pTrack->GetP();//get running track parameters
58 continue;
59// AliRICHHelix helix(x[0],x[1],x[2],p[0],p[1],p[2]); //construct helix from running track parameters
60
61// TVector rad(1,5); TVector pc(1,5);
62// helix.RichIntersect(GetRICH(pAL)->P(),rad,pc); //returns cross point of track with RICH PC in LRS
63
64 for(Int_t iPart=4;iPart>=0;iPart--){
65 Double_t cosThetaTh = TMath::Sqrt(masses[iPart]*masses[iPart]+pmod*pmod)/(refIndex*pmod);
66 if(cosThetaTh>=1) {break;}
67 thetaTh[iPart] = TMath::ACos(cosThetaTh);
68 sinThetaThNorm = TMath::Sin(thetaTh[iPart])/TMath::Sqrt(1-1/(refIndex*refIndex));
69 sigmaThetaTh[iPart] = (0.014*(1/sinThetaThNorm-1) + 0.0043)*1.25;
70 height[iPart] = TMath::Gaus(thetaExp,thetaTh[iPart],sigmaThetaTh[iPart]);
71 totalHeight +=height[iPart];
72 }
73
74 Double_t richPID[5];
75 for(Int_t iPart=0;iPart<5;iPart++) richPID[iPart] = height[iPart]/totalHeight;
76 pTrack->SetRICHpid(richPID);
77 }//ESD tracks loop
78 */
79}//FillESD
80//__________________________________________________________________________________________________
81AliRICH* AliRICHReconstructor::GetRICH(AliRunLoader* pAL) const
121a60bd 82{
83// get the RICH detector
84
998b831f 85 if (!pAL->GetAliRun()) pAL->LoadgAlice();
86 if (!pAL->GetAliRun()) {AliError("couldn't get AliRun object"); return NULL; }
87 AliRICH* pRich = (AliRICH*) pAL->GetAliRun()->GetDetector("RICH");
88 if (!pRich) {AliError("couldn't get RICH detector"); return NULL; }
89 return pRich;
121a60bd 90}
998b831f 91//__________________________________________________________________________________________________