]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnPairFunctions.cxx
Fixed bug in AliRsnPair::Fill()
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPairFunctions.cxx
index c649c47b1a89638848d4c9667b2a57b9a73c684d..f5008557d25ac5663d71f36b1a4e5c63974b98ba 100644 (file)
@@ -28,43 +28,36 @@ ClassImp(AliRsnPairFunctions)
 
 //_____________________________________________________________________________
 AliRsnPairFunctions::AliRsnPairFunctions(const char *name, AliRsnPairDef *def) :
-  AliRsnPair(name, def),
-  fFunctions("AliRsnFunction", 0)
+   AliRsnPair(name, def),
+   fFunctions("AliRsnFunction", 0)
 {
 //
 // Default constructor
 //
-
-  AliDebug(AliLog::kDebug+2,"<-");
-  AliDebug(AliLog::kDebug+2,"->");
 }
 
 //_____________________________________________________________________________
 AliRsnPairFunctions::AliRsnPairFunctions(const AliRsnPairFunctions& copy) :
-  AliRsnPair(copy),
-  fFunctions(copy.fFunctions)
+   AliRsnPair(copy),
+   fFunctions(copy.fFunctions)
 {
 //
 // Default constructor
 //
-
-  AliDebug(AliLog::kDebug+2,"<-");
-  AliDebug(AliLog::kDebug+2,"->");
 }
 
 //_____________________________________________________________________________
 AliRsnPairFunctions& AliRsnPairFunctions::operator=(const AliRsnPairFunctions& copy)
 {
-  AliRsnPair::operator=(copy);
+   AliRsnPair::operator=(copy);
 
-  Int_t i, n = copy.fFunctions.GetEntries();
-  for (i = 0; i < n; i++)
-  {
-    AliRsnFunction *fcn = (AliRsnFunction*)copy.fFunctions[i];
-    if (fcn) AddFunction(fcn);
-  }
+   Int_t i, n = copy.fFunctions.GetEntries();
+   for (i = 0; i < n; i++) {
+      AliRsnFunction *fcn = (AliRsnFunction*)copy.fFunctions[i];
+      if (fcn) AddFunction(fcn);
+   }
 
-  return (*this);
+   return (*this);
 }
 
 //_____________________________________________________________________________
@@ -73,9 +66,6 @@ AliRsnPairFunctions::~AliRsnPairFunctions()
 //
 // Destructor
 //
-
-  AliDebug(AliLog::kDebug+2,"<-");
-  AliDebug(AliLog::kDebug+2,"->");
 }
 
 //_____________________________________________________________________________
@@ -86,21 +76,15 @@ void AliRsnPairFunctions::Compute()
 // Checks all cuts and then computes the corresponding pair object
 // and then fill the list of required values using it.
 //
-  
-  AliDebug(AliLog::kDebug+2,"<-");
-  
-  TObjArrayIter   nextFcn(&fFunctions);
-  AliRsnFunction *fcn = 0x0;
-  
-  while ((fcn = (AliRsnFunction*)nextFcn())) 
-  {
-    fcn->SetPairDef(fPairDef);
-    fcn->SetPair(&fMother);
-    fcn->SetEvent(fEvent);
-    fcn->Fill();
-  }
-
-  AliDebug(AliLog::kDebug+2,"->");
+
+   TObjArrayIter   nextFcn(&fFunctions);
+   AliRsnFunction *fcn = 0x0;
+
+   while ((fcn = (AliRsnFunction*)nextFcn())) {
+      fcn->SetPairDef(fPairDef);
+      fcn->SetPair(&fMother);
+      fcn->Fill();
+   }
 }
 
 //_____________________________________________________________________________
@@ -114,24 +98,19 @@ void AliRsnPairFunctions::Init(const char *prefix, TList *list)
 // All generated histograms are stored into the output TList.
 //
 
-  AliDebug(AliLog::kDebug+2,"<-");
-
-  Int_t  i;
-  TString hName("");
-  AliRsnFunction *fcn = 0;
-  for (i = 0; i < fFunctions.GetEntries(); i++)
-  {
-    fcn = (AliRsnFunction*)fFunctions.At(i);
-    hName += prefix;
-    hName += '_';
-    hName += GetName();
-    hName += '_';
-    hName += fcn->GetName();
-    if (fcn->IsUsingTH1()) list->Add(fcn->CreateHistogram(hName.Data(), ""));
-    else list->Add(fcn->CreateHistogramSparse(hName.Data(), ""));
-  }
-
-  AliDebug(AliLog::kDebug+2,"->");
+   Int_t  i;
+   TString hName("");
+   AliRsnFunction *fcn = 0;
+   for (i = 0; i < fFunctions.GetEntries(); i++) {
+      fcn = (AliRsnFunction*)fFunctions.At(i);
+      hName  = prefix;
+      hName += '_';
+      hName += GetName();
+      hName += '_';
+      hName += fcn->GetName();
+      if (fcn->IsUsingTH1()) list->Add(fcn->CreateHistogram(hName.Data(), ""));
+      else list->Add(fcn->CreateHistogramSparse(hName.Data(), ""));
+   }
 }
 
 //_____________________________________________________________________________
@@ -141,28 +120,7 @@ void AliRsnPairFunctions::AddFunction(AliRsnFunction *const fcn)
 // Adds a new computing function
 //
 
-  AliDebug(AliLog::kDebug+2,"<-");
-  
-  fFunctions.Print();
-  Int_t size = fFunctions.GetEntries();
-  new(fFunctions[size]) AliRsnFunction(*fcn);
-  
-  AliDebug(AliLog::kDebug+2,"->");
-}
-
-//_____________________________________________________________________________
-void AliRsnPairFunctions::SetEvent(AliRsnEvent *event)
-{
-//
-// Set current event
-//
-
-  Int_t i;
-  fEvent = event;
-  
-  for (i = 0; i < fFunctions.GetEntries(); i++)
-  {
-    AliRsnFunction *fcn = (AliRsnFunction*)fFunctions.At(i);
-    fcn->SetEvent(event);
-  }
+   Int_t size = fFunctions.GetEntries();
+   new (fFunctions[size]) AliRsnFunction(*fcn);
+   fFunctions.Print();
 }