rule checker simple fixes and cosmetics
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 19 Feb 2012 10:22:08 +0000 (10:22 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 19 Feb 2012 10:22:08 +0000 (10:22 +0000)
14 files changed:
PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrBaseClass.cxx
PWG/CaloTrackCorrBase/AliAnaCaloTrackCorrBaseClass.h
PWG/CaloTrackCorrBase/AliAnaScale.cxx
PWG/CaloTrackCorrBase/AliAnaScale.h
PWG/CaloTrackCorrBase/AliAnalysisTaskCaloTrackCorrelationM.h
PWG/CaloTrackCorrBase/AliAnalysisTaskCounter.cxx
PWG/CaloTrackCorrBase/AliCaloTrackAODReader.cxx
PWG/CaloTrackCorrBase/AliCaloTrackAODReader.h
PWG/CaloTrackCorrBase/AliCaloTrackESDReader.cxx
PWG/CaloTrackCorrBase/AliCaloTrackESDReader.h
PWG/CaloTrackCorrBase/AliCaloTrackMCReader.cxx
PWG/CaloTrackCorrBase/AliCaloTrackMCReader.h
PWG/CaloTrackCorrBase/AliCaloTrackReader.cxx
PWG/CaloTrackCorrBase/AliCaloTrackReader.h

index 68429e6..b33345c 100755 (executable)
@@ -76,12 +76,12 @@ AliAnaCaloTrackCorrBaseClass::~AliAnaCaloTrackCorrBaseClass()
   //delete fCaloUtils ; //Already deleted in maker
   //delete fReader ;    //Already deleted in maker
        
-  delete fCaloPID ; fCaloPID = 0;
-  delete fFidCut ;  fFidCut  = 0;
-  delete fIC ;      fIC      = 0;
-  delete fMCUtils ; fMCUtils = 0;
-  delete fNMS ;     fNMS     = 0;
-  delete fHisto;    fHisto   = 0;
+  delete fCaloPID ; 
+  delete fFidCut  ;  
+  delete fIC      ;      
+  delete fMCUtils ; 
+  delete fNMS     ;     
+  delete fHisto   ;    
 }
 
 //______________________________________________________________________
index 1c99af1..2368790 100755 (executable)
 #include <cstdlib>
 
 //ROOT
-class TClonesArray ;
-class TObjArray ;
 #include <TList.h> 
 #include <TObject.h>
+class TClonesArray ;
+class TObjArray ;
 class TObjString;
 
 //Analysis
-class AliVCaloCells;
 #include "AliCaloTrackReader.h"   
 #include "AliCaloPID.h"
 #include "AliFiducialCut.h"
@@ -30,15 +29,16 @@ class AliVCaloCells;
 #include "AliNeutralMesonSelection.h"
 #include "AliCalorimeterUtils.h" 
 #include "AliHistogramRanges.h"
+#include "AliAODPWG4ParticleCorrelation.h"
+#include "AliMixedEvent.h" 
+class AliVCaloCells;
 class AliStack ; 
 class AliHeader ; 
 class AliGenEventHeader ; 
-#include "AliAODPWG4ParticleCorrelation.h"
 class AliEMCALGeometry;
 class AliPHOSGeoUtils;
-#include "AliMixedEvent.h" 
-#include "AliCentrality.h"
-#include "AliEventplane.h"
+class AliCentrality;
+class AliEventplane;
 
 class AliAnaCaloTrackCorrBaseClass : public TObject {
        
index 6dd1ab7..efa46e1 100755 (executable)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id: */
-
 //_________________________________________________________________________
-// A basic analysis task to analyse photon detected by PHOS
+// A basic analysis task to scale histograms to a given cross section
 //
 //*-- Yves Schutz 
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +22,6 @@
 //Root system
 #include <TH1.h>
 #include <TH1F.h>
-//#include "Riostream.h"
 
 //Analysis system
 #include "AliAnaScale.h" 
@@ -131,10 +128,3 @@ void AliAnaScale::Init()
 
 }
 
-//______________________________________________________________________________
-//void AliAnaScale::Terminate(Option_t *)
-//{
-//  // Processing when the event loop is ended
-//  
-//
-//}
index bbbd0d7..2a8c28b 100755 (executable)
@@ -2,6 +2,7 @@
 #define ALIANASCALE_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
+
 //______________________________________________________________________________
 // An post event loop analysis task that scales the input histograms 
 //
@@ -21,19 +22,17 @@ public:
   virtual void ConnectInputData(Option_t * = "");
   virtual void CreateOutputObjects(); 
   virtual void Init() ;        
-  virtual void LocalInit() { Init() ; }
+  virtual void LocalInit()                { Init()         ; }
   virtual void Exec(Option_t * opt = "") ;
-  void Set(const Double_t val) { fScale = val ; }
-  void SetDebugLevel(Int_t level) { fDebug = level ; }
-//  virtual void Terminate(Option_t * opt = "") ;
+  void         Set(const Double_t val)    { fScale = val   ; }
+  void         SetDebugLevel(Int_t level) { fDebug = level ; }
 
-  void MakeSumw2(Bool_t sum) {fSumw2 = sum;}
+  void         MakeSumw2(Bool_t sum)      { fSumw2 = sum   ; }
 
 private:
-  AliAnaScale(const AliAnaScale&); // Not implemented
+  AliAnaScale(           const AliAnaScale&); // Not implemented
   AliAnaScale& operator=(const AliAnaScale&); // Not implemented
 
-
   // input and output
   Int_t     fDebug ;         // Debug flag
   // task parameters
@@ -42,9 +41,10 @@ private:
   // Histograms
   TList   * fInputList ;  //! input data list
   TList   * fOutputList ; //! output data list
-  Bool_t fSumw2; //compute sum of squares of weights for bin content error calculation
-  TH1F * fhCount; //! counter histogram for file merging
+  Bool_t    fSumw2;       //  compute sum of squares of weights for bin content error calculation
+  TH1F *    fhCount;      //! counter histogram for file merging
 
   ClassDef(AliAnaScale, 2); // a post event loop scaling 
 };
+
 #endif // ALIANASCALE_H
index f0ea651..27dc623 100755 (executable)
@@ -26,6 +26,7 @@ class AliMCEvent;
 class AliAnalysisTaskCaloTrackCorrelationM : public AliAnalysisTaskME
 {
  public:
+  
   AliAnalysisTaskCaloTrackCorrelationM();
   AliAnalysisTaskCaloTrackCorrelationM(const char* name);
   virtual ~AliAnalysisTaskCaloTrackCorrelationM() ; // virtual dtor
@@ -42,9 +43,10 @@ class AliAnalysisTaskCaloTrackCorrelationM : public AliAnalysisTaskME
        
   void         SetAnalysisMaker(AliAnaCaloTrackCorrMaker * const maker) { fAna = maker ; } 
   AliMixedEvent * InputEvent()                    { return fInputEvent ; }
-  AliMCEvent*  MCEvent()                          { return NULL        ; } // do something about MC event 
+  AliMCEvent*  MCEvent()                    const { return NULL        ; } // do something about MC event 
 
  private:
+  
   AliAnalysisTaskCaloTrackCorrelationM(           const AliAnalysisTaskCaloTrackCorrelationM&); // Not implemented
   AliAnalysisTaskCaloTrackCorrelationM& operator=(const AliAnalysisTaskCaloTrackCorrelationM&); // Not implemented
   
@@ -52,8 +54,7 @@ class AliAnalysisTaskCaloTrackCorrelationM : public AliAnalysisTaskME
   TList * fOutputContainer ;       //! Histogram container
   TString fConfigName ;            //  Configuration file name
   TList * fCuts ;                  //! List with analysis cuts
-  
-  AliMixedEvent * fInputEvent;
+  AliMixedEvent * fInputEvent;     //  Mixed event access pointer
        
   ClassDef(AliAnalysisTaskCaloTrackCorrelationM, 3); // Analysis task for standard gamma correlation analysis
 };
index 537ac29..620468f 100644 (file)
@@ -12,7 +12,6 @@
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/* $Id: $ */
 
 //_________________________________________________________________________
 // Count events with different selections
@@ -52,7 +51,7 @@
 #include "AliAnalysisTaskCounter.h"
 ClassImp(AliAnalysisTaskCounter)
 
-//________________________________________________________________________
+//______________________________________________________________
 AliAnalysisTaskCounter::AliAnalysisTaskCounter(const char *name) 
 : AliAnalysisTaskSE(name), 
   fAcceptFastCluster(kTRUE),
@@ -70,7 +69,7 @@ AliAnalysisTaskCounter::AliAnalysisTaskCounter(const char *name)
   DefineOutput(1, TList::Class());
 }
 
-//________________________________________________________________________
+//______________________________________________
 AliAnalysisTaskCounter::AliAnalysisTaskCounter() 
   : AliAnalysisTaskSE("DefaultAnalysis_AliAnalysisTaskCounter"),
     fAcceptFastCluster(kTRUE),
@@ -103,7 +102,7 @@ AliAnalysisTaskCounter::~AliAnalysisTaskCounter()
 }
 
 
-//-------------------------------------------------------------------
+//____________________________________________________
 void AliAnalysisTaskCounter::UserCreateOutputObjects()
 {
   // Init histograms
@@ -169,7 +168,7 @@ void AliAnalysisTaskCounter::UserCreateOutputObjects()
   
 }
 
-//________________________________________________________________________
+//_______________________________________________
 void AliAnalysisTaskCounter::UserExec(Option_t *) 
 {
   // Main loop
@@ -180,7 +179,8 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
   fhNEvents->Fill(0.5);  
   
   AliVEvent * event = InputEvent();
-  if (!event) {
+  if (!event) 
+  {
     printf("AliAnalysisTaskCounter::UserExec() - ERROR: event not available \n");
     return;
   }
@@ -192,7 +192,8 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
   if(esdevent) triggerclasses = esdevent->GetFiredTriggerClasses();
   if(aodevent) triggerclasses = aodevent->GetFiredTriggerClasses();
 
-  if (triggerclasses.Contains("FAST") && !triggerclasses.Contains("ALL") && !fAcceptFastCluster) {
+  if (triggerclasses.Contains("FAST") && !triggerclasses.Contains("ALL") && !fAcceptFastCluster) 
+  {
     //printf("Do not count events from fast cluster, trigger name %s\n",triggerclasses.Data());
     return;
   }
@@ -216,7 +217,8 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
   fhYVertex->Fill(v[1]);
   fhZVertex->Fill(v[2]);
   
-  if(TMath::Abs(v[2]) < fZVertexCut) {
+  if(TMath::Abs(v[2]) < fZVertexCut) 
+  {
     bSelectVZ=kTRUE;
     fhNEvents->Fill(2.5);  
   }
@@ -226,8 +228,10 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
   //--------------------------------------------------
   //Tweak for calorimeter only productions
   //--------------------------------------------------
-  if(fCaloFilterPatch && !esdevent){ 
-    if(event->GetNumberOfCaloClusters() > 0) {
+  if(fCaloFilterPatch && !esdevent)
+  { 
+    if(event->GetNumberOfCaloClusters() > 0) 
+    {
       AliVCluster * calo = event->GetCaloCluster(0);
       if(calo->GetNLabels() == 4){
         Int_t * selection = calo->GetLabels();
@@ -239,11 +243,15 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
         //printf(" pu %d, gv %d, v0 %d, track mult %d\n ", selection[0], selection[1], selection[2], selection[3]);
         if(trackMult > 0 )  
           bSelectTrack = kFALSE;
-      } else {
+      } 
+      else 
+      {
         //First filtered AODs, track multiplicity stored there.  
         trackMult = (Int_t) ((AliAODHeader*)fInputEvent->GetHeader())->GetCentrality();
       }
-    }else{//at least one cluster
+    }
+    else
+    {   //at least one cluster
         //printf("AliAnalysisTaskCounter::UserExec() - No clusters in event\n");
         //Remove events with  vertex (0,0,0), bad vertex reconstruction
         if(TMath::Abs(v[0]) < 1.e-6 && TMath::Abs(v[1]) < 1.e-6 && TMath::Abs(v[2]) < 1.e-6) bGoodV = kFALSE;
@@ -252,12 +260,14 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
         trackMult = (Int_t) ((AliAODHeader*)fInputEvent->GetHeader())->GetCentrality();
     }
   }
-  else {
+  else 
+  {
     //--------------------------------------------------
     //Count tracks, cut on number of tracks in eta < 0.8
     //--------------------------------------------------
     Int_t nTracks   = event->GetNumberOfTracks() ;
-    for (Int_t itrack =  0; itrack <  nTracks; itrack++) {////////////// track loop
+    for (Int_t itrack =  0; itrack <  nTracks; itrack++) 
+    {////////////// track loop
       AliVTrack * track = (AliVTrack*)event->GetTrack(itrack) ; // retrieve track from esd
       
       //Only for ESDs
@@ -299,7 +309,9 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
   if(!fCaloFilterPatch)
     bPileup = event->IsPileupFromSPD(3, 0.8, 3., 2., 5.); //Default values, if not it does not compile
   //bPileup = event->IsPileupFromSPD(); 
-  if (!bPileup){
+  
+  if (!bPileup)
+  {
                 fhNEvents->Fill(9.5);
     if(bV0AND)  fhNEvents->Fill(16.5);
   }
@@ -332,7 +344,8 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
   {
     AliVCluster *clus = InputEvent()->GetCaloCluster(i);
     if(clus->IsEMCAL()){    
-      if ((clus->E() > 500 && clus->GetNCells() > 200 ) || clus->GetNCells() > 200)  {
+      if ((clus->E() > 500 && clus->GetNCells() > 200 ) || clus->GetNCells() > 200)  
+      {
         
         //printf("Counter: Reject event with cluster: E %f, ncells %d\n",clus->E(),clus->GetNCells());
         
@@ -345,11 +358,13 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
   }
   
   //LHC11a, 3 last runs, cut with this
-  if(!bEMCALRejected){
+  if(!bEMCALRejected)
+  {
     // Count number of cells in SM3 with energy larger than 0.1, cut on this number
     Int_t ncellsSM3 = 0;
     Int_t ncellsSM4 = 0;
-    for(Int_t icell = 0; icell < event->GetEMCALCells()->GetNumberOfCells(); icell++){
+    for(Int_t icell = 0; icell < event->GetEMCALCells()->GetNumberOfCells(); icell++)
+    {
       if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==3) ncellsSM3++;
       if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==4) ncellsSM4++;
     }
@@ -357,8 +372,8 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
     Int_t ncellcut = 21;
     if(triggerclasses.Contains("EMC")) ncellcut = 35;
     
-    if( ncellsSM3 >= ncellcut || ncellsSM4 >= 100 ){
-      
+    if( ncellsSM3 >= ncellcut || ncellsSM4 >= 100 )
+    {
       //printf("Counter: reject event with ncells in SM3: ncells %d\n",ncells);
 
                        fhNEvents->Fill(19.5); 
@@ -371,30 +386,36 @@ void AliAnalysisTaskCounter::UserExec(Option_t *)
 
 }
 
-//____________________________________________________________________________
-Bool_t AliAnalysisTaskCounter::CheckForPrimaryVertex(){
+//____________________________________________________
+Bool_t AliAnalysisTaskCounter::CheckForPrimaryVertex()
+{
   //Check if the vertex was well reconstructed, copy from V0Reader of conversion group
   //It only works for ESDs
   
   AliESDEvent * event = dynamic_cast<AliESDEvent*> (InputEvent());
   if(!event) return 0;
   
-  if(event->GetPrimaryVertexTracks()->GetNContributors() > 0) {
+  if(event->GetPrimaryVertexTracks()->GetNContributors() > 0) 
+  {
     return 1;
   }
   
-  if(event->GetPrimaryVertexTracks()->GetNContributors() < 1) {
+  if(event->GetPrimaryVertexTracks()->GetNContributors() < 1) 
+  {
     // SPD vertex
-    if(event->GetPrimaryVertexSPD()->GetNContributors() > 0) {
+    if(event->GetPrimaryVertexSPD()->GetNContributors() > 0) 
+    {
       //cout<<"spd vertex type::"<< fESDEvent->GetPrimaryVertex()->GetName() << endl;
       return 1;
       
     }
-    if(event->GetPrimaryVertexSPD()->GetNContributors() < 1) {
+    if(event->GetPrimaryVertexSPD()->GetNContributors() < 1) 
+    {
       //      cout<<"bad vertex type::"<< fESDEvent->GetPrimaryVertex()->GetName() << endl;
       return 0;
     }
   }
+  
   return 0;
   //return fInputEvent->GetPrimaryVertex()->GetNContributors()>0;
 }
index 99af691..a8b2044 100755 (executable)
@@ -13,7 +13,6 @@
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/* $Id: $ */
 
 //_________________________________________________________________________
 // Class for reading data (AODs) in order to do prompt gamma
@@ -48,7 +47,6 @@ AliCaloTrackAODReader::AliCaloTrackAODReader() :
  
 }
 
-
 //_________________________________________________________
 AliCentrality* AliCaloTrackAODReader::GetCentrality() const 
 {
@@ -56,16 +54,19 @@ AliCentrality* AliCaloTrackAODReader::GetCentrality() const
   AliAODEvent* event    = dynamic_cast<AliAODEvent*> (fInputEvent);
   AliAODEvent* orgevent = dynamic_cast<AliAODEvent*> (fOrgInputEvent);
   
-  if(event && !fSelectEmbeddedClusters) {
+  if(event && !fSelectEmbeddedClusters) 
+  {
     //Normal AOD event
     return event->GetHeader()->GetCentralityP() ;
   }
-  else if(fSelectEmbeddedClusters && orgevent) {
+  else if(fSelectEmbeddedClusters && orgevent) 
+  {
     // centrality in AOD from input, not in embedded event
     // temporary fix until this object is copied to the output event in embedding analysis
     return orgevent->GetHeader()->GetCentralityP();
   }
-  else {
+  else 
+  {
     return 0x0 ; 
   }
 }
@@ -82,46 +83,58 @@ void AliCaloTrackAODReader::SetInputOutputMCEvent(AliVEvent* input,
   
   Bool_t tesd = kFALSE ; 
   Bool_t taod = kTRUE ; 
-  if ( strcmp(input->GetName(), "AliMixedEvent") == 0 ) {
+  if ( strcmp(input->GetName(), "AliMixedEvent") == 0 ) 
+  {
     AliMultiEventInputHandler* multiEH = dynamic_cast<AliMultiEventInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
     if(multiEH){
-      if (multiEH->GetFormat() == 0 ) {
+      if (multiEH->GetFormat() == 0 ) 
+      {
         tesd = kTRUE ; 
-      } else if (multiEH->GetFormat() == 1) {
+      } else if (multiEH->GetFormat() == 1) 
+      {
         taod = kTRUE ; 
       }
     }
-    else{
+    else
+    {
       printf("AliCaloTrackAODReader::SetInputOutputMCEvent() - MultiEventHandler is NULL");
       abort();
     }
   }
-  if (strcmp(input->GetName(),"AliESDEvent") == 0) {
+  if        (strcmp(input->GetName(),"AliESDEvent") == 0) 
+  {
     tesd = kTRUE ; 
-  } else if (strcmp(input->GetName(),"AliAODEvent") == 0) {
+  } else if (strcmp(input->GetName(),"AliAODEvent") == 0) 
+  {
     taod = kTRUE ; 
   }
   
   
-  if(tesd)   {
+  if(tesd)   
+  {
     SetInputEvent(aod);
     SetOutputEvent(aod);
     fOrgInputEvent = input;
   }
-  else if(taod){
+  else if(taod)
+  {
     AliAODInputHandler* aodIH = dynamic_cast<AliAODInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
-         if (aodIH && aodIH->GetMergeEvents()) {
+    
+         if (aodIH && aodIH->GetMergeEvents()) 
+    {
                  //Merged events, use output AOD.
                  SetInputEvent(aod);
                  SetOutputEvent(aod);
       fOrgInputEvent = input;
          }
-         else{
+         else
+    {
                  SetInputEvent(input);
                  SetOutputEvent(aod);
          }
   }
-  else{ 
+  else
+  { 
     AliFatal(Form("AliCaloTrackAODReader::SetInputOutputMCEvent() - STOP : Wrong data format: %s\n",input->GetName()));
   }
   
index d11db5d..c392d71 100755 (executable)
@@ -2,7 +2,6 @@
 #define ALICALOTRACKAODREADER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
-/* $Id: $ */
 
 //_________________________________________________________________________
 // Class for reading data (AODs) in order to do prompt gamma or other particle
@@ -13,8 +12,6 @@
 //
 // -- Author: Gustavo Conesa (INFN-LNF)
 
-#include "AliAnalysisTaskSE.h"
-
 class AliAODEvent;
 
 #include "AliCaloTrackReader.h" 
@@ -23,10 +20,12 @@ class AliCaloTrackAODReader : public AliCaloTrackReader {
        
 public: 
        
-  AliCaloTrackAODReader() ; // ctor
-  virtual ~AliCaloTrackAODReader() {;} //virtual dtor
+  AliCaloTrackAODReader() ;            // ctor
+  
+  virtual ~AliCaloTrackAODReader() {;} // virtual dtor
      
   AliCentrality* GetCentrality() const ;  
+  
   void SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ; 
   
   AliVEvent* GetOriginalInputEvent() const { return fOrgInputEvent; }
@@ -35,10 +34,11 @@ private:
   
   AliVEvent *fOrgInputEvent; //! Original input event, not from filtering
   
-  AliCaloTrackAODReader(const AliCaloTrackAODReader & ) ; // cpy ctor
-  AliCaloTrackAODReader & operator = (const AliCaloTrackAODReader & g) ;//cpy assignment
+  AliCaloTrackAODReader(              const AliCaloTrackAODReader & r) ; // cpy ctor
+  AliCaloTrackAODReader & operator = (const AliCaloTrackAODReader & r) ; // cpy assignment
   
   ClassDef(AliCaloTrackAODReader,6)
+  
 } ;
 
 #endif //ALICALOTRACKAODREADER_H
index 3fcdf76..3b681fb 100755 (executable)
@@ -13,7 +13,6 @@
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/* $Id:  $ */
 
 //_________________________________________________________________________
 // Class for reading data (ESDs) in order to do prompt gamma 
@@ -58,23 +57,29 @@ void AliCaloTrackESDReader::SetInputOutputMCEvent(AliVEvent* esd,
   
   Bool_t tesd = kFALSE ; 
   
-  if ( strcmp(esd->GetName(), "AliMixedEvent") == 0 ) {
+  if ( strcmp(esd->GetName(), "AliMixedEvent") == 0 ) 
+  {
     AliMultiEventInputHandler* multiEH = dynamic_cast<AliMultiEventInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
-    if(multiEH){
-      if (multiEH->GetFormat() == 0 ) {
+    if(multiEH)
+    {
+      if (multiEH->GetFormat() == 0 ) 
+      {
         tesd = kTRUE ; 
       }
     }
-    else{
+    else
+    {
       printf("AliCaloTrackESDReader::SetInputOutputMCEvent() - MultiEventHandler is NULL");
       abort();
     }
   }
-  if (strcmp(esd->GetName(),"AliESDEvent") == 0) {
+  if (strcmp(esd->GetName(),"AliESDEvent") == 0)
+  {
     tesd = kTRUE ; 
   }
   
-  if(!tesd){
+  if(!tesd)
+  {
     AliFatal(Form("AliCaloTrackESDReader::SetInputOutputMCEvent() - STOP ::Wrong reader, here only ESDs. Input name: %s != AliESDEvent \n",esd->GetName()));
   }
   
index 45d6d81..e3b847d 100755 (executable)
@@ -2,7 +2,6 @@
 #define ALICALOTRACKESDREADER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
-/* $Id:  $ */
 
 //_________________________________________________________________________
 // Class for reading data (ESDs) in order to do prompt gamma 
@@ -21,12 +20,14 @@ class AliCaloTrackESDReader : public AliCaloTrackReader {
   
   public: 
   
-  AliCaloTrackESDReader() ; // ctor
-  virtual ~AliCaloTrackESDReader() {;} //virtual dtor
+  AliCaloTrackESDReader() ;            // ctor
+  
+  virtual ~AliCaloTrackESDReader() {;} // virtual dtor
 
   void SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ; 
            
   ClassDef(AliCaloTrackESDReader,1)
+  
 } ;
 
 
index fc65ff8..d2c6bf4 100755 (executable)
@@ -12,7 +12,6 @@
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/* $Id:  $ */
 
 //_________________________________________________________________________
 // Class for reading data (Kinematics) in order to do prompt gamma 
@@ -33,7 +32,6 @@
 #include <TRandom.h>
 #include <TArrayI.h>
 #include "TParticle.h"
-//#include "Riostream.h"
 
 //---- ANALYSIS system ----
 #include "AliCaloTrackMCReader.h" 
 #include "AliFiducialCut.h"
 #include "AliMCAnalysisUtils.h"
 
-  ClassImp(AliCaloTrackMCReader)
+ClassImp(AliCaloTrackMCReader)
 
-//____________________________________________________________________________
+//____________________________________________
 AliCaloTrackMCReader::AliCaloTrackMCReader() : 
-  AliCaloTrackReader(), fDecayPi0(0), 
-  fNeutralParticlesArray(0x0), fChargedParticlesArray(0x0), 
-  fStatusArray(0x0), fKeepAllStatus(0), fCheckOverlap(0),  
-  fEMCALOverlapAngle(0),fPHOSOverlapAngle(0), fIndex2ndPhoton(0),
-  fOnlyGeneratorParticles(kTRUE)
+AliCaloTrackReader(),        fDecayPi0(0), 
+fNeutralParticlesArray(0x0), fChargedParticlesArray(0x0), 
+fStatusArray(0x0),           fKeepAllStatus(0), 
+fCheckOverlap(0),            fEMCALOverlapAngle(0),fPHOSOverlapAngle(0), 
+fIndex2ndPhoton(0),          fOnlyGeneratorParticles(kTRUE)
 {
   //Ctor
   
   //Initialize parameters
   InitParameters();
 }
-//_________________________________
-AliCaloTrackMCReader::~AliCaloTrackMCReader() {
+//___________________________________________
+AliCaloTrackMCReader::~AliCaloTrackMCReader()
+{
   //Dtor
-
+  
   if(fChargedParticlesArray) delete fChargedParticlesArray ;
   if(fNeutralParticlesArray) delete fNeutralParticlesArray ;
   if(fStatusArray)           delete fStatusArray ;
-
+  
 }
 
-//____________________________________________________________________________
-void AliCaloTrackMCReader::GetVertex(Double_t  v[3]) const {
+//________________________________________________________
+void AliCaloTrackMCReader::GetVertex(Double_t  v[3]) const 
+{
   //Return vertex position
-
+  
   TArrayF pv;
   GetGenEventHeader()->PrimaryVertex(pv);
   v[0]=pv.At(0);
   v[1]=pv.At(1);
   v[2]=pv.At(2);
-
+  
 }
 
-//_______________________________________________________________
+//_________________________________________
 void AliCaloTrackMCReader::InitParameters()
 {
   
   //Initialize the parameters of the analysis.
-
+  
   fDecayPi0 = kFALSE;
-
+  
   fChargedParticlesArray = new TArrayI(1);
   fChargedParticlesArray->SetAt(11,0);  
   //Int_t pdgarray[]={12,14,16};// skip neutrinos
@@ -101,7 +101,7 @@ void AliCaloTrackMCReader::InitParameters()
   
   fOnlyGeneratorParticles = kTRUE;
   fKeepAllStatus          = kTRUE;
-
+  
   fCheckOverlap       = kFALSE;
   fEMCALOverlapAngle  = 2.5 * TMath::DegToRad();
   fPHOSOverlapAngle   = 0.5 * TMath::DegToRad();
@@ -118,55 +118,67 @@ void AliCaloTrackMCReader::InitParameters()
   
 }
 
-//____________________________________________________________________________
-void  AliCaloTrackMCReader::CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg) {
+//_________________________________________________________________________________
+void  AliCaloTrackMCReader::CheckOverlap(const Float_t anglethres, const Int_t imom, 
+                                         Int_t & iPrimary, Int_t & index, TLorentzVector & mom, 
+                                         Int_t & pdg) 
+{
   //Check overlap of decay photons
-  if( fIndex2ndPhoton==iPrimary ){
+  if( fIndex2ndPhoton==iPrimary )
+  {
     fIndex2ndPhoton=-1;
     return;
   }
-  else fIndex2ndPhoton=-1;
+  else 
+    fIndex2ndPhoton=-1;
   
-
   if(pdg!=22) return;
   
   TLorentzVector ph1, ph2;
   TParticle *meson = GetStack()->Particle(imom);
   Int_t mepdg = meson->GetPdgCode();
   Int_t idaug1 = meson->GetFirstDaughter();
-  if((mepdg == 111 || mepdg == 221 ) && meson->GetNDaughters() == 2){ //Check only decay in 2 photons
+  if((mepdg == 111 || mepdg == 221 ) && meson->GetNDaughters() == 2)
+  { //Check only decay in 2 photons
     TParticle * d1 = GetStack()->Particle(idaug1);
     TParticle  *d2 = GetStack()->Particle(idaug1+1);
-    if(d1->GetPdgCode() == 22 && d2->GetPdgCode() == 22 ){
+    if(d1->GetPdgCode() == 22 && d2->GetPdgCode() == 22 )
+    {
       d1->Momentum(ph1);
       d2->Momentum(ph2);
       //printf("angle %2.2f\n",ph1.Angle(ph2.Vect()));
       
-      if(anglethres >  ph1.Angle(ph2.Vect())){           
-       //Keep the meson
-       pdg=mepdg;
-       index=imom;
-       meson->Momentum(mom);
-       //printf("Overlap:: pt %2.2f, phi %2.2f, eta %2.2f\n",mom.Pt(),mom.Phi(),mom.Eta());
-       if(iPrimary == idaug1) iPrimary++; //skip next photon in list
+      if(anglethres >  ph1.Angle(ph2.Vect()))
+      {          
+        //Keep the meson
+        pdg=mepdg;
+        index=imom;
+        meson->Momentum(mom);
+        //printf("Overlap:: pt %2.2f, phi %2.2f, eta %2.2f\n",mom.Pt(),mom.Phi(),mom.Eta());
+        if(iPrimary == idaug1) iPrimary++; //skip next photon in list
       }
-      else{
-       //Do not check overlapping for next decay photon from same meson
-       if(iPrimary == idaug1) {fIndex2ndPhoton = idaug1+1;
-       }
-
+      else
+      {
+        //Do not check overlapping for next decay photon from same meson
+        if(iPrimary == idaug1) {fIndex2ndPhoton = idaug1+1;
+        }
+        
       }
     }
   }//Meson Decay with 2 photon daughters
 }
 
-//____________________________________________________________________________
-void  AliCaloTrackMCReader::FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector &momentum) {
+//____________________________________________________________________
+void  AliCaloTrackMCReader::FillCalorimeters(Int_t & iParticle, 
+                                             TParticle* particle, 
+                                             TLorentzVector &momentum)
+{
   //Fill AODCaloClusters or TParticles lists of PHOS or EMCAL
   //In PHOS
-  if(fFillPHOS && momentum.Pt() > fPHOSPtMin){
-         
-       if(fCheckFidCut && !fFiducialCut->IsInFiducialCut(momentum,"PHOS")) return;
+  
+  if(fFillPHOS && momentum.Pt() > fPHOSPtMin)
+  {
+    if(fCheckFidCut && !fFiducialCut->IsInFiducialCut(momentum,"PHOS")) return;
          
     Int_t index = iParticle ;
     Int_t pdg = TMath::Abs(particle->GetPdgCode());
@@ -182,14 +194,15 @@ void  AliCaloTrackMCReader::FillCalorimeters(Int_t & iParticle, TParticle* parti
     SetCaloClusterPID(pdg,calo) ;
     if(fDebug > 3 && momentum.Pt() > 0.2)
       printf("AliCaloTrackMCReader::FillCalorimeters() - PHOS : Selected cluster %s E %3.2f, pt %3.2f, phi %3.2f, eta %3.2f\n",
-            particle->GetName(),momentum.E(),momentum.Pt(),momentum.Phi()*TMath::RadToDeg(),momentum.Eta());                   
+             particle->GetName(),momentum.E(),momentum.Pt(),momentum.Phi()*TMath::RadToDeg(),momentum.Eta());                  
     fPHOSClusters->Add(calo);//reference the selected object to the list
   }
   
   //In EMCAL
-  if(fFillEMCAL  && momentum.Pt() > fEMCALPtMin){
+  if(fFillEMCAL  && momentum.Pt() > fEMCALPtMin)
+  {
          
-       if(fCheckFidCut && !fFiducialCut->IsInFiducialCut(momentum,"EMCAL")) return;
+    if(fCheckFidCut && !fFiducialCut->IsInFiducialCut(momentum,"EMCAL")) return;
          
     Int_t index = iParticle ;
     Int_t pdg = TMath::Abs(particle->GetPdgCode());
@@ -206,20 +219,24 @@ void  AliCaloTrackMCReader::FillCalorimeters(Int_t & iParticle, TParticle* parti
     SetCaloClusterPID(pdg,calo) ;
     if(fDebug > 3 && momentum.Pt() > 0.2)
       printf("AliCaloTrackMCReader::FillCalorimeters() - EMCAL : Selected cluster %s E %3.2f, pt %3.2f, phi %3.2f, eta %3.2f\n",
-            particle->GetName(),momentum.E(),momentum.Pt(),momentum.Phi()*TMath::RadToDeg(),momentum.Eta());   
+             particle->GetName(),momentum.E(),momentum.Pt(),momentum.Phi()*TMath::RadToDeg(),momentum.Eta());  
     fEMCALClusters->Add(calo);//reference the selected object to the list
   }
 }
 
-//____________________________________________________________________________
-Bool_t AliCaloTrackMCReader::FillInputEvent(const Int_t iEntry, const char * /*currentFileName*/){
+//___________________________________________________________________________
+Bool_t AliCaloTrackMCReader::FillInputEvent(const Int_t iEntry, 
+                                            const char * /*currentFileName*/)
+{
   //Fill the event counter and input lists that are needed, called by the analysis maker.
   
   fEventNumber     = iEntry;
   //fCurrentFileName = TString(currentFileName);
   fTrackMult       = 0;
+  
   //In case of analysis of events with jets, skip those with jet pt > 5 pt hard        
-  if(fComparePtHardAndJetPt && GetStack()) {
+  if(fComparePtHardAndJetPt && GetStack()) 
+  {
     if(!ComparePtHardAndJetPt()) return kFALSE ;
   }
        
@@ -229,8 +246,11 @@ Bool_t AliCaloTrackMCReader::FillInputEvent(const Int_t iEntry, const char * /*c
   Int_t iParticle  = 0 ;
   Double_t charge  = 0.;
   Int_t nparticles = GetStack()->GetNtrack() ;
+  
   if(fOnlyGeneratorParticles) nparticles=GetStack()->GetNprimary();
-  for (iParticle = 0 ; iParticle <  nparticles ; iParticle++) {
+  
+  for (iParticle = 0 ; iParticle <  nparticles ; iParticle++) 
+  {
     TParticle * particle = GetStack()->Particle(iParticle);
     TLorentzVector momentum;
     Float_t p[3];
@@ -238,16 +258,16 @@ Bool_t AliCaloTrackMCReader::FillInputEvent(const Int_t iEntry, const char * /*c
     Int_t pdg = particle->GetPdgCode();                                                
     
     //Keep particles with a given status 
-    if(KeepParticleWithStatus(particle->GetStatusCode()) && (particle->Pt() > 0) ){
-      
+    if(KeepParticleWithStatus(particle->GetStatusCode()) && (particle->Pt() > 0) )
+    {
       //Skip bizarre particles, they crash when charge is calculated
       //       if(TMath::Abs(pdg) == 3124 || TMath::Abs(pdg) > 10000000) continue ;
       
       charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
       particle->Momentum(momentum);
       //---------- Charged particles ----------------------
-      if(charge != 0){
-        
+      if(charge != 0)
+      {
         if(TMath::Abs(momentum.Eta())< fTrackMultEtaCut) fTrackMult++;
         
         if(fFillCTS && (momentum.Pt() > fCTSPtMin)){
@@ -280,18 +300,23 @@ Bool_t AliCaloTrackMCReader::FillInputEvent(const Int_t iEntry, const char * /*c
       }//Charged
       
       //-------------Neutral particles ----------------------
-      else if(charge == 0 && (fFillPHOS || fFillEMCAL)){
+      else if(charge == 0 && (fFillPHOS || fFillEMCAL))
+      {
         //Skip neutrinos or other neutral particles
         //if(SkipNeutralParticles(pdg) || particle->IsPrimary()) continue ; // protection added (MG)
         if(SkipNeutralParticles(pdg)) continue ;
         //Fill particle/calocluster arrays
-        if(!fDecayPi0) {
+        if(!fDecayPi0) 
+        {
           FillCalorimeters(iParticle, particle, momentum);
         }
-        else {
+        else 
+        {
           //Sometimes pi0 are stable for the generator, if needed decay it by hand
-          if(pdg == 111 ){
-            if(momentum.Pt() >  fPHOSPtMin || momentum.Pt() >  fEMCALPtMin){
+          if(pdg == 111 )
+          {
+            if(momentum.Pt() >  fPHOSPtMin || momentum.Pt() >  fEMCALPtMin)
+            {
               TLorentzVector lvGamma1, lvGamma2 ;
               //Double_t angle = 0;
               
@@ -320,26 +345,28 @@ Bool_t AliCaloTrackMCReader::FillInputEvent(const Int_t iEntry, const char * /*c
   
 }
 
-//________________________________________________________________
-Bool_t AliCaloTrackMCReader::KeepParticleWithStatus(Int_t status) const {
+//_____________________________________________________________________
+Bool_t AliCaloTrackMCReader::KeepParticleWithStatus(Int_t status) const 
+{
   //Check if status is equal to one of the  list
   //These particles will be used in analysis.
-  if(!fKeepAllStatus){
+  if(!fKeepAllStatus)
+  {
     for(Int_t i= 0; i < fStatusArray->GetSize(); i++)
       if(status ==  fStatusArray->At(i)) return kTRUE ;
-
-    return kFALSE; 
     
+    return kFALSE; 
   }
   else
     return kTRUE ;  
 }
 
 //________________________________________________________________
-Bool_t AliCaloTrackMCReader::KeepChargedParticles(Int_t pdg) const {
+Bool_t AliCaloTrackMCReader::KeepChargedParticles(Int_t pdg) const 
+{
   //Check if pdg is equal to one of the charged particles list
   //These particles will be added to the calorimeters lists.
-
+  
   for(Int_t i= 0; i < fChargedParticlesArray->GetSize(); i++)
     if(TMath::Abs(pdg) ==  fChargedParticlesArray->At(i)) return kTRUE ;
   
@@ -347,7 +374,7 @@ Bool_t AliCaloTrackMCReader::KeepChargedParticles(Int_t pdg) const {
   
 }
 
-//________________________________________________________________
+//__________________________________________________________
 void AliCaloTrackMCReader::Print(const Option_t * opt) const
 {
   //Print some relevant parameters set for the analysis
@@ -376,10 +403,10 @@ void AliCaloTrackMCReader::Print(const Option_t * opt) const
   for(Int_t i= 0; i < fChargedParticlesArray->GetSize(); i++)
     printf(" %d ; ", fChargedParticlesArray->At(i));
   printf("\n");
-
+  
 }
 
-//____________________________________________________________________________
+//________________________________________________________________
 void AliCaloTrackMCReader::MakePi0Decay(const TLorentzVector p0, 
                                         TLorentzVector &p1, 
                                         TLorentzVector &p2) const 
@@ -424,8 +451,11 @@ void AliCaloTrackMCReader::MakePi0Decay(const TLorentzVector p0,
   //cout<<angle<<endl;
 }
 
-//____________________________________________________________________________
-void AliCaloTrackMCReader::SetInputOutputMCEvent(AliVEvent* /*esd*/, AliAODEvent* aod, AliMCEvent* mc) {
+//__________________________________________________________________
+void AliCaloTrackMCReader::SetInputOutputMCEvent(AliVEvent* /*esd*/, 
+                                                 AliAODEvent* aod, 
+                                                 AliMCEvent* mc) 
+{
   // Connect the data pointer
   SetMC(mc);
   SetOutputEvent(aod);
@@ -433,10 +463,11 @@ void AliCaloTrackMCReader::SetInputOutputMCEvent(AliVEvent* /*esd*/, AliAODEvent
 
 
 //________________________________________________________________
-Bool_t AliCaloTrackMCReader::SkipNeutralParticles(Int_t pdg) const {
+Bool_t AliCaloTrackMCReader::SkipNeutralParticles(Int_t pdg) const 
+{
   //Check if pdg is equal to one of the neutral particles list
   //These particles will be skipped from analysis.
-
+  
   for(Int_t i= 0; i < fNeutralParticlesArray->GetSize(); i++)
     if(TMath::Abs(pdg) ==  fNeutralParticlesArray->At(i)) return kTRUE ;
   
@@ -445,449 +476,453 @@ Bool_t AliCaloTrackMCReader::SkipNeutralParticles(Int_t pdg) const {
 }
 
 
-//____________________________________________________________________
-void AliCaloTrackMCReader::SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const {
-//Give a PID weight for tracks equal to 1 depending on the particle type
-
+//_______________________________________________________________________
+void AliCaloTrackMCReader::SetTrackChargeAndPID(const Int_t pdgCode, 
+                                                AliAODTrack *track) const 
+{
+  //Give a PID weight for tracks equal to 1 depending on the particle type
+  
   Float_t pid[10] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
-
-  switch (pdgCode) {
-
-  case 22: // gamma
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 11: // e- 
-    track->SetCharge(-1);
-    pid[AliAODTrack::kElectron] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case -11: // e+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kElectron] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 13: // mu- 
-    track->SetCharge(-1);
-    pid[AliAODTrack::kMuon] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case -13: // mu+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kMuon] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 111: // pi0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 211: // pi+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kPion] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case -211: // pi-
-    track->SetCharge(-1);
-    pid[AliAODTrack::kPion] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 130: // K0L
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 321: // K+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kKaon] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case -321: // K- 
-    track->SetCharge(-1);
-    pid[AliAODTrack::kKaon] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 2112: // n
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 2212: // p
-    track->SetCharge(+1);
-    pid[AliAODTrack::kProton] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case -2212: // anti-p
-    track->SetCharge(-1);
-    pid[AliAODTrack::kProton] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 310: // K0S
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 311: // K0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case -311: // anti-K0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-    
-  case 221: // eta
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 3122: // lambda
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 3222: // Sigma+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 3212: // Sigma0
-    track->SetCharge(-1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 3112: // Sigma-
-    track->SetCharge(-1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 3322: // Xi0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 3312: // Xi-
-    track->SetCharge(-1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 3334: // Omega-
-    track->SetCharge(-1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -2112: // n-bar
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -3122: // anti-Lambda
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -3222: // anti-Sigma-
-    track->SetCharge(-1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -3212: // anti-Sigma0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -3112: // anti-Sigma+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -3322: // anti-Xi0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -3312: // anti-Xi+
-    track->SetCharge(+1);
-    break;
-
-  case -3334: // anti-Omega+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 411: // D+
-    track->SetCharge(+1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -411: // D- 
-    track->SetCharge(-1);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case 421: // D0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  case -421: // anti-D0
-    track->SetCharge(0);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
-    break;
-
-  default : // unknown
-    track->SetCharge(-99);
-    pid[AliAODTrack::kUnknown] = 1.;
-    track->SetPID(pid);
- }
-
+  
+  switch (pdgCode) 
+  {
+    case 22: // gamma
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 11: // e- 
+      track->SetCharge(-1);
+      pid[AliAODTrack::kElectron] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -11: // e+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kElectron] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 13: // mu- 
+      track->SetCharge(-1);
+      pid[AliAODTrack::kMuon] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -13: // mu+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kMuon] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 111: // pi0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 211: // pi+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kPion] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -211: // pi-
+      track->SetCharge(-1);
+      pid[AliAODTrack::kPion] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 130: // K0L
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 321: // K+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kKaon] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -321: // K- 
+      track->SetCharge(-1);
+      pid[AliAODTrack::kKaon] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 2112: // n
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 2212: // p
+      track->SetCharge(+1);
+      pid[AliAODTrack::kProton] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -2212: // anti-p
+      track->SetCharge(-1);
+      pid[AliAODTrack::kProton] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 310: // K0S
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 311: // K0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -311: // anti-K0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 221: // eta
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 3122: // lambda
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 3222: // Sigma+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 3212: // Sigma0
+      track->SetCharge(-1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 3112: // Sigma-
+      track->SetCharge(-1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 3322: // Xi0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 3312: // Xi-
+      track->SetCharge(-1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 3334: // Omega-
+      track->SetCharge(-1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -2112: // n-bar
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -3122: // anti-Lambda
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -3222: // anti-Sigma-
+      track->SetCharge(-1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -3212: // anti-Sigma0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -3112: // anti-Sigma+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -3322: // anti-Xi0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -3312: // anti-Xi+
+      track->SetCharge(+1);
+      break;
+      
+    case -3334: // anti-Omega+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 411: // D+
+      track->SetCharge(+1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -411: // D- 
+      track->SetCharge(-1);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case 421: // D0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    case -421: // anti-D0
+      track->SetCharge(0);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+      break;
+      
+    default : // unknown
+      track->SetCharge(-99);
+      pid[AliAODTrack::kUnknown] = 1.;
+      track->SetPID(pid);
+  }
+  
   track->SetPID(pid);
-
+  
   return;
 }
 
 //____________________________________________________________________
-void AliCaloTrackMCReader::SetCaloClusterPID(const Int_t pdgCode, AliVCluster *calo) const {
-//Give a PID weight for CaloClusters equal to 1 depending on the particle type
-
+void AliCaloTrackMCReader::SetCaloClusterPID(const Int_t pdgCode, 
+                                             AliVCluster *calo) const 
+{
+  //Give a PID weight for CaloClusters equal to 1 depending on the particle type
+  
   Float_t pid[13] = {0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.};
-
-  switch (pdgCode) {
-
-  case 22: // gamma
-    pid[AliVCluster::kPhoton] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 11: // e- 
-    pid[AliVCluster::kElectron] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case -11: // e+
-    pid[AliVCluster::kElectron] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 13: // mu- 
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case -13: // mu+
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 111: // pi0
-    pid[AliVCluster::kPi0] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 211: // pi+
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case -211: // pi-
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 130: // K0L
-    pid[AliVCluster::kKaon0] = 1.;
-    pid[AliVCluster::kNeutral] = 1;
-    calo->SetPID(pid);
-    break;
-    
-  case 321: // K+
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case -321: // K- 
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 2112: // n
-    pid[AliVCluster::kNeutron] = 1.;
-    pid[AliVCluster::kNeutral] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 2212: // p
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case -2212: // anti-p
-    pid[AliVCluster::kCharged] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 310: // K0S
-    pid[AliVCluster::kKaon0] = 1.;
-    pid[AliVCluster::kNeutral] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 311: // K0
-    pid[AliVCluster::kKaon0] = 1.;
-    pid[AliVCluster::kNeutral] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case -311: // anti-K0
-    pid[AliVCluster::kKaon0] = 1.;
-    pid[AliVCluster::kNeutral] = 1.;
-    calo->SetPID(pid);
-    break;
-    
-  case 221: // eta
-    pid[AliVCluster::kNeutral] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 3122: // lambda
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 3222: // Sigma+
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 3212: // Sigma0
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 3112: // Sigma-
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 3322: // Xi0
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 3312: // Xi-
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 3334: // Omega-
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -2112: // n-bar
-    pid[AliVCluster::kNeutron] = 1.;
-    pid[AliVCluster::kNeutral] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -3122: // anti-Lambda
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -3222: // anti-Sigma-
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -3212: // anti-Sigma0
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -3112: // anti-Sigma+
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -3322: // anti-Xi0
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -3312: // anti-Xi+
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -3334: // anti-Omega+
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 411: // D+
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -411: // D- 
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case 421: // D0
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  case -421: // anti-D0
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
-    break;
-
-  default : // unknown
-    pid[AliVCluster::kUnknown] = 1.;
-    calo->SetPID(pid);
- }
-
+  
+  switch (pdgCode) 
+  {
+    case 22: // gamma
+      pid[AliVCluster::kPhoton] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 11: // e- 
+      pid[AliVCluster::kElectron] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -11: // e+
+      pid[AliVCluster::kElectron] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 13: // mu- 
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -13: // mu+
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 111: // pi0
+      pid[AliVCluster::kPi0] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 211: // pi+
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -211: // pi-
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 130: // K0L
+      pid[AliVCluster::kKaon0] = 1.;
+      pid[AliVCluster::kNeutral] = 1;
+      calo->SetPID(pid);
+      break;
+      
+    case 321: // K+
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -321: // K- 
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 2112: // n
+      pid[AliVCluster::kNeutron] = 1.;
+      pid[AliVCluster::kNeutral] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 2212: // p
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -2212: // anti-p
+      pid[AliVCluster::kCharged] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 310: // K0S
+      pid[AliVCluster::kKaon0] = 1.;
+      pid[AliVCluster::kNeutral] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 311: // K0
+      pid[AliVCluster::kKaon0] = 1.;
+      pid[AliVCluster::kNeutral] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -311: // anti-K0
+      pid[AliVCluster::kKaon0] = 1.;
+      pid[AliVCluster::kNeutral] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 221: // eta
+      pid[AliVCluster::kNeutral] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 3122: // lambda
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 3222: // Sigma+
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 3212: // Sigma0
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 3112: // Sigma-
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 3322: // Xi0
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 3312: // Xi-
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 3334: // Omega-
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -2112: // n-bar
+      pid[AliVCluster::kNeutron] = 1.;
+      pid[AliVCluster::kNeutral] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -3122: // anti-Lambda
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -3222: // anti-Sigma-
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -3212: // anti-Sigma0
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -3112: // anti-Sigma+
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -3322: // anti-Xi0
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -3312: // anti-Xi+
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -3334: // anti-Omega+
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 411: // D+
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -411: // D- 
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case 421: // D0
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    case -421: // anti-D0
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+      break;
+      
+    default : // unknown
+      pid[AliVCluster::kUnknown] = 1.;
+      calo->SetPID(pid);
+  }
+  
+  
   return;
 }
index 8a39c96..3c4daa3 100755 (executable)
@@ -2,7 +2,6 @@
 #define ALICALOTRACKMCREADER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
-/* $Id:  $ */
 
 //_________________________________________________________________________
 // Class for reading data (Kinematics) in order to do prompt gamma 
@@ -33,65 +32,79 @@ class AliVEvent   ;
 class AliCaloTrackMCReader : public AliCaloTrackReader {
   
  public: 
-  AliCaloTrackMCReader() ; // ctor
-  virtual ~AliCaloTrackMCReader() ;//virtual dtor
+  
+  AliCaloTrackMCReader() ;          // ctor
+  virtual ~AliCaloTrackMCReader() ; // virtual dtor
 
+  // Main methos in source file
+  
+  void   CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
+
+  void   FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector & momentum) ;
+
+  Bool_t FillInputEvent(const Int_t iEntry, const char * currentFileName) ;
+  
   void   InitParameters();
   
+  void   MakePi0Decay(const TLorentzVector p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle); 
+
   void   Print(const Option_t * opt) const; 
   
-  void   SwitchOnPi0Decay()           { fDecayPi0 = kTRUE  ; } 
-  void   SwitchOffPi0Decay()          { fDecayPi0 = kFALSE ; } 
-  Int_t  IsPi0DecaySwitchedOn() const { return fDecayPi0   ; } 
+  void   SetCaloClusterPID   (const Int_t pdgCode, AliVCluster *calo ) const ;
+  
+  void   SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const ;
+  
+  void   SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ;
+
+  // Data members setters and getters
   
+  AliVEvent*  GetInputEvent()               const { return (AliVEvent *) GetMC()   ; }
+  
+  void      GetVertex(Double_t v[3]) const ;
+  Double_t* GetVertex(const Int_t evtIndex) const {return fVertex[evtIndex];}
+  void      GetVertex(Double_t vertex[3], const Int_t evtIndex) const 
+  { vertex[0]=fVertex[evtIndex][0];  vertex[1]=fVertex[evtIndex][1];  vertex[2]=fVertex[evtIndex][2]; }  
+  
+  // Particle type, status, arrays 
   void      AddNeutralParticlesArray(TArrayI & array)  
       { fNeutralParticlesArray   = new TArrayI(array) ; }
-  TArrayI * GetNeutralParticlesArray()      const {return  fNeutralParticlesArray;}
+  TArrayI * GetNeutralParticlesArray()      const { return  fNeutralParticlesArray ; }
   Bool_t    SkipNeutralParticles(Int_t pdg) const ;
   
   void      AddChargedParticlesArray(TArrayI & array)  
       { fChargedParticlesArray   = new TArrayI(array) ; }
-  TArrayI * GetChargedParticlesArray()   const {return  fChargedParticlesArray;}
+  TArrayI * GetChargedParticlesArray()      const { return  fChargedParticlesArray ; }
   Bool_t    KeepChargedParticles(Int_t pdg) const ;
 
-  void AddStatusArray(TArrayI & array)  
+  void      AddStatusArray(TArrayI & array)  
       { fStatusArray   = new TArrayI(array) ; }
-  TArrayI * GetStatusArray()             const {return  fStatusArray;}
-  
-  void   SwitchOnStatusSelection()  { fKeepAllStatus = kFALSE ; }
-  void   SwitchOffStatusSelection() { fKeepAllStatus = kTRUE  ; }
-  Bool_t KeepParticleWithStatus(Int_t status) const ;
+  TArrayI * GetStatusArray()                const { return  fStatusArray           ; }
   
-  void   SwitchOnOnlyGeneratorParticles()  {fOnlyGeneratorParticles = kTRUE  ; }
-  void   SwitchOffOnlyGeneratorParticles() {fOnlyGeneratorParticles = kFALSE ; }
+  void      SwitchOnStatusSelection()             { fKeepAllStatus = kFALSE        ; }
+  void      SwitchOffStatusSelection()            { fKeepAllStatus = kTRUE         ; }
+  Bool_t    KeepParticleWithStatus(Int_t status) const ;
   
-  void      GetVertex(Double_t v[3]) const ;
-  Double_t* GetVertex(const Int_t evtIndex) const {return fVertex[evtIndex];}
-  void      GetVertex(Double_t vertex[3], const Int_t evtIndex) const 
-    {vertex[0]=fVertex[evtIndex][0];  vertex[1]=fVertex[evtIndex][1];  vertex[2]=fVertex[evtIndex][2];}   
+  void      SwitchOnOnlyGeneratorParticles()      { fOnlyGeneratorParticles = kTRUE  ; }
+  void      SwitchOffOnlyGeneratorParticles()     { fOnlyGeneratorParticles = kFALSE ; }
   
-  Bool_t FillInputEvent(const Int_t iEntry, const char * currentFileName) ;
-  AliVEvent*  GetInputEvent() const {return (AliVEvent *) GetMC();}
-  void   SetInputOutputMCEvent(AliVEvent* esd, AliAODEvent* aod, AliMCEvent* mc) ;
+  // Pi0 Overlapps, decays 
   
-  void   SetCaloClusterPID(const Int_t pdgCode, AliVCluster *calo)     const ;
-  void   SetTrackChargeAndPID(const Int_t pdgCode, AliAODTrack *track) const ;
+  void      SwitchOnPi0Decay()                    { fDecayPi0 = kTRUE              ; } 
+  void      SwitchOffPi0Decay()                   { fDecayPi0 = kFALSE             ; } 
+  Int_t     IsPi0DecaySwitchedOn()          const { return fDecayPi0               ; }   
   
-  void   SwitchOnOverlapCheck()  {fCheckOverlap = kTRUE  ; }
-  void   SwitchOffOverlapCheck() {fCheckOverlap = kFALSE ; }
+  void      SwitchOnOverlapCheck()                { fCheckOverlap = kTRUE          ; }
+  void      SwitchOffOverlapCheck()               { fCheckOverlap = kFALSE         ; }
 
-  Float_t GetEMCALOverlapAngle() const {return fEMCALOverlapAngle ; }
-  Float_t GetPHOSOverlapAngle()  const {return fPHOSOverlapAngle  ; }
-  void    SetEMCALOverlapAngle(Float_t angle)  {fEMCALOverlapAngle = angle ; }
-  void    SetPHOSOverlapAngle(Float_t angle)   {fPHOSOverlapAngle  = angle ; }
-    
- private:
+  Float_t   GetEMCALOverlapAngle()          const { return fEMCALOverlapAngle      ; }
+  void      SetEMCALOverlapAngle(Float_t angle)   { fEMCALOverlapAngle = angle     ; }
   
-  void   CheckOverlap(const Float_t anglethres, const Int_t imom, Int_t & iPrimary, Int_t & index, TLorentzVector & mom, Int_t & pdg);
-  void   MakePi0Decay(const TLorentzVector p0, TLorentzVector &p1, TLorentzVector &p2) const ;//, Double_t &angle); 
-  void   FillCalorimeters(Int_t & iParticle, TParticle* particle, TLorentzVector & momentum) ;
+  Float_t   GetPHOSOverlapAngle()           const { return fPHOSOverlapAngle       ; }
+  void      SetPHOSOverlapAngle (Float_t angle)   { fPHOSOverlapAngle  = angle     ; }
+    
   
-  private:
+private:
+
   Bool_t    fDecayPi0 ;              // If not decayed, decay pi0 by hand
   TArrayI * fNeutralParticlesArray ; // Do not keep neutral particles of this list in calorimeter.
   TArrayI * fChargedParticlesArray ; // Keep charged particles of this list in calorimeter.
@@ -103,8 +116,8 @@ class AliCaloTrackMCReader : public AliCaloTrackReader {
   Int_t     fIndex2ndPhoton;         // Check overlap of first decay photon already done, internal use.
   Bool_t    fOnlyGeneratorParticles; // Use particles only generated by PYTHIA/HERWIG/... and not by the MC tranport G3/G4/FLUKA ...
   
-  AliCaloTrackMCReader(const AliCaloTrackMCReader & g) ; // cpy ctor   
-  AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & g) ;//cpy assignment
+  AliCaloTrackMCReader(              const AliCaloTrackMCReader & r) ; // cpy ctor     
+  AliCaloTrackMCReader & operator = (const AliCaloTrackMCReader & r) ; // cpy assignment
   
   ClassDef(AliCaloTrackMCReader,4)
 } ;
index 4ca5f67..2f04063 100755 (executable)
@@ -12,7 +12,6 @@
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-/* $Id:  $ */
 
 //_________________________________________________________________________
 // Base class for reading data: MonteCarlo, ESD or AOD, of PHOS EMCAL and 
@@ -51,7 +50,7 @@
 #include "AliEMCALGeometry.h"
 #include "AliEMCALRecoUtils.h"
 
-// ---- PartCorr ---
+// ---- CaloTrackCorr ---
 #include "AliCalorimeterUtils.h"
 #include "AliCaloTrackReader.h"
 
index da2991a..2fbc981 100755 (executable)
@@ -2,7 +2,6 @@
 #define ALICALOTRACKREADER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice     */
-/* $Id:  $ */
 
 //_________________________________________________________________________
 // Base class for reading data: MonteCarlo, ESD or AOD, of PHOS EMCAL and 
@@ -22,11 +21,11 @@ class TTree ;
 class TArrayI ;
 
 //--- ANALYSIS system ---
+#include "AliVEvent.h"
 class AliVCaloCells;
 class AliStack; 
 class AliHeader; 
 class AliGenEventHeader; 
-#include "AliVEvent.h"
 class AliAODEvent;
 class AliMCEvent;
 class AliMixedEvent;
@@ -37,9 +36,9 @@ class AliTriggerAnalysis;
 class AliEventplane;
 class AliVCluster;
 
-// --- PartCorr / EMCAL ---
-class AliEMCALRecoUtils;
+// --- CaloTrackCorr / EMCAL ---
 #include "AliFiducialCut.h"
+class AliEMCALRecoUtils;
 class AliCalorimeterUtils;
 
 class AliCaloTrackReader : public TObject {
@@ -422,8 +421,8 @@ public:
   Bool_t           fImportGeometryFromFile; // Import geometry settings in geometry.root file
   TString          fImportGeometryFilePath; // path fo geometry.root file
 
-  AliCaloTrackReader(const AliCaloTrackReader & g) ;               // cpy ctor
-  AliCaloTrackReader & operator = (const AliCaloTrackReader & g) ; // cpy assignment
+  AliCaloTrackReader(              const AliCaloTrackReader & r) ; // cpy ctor
+  AliCaloTrackReader & operator = (const AliCaloTrackReader & r) ; // cpy assignment
   
   ClassDef(AliCaloTrackReader,35)