]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixed some initialization warnings
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 May 2008 21:54:39 +0000 (21:54 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 23 May 2008 21:54:39 +0000 (21:54 +0000)
PWG2/FLOW/AliFlowAnalysisWithLYZEventPlane.cxx
PWG2/FLOW/AliFlowAnalysisWithLYZEventPlane.h
PWG2/FLOW/AliFlowAnalysisWithLeeYangZeros.cxx
PWG2/FLOW/AliFlowAnalysisWithLeeYangZeros.h
PWG2/FLOW/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/AliFlowAnalysisWithScalarProduct.cxx
PWG2/FLOW/AliFlowAnalysisWithScalarProduct.h

index 15af624b1b97029d12d2908822bfeb8cdac42e8a..d9ffac23be728507f281cf7811444be394f1d95b 100644 (file)
@@ -52,46 +52,47 @@ ClassImp(AliFlowAnalysisWithLYZEventPlane)
   //-----------------------------------------------------------------------
  
  AliFlowAnalysisWithLYZEventPlane::AliFlowAnalysisWithLYZEventPlane():
-   fOutFile(0), 
-   fFirstRunFile(0),
-   fSecondRunFile(0),
-   fFirstRunFileName(0),
-   fSecondRunFileName(0),
-   fOutFileName(0),
-   fSecondReDtheta(0),
-   fSecondImDtheta(0),
-   fFirstr0theta(0),
-   fSecondVPt(0),
-   fHistProFlow(0),
-   fHistProFlow2(0),
-   fHistProWr(0),
-   fHistProWrCorr(0),
-   fHistFlow(0),
-   fHistDeltaPhi(0),
-   fHistDeltaPhi2(0),
-   fHistDeltaPhihere(0),
-   fHistPhiEP(0),
-   fHistPhiEPhere(0),
-   fHistPhiLYZ(0),
-   fHistPhiLYZ2(0),
-   fHistProR0theta(0),
-   fHistProReDtheta(0),
-   fHistProImDtheta(0),
-   fCommonHists(0),
-   fCommonHistsRes(0),
-   fEventNumber(0),
-//   fQX(0),
-//   fQY(0),
-   fQ2sum(0),
-   fQtheta(0),
-//   fEvent(0x0),
-   fTrack(NULL),
-   fLYZEP(NULL)
+  fOutFile(0), 
+  fFirstRunFile(0),
+  fSecondRunFile(0),
+  fFirstRunFileName(0),
+  fSecondRunFileName(0),
+  fOutFileName(0),
+  fSecondReDtheta(0),
+  fSecondImDtheta(0),
+  fFirstr0theta(0),
+  fSecondVPt(0),
+  fHistProFlow(0),
+  fHistProFlow2(0),
+  fHistProWr(0),
+  fHistProWrCorr(0),
+  fHistFlow(0),
+  fHistDeltaPhi(0),
+  fHistDeltaPhi2(0),
+  fHistDeltaPhihere(0),
+  fHistPhiEP(0),
+  fHistPhiEPhere(0),
+  fHistPhiLYZ(0),
+  fHistPhiLYZ2(0),
+  fHistProR0theta(0),
+  fHistProReDtheta(0),
+  fHistProImDtheta(0),
+  fCommonHists(0),
+  fCommonHistsRes(0),
+  fEventNumber(0),
+  fQ(NULL),
+  fQsum(NULL),
+  fQ2sum(0),
+  fQtheta(0),
+  fTrack(NULL),
+  fLYZEP(NULL)
 {
 
   // Constructor.
-  fQ.Set(0.,0.);           // flow vector
-  fQsum.Set(0.,0.);        // flow vector sum
+  //  fQ.Set(0.,0.);           // flow vector
+  //  fQsum.Set(0.,0.);        // flow vector sum
+  fQ = new AliFlowVector();           // flow vector
+  fQsum = new TVector2();        // flow vector sum
   fLYZEP = new AliFlowLYZEventPlane();
 }
 
@@ -103,6 +104,8 @@ ClassImp(AliFlowAnalysisWithLYZEventPlane)
  AliFlowAnalysisWithLYZEventPlane::~AliFlowAnalysisWithLYZEventPlane() 
  {
    //destructor
+   delete fQ;
+   delete fQsum;
    delete fLYZEP;
  }
  
@@ -196,24 +199,24 @@ void AliFlowAnalysisWithLYZEventPlane::Make(AliFlowEventSimple* anEvent, AliFlow
     fCommonHists->FillControlHistograms(anEvent);
 
     //get the Q vector from the FlowEvent
-    fQ = anEvent->GetQ(); 
+    *fQ = anEvent->GetQ(); 
     //Weight with the multiplicity
     Double_t fQX = 0.;
     Double_t fQY = 0.;
-    if (fQ.GetMult()!=0.) {
-      fQX = fQ.X()/fQ.GetMult();
-      fQY = fQ.Y()/fQ.GetMult();
-    } else {cerr<<"fQ.GetMult() is zero!"<<endl; }
-    fQ.Set(fQX,fQY);
-    //cout<<"fQ.Mod() = " << fQ.Mod() << endl;
+    if (fQ->GetMult()!=0.) {
+      fQX = fQ->X()/fQ->GetMult();
+      fQY = fQ->Y()/fQ->GetMult();
+    } else {cerr<<"fQ->GetMult() is zero!"<<endl; }
+    fQ->Set(fQX,fQY);
+    //cout<<"fQ->Mod() = " << fQ->Mod() << endl;
     //for chi calculation:
-    fQsum += fQ;
+    *fQsum += *fQ;
     //cout<<"fQsum.Mod() = "<<fQsum.Mod()<<endl;
-    fQ2sum += fQ.Mod2();
+    fQ2sum += fQ->Mod2();
     cout<<"fQ2sum = "<<fQ2sum<<endl;
 
     //call AliFlowLYZEventPlane::CalculateRPandW() here!
-    fLYZEP->CalculateRPandW(fQ);
+    fLYZEP->CalculateRPandW(*fQ);
 
     Double_t fWR = fLYZEP->GetWR();     
     Double_t fRP = fLYZEP->GetPsi();
@@ -222,7 +225,7 @@ void AliFlowAnalysisWithLYZEventPlane::Make(AliFlowEventSimple* anEvent, AliFlow
     fHistPhiLYZ->Fill(fRP);   
     
     //plot difference between event plane from EP-method and LYZ-method
-    Double_t fRPEP = fQ.Phi()/2;                              //gives distribution from (0 to pi)
+    Double_t fRPEP = fQ->Phi()/2;                              //gives distribution from (0 to pi)
     //Float_t fRPEP = 0.5*TMath::ATan2(fQ.Y(),fQ.X());       //gives distribution from (-pi/2 to pi/2)
     //cout<<"fRPEP = "<< fRPEP <<endl;
     fHistPhiEP->Fill(fRPEP);
@@ -240,7 +243,7 @@ void AliFlowAnalysisWithLYZEventPlane::Make(AliFlowEventSimple* anEvent, AliFlow
       fWR = -fWR;
       cerr<<"*** fRP modified ***"<<endl;
     }
-    fHistProWr->Fill(fQ.Mod(),fWR); //corrected weight
+    fHistProWr->Fill(fQ->Mod(),fWR); //corrected weight
        
     //calculate flow
     //loop over the tracks of the event
@@ -292,13 +295,13 @@ void AliFlowAnalysisWithLYZEventPlane::Finish() {
   Double_t  fSigma2 = 0;
   Double_t  fChi= 0;
   if (fEventNumber!=0) {
-    fQsum /= fEventNumber;
+    *fQsum /= fEventNumber;
     //cerr<<"fQsum.X() = "<<fQsum.X()<<endl;
     //cerr<<"fQsum.Y() = "<<fQsum.Y()<<endl;
     fQ2sum /= fEventNumber;
     cerr<<"fEventNumber = "<<fEventNumber<<endl;
     cerr<<"fQ2sum = "<<fQ2sum<<endl;
-    fSigma2 = fQ2sum - TMath::Power(fQsum.X(),2.) - TMath::Power(fQsum.Y(),2.) - TMath::Power(fV,2.);  //BP eq. 62
+    fSigma2 = fQ2sum - TMath::Power(fQsum->X(),2.) - TMath::Power(fQsum->Y(),2.) - TMath::Power(fV,2.);  //BP eq. 62
     if (fSigma2>0) fChi = fV/TMath::Sqrt(fSigma2);
     else fChi = -1.;
     fCommonHistsRes->FillChi(fChi);
index 76aad25352ea09b29c992904bbd99eacb2e2ed97..8f180dfe45dcee3867749f31cb0dccb1f668e794 100644 (file)
@@ -97,8 +97,10 @@ class AliFlowAnalysisWithLYZEventPlane {
 
   Int_t     fEventNumber;  // event counter
 
-  AliFlowVector  fQ;       // flow vector
-  TVector2  fQsum;         // flow vector sum
+  //  AliFlowVector  fQ;       // flow vector
+  //  TVector2  fQsum;         // flow vector sum
+  AliFlowVector  *fQ;       // flow vector
+  TVector2  *fQsum;         // flow vector sum
   Double_t  fQ2sum;        // flow vector sum squared
   Double_t  fQtheta;       // flow vector projected on ref. angle theta
    
index 58d1cf4c858b5be6bf4d96f8007febc8f923bd1b..73b8f66f73246dc0a38dc3f6920eaf9b1c0849d5 100644 (file)
@@ -52,14 +52,15 @@ ClassImp(AliFlowAnalysisWithLeeYangZeros)
   //-----------------------------------------------------------------------
  
   AliFlowAnalysisWithLeeYangZeros::AliFlowAnalysisWithLeeYangZeros():
+    fQ(NULL),
+    fQsum(NULL),
     fQ2sum(0),
     fQtheta(0),
     fEventNumber(0),
     fMult(0),
     fNbins(0),
     fTheta(0),
-    fEvent(0),
-    fTrack(0),
+    fTrack(NULL),
     fFirstRun(kTRUE),
     fUseSum(kTRUE),
     fDoubleLoop(kFALSE),
@@ -93,9 +94,11 @@ ClassImp(AliFlowAnalysisWithLeeYangZeros)
       fHist2[i]=0;
     }
 
-  fQ.Set(0.,0.);
-  fQ.SetMult(0);
-  fQsum.Set(0.,0.);
+  //  fQ.Set(0.,0.);
+  //  fQ.SetMult(0);
+  //  fQsum.Set(0.,0.);
+  fQ = new AliFlowVector();
+  fQsum = new TVector2();
 
 }
 
@@ -106,6 +109,8 @@ ClassImp(AliFlowAnalysisWithLeeYangZeros)
  {
    //default destructor
    if (fDebug) cout<<"****~AliFlowAnalysisWithLeeYangZeros****"<<endl;
+   delete fQ;
+   delete fQsum;
    delete fHistFile;
  }
  
@@ -203,20 +208,20 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Init()
  
  //-----------------------------------------------------------------------
  
-Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent) 
+Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent) 
 {
   //make method
   if (fDebug) cout<<"****AliFlowAnalysisWithLeeYangZeros::Make()****"<<endl;
         
   //get tracks from event
-  if (fEvent) {
+  if (anEvent) {
     if (fFirstRun){
-      fCommonHists->FillControlHistograms(fEvent);
-      FillFromFlowEvent(fEvent);
+      fCommonHists->FillControlHistograms(anEvent);
+      FillFromFlowEvent(anEvent);
     }
     else {
-      fCommonHists->FillControlHistograms(fEvent);
-      SecondFillFromFlowEvent(fEvent);
+      fCommonHists->FillControlHistograms(anEvent);
+      SecondFillFromFlowEvent(anEvent);
     }
   }
  
@@ -278,9 +283,9 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
     Double_t  fSigma2 = 0;
     Double_t  fChi= 0;
     if (fEventNumber!=0) {
-      fQsum /= fEventNumber;
+      *fQsum /= fEventNumber;
       fQ2sum /= fEventNumber;
-      fSigma2 = fQ2sum - TMath::Power(fQsum.X(),2.) - TMath::Power(fQsum.Y(),2.) - TMath::Power(fV,2.);  //BP eq. 62
+      fSigma2 = fQ2sum - TMath::Power(fQsum->X(),2.) - TMath::Power(fQsum->Y(),2.) - TMath::Power(fV,2.);  //BP eq. 62
       if (fSigma2>0) fChi = fV/TMath::Sqrt(fSigma2);
       else fChi = -1.;
       fCommonHistsRes->FillChi(fChi);
@@ -433,12 +438,12 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
     Double_t  fSigma2 = 0;
     Double_t  fChi= 0;
     if (fEventNumber!=0) {
-      fQsum /= fEventNumber;
+      *fQsum /= fEventNumber;
       //cerr<<"fQsum.X() = "<<fQsum.X()<<endl;
       //cerr<<"fQsum.Y() = "<<fQsum.Y()<<endl;
       fQ2sum /= fEventNumber;
       //cout<<"fQ2sum = "<<fQ2sum<<endl;
-      fSigma2 = fQ2sum - TMath::Power(fQsum.X(),2.) - TMath::Power(fQsum.Y(),2.) - TMath::Power(fV,2.);  //BP eq. 62
+      fSigma2 = fQ2sum - TMath::Power(fQsum->X(),2.) - TMath::Power(fQsum->Y(),2.) - TMath::Power(fV,2.);  //BP eq. 62
       if (fSigma2>0) fChi = fV/TMath::Sqrt(fSigma2);
       else fChi = -1.;
       fCommonHistsRes->FillChi(fChi);
@@ -499,13 +504,13 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
 
 //-----------------------------------------------------------------------
  
- Bool_t AliFlowAnalysisWithLeeYangZeros::FillFromFlowEvent(AliFlowEventSimple* fEvent) 
+ Bool_t AliFlowAnalysisWithLeeYangZeros::FillFromFlowEvent(AliFlowEventSimple* anEvent) 
 { 
   // Get event quantities from AliFlowEvent for all particles
 
   if (fDebug) cout<<"****AliFlowAnalysisWithLeeYangZeros::FillFromFlowEvent()****"<<endl;
    
-  if (!fEvent){
+  if (!anEvent){
     cout<<"##### FlowLeeYangZero: FlowEvent pointer null"<<endl;
     return kFALSE;
   }
@@ -520,18 +525,18 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
   Double_t fOrder = 2.;
       
   //get the Q vector 
-  fQ = fEvent->GetQ();
+  *fQ = anEvent->GetQ();
   //weight by the multiplicity
   Double_t fQX = 0;
   Double_t fQY = 0;
-  if (fQ.GetMult() != 0) {
-    fQX = fQ.X()/fQ.GetMult(); 
-    fQY = fQ.Y()/fQ.GetMult();
+  if (fQ->GetMult() != 0) {
+    fQX = fQ->X()/fQ->GetMult(); 
+    fQY = fQ->Y()/fQ->GetMult();
   }
-  fQ.Set(fQX,fQY);
+  fQ->Set(fQX,fQY);
   //for chi calculation:
-  fQsum += fQ;
-  fQ2sum += fQ.Mod2();
+  *fQsum += *fQ;
+  fQ2sum += fQ->Mod2();
   //cerr<<"fQ2sum = "<<fQ2sum<<endl;
 
   for (Int_t theta=0;theta<fNtheta;theta++)
@@ -539,7 +544,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
       fTheta = ((double)theta/fNtheta)*TMath::Pi()/fOrder; 
          
       //calculate fQtheta = cos(fOrder*(fPhi-fTheta);the projection of the Q vector on the reference direction fTheta
-      fQtheta = GetQtheta(fQ, fTheta);
+      fQtheta = GetQtheta(*fQ, fTheta);
                   
       for (Int_t bin=1;bin<=fNbins;bin++)
        {
@@ -554,7 +559,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
          else
            {
              //calculate the product generating function
-             fGtheta = GetGrtheta(fEvent, fR, fTheta);  //make this function
+             fGtheta = GetGrtheta(anEvent, fR, fTheta);  //make this function
              if (fGtheta.Rho2() > 100.) break;
            }
 
@@ -570,13 +575,13 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
 }
 
  //-----------------------------------------------------------------------   
- Bool_t AliFlowAnalysisWithLeeYangZeros::SecondFillFromFlowEvent(AliFlowEventSimple* fEvent) 
+ Bool_t AliFlowAnalysisWithLeeYangZeros::SecondFillFromFlowEvent(AliFlowEventSimple* anEvent) 
 { 
   //for differential flow
 
   if (fDebug) cout<<"****AliFlowAnalysisWithLeeYangZeros::SecondFillFromFlowEvent()****"<<endl;
     
-  if (!fEvent){
+  if (!anEvent){
     cout<<"##### FlowLeeYangZero: FlowEvent pointer null"<<endl;
     return kFALSE;
   }
@@ -594,25 +599,25 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
   fOrder = 2.;
   
   //get the Q vector 
-  fQ = fEvent->GetQ();
+  *fQ = anEvent->GetQ();
   //weight by the multiplicity
   Double_t fQX = 0;
   Double_t fQY = 0;
-  if (fQ.GetMult() != 0) {
-    fQX = fQ.X()/fQ.GetMult(); 
-    fQY = fQ.Y()/fQ.GetMult();
+  if (fQ->GetMult() != 0) {
+    fQX = fQ->X()/fQ->GetMult(); 
+    fQY = fQ->Y()/fQ->GetMult();
   }
-  fQ.Set(fQX,fQY);               
+  fQ->Set(fQX,fQY);               
   //for chi calculation:
-  fQsum += fQ;
-  fQ2sum += fQ.Mod2();
+  *fQsum += *fQ;
+  fQ2sum += fQ->Mod2();
 
   for (Int_t theta=0;theta<fNtheta;theta++)
     {
       fTheta = ((double)theta/fNtheta)*TMath::Pi()/fOrder;   
 
       //calculate fQtheta = cos(fOrder*(fPhi-fTheta);the projection of the Q vector on the reference direction fTheta    
-      fQtheta = GetQtheta(fQ, fTheta);
+      fQtheta = GetQtheta(*fQ, fTheta);
       //cerr<<"fQtheta for fdenom = "<<fQtheta<<endl;
         
       //denominator for differential v
@@ -629,9 +634,9 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
          fExpo(0.,fR0*fQtheta);
          fDenom = fQtheta*(TComplex::Exp(fExpo)); //BP eq 12
          //loop over tracks in event
-         Int_t fNumberOfTracks = fEvent->NumberOfTracks();
+         Int_t fNumberOfTracks = anEvent->NumberOfTracks();
          for (Int_t i=0;i<fNumberOfTracks;i++)  {
-           fTrack = fEvent->GetTrack(i);
+           fTrack = anEvent->GetTrack(i);
            if (fTrack) {
              if (fTrack->UseForDifferentialFlow()) {
                fEta = fTrack->Eta();
@@ -656,7 +661,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
        } //sum
       else                                                        //product generating function
        {
-         fDenom = GetDiffFlow(fEvent, fR0, theta); 
+         fDenom = GetDiffFlow(anEvent, fR0, theta); 
                   
        }//product
       if (fHistProReDenom && fHistProImDenom) {
@@ -674,7 +679,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
   
 }
  //-----------------------------------------------------------------------   
- Double_t AliFlowAnalysisWithLeeYangZeros::GetQtheta(TVector2 fQ, Double_t fTheta) 
+ Double_t AliFlowAnalysisWithLeeYangZeros::GetQtheta(AliFlowVector myQ, Double_t fTheta) 
 {
   //calculate Qtheta. Qtheta is the sum over all particles of cos(fOrder*(fPhi-fTheta)) BP eq. 3
   if (fDebug) cout<<"****AliFlowAnalysisWithLeeYangZeros::GetQtheta()****"<<endl;
@@ -682,7 +687,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
   Double_t fQtheta = 0.;
   Double_t fOrder = 2.;
   
-  fQtheta = fQ.X()*cos(fOrder*fTheta)+fQ.Y()*sin(fOrder*fTheta);
+  fQtheta = myQ.X()*cos(fOrder*fTheta)+myQ.Y()*sin(fOrder*fTheta);
 
   return fQtheta;
  
@@ -690,7 +695,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* fEvent)
  
 
 //-----------------------------------------------------------------------   
-TComplex AliFlowAnalysisWithLeeYangZeros::GetGrtheta(AliFlowEventSimple* fEvent, Double_t fR, Double_t fTheta) 
+TComplex AliFlowAnalysisWithLeeYangZeros::GetGrtheta(AliFlowEventSimple* anEvent, Double_t fR, Double_t fTheta) 
 {
   // Product Generating Function for LeeYangZeros method
   // PG Eq. 3 (J. Phys. G Nucl. Part. Phys 30 S1213 (2004))
@@ -702,11 +707,11 @@ TComplex AliFlowAnalysisWithLeeYangZeros::GetGrtheta(AliFlowEventSimple* fEvent,
   Double_t fOrder =  2.;
   Double_t fWgt = 1.;
   
-  Int_t fNumberOfTracks = fEvent->NumberOfTracks();
+  Int_t fNumberOfTracks = anEvent->NumberOfTracks();
   
   for (Int_t i=0;i<fNumberOfTracks;i++) //loop over tracks in event
     {
-      fTrack = fEvent->GetTrack(i) ; 
+      fTrack = anEvent->GetTrack(i) ; 
       if (fTrack){
        if (fTrack->UseForIntegratedFlow()) {
          Double_t fPhi = fTrack->Phi();
@@ -724,7 +729,7 @@ TComplex AliFlowAnalysisWithLeeYangZeros::GetGrtheta(AliFlowEventSimple* fEvent,
 
 
 //-----------------------------------------------------------------------   
-TComplex AliFlowAnalysisWithLeeYangZeros::GetDiffFlow(AliFlowEventSimple* fEvent, Double_t fR0, Int_t theta) 
+TComplex AliFlowAnalysisWithLeeYangZeros::GetDiffFlow(AliFlowEventSimple* anEvent, Double_t fR0, Int_t theta) 
 {
   // Sum for the denominator for diff. flow for the Product Generating Function for LeeYangZeros method
   // PG Eq. 9 (J. Phys. G Nucl. Part. Phys 30 S1213 (2004))
@@ -738,14 +743,14 @@ TComplex AliFlowAnalysisWithLeeYangZeros::GetDiffFlow(AliFlowEventSimple* fEvent
   Double_t fOrder =  2.;
   Double_t fWgt = 1.;
   
-  Int_t fNumberOfTracks = fEvent->NumberOfTracks();
+  Int_t fNumberOfTracks = anEvent->NumberOfTracks();
   
   Int_t fNtheta = AliFlowLYZConstants::kTheta;
   Double_t fTheta = ((double)theta/fNtheta)*TMath::Pi()/fOrder;
   
   for (Int_t i=0;i<fNumberOfTracks;i++) //loop over tracks in event
     {
-      fTrack = fEvent->GetTrack(i) ;  
+      fTrack = anEvent->GetTrack(i) ;  
       if (fTrack){
        if (fTrack->UseForDifferentialFlow()) {
          Double_t fPhi = fTrack->Phi();
@@ -765,7 +770,7 @@ TComplex AliFlowAnalysisWithLeeYangZeros::GetDiffFlow(AliFlowEventSimple* fEvent
   
   for (Int_t i=0;i<fNumberOfTracks;i++) 
     {
-      fTrack = fEvent->GetTrack(i) ;  
+      fTrack = anEvent->GetTrack(i) ;  
       if (fTrack){
        if (fTrack->UseForDifferentialFlow()) {
          Double_t fEta = fTrack->Eta();
index e6f6a296d5b4ef9bc4762f7eda6420ec685f4da3..c5d2f11a4365451aa80b79a04294a424d740a222 100644 (file)
@@ -40,10 +40,10 @@ class AliFlowAnalysisWithLeeYangZeros {
    virtual  ~AliFlowAnalysisWithLeeYangZeros();                                   //destructor
  
    Bool_t    Init();                             //defines variables and histograms
-   Bool_t    Make(AliFlowEventSimple* fEvent);    //calculates variables and fills histograms
+   Bool_t    Make(AliFlowEventSimple* anEvent);    //calculates variables and fills histograms
    Bool_t    Finish();                           //saves histograms
 
-   Double_t  GetQtheta(TVector2 fQ, Double_t fTheta);
+   Double_t  GetQtheta(AliFlowVector myQ, Double_t fTheta);
 
    void      SetFirstRun(Bool_t kt)              { this->fFirstRun = kt ; }
    Bool_t    GetFirstRun() const                 { return this->fFirstRun ; }
@@ -70,19 +70,21 @@ class AliFlowAnalysisWithLeeYangZeros {
   AliFlowAnalysisWithLeeYangZeros(const AliFlowAnalysisWithLeeYangZeros& aAnalysis);
    AliFlowAnalysisWithLeeYangZeros& operator=(const AliFlowAnalysisWithLeeYangZeros& aAnalysis);
 
-   Bool_t   MakeControlHistograms(AliFlowEventSimple* fEvent); 
-   Bool_t   FillFromFlowEvent(AliFlowEventSimple* fEvent);
-   Bool_t   SecondFillFromFlowEvent(AliFlowEventSimple* fEvent);
+   Bool_t   MakeControlHistograms(AliFlowEventSimple* anEvent); 
+   Bool_t   FillFromFlowEvent(AliFlowEventSimple* anEvent);
+   Bool_t   SecondFillFromFlowEvent(AliFlowEventSimple* anEvent);
 
-   TComplex GetGrtheta(AliFlowEventSimple* fEvent, Double_t fR, Double_t fTheta);
-   TComplex GetDiffFlow(AliFlowEventSimple* fEvent, Double_t fR, Int_t theta); 
+   TComplex GetGrtheta(AliFlowEventSimple* anEvent, Double_t fR, Double_t fTheta);
+   TComplex GetDiffFlow(AliFlowEventSimple* anEvent, Double_t fR, Int_t theta); 
    Double_t  GetR0(TH1D* fHistGtheta);
 
   
    
 #ifndef __CINT__
-   AliFlowVector  fQ;       // flow vector
-   TVector2  fQsum;         // flow vector sum
+   //   AliFlowVector  fQ;       // flow vector
+   //   TVector2  fQsum;         // flow vector sum
+   AliFlowVector*  fQ;       // flow vector
+   TVector2*  fQsum;         // flow vector sum
    Double_t  fQ2sum;        // flow vector sum squared
    Double_t  fQtheta;       // flow vector projected on ref. angle theta
    
@@ -93,7 +95,6 @@ class AliFlowAnalysisWithLeeYangZeros {
    Int_t     fNbins;        // number of bins
    Double_t  fTheta;        // ref. angle theta
    
-   AliFlowEventSimple*  fEvent ;     //!
    AliFlowTrackSimple*   fTrack ;      //!
   
    Bool_t       fFirstRun ;         //! flag for lyz analysis: true=first run over data, false=second run 
index db101186879ecdaed553ac5b0933327b18c3d87b..2e11ba546457d040c754356dc388705fc3bab067 100644 (file)
@@ -42,6 +42,8 @@ ClassImp(AliFlowAnalysisWithMCEventPlane)
   //-----------------------------------------------------------------------
  
  AliFlowAnalysisWithMCEventPlane::AliFlowAnalysisWithMCEventPlane():
+   fQ(NULL),
+   fQsum(NULL),
    fQ2sum(0),
    fEventNumber(0),
    fMult(0),
@@ -58,8 +60,11 @@ ClassImp(AliFlowAnalysisWithMCEventPlane)
 {
 
   // Constructor.
-  fQ.Set(0.,0.);           // flow vector
-  fQsum.Set(0.,0.);        // flow vector sum
+  //  fQ.Set(0.,0.);           // flow vector
+  //  fQsum.Set(0.,0.);        // flow vector sum
+
+  fQ = new AliFlowVector;           // flow vector
+  fQsum = new TVector2;        // flow vector sum
 }
 
  
@@ -69,7 +74,8 @@ ClassImp(AliFlowAnalysisWithMCEventPlane)
  AliFlowAnalysisWithMCEventPlane::~AliFlowAnalysisWithMCEventPlane() 
  {
    //destructor
-   
+   delete fQ;
+   delete fQsum;
  }
  
 
@@ -113,12 +119,12 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent, Double_t
     fCommonHists->FillControlHistograms(anEvent);
 
     //get the Q vector from the FlowEvent
-    fQ = anEvent->GetQ(); 
+    *fQ = anEvent->GetQ(); 
     //cout<<"fQ.Mod() = " << fQ.Mod() << endl;
     //for chi calculation:
-    fQsum += fQ;
+    *fQsum += *fQ;
     //cout<<"fQsum.Mod() = "<<fQsum.Mod()<<endl;
-    fQ2sum += fQ.Mod2();
+    fQ2sum += fQ->Mod2();
     cout<<"fQ2sum = "<<fQ2sum<<endl;
         
     fHistRP->Fill(fRP);   
index 9410f1896abf39a8047a34f90b323181de920191..ea98a104c91f41ccbf88af5d9e6ad68ad17e2c70 100644 (file)
@@ -60,8 +60,10 @@ class AliFlowAnalysisWithMCEventPlane {
 
       
 #ifndef __CINT__
-   AliFlowVector  fQ;       // flow vector
-   TVector2  fQsum;         // flow vector sum
+   //   AliFlowVector  fQ;       // flow vector
+   //   TVector2  fQsum;         // flow vector sum
+   AliFlowVector*  fQ;       // flow vector
+   TVector2*  fQsum;         // flow vector sum
    Double_t  fQ2sum;        // flow vector sum squared
 #endif /*__CINT__*/
 
index c7c68bab18dd573b815268424bae9d6ee3bc841b..8c0e0317acf64fabc17e9ab3df6d7922439d78f8 100644 (file)
@@ -43,18 +43,22 @@ ClassImp(AliFlowAnalysisWithScalarProduct)
   //-----------------------------------------------------------------------
  
  AliFlowAnalysisWithScalarProduct::AliFlowAnalysisWithScalarProduct():
-   fEventNumber(0),
-   fTrack(NULL),
-   fDebug(kFALSE),
-   fHistFileName(0),
-   fHistFile(NULL),
-   fHistProUQ(NULL),
-   fCommonHists(NULL)
+  fQ(NULL),
+  fU(NULL),
+  fEventNumber(0),
+  fTrack(NULL),
+  fDebug(kFALSE),
+  fHistFileName(0),
+  fHistFile(NULL),
+  fHistProUQ(NULL),
+  fCommonHists(NULL)
 {
 
   // Constructor.
-  fQ.Set(0.,0.);           // flow vector
-  fU.Set(0.,0.);           // particle unit vector
+  fU = new TVector2;
+  fQ = new AliFlowVector;
+  //  fQ.Set(0.,0.);           // flow vector
+  //  fU.Set(0.,0.);           // particle unit vector
 
 }
  //-----------------------------------------------------------------------
@@ -62,6 +66,8 @@ ClassImp(AliFlowAnalysisWithScalarProduct)
 
  AliFlowAnalysisWithScalarProduct::~AliFlowAnalysisWithScalarProduct() 
  {
+   delete fU;
+   delete fQ;
    //destructor
    
  }
@@ -102,7 +108,7 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) {
     fCommonHists->FillControlHistograms(anEvent);
          
     //get the Q vector from the FlowEvent
-    fQ = anEvent->GetQ();
+    *fQ = anEvent->GetQ();
     //Double_t fMult =  fQ.GetMult();
             
     //loop over the tracks of the event
@@ -118,12 +124,15 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) {
          //calculate fU
          Double_t fUX = TMath::Cos(2*fPhi);
          Double_t fUY = TMath::Sin(2*fPhi);
-         fU.Set(fUX,fUY);
-         Double_t fModulus = fU.Mod();
-         if (fModulus!=0.) fU.Set(fUX/fModulus,fUY/fModulus);  // make length 1
+         //      fU.Set(fUX,fUY);
+         fU->Set(fUX,fUY);
+         //      Double_t fModulus = fU.Mod();
+         Double_t fModulus = fU->Mod();
+         //      if (fModulus!=0.) fU.Set(fUX/fModulus,fUY/fModulus);  // make length 1
+         if (fModulus!=0.) fU->Set(fUX/fModulus,fUY/fModulus);  // make length 1
          else cerr<<"fModulus is zero!"<<endl;
 
-         TVector2 fQm = fQ;
+         TVector2 fQm = *fQ;
          //subtrackt particle from the flowvector if used to define it
          if (fTrack->UseForIntegratedFlow()) {
            Double_t fQmX = fQm.X() - fUX;
@@ -132,7 +141,8 @@ void AliFlowAnalysisWithScalarProduct::Make(AliFlowEventSimple* anEvent) {
          }
 
          //Double_t fUQ = scalar product of fU and fQm
-         Double_t fUQ = fU*fQm;
+         //      Double_t fUQ = fU*fQm;
+         Double_t fUQ = *fU * fQm;
          Double_t fPt = fTrack->Pt();
          //fill the profile histogram
          fHistProUQ->Fill(fPt,fUQ); 
index a884ef7dfbe655454023ef6f2d3076130d05ca50..3b36bea18ff1be21646559a94a61754931a0b8ee 100644 (file)
@@ -52,25 +52,27 @@ class AliFlowAnalysisWithScalarProduct {
   AliFlowAnalysisWithScalarProduct(const AliFlowAnalysisWithScalarProduct& aAnalysis);
   AliFlowAnalysisWithScalarProduct& operator=(const AliFlowAnalysisWithScalarProduct& aAnalysis); 
    
-   AliFlowVector  fQ;       // flow vector
-   TVector2  fU;            // particle unit vector
+  //  AliFlowVector  fQ;       // flow vector
+  //   TVector2  fU;            // particle unit vector
+  AliFlowVector  *fQ;       // flow vector
+  TVector2  *fU;            // particle unit vector
    
-   Int_t     fEventNumber;  // event counter
+  Int_t     fEventNumber;  // event counter
          
-   AliFlowTrackSimple*   fTrack ;     //!
+  AliFlowTrackSimple*   fTrack ;     //!
      
-   Bool_t       fDebug ;            //! flag for lyz analysis: more print statements
+  Bool_t       fDebug ;            //! flag for lyz analysis: more print statements
 
-   TString      fHistFileName;      //!
-   TFile*       fHistFile;          //!
-      
-   TProfile*      fHistProUQ;              //!
+  TString      fHistFileName;      //!
+  TFile*       fHistFile;          //!
+  
+  TProfile*      fHistProUQ;              //!
 
-   AliFlowCommonHist* fCommonHists;              //!
-   //AliFlowCommonHistResults* fCommonHistsRes;    //!
+  AliFlowCommonHist* fCommonHists;              //!
+  //AliFlowCommonHistResults* fCommonHistsRes;    //!
 
-   ClassDef(AliFlowAnalysisWithScalarProduct,0)  // macro for rootcint
-     };
+  ClassDef(AliFlowAnalysisWithScalarProduct,0)  // macro for rootcint
+    };
  
-     
+
 #endif