]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpidMC.cxx
New classes (Markus)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpidMC.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 // Class for TRD PID
17 // Implements the abstract base class AliHFEpidBase
18 // Make PID does the PID decision
19 // Class further contains TRD specific cuts and QA histograms
20 //
21 // Authors:
22 //   Markus Fasel <M.Fasel@gsi.de>
23 //
24 #include <TParticle.h>
25
26 #include "AliAODMCParticle.h"
27 #include "AliMCParticle.h"
28 //#include "AliVParticle.h"
29
30 #include "AliHFEpidMC.h"
31
32 ClassImp(AliHFEpidMC)
33
34 //___________________________________________________________________
35 AliHFEpidMC::AliHFEpidMC(const Char_t *name):
36   AliHFEpidBase(name)
37 {
38   //
39   // Default constructor
40   //
41 }
42
43 //___________________________________________________________________
44 Bool_t AliHFEpidMC::InitializePID(){
45   // 
46   // Implementation of the framework function InitializePID
47   // Not yet anything to implement in case of MC PID
48   //
49   return kTRUE;
50 }
51
52 //___________________________________________________________________
53 Int_t AliHFEpidMC::IsSelected(AliHFEpidObject *track){
54   //
55   // returns MC PDG Code
56   // Functionality implemented in the base class
57   // (necessary for PID QA)
58   //
59   if(track->fAnalysisType == AliHFEpidObject::kESDanalysis){
60     AliMCParticle *mc = dynamic_cast<AliMCParticle *>(track->fMCtrack);
61     if(!mc) return 0;
62     return mc->Particle()->GetPdgCode();
63   }
64   else{
65     AliAODMCParticle *aodmc = dynamic_cast<AliAODMCParticle *>(track->fMCtrack);
66     if(!aodmc) return 0;
67     return aodmc->GetPdgCode();
68   } 
69 }