Cleaning up the number of couts
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 13:00:42 +0000 (13:00 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2009 13:00:42 +0000 (13:00 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithLeeYangZeros.cxx
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.h
PWG2/FLOW/macros/runFlowAnalysis.C

index fec555c..697f6b9 100644 (file)
@@ -290,7 +290,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)
     cout<<"##### FlowLeeYangZero: Stack pointer null"<<endl;
     return kFALSE;
   }
-  cout<<"^^^^read event "<<fEventNumber<<endl;
+  //  cout<<"^^^^read event "<<fEventNumber<<endl;
   fEventNumber++;
   
      
@@ -757,7 +757,7 @@ Bool_t AliFlowAnalysisWithLeeYangZeros::Make(AliFlowEventSimple* anEvent)
 
   } //secondrun
    
-  cout<<"----LYZ analysis finished....----"<<endl<<endl;
+  //cout<<"----LYZ analysis finished....----"<<endl<<endl;
 
   return kTRUE;
 }
index fb6c2bc..d03e7e9 100644 (file)
@@ -41,7 +41,8 @@
 ClassImp(AliFlowEventSimpleMaker)
 //----------------------------------------------------------------------- 
 AliFlowEventSimpleMaker::AliFlowEventSimpleMaker() :
-   fMCReactionPlaneAngle(0.)
+  fMCReactionPlaneAngle(0.),
+  fCount(0)
 {
   //constructor
 }
@@ -82,12 +83,11 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowT
   Int_t iPIDDiff       = diffCuts->GetPID();
   
   Int_t iNumberOfInputTracks = anInput->GetEntries() ;
-  //cerr<<"iNumberOfInputTracks = "<<iNumberOfInputTracks<<endl;
+
   TParticle* pParticle = new TParticle();
   anInput->SetBranchAddress("Particles",&pParticle);  
   //  AliFlowEventSimple* pEvent = new AliFlowEventSimple(iNumberOfInputTracks);
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
-  //cerr<<pEvent<<" pEvent "<<endl;
   
   Int_t iN = iNumberOfInputTracks; // additional variable to artificially fix the number of tracks
   //  Int_t iN = 576; //multiplicity for chi=1.5
@@ -145,14 +145,15 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(TTree* anInput, AliFlowT
   
   pEvent->SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);//tracks used either for int. or for diff. flow
-
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
+
   if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
   else cout<<" MC Reaction Plane Angle = unknown "<< endl;
 
   cout<<" iGoodTracks = "<< iGoodTracks << endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
   delete pParticle;
   return pEvent;
@@ -164,7 +165,6 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput)
   //Fills the event from the MC kinematic information
   
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
  
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
     
@@ -236,8 +236,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput)
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
 
 }
@@ -249,7 +249,7 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali
   //Fills the event from the MC kinematic information
   
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
+
   if (iNumberOfInputTracks==-1) {
     cout<<"Skipping Event -- No MC information available for this event"<<endl;
     return 0;
@@ -311,8 +311,8 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliMCEvent* anInput, Ali
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
 
 }
@@ -324,7 +324,6 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput)
   //Fills the event from the ESD
   
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
   
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
     
@@ -374,11 +373,9 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput)
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
-
-
 }
 
 
@@ -388,7 +385,6 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
   //Fills the event from the ESD
   
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
   
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
     
@@ -444,11 +440,9 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
-
-
 }
 
 //-----------------------------------------------------------------------   
@@ -457,7 +451,6 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput)
   //Fills the event from the AOD
   
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
   
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
     
@@ -502,10 +495,9 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput)
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
-  
 }
 
 
@@ -515,7 +507,6 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  A
   //Fills the event from the AOD
   
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
   
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
   
@@ -570,10 +561,9 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliAODEvent* anInput,  A
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
-  
 }
 
 //-----------------------------------------------------------------------   
@@ -587,7 +577,6 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   }
 
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
   
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
     
@@ -656,11 +645,9 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
-
-
 }
 
 //-----------------------------------------------------------------------   
@@ -675,9 +662,8 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   }
 
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
-  cerr<<"anInput->GetNumberOfTracks() = "<<iNumberOfInputTracks<<endl;
+
   Int_t iNumberOfInputTracksMC = anInputMc->GetNumberOfTracks() ;
-  cerr<<"anInputMc->GetNumberOfTracks() = "<<iNumberOfInputTracksMC<<endl;
   if (iNumberOfInputTracksMC==-1) {
     cout<<"Skipping Event -- No MC information available for this event"<<endl;
     return 0;
@@ -757,6 +743,8 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   pEvent-> SetEventNSelTracksIntFlow(iSelParticlesInt);  
   pEvent->SetNumberOfTracks(iGoodTracks);
 
+  cout << " Number of MC input tracks = " << iNumberOfInputTracksMC << endl;
+
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
   if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
   else cout<<" MC Reaction Plane Angle = unknown "<< endl;
@@ -764,14 +752,8 @@ AliFlowEventSimple*  AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, A
   cout<<" iGoodTracks = "<<iGoodTracks<<endl;
   cout<<" # of selected tracks for int. flow  = "<<iSelParticlesInt<<endl;
   cout<<" # of selected tracks for diff. flow = "<<iSelParticlesDiff<<endl;  
+  cout << "# " << ++fCount << " events processed" << endl;
 
-  //cout << "  iSelectedTracksInt = " << iSelParticlesInt << endl;  
   return pEvent;
-
 }
 
-
-
-
-
index 8013af3..e35e043 100644 (file)
@@ -48,6 +48,7 @@ class AliFlowEventSimpleMaker {
   AliFlowEventSimpleMaker(const AliFlowEventSimpleMaker& anAnalysis);            //copy constructor
   AliFlowEventSimpleMaker& operator=(const AliFlowEventSimpleMaker& anAnalysis); //assignment operator
   Double_t  fMCReactionPlaneAngle;   // the angle of the reaction plane from the MC truth
+  Int_t     fCount;   // counter for the number of events processed
        
   ClassDef(AliFlowEventSimpleMaker,0)    // macro for rootcint
 };
index 4fe0c3e..a933296 100644 (file)
@@ -52,7 +52,7 @@ enum anaModes {mLocal,mLocalSource,mLocalPAR,};
 
 Int_t offset = 0;
                                           
-int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 1000, const char* 
+int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char* 
                    //                    dir="/data/alice1/kolk/KineOnly3/")
                    dir="/Users/snelling/alice_data/KineOnly3/")
 {
@@ -328,9 +328,8 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 1000, const char*
              if(LYZEP) lyzep->Make(fEvent,ep);
              if(SP) sp->Make(fEvent);
              //-----------------------------------------------------------
-             
              fCount++;
-             cout << "# " << fCount << " events processed" << endl;
+             //cout << "# " << fCount << " events processed" << endl;
              delete kTree;
              delete fEvent;
            }