]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/TenderSupplies/AliPIDTenderSupply.cxx
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliPIDTenderSupply.cxx
CommitLineData
e75408ba 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// //
19// PID tender: Do combined PID //
20// //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24
25#include <AliESDpid.h>
26#include <AliESDEvent.h>
27#include <AliESDInputHandler.h>
28#include "AliTender.h"
29
30#include "AliPIDTenderSupply.h"
31
00a38d07 32ClassImp(AliPIDTenderSupply)
33
e75408ba 34AliPIDTenderSupply::AliPIDTenderSupply() :
00a38d07 35 AliTenderSupply(),
36 fCachePID(kFALSE)
e75408ba 37{
38 //
39 // default ctor
40 //
41}
42
43//_____________________________________________________
44AliPIDTenderSupply::AliPIDTenderSupply(const char *name, const AliTender *tender) :
00a38d07 45 AliTenderSupply(name,tender),
46 fCachePID(kFALSE)
e75408ba 47{
48 //
49 // named ctor
50 //
51}
52
53//_____________________________________________________
54void AliPIDTenderSupply::ProcessEvent()
55{
56 //
57 // Combine PID information
58 //
59
60 AliESDEvent *event=fTender->GetEvent();
61 if (!event) return;
62
63 AliESDpid *pid=fTender->GetESDhandler()->GetESDpid();
64 if (!pid) return;
00a38d07 65 // chache pid if requested
66 if (fCachePID) {
67 pid->FillTrackDetectorPID();
68 }
69
e75408ba 70 //
71 // recalculate combined PID probabilities
72 //
73 Int_t ntracks=event->GetNumberOfTracks();
74 for(Int_t itrack = 0; itrack < ntracks; itrack++)
75 pid->CombinePID(event->GetTrack(itrack));
76
77}