]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/TenderSupplies/AliPIDTenderSupply.cxx
including new Salvatore's patch
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliPIDTenderSupply.cxx
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
32 AliPIDTenderSupply::AliPIDTenderSupply() :
33   AliTenderSupply()
34 {
35   //
36   // default ctor
37   //
38 }
39
40 //_____________________________________________________
41 AliPIDTenderSupply::AliPIDTenderSupply(const char *name, const AliTender *tender) :
42   AliTenderSupply(name,tender)
43 {
44   //
45   // named ctor
46   //
47 }
48
49 //_____________________________________________________
50 void AliPIDTenderSupply::ProcessEvent()
51 {
52   //
53   // Combine PID information
54   //
55
56   AliESDEvent *event=fTender->GetEvent();
57   if (!event) return;
58
59   AliESDpid *pid=fTender->GetESDhandler()->GetESDpid();
60   if (!pid) return;
61   //
62   // recalculate combined PID probabilities
63   //
64   Int_t ntracks=event->GetNumberOfTracks();
65   for(Int_t itrack = 0; itrack < ntracks; itrack++)
66     pid->CombinePID(event->GetTrack(itrack));
67   
68 }