update to run TPC+ITS analysis
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Nov 2010 11:45:49 +0000 (11:45 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Nov 2010 11:45:49 +0000 (11:45 +0000)
PWG0/dNdPt/AlidNdPtAnalysis.cxx
PWG0/dNdPt/AlidNdPtCorrection.cxx
PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C

index 37b88ad..b98226f 100644 (file)
@@ -329,9 +329,8 @@ void AlidNdPtAnalysis::Init(){
   //\r
 \r
   const Int_t multNbins = 27;\r
-  const Int_t ptNbinsTrackEventCorr = 38;\r
-  //const Int_t ptNbins = 56;\r
-  const Int_t ptNbins = 55;\r
+  const Int_t ptNbinsTrackEventCorr = 39;\r
+  const Int_t ptNbins = 70;\r
   const Int_t etaNbins = 30;\r
   const Int_t zvNbins = 12;\r
 \r
@@ -339,9 +338,9 @@ void AlidNdPtAnalysis::Init(){
                                      9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5,\r
                                     19.5,20.5, 21.5, 22.5, 23.5, 24.5, 29.5, 149.5};\r
 \r
-  Double_t binsPtTrackEventCorr[ptNbinsTrackEventCorr+1] = {0.,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.2,2.4,2.6,3.0,4.0,6.0,10.0,16.0};\r
+  Double_t binsPtTrackEventCorr[ptNbinsTrackEventCorr+1] = {0.,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.2,2.4,2.6,3.0,4.0,6.0,10.0,16.0,50.0};\r
 \r
-  Double_t binsPt[ptNbins+1] = {0.,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.2,2.4,2.6,2.8,3.0,3.2,3.4,3.6,3.8,4.0,4.5,5.0,5.5,6.0,6.5,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0};\r
+  Double_t binsPt[ptNbins+1] = {0.,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0,2.2,2.4,2.6,2.8,3.0,3.2,3.4,3.6,3.8,4.0,4.5,5.0,5.5,6.0,6.5,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,22.0,24.0,26.0,28.0,30.0,32.0,34.0,36.0,40.0,45.0,50.0};\r
 \r
   Double_t binsEta[etaNbins+1] = {-1.5,-1.4,-1.3,-1.2,-1.1,-1.0,-0.9,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0.,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2,1.3,1.4,1.5};\r
 \r
@@ -1006,9 +1005,13 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
       //\r
       // 0-multiplicity bin for LHC background correction\r
       //\r
-      if(GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
-         GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx  || GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt ||\r
-         GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTPCTrackSPDvtx\r
+      if( GetAnalysisMode() == AlidNdPtHelper::kTPCITS || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || \r
+         GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx  || \r
+         GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt ||\r
+          GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTrackSPDvtx || \r
+         GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTPCTrackSPDvtx\r
        ) \r
       {\r
         trigSel->SetBin0CallbackViaPointer(&IsBinZeroTrackSPDvtx);\r
@@ -1128,18 +1131,21 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
      if(vtxESD->GetStatus() && isRecVertex)\r
        multMBTracks = AlidNdPtHelper::GetTPCMBTrackMult(esdEvent,evtCuts,accCuts,esdTrackCuts);\r
   } \r
-  else if( GetAnalysisMode() == AlidNdPtHelper::kTPCITS ||  GetAnalysisMode() == AlidNdPtHelper::kTPCSPDvtx || \r
-           GetAnalysisMode()==AlidNdPtHelper::kTPCSPDvtxUpdate || GetAnalysisMode()==AlidNdPtHelper::kTPCITSHybrid ) \r
+  else if( GetAnalysisMode() == AlidNdPtHelper::kTPCSPDvtx || \r
+           GetAnalysisMode()==AlidNdPtHelper::kTPCSPDvtxUpdate ) \r
   {\r
      const AliMultiplicity* mult = esdEvent->GetMultiplicity();\r
-     //if(mult && vtxESD->GetStatus() && isRecVertex)\r
-     //if(mult)\r
      if(mult && vtxESD->GetStatus() && isRecVertex)\r
        multMBTracks = mult->GetNumberOfTracklets();\r
   } \r
-  else if( GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
-           GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt\r
-           || GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTPCTrackSPDvtx\r
+  else if( GetAnalysisMode() == AlidNdPtHelper::kTPCITS || \r
+           GetAnalysisMode()==AlidNdPtHelper::kTPCITSHybrid || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
+           GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt || \r
+          GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTrackSPDvtx || \r
+          GetAnalysisMode() == AlidNdPtHelper::kITSStandAloneTPCTrackSPDvtx\r
           )\r
   {\r
      if(vtxESD->GetStatus() && isRecVertex)\r
@@ -1239,16 +1245,11 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
         if(!hasMatch) continue;\r
       }\r
       else {\r
+        // check track cuts\r
         if(!esdTrackCuts->AcceptTrack(track)) \r
          continue;\r
       }\r
 \r
-      /*\r
-      if(GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt) {\r
-        if(!AlidNdPtHelper::IsGoodImpPar(track)) continue;\r
-      }\r
-      */\r
-\r
       //\r
       Bool_t isOK = kFALSE;\r
       Double_t x[3]; track->GetXYZ(x);\r
@@ -1313,7 +1314,9 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
          }\r
 \r
          // update track parameters using vertex point \r
-        if(GetAnalysisMode() == AlidNdPtHelper::kTPCSPDvtxUpdate || GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate) {\r
+        if( GetAnalysisMode() == AlidNdPtHelper::kTPCSPDvtxUpdate || \r
+            GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate ) \r
+        {\r
           // update track parameters\r
              AliExternalTrackParam cParam;\r
              isOK = track->RelateToVertexTPCBxByBz(vtxESD, b, kVeryBig, &cParam);\r
@@ -1321,7 +1324,6 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
             track->Set(cParam.GetX(),cParam.GetAlpha(),cParam.GetParameter(),cParam.GetCovariance());\r
 \r
              if(accCuts->AcceptTrack(track)) {\r
-\r
                FillHistograms(track,stack,AlidNdPtHelper::kRecTracks); \r
               labelsRec[multRec] = TMath::Abs(track->GetLabel());\r
               multRec++;\r
@@ -1330,30 +1332,9 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
           else {\r
              if(accCuts->AcceptTrack(track)) \r
             {\r
-              //\r
-               //if(track->GetKinkIndex(0) < 0) continue;\r
-\r
                FillHistograms(track,stack,AlidNdPtHelper::kRecTracks); \r
               labelsRec[multRec] = TMath::Abs(track->GetLabel());\r
               multRec++;\r
-\r
-               /*\r
-               if(!multMCTrueTracks && IsUseMCInfo()) \r
-              {\r
-                Int_t label = TMath::Abs(track->GetLabel()); \r
-                TParticle* particle = stack->Particle(label);\r
-                if(!particle) return;\r
-\r
-                Bool_t prim = stack->IsPhysicalPrimary(label);\r
-                 if(!particle->GetPDG()) continue;\r
-                if((particle->GetPDG()->Charge()/3.) != 0 && multRec > 3) \r
-                {\r
-                   printf("zero true mult event: %d \n", esdEvent->GetEventNumberInFile());\r
-                  printf("mcVtx %f,  label %d, prim %d, mcpt %f, mceta %f, mcphi %f \n", vtxMC[2], label, prim, particle->Pt(), particle->Eta(), particle->Phi());\r
-                  printf("zv %f, multRec %d, pt %f, eta %f, phi %f \n", vtxESD->GetZv(), multRec, track->Pt(), track->Eta(), track->Phi());\r
-                }\r
-               }\r
-              */\r
             }\r
           }\r
      }\r
@@ -1378,23 +1359,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
 \r
    if(IsUseMCInfo())  \r
    {\r
-     /*\r
-     //\r
-     // multiplicity correlation matrix\r
-     //\r
-     // check multiplicity\r
-     const AliMultiplicity* mult = esdEvent->GetMultiplicity();\r
-     Int_t trackletMult = 0;\r
-     if (mult) {\r
-         for(Int_t i=0; i<mult->GetNumberOfTracklets(); i++) {\r
-           if( TMath::Abs(mult->GetEta(i)) < accCuts->GetMaxEta() )\r
-             trackletMult++;\r
-        }\r
-     }\r
-     Double_t vMultTrueEventMatrix[2] = { trackletMult,multMCTrueTracks };\r
-     */\r
      Double_t vMultTrueEventMatrix[2] = { multRec, multMCTrueTracks };\r
-\r
      if(isEventOK && isEventTriggered) {   \r
        if(TMath::Abs(vtxMC[2]) < 10.0) // both Rec. and corresponding MC events must be accepted\r
          fEventMultCorrelationMatrix->Fill(vMultTrueEventMatrix);\r
index f26588c..bcf1798 100644 (file)
@@ -1101,8 +1101,11 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
       //\r
       // 0-multiplicity bin for LHC background correction\r
       //\r
-      if(GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
-         GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt) \r
+      if( GetAnalysisMode() == AlidNdPtHelper::kTPCITS || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || \r
+         GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || \r
+         GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt ) \r
       {\r
         trigSel->SetBin0CallbackViaPointer(&AlidNdPtAnalysis::IsBinZeroTrackSPDvtx);\r
       } else {\r
@@ -1233,8 +1236,11 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
        multMBTracks = mult->GetNumberOfTracklets();\r
     \r
   } \r
-  else if( GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
-           GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt)\r
+  else if( GetAnalysisMode() == AlidNdPtHelper::kTPCITS || \r
+           GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtx || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCTrackSPDvtxUpdate || \r
+           GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtx || \r
+          GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt )\r
   {\r
      if(vtxESD->GetStatus() && isRecVertex)\r
        multMBTracks = vtxESD->GetNContributors();\r
@@ -1312,31 +1318,9 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
       if(esdTrackCuts->AcceptTrack(track)) \r
       {\r
           if(accCuts->AcceptTrack(track)) multRecTemp++;\r
-        /*\r
-        if(GetAnalysisMode() == AlidNdPtHelper::kTPCITSHybridTrackSPDvtxDCArPt) {\r
-          if(AlidNdPtHelper::IsGoodImpPar(track) && accCuts->AcceptTrack(track)) multRecTemp++;\r
-        }\r
-       else {\r
-          if(accCuts->AcceptTrack(track)) multRecTemp++;\r
-        }\r
-       */\r
       }  \r
     }\r
 \r
-    /*\r
-    // check multiplicity\r
-    const AliMultiplicity* mult = esdEvent->GetMultiplicity();\r
-    Int_t trackletMult = 0;\r
-    if (mult) {\r
-       for(Int_t i=0; i<mult->GetNumberOfTracklets(); i++) {\r
-          if(TMath::Abs(mult->GetEta(i)) < accCuts->GetMaxEta() )\r
-           trackletMult++;\r
-       }\r
-    }\r
-    // use tracklet multiplicity\r
-    multRecTemp = trackletMult;\r
-    */\r
-\r
     //\r
     for(Int_t i=0; i<entries;++i) \r
     {\r
index 7c2e7fc..8519185 100644 (file)
@@ -1143,6 +1143,43 @@ AliESDtrackCuts* CreatedNdPtTrackCuts(Int_t cutMode=1, Bool_t fieldOn = kTRUE, B
     TString tag = "TPC-tracks + ITS refit + >1 SPD cluster + DCAr(Pt)";
   }
 
+  // TPC+ITS combine tracking + DCAr(pt) + DCAz(pt)
+  if (cutMode == 71) 
+  {
+    Int_t    minclsTPC=70;
+    Double_t maxchi2perTPCcl=4.;
+    Double_t maxdcazITSTPC=1.e9;
+
+    //
+    // TPC
+    //
+    esdTrackCuts->SetRequireTPCRefit(kTRUE);
+    esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
+    esdTrackCuts->SetMinNClustersTPC(minclsTPC);
+    esdTrackCuts->SetMaxChi2PerClusterTPC(maxchi2perTPCcl);
+    //
+    // ITS
+    //
+    esdTrackCuts->SetRequireITSRefit(kTRUE);
+    esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
+    //
+    // primary selection
+    //
+    esdTrackCuts->SetDCAToVertex2D(kFALSE);
+    esdTrackCuts->SetRequireSigmaToVertex(kFALSE);
+    esdTrackCuts->SetMaxDCAToVertexZ(maxdcazITSTPC);
+
+    // DCArphi parametrization (LHC10c pass2)
+    // 7*(0.0026+0.0050/pt^1.01)
+    esdTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
+
+    // DCArphi parametrization (LHC10c pass2)
+    // 7*(0.01+0.011/pt^0.72)
+    esdTrackCuts->SetMaxDCAToVertexZPtDep("0.07+0.077/pt^0.72");
+
+    TString tag = "TPC+ITS combine tracking + DCAr(pt) + DCAz(pt)";
+  }
+
   // TPC-tracks + SPD point + ITS refit + DCAr(pt) 4-sigma
   if (cutMode == 75) 
   {