]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
corrected definitions for Chi2
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Feb 2010 21:43:59 +0000 (21:43 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Feb 2010 21:43:59 +0000 (21:43 +0000)
PWG4/JetTasks/AliAnalysisTaskJetSpectrum2.cxx
PWG4/JetTasks/AliPWG4HighPtQATPConly.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx

index 7db26ea32cc50294fd665e5ea889e1634112d274..e33233560b5b1e99debed1f94b456cea7f9c09c4 100644 (file)
@@ -807,7 +807,7 @@ void AliAnalysisTaskJetSpectrum2::UserExec(Option_t */*option*/)
        AliAODTrack *tr = fAOD->GetTrack(it);
        if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue;
        tr->Print();
-       tr->Dump();
+       //      tr->Dump();
        if(fESD){
          AliESDtrack *esdTr = (AliESDtrack*)fESD->GetTrack(tr->GetID());
          esdTr->Print("");
@@ -970,6 +970,20 @@ Int_t  AliAnalysisTaskJetSpectrum2::GetListOfTracks(TList *list,Int_t type){
       AliAODTrack *tr = aod->GetTrack(it);
       if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue;
       if(TMath::Abs(tr->Eta())>0.9)continue;
+      if(fDebug>0){
+       if(tr->Pt()>20){
+         Printf("High pT track found in Event %d with p_T, %E",(int)Entry(),tr->Pt());
+         Printf("%s read event, %d",fInputHandler->GetTree()->GetCurrentFile()->GetName(),fInputHandler->GetTree()->GetReadEntry());
+         tr->Print();
+         //    tr->Dump();
+         AliESDEvent *fESD = dynamic_cast<AliESDEvent*> (InputEvent());
+         if(fESD){
+           AliESDtrack *esdTr = (AliESDtrack*)fESD->GetTrack(tr->GetID());
+           esdTr->Print("");
+           esdTr->Dump();
+         }
+       }
+      }
       list->Add(tr);
       iCount++;
     }
index 29d378fde3b53e4f85e26b3e6dbd2c82239e0674..4ec74f6a1b668d79d6f5704e5c93389ce4bd3223 100644 (file)
@@ -768,7 +768,9 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
     Float_t relUncertainty1Pt = TMath::Sqrt(TMath::Abs(track->GetSigma1Pt2()))*pt;
     Float_t chi2PerClusterTPC = -1.;
     Float_t nClustersTPC = track->GetTPCNcls();
-    if(nClustersTPC!=0.) chi2PerClusterTPC = track->GetTPCchi2()/nClustersTPC;
+    if(nClustersTPC>0.) chi2PerClusterTPC = track->GetTPCchi2()/(2.*nClustersTPC-5.);
+    Float_t chi2PerNPointITS = -1.;
+    if(nPointITS>3) chi2PerNPointITS = track->GetITSchi2()/(2.*(float)nPointITS-5.);
 
     fPtAll->Fill(pt);
     fPtAllTPC->Fill(ptTPC);
@@ -788,7 +790,7 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
       fPtAllminPtTPCvsPtAllChi2C->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2C);
       fPtAllminPtTPCvsPtAllRel1PtUncertainty->Fill(pt,(1./pt-1./ptTPC)/(1./pt),relUncertainty1Pt);
       fPtAllminPtTPCvsPtAllChi2PerNClusTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerClusterTPC);
-      if(nPointITS>0) fPtAllminPtTPCvsPtAllChi2PerNClusITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->GetITSchi2()/(float)nPointITS);
+      if(nPointITS>3) fPtAllminPtTPCvsPtAllChi2PerNClusITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerNPointITS);
       if(TMath::Abs((1./pt-1./ptTPC)/(1./pt))>0.8) fEtaPhiOutliers->Fill(track->Eta(),phi);
       if (friendtrack.GetITSOut()) {
        AliExternalTrackParam trackITSouter(*(friendtrack.GetITSOut())); 
@@ -805,45 +807,46 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
        fPtITSouterminPtTPCvsPtAllChi2C->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2C);
        fPtITSouterminPtTPCvsPtAllRel1PtUncertainty->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),relUncertainty1Pt);
        fPtITSouterminPtTPCvsPtAllChi2PerNClusTPC->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerClusterTPC);
-       if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+       if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        if(track->HasPointOnITSLayer(0)) {
          fPtITSouterminPtTPCvsPtAll_ITSLayer0->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer0->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer0->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
        if(!track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)) {
          fPtITSouterminPtTPCvsPtAll_ITSLayer1->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer1->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer1->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
        if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && track->HasPointOnITSLayer(2)) {
          fPtITSouterminPtTPCvsPtAll_ITSLayer2->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer2->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer2->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
        if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && !track->HasPointOnITSLayer(2) && track->HasPointOnITSLayer(3)) {
          fPtITSouterminPtTPCvsPtAll_ITSLayer3->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer3->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer3->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
        if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && !track->HasPointOnITSLayer(2) && !track->HasPointOnITSLayer(3) && track->HasPointOnITSLayer(4)) {
          fPtITSouterminPtTPCvsPtAll_ITSLayer4->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer4->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer4->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
        if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1) && !track->HasPointOnITSLayer(2) && !track->HasPointOnITSLayer(3) && !track->HasPointOnITSLayer(4) && track->HasPointOnITSLayer(5)) {
          fPtITSouterminPtTPCvsPtAll_ITSLayer5->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer5->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_ITSLayer5->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
 
        if(!track->HasPointOnITSLayer(0) && !track->HasPointOnITSLayer(1)) {
          fPtITSouterminPtTPCvsPtAll_NoSPD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_NoSPD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_NoSPD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
        if(!track->HasPointOnITSLayer(2) && !track->HasPointOnITSLayer(3)) {
          fPtITSouterminPtTPCvsPtAll_NoSDD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_NoSDD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_NoSDD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
        if(!track->HasPointOnITSLayer(4) && !track->HasPointOnITSLayer(5)) {
          fPtITSouterminPtTPCvsPtAll_NoSSD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter));
-         if(nPointITS>0) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_NoSSD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),track->GetITSchi2()/nPointITS);
+         if(nPointITS>3) fPtITSouterminPtTPCvsPtAllChi2PerNClusITS_NoSSD->Fill(pt,(1./ptITSouter-1./ptTPC)/(1./ptITSouter),chi2PerNPointITS);
        }
       }
+
     }//fTrackCuts selection
     
     
@@ -864,7 +867,7 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
       //      fPtOuterPtInner->Fill(trackInner->Pt(),trackOuter->Pt());
       fPtRel1PtUncertaintyChi2PerClusTPC->Fill(pt,relUncertainty1Pt,chi2PerClusterTPC);
       fPtITSminPtTPCvsPtITSChi2PerNClusTPC->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerClusterTPC);
-      if(nPointITS>0) fPtITSminPtTPCvsPtITSChi2PerNClusITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),track->GetITSchi2()/nPointITS);
+      if(nPointITS>3) fPtITSminPtTPCvsPtITSChi2PerNClusITS->Fill(pt,(1./pt-1./ptTPC)/(1./pt),chi2PerNPointITS);
     }//fTrackCutsITS loop
       
   }//ESD track loop
index 3d837bc84347426f74cdca8854c4ca87c8024fb3..56fd819e6415d00bd758eba1580f75b46f093a2f 100644 (file)
@@ -283,7 +283,10 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
       track->GetImpactParametersTPC(dca2DTPC,dcaZTPC); 
       Float_t chi2PerClusterTPC = -1.;
       Float_t nClustersTPC = track->GetTPCNcls();//track->GetTPCclusters(0);
-      if(nClustersTPC!=0.) chi2PerClusterTPC = track->GetTPCchi2()/nClustersTPC;
+      if(nClustersTPC>0.) chi2PerClusterTPC = track->GetTPCchi2()/(2.*nClustersTPC-5.);
+      Float_t chi2PerClusterTPCIter1 = -1.;
+      Float_t nClustersTPCIter1 = track->GetTPCNclsIter1();   
+      if(nClustersTPCIter1>0.) chi2PerClusterTPCIter1 = track->GetTPCchi2Iter1()/(2.*nClustersTPCIter1-5.);
 
       //fill the container
       containerInputRec[0] = track->Pt();
@@ -296,7 +299,7 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
       containerInputTPConly[1] = trackTPC->Phi();
       containerInputTPConly[2] = trackTPC->Eta();
       containerInputTPConly[3] = dca2DTPC/10.; //Divide by 10 in order to store in same containter. Should be corrected back when looking at output.
-      containerInputTPConly[4] = chi2PerClusterTPC;//TPC;
+      containerInputTPConly[4] = chi2PerClusterTPCIter1;//TPC;
 
       if (fTrackCuts->AcceptTrack(track)) {
        if(track->GetSign()>0.) {