]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muon/AliMuonInfoStoreMC.h
Include CINT5 and CMUS5 trigger. Add the possibility to select tracks matching the...
[u/mrichter/AliRoot.git] / PWG3 / muon / AliMuonInfoStoreMC.h
1 #ifndef ALIMUONINFOSTOREMC_H
2 #define ALIMUONINFOSTOREMC_H
3
4 /* Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 //***********************************************************
8 // Class AliMuonInfoStoreRD
9 // class used to extract and store info of MC particle
10 // Author: X-M. Zhang, zhang@clermont.in2p3.fr
11 //                     zhangxm@iopp.ccnu.edu.cn
12 //***********************************************************
13
14 #include <TString.h>
15 #include <TParticle.h>
16 #include <TLorentzVector.h>
17 #include <TClonesArray.h>
18
19 #include "AliMCEventHandler.h"
20 #include "AliStack.h"
21 #include "AliAODMCParticle.h"
22 #include "AliESDEvent.h"
23 #include "AliESDMuonTrack.h"
24 #include "AliAODTrack.h"
25 #include "AliMuonInfoStoreRD.h"
26 #include "AliMCEvent.h"
27
28 class AliMuonInfoStoreMC : public AliMuonInfoStoreRD {
29  public:
30
31   AliMuonInfoStoreMC();
32   AliMuonInfoStoreMC(AliAODTrack     *trkAOD, AliMCEvent *mcEvent, Bool_t full=kFALSE);
33   AliMuonInfoStoreMC(AliESDMuonTrack *trkESD, AliMCEvent *mcEvent, Bool_t full=kFALSE);
34   AliMuonInfoStoreMC(const AliMuonInfoStoreMC &src);
35   AliMuonInfoStoreMC& operator=(const AliMuonInfoStoreMC &src);
36   virtual ~AliMuonInfoStoreMC();
37
38   Int_t  ParentFlavour(Int_t i=0)    const;
39   Bool_t IsMotherAResonance(Int_t i) const;
40
41   TLorentzVector LorentzP()         const { return fLorentzP; }
42   Int_t    Source()                 const { return fSource; }
43   Int_t    TrackIndex()             const { return fTrackIndex; }
44   Int_t    TrackPDGCode()           const { return fTrackPDGCode; }
45   Int_t    ParentsN()               const { return fNParents; }
46   Int_t    ParentIndex(Int_t i=0)   const { return (i<fNParents ? fParentIndex[i] : -1); }
47   Int_t    ParentPDGCode(Int_t i=0) const { return (i<fNParents ? fParentPDGCode[i] : 0); }
48   Int_t    QuarkIndex(Int_t i=0)    const { return (i<4 ? fQuarkIndex[i] : -1); }
49   Int_t    QuarkPDGCode(Int_t i=0)  const { return (i<4 ? fQuarkPDGCode[i] : 0); }
50   Bool_t   IsOscillation()          const { return fOscillation; }
51   Double_t Weight()                 const { return fWeight; }
52
53   static const char* StdBranchName() { return fgkStdBranchName.Data(); }
54   static Int_t SourcesN()            { return fgkSourcesN;             }
55
56  private:
57
58   void SetMCInfoAOD(AliMCEvent *mcEvent, Int_t label);
59   void SetMCInfoESD(AliMCEvent *mcEvent, Int_t label);
60   void FillHistoryQuarksAOD(AliMCEvent *mcEvent, Int_t lineM);
61   void FillHistoryQuarksESD(AliMCEvent *mcEvent, Int_t lineM);
62   Int_t SelectHFMuon();
63
64   Bool_t IsDiquark(Int_t pdg);
65   void ResetQuarkInfo();
66
67   static const TString fgkStdBranchName;  // Standard branch name
68   static const Int_t   fgkSourcesN;       // num. of muon sources
69
70   Bool_t fIsFull;            // whether to use full mode (Pb-Pb)
71   TLorentzVector fLorentzP;  // lorentz momentum of particle
72   Int_t fTrackIndex;         // index of the MC particle
73   Int_t fTrackPDGCode;       // PDG code of the MC particle
74   Int_t fSource;  // = 0, mu<-b 
75                   // = 1, mu<-c 
76                   // = 2, primary mu
77                   // = 3, secondary mu
78                   // = 4, not mu
79                   // = 5, unidentified track
80
81   Int_t fParentIndex[5];    // index of parents
82   Int_t fParentPDGCode[5];  // PDG code of parents
83   Int_t fNParents;          // num. of parents
84   Bool_t fOscillation;      // flag of oscillation
85
86   Int_t fQuarkIndex[4];    // index of quarks
87   Int_t fQuarkPDGCode[4];  // PDG code of quarks
88
89   Double_t fWeight;  // for PbPb collisoions
90
91   ClassDef(AliMuonInfoStoreMC, 3);
92 };
93
94 #endif