]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/muon/AliAODMuonReplicator.h
fixes from Laurent for the MC branch in the AOD filters
[u/mrichter/AliRoot.git] / PWG3 / muon / AliAODMuonReplicator.h
1 #ifndef ALIAODMUONREPLICATOR_H
2 #define ALIAODMUONREPLICATOR_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9
10 #ifndef ALIDAODBRANCHREPLICATOR_H
11 #  include "AliAODBranchReplicator.h"
12 #endif
13 #ifndef ROOT_TExMap
14 #  include "TExMap.h"
15 #endif
16
17 //
18 // Implementation of a branch replicator 
19 // to produce slim muon and dimuon aods.
20 //
21 // Author: L. Aphecetche (Subatech)
22
23 class AliAnalysisCuts;
24 class TClonesArray;
25 class AliAODMCHeader;
26
27 class AliAODMuonReplicator : public AliAODBranchReplicator
28 {
29 public:
30   
31   AliAODMuonReplicator(const char* name="AliAODMuonReplicator", 
32                        const char* title="Branch Replicator for muon related branches",
33                        AliAnalysisCuts* trackCut=0x0,
34                        AliAnalysisCuts* vertexCut=0x0,
35                        Int_t mcMode=0);
36   virtual ~AliAODMuonReplicator();
37   
38   virtual TList* GetList() const;
39   
40   virtual void ReplicateAndFilter(const AliAODEvent& source);
41   
42 private:
43   void FilterMC(const AliAODEvent& source);
44   void SelectParticle(Int_t i);
45   Bool_t IsParticleSelected(Int_t i);
46   void CreateLabelMap(const AliAODEvent& source);
47   Int_t GetNewLabel(Int_t i);
48   
49 private:
50   AliAnalysisCuts* fTrackCut; // decides which tracks to keep
51   mutable TClonesArray* fTracks; //! internal array of muon tracks
52   AliAnalysisCuts* fVertexCut; // decides which vertices to keep
53   mutable TClonesArray* fVertices; //! internal array of vertices
54   mutable TClonesArray* fDimuons; //! internal array of dimuons
55   mutable TList* fList; //! internal list of managed objects (fVertices and fTracks)
56   
57   mutable TClonesArray* fMCParticles; //! internal array of MC particles
58   mutable AliAODMCHeader* fMCHeader; //! internal array of MC header
59   Int_t fMCMode; // MC filtering switch (0=none=no mc information,1=normal=simple copy,>=2=aggressive=filter out)
60   TExMap fLabelMap; //! for MC label remapping (in case of aggressive filtering)
61   TExMap fParticleSelected; //! List of selected MC particles
62
63 private:
64   AliAODMuonReplicator(const AliAODMuonReplicator&);
65   AliAODMuonReplicator& operator=(const AliAODMuonReplicator&);
66   
67   ClassDef(AliAODMuonReplicator,3) // Branch replicator for ESD to muon AOD.
68 };
69
70 #endif