Added PHOS ClusterSelection headers.
authorHenrik Qvigstad <henrik.qvigstad@fys.uio.no>
Mon, 20 Jan 2014 13:38:33 +0000 (14:38 +0100)
committerHenrik Qvigstad <henrik.qvigstad@fys.uio.no>
Tue, 21 Jan 2014 12:33:47 +0000 (13:33 +0100)
PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelection.h [new file with mode: 0644]
PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelectionLogbackTask.h [new file with mode: 0644]
PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelectionTask.h [new file with mode: 0644]
PWGGA/PHOSTasks/ClusterSelection/AliPHOSEventSelection.h [new file with mode: 0644]

diff --git a/PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelection.h b/PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelection.h
new file mode 100644 (file)
index 0000000..1d1ac71
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef ALIPHOSCLUSTERSELECTION_CXX
+#define ALIPHOSCLUSTERSELECTION_CXX
+
+ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// Class for selection of PHOS clusters
+// Authors : Henrik Qvigstad
+// Date    : 16.01.2014
+/* $Id$ */
+
+
+class AliVCluster;
+class AliESDCaloCluster;
+class AliAODCaloCluster;
+
+#include "TObject.h"
+
+class AliPHOSClusterSelection : TObject {
+ public:
+  AliPHOSClusterSelection();
+  virtual ~AliPHOSClusterSelection();
+  
+  // Selection functions
+  virtual Bool_t IsSelected(AliVCluster* cluster) const;
+
+  virtual Bool_t IsSelectedCPV(AliVCluster* cluster) const;
+  virtual Bool_t IsSelectedUnfolded(AliVCluster* cluster) const;
+  virtual Bool_t IsSelectedDisp(AliVCluster* cluster) const;
+  virtual Bool_t IsSelectedDispCore(AliVCluster* cluster) const;
+  virtual Bool_t IsSelectedTOF(AliVCluster* cluster) const;
+
+  // Configuration Functions
+  AliPHOSClusterSelection* SetMinChargedParticleTrackDistance(Float_t distance);
+  AliPHOSClusterSelection* SetNotUnfolded(Bool_t notUnfolded);
+  AliPHOSClusterSelection* SetMaxDispR2(Float_t maxR2);
+  AliPHOSClusterSelection* SetMaxDispCoreR2(Float_t maxR2);
+  AliPHOSClusterSelection* SetMaxTOF(Float_t maxTOF);
+  
+  AliPHOSClusterSelection* SetMinSelection();
+
+  virtual TString ToString() const;
+  static Float_t SetMinChargedParticleTrackDistance(const TString string);
+  
+ protected:
+  AliPHOSClusterSelection(const AliPHOSClusterSelection&); // not implemented
+  AliPHOSClusterSelection& operator=(const AliPHOSClusterSelection&); // not implemented
+  
+  // Selection Parameters
+  Float_t fMinChargedParticleTrackDistance; // CPV, Charged Particle Veto
+  Bool_t fNotUnfolded; // if true, rejects Unfolded Clusters
+  Float_t fMaxDispR2; // dispersion cut
+  Float_t fMaxDispCoreR2; // dispersion cut of core cells
+  Float_t fMaxTOF; // TOF cut
+  
+  ClassDef(AliPHOSClusterSelection, 1);
+};
+
+#endif
diff --git a/PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelectionLogbackTask.h b/PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelectionLogbackTask.h
new file mode 100644 (file)
index 0000000..4b9da07
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef ALIPHOSCLUSTERSELECTIONLOGBACKTASK_CXX
+#define ALIPHOSCLUSTERSELECTIONLOGBACKTASK_CXX
+
+ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// Analysis Task for selecting PHOS clusters for other analysis, with Logback.
+// Allows to access clusters of past events. The clusters of said events are 
+// stored in per-event arrays, and the event-arrays are stored in one 
+// first-in-last-out list per event selection scope. Said scope is defined by
+// AliPHOSEventSelection or (recommended) whatever subclass used in its place.
+//
+// Authors : Henrik Qvigstad
+// Date    : 16.01.2014
+/* $Id$ */
+
+class AliVCluster;
+
+#include "TArrayI.h"
+
+#include "AliAnalysisTaskSE.h"
+
+class AliPHOSClusterSelectionLogbackTask : AliPHOSClusterSelectionTask {
+ public:
+  AliPHOSClusterSelectionLogbackTask(const char* name = "AliPHOSClusterSelectionLogbackTask");
+  virtual ~AliPHOSClusterSelectionLogbackTask();
+  
+  virtual void   UserCreateOutputObjects();
+  virtual void   UserExec(Option_t *option);
+  /* virtual void   Terminate(Option_t *); */
+
+  int GetNClustersBacklog(const AliPHOSEventSelection* eventSelection, int eventBacklogIndex) const; // Number of clusters in the current event
+  AliVCluster* GetClusterBacklog(const int& index, const AliPHOSEventSelection* eventSelection, int eventBacklogIndex) const; // get cluster of index
+  TArrayI GetIndexOfSelectedBacklog(const AliPHOSClusterSelection* selection, const AliPHOSEventSelection& eventSelection, int eventBacklogIndex) const;
+  
+  void AddEventSelectionLogback(const AliPHOSEventSelection* selection);
+
+ protected:
+  AliPHOSClusterSelectionLogbackTask(const AliPHOSClusterSelectionLogbackTask&); // not implemented
+  AliPHOSClusterSelectionLogbackTask& operator=(const AliPHOSClusterSelectionLogbackTask&); // not implemented
+
+  
+  ClassDef(AliPHOSClusterSelectionLogbackTask, 1);
+};
+
+#endif
diff --git a/PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelectionTask.h b/PWGGA/PHOSTasks/ClusterSelection/AliPHOSClusterSelectionTask.h
new file mode 100644 (file)
index 0000000..d852773
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef ALIPHOSCLUSTERSELECTIONTASK_CXX
+#define ALIPHOSCLUSTERSELECTIONTASK_CXX
+
+ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// Analysis Task for selecting PHOS clusters for other analysis
+// Authors : Henrik Qvigstad
+// Date    : 16.01.2014
+/* $Id$ */
+
+class AliVCluster;
+
+#include "TArrayI.h"
+
+#include "AliAnalysisTaskSE.h"
+
+class AliPHOSClusterSelectionTask : AliAnalysisTaskSE {
+ public:
+  AliPHOSClusterSelectionTask(const char* name = "AliPHOSClusterSelectionTask");
+  virtual ~AliPHOSClusterSelectionTask();
+  
+  virtual void   UserCreateOutputObjects();
+  virtual void   UserExec(Option_t *option);
+  /* virtual void   Terminate(Option_t *); */
+
+  int GetNClusters() const; // Number of clusters in the current event
+  AliVCluster* GetCluster(int index) const; // get cluster of index
+  TArrayI GetIndexOfSelected(const AliPHOSClusterSelection* selection) const;
+
+ protected:
+  AliPHOSClusterSelectionTask(const AliPHOSClusterSelectionTask&); // not implemented
+  AliPHOSClusterSelectionTask& operator=(const AliPHOSClusterSelectionTask&); // not implemented
+
+  
+  ClassDef(AliPHOSClusterSelectionTask, 1);
+};
+
+#endif
diff --git a/PWGGA/PHOSTasks/ClusterSelection/AliPHOSEventSelection.h b/PWGGA/PHOSTasks/ClusterSelection/AliPHOSEventSelection.h
new file mode 100644 (file)
index 0000000..a2849e2
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef ALIPHOSEVENTSELECTION_CXX
+#define ALIPHOSEVENTSELECTION_CXX
+
+ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// Class for selection of PHOS events, create a sub-class inheriting from
+// this class to customize your event selection logback using 
+// AliPHOSClusterSelectionLogbackTask
+//
+// Uses IsEqual() to identify scope of Event selection!!! (Map from 
+// EventSelection to Event cluster array)
+//
+// Authors : Henrik Qvigstad
+// Date    : 16.01.2014
+/* $Id$ */
+
+
+class AliVEvent;
+class AliESDCaloEvent;
+class AliAODCaloEvent;
+
+#include "TObject.h"
+
+class AliPHOSEventSelection : TObject {
+ public:
+  AliPHOSEventSelection();
+  virtual ~AliPHOSEventSelection();
+  
+  virtual Bool_t  IsEqual(const TObject* obj) const; // recommended: reimplement
+  virtual ULong_t Hash() const;
+    
+  
+ protected:
+  AliPHOSEventSelection(const AliPHOSEventSelection&); // not implemented
+  AliPHOSEventSelection& operator=(const AliPHOSEventSelection&); // not implemented
+
+  ClassDef(AliPHOSEventSelection, 1);
+};
+
+#endif