]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnCutMgr.cxx
Modifications in analysis tasks for train
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutMgr.cxx
index d687bb5343fe7bcd3d4ffebb3ff783b575722092..6e4dc88a801bb73896597dbf6ac94759aed928dc 100644 (file)
@@ -11,8 +11,6 @@
 
 #include "AliLog.h"
 
-#include "AliRsnDaughter.h"
-#include "AliRsnEvent.h"
 #include "AliRsnCutSet.h"
 #include "AliRsnCutMgr.h"
 
@@ -27,8 +25,7 @@ AliRsnCutMgr::AliRsnCutMgr() :
 //
 
   Int_t i;
-  for (i = 0; i < AliRsnCut::kLastCutTarget; i++)
-  {
+  for (i = 0; i < AliRsnCut::kLastCutTarget; i++) {
     fCutSets[i] = 0;
   }
 }
@@ -42,8 +39,7 @@ AliRsnCutMgr::AliRsnCutMgr(const char *name, const char *title) :
 //
 
   Int_t i;
-  for (i = 0; i < AliRsnCut::kLastCutTarget; i++)
-  {
+  for (i = 0; i < AliRsnCut::kLastCutTarget; i++) {
     fCutSets[i] = 0;
   }
 }
@@ -57,14 +53,13 @@ AliRsnCutMgr::~AliRsnCutMgr()
 //
 
   Int_t i;
-  for (i = 0; i < AliRsnCut::kLastCutTarget; i++)
-  {
+  for (i = 0; i < AliRsnCut::kLastCutTarget; i++) {
     delete fCutSets[i];
   }
 }
 
 //_____________________________________________________________________________
-void AliRsnCutMgr::SetCutSet(AliRsnCut::ETarget type, AliRsnCutSet* cutset)
+void AliRsnCutMgr::SetCutSet(AliRsnCut::ETarget type, AliRsnCutSet* const cutset)
 {
 //
 // Assign a cut set to a given target
@@ -75,7 +70,7 @@ void AliRsnCutMgr::SetCutSet(AliRsnCut::ETarget type, AliRsnCutSet* cutset)
 }
 
 //_____________________________________________________________________________
-Bool_t AliRsnCutMgr::IsSelected(AliRsnCut::ETarget type,TObject *obj)
+Bool_t AliRsnCutMgr::IsSelected(AliRsnCut::ETarget type, TObject*const obj)
 {
 //
 // Check if a given object passes the cuts defined for it.
@@ -87,21 +82,20 @@ Bool_t AliRsnCutMgr::IsSelected(AliRsnCut::ETarget type,TObject *obj)
   AliDebug(AliLog::kDebug, "<-");
   if (!fCutSets[type]) return kTRUE;
 
-  switch (type)
-  {
-    case AliRsnCut::kParticle:
-      return fCutSets[type]->IsSelected(type, (AliRsnDaughter*)obj);
-      break;
-    case AliRsnCut::kPair:
-      return fCutSets[type]->IsSelected(type, (AliRsnPairParticle*)obj);
-      break;
-    case AliRsnCut::kEvent:
-      return fCutSets[type]->IsSelected(type, (AliRsnEvent*)obj);
-      break;
-    default:
-      AliWarning("Wrong target selected.");
-      return kTRUE;
-      break;
+  switch (type) {
+  case AliRsnCut::kParticle:
+    return fCutSets[type]->IsSelected(type, (AliRsnDaughter*)obj);
+    break;
+  case AliRsnCut::kPair:
+    return fCutSets[type]->IsSelected(type, (AliRsnPairParticle*)obj);
+    break;
+  case AliRsnCut::kEvent:
+    return fCutSets[type]->IsSelected(type, (AliRsnEvent*)obj);
+    break;
+  default:
+    AliWarning("Wrong target selected.");
+    return kTRUE;
+    break;
   }
 
   return kTRUE;