]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliDimuCombinator.h
move from AliAODTrack to AliVTrack
[u/mrichter/AliRoot.git] / EVGEN / AliDimuCombinator.h
index 1a0d405c3903371b5c32c7f676d6c6a5662e0bfe..da0cdd38246e0e17f213be6b8efcc2d3481b1c7f 100644 (file)
@@ -4,8 +4,14 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
+
+
+//  Class for dimuon analysis and fast dimuon simulation.
+//  It uses the AliRun particle tree.
+//  Comments and suggestions to andreas.morsch@cern.ch
+
+
 #include <TObject.h>
-#include <TParticle.h>
 
 class TClonesArray;
 class TParticle;
@@ -15,10 +21,12 @@ class AliDimuCombinator:
     public TObject 
 {
 public:
-    AliDimuCombinator(TClonesArray* Partarray);
-    AliDimuCombinator(const AliDimuCombinator &combinator);
+    AliDimuCombinator();
+    void  Copy(TObject &combi) const;
 //    
 //  Iterators
+//  Access to particle stack
+    TParticle* Particle(Int_t i) const;
 //  Single muons
     TParticle* FirstMuon();
     TParticle* NextMuon();
@@ -40,35 +48,36 @@ public:
     void SetPtMin(Float_t ptmin) {fPtMin=ptmin;}
     void SetEtaCut(Float_t etamin, Float_t etamax)
        {fEtaMin=etamin; fEtaMax=etamax;}
-    Bool_t Selected(TParticle* part);
-    Bool_t Selected(TParticle* part1, TParticle* part2);
+    Bool_t Selected(TParticle* part) const;
+    Bool_t Selected(TParticle* part1, TParticle* part2) const;
 // Kinematics
-    Float_t Mass(TParticle* part1, TParticle* part);
-    Float_t PT(TParticle* part1, TParticle* part);
-    Float_t Pz(TParticle* part1, TParticle* part);
-    Float_t Y(TParticle* part1, TParticle* part);
+    Float_t Mass(TParticle* part1, TParticle* part) const;
+    Float_t PT(TParticle* part1, TParticle* part) const;
+    Float_t Pz(TParticle* part1, TParticle* part) const;
+    Float_t Y(TParticle* part1, TParticle* part) const;
 // Response
-    void SmearGauss(Float_t width, Float_t & value);
+    void SmearGauss(Float_t width, Float_t & value) const;
 // Weight
-    Bool_t  Correlated(TParticle* part1, TParticle* part2);
+    Bool_t  Correlated(TParticle* part1, TParticle* part2) const;
     void    SetRate(Float_t rate) {fRate1=rate;}
     void    SetRate(Float_t rate1, Float_t rate2 ) {fRate1=rate1; fRate2=rate2;}
-    Float_t Weight(TParticle* part);
-    Float_t Weight(TParticle* part1, TParticle* part);
-    Float_t DecayProbability(TParticle* part);
-    AliDimuCombinator & operator=(const AliDimuCombinator & rhs);
+    Float_t Weight(TParticle* part) const;
+    Float_t Weight(TParticle* part1, TParticle* part) const;
+    Float_t DecayProbability(TParticle* part) const;
     
  private:
     void FirstPartner();
     void NextPartner();
     void FirstPartnerSelected();
     void NextPartnerSelected();
-    Int_t Origin(TParticle* part);
-    TParticle* Parent(TParticle* part);
-    TParticle* Partner();
-    Int_t Type(TParticle *part);
+    Int_t Origin(TParticle* part) const;
+    TParticle* Parent(TParticle* part) const;
+    TParticle* Partner() const;
+    Int_t Type(TParticle *part) const;
+    AliDimuCombinator(const AliDimuCombinator &combinator);
+    AliDimuCombinator & operator=(const AliDimuCombinator & rhs);
+
  private:
-    TClonesArray *fPartArray;      // MC Event
     Int_t fNParticle;              // Number of particles
     Int_t fImuon1;                 // Index of first muon
     Int_t fImuon2;                 // Index of second muon