Added commet to explain AliAODTrack::fType, AliAODTrack::XAtDCA(), YAtDCA(), ZAtDCA...
authorafestant <andrea.festanti@cern.ch>
Mon, 16 Jun 2014 10:38:41 +0000 (12:38 +0200)
committerhristov <Peter.Hristov@cern.ch>
Mon, 27 Oct 2014 12:40:15 +0000 (13:40 +0100)
ANALYSIS/ESDfilter/AliAnalysisTaskESDfilter.cxx
PWGCF/FEMTOSCOPYAOD/AliAnalysisTaskPWG2ESDfilter.cxx
PWGHF/hfe/AliAnalysisTaskEMCalHFEpA.cxx
STEER/AOD/AliAODTrack.cxx
STEER/AOD/AliAODTrack.h
STEER/CreateAODfromKineTree.C
STEER/ESD/AliESDtrack.h

index 2b65c99..24c0dd6 100644 (file)
@@ -599,7 +599,7 @@ void AliAnalysisTaskESDfilter::ConvertCascades(const AliESDEvent& esd)
                                                                 vCascade,
                                                                 kTRUE,  // usedForVtxFit = kFALSE ? FIXME
                                                                 vtx->UsesTrack(esdCascadeBach->GetID()),
-                                                                AliAODTrack::kSecondary,
+                                                                AliAODTrack::kFromDecayVtx,
                                                                 selectInfo);
       aodTrack->SetPIDForTracking(esdCascadeBach->GetPIDForTracking());
       aodTrack->SetTPCFitMap(esdCascadeBach->GetTPCFitMap());
@@ -680,7 +680,7 @@ void AliAnalysisTaskESDfilter::ConvertCascades(const AliESDEvent& esd)
                                                                   vV0FromCascade,
                                                                   kTRUE,  // usedForVtxFit = kFALSE ? FIXME
                                                                   vtx->UsesTrack(esdCascadePos->GetID()),
-                                                                  AliAODTrack::kSecondary,
+                                                                  AliAODTrack::kFromDecayVtx,
                                                                   selectInfo);
        aodTrack->SetPIDForTracking(esdCascadePos->GetPIDForTracking());
         aodTrack->SetTPCFitMap(esdCascadePos->GetTPCFitMap());
@@ -732,7 +732,7 @@ void AliAnalysisTaskESDfilter::ConvertCascades(const AliESDEvent& esd)
                                                                   vV0FromCascade,
                                                                   kTRUE,  // usedForVtxFit = kFALSE ? FIXME
                                                                   vtx->UsesTrack(esdCascadeNeg->GetID()),
-                                                                  AliAODTrack::kSecondary,
+                                                                  AliAODTrack::kFromDecayVtx,
                                                                   selectInfo);
        aodTrack->SetPIDForTracking(esdCascadeNeg->GetPIDForTracking());
         aodTrack->SetTPCFitMap(esdCascadeNeg->GetTPCFitMap());
@@ -949,7 +949,7 @@ void AliAnalysisTaskESDfilter::ConvertV0s(const AliESDEvent& esd)
                                                                    vV0,
                                                                    kTRUE,  // check if this is right
                                                                    vtx->UsesTrack(esdV0Pos->GetID()),
-                                                                   AliAODTrack::kSecondary,
+                                                                   AliAODTrack::kFromDecayVtx,
                                                                    selectInfo);
            aodTrack->SetPIDForTracking(esdV0Pos->GetPIDForTracking());
            aodTrack->SetTPCFitMap(esdV0Pos->GetTPCFitMap());
@@ -996,7 +996,7 @@ void AliAnalysisTaskESDfilter::ConvertV0s(const AliESDEvent& esd)
                                                              vV0,
                                                              kTRUE,  // check if this is right
                                                              vtx->UsesTrack(esdV0Neg->GetID()),
-                                                             AliAODTrack::kSecondary,
+                                                             AliAODTrack::kFromDecayVtx,
                                                              selectInfo);
       aodTrack->SetPIDForTracking(esdV0Neg->GetPIDForTracking());
       aodTrack->SetTPCFitMap(esdV0Neg->GetTPCFitMap());
@@ -1780,7 +1780,7 @@ void AliAnalysisTaskESDfilter::ConvertKinks(const AliESDEvent& esd)
                                                                    vkink,
                                                                    kTRUE, // check if this is right
                                                                    vtx->UsesTrack(esdTrack->GetID()),
-                                                                   AliAODTrack::kSecondary,
+                                                                   AliAODTrack::kFromDecayVtx,
                                                                    selectInfo);
            daughter->SetPIDForTracking(esdTrackD->GetPIDForTracking());
             daughter->SetTPCFitMap(esdTrackD->GetTPCFitMap());
index a8d5bc0..1d28b09 100644 (file)
@@ -396,7 +396,7 @@ void AliAnalysisTaskPWG2ESDfilter::Exec(Option_t */*option*/)
                                                                           vV0FromCascade,
                                                                           kTRUE,  // check if this is right
                                                                           kFALSE, // check if this is right
-                                                                          AliAODTrack::kSecondary)
+                                                                          AliAODTrack::kFromDecayVtx)
                );
            aodTrack->ConvertAliPIDtoAODPID();
        }
@@ -431,7 +431,7 @@ void AliAnalysisTaskPWG2ESDfilter::Exec(Option_t */*option*/)
                                                                           vV0FromCascade,
                                                                           kTRUE,  // check if this is right
                                                                           kFALSE, // check if this is right
-                                                                          AliAODTrack::kSecondary)
+                                                                          AliAODTrack::kFromDecayVtx)
                );
            aodTrack->ConvertAliPIDtoAODPID();
        }
@@ -468,7 +468,7 @@ void AliAnalysisTaskPWG2ESDfilter::Exec(Option_t */*option*/)
                                                                     vcascade,
                                                                     kTRUE,  // check if this is right
                                                                     kFALSE, // check if this is right
-                                                                    AliAODTrack::kSecondary)
+                                                                    AliAODTrack::kFromDecayVtx)
                );
            aodTrack->ConvertAliPIDtoAODPID();
        }
@@ -536,7 +536,7 @@ void AliAnalysisTaskPWG2ESDfilter::Exec(Option_t */*option*/)
                                                                vV0,
                                                                kTRUE,  // check if this is right
                                                                kFALSE, // check if this is right
-                                                               AliAODTrack::kSecondary)
+                                                               AliAODTrack::kFromDecayVtx)
                );
            aodTrack->ConvertAliPIDtoAODPID();
        }
@@ -571,7 +571,7 @@ void AliAnalysisTaskPWG2ESDfilter::Exec(Option_t */*option*/)
                                                                vV0,
                                                                kTRUE,  // check if this is right
                                                                kFALSE, // check if this is right
-                                                               AliAODTrack::kSecondary)
+                                                               AliAODTrack::kFromDecayVtx)
                );
            aodTrack->ConvertAliPIDtoAODPID();
        }
index 779b9ab..243f4df 100644 (file)
@@ -2483,11 +2483,11 @@ void AliAnalysisTaskEMCalHFEpA::UserExec(Option_t *)
 
                        Int_t type=aod_track->GetType();
                        if(type==AliAODTrack::kPrimary) fPtPrim->Fill(aod_track->Pt());
-                       if(type==AliAODTrack::kSecondary) fPtSec->Fill(aod_track->Pt());
+                       if(type==AliAODTrack::kFromDecayVtx) fPtSec->Fill(aod_track->Pt());
                
                                //Int_t type2=track->GetType();
                        if(type==AliAODTrack::kPrimary) fPtPrim2->Fill(track->Pt());
-                       if(type==AliAODTrack::kSecondary) fPtSec2->Fill(track->Pt());
+                       if(type==AliAODTrack::kFromDecayVtx) fPtSec2->Fill(track->Pt());
                }
                        
                
index 98c712b..8826e7c 100644 (file)
@@ -1150,3 +1150,39 @@ Double_t AliAODTrack::GetMassForTracking() const
 const AliTOFHeader* AliAODTrack::GetTOFHeader() const {
   return fAODEvent->GetTOFHeader();
 }
+//_______________________________________________________
+Int_t AliAODTrack::GetNcls(Int_t idet) const
+{
+  // Get number of clusters by subdetector index
+  //
+  Int_t ncls = 0;
+  switch(idet){
+  case 0:
+    ncls = GetITSNcls();
+    break;
+  case 1:
+    ncls = (Int_t)GetTPCNcls();
+    break;
+  case 2:
+    ncls = (Int_t)GetTRDncls();
+    break;
+  case 3:
+    break;
+    /*if (fTOFindex != -1)
+      ncls = 1;*/
+    break;
+  case 4: //PHOS
+    break;
+  case 5: //HMPID
+    break;
+    if ((GetHMPIDcluIdx() >= 0) && (GetHMPIDcluIdx() < 7000000)) {
+      if ((GetHMPIDcluIdx()%1000000 != 9999) && (GetHMPIDcluIdx()%1000000 != 99999)) {
+       ncls = 1;
+       }
+    }    
+    break;
+  default:
+    break;
+  }
+  return ncls;
+}
index d441b88..a98504d 100644 (file)
@@ -31,8 +31,11 @@ class AliAODTrack : public AliVTrack {
   
   enum AODTrk_t {kUndef = -1, 
                 kPrimary, 
-                kSecondary, 
-                kOrphan};
+                kFromDecayVtx, 
+                kOrphan}; // Please note that this flag does not guarantee that the particle is a Physical Primary, it simply identifies the algorithm which was used to filter the track. In general, the following associations are used (check the filter macro to be sure, as this comment may be outdated): 
+                           //kPrimary: TPC only tracks, global constrained tracks, primary tracks, kink mothers; 
+                           //kFromDecayVtx: bachelor tracks from cascades, tracks from V0, kink daughters; 
+                           //kUndef:TRD matched tracks
 
   enum AODTrkBits_t {
     kIsDCA=BIT(14),   // set if fPosition is the DCA and not the position of the first point
@@ -141,6 +144,8 @@ class AliAODTrack : public AliVTrack {
   
   UShort_t GetTPCNcls()  const { return GetTPCncls(); }
 
+  Int_t GetNcls(Int_t idet) const;
+
   virtual Double_t M() const { return M(GetMostProbablePID()); }
   Double_t M(AODTrkPID_t pid) const;
   virtual Double_t E() const { return E(GetMostProbablePID()); }
@@ -230,12 +235,12 @@ class AliAODTrack : public AliVTrack {
 
   void RemoveCovMatrix() {delete fCovMatrix; fCovMatrix=NULL;}
 
-  Double_t XAtDCA() const { return fPositionAtDCA[0]; }
-  Double_t YAtDCA() const { return fPositionAtDCA[1]; }
+  Double_t XAtDCA() const { return fPositionAtDCA[0]; } //makes sense only for constrained tracks, returns dummy values for all other tracks
+  Double_t YAtDCA() const { return fPositionAtDCA[1]; } //makes sense only for constrained tracks, returns dummy values for all other tracks
   Double_t ZAtDCA() const {
     if (IsMuonTrack()) return fPosition[2];
     else if (TestBit(kIsDCA)) return fPosition[1];
-    else return -999.; }
+    else return -999.; }                                //makes sense only for constrained tracks, returns dummy values for all other tracks
   Bool_t   XYZAtDCA(Double_t x[3]) const { x[0] = XAtDCA(); x[1] = YAtDCA(); x[2] = ZAtDCA(); return kTRUE; }
   
   Double_t DCA() const {
@@ -243,9 +248,9 @@ class AliAODTrack : public AliVTrack {
     else if (TestBit(kIsDCA)) return fPosition[0];
     else return -999.; }
   
-  Double_t PxAtDCA() const { return fMomentumAtDCA[0]; }
-  Double_t PyAtDCA() const { return fMomentumAtDCA[1]; }
-  Double_t PzAtDCA() const { return fMomentumAtDCA[2]; }
+  Double_t PxAtDCA() const { return fMomentumAtDCA[0]; } //makes sense only for constrained tracks, returns dummy values for all other tracks
+  Double_t PyAtDCA() const { return fMomentumAtDCA[1]; } //makes sense only for constrained tracks, returns dummy values for all other tracks
+  Double_t PzAtDCA() const { return fMomentumAtDCA[2]; } //makes sense only for constrained tracks, returns dummy values for all other tracks
   Double_t PAtDCA() const { return TMath::Sqrt(PxAtDCA()*PxAtDCA() + PyAtDCA()*PyAtDCA() + PzAtDCA()*PzAtDCA()); }
   Bool_t   PxPyPzAtDCA(Double_t p[3]) const { p[0] = PxAtDCA(); p[1] = PyAtDCA(); p[2] = PzAtDCA(); return kTRUE; }
   
@@ -460,7 +465,7 @@ class AliAODTrack : public AliVTrack {
   Short_t       fID;                // unique track ID, points back to the ESD track
 
   Char_t        fCharge;            // particle charge
-  Char_t        fType;              // Track Type
+  Char_t        fType;              // Track Type, explanation close to the enum AODTrk_t
 
   Char_t        fPIDForTracking;    // pid using for tracking of ESD track
 
index 5271ffb..878d795 100644 (file)
@@ -272,7 +272,7 @@ Int_t LoopOverSecondaries(TParticle *mother) {
                                                                secondary,
                                                                kFALSE, // no fit performed
                                                                kFALSE, // no fit performed
-                                                               AliAODTrack::kSecondary));
+                                                               AliAODTrack::kFromDecayVtx));
 
       currTrack = (AliAODTrack*)tracks.Last();
       SetChargeAndPID(part->GetPdgCode(), currTrack);
index e7daf9b..4e2f718 100644 (file)
@@ -162,11 +162,10 @@ public:
   Bool_t GetOuterExternalParameters
         (Double_t &alpha, Double_t &x, Double_t p[5]) const;
   Bool_t GetOuterExternalCovariance(Double_t cov[15]) const;
-
+  
   Bool_t GetOuterHmpExternalParameters
         (Double_t &alpha, Double_t &x, Double_t p[5]) const;
-  Bool_t GetOuterHmpExternalCovariance(Double_t cov[15]) const;
-
+  Bool_t GetOuterHmpExternalCovariance(Double_t cov[15]) const; 
   
   Int_t GetNcls(Int_t idet) const;
   Int_t GetClusters(Int_t idet, Int_t *idx) const;