]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MFT/AliMuonForwardTrack.h
Consolidation of AliMUONTrackerHV class
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrack.h
index 7546db31a78e5ca6439862cd76c905f470a84cd5..3bdc15290ae5afcde6520335534081e916458c15 100644 (file)
@@ -20,6 +20,7 @@
 #include "TMatrixD.h"
 #include "TClonesArray.h"
 #include "TParticle.h"
+#include "AliMFTConstants.h"
 
 //====================================================================================================================================================
 
@@ -27,19 +28,24 @@ class AliMuonForwardTrack : public AliMUONTrack {
 
 public:
 
+  static const Int_t fgkNParentsMax =  5;   ///< maximum number of parents
+
   AliMuonForwardTrack();
   AliMuonForwardTrack(AliMUONTrack *MUONTrack);
 
   AliMuonForwardTrack(const AliMuonForwardTrack&);
   AliMuonForwardTrack &operator=(const AliMuonForwardTrack&);
   
-  virtual ~AliMuonForwardTrack() {}
+  virtual ~AliMuonForwardTrack(); 
+  virtual void Clear(const Option_t* /*opt*/);
 
   void SetMUONTrack(AliMUONTrack *MUONTrack);
   void SetMCTrackRef(TParticle *MCTrackRef);
   AliMUONTrack* GetMUONTrack() { return fMUONTrack; }
   TParticle* GetMCTrackRef() { return fMCTrackRef; }
 
+  Int_t GetCharge() { return TMath::Nint(GetTrackParamAtMUONCluster(0)->GetCharge()); }
+
   AliMUONVCluster* GetMUONCluster(Int_t iMUONCluster);
   AliMFTCluster*   GetMFTCluster(Int_t iMFTCluster);
   
@@ -50,7 +56,7 @@ public:
   Bool_t PlaneExists(Int_t iPlane) { return fPlaneExists[iPlane]; }
 
   Int_t GetNMUONClusters() { return fMUONTrack->GetNClusters(); }
-  Int_t GetNMFTClusters()  { return GetNClusters(); }
+  Int_t GetNMFTClusters()  { return fMFTClusters->GetEntries(); }
 
   Int_t GetMCLabelMUONTrack() { return fMUONTrack->GetMCLabel(); }
 
@@ -63,17 +69,43 @@ public:
   Double_t GetOffsetX(Double_t x, Double_t z);
   Double_t GetOffsetY(Double_t y, Double_t z);
 
+  void SetParentMCLabel(Int_t iParent, Int_t MClabel) { if (0<=iParent && iParent<fgkNParentsMax) fParentMCLabel[iParent] = MClabel; }
+  void SetParentPDGCode(Int_t iParent, Int_t PDGCode) { if (0<=iParent && iParent<fgkNParentsMax) fParentPDGCode[iParent] = PDGCode; }
+
+  Int_t GetParentMCLabel(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentMCLabel[iParent]; else return -1; }
+  Int_t GetParentPDGCode(Int_t iParent) { if (0<=iParent && iParent<fgkNParentsMax) return fParentPDGCode[iParent]; else return  0; }
+
+  void SetNWrongClustersMC(Int_t nClusters) { fNWrongClustersMC = nClusters; }
+  Int_t GetNWrongClustersMC() { return fNWrongClustersMC; }
+
+  Double_t Pt() { return TMath::Sqrt(TMath::Power(GetTrackParamAtMFTCluster(0)->Px(),2)+TMath::Power(GetTrackParamAtMFTCluster(0)->Py(),2)); }
+
+  void SetTrackMCId(Int_t id) { fTrackMCId = id; }
+  Int_t GetTrackMCId() { return fTrackMCId; }
+  
+  Bool_t IsFromResonance();
+  Bool_t IsFromCharm();
+  Bool_t IsFromBeauty();
+  Bool_t IsFromBackground();
+
 protected:
 
-  static const Int_t fMaxNPlanesMFT = 20;
+  static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes;        // max number of MFT planes
 
-  Bool_t fPlaneExists[fMaxNPlanesMFT];
+  Bool_t fPlaneExists[fNMaxPlanes];
 
   AliMUONTrack *fMUONTrack;
   TParticle *fMCTrackRef;
 
   TClonesArray *fMFTClusters;
 
+  Int_t fParentMCLabel[fgkNParentsMax];    ///< MC label of parents and grandparents
+  Int_t fParentPDGCode[fgkNParentsMax];    ///< PDG code of parents and grandparents 
+
+  Int_t fNWrongClustersMC;    // number of wrong associated MC clusters
+
+  Int_t fTrackMCId;   // this number will identify the track within a MC simulation: run, event, MUON track
+
   ClassDef(AliMuonForwardTrack,1)
     
 };