New package for heavy flavour electrons analysis (M.Fasel)
[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  *                                                                      *
17  * Class for TRD PID                                                    *
18  * Implements the abstract base class AliHFEpidBase                     *
19  * Make PID does the PID decision                                       *
20  * Class further contains TRD specific cuts and QA histograms           *
21  *                                                                      *
22  * Authors:                                                             *
23  *   Markus Fasel <M.Fasel@gsi.de>                                      *
24  *                                                                      *
25  ************************************************************************/
26 #include <TMath.h>
27 #include <TParticle.h>
28
29 #include "AliMCParticle.h"
30 #include "AliVParticle.h"
31
32 #include "AliHFEpidMC.h"
33
34 ClassImp(AliHFEpidMC)
35
36 //___________________________________________________________________
37 AliHFEpidMC::AliHFEpidMC(const Char_t *name):
38   AliHFEpidBase(name)
39 {
40   //
41   // Default constructor
42   //
43 }
44
45 //___________________________________________________________________
46 Bool_t AliHFEpidMC::InitializePID(){
47   // 
48   // Implementation of the framework function InitializePID
49   // Not yet anything to implement in case of MC PID
50   //
51   return kTRUE;
52 }
53
54 //___________________________________________________________________
55 Int_t AliHFEpidMC::IsSelected(AliVParticle *track){
56   //
57   // PID decision for Monte Carlo particles
58   // return true if PDG Code is +/-11 (electron)
59   // otherwise return false
60   //
61   AliMCParticle *mctrack = 0x0;
62   if(!(mctrack = dynamic_cast<AliMCParticle *>(track))) return 0;
63   return mctrack->Particle()->GetPdgCode();
64 }