]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG/muon/AliAODMuonReplicator.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWG / muon / AliAODMuonReplicator.h
1 #ifndef ALIAODMUONREPLICATOR_H
2 #define ALIAODMUONREPLICATOR_H
3
4 /* Copyright(c) 1998-2013, 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 class AliAODVZERO;
27 class AliAODTZERO;
28 class AliAODHeader;
29 class AliAODTracklets;
30 class AliAODZDC;
31
32 class AliAODMuonReplicator : public AliAODBranchReplicator
33 {
34 public:
35   
36   AliAODMuonReplicator(const char* name="AliAODMuonReplicator", 
37                        const char* title="Branch Replicator for muon related branches",
38                        AliAnalysisCuts* trackCut=0x0,
39                        AliAnalysisCuts* vertexCut=0x0,
40                        Int_t mcMode=0,
41                        Bool_t replicateHeader=kFALSE,
42                        Bool_t replicateTracklets=kFALSE);
43   virtual ~AliAODMuonReplicator();
44   
45   virtual TList* GetList() const;
46   
47   virtual void ReplicateAndFilter(const AliAODEvent& source);
48   
49 private:
50   void FilterMC(const AliAODEvent& source);
51   void SelectParticle(Int_t i);
52   Bool_t IsParticleSelected(Int_t i);
53   void CreateLabelMap(const AliAODEvent& source);
54   Int_t GetNewLabel(Int_t i);
55   
56 private:
57   AliAnalysisCuts* fTrackCut; // decides which tracks to keep
58   mutable TClonesArray* fTracks; //! internal array of muon tracks
59   AliAnalysisCuts* fVertexCut; // decides which vertices to keep
60   mutable TClonesArray* fVertices; //! internal array of vertices
61   mutable TClonesArray* fDimuons; //! internal array of dimuons
62   mutable AliAODVZERO* fVZERO; //! internal vzero object
63   mutable AliAODTZERO* fTZERO; //! internal tzero object
64   mutable AliAODHeader* fHeader; //! internal header object
65   mutable AliAODTracklets* fTracklets; //! internal tracklets object
66   mutable AliAODZDC* fZDC; //! internal zdc object
67   mutable TList* fList; //! internal list of managed objects (fVertices and fTracks)
68   
69   mutable TClonesArray* fMCParticles; //! internal array of MC particles
70   mutable AliAODMCHeader* fMCHeader; //! internal array of MC header
71   Int_t fMCMode; // MC filtering switch (0=none=no mc information,1=normal=simple copy,>=2=aggressive=filter out)
72   TExMap fLabelMap; //! for MC label remapping (in case of aggressive filtering)
73   TExMap fParticleSelected; //! List of selected MC particles
74   Bool_t fReplicateHeader; //! whether or not the replicate the AOD Header
75   Bool_t fReplicateTracklets; //! whether or not the replicate the AOD Tracklets
76   
77 private:
78   AliAODMuonReplicator(const AliAODMuonReplicator&);
79   AliAODMuonReplicator& operator=(const AliAODMuonReplicator&);
80   
81   ClassDef(AliAODMuonReplicator,7) // Branch replicator for ESD to muon AOD.
82 };
83
84 #endif