cleanup of some cout's
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Feb 2009 13:26:51 +0000 (13:26 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Feb 2009 13:26:51 +0000 (13:26 +0000)
PWG2/FLOW/AliAnalysisTaskLYZEventPlane.cxx
PWG2/FLOW/AliAnalysisTaskLeeYangZeros.cxx
PWG2/FLOW/AliAnalysisTaskMCEventPlane.cxx
PWG2/FLOW/AliAnalysisTaskScalarProduct.cxx
PWG2/FLOW/AliFlowAnalysisWithLeeYangZeros.cxx
PWG2/FLOW/AliFlowEventSimpleMaker.cxx
PWG2/FLOW/macros/runAliAnalysisTaskFlow.C

index 4b28379..130b3c8 100644 (file)
@@ -305,7 +305,7 @@ void AliAnalysisTaskLYZEventPlane::Terminate(Option_t *)
   // Called once at the end of the query
   AliFlowAnalysisWithLYZEventPlane* fLyzTerm = new AliFlowAnalysisWithLYZEventPlane() ;
   fListHistos = (TList*)GetOutputData(0);
-  cout << "histogram list in Terminate" << endl;
+  //cout << "histogram list in Terminate" << endl;
   if (fListHistos) {
     //Get the common histograms from the output list
     AliFlowCommonHist *pCommonHist = dynamic_cast<AliFlowCommonHist*> 
@@ -338,7 +338,7 @@ void AliAnalysisTaskLYZEventPlane::Terminate(Option_t *)
     fListHistos->Print(); 
   } else { cout << "histogram list pointer is empty" << endl;}
 
-  cout<<".....finished"<<endl;  
+  cout<<".....finished LYZ EventPlane"<<endl;  
 }
 
 
index 0f3343a..dce9cc3 100644 (file)
@@ -314,7 +314,7 @@ void AliAnalysisTaskLeeYangZeros::Terminate(Option_t *)
   fLyzTerm -> SetUseSum(GetUseSumLYZ());       //set use sum true or false
    
   fListHistos = (TList*)GetOutputData(0);
-  cout << "histogram list in Terminate" << endl;
+  //cout << "histogram list in Terminate" << endl;
 
   if (fListHistos) {
 
@@ -427,5 +427,5 @@ void AliAnalysisTaskLeeYangZeros::Terminate(Option_t *)
   }    
   else { cout << "histogram list pointer is empty" << endl;}
 
-  cout<<".....finished"<<endl;
+  cout<<".....finished LYZ"<<endl;
 }
index 417eb92..83829b6 100644 (file)
@@ -183,8 +183,8 @@ void AliAnalysisTaskMCEventPlane::CreateOutputObjects()
 
   if (fMc->GetHistList()) {
     //fMc->GetHistList()->Print();
-       fListHistos = fMc->GetHistList();
-       fListHistos->Print();
+    fListHistos = fMc->GetHistList();
+    //fListHistos->Print();
   }
   else {Printf("ERROR: Could not retrieve histogram list"); }
 
@@ -322,7 +322,7 @@ void AliAnalysisTaskMCEventPlane::Terminate(Option_t *)
 
   //Get output data
   fListHistos = (TList*)GetOutputData(0);
-  cout << "histogram list in Terminate" << endl;
+  // cout << "histogram list in Terminate" << endl;
   if (fListHistos) {
     //Get the common histograms from the output list
     AliFlowCommonHist *pCommonHists = dynamic_cast<AliFlowCommonHist*> 
@@ -363,8 +363,8 @@ void AliAnalysisTaskMCEventPlane::Terminate(Option_t *)
     } else {
       cout<<"WARNING: Histograms needed to run Finish() are not accessable!"<<endl;  }
     
-    fListHistos->Print();
+    //fListHistos->Print();
   } else { cout << "histogram list pointer is empty" << endl;}
     
-  cout<<"...finished."<<endl;
+  cout<<"...finished MCEventPlane."<<endl;
 }
index 70e80ba..17d8e57 100644 (file)
@@ -297,7 +297,7 @@ void AliAnalysisTaskScalarProduct::Terminate(Option_t *)
   //  PostData(0,fListHistos);
 
   fListHistos = (TList*)GetOutputData(0);
-  cout << "histgram list in Terminate" << endl;
+  // cout << "histgram list in Terminate" << endl;
   if (fListHistos)  {
     //    fListHistos->Print();
   }    
index 3fab713..a9c667b 100644 (file)
@@ -285,7 +285,9 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)
 {
   //finish method
   if (fDebug) cout<<"****AliFlowAnalysisWithLeeYangZeros::Finish()****"<<endl; 
-  
+
+  cout << endl;
+  cout << "******************************************************" << endl;  
   //define variables for both runs
   Double_t  dJ01 = 2.405; 
   Int_t iNtheta = AliFlowLYZConstants::kTheta;
index 8d062eb..b15b1dc 100644 (file)
@@ -221,8 +221,11 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput)
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
+
+  cout<<" iGoodTracks MC Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+
   return pEvent;
 
 }
@@ -288,8 +291,11 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent-> SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
+
+  cout<<" iGoodTracks MC Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+
   return pEvent;
 
 }
@@ -343,11 +349,12 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput)
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
-  return pEvent;
 
+  cout<<" iGoodTracks ESD Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
 
+  return pEvent;
 }
 
 
@@ -405,11 +412,12 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
-  return pEvent;
 
+  cout<<" iGoodTracks ESD Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
 
+  return pEvent;
 }
 
 //-----------------------------------------------------------------------   
@@ -455,10 +463,12 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput)
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
+
+  cout<<" iGoodTracks AOD Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+
   return pEvent;
-  
 }
 
 
@@ -515,10 +525,12 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  A
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
+
+  cout<<" iGoodTracks AOD Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+
   return pEvent;
-  
 }
 
 //-----------------------------------------------------------------------   
@@ -593,8 +605,11 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
+
+  cout<<" iGoodTracks ESD and MC Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+
   return pEvent;
 
 
@@ -693,14 +708,11 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
-  cout<<" iGoodTracks = "<<iGoodTracks<<endl;
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
-  return pEvent;
-
-}
-
-
 
+  cout<<" iGoodTracks ESD and MC Event = "<<iGoodTracks<<endl;
+  cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
+  cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
 
+  return pEvent;
+}
 
index 8ba23bb..295fbd9 100644 (file)
@@ -1,9 +1,4 @@
-// from CreateESDChain.C - instead of  #include "CreateESDChain.C"
-TChain* CreateESDChain(const char* aDataDir = "ESDfiles.txt", Int_t aRuns = 10, Int_t offset = 0) ;
-TChain* CreateAODChain(const char* aDataDir = "AODfiles.txt", Int_t aRuns = 10, Int_t offset = 0) ;
-void LookupWrite(TChain* chain, const char* target) ;
-
- /////////////////////////////////////////////////////////////////////////////////      
+/////////////////////////////////////////////////////////////////////////////////       
 //      
 // HOW TO USE THIS MACRO:       
 //      
@@ -39,13 +34,13 @@ void LookupWrite(TChain* chain, const char* target) ;
 
 //Flow analysis methods can be: (set to kTRUE or kFALSE)
 Bool_t SP    = kTRUE;
-Bool_t LYZ1  = kFALSE;
+Bool_t LYZ1  = kTRUE;
 Bool_t LYZ2  = kFALSE;
 Bool_t LYZEP = kFALSE;
-Bool_t GFC   = kFALSE;
-Bool_t QC    = kFALSE;
-Bool_t FQD   = kFALSE;
-Bool_t MCEP  = kFALSE;
+Bool_t GFC   = kTRUE;
+Bool_t QC    = kTRUE;
+Bool_t FQD   = kTRUE;
+Bool_t MCEP  = kTRUE;
 
 
 //Type of analysis can be:
@@ -53,13 +48,13 @@ Bool_t MCEP  = kFALSE;
 const TString type = "ESD";
 
 //Bolean to fill/not fill the QA histograms
-Bool_t QA = kTRUE;    
+Bool_t QA = kFALSE;    
 
 //SETTING THE CUTS
 
 //for integrated flow
 const Double_t ptmin1 = 0.0;
-const Double_t ptmax1 = 1000.0;
+const Double_t ptmax1 = 10.0;
 const Double_t ymin1  = -1.;
 const Double_t ymax1  = 1.;
 const Int_t mintrackrefsTPC1 = 2;
@@ -72,7 +67,7 @@ const Int_t maxnsigmatovertex1 = 3;
 
 //for differential flow
 const Double_t ptmin2 = 0.0;
-const Double_t ptmax2 = 1000.0;
+const Double_t ptmax2 = 10.0;
 const Double_t ymin2  = -1.;
 const Double_t ymax2  = 1.;
 const Int_t mintrackrefsTPC2 = 2;
@@ -84,19 +79,17 @@ const Int_t minclustersTPC2 = 50;
 const Int_t maxnsigmatovertex2 = 3;
 
 
-void runAliAnalysisTaskFlow(Int_t nRuns = 10, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
+//void runAliAnalysisTaskFlow(Int_t nRuns = 10, const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0) 
+void runAliAnalysisTaskFlow(Int_t nRuns = -1, const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0) 
 
 {
   TStopwatch timer;
   timer.Start();
   
   if (LYZ1 && LYZ2) {cout<<"WARNING: you cannot run LYZ1 and LYZ2 at the same time! LYZ2 needs the output from LYZ1."<<endl; exit(); }
-  
   if (LYZ2 && LYZEP) {cout<<"WARNING: you cannot run LYZ2 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
-  
   if (LYZ1 && LYZEP) {cout<<"WARNING: you cannot run LYZ1 and LYZEP at the same time! LYZEP needs the output from LYZ2."<<endl; exit(); }
   
-  
   // include path (to find the .h files when compiling)
   gSystem->AddIncludePath("-I$ALICE_ROOT/include") ;
   gSystem->AddIncludePath("-I$ROOTSYS/include") ;
@@ -115,10 +108,10 @@ void runAliAnalysisTaskFlow(Int_t nRuns = 10, const Char_t* dataDir="/data/alice
   cerr<<"libPWG2flow.so loaded..."<<endl;
 
   // create the TChain. CreateESDChain() is defined in CreateESDChain.C
-  if (type!="AOD") { TChain* chain = CreateESDChain(dataDir, nRuns, offset);
-  cout<<"chain ("<<chain<<")"<<endl; }
-  else { TChain* chain = CreateAODChain(dataDir, nRuns, offset);
-  cout<<"chain ("<<chain<<")"<<endl; }
+  if (type!="AOD") { TChain* chain = CreateESDChain(dataDir, nRuns, offset);}
+  //  cout<<"chain ("<<chain<<")"<<endl; }
+  else { TChain* chain = CreateAODChain(dataDir, nRuns, offset);}
+  //  cout<<"chain ("<<chain<<")"<<endl; }
  
   //____________________________________________//
   //Create cuts using correction framework
@@ -892,7 +885,7 @@ TChain* CreateESDChain(const char* aDataDir, Int_t aRuns, Int_t offset)
          presentDirName += "/";
          presentDirName += presentDir->GetName();        
          chain->Add(presentDirName + "/AliESDs.root/esdTree");
-         cerr<<presentDirName<<endl;
+         //  cerr<<presentDirName<<endl;
        }
       
     }
@@ -982,7 +975,7 @@ TChain* CreateAODChain(const char* aDataDir, Int_t aRuns, Int_t offset)
          presentDirName += "/";
          presentDirName += presentDir->GetName();        
          chain->Add(presentDirName + "/AliAOD.root/aodTree");
-         cerr<<presentDirName<<endl;
+         // cerr<<presentDirName<<endl;
        }
       
     }
@@ -1019,25 +1012,3 @@ TChain* CreateAODChain(const char* aDataDir, Int_t aRuns, Int_t offset)
   return chain;
 }
 
-
-
-void LookupWrite(TChain* chain, const char* target)
-{
-  // looks up the chain and writes the remaining files to the text file target
-  
-  chain->Lookup();
-  
-  TObjArray* list = chain->GetListOfFiles();
-  TIterator* iter = list->MakeIterator();
-  TObject* obj = 0;
-  
-  ofstream outfile;
-  outfile.open(target);
-  
-  while ((obj = iter->Next()))
-    outfile << obj->GetTitle() << "#AliESDs.root" << endl;
-  
-  outfile.close();
-  
-  delete iter;
-}