]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Merged with changes from Panos
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Feb 2007 16:45:57 +0000 (16:45 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Feb 2007 16:45:57 +0000 (16:45 +0000)
PWG2/FLOW/AliFlowAnalyser.cxx
PWG2/FLOW/AliFlowEvent.cxx
PWG2/FLOW/AliFlowMaker.cxx
PWG2/FLOW/AliFlowSelection.cxx
PWG2/FLOW/AliFlowWeighter.cxx

index 5e0dcce9f0517827c9831d3badedf3eedef76dac..3c28cff7026f1b57e556dd237c7b42b8fe85251b 100644 (file)
@@ -2081,7 +2081,7 @@ void AliFlowAnalyser::FillEventHistograms(AliFlowEvent* fFlowEvent)
     } 
     else if(k==1) 
     {
-     float psi1 ; float psi2 ;
+     float psi1 = 0. ; float psi2 = 0. ;
      if (j==0)     { psi1 = fPsi[0][0] ; psi2 = fPsi[1][1] ; }  
      else if(j==1) { psi1 = fPsi[0][0] ; psi2 = fPsi[0][1] ; }
      float diff = psi1 - psi2 ;
@@ -2109,7 +2109,7 @@ void AliFlowAnalyser::FillEventHistograms(AliFlowEvent* fFlowEvent)
 
    if(j < Flow::nHars - 1) // subevents of different harmonics
    {
-    int j1, j2;
+    int j1 = 0 ; int j2 = 0 ;
     float psiSubCorrDiff;
     if(j==0)     { j1 = 1, j2 = 2 ; } 
     else if(j==1) { j1 = 1, j2 = 3 ; } 
@@ -2559,7 +2559,7 @@ Int_t AliFlowAnalyser::HarmonicsLoop(AliFlowTrack* fFlowTrack)
    bool oddHar = (j+1) % 2;
    fFlowSelect->SetHarmonic(j);
    double order  = (double)(j+1);
-   float psi_i, psi_2;
+   float psi_i = 0. ; float psi_2 = 0. ;
    if(fFlowEvent->EtaSubs())          // particles with the opposite subevent
    {
     if(eta > 0) { psi_i = fPsiSub[1][k][j] ; }     //check
index d72af6a40ca1a3329761af6c917902aab4506680..8d9bf2d0bd02806a8295943ccab24eb51ee712f1 100644 (file)
@@ -132,6 +132,7 @@ Double_t AliFlowEvent::Weight(Int_t selN, Int_t harN, AliFlowTrack* pFlowTrack)
 { 
  // Weight for enhancing the resolution (eta gives sign +/- for Odd Harmonics)
 
+ if(selN>Flow::nSels) { selN = 0 ; }
  bool oddHar = (harN+1) % 2 ;
  Double_t phiWgt = 1. ;
  if(PtWgt()) 
@@ -841,7 +842,7 @@ Int_t AliFlowEvent::UncorrPosMult(Float_t eta)  const
  // Positive multiplicity in the interval (-eta..eta)
  // (default is  Flow::fEetaGood = 0.9)
  
- Int_t posMult ;
+ Int_t posMult = 0 ;
  for(Int_t itr=0;itr<TrackCollection()->GetEntries();itr++) 
  {
   AliFlowTrack* pFlowTrack ;
index 38dc734048a53b27a02d9389a5d81fa2eded525c..00d5f8debcd66162218480013c0936b73eaf1401 100644 (file)
 #include "AliESDtrack.h"
 #include "AliESDv0.h"
 #include "AliKalmanTrack.h"
-//#include "AliRun.h"
-//#include "AliRunLoader.h"
-//#include "AliMagFMaps.h"
-//#include "AliITStrackV2.h"
 
 // Flow things
 #include "AliFlowEvent.h"
@@ -49,6 +45,7 @@
 #include "AliFlowMaker.h"
 
 // ANSI things
+#include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <iostream>
@@ -434,6 +431,8 @@ Bool_t AliFlowMaker::CheckTrack(AliESDtrack* fTrack)
 Bool_t AliFlowMaker::CheckV0(AliESDv0* fV0)
 {
  // applies v0 cuts (dummy)
+ if(!fV0) { return kFALSE ; }
 
  return kTRUE ;
 }
@@ -441,6 +440,8 @@ Bool_t AliFlowMaker::CheckV0(AliESDv0* fV0)
 Bool_t AliFlowMaker::CheckEvent(AliESD* fESD)
 {
  // applies event cuts (dummy)
+ if(!fESD) { return kFALSE ; }
 
  return kTRUE ;
 }
index 04544a947b53f690181fad2285ee566d12886e1c..76f904e51e14207d3073e7a9243ed287fb3fc15f 100644 (file)
@@ -132,6 +132,7 @@ Bool_t AliFlowSelection::Select(AliFlowV0* pFlowV0)
 {
  // Returns kTRUE if the v0 is selected. (dummy) 
 
+ if(!pFlowV0) { return kFALSE ; }
  return kTRUE ;
 }
 //-----------------------------------------------------------------------
index 9161db4bbda53e705f96c26d03f04ef3b96ba0b2..6297bd38a05aa303ee87e3457d1a90e97120b02f 100644 (file)
@@ -45,6 +45,7 @@
 #include "AliFlowWeighter.h"
 
 // ANSI things
+#include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <iostream>