Event selection via input event handler.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Dec 2009 17:46:43 +0000 (17:46 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Dec 2009 17:46:43 +0000 (17:46 +0000)
ANALYSIS/ANALYSISLinkDef.h
ANALYSIS/ANALYSISaliceLinkDef.h
ANALYSIS/AliAnalysisTaskSE.cxx
ANALYSIS/AliAnalysisTaskSE.h
ANALYSIS/libANALYSIS.pkg
ANALYSIS/libANALYSISalice.pkg

index 0253451..bbb8906 100644 (file)
@@ -10,8 +10,6 @@
 #pragma link C++ class  AliAnalysisDataSlot+;
 #pragma link C++ class  AliAnalysisManager+;
 #pragma link C++ class  AliAnalysisSelector+;
-#pragma link C++ class  AliAnalysisFilter+;
-#pragma link C++ class  AliAnalysisCuts+;
 #pragma link C++ class  AliAnalysisGrid+;
 
 #endif
index 9cb4e99..eb413da 100644 (file)
@@ -25,6 +25,8 @@
 #pragma link C++ class AliTriggerAnalysis+;
 #pragma link C++ class AliPhysicsSelection+;
 
+#pragma link C++ class  AliAnalysisFilter+;
+#pragma link C++ class  AliAnalysisCuts+;
 
 #ifdef WITHXML
 #pragma link C++ class AliTagAnalysis+;
index 1ebbba9..8b99e60 100644 (file)
@@ -59,10 +59,6 @@ TClonesArray*    AliAnalysisTaskSE::fgAODMCParticles    = NULL;
 AliAODTracklets* AliAnalysisTaskSE::fgAODTracklets      = NULL;
 AliAODCaloCells* AliAnalysisTaskSE::fgAODEmcalCells     = NULL;
 AliAODCaloCells* AliAnalysisTaskSE::fgAODPhosCells      = NULL;
-AliAnalysisCuts* AliAnalysisTaskSE::fgCollisionSelector = NULL; 
-
-Bool_t           AliAnalysisTaskSE::fgIsCollision       = kTRUE; 
-
 
 AliAnalysisTaskSE::AliAnalysisTaskSE():
     AliAnalysisTask(),
@@ -285,19 +281,12 @@ void AliAnalysisTaskSE::Exec(Option_t* option)
 // Exec analysis of one event
     if (fDebug > 1) AliInfo("AliAnalysisTaskSE::Exec() \n");
 
+    Bool_t isSelected = kTRUE;
     if( fInputHandler ) {
-       fEntry = fInputHandler->GetReadEntry();
-       if (fInputHandler->NewEvent()) {
-          if (fgCollisionSelector) {
-              fgIsCollision = fgCollisionSelector->IsSelected(InputEvent());
-              printf("Event # %5d Decision %5d \n", Entry(), fgIsCollision);
-          }
-
-       } else {
-          printf("Event # %5d already seen \n", Entry());
-       }
-       
+      isSelected = fInputHandler->IsEventSelected();
+      fEntry = fInputHandler->GetReadEntry();
     }
+
 // Notify the change of run number
     if (InputEvent()->GetRunNumber() != fCurrentRunNumber) {
        fCurrentRunNumber = InputEvent()->GetRunNumber();
@@ -435,7 +424,7 @@ void AliAnalysisTaskSE::Exec(Option_t* option)
     }
 
 // Call the user analysis    
-    if (!fSelectCollisions || fgIsCollision) 
+    if (!fSelectCollisions || isSelected) 
        UserExec(option);
     
 // Added protection in case the derived task is not an AOD producer.
index 040acf9..2d5d4c9 100644 (file)
@@ -45,8 +45,7 @@ class AliAnalysisTaskSE : public AliAnalysisTask
     virtual void   AddAODBranch(const char* cname, void* addobj, const char *fname="");
     // Event Selection
     virtual void   SelectCollisionCandidates() {fSelectCollisions = kTRUE;}
-    static  void   SetCollisionSelector(AliAnalysisCuts* selector) {fgCollisionSelector = selector;}
-// Getters
+ // Getters
     virtual Int_t        DebugLevel()  {return fDebug;     }
     virtual AliVEvent*   InputEvent()  {return fInputEvent;}
     virtual AliAODEvent* AODEvent()    {return fOutputAOD; }
@@ -81,9 +80,7 @@ class AliAnalysisTaskSE : public AliAnalysisTask
     static AliAODTracklets* fgAODTracklets;     //! Tracklets for replication
     static AliAODCaloCells* fgAODEmcalCells;    //! Emcal Cell replication
     static AliAODCaloCells* fgAODPhosCells;     //! Phos  Cell replication
-    // Event selection
-    static AliAnalysisCuts* fgCollisionSelector; //! Cuts to select collision events
-    static Bool_t           fgIsCollision;       //! Collision flag 
+    // Event Selection
     Bool_t                  fSelectCollisions;   //  Task processes collision candidates only
      
     ClassDef(AliAnalysisTaskSE, 2); // Analysis task for standard jet analysis
index d611c8b..896d7b1 100644 (file)
@@ -2,8 +2,7 @@
 
 SRCS = AliAnalysisDataContainer.cxx AliAnalysisDataSlot.cxx \
        AliAnalysisManager.cxx AliAnalysisTask.cxx \
-       AliAnalysisSelector.cxx AliAnalysisGrid.cxx \
-       AliAnalysisFilter.cxx AliAnalysisCuts.cxx 
+       AliAnalysisSelector.cxx AliAnalysisGrid.cxx
 
 
 
index e475e32..c7186a6 100644 (file)
@@ -6,8 +6,10 @@ SRCS =         AliAnalysisTaskSE.cxx AliAnalysisTaskME.cxx \
        AliEventPoolOTF.cxx AliEventPoolLoop.cxx AliEventPoolSparse.cxx \
        AliAnalysisTaskTagCreator.cxx \
         AliMultiEventInputHandler.cxx \
-      AliTriggerAnalysis.cxx \
-      AliPhysicsSelection.cxx
+       AliTriggerAnalysis.cxx \
+        AliPhysicsSelection.cxx \
+        AliAnalysisFilter.cxx AliAnalysisCuts.cxx 
+
 
 ifeq (yes,$(CHECKALIEN))
 PACKCXXFLAGS := $(CXXFLAGS) -DWITHALIEN