]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New MFT analysis tools
authorauras <antonio.uras@cern.ch>
Wed, 26 Nov 2014 23:01:39 +0000 (00:01 +0100)
committerauras <antonio.uras@cern.ch>
Wed, 26 Nov 2014 23:01:39 +0000 (00:01 +0100)
MFT/AliMFTAnalysisTools.cxx
MFT/AliMFTAnalysisTools.h
MFT/AliMuonForwardTrack.h

index b3df72f068f61bed792a588ef6a76269f5d38b8e..da4132c56c74855e126be48174a4d0fd45cc534e 100644 (file)
@@ -808,3 +808,34 @@ Bool_t AliMFTAnalysisTools::TranslateMuonToOrigin(AliAODTrack *muon, Double_t vt
 }
 
 //====================================================================================================================================================
+
+Bool_t AliMFTAnalysisTools::IsPDGCharm(Int_t pdgCode) {
+
+  pdgCode = TMath::Abs(pdgCode/100);
+  if (pdgCode>9) pdgCode /= 10;
+  if (pdgCode == 4 ) return kTRUE;
+  else return kFALSE;
+  
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMFTAnalysisTools::IsPDGBeauty(Int_t pdgCode) {
+
+  pdgCode = TMath::Abs(pdgCode/100);
+  if (pdgCode>9) pdgCode /= 10;
+  if (pdgCode == 5) return kTRUE;
+  else return kFALSE;
+
+}
+
+//====================================================================================================================================================
+
+Bool_t AliMFTAnalysisTools::IsPDGResonance(Int_t pdgCode) {
+
+  Int_t id = pdgCode%100000;
+  return (!((id-id%10)%110));
+
+} 
+
+//====================================================================================================================================================
index 5bf97197250349d67e6fb7320f5bbbae00c9258c..6d27ac7bde182c3eaa5a8ac900e9c3fb29a747d3 100644 (file)
@@ -72,6 +72,10 @@ public:
 
   static Bool_t TranslateMuon(AliAODTrack *muon, Double_t vtxInitial[3], Double_t vtxFinal[3]);
   static Bool_t TranslateMuonToOrigin(AliAODTrack *muon, Double_t vtx[3]);
+
+  static Bool_t IsPDGCharm(Int_t pdgCode);
+  static Bool_t IsPDGBeauty(Int_t pdgCode);
+  static Bool_t IsPDGResonance(Int_t pdgCode);
   
   ClassDef(AliMFTAnalysisTools,1)
     
index 7b89057351c6e40bc03e0d6e6267a2bf8b84141e..651f04d7c1be319748e1bc32062d2e8d7c7c106f 100644 (file)
@@ -76,7 +76,7 @@ public:
   Double_t GetRAtAbsorberEnd() { return fRAtAbsorberEnd; }
   void SetRAtAbsorberEnd(Double_t rAtAbsorberEnd) { fRAtAbsorberEnd = rAtAbsorberEnd; }
 
-  Double_t GetChi2OverNdf() { return GetGlobalChi2()/Double_t(GetNMUONClusters()+GetNMFTClusters()-5); };   // chi2/ndf
+  Double_t GetChi2OverNdf() { return GetGlobalChi2()/Double_t(2*(GetNMUONClusters()+GetNMFTClusters())-5); };   // chi2/ndf
 
   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; }