Updates on Event Selection, do not take into account ITSonly track (Marta)
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Jul 2010 12:58:42 +0000 (12:58 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Jul 2010 12:58:42 +0000 (12:58 +0000)
PWG4/JetTasks/AliAnalysisTaskJetServices.cxx
PWG4/JetTasks/AliPWG4CosmicCandidates.cxx
PWG4/JetTasks/AliPWG4HighPtQAMC.cxx
PWG4/JetTasks/AliPWG4HighPtQATPConly.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx

index 78b15e2..28b9912 100644 (file)
@@ -515,11 +515,17 @@ Bool_t AliAnalysisTaskJetServices::IsEventCosmicESD(AliESDEvent* esd){
   for (Int_t iTrack1 = 0; iTrack1 < nTracks; iTrack1++) {
     AliESDtrack* track1 = (AliESDtrack*)esd->GetTrack(iTrack1);
     if (!track1)  continue;
+    UInt_t status1 = track1->GetStatus();
+    //If track is ITS stand alone track, skip the track
+    if (((status1 & AliESDtrack::kITSin) == 0 || (status1 & AliESDtrack::kTPCin))) continue;
     if(track1->Pt()<fPtMinCosmic) continue;
     //Start 2nd track loop to look for correlations
     for (Int_t iTrack2 = iTrack1+1; iTrack2 < nTracks; iTrack2++) {
       AliESDtrack* track2 = (AliESDtrack*)esd->GetTrack(iTrack2);
       if(!track2) continue;
+      UInt_t status2 = track2->GetStatus();
+      //If track is ITS stand alone track, skip the track
+      if (((status2 & AliESDtrack::kITSin) == 0 || (status2 & AliESDtrack::kTPCin))) continue;
       if(track2->Pt()<fPtMinCosmic) continue;
       //Check if back-to-back
       Double_t mom1[3],mom2[3];
@@ -537,7 +543,7 @@ Bool_t AliAnalysisTaskJetServices::IsEventCosmicESD(AliESDEvent* esd){
       if(rIsol<fRIsolMinCosmic) continue;
 
       if(TMath::Abs(TMath::Pi()-theta)<fMaxCosmicAngle) {
-       nCosmicCandidates+=1.;
+       nCosmicCandidates+=1;
        isCosmic = kTRUE;
       }
       
index fd28441..8d607a2 100644 (file)
@@ -270,7 +270,8 @@ void AliPWG4CosmicCandidates::UserExec(Option_t *)
 
   const AliVVertex *vtx = fInputEvent->GetPrimaryVertex();
   // Need vertex cut
-  if (!vtx || vtx->GetNContributors() < 2) {
+  TString vtxName(vtx->GetName());
+  if(!vtx || vtx->GetNContributors() < 2 || (vtxName.Contains("TPCVertex")) ) {
     // Post output data
     PostData(1, fHistListCosmics);
     return;
index 2b4566b..98c500e 100644 (file)
@@ -357,12 +357,20 @@ void AliPWG4HighPtQAMC::Exec(Option_t *) {
 
   const AliESDVertex *vtx = fESD->GetPrimaryVertex();
   // Need vertex cut
-  if (vtx->GetNContributors() < 2) {
-    PostData(0, fHistList);
-    PostData(1, fHistListITS);
-    return;
+  TString vtxName(vtx->GetName());
+  if(vtx->GetNContributors() < 2 || (vtxName.Contains("TPCVertex")) ) {
+    // SPD vertex
+    vtx = fESD->GetPrimaryVertexSPD();
+    if(vtx->GetNContributors()<2) {
+      vtx = 0x0;
+      // Post output data
+      PostData(0, fHistList);
+      PostData(1, fHistListITS);
+      return;
+    }
   }
- double primVtx[3];
+
+  double primVtx[3];
   vtx->GetXYZ(primVtx);
   //  printf("primVtx: %g  %g  %g \n",primVtx[0],primVtx[1],primVtx[2]);
   if(TMath::Sqrt(primVtx[0]*primVtx[0] + primVtx[1]*primVtx[1])>1. || TMath::Abs(primVtx[2]>10.)){
index 1aaf3be..bd26d24 100644 (file)
@@ -864,7 +864,8 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
 
   const AliESDVertex *vtx = fESD->GetPrimaryVertexTracks();
   // Need vertex cut
-  if (vtx->GetNContributors() < 2) {
+  TString vtxName(vtx->GetName());
+  if(vtx->GetNContributors() < 2 || (vtxName.Contains("TPCVertex")) ) {
     // SPD vertex
     vtx = fESD->GetPrimaryVertexSPD();
     if(vtx->GetNContributors()<2) {
@@ -876,7 +877,7 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
       return;
     }
   }
-
+  
   AliDebug(2,Form("Vertex title %s, status %d, nCont %d\n",vtx->GetTitle(), vtx->GetStatus(), vtx->GetNContributors()));
   double primVtx[3] = {0.,0.,0.};
   vtx->GetXYZ(primVtx);
index 8f6724b..0af1687 100644 (file)
@@ -180,7 +180,7 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
       AliDebug(2,Form("ERROR: Could not retrieve MC event"));
       PostData(0,fHistList);
       PostData(1,fCFManagerPos->GetParticleContainer());
-    PostData(2,fCFManagerNeg->GetParticleContainer());
+      PostData(2,fCFManagerNeg->GetParticleContainer());
     return;
     }
     
@@ -194,11 +194,18 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
   const AliESDVertex *vtx = fESD->GetPrimaryVertex();
   AliDebug(2,Form("Vertex title %s, status %d, nCont %d\n",vtx->GetTitle(), vtx->GetStatus(), vtx->GetNContributors()));
   // Need vertex cut
-  if (vtx->GetNContributors() < 2) {
-    PostData(0,fHistList);
-    PostData(1,fCFManagerPos->GetParticleContainer());
-    PostData(2,fCFManagerNeg->GetParticleContainer());
-    return;
+  TString vtxName(vtx->GetName());
+  if(vtx->GetNContributors() < 2 || (vtxName.Contains("TPCVertex")) ) {
+    // SPD vertex
+    vtx = fESD->GetPrimaryVertexSPD();
+    if(vtx->GetNContributors()<2) {
+      vtx = 0x0;
+      // Post output data
+      PostData(0,fHistList);
+      PostData(1,fCFManagerPos->GetParticleContainer());
+      PostData(2,fCFManagerNeg->GetParticleContainer());
+      return;
+    }
   }
   
   double primVtx[3];