Fixing trigger selection include CSMBB/Postdata before return
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Dec 2009 05:43:10 +0000 (05:43 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Dec 2009 05:43:10 +0000 (05:43 +0000)
PWG4/JetTasks/AliAnalysisHelperJetTasks.cxx
PWG4/JetTasks/AliPWG4HighPtQATPConly.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx

index 60330b6..cc6b2e5 100644 (file)
@@ -655,6 +655,8 @@ Bool_t AliAnalysisHelperJetTasks::IsTriggerBitFired(const AliVEvent* aEv, Trigge
       case kMB1:
        {
          if(esd->GetFiredTriggerClasses().Contains("CINT1B"))return kTRUE;
+         // does the same but without or'ed V0s
+         if(esd->GetFiredTriggerClasses().Contains("CSMBB"))return kTRUE;   
          break;
        }
       case kMB2:
@@ -667,7 +669,7 @@ Bool_t AliAnalysisHelperJetTasks::IsTriggerBitFired(const AliVEvent* aEv, Trigge
        }
       case kSPDGFO:
        {
-         if(esd->GetFiredTriggerClasses().Contains("CSMBB"))return kTRUE;        
+         if(esd->GetFiredTriggerClasses().Contains("CSMBB"))return kTRUE;
          break;
        }
       default:
@@ -689,6 +691,8 @@ Bool_t AliAnalysisHelperJetTasks::IsTriggerBitFired(const AliVEvent* aEv, Trigge
       case kMB1:
        {
          if(aod->GetFiredTriggerClasses().Contains("CINT1B"))return kTRUE;
+         // does the same but without or'ed V0s
+         if(aod->GetFiredTriggerClasses().Contains("CSMBB"))return kTRUE;   
          break;
        }
       case kMB2:
index 0eced3a..c0916d4 100644 (file)
@@ -317,7 +317,6 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
   AliDebug(2,Form(">> AliPWG4HighPtQATPConly::Exec \n"));  
 
   // All events without selection
-  cout << "Fill fNEventAll" << endl;
   fNEventAll->Fill(0.);
 
   if (!fESD) {
@@ -327,11 +326,15 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
 
   //Trigger selection
   AliAnalysisHelperJetTasks::Trigger trig;
-  trig = (const enum AliAnalysisHelperJetTasks::Trigger)fTrigger;
+  trig = (AliAnalysisHelperJetTasks::Trigger)fTrigger;
   if (AliAnalysisHelperJetTasks::IsTriggerFired(fESD,trig)){
     AliDebug(2,Form(" Trigger Selection: event ACCEPTED ... "));
   }else{
     AliDebug(2,Form(" Trigger Selection: event REJECTED ... "));
+    // Post output data
+    PostData(0, fHistList);
+    PostData(1, fHistListTPC);
+    PostData(2, fHistListITS);
     return;
   } 
 
@@ -346,9 +349,20 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
   double primVtx[3];
   vtx->GetXYZ(primVtx);
   //  printf("primVtx: %g  %g  %g \n",primVtx[0],primVtx[1],primVtx[2]);
-  if(primVtx[0]>1. || primVtx[1]>1. || primVtx[2]>10.) return;
-
-  if(!fESD->GetNumberOfTracks() || fESD->GetNumberOfTracks()<2) return;
+  if(TMath::Abs(primVtx[0]>1.) || TMath::Abs(primVtx[1]>1.) || TMath::Abs(primVtx[2])>10.){
+    // Post output data
+    PostData(0, fHistList);
+    PostData(1, fHistListTPC);
+    PostData(2, fHistListITS);
+    return;
+  }
+  if(!fESD->GetNumberOfTracks() || fESD->GetNumberOfTracks()<2){ 
+    // Post output data
+    PostData(0, fHistList);
+    PostData(1, fHistListTPC);
+    PostData(2, fHistListITS);
+    return;
+  }
   Int_t nTracks = fESD->GetNumberOfTracks();
   AliDebug(2,Form("nTracks %d\n", nTracks));
 
index 9eb6105..f81bdde 100644 (file)
@@ -172,11 +172,13 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)//UserExec(Option_t *)
 
   //Trigger selection
   AliAnalysisHelperJetTasks::Trigger trig;
-  trig = (const enum AliAnalysisHelperJetTasks::Trigger)fTrigger;
+  trig = (AliAnalysisHelperJetTasks::Trigger)fTrigger;
   if (AliAnalysisHelperJetTasks::IsTriggerFired(fESD,trig)){
     AliDebug(2,Form(" Trigger Selection: event ACCEPTED ... "));
   }else{
     AliDebug(2,Form(" Trigger Selection: event REJECTED ... "));
+    PostData(0,fHistList);
+    PostData(1,fCFManager->GetParticleContainer());
     return;
   } 
   //  if(!fESD->IsTriggerClassFired("CINT1B-ABCE-NOPF-ALL") || !fESD->IsTriggerClassFired("CSMBB-ABCE-NOPF-ALL")) return;
@@ -203,12 +205,18 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)//UserExec(Option_t *)
   
   const AliESDVertex *vtx = fESD->GetPrimaryVertex();
   // Need vertex cut
-  if (vtx->GetNContributors() < 2) return;
+  if (vtx->GetNContributors() < 2){
+    PostData(0,fHistList);
+    PostData(1,fCFManager->GetParticleContainer());
+    return;
+  }
   double primVtx[3];
   vtx->GetXYZ(primVtx);
-  //  printf("primVtx: %g  %g  %g \n",primVtx[0],primVtx[1],primVtx[2]);
-  if(primVtx[0]>1. || primVtx[1]>1. || primVtx[2]>10.) return;
-
+  if(TMath::Abs(primVtx[0]>1. )|| TMath::Abs(primVtx[1]>1.) || TMath::Abs(primVtx[2]>10.)){
+    PostData(0,fHistList);
+    PostData(1,fCFManager->GetParticleContainer());
+    return;
+  }
   AliDebug(2,Form("Vertex title %s, status %d, nCont %d\n",vtx->GetTitle(), vtx->GetStatus(), vtx->GetNContributors()));
 
   Int_t nTracks = fESD->GetNumberOfTracks();