1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // checks ITS PID based on ITS dE/dx truncated mean
19 // Authors: Matus Kalisky <matus.kalisky@cern.ch>
20 // Markus Fasel <M.Fasel@gsi.de>
28 //#include "AliAODTrack.h"
29 //#include "AliAODMCParticle.h"
30 #include "AliESDtrack.h"
33 #include "AliVParticle.h"
34 #include "AliPIDResponse.h"
36 #include "AliHFEdetPIDqa.h"
37 #include "AliHFEpidITS.h"
38 #include "AliHFEpidQAmanager.h"
40 ClassImp(AliHFEpidITS)
42 //___________________________________________________________________
43 AliHFEpidITS::AliHFEpidITS():
54 //___________________________________________________________________
55 AliHFEpidITS::AliHFEpidITS(const Char_t *name):
61 // Default constructor
65 //___________________________________________________________________
66 AliHFEpidITS::AliHFEpidITS(const AliHFEpidITS &ref):
68 , fNsigmaITS(ref.fNsigmaITS)
69 , fMeanShift(ref.fMeanShift)
77 //___________________________________________________________________
78 AliHFEpidITS &AliHFEpidITS::operator=(const AliHFEpidITS &ref){
80 // Assignment operator
82 if(this != &ref) ref.Copy(*this);
86 //___________________________________________________________________
87 AliHFEpidITS::~AliHFEpidITS(){
93 //___________________________________________________________________
94 void AliHFEpidITS::Copy(TObject &ref) const {
97 // Provides a deep copy
99 AliHFEpidITS &target = dynamic_cast<AliHFEpidITS &>(ref);
101 target.fNsigmaITS = fNsigmaITS;
102 target.fMeanShift = fMeanShift;
103 AliHFEpidBase::Copy(ref);
106 //___________________________________________________________________
107 Bool_t AliHFEpidITS::InitializePID(Int_t /*run*/){
109 // ITS PID initialization
115 //___________________________________________________________________
116 Int_t AliHFEpidITS::IsSelected(const AliHFEpidObject* track, AliHFEpidQAmanager* pidqa) const {
118 // Does PID decision for ITS
120 if(!fkPIDResponse) return 0;
121 AliDebug(2, "PID object available");
123 const AliVTrack *vtrack = dynamic_cast<const AliVTrack *>(track->GetRecTrack());
124 if(!vtrack) return 0;
126 if(pidqa) pidqa->ProcessTrack(track, AliHFEpid::kITSpid, AliHFEdetPIDqa::kBeforePID);
128 // Fill before selection
130 Double_t sigEle = GetITSNsigmaCorrected(vtrack);
131 AliDebug(2, Form("Number of sigmas in ITS: %f", sigEle));
132 if(TMath::Abs(sigEle) < fNsigmaITS) pdg = 11;
133 if(pdg == 11 && pidqa) pidqa->ProcessTrack(track, AliHFEpid::kITSpid, AliHFEdetPIDqa::kAfterPID);
135 // return 11; // @TODO: Implement ITS PID decision
138 //___________________________________________________________________
139 Double_t AliHFEpidITS::GetITSNsigmaCorrected(const AliVTrack *track) const {
141 // Get the ITS number of sigmas corrected for a possible shift of the mean dE/dx
143 return fkPIDResponse->NumberOfSigmasITS(track, AliPID::kElectron) - fMeanShift;