]>
Commit | Line | Data |
---|---|---|
3278403b | 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 | ||
16 | ////////////////////////////////////////////////////////////////////////// | |
17 | // // | |
18 | // AliHMPIDPid // | |
19 | // // | |
20 | // HMPID class to perfom particle identification // | |
21 | // // | |
22 | ////////////////////////////////////////////////////////////////////////// | |
23 | ||
24 | #include "AliHMPIDPid.h" //class header | |
25 | #include "AliHMPIDParam.h" //class header | |
9eb30f08 | 26 | #include <AliESDtrack.h> //FindPid() |
3278403b | 27 | |
28 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
29 | AliHMPIDPid::AliHMPIDPid():TTask("HMPIDrec","HMPIDPid") | |
30 | { | |
31 | //.. | |
32 | //init of data members | |
33 | //.. | |
34 | } | |
35 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
9eb30f08 | 36 | void AliHMPIDPid::FindPid(AliESDtrack *pTrk,Double_t *prob) |
3278403b | 37 | { |
38 | // Calculates probability to be a electron-muon-pion-kaon-proton | |
39 | // from the given Cerenkov angle and momentum assuming no initial particle composition | |
40 | // (i.e. apriory probability to be the particle of the given sort is the same for all sorts) | |
41 | ||
42 | AliPID ppp; //needed | |
9eb30f08 | 43 | Double_t h[AliPID::kSPECIES]; |
44 | ||
45 | if(pTrk->GetHMPIDsignal()<=0){//HMPID does not find anything reasonable for this track, assign 0.2 for all species | |
46 | for(Int_t iPart=0;iPart<AliPID::kSPECIES;iPart++) prob[iPart]=1.0/AliPID::kSPECIES; | |
47 | return; | |
48 | } | |
49 | ||
50 | Double_t pmod = pTrk->GetP(); | |
51 | Double_t hTot=0; | |
52 | ||
53 | for(Int_t iPart=0;iPart<AliPID::kSPECIES;iPart++){ | |
54 | Double_t mass = AliPID::ParticleMass(iPart); | |
55 | Double_t cosThetaTh = TMath::Sqrt(mass*mass+pmod*pmod)/(AliHMPIDParam::Instance()->MeanIdxRad()*pmod); | |
56 | if(cosThetaTh<1) //calculate the height of theoretical theta ckov on the gaus of experimental one | |
57 | h[iPart] =TMath::Gaus(TMath::ACos(cosThetaTh),pTrk->GetHMPIDsignal(),TMath::Sqrt(pTrk->GetHMPIDchi2()),kTRUE); | |
58 | else //beta < 1/ref. idx. => no light at all | |
59 | h[iPart] =0 ; | |
60 | hTot +=h[iPart]; //total height of all theoretical heights for normalization | |
61 | }//species loop | |
62 | ||
63 | Double_t hMin=TMath::Gaus(pTrk->GetHMPIDsignal()-4*TMath::Sqrt(pTrk->GetHMPIDchi2()),pTrk->GetHMPIDsignal(),TMath::Sqrt(pTrk->GetHMPIDchi2()),kTRUE);//5 sigma protection | |
64 | ||
65 | for(Int_t iPart=0;iPart<AliPID::kSPECIES;iPart++) {//species loop to assign probabilities | |
66 | if(hTot>hMin) prob[iPart]=h[iPart]/hTot; | |
67 | else prob[iPart]=1.0/AliPID::kSPECIES; //all theoretical values are far away from experemental one | |
68 | } | |
3278403b | 69 | } |
70 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |