ROOT logo
#ifndef ALIMUONPAIRLIGHT_H
#define ALIMUONPAIRLIGHT_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */
// Revision of includes 06/09/2006

/// \ingroup evaluation
/// \class AliMUONPairLight
/// \brief Compact information for the generated muon pairs 
/// 
/// Compact information for the generated muon pairs in the MUON arm 
/// useful at the last stage of the analysis chain
/// Pairs are built with two AliMUONTrackLight objects 
/// Using the class AliMUONTrackLight this class combines the decay
/// information ("history") of the reconstructed tracks and fills
/// a series of flags for the formed reconstructed dimuon:
/// fIsCorrelated, fCreationProcess, fIsFeedDown, ...
/// for information about the dimuon, use PrintInfo with the appropriate
/// printflag
/// To be used together with AliMUONTrackLight
///
/// \author This class was prepared by INFN Cagliari, July 2006
/// (authors: H.Woehri, A.de Falco)

// MUON classes
#include "AliMUONTrackLight.h"

// ROOT classes
//#include "TLorentzVector.h"
class TLorentzVector;

class AliMUONPairLight : public TObject { 
public:
  AliMUONPairLight();
  AliMUONPairLight(AliMUONPairLight &dimuCopy);
  virtual ~AliMUONPairLight();
  AliMUONPairLight& operator=(const AliMUONPairLight&);
  virtual void SetMuons(const AliMUONTrackLight& mu0, const AliMUONTrackLight& mu1);
  AliMUONTrackLight* GetMuon(Int_t index) ;   
  Int_t GetMuonMotherPDG(Int_t imuon, Int_t mother=0) ; 

  /// returns kTRUE if the creation process of the pair was "open charm" (kFALSE... otherwise)
  Bool_t IsOpenCharm() {return (TMath::Abs(fMu0.GetParentFlavour(0))==4 && TMath::Abs(fMu1.GetParentFlavour(0))==4 && fIsCorrelated && !IsAResonance());}
  /// returns kTRUE if the creation process of the pair was "open beauty" (kFALSE... otherwise)
  Bool_t IsOpenBeauty() {return (TMath::Abs(fMu0.GetParentFlavour(0))==5 && TMath::Abs(fMu1.GetParentFlavour(0))==5 && fIsCorrelated  && !IsAResonance());}
  Bool_t IsAResonance(); 
  /// returns kTRUE if at least one of the first hadronised parent is a pi or a K (kFALSE... otherwise)
  Bool_t IsOneMuonFromPionOrKaon(){return (fMu0.IsParentPionOrKaon(0) || fMu1.IsParentPionOrKaon(0));}
  /// Return the info if the two muons are of correlated origin
  Bool_t IsCorrelated() const {return fIsCorrelated;}   
  /// Return the pdg of common mother
  Int_t GetCauseOfCorrelation() const {return fCauseOfCorrelation;}
  /// Return the info if the process is from feeddown 
  Bool_t IsFeedDown() const {return fIsFeedDown;}   
  /// returns kTRUE if at least one of the reconstructed tracks is not a muon (kFALSE... otherwise)
  Bool_t IsOneTrackNotAMuon() {return (!( fMu0.IsAMuon() && fMu1.IsAMuon() )) ;}
  /// returns the charge of the created pair
  Int_t GetCharge() {return fMu0.GetCharge() + fMu1.GetCharge();}
  /// \brief Return the info ablout creation process
  ///0: pair creation, 1: gluon splitting, 2: flavour excitation, 3: same fragmented mother, -1: resonance
  Int_t GetCreationProcess() const  {return fCreationProcess;}
  /// Set the info ablout creation process
  void SetCorrelated(Bool_t answer) {fIsCorrelated = answer; }
  /// Set the pdg of common mother
  void SetCauseOfCorrelation(Int_t pdg) {fCauseOfCorrelation = pdg; }
  /// Set the info if the process is from feeddown
  void SetFeedDown(Int_t answer) {fIsFeedDown = answer;}
  /// returns a TLorentzVector containing the reconstructed kinematics of the pair
  TLorentzVector GetPRec(){return fMu0.GetPRec()+fMu1.GetPRec();}
  /// returns a TLorentzVector containing the generated kinematics of the pair
  TLorentzVector GetPGen(){return fMu0.GetPGen()+fMu1.GetPGen();}
  Double_t GetOpeningAngle(); 
  Bool_t IsDimuonFromCorrPiK();
  virtual void PrintInfo(const Option_t* opt);//"H" single muons' decay histories
                                           //"K" dimuon kinematics
                                           //"F" dimuon flags
                                           //"A" all variables

protected: 
  /// Checks if muons are correlated and assigns
  void SetProcess();

  AliMUONTrackLight fMu0;   ///< first muon  
  AliMUONTrackLight fMu1;   ///< second muon
  Int_t fCreationProcess; ///<0: pair creation, 1: gluon splitting, 2: flavour excitation, 3: same fragmented mother, -1: resonance
  Bool_t fIsCorrelated; ///<tells if the two muons are of correlated origin
  Int_t fCauseOfCorrelation; ///<pdg of common mother
  Int_t fIsFeedDown;     ///< tells if the process is from feeddown 

  ClassDef(AliMUONPairLight,1)  /// Dimuon carrying info at generation and reconstruction level
}; 
#endif
 AliMUONPairLight.h:1
 AliMUONPairLight.h:2
 AliMUONPairLight.h:3
 AliMUONPairLight.h:4
 AliMUONPairLight.h:5
 AliMUONPairLight.h:6
 AliMUONPairLight.h:7
 AliMUONPairLight.h:8
 AliMUONPairLight.h:9
 AliMUONPairLight.h:10
 AliMUONPairLight.h:11
 AliMUONPairLight.h:12
 AliMUONPairLight.h:13
 AliMUONPairLight.h:14
 AliMUONPairLight.h:15
 AliMUONPairLight.h:16
 AliMUONPairLight.h:17
 AliMUONPairLight.h:18
 AliMUONPairLight.h:19
 AliMUONPairLight.h:20
 AliMUONPairLight.h:21
 AliMUONPairLight.h:22
 AliMUONPairLight.h:23
 AliMUONPairLight.h:24
 AliMUONPairLight.h:25
 AliMUONPairLight.h:26
 AliMUONPairLight.h:27
 AliMUONPairLight.h:28
 AliMUONPairLight.h:29
 AliMUONPairLight.h:30
 AliMUONPairLight.h:31
 AliMUONPairLight.h:32
 AliMUONPairLight.h:33
 AliMUONPairLight.h:34
 AliMUONPairLight.h:35
 AliMUONPairLight.h:36
 AliMUONPairLight.h:37
 AliMUONPairLight.h:38
 AliMUONPairLight.h:39
 AliMUONPairLight.h:40
 AliMUONPairLight.h:41
 AliMUONPairLight.h:42
 AliMUONPairLight.h:43
 AliMUONPairLight.h:44
 AliMUONPairLight.h:45
 AliMUONPairLight.h:46
 AliMUONPairLight.h:47
 AliMUONPairLight.h:48
 AliMUONPairLight.h:49
 AliMUONPairLight.h:50
 AliMUONPairLight.h:51
 AliMUONPairLight.h:52
 AliMUONPairLight.h:53
 AliMUONPairLight.h:54
 AliMUONPairLight.h:55
 AliMUONPairLight.h:56
 AliMUONPairLight.h:57
 AliMUONPairLight.h:58
 AliMUONPairLight.h:59
 AliMUONPairLight.h:60
 AliMUONPairLight.h:61
 AliMUONPairLight.h:62
 AliMUONPairLight.h:63
 AliMUONPairLight.h:64
 AliMUONPairLight.h:65
 AliMUONPairLight.h:66
 AliMUONPairLight.h:67
 AliMUONPairLight.h:68
 AliMUONPairLight.h:69
 AliMUONPairLight.h:70
 AliMUONPairLight.h:71
 AliMUONPairLight.h:72
 AliMUONPairLight.h:73
 AliMUONPairLight.h:74
 AliMUONPairLight.h:75
 AliMUONPairLight.h:76
 AliMUONPairLight.h:77
 AliMUONPairLight.h:78
 AliMUONPairLight.h:79
 AliMUONPairLight.h:80
 AliMUONPairLight.h:81
 AliMUONPairLight.h:82
 AliMUONPairLight.h:83
 AliMUONPairLight.h:84
 AliMUONPairLight.h:85
 AliMUONPairLight.h:86
 AliMUONPairLight.h:87
 AliMUONPairLight.h:88
 AliMUONPairLight.h:89
 AliMUONPairLight.h:90
 AliMUONPairLight.h:91
 AliMUONPairLight.h:92
 AliMUONPairLight.h:93
 AliMUONPairLight.h:94