Changing sparse histos to floats, getting code working with plugin, and adding a...
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Nov 2011 21:45:02 +0000 (21:45 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Nov 2011 21:45:02 +0000 (21:45 +0000)
PWG4/totEt/AliAnalysisEmEtMonteCarlo.cxx
PWG4/totEt/AliAnalysisEmEtReconstructed.cxx
PWG4/totEt/AliAnalysisEmEtReconstructed.h

index 7b6b823..f1e428f 100644 (file)
@@ -5,7 +5,7 @@
 //  implementation file
 //
 //*-- Author: Marcelo G. Munhoz (USP)
-//_________________________________________________________________________
+             //_________________________________________________________________________
 
 #include "AliAnalysisEmEtMonteCarlo.h"
 #include "AliAnalysisEtCuts.h"
 #include "AliTrackerBase.h"
 #include "TGeoManager.h"
 
-using namespace std;
+  using namespace std;
 
 ClassImp(AliAnalysisEmEtMonteCarlo);
 
 
 // ctor
 AliAnalysisEmEtMonteCarlo::AliAnalysisEmEtMonteCarlo():AliAnalysisEtMonteCarlo()
-,fPrimtotET(0), fPrimAcctotET(0), fPrimRectotET(0), fPrimRectotETDep(0)
-,fElectrontotET(0), fElectronAcctotET(0), fElectronRectotET(0)
-,fConvElectrontotET(0), fConvElectronAcctotET(0), fConvElectronRectotET(0), fScatElectrontotET(0), fScatElectronAcctotET(0), fScatElectronRectotET(0)
-,fTotElectrontotET(0), fTotElectronAcctotET(0), fTotElectronRectotET(0)
-
-,fGammatotET(0), fGammaAcctotET(0), fGammaRectotET(0)
-,fAnnihGammatotET(0), fAnnihGammaAcctotET(0), fAnnihGammaRectotET(0), fScatGammatotET(0), fScatGammaAcctotET(0), fScatGammaRectotET(0)
-,fTotGammatotET(0), fTotGammaAcctotET(0), fTotGammaRectotET(0)
-,fConvGammatotET(0),fNonConvGammatotET(0),fConvGammaAcctotET(0),fNonConvGammaAcctotET(0), fNPPPi0GammatotET(0), fNPPPi0GammaRectotET(0)
-
-,fTotEMtotET(0), fTotEMAcctotET(0), fTotEMRectotET(0)
-
-,fNPPElectrontotET(0), fNPPElectronRectotET(0), fNPPGammatotET(0), fNPPGammaRectotET(0)
-,fTotNPPEMtotET(0), fTotNPPEMRectotET(0)
-
-,fMuontotET(0), fPiontotET(0), fKaontotET(0), fProtontotET(0)
-,fMuonAcctotET(0), fPionAcctotET(0), fKaonAcctotET(0), fProtonAcctotET(0)
-,fMuonRectotET(0), fMuonRectotETDep(0), fPionRectotET(0), fPionRectotETDep(0), fKaonRectotET(0), fKaonRectotETDep(0), fProtonRectotET(0), fProtonRectotETDep(0)
-,fMuonMatchtotET(0), fMuonMatchtotETDep(0), fPionMatchtotET(0), fPionMatchtotETDep(0), fKaonMatchtotET(0), fKaonMatchtotETDep(0), fProtonMatchtotET(0), fProtonMatchtotETDep(0)
-,fTotChargedtotET(0), fTotChargedAcctotET(0), fTotChargedRectotET(0), fTotChargedRectotETDep(0), fTotChargedMatchtotET(0), fTotChargedMatchtotETDep(0)
-
-,fNeutrontotET(0), fNeutronAcctotET(0), fNeutronRectotET(0), fNeutronRectotETDep(0)
-,fK0totET(0), fK0RectotET(0), fK0RectotETDep(0), fLambdatotET(0), fLambdaRectotET(0), fLambdaRectotETDep(0)
-,fTotNeutraltotET(0), fTotNeutralRectotET(0), fTotNeutralRectotETDep(0)
-
-,fTotaltotET(0), fTotalAcctotET(0), fTotalRectotET(0), fTotalRectotETDep(0)
-
-,fGeoUt(0)
-
-,fHistPrimEtaEET(0) 
-,fHistPrimEtaPtET(0) 
-,fHistPrimEtaET(0) 
-,fHistPrimtotET(0) 
-
-,fHistPrimAccEtaEET(0) 
-,fHistPrimAccEtaPtET(0) 
-,fHistPrimAccEtaET(0) 
-,fHistPrimAcctotET(0) 
-
-,fHistPrimRecEtaEET(0) 
-,fHistPrimRecEtaPtET(0) 
-,fHistPrimRecEtaET(0) 
-,fHistPrimRectotET(0) 
-
-,fHistPrimRecEtaEDepETDep(0) 
-,fHistPrimRecEtaPtETDep(0) 
-,fHistPrimRecEtaETDep(0) 
-,fHistPrimRectotETDep(0) 
-
-,fHistElectronEtaEET(0) 
-,fHistElectronEtaPtET(0) 
-,fHistElectronEtaET(0) 
-,fHistElectronEtaE(0) 
-,fHistElectronEtaPt(0) 
-,fHistElectrontotET(0) 
-
-,fHistConvElectronEtaEET(0)  
-,fHistConvElectronEtaPtET(0)  
-,fHistConvElectronEtaET(0)  
-,fHistConvElectronEtaE(0)  
-,fHistConvElectronEtaPt(0)  
-,fHistConvElectrontotET(0)  
-
-,fHistScatElectronEtaEET(0)  
-,fHistScatElectronEtaPtET(0)  
-,fHistScatElectronEtaET(0)  
-,fHistScatElectronEtaE(0)  
-,fHistScatElectronEtaPt(0)  
-,fHistScatElectrontotET(0)  
-
-,fHistTotElectrontotET(0)
-
-,fHistGammaEtaEET(0)  
-,fHistGammaEtaPtET(0)  
-,fHistGammaEtaET(0)  
-,fHistGammaEtaE(0)  
-,fHistGammaEtaPt(0)  
-,fHistGammatotET(0)  
-
-,fHistAnnihGammaEtaEET(0)  
-,fHistAnnihGammaEtaPtET(0)  
-,fHistAnnihGammaEtaET(0)  
-,fHistAnnihGammaEtaE(0)  
-,fHistAnnihGammaEtaPt(0)  
-,fHistAnnihGammatotET(0)  
-
-,fHistScatGammaEtaEET(0)  
-,fHistScatGammaEtaPtET(0)  
-,fHistScatGammaEtaET(0)  
-,fHistScatGammaEtaE(0)  
-,fHistScatGammaEtaPt(0)  
-,fHistScatGammatotET(0)  
-
-,fHistConvGammaEtaEET(0)  
-,fHistConvGammaEtaPtET(0)  
-,fHistConvGammaEtaET(0)  
-,fHistConvGammaEtaE(0)  
-,fHistConvGammaEtaPt(0)  
-,fHistConvGammatotET(0)  
-
-,fHistNonConvGammaEtaEET(0)  
-,fHistNonConvGammaEtaPtET(0)  
-,fHistNonConvGammaEtaET(0)  
-,fHistNonConvGammaEtaE(0)  
-,fHistNonConvGammaEtaPt(0)  
-,fHistNonConvGammatotET(0)  
-
-,fHistTotGammatotET(0)
-
-,fHistTotEMtotET(0)
-
-,fHistNPPElectronEtaEET(0) 
-,fHistNPPElectronEtaPtET(0) 
-,fHistNPPElectronEtaET(0) 
-,fHistNPPElectronEtaE(0) 
-,fHistNPPElectronEtaPt(0) 
-,fHistNPPElectrontotET(0) 
-
-,fHistNPPGammaEtaEET(0) 
-,fHistNPPGammaEtaPtET(0) 
-,fHistNPPGammaEtaET(0) 
-,fHistNPPGammaEtaE(0) 
-,fHistNPPGammaEtaPt(0) 
-,fHistNPPGammatotET(0) 
-
-,fHistTotNPPEMtotET(0)
-
-,fHistNPPPi0GammaEtaEET(0) 
-,fHistNPPPi0GammaEtaPtET(0) 
-,fHistNPPPi0GammaEtaET(0) 
-,fHistNPPPi0GammaEtaE(0) 
-,fHistNPPPi0GammaEtaPt(0) 
-,fHistNPPPi0GammatotET(0) 
-
-,fHistElectronAccEtaEET(0) 
-,fHistElectronAccEtaPtET(0) 
-,fHistElectronAccEtaET(0) 
-,fHistElectronAccEtaE(0) 
-,fHistElectronAccEtaPt(0) 
-,fHistElectronAcctotET(0) 
-
-,fHistConvElectronAccEtaEET(0)  
-,fHistConvElectronAccEtaPtET(0)  
-,fHistConvElectronAccEtaET(0)  
-,fHistConvElectronAccEtaE(0)  
-,fHistConvElectronAccEtaPt(0)  
-,fHistConvElectronAcctotET(0)  
-
-,fHistScatElectronAccEtaEET(0)  
-,fHistScatElectronAccEtaPtET(0)  
-,fHistScatElectronAccEtaET(0)  
-,fHistScatElectronAccEtaE(0)  
-,fHistScatElectronAccEtaPt(0)  
-,fHistScatElectronAcctotET(0)  
-
-,fHistTotElectronAcctotET(0)
-
-,fHistGammaAccEtaEET(0)  
-,fHistGammaAccEtaPtET(0)  
-,fHistGammaAccEtaET(0)  
-,fHistGammaAccEtaE(0)  
-,fHistGammaAccEtaPt(0)  
-,fHistGammaAcctotET(0)  
-
-,fHistAnnihGammaAccEtaEET(0)  
-,fHistAnnihGammaAccEtaPtET(0)  
-,fHistAnnihGammaAccEtaET(0)  
-,fHistAnnihGammaAccEtaE(0)  
-,fHistAnnihGammaAccEtaPt(0)  
-,fHistAnnihGammaAcctotET(0)  
-
-,fHistScatGammaAccEtaEET(0)  
-,fHistScatGammaAccEtaPtET(0)  
-,fHistScatGammaAccEtaET(0)  
-,fHistScatGammaAccEtaE(0)  
-,fHistScatGammaAccEtaPt(0)  
-,fHistScatGammaAcctotET(0)  
-
-,fHistConvGammaAccEtaEET(0)  
-,fHistConvGammaAccEtaPtET(0)  
-,fHistConvGammaAccEtaET(0)  
-,fHistConvGammaAccEtaE(0)  
-,fHistConvGammaAccEtaPt(0)  
-,fHistConvGammaAcctotET(0)  
-
-,fHistNonConvGammaAccEtaEET(0)  
-,fHistNonConvGammaAccEtaPtET(0)  
-,fHistNonConvGammaAccEtaET(0)  
-,fHistNonConvGammaAccEtaE(0)  
-,fHistNonConvGammaAccEtaPt(0)  
-,fHistNonConvGammaAcctotET(0)  
-
-,fHistTotGammaAcctotET(0)
-
-,fHistTotEMAcctotET(0)
-
-,fHistNPPElectronAccEtaEET(0) 
-,fHistNPPElectronAccEtaPtET(0) 
-,fHistNPPElectronAccEtaE(0) 
-,fHistNPPElectronAccEtaPt(0) 
-
-,fHistNPPGammaAccEtaEET(0) 
-,fHistNPPGammaAccEtaPtET(0) 
-,fHistNPPGammaAccEtaE(0) 
-,fHistNPPGammaAccEtaPt(0) 
-
-,fHistElectronRecEtaEET(0) 
-,fHistElectronRecEtaPtET(0) 
-,fHistElectronRecEtaET(0) 
-,fHistElectronRecEtaE(0) 
-,fHistElectronRecEtaPt(0) 
-,fHistElectronRectotET(0) 
-
-,fHistConvElectronRecEtaEET(0)  
-,fHistConvElectronRecEtaPtET(0)  
-,fHistConvElectronRecEtaET(0)  
-,fHistConvElectronRecEtaE(0)  
-,fHistConvElectronRecEtaPt(0)  
-,fHistConvElectronRectotET(0)  
-
-,fHistScatElectronRecEtaEET(0)  
-,fHistScatElectronRecEtaPtET(0)  
-,fHistScatElectronRecEtaET(0)  
-,fHistScatElectronRecEtaE(0)  
-,fHistScatElectronRecEtaPt(0)  
-,fHistScatElectronRectotET(0)  
-
-,fHistTotElectronRectotET(0)
-
-,fHistGammaRecEtaEET(0)  
-,fHistGammaRecEtaPtET(0)  
-,fHistGammaRecEtaET(0)  
-,fHistGammaRecEtaE(0)  
-,fHistGammaRecEtaPt(0)  
-,fHistGammaRectotET(0)  
-
-,fHistAnnihGammaRecEtaEET(0)  
-,fHistAnnihGammaRecEtaPtET(0)  
-,fHistAnnihGammaRecEtaET(0)  
-,fHistAnnihGammaRecEtaE(0)  
-,fHistAnnihGammaRecEtaPt(0)  
-,fHistAnnihGammaRectotET(0)  
-
-,fHistScatGammaRecEtaEET(0)  
-,fHistScatGammaRecEtaPtET(0)  
-,fHistScatGammaRecEtaET(0)  
-,fHistScatGammaRecEtaE(0)  
-,fHistScatGammaRecEtaPt(0)  
-,fHistScatGammaRectotET(0)  
-
-,fHistTotGammaRectotET(0)
-
-,fHistTotEMRectotET(0)
-
-,fHistNPPElectronRecEtaEET(0) 
-,fHistNPPElectronRecEtaPtET(0) 
-,fHistNPPElectronRecEtaET(0) 
-,fHistNPPElectronRecEtaE(0) 
-,fHistNPPElectronRecEtaPt(0) 
-,fHistNPPElectronRectotET(0) 
-
-,fHistNPPGammaRecEtaEET(0) 
-,fHistNPPGammaRecEtaPtET(0) 
-,fHistNPPGammaRecEtaET(0) 
-,fHistNPPGammaRecEtaE(0) 
-,fHistNPPGammaRecEtaPt(0) 
-,fHistNPPGammaRectotET(0) 
-
-,fHistTotNPPEMRectotET(0)
-
-,fHistNPPPi0GammaRecEtaEET(0) 
-,fHistNPPPi0GammaRecEtaPtET(0) 
-,fHistNPPPi0GammaRecEtaET(0) 
-,fHistNPPPi0GammaRecEtaE(0) 
-,fHistNPPPi0GammaRecEtaPt(0) 
-,fHistNPPPi0GammaRectotET(0) 
-
-,fHistMuonEtaEET(0) 
-,fHistMuonAccEtaEET(0) 
-,fHistMuonRecEtaEET(0) 
-,fHistMuonMatchEtaEET(0) 
-
-,fHistMuonEtaPtET(0) 
-,fHistMuonAccEtaPtET(0) 
-,fHistMuonRecEtaPtET(0) 
-,fHistMuonMatchEtaPtET(0) 
-
-,fHistMuonEtaET(0) 
-,fHistMuonAccEtaET(0) 
-,fHistMuonRecEtaET(0) 
-,fHistMuonMatchEtaET(0) 
-
-,fHistMuonEtaE(0) 
-,fHistMuonAccEtaE(0) 
-,fHistMuonRecEtaE(0) 
-,fHistMuonMatchEtaE(0) 
-
-,fHistMuonEtaPt(0) 
-,fHistMuonAccEtaPt(0) 
-,fHistMuonRecEtaPt(0) 
-,fHistMuonMatchEtaPt(0) 
-
-,fHistMuontotET(0) 
-,fHistMuonAcctotET(0) 
-,fHistMuonRectotET(0) 
-,fHistMuonMatchtotET(0) 
-
-,fHistMuonRectotETDep(0) 
-,fHistMuonMatchtotETDep(0) 
-
-,fHistMuonRecEtaEDepETDep(0) 
-,fHistMuonMatchEtaEDepETDep(0) 
-
-,fHistMuonRecEtaPtETDep(0) 
-,fHistMuonMatchEtaPtETDep(0) 
-
-,fHistMuonRecEtaETDep(0) 
-,fHistMuonMatchEtaETDep(0) 
-
-,fHistMuonRecResEET(0) 
-,fHistMuonRecResPtET(0) 
-,fHistMuonRecResE(0) 
-,fHistMuonRecResPt(0) 
-
-,fHistMuonRecResEDepETDep(0) 
-,fHistMuonRecResPtETDep(0) 
-
-,fHistPionEtaEET(0) 
-,fHistPionAccEtaEET(0) 
-,fHistPionRecEtaEET(0) 
-,fHistPionMatchEtaEET(0) 
-
-,fHistPionEtaPtET(0) 
-,fHistPionAccEtaPtET(0) 
-,fHistPionRecEtaPtET(0) 
-,fHistPionMatchEtaPtET(0) 
-
-,fHistPionEtaET(0) 
-,fHistPionAccEtaET(0) 
-,fHistPionRecEtaET(0) 
-,fHistPionMatchEtaET(0) 
-
-,fHistPionEtaE(0) 
-,fHistPionAccEtaE(0) 
-,fHistPionRecEtaE(0) 
-,fHistPionMatchEtaE(0) 
-
-,fHistPionEtaPt(0) 
-,fHistPionAccEtaPt(0) 
-,fHistPionRecEtaPt(0) 
-,fHistPionMatchEtaPt(0) 
-
-,fHistPiontotET(0) 
-,fHistPionAcctotET(0) 
-,fHistPionRectotET(0) 
-,fHistPionMatchtotET(0) 
-
-,fHistPionRectotETDep(0) 
-,fHistPionMatchtotETDep(0) 
-
-,fHistPionRecEtaEDepETDep(0) 
-,fHistPionMatchEtaEDepETDep(0) 
-
-,fHistPionRecEtaPtETDep(0) 
-,fHistPionMatchEtaPtETDep(0) 
-
-,fHistPionRecEtaETDep(0) 
-,fHistPionMatchEtaETDep(0) 
-
-,fHistPionRecResEET(0) 
-,fHistPionRecResPtET(0) 
-,fHistPionRecResE(0) 
-,fHistPionRecResPt(0) 
-,fHistPionRecResEDepETDep(0) 
-,fHistPionRecResPtETDep(0) 
-
-,fHistKaonEtaEET(0) 
-,fHistKaonAccEtaEET(0) 
-,fHistKaonRecEtaEET(0) 
-,fHistKaonMatchEtaEET(0) 
-
-,fHistKaonEtaPtET(0) 
-,fHistKaonAccEtaPtET(0) 
-,fHistKaonRecEtaPtET(0) 
-,fHistKaonMatchEtaPtET(0) 
-
-,fHistKaonEtaET(0) 
-,fHistKaonAccEtaET(0) 
-,fHistKaonRecEtaET(0) 
-,fHistKaonMatchEtaET(0) 
-
-,fHistKaonEtaE(0) 
-,fHistKaonAccEtaE(0) 
-,fHistKaonRecEtaE(0) 
-,fHistKaonMatchEtaE(0) 
-
-,fHistKaonEtaPt(0) 
-,fHistKaonAccEtaPt(0) 
-,fHistKaonRecEtaPt(0) 
-,fHistKaonMatchEtaPt(0) 
-
-,fHistKaontotET(0) 
-,fHistKaonAcctotET(0) 
-,fHistKaonRectotET(0) 
-,fHistKaonMatchtotET(0) 
-
-,fHistKaonRectotETDep(0) 
-,fHistKaonMatchtotETDep(0) 
-
-,fHistKaonRecEtaEDepETDep(0) 
-,fHistKaonMatchEtaEDepETDep(0) 
-
-,fHistKaonRecEtaPtETDep(0) 
-,fHistKaonMatchEtaPtETDep(0) 
-
-,fHistKaonRecEtaETDep(0) 
-,fHistKaonMatchEtaETDep(0) 
-
-,fHistKaonRecResEET(0) 
-,fHistKaonRecResPtET(0) 
-,fHistKaonRecResE(0) 
-,fHistKaonRecResPt(0) 
-
-,fHistKaonRecResEDepETDep(0) 
-,fHistKaonRecResPtETDep(0) 
-
-,fHistProtonEtaEET(0) 
-,fHistProtonAccEtaEET(0) 
-,fHistProtonRecEtaEET(0) 
-,fHistProtonMatchEtaEET(0) 
-
-,fHistProtonEtaPtET(0) 
-,fHistProtonAccEtaPtET(0) 
-,fHistProtonRecEtaPtET(0) 
-,fHistProtonMatchEtaPtET(0) 
+                                                     ,fPrimtotET(0), fPrimAcctotET(0), fPrimRectotET(0), fPrimRectotETDep(0)
+                                                     ,fElectrontotET(0), fElectronAcctotET(0), fElectronRectotET(0)
+                                                     ,fConvElectrontotET(0), fConvElectronAcctotET(0), fConvElectronRectotET(0), fScatElectrontotET(0), fScatElectronAcctotET(0), fScatElectronRectotET(0)
+                                                     ,fTotElectrontotET(0), fTotElectronAcctotET(0), fTotElectronRectotET(0)
+
+                                                     ,fGammatotET(0), fGammaAcctotET(0), fGammaRectotET(0)
+                                                     ,fAnnihGammatotET(0), fAnnihGammaAcctotET(0), fAnnihGammaRectotET(0), fScatGammatotET(0), fScatGammaAcctotET(0), fScatGammaRectotET(0)
+                                                     ,fTotGammatotET(0), fTotGammaAcctotET(0), fTotGammaRectotET(0)
+                                                     ,fConvGammatotET(0),fNonConvGammatotET(0),fConvGammaAcctotET(0),fNonConvGammaAcctotET(0), fNPPPi0GammatotET(0), fNPPPi0GammaRectotET(0)
+
+                                                     ,fTotEMtotET(0), fTotEMAcctotET(0), fTotEMRectotET(0)
+
+                                                     ,fNPPElectrontotET(0), fNPPElectronRectotET(0), fNPPGammatotET(0), fNPPGammaRectotET(0)
+                                                     ,fTotNPPEMtotET(0), fTotNPPEMRectotET(0)
+
+                                                     ,fMuontotET(0), fPiontotET(0), fKaontotET(0), fProtontotET(0)
+                                                     ,fMuonAcctotET(0), fPionAcctotET(0), fKaonAcctotET(0), fProtonAcctotET(0)
+                                                     ,fMuonRectotET(0), fMuonRectotETDep(0), fPionRectotET(0), fPionRectotETDep(0), fKaonRectotET(0), fKaonRectotETDep(0), fProtonRectotET(0), fProtonRectotETDep(0)
+                                                     ,fMuonMatchtotET(0), fMuonMatchtotETDep(0), fPionMatchtotET(0), fPionMatchtotETDep(0), fKaonMatchtotET(0), fKaonMatchtotETDep(0), fProtonMatchtotET(0), fProtonMatchtotETDep(0)
+                                                     ,fTotChargedtotET(0), fTotChargedAcctotET(0), fTotChargedRectotET(0), fTotChargedRectotETDep(0), fTotChargedMatchtotET(0), fTotChargedMatchtotETDep(0)
+
+                                                     ,fNeutrontotET(0), fNeutronAcctotET(0), fNeutronRectotET(0), fNeutronRectotETDep(0)
+                                                     ,fK0totET(0), fK0RectotET(0), fK0RectotETDep(0), fLambdatotET(0), fLambdaRectotET(0), fLambdaRectotETDep(0)
+                                                     ,fTotNeutraltotET(0), fTotNeutralRectotET(0), fTotNeutralRectotETDep(0)
+
+                                                     ,fTotaltotET(0), fTotalAcctotET(0), fTotalRectotET(0), fTotalRectotETDep(0)
+
+                                                     ,fGeoUt(0)
+
+                                                     ,fHistPrimEtaEET(0) 
+                                                     ,fHistPrimEtaPtET(0) 
+                                                     ,fHistPrimEtaET(0) 
+                                                     ,fHistPrimtotET(0) 
+
+                                                     ,fHistPrimAccEtaEET(0) 
+                                                     ,fHistPrimAccEtaPtET(0) 
+                                                     ,fHistPrimAccEtaET(0) 
+                                                     ,fHistPrimAcctotET(0) 
+
+                                                     ,fHistPrimRecEtaEET(0) 
+                                                     ,fHistPrimRecEtaPtET(0) 
+                                                     ,fHistPrimRecEtaET(0) 
+                                                     ,fHistPrimRectotET(0) 
+
+                                                     ,fHistPrimRecEtaEDepETDep(0) 
+                                                     ,fHistPrimRecEtaPtETDep(0) 
+                                                     ,fHistPrimRecEtaETDep(0) 
+                                                     ,fHistPrimRectotETDep(0) 
+
+                                                     ,fHistElectronEtaEET(0) 
+                                                     ,fHistElectronEtaPtET(0) 
+                                                     ,fHistElectronEtaET(0) 
+                                                     ,fHistElectronEtaE(0) 
+                                                     ,fHistElectronEtaPt(0) 
+                                                     ,fHistElectrontotET(0) 
+
+                                                     ,fHistConvElectronEtaEET(0)  
+                                                     ,fHistConvElectronEtaPtET(0)  
+                                                     ,fHistConvElectronEtaET(0)  
+                                                     ,fHistConvElectronEtaE(0)  
+                                                     ,fHistConvElectronEtaPt(0)  
+                                                     ,fHistConvElectrontotET(0)  
+
+                                                     ,fHistScatElectronEtaEET(0)  
+                                                     ,fHistScatElectronEtaPtET(0)  
+                                                     ,fHistScatElectronEtaET(0)  
+                                                     ,fHistScatElectronEtaE(0)  
+                                                     ,fHistScatElectronEtaPt(0)  
+                                                     ,fHistScatElectrontotET(0)  
+
+                                                     ,fHistTotElectrontotET(0)
+
+                                                     ,fHistGammaEtaEET(0)  
+                                                     ,fHistGammaEtaPtET(0)  
+                                                     ,fHistGammaEtaET(0)  
+                                                     ,fHistGammaEtaE(0)  
+                                                     ,fHistGammaEtaPt(0)  
+                                                     ,fHistGammatotET(0)  
+
+                                                     ,fHistAnnihGammaEtaEET(0)  
+                                                     ,fHistAnnihGammaEtaPtET(0)  
+                                                     ,fHistAnnihGammaEtaET(0)  
+                                                     ,fHistAnnihGammaEtaE(0)  
+                                                     ,fHistAnnihGammaEtaPt(0)  
+                                                     ,fHistAnnihGammatotET(0)  
+
+                                                     ,fHistScatGammaEtaEET(0)  
+                                                     ,fHistScatGammaEtaPtET(0)  
+                                                     ,fHistScatGammaEtaET(0)  
+                                                     ,fHistScatGammaEtaE(0)  
+                                                     ,fHistScatGammaEtaPt(0)  
+                                                     ,fHistScatGammatotET(0)  
+
+                                                     ,fHistConvGammaEtaEET(0)  
+                                                     ,fHistConvGammaEtaPtET(0)  
+                                                     ,fHistConvGammaEtaET(0)  
+                                                     ,fHistConvGammaEtaE(0)  
+                                                     ,fHistConvGammaEtaPt(0)  
+                                                     ,fHistConvGammatotET(0)  
+
+                                                     ,fHistNonConvGammaEtaEET(0)  
+                                                     ,fHistNonConvGammaEtaPtET(0)  
+                                                     ,fHistNonConvGammaEtaET(0)  
+                                                     ,fHistNonConvGammaEtaE(0)  
+                                                     ,fHistNonConvGammaEtaPt(0)  
+                                                     ,fHistNonConvGammatotET(0)  
+
+                                                     ,fHistTotGammatotET(0)
+
+                                                     ,fHistTotEMtotET(0)
+
+                                                     ,fHistNPPElectronEtaEET(0) 
+                                                     ,fHistNPPElectronEtaPtET(0) 
+                                                     ,fHistNPPElectronEtaET(0) 
+                                                     ,fHistNPPElectronEtaE(0) 
+                                                     ,fHistNPPElectronEtaPt(0) 
+                                                     ,fHistNPPElectrontotET(0) 
+
+                                                     ,fHistNPPGammaEtaEET(0) 
+                                                     ,fHistNPPGammaEtaPtET(0) 
+                                                     ,fHistNPPGammaEtaET(0) 
+                                                     ,fHistNPPGammaEtaE(0) 
+                                                     ,fHistNPPGammaEtaPt(0) 
+                                                     ,fHistNPPGammatotET(0) 
+
+                                                     ,fHistTotNPPEMtotET(0)
+
+                                                     ,fHistNPPPi0GammaEtaEET(0) 
+                                                     ,fHistNPPPi0GammaEtaPtET(0) 
+                                                     ,fHistNPPPi0GammaEtaET(0) 
+                                                     ,fHistNPPPi0GammaEtaE(0) 
+                                                     ,fHistNPPPi0GammaEtaPt(0) 
+                                                     ,fHistNPPPi0GammatotET(0) 
+
+                                                     ,fHistElectronAccEtaEET(0) 
+                                                     ,fHistElectronAccEtaPtET(0) 
+                                                     ,fHistElectronAccEtaET(0) 
+                                                     ,fHistElectronAccEtaE(0) 
+                                                     ,fHistElectronAccEtaPt(0) 
+                                                     ,fHistElectronAcctotET(0) 
+
+                                                     ,fHistConvElectronAccEtaEET(0)  
+                                                     ,fHistConvElectronAccEtaPtET(0)  
+                                                     ,fHistConvElectronAccEtaET(0)  
+                                                     ,fHistConvElectronAccEtaE(0)  
+                                                     ,fHistConvElectronAccEtaPt(0)  
+                                                     ,fHistConvElectronAcctotET(0)  
+
+                                                     ,fHistScatElectronAccEtaEET(0)  
+                                                     ,fHistScatElectronAccEtaPtET(0)  
+                                                     ,fHistScatElectronAccEtaET(0)  
+                                                     ,fHistScatElectronAccEtaE(0)  
+                                                     ,fHistScatElectronAccEtaPt(0)  
+                                                     ,fHistScatElectronAcctotET(0)  
+
+                                                     ,fHistTotElectronAcctotET(0)
+
+                                                     ,fHistGammaAccEtaEET(0)  
+                                                     ,fHistGammaAccEtaPtET(0)  
+                                                     ,fHistGammaAccEtaET(0)  
+                                                     ,fHistGammaAccEtaE(0)  
+                                                     ,fHistGammaAccEtaPt(0)  
+                                                     ,fHistGammaAcctotET(0)  
+
+                                                     ,fHistAnnihGammaAccEtaEET(0)  
+                                                     ,fHistAnnihGammaAccEtaPtET(0)  
+                                                     ,fHistAnnihGammaAccEtaET(0)  
+                                                     ,fHistAnnihGammaAccEtaE(0)  
+                                                     ,fHistAnnihGammaAccEtaPt(0)  
+                                                     ,fHistAnnihGammaAcctotET(0)  
+
+                                                     ,fHistScatGammaAccEtaEET(0)  
+                                                     ,fHistScatGammaAccEtaPtET(0)  
+                                                     ,fHistScatGammaAccEtaET(0)  
+                                                     ,fHistScatGammaAccEtaE(0)  
+                                                     ,fHistScatGammaAccEtaPt(0)  
+                                                     ,fHistScatGammaAcctotET(0)  
+
+                                                     ,fHistConvGammaAccEtaEET(0)  
+                                                     ,fHistConvGammaAccEtaPtET(0)  
+                                                     ,fHistConvGammaAccEtaET(0)  
+                                                     ,fHistConvGammaAccEtaE(0)  
+                                                     ,fHistConvGammaAccEtaPt(0)  
+                                                     ,fHistConvGammaAcctotET(0)  
+
+                                                     ,fHistNonConvGammaAccEtaEET(0)  
+                                                     ,fHistNonConvGammaAccEtaPtET(0)  
+                                                     ,fHistNonConvGammaAccEtaET(0)  
+                                                     ,fHistNonConvGammaAccEtaE(0)  
+                                                     ,fHistNonConvGammaAccEtaPt(0)  
+                                                     ,fHistNonConvGammaAcctotET(0)  
+
+                                                     ,fHistTotGammaAcctotET(0)
+
+                                                     ,fHistTotEMAcctotET(0)
+
+                                                     ,fHistNPPElectronAccEtaEET(0) 
+                                                     ,fHistNPPElectronAccEtaPtET(0) 
+                                                     ,fHistNPPElectronAccEtaE(0) 
+                                                     ,fHistNPPElectronAccEtaPt(0) 
+
+                                                     ,fHistNPPGammaAccEtaEET(0) 
+                                                     ,fHistNPPGammaAccEtaPtET(0) 
+                                                     ,fHistNPPGammaAccEtaE(0) 
+                                                     ,fHistNPPGammaAccEtaPt(0) 
+
+                                                     ,fHistElectronRecEtaEET(0) 
+                                                     ,fHistElectronRecEtaPtET(0) 
+                                                     ,fHistElectronRecEtaET(0) 
+                                                     ,fHistElectronRecEtaE(0) 
+                                                     ,fHistElectronRecEtaPt(0) 
+                                                     ,fHistElectronRectotET(0) 
+
+                                                     ,fHistConvElectronRecEtaEET(0)  
+                                                     ,fHistConvElectronRecEtaPtET(0)  
+                                                     ,fHistConvElectronRecEtaET(0)  
+                                                     ,fHistConvElectronRecEtaE(0)  
+                                                     ,fHistConvElectronRecEtaPt(0)  
+                                                     ,fHistConvElectronRectotET(0)  
+
+                                                     ,fHistScatElectronRecEtaEET(0)  
+                                                     ,fHistScatElectronRecEtaPtET(0)  
+                                                     ,fHistScatElectronRecEtaET(0)  
+                                                     ,fHistScatElectronRecEtaE(0)  
+                                                     ,fHistScatElectronRecEtaPt(0)  
+                                                     ,fHistScatElectronRectotET(0)  
+
+                                                     ,fHistTotElectronRectotET(0)
+
+                                                     ,fHistGammaRecEtaEET(0)  
+                                                     ,fHistGammaRecEtaPtET(0)  
+                                                     ,fHistGammaRecEtaET(0)  
+                                                     ,fHistGammaRecEtaE(0)  
+                                                     ,fHistGammaRecEtaPt(0)  
+                                                     ,fHistGammaRectotET(0)  
+
+                                                     ,fHistAnnihGammaRecEtaEET(0)  
+                                                     ,fHistAnnihGammaRecEtaPtET(0)  
+                                                     ,fHistAnnihGammaRecEtaET(0)  
+                                                     ,fHistAnnihGammaRecEtaE(0)  
+                                                     ,fHistAnnihGammaRecEtaPt(0)  
+                                                     ,fHistAnnihGammaRectotET(0)  
+
+                                                     ,fHistScatGammaRecEtaEET(0)  
+                                                     ,fHistScatGammaRecEtaPtET(0)  
+                                                     ,fHistScatGammaRecEtaET(0)  
+                                                     ,fHistScatGammaRecEtaE(0)  
+                                                     ,fHistScatGammaRecEtaPt(0)  
+                                                     ,fHistScatGammaRectotET(0)  
+
+                                                     ,fHistTotGammaRectotET(0)
+
+                                                     ,fHistTotEMRectotET(0)
+
+                                                     ,fHistNPPElectronRecEtaEET(0) 
+                                                     ,fHistNPPElectronRecEtaPtET(0) 
+                                                     ,fHistNPPElectronRecEtaET(0) 
+                                                     ,fHistNPPElectronRecEtaE(0) 
+                                                     ,fHistNPPElectronRecEtaPt(0) 
+                                                     ,fHistNPPElectronRectotET(0) 
+
+                                                     ,fHistNPPGammaRecEtaEET(0) 
+                                                     ,fHistNPPGammaRecEtaPtET(0) 
+                                                     ,fHistNPPGammaRecEtaET(0) 
+                                                     ,fHistNPPGammaRecEtaE(0) 
+                                                     ,fHistNPPGammaRecEtaPt(0) 
+                                                     ,fHistNPPGammaRectotET(0) 
+
+                                                     ,fHistTotNPPEMRectotET(0)
+
+                                                     ,fHistNPPPi0GammaRecEtaEET(0) 
+                                                     ,fHistNPPPi0GammaRecEtaPtET(0) 
+                                                     ,fHistNPPPi0GammaRecEtaET(0) 
+                                                     ,fHistNPPPi0GammaRecEtaE(0) 
+                                                     ,fHistNPPPi0GammaRecEtaPt(0) 
+                                                     ,fHistNPPPi0GammaRectotET(0) 
+
+                                                     ,fHistMuonEtaEET(0) 
+                                                     ,fHistMuonAccEtaEET(0) 
+                                                     ,fHistMuonRecEtaEET(0) 
+                                                     ,fHistMuonMatchEtaEET(0) 
+
+                                                     ,fHistMuonEtaPtET(0) 
+                                                     ,fHistMuonAccEtaPtET(0) 
+                                                     ,fHistMuonRecEtaPtET(0) 
+                                                     ,fHistMuonMatchEtaPtET(0) 
+
+                                                     ,fHistMuonEtaET(0) 
+                                                     ,fHistMuonAccEtaET(0) 
+                                                     ,fHistMuonRecEtaET(0) 
+                                                     ,fHistMuonMatchEtaET(0) 
+
+                                                     ,fHistMuonEtaE(0) 
+                                                     ,fHistMuonAccEtaE(0) 
+                                                     ,fHistMuonRecEtaE(0) 
+                                                     ,fHistMuonMatchEtaE(0) 
+
+                                                     ,fHistMuonEtaPt(0) 
+                                                     ,fHistMuonAccEtaPt(0) 
+                                                     ,fHistMuonRecEtaPt(0) 
+                                                     ,fHistMuonMatchEtaPt(0) 
+
+                                                     ,fHistMuontotET(0) 
+                                                     ,fHistMuonAcctotET(0) 
+                                                     ,fHistMuonRectotET(0) 
+                                                     ,fHistMuonMatchtotET(0) 
+
+                                                     ,fHistMuonRectotETDep(0) 
+                                                     ,fHistMuonMatchtotETDep(0) 
+
+                                                     ,fHistMuonRecEtaEDepETDep(0) 
+                                                     ,fHistMuonMatchEtaEDepETDep(0) 
+
+                                                     ,fHistMuonRecEtaPtETDep(0) 
+                                                     ,fHistMuonMatchEtaPtETDep(0) 
+
+                                                     ,fHistMuonRecEtaETDep(0) 
+                                                     ,fHistMuonMatchEtaETDep(0) 
+
+                                                     ,fHistMuonRecResEET(0) 
+                                                     ,fHistMuonRecResPtET(0) 
+                                                     ,fHistMuonRecResE(0) 
+                                                     ,fHistMuonRecResPt(0) 
+
+                                                     ,fHistMuonRecResEDepETDep(0) 
+                                                     ,fHistMuonRecResPtETDep(0) 
+
+                                                     ,fHistPionEtaEET(0) 
+                                                     ,fHistPionAccEtaEET(0) 
+                                                     ,fHistPionRecEtaEET(0) 
+                                                     ,fHistPionMatchEtaEET(0) 
+
+                                                     ,fHistPionEtaPtET(0) 
+                                                     ,fHistPionAccEtaPtET(0) 
+                                                     ,fHistPionRecEtaPtET(0) 
+                                                     ,fHistPionMatchEtaPtET(0) 
+
+                                                     ,fHistPionEtaET(0) 
+                                                     ,fHistPionAccEtaET(0) 
+                                                     ,fHistPionRecEtaET(0) 
+                                                     ,fHistPionMatchEtaET(0) 
+
+                                                     ,fHistPionEtaE(0) 
+                                                     ,fHistPionAccEtaE(0) 
+                                                     ,fHistPionRecEtaE(0) 
+                                                     ,fHistPionMatchEtaE(0) 
+
+                                                     ,fHistPionEtaPt(0) 
+                                                     ,fHistPionAccEtaPt(0) 
+                                                     ,fHistPionRecEtaPt(0) 
+                                                     ,fHistPionMatchEtaPt(0) 
+
+                                                     ,fHistPiontotET(0) 
+                                                     ,fHistPionAcctotET(0) 
+                                                     ,fHistPionRectotET(0) 
+                                                     ,fHistPionMatchtotET(0) 
+
+                                                     ,fHistPionRectotETDep(0) 
+                                                     ,fHistPionMatchtotETDep(0) 
+
+                                                     ,fHistPionRecEtaEDepETDep(0) 
+                                                     ,fHistPionMatchEtaEDepETDep(0) 
+
+                                                     ,fHistPionRecEtaPtETDep(0) 
+                                                     ,fHistPionMatchEtaPtETDep(0) 
+
+                                                     ,fHistPionRecEtaETDep(0) 
+                                                     ,fHistPionMatchEtaETDep(0) 
+
+                                                     ,fHistPionRecResEET(0) 
+                                                     ,fHistPionRecResPtET(0) 
+                                                     ,fHistPionRecResE(0) 
+                                                     ,fHistPionRecResPt(0) 
+                                                     ,fHistPionRecResEDepETDep(0) 
+                                                     ,fHistPionRecResPtETDep(0) 
+
+                                                     ,fHistKaonEtaEET(0) 
+                                                     ,fHistKaonAccEtaEET(0) 
+                                                     ,fHistKaonRecEtaEET(0) 
+                                                     ,fHistKaonMatchEtaEET(0) 
+
+                                                     ,fHistKaonEtaPtET(0) 
+                                                     ,fHistKaonAccEtaPtET(0) 
+                                                     ,fHistKaonRecEtaPtET(0) 
+                                                     ,fHistKaonMatchEtaPtET(0) 
+
+                                                     ,fHistKaonEtaET(0) 
+                                                     ,fHistKaonAccEtaET(0) 
+                                                     ,fHistKaonRecEtaET(0) 
+                                                     ,fHistKaonMatchEtaET(0) 
+
+                                                     ,fHistKaonEtaE(0) 
+                                                     ,fHistKaonAccEtaE(0) 
+                                                     ,fHistKaonRecEtaE(0) 
+                                                     ,fHistKaonMatchEtaE(0) 
+
+                                                     ,fHistKaonEtaPt(0) 
+                                                     ,fHistKaonAccEtaPt(0) 
+                                                     ,fHistKaonRecEtaPt(0) 
+                                                     ,fHistKaonMatchEtaPt(0) 
+
+                                                     ,fHistKaontotET(0) 
+                                                     ,fHistKaonAcctotET(0) 
+                                                     ,fHistKaonRectotET(0) 
+                                                     ,fHistKaonMatchtotET(0) 
+
+                                                     ,fHistKaonRectotETDep(0) 
+                                                     ,fHistKaonMatchtotETDep(0) 
+
+                                                     ,fHistKaonRecEtaEDepETDep(0) 
+                                                     ,fHistKaonMatchEtaEDepETDep(0) 
+
+                                                     ,fHistKaonRecEtaPtETDep(0) 
+                                                     ,fHistKaonMatchEtaPtETDep(0) 
+
+                                                     ,fHistKaonRecEtaETDep(0) 
+                                                     ,fHistKaonMatchEtaETDep(0) 
+
+                                                     ,fHistKaonRecResEET(0) 
+                                                     ,fHistKaonRecResPtET(0) 
+                                                     ,fHistKaonRecResE(0) 
+                                                     ,fHistKaonRecResPt(0) 
+
+                                                     ,fHistKaonRecResEDepETDep(0) 
+                                                     ,fHistKaonRecResPtETDep(0) 
+
+                                                     ,fHistProtonEtaEET(0) 
+                                                     ,fHistProtonAccEtaEET(0) 
+                                                     ,fHistProtonRecEtaEET(0) 
+                                                     ,fHistProtonMatchEtaEET(0) 
+
+                                                     ,fHistProtonEtaPtET(0) 
+                                                     ,fHistProtonAccEtaPtET(0) 
+                                                     ,fHistProtonRecEtaPtET(0) 
+                                                     ,fHistProtonMatchEtaPtET(0) 
 
-,fHistProtonEtaET(0) 
-,fHistProtonAccEtaET(0) 
-,fHistProtonRecEtaET(0) 
-,fHistProtonMatchEtaET(0) 
+                                                     ,fHistProtonEtaET(0) 
+                                                     ,fHistProtonAccEtaET(0) 
+                                                     ,fHistProtonRecEtaET(0) 
+                                                     ,fHistProtonMatchEtaET(0) 
 
-,fHistProtonEtaE(0) 
-,fHistProtonAccEtaE(0) 
-,fHistProtonRecEtaE(0) 
-,fHistProtonMatchEtaE(0) 
+                                                     ,fHistProtonEtaE(0) 
+                                                     ,fHistProtonAccEtaE(0) 
+                                                     ,fHistProtonRecEtaE(0) 
+                                                     ,fHistProtonMatchEtaE(0) 
 
-,fHistProtonEtaPt(0) 
-,fHistProtonAccEtaPt(0) 
-,fHistProtonRecEtaPt(0) 
-,fHistProtonMatchEtaPt(0) 
+                                                     ,fHistProtonEtaPt(0) 
+                                                     ,fHistProtonAccEtaPt(0) 
+                                                     ,fHistProtonRecEtaPt(0) 
+                                                     ,fHistProtonMatchEtaPt(0) 
 
-,fHistProtontotET(0) 
-,fHistProtonAcctotET(0) 
-,fHistProtonRectotET(0) 
-,fHistProtonMatchtotET(0) 
+                                                     ,fHistProtontotET(0) 
+                                                     ,fHistProtonAcctotET(0) 
+                                                     ,fHistProtonRectotET(0) 
+                                                     ,fHistProtonMatchtotET(0) 
 
-,fHistProtonRectotETDep(0) 
-,fHistProtonMatchtotETDep(0) 
+                                                     ,fHistProtonRectotETDep(0) 
+                                                     ,fHistProtonMatchtotETDep(0) 
 
-,fHistProtonRecEtaEDepETDep(0) 
-,fHistProtonMatchEtaEDepETDep(0) 
+                                                     ,fHistProtonRecEtaEDepETDep(0) 
+                                                     ,fHistProtonMatchEtaEDepETDep(0) 
 
-,fHistProtonRecEtaPtETDep(0) 
-,fHistProtonMatchEtaPtETDep(0) 
+                                                     ,fHistProtonRecEtaPtETDep(0) 
+                                                     ,fHistProtonMatchEtaPtETDep(0) 
 
-,fHistProtonRecEtaETDep(0) 
-,fHistProtonMatchEtaETDep(0) 
+                                                     ,fHistProtonRecEtaETDep(0) 
+                                                     ,fHistProtonMatchEtaETDep(0) 
 
-,fHistProtonRecResEET(0) 
-,fHistProtonRecResPtET(0) 
-,fHistProtonRecResE(0) 
-,fHistProtonRecResPt(0) 
+                                                     ,fHistProtonRecResEET(0) 
+                                                     ,fHistProtonRecResPtET(0) 
+                                                     ,fHistProtonRecResE(0) 
+                                                     ,fHistProtonRecResPt(0) 
 
-,fHistProtonRecResEDepETDep(0) 
-,fHistProtonRecResPtETDep(0) 
+                                                     ,fHistProtonRecResEDepETDep(0) 
+                                                     ,fHistProtonRecResPtETDep(0) 
 
-,fHistTotChargedtotET(0)
-,fHistTotChargedAcctotET(0)
-,fHistTotChargedRectotET(0)
-,fHistTotChargedRectotETDep(0)
-,fHistTotChargedMatchtotET(0)
-,fHistTotChargedMatchtotETDep(0)
+                                                     ,fHistTotChargedtotET(0)
+                                                     ,fHistTotChargedAcctotET(0)
+                                                     ,fHistTotChargedRectotET(0)
+                                                     ,fHistTotChargedRectotETDep(0)
+                                                     ,fHistTotChargedMatchtotET(0)
+                                                     ,fHistTotChargedMatchtotETDep(0)
 
-,fHistNeutronEtaEET(0) 
-,fHistNeutronAccEtaEET(0) 
-,fHistNeutronRecEtaEET(0) 
+                                                     ,fHistNeutronEtaEET(0) 
+                                                     ,fHistNeutronAccEtaEET(0) 
+                                                     ,fHistNeutronRecEtaEET(0) 
 
-,fHistNeutronEtaPtET(0) 
-,fHistNeutronAccEtaPtET(0) 
-,fHistNeutronRecEtaPtET(0) 
+                                                     ,fHistNeutronEtaPtET(0) 
+                                                     ,fHistNeutronAccEtaPtET(0) 
+                                                     ,fHistNeutronRecEtaPtET(0) 
 
-,fHistNeutronEtaET(0) 
-,fHistNeutronAccEtaET(0) 
-,fHistNeutronRecEtaET(0) 
+                                                     ,fHistNeutronEtaET(0) 
+                                                     ,fHistNeutronAccEtaET(0) 
+                                                     ,fHistNeutronRecEtaET(0) 
 
-,fHistNeutronEtaE(0) 
-,fHistNeutronAccEtaE(0) 
-,fHistNeutronRecEtaE(0) 
+                                                     ,fHistNeutronEtaE(0) 
+                                                     ,fHistNeutronAccEtaE(0) 
+                                                     ,fHistNeutronRecEtaE(0) 
 
-,fHistNeutronEtaPt(0) 
-,fHistNeutronAccEtaPt(0) 
-,fHistNeutronRecEtaPt(0) 
+                                                     ,fHistNeutronEtaPt(0) 
+                                                     ,fHistNeutronAccEtaPt(0) 
+                                                     ,fHistNeutronRecEtaPt(0) 
 
-,fHistNeutrontotET(0) 
-,fHistNeutronAcctotET(0) 
-,fHistNeutronRectotET(0) 
+                                                     ,fHistNeutrontotET(0) 
+                                                     ,fHistNeutronAcctotET(0) 
+                                                     ,fHistNeutronRectotET(0) 
 
-,fHistNeutronRectotETDep(0)
+                                                     ,fHistNeutronRectotETDep(0)
 
-,fHistNeutronRecEtaEDepETDep(0) 
-,fHistNeutronRecEtaETDep(0) 
-,fHistNeutronRecEtaPtETDep(0) 
-
-,fHistK0EtaEET(0) 
-,fHistK0RecEtaEET(0) 
-
-,fHistK0EtaPtET(0) 
-,fHistK0RecEtaPtET(0) 
-
-,fHistK0EtaET(0) 
-,fHistK0RecEtaET(0) 
-
-,fHistK0EtaE(0) 
-,fHistK0RecEtaE(0) 
-
-,fHistK0EtaPt(0) 
-,fHistK0RecEtaPt(0) 
-
-,fHistK0totET(0) 
-,fHistK0RectotET(0) 
-,fHistK0RectotETDep(0) 
-
-,fHistK0RecEtaEDepETDep(0) 
-,fHistK0RecEtaETDep(0) 
-
-,fHistK0RecEtaPtETDep(0) 
-
-,fHistLambdaEtaEET(0) 
-,fHistLambdaRecEtaEET(0) 
-
-,fHistLambdaEtaPtET(0) 
-,fHistLambdaRecEtaPtET(0) 
-
-,fHistLambdaEtaET(0) 
-,fHistLambdaRecEtaET(0) 
-
-,fHistLambdaEtaE(0) 
-,fHistLambdaRecEtaE(0) 
-
-,fHistLambdaEtaPt(0) 
-,fHistLambdaRecEtaPt(0) 
-
-,fHistLambdatotET(0) 
-,fHistLambdaRectotET(0) 
-,fHistLambdaRectotETDep(0) 
-
-,fHistLambdaRecEtaEDepETDep(0) 
-,fHistLambdaRecEtaETDep(0) 
-
-,fHistLambdaRecEtaPtETDep(0) 
-
-,fHistTotNeutraltotET(0)
-,fHistTotNeutralRectotET(0)
-,fHistTotNeutralRectotETDep(0)
-
-,fHistTotaltotET(0)
-//,fHistTotalAcctotET(0)
-,fHistTotalRectotET(0)
-,fHistTotalRectotETDep(0)
-
-,fHistElectronFirstMother(0) 
-,fHistElectronFirstMotherXY(0) 
-,fHistElectronNDaughters(0) 
-,fHistElectronDaughters(0) 
-,fHistElectronDaughtersXY(0) 
-
-,fHistElectronFirstMotherAcc(0)  
-,fHistElectronFirstMotherXYAcc(0)  
-,fHistElectronNDaughtersAcc(0) 
-,fHistElectronDaughtersAcc(0) 
-,fHistElectronDaughtersXYAcc(0) 
-
-,fHistElectronFirstMotherRec(0)  
-,fHistElectronFirstMotherXYRec(0)  
-,fHistElectronNDaughtersRec(0) 
-,fHistElectronDaughtersRec(0) 
-,fHistElectronDaughtersXYRec(0) 
-
-,fHistNPPElectronFirstMother(0) 
-,fHistNPPElectronFirstMotherXY(0) 
-,fHistNPPElectronNDaughters(0) 
-,fHistNPPElectronDaughters(0) 
-,fHistNPPElectronDaughtersXY(0) 
-
-,fHistNPPElectronFirstMotherAcc(0)  
-,fHistNPPElectronFirstMotherXYAcc(0)  
-,fHistNPPElectronNDaughtersAcc(0) 
-,fHistNPPElectronDaughtersAcc(0) 
-,fHistNPPElectronDaughtersXYAcc(0) 
-
-,fHistNPPElectronFirstMotherRec(0)  
-,fHistNPPElectronFirstMotherXYRec(0)  
-,fHistNPPElectronNDaughtersRec(0) 
-,fHistNPPElectronDaughtersRec(0) 
-,fHistNPPElectronDaughtersXYRec(0) 
-
-,fHistGammaFirstMother(0) 
-,fHistGammaFirstMotherXY(0) 
-,fHistGammaNDaughters(0) 
-,fHistGammaDaughters(0) 
-,fHistGammaDaughtersXY(0) 
-,fHistConvGammaDaughtersXY(0) 
-,fHistNonConvGammaDaughtersXY(0) 
-
-,fHistGammaFirstMotherAcc(0)  
-,fHistGammaFirstMotherXYAcc(0)  
-,fHistGammaNDaughtersAcc(0) 
-,fHistGammaDaughtersAcc(0) 
-,fHistGammaDaughtersXYAcc(0) 
-,fHistConvGammaDaughtersXYAcc(0) 
-,fHistNonConvGammaDaughtersXYAcc(0) 
-
-,fHistGammaFirstMotherRec(0)  
-,fHistGammaFirstMotherXYRec(0)  
-,fHistGammaNDaughtersRec(0) 
-,fHistGammaDaughtersRec(0) 
-,fHistGammaDaughtersXYRec(0) 
-,fHistConvGammaDaughtersXYRec(0) 
-,fHistNonConvGammaDaughtersXYRec(0) 
-
-,fHistNPPGammaFirstMother(0) 
-,fHistNPPGammaFirstMotherXY(0) 
-,fHistNPPGammaNDaughters(0) 
-,fHistNPPGammaDaughters(0) 
-,fHistNPPGammaDaughtersXY(0) 
-
-,fHistNPPGammaFirstMotherAcc(0)  
-,fHistNPPGammaFirstMotherXYAcc(0)  
-,fHistNPPGammaNDaughtersAcc(0) 
-,fHistNPPGammaDaughtersAcc(0) 
-,fHistNPPGammaDaughtersXYAcc(0) 
-
-,fHistNPPGammaFirstMotherRec(0)  
-,fHistNPPGammaFirstMotherXYRec(0)  
-,fHistNPPGammaNDaughtersRec(0) 
-,fHistNPPGammaDaughtersRec(0) 
-,fHistNPPGammaDaughtersXYRec(0) 
-
-,fHistAllERecEMC(0)    
-,fHistAllPtRecPtMC(0)
-,fHistElectronERecEMC(0)       
-,fHistGammaERecEMC(0)
-
-,fHistChargedRes(0)
-,fHistChargedRes2(0)
-,fHistChargedRes3(0)
-,fHistNeutralRes(0)
-,fHistElectronRes(0)
-,fHistGammaRes(0)
-
-,fHistIsInAcc(0)
+                                                     ,fHistNeutronRecEtaEDepETDep(0) 
+                                                     ,fHistNeutronRecEtaETDep(0) 
+                                                     ,fHistNeutronRecEtaPtETDep(0) 
+
+                                                     ,fHistK0EtaEET(0) 
+                                                     ,fHistK0RecEtaEET(0) 
+
+                                                     ,fHistK0EtaPtET(0) 
+                                                     ,fHistK0RecEtaPtET(0) 
+
+                                                     ,fHistK0EtaET(0) 
+                                                     ,fHistK0RecEtaET(0) 
+
+                                                     ,fHistK0EtaE(0) 
+                                                     ,fHistK0RecEtaE(0) 
+
+                                                     ,fHistK0EtaPt(0) 
+                                                     ,fHistK0RecEtaPt(0) 
+
+                                                     ,fHistK0totET(0) 
+                                                     ,fHistK0RectotET(0) 
+                                                     ,fHistK0RectotETDep(0) 
+
+                                                     ,fHistK0RecEtaEDepETDep(0) 
+                                                     ,fHistK0RecEtaETDep(0) 
+
+                                                     ,fHistK0RecEtaPtETDep(0) 
+
+                                                     ,fHistLambdaEtaEET(0) 
+                                                     ,fHistLambdaRecEtaEET(0) 
+
+                                                     ,fHistLambdaEtaPtET(0) 
+                                                     ,fHistLambdaRecEtaPtET(0) 
+
+                                                     ,fHistLambdaEtaET(0) 
+                                                     ,fHistLambdaRecEtaET(0) 
+
+                                                     ,fHistLambdaEtaE(0) 
+                                                     ,fHistLambdaRecEtaE(0) 
+
+                                                     ,fHistLambdaEtaPt(0) 
+                                                     ,fHistLambdaRecEtaPt(0) 
+
+                                                     ,fHistLambdatotET(0) 
+                                                     ,fHistLambdaRectotET(0) 
+                                                     ,fHistLambdaRectotETDep(0) 
+
+                                                     ,fHistLambdaRecEtaEDepETDep(0) 
+                                                     ,fHistLambdaRecEtaETDep(0) 
+
+                                                     ,fHistLambdaRecEtaPtETDep(0) 
+
+                                                     ,fHistTotNeutraltotET(0)
+                                                     ,fHistTotNeutralRectotET(0)
+                                                     ,fHistTotNeutralRectotETDep(0)
+
+                                                     ,fHistTotaltotET(0)
+                                                     ,fHistTotalAcctotET(0)
+                                                     ,fHistTotalRectotET(0)
+                                                     ,fHistTotalRectotETDep(0)
+
+                                                     ,fHistElectronFirstMother(0) 
+                                                     ,fHistElectronFirstMotherXY(0) 
+                                                     ,fHistElectronNDaughters(0) 
+                                                     ,fHistElectronDaughters(0) 
+                                                     ,fHistElectronDaughtersXY(0) 
+
+                                                     ,fHistElectronFirstMotherAcc(0)  
+                                                     ,fHistElectronFirstMotherXYAcc(0)  
+                                                     ,fHistElectronNDaughtersAcc(0) 
+                                                     ,fHistElectronDaughtersAcc(0) 
+                                                     ,fHistElectronDaughtersXYAcc(0) 
+
+                                                     ,fHistElectronFirstMotherRec(0)  
+                                                     ,fHistElectronFirstMotherXYRec(0)  
+                                                     ,fHistElectronNDaughtersRec(0) 
+                                                     ,fHistElectronDaughtersRec(0) 
+                                                     ,fHistElectronDaughtersXYRec(0) 
+
+                                                     ,fHistNPPElectronFirstMother(0) 
+                                                     ,fHistNPPElectronFirstMotherXY(0) 
+                                                     ,fHistNPPElectronNDaughters(0) 
+                                                     ,fHistNPPElectronDaughters(0) 
+                                                     ,fHistNPPElectronDaughtersXY(0) 
+
+                                                     ,fHistNPPElectronFirstMotherAcc(0)  
+                                                     ,fHistNPPElectronFirstMotherXYAcc(0)  
+                                                     ,fHistNPPElectronNDaughtersAcc(0) 
+                                                     ,fHistNPPElectronDaughtersAcc(0) 
+                                                     ,fHistNPPElectronDaughtersXYAcc(0) 
+
+                                                     ,fHistNPPElectronFirstMotherRec(0)  
+                                                     ,fHistNPPElectronFirstMotherXYRec(0)  
+                                                     ,fHistNPPElectronNDaughtersRec(0) 
+                                                     ,fHistNPPElectronDaughtersRec(0) 
+                                                     ,fHistNPPElectronDaughtersXYRec(0) 
+
+                                                     ,fHistGammaFirstMother(0) 
+                                                     ,fHistGammaFirstMotherXY(0) 
+                                                     ,fHistGammaNDaughters(0) 
+                                                     ,fHistGammaDaughters(0) 
+                                                     ,fHistGammaDaughtersXY(0) 
+                                                     ,fHistConvGammaDaughtersXY(0) 
+                                                     ,fHistNonConvGammaDaughtersXY(0) 
+
+                                                     ,fHistGammaFirstMotherAcc(0)  
+                                                     ,fHistGammaFirstMotherXYAcc(0)  
+                                                     ,fHistGammaNDaughtersAcc(0) 
+                                                     ,fHistGammaDaughtersAcc(0) 
+                                                     ,fHistGammaDaughtersXYAcc(0) 
+                                                     ,fHistConvGammaDaughtersXYAcc(0) 
+                                                     ,fHistNonConvGammaDaughtersXYAcc(0) 
+
+                                                     ,fHistGammaFirstMotherRec(0)  
+                                                     ,fHistGammaFirstMotherXYRec(0)  
+                                                     ,fHistGammaNDaughtersRec(0) 
+                                                     ,fHistGammaDaughtersRec(0) 
+                                                     ,fHistGammaDaughtersXYRec(0) 
+                                                     ,fHistConvGammaDaughtersXYRec(0) 
+                                                     ,fHistNonConvGammaDaughtersXYRec(0) 
+
+                                                     ,fHistNPPGammaFirstMother(0) 
+                                                     ,fHistNPPGammaFirstMotherXY(0) 
+                                                     ,fHistNPPGammaNDaughters(0) 
+                                                     ,fHistNPPGammaDaughters(0) 
+                                                     ,fHistNPPGammaDaughtersXY(0) 
+
+                                                     ,fHistNPPGammaFirstMotherAcc(0)  
+                                                     ,fHistNPPGammaFirstMotherXYAcc(0)  
+                                                     ,fHistNPPGammaNDaughtersAcc(0) 
+                                                     ,fHistNPPGammaDaughtersAcc(0) 
+                                                     ,fHistNPPGammaDaughtersXYAcc(0) 
+
+                                                     ,fHistNPPGammaFirstMotherRec(0)  
+                                                     ,fHistNPPGammaFirstMotherXYRec(0)  
+                                                     ,fHistNPPGammaNDaughtersRec(0) 
+                                                     ,fHistNPPGammaDaughtersRec(0) 
+                                                     ,fHistNPPGammaDaughtersXYRec(0) 
+
+                                                     ,fHistAllERecEMC(0)       
+                                                     ,fHistAllPtRecPtMC(0)
+                                                     ,fHistElectronERecEMC(0)  
+                                                     ,fHistGammaERecEMC(0)
+
+                                                     ,fHistChargedRes(0)
+                                                     ,fHistChargedRes2(0)
+                                                     ,fHistChargedRes3(0)
+                                                     ,fHistNeutralRes(0)
+                                                     ,fHistElectronRes(0)
+                                                     ,fHistGammaRes(0)
+
+                                                     ,fHistIsInAcc(0)
 {//constructor
-       fHistogramNameSuffix = TString("EmcalMC");
+  fHistogramNameSuffix = TString("EmcalMC");
        
-       fResCut = 0.02;
-       //fResCut = fEmcalTrackDistanceCut;
+  fResCut = 0.02;
+  //fResCut = fEmcalTrackDistanceCut;
        
-       TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
-       //TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
-       TGeoManager::Import("geometry.root");
-       //fGeoUt = new AliEMCALGeometry("EMCAL_FIRSTYEAR","EMCAL");
+  TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
+  //TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
+  TGeoManager::Import("geometry.root");
+  //fGeoUt = new AliEMCALGeometry("EMCAL_FIRSTYEAR","EMCAL");
 }
 
 // dtor
@@ -716,4099 +716,4099 @@ AliAnalysisEmEtMonteCarlo::~AliAnalysisEmEtMonteCarlo()
 {//destructor
   //Marcelo, have you really cleaned up all memory here?  What about the histos?
   delete fGeoUt;
-       delete fHistPrimEtaEET;
-       delete fHistPrimEtaPtET; 
-       delete fHistPrimEtaET;
-       delete fHistPrimtotET;
-       
-       delete fHistPrimAccEtaEET; 
-       delete fHistPrimAccEtaPtET; 
-       delete fHistPrimAccEtaET; 
-       delete fHistPrimAcctotET;
-       
-       delete fHistPrimRecEtaEET; 
-       delete fHistPrimRecEtaPtET; 
-       delete fHistPrimRecEtaET; 
-       delete fHistPrimRectotET;
-
-       delete fHistPrimRecEtaEDepETDep; 
-       delete fHistPrimRecEtaPtETDep; 
-       delete fHistPrimRecEtaETDep; 
-       delete fHistPrimRectotETDep;
-       
-       // *******************
-       // electron ET
-       // *******************
-       delete fHistElectronEtaEET; 
-       delete fHistElectronEtaPtET; 
-       delete fHistElectronEtaET; 
-       delete fHistElectronEtaE; 
-       delete fHistElectronEtaPt; 
-       delete fHistElectrontotET; 
-
-       delete fHistConvElectronEtaEET;  
-       delete fHistConvElectronEtaPtET;  
-       delete fHistConvElectronEtaET;  
-       delete fHistConvElectronEtaE;  
-       delete fHistConvElectronEtaPt;  
-       delete fHistConvElectrontotET;  
-
-       delete fHistScatElectronEtaEET;  
-       delete fHistScatElectronEtaPtET;  
-       delete fHistScatElectronEtaET;  
-       delete fHistScatElectronEtaE;  
-       delete fHistScatElectronEtaPt;  
-       delete fHistScatElectrontotET;  
-       
-       // *******************
-       // total electron ET
-       // *******************
-       delete fHistTotElectrontotET;
-       
-       // *******************
-       // gamma ET
-       // *******************
-       delete fHistGammaEtaEET;  
-       delete fHistGammaEtaPtET;  
-       delete fHistGammaEtaET;  
-       delete fHistGammaEtaE;  
-       delete fHistGammaEtaPt;  
-       delete fHistGammatotET;  
-       
-       delete fHistAnnihGammaEtaEET;  
-       delete fHistAnnihGammaEtaPtET;  
-       delete fHistAnnihGammaEtaET;  
-       delete fHistAnnihGammaEtaE;  
-       delete fHistAnnihGammaEtaPt;  
-       delete fHistAnnihGammatotET;  
-
-       delete fHistScatGammaEtaEET;  
-       delete fHistScatGammaEtaPtET;  
-       delete fHistScatGammaEtaET;  
-       delete fHistScatGammaEtaE;  
-       delete fHistScatGammaEtaPt;  
-       delete fHistScatGammatotET;  
-
-       delete fHistConvGammaEtaEET;  
-       delete fHistConvGammaEtaPtET;  
-       delete fHistConvGammaEtaET;  
-       delete fHistConvGammaEtaE;  
-       delete fHistConvGammaEtaPt;  
-       delete fHistConvGammatotET;  
-       
-       delete fHistNonConvGammaEtaEET;  
-       delete fHistNonConvGammaEtaPtET;  
-       delete fHistNonConvGammaEtaET;  
-       delete fHistNonConvGammaEtaE;  
-       delete fHistNonConvGammaEtaPt;  
-       delete fHistNonConvGammatotET;  
-       
-       // *******************
-       // total gamma ET
-       // *******************
-       delete fHistTotGammatotET;
-
-       // *******************
-       // total electromagnetic ET
-       // *******************
-       delete fHistTotEMtotET;
-
-       // non-primary electromagnetic ET
-       delete fHistNPPElectronEtaEET; 
-       delete fHistNPPElectronEtaPtET; 
-       delete fHistNPPElectronEtaET; 
-       delete fHistNPPElectronEtaE; 
-       delete fHistNPPElectronEtaPt; 
-       delete fHistNPPElectrontotET; 
-
-       delete fHistNPPGammaEtaEET; 
-       delete fHistNPPGammaEtaPtET; 
-       delete fHistNPPGammaEtaET; 
-       delete fHistNPPGammaEtaE; 
-       delete fHistNPPGammaEtaPt; 
-       delete fHistNPPGammatotET; 
-
-       delete fHistTotNPPEMtotET;
-
-       delete fHistNPPPi0GammaEtaEET; 
-       delete fHistNPPPi0GammaEtaPtET; 
-       delete fHistNPPPi0GammaEtaET; 
-       delete fHistNPPPi0GammaEtaE; 
-       delete fHistNPPPi0GammaEtaPt; 
-       delete fHistNPPPi0GammatotET; 
+  delete fHistPrimEtaEET;
+  delete fHistPrimEtaPtET; 
+  delete fHistPrimEtaET;
+  delete fHistPrimtotET;
+       
+  delete fHistPrimAccEtaEET; 
+  delete fHistPrimAccEtaPtET; 
+  delete fHistPrimAccEtaET; 
+  delete fHistPrimAcctotET;
+       
+  delete fHistPrimRecEtaEET; 
+  delete fHistPrimRecEtaPtET; 
+  delete fHistPrimRecEtaET; 
+  delete fHistPrimRectotET;
+
+  delete fHistPrimRecEtaEDepETDep; 
+  delete fHistPrimRecEtaPtETDep; 
+  delete fHistPrimRecEtaETDep; 
+  delete fHistPrimRectotETDep;
+       
+  // *******************
+  // electron ET
+  // *******************
+  delete fHistElectronEtaEET; 
+  delete fHistElectronEtaPtET; 
+  delete fHistElectronEtaET; 
+  delete fHistElectronEtaE; 
+  delete fHistElectronEtaPt; 
+  delete fHistElectrontotET; 
+
+  delete fHistConvElectronEtaEET;  
+  delete fHistConvElectronEtaPtET;  
+  delete fHistConvElectronEtaET;  
+  delete fHistConvElectronEtaE;  
+  delete fHistConvElectronEtaPt;  
+  delete fHistConvElectrontotET;  
+
+  delete fHistScatElectronEtaEET;  
+  delete fHistScatElectronEtaPtET;  
+  delete fHistScatElectronEtaET;  
+  delete fHistScatElectronEtaE;  
+  delete fHistScatElectronEtaPt;  
+  delete fHistScatElectrontotET;  
+       
+  // *******************
+  // total electron ET
+  // *******************
+  delete fHistTotElectrontotET;
+       
+  // *******************
+  // gamma ET
+  // *******************
+  delete fHistGammaEtaEET;  
+  delete fHistGammaEtaPtET;  
+  delete fHistGammaEtaET;  
+  delete fHistGammaEtaE;  
+  delete fHistGammaEtaPt;  
+  delete fHistGammatotET;  
+       
+  delete fHistAnnihGammaEtaEET;  
+  delete fHistAnnihGammaEtaPtET;  
+  delete fHistAnnihGammaEtaET;  
+  delete fHistAnnihGammaEtaE;  
+  delete fHistAnnihGammaEtaPt;  
+  delete fHistAnnihGammatotET;  
+
+  delete fHistScatGammaEtaEET;  
+  delete fHistScatGammaEtaPtET;  
+  delete fHistScatGammaEtaET;  
+  delete fHistScatGammaEtaE;  
+  delete fHistScatGammaEtaPt;  
+  delete fHistScatGammatotET;  
+
+  delete fHistConvGammaEtaEET;  
+  delete fHistConvGammaEtaPtET;  
+  delete fHistConvGammaEtaET;  
+  delete fHistConvGammaEtaE;  
+  delete fHistConvGammaEtaPt;  
+  delete fHistConvGammatotET;  
+       
+  delete fHistNonConvGammaEtaEET;  
+  delete fHistNonConvGammaEtaPtET;  
+  delete fHistNonConvGammaEtaET;  
+  delete fHistNonConvGammaEtaE;  
+  delete fHistNonConvGammaEtaPt;  
+  delete fHistNonConvGammatotET;  
+       
+  // *******************
+  // total gamma ET
+  // *******************
+  delete fHistTotGammatotET;
+
+  // *******************
+  // total electromagnetic ET
+  // *******************
+  delete fHistTotEMtotET;
+
+  // non-primary electromagnetic ET
+  delete fHistNPPElectronEtaEET; 
+  delete fHistNPPElectronEtaPtET; 
+  delete fHistNPPElectronEtaET; 
+  delete fHistNPPElectronEtaE; 
+  delete fHistNPPElectronEtaPt; 
+  delete fHistNPPElectrontotET; 
+
+  delete fHistNPPGammaEtaEET; 
+  delete fHistNPPGammaEtaPtET; 
+  delete fHistNPPGammaEtaET; 
+  delete fHistNPPGammaEtaE; 
+  delete fHistNPPGammaEtaPt; 
+  delete fHistNPPGammatotET; 
+
+  delete fHistTotNPPEMtotET;
+
+  delete fHistNPPPi0GammaEtaEET; 
+  delete fHistNPPPi0GammaEtaPtET; 
+  delete fHistNPPPi0GammaEtaET; 
+  delete fHistNPPPi0GammaEtaE; 
+  delete fHistNPPPi0GammaEtaPt; 
+  delete fHistNPPPi0GammatotET; 
                
-       // *******************
-       // electron ET inside EMCal acceptance
-       // *******************
-       delete fHistElectronAccEtaEET; 
-       delete fHistElectronAccEtaPtET; 
-       delete fHistElectronAccEtaET; 
-       delete fHistElectronAccEtaE; 
-       delete fHistElectronAccEtaPt; 
-       delete fHistElectronAcctotET; 
-       
-       delete fHistConvElectronAccEtaEET;  
-       delete fHistConvElectronAccEtaPtET;  
-       delete fHistConvElectronAccEtaET;  
-       delete fHistConvElectronAccEtaE;  
-       delete fHistConvElectronAccEtaPt;  
-       delete fHistConvElectronAcctotET;  
-       
-       delete fHistScatElectronAccEtaEET;  
-       delete fHistScatElectronAccEtaPtET;  
-       delete fHistScatElectronAccEtaET;  
-       delete fHistScatElectronAccEtaE;  
-       delete fHistScatElectronAccEtaPt;  
-       delete fHistScatElectronAcctotET;  
-       
-       // *******************
-       // total electron ET inside EMCal acceptance
-       // *******************
-       delete fHistTotElectronAcctotET;
-
-       // *******************
-       // gamma ET inside EMCal acceptance
-       // *******************
-       delete fHistGammaAccEtaEET;  
-       delete fHistGammaAccEtaPtET;  
-       delete fHistGammaAccEtaET;  
-       delete fHistGammaAccEtaE;  
-       delete fHistGammaAccEtaPt;  
-       delete fHistGammaAcctotET;  
-       
-       delete fHistAnnihGammaAccEtaEET;  
-       delete fHistAnnihGammaAccEtaPtET;  
-       delete fHistAnnihGammaAccEtaET;  
-       delete fHistAnnihGammaAccEtaE;  
-       delete fHistAnnihGammaAccEtaPt;  
-       delete fHistAnnihGammaAcctotET;  
-       
-       delete fHistScatGammaAccEtaEET;  
-       delete fHistScatGammaAccEtaPtET;  
-       delete fHistScatGammaAccEtaET;  
-       delete fHistScatGammaAccEtaE;  
-       delete fHistScatGammaAccEtaPt;  
-       delete fHistScatGammaAcctotET;  
-       
-       delete fHistConvGammaAccEtaEET;  
-       delete fHistConvGammaAccEtaPtET;  
-       delete fHistConvGammaAccEtaET;  
-       delete fHistConvGammaAccEtaE;  
-       delete fHistConvGammaAccEtaPt;  
-       delete fHistConvGammaAcctotET;  
-       
-       delete fHistNonConvGammaAccEtaEET;  
-       delete fHistNonConvGammaAccEtaPtET;  
-       delete fHistNonConvGammaAccEtaET;  
-       delete fHistNonConvGammaAccEtaE;  
-       delete fHistNonConvGammaAccEtaPt;  
-       delete fHistNonConvGammaAcctotET;  
-       
-       // *******************
-       // total gamma ET inside EMCal acceptance
-       // *******************
-       delete fHistTotGammaAcctotET;
-
-       // *******************
-       // total electromagnetic ET inside EMCal acceptance
-       // *******************
-       delete fHistTotEMAcctotET;
-
-       // non-primary electromagnetic ET
-       delete fHistNPPElectronAccEtaEET; 
-       delete fHistNPPElectronAccEtaPtET; 
-       delete fHistNPPElectronAccEtaE; 
-       delete fHistNPPElectronAccEtaPt; 
-       
-       delete fHistNPPGammaAccEtaEET; 
-       delete fHistNPPGammaAccEtaPtET; 
-       delete fHistNPPGammaAccEtaE; 
-       delete fHistNPPGammaAccEtaPt;   
-       
-       // *******************
-       // electron ET reconstructed in EMCal
-       // *******************
-       delete fHistElectronRecEtaEET; 
-       delete fHistElectronRecEtaPtET; 
-       delete fHistElectronRecEtaET; 
-       delete fHistElectronRecEtaE; 
-       delete fHistElectronRecEtaPt; 
-       delete fHistElectronRectotET; 
-       
-       delete fHistConvElectronRecEtaEET;  
-       delete fHistConvElectronRecEtaPtET;  
-       delete fHistConvElectronRecEtaET;  
-       delete fHistConvElectronRecEtaE;  
-       delete fHistConvElectronRecEtaPt;  
-       delete fHistConvElectronRectotET;  
-       
-       delete fHistScatElectronRecEtaEET;  
-       delete fHistScatElectronRecEtaPtET;  
-       delete fHistScatElectronRecEtaET;  
-       delete fHistScatElectronRecEtaE;  
-       delete fHistScatElectronRecEtaPt;  
-       delete fHistScatElectronRectotET;  
-       
-       // *******************
-       // total Electron ET reconstructed in EMCal
-       // *******************
-       delete fHistTotElectronRectotET;
-
-       // *******************
-       // gamma ET reconstructed in EMCal
-       // *******************
-       delete fHistGammaRecEtaEET;  
-       delete fHistGammaRecEtaPtET;  
-       delete fHistGammaRecEtaET;  
-       delete fHistGammaRecEtaE;  
-       delete fHistGammaRecEtaPt;  
-       delete fHistGammaRectotET;  
-       
-       delete fHistAnnihGammaRecEtaEET;  
-       delete fHistAnnihGammaRecEtaPtET;  
-       delete fHistAnnihGammaRecEtaET;  
-       delete fHistAnnihGammaRecEtaE;  
-       delete fHistAnnihGammaRecEtaPt;  
-       delete fHistAnnihGammaRectotET;  
-       
-       delete fHistScatGammaRecEtaEET;  
-       delete fHistScatGammaRecEtaPtET;  
-       delete fHistScatGammaRecEtaET;  
-       delete fHistScatGammaRecEtaE;  
-       delete fHistScatGammaRecEtaPt;  
-       delete fHistScatGammaRectotET;  
-
-       // *******************
-       // total gamma ET reconstructed in EMCal
-       // *******************
-       delete fHistTotGammaRectotET;
-
-       // *******************
-       // total EM ET reconstructed in EMCal
-       // *******************
-       delete fHistTotEMRectotET;
-
-       // non-primary electromagnetic ET
-       delete fHistNPPElectronRecEtaEET; 
-       delete fHistNPPElectronRecEtaPtET; 
-       delete fHistNPPElectronRecEtaET; 
-       delete fHistNPPElectronRecEtaE; 
-       delete fHistNPPElectronRecEtaPt; 
-       delete fHistNPPElectronRectotET; 
-       
-       delete fHistNPPGammaRecEtaEET; 
-       delete fHistNPPGammaRecEtaPtET; 
-       delete fHistNPPGammaRecEtaET; 
-       delete fHistNPPGammaRecEtaE; 
-       delete fHistNPPGammaRecEtaPt; 
-       delete fHistNPPGammaRectotET; 
-       
-       delete fHistTotNPPEMRectotET;
-
-       delete fHistNPPPi0GammaRecEtaEET; 
-       delete fHistNPPPi0GammaRecEtaPtET; 
-       delete fHistNPPPi0GammaRecEtaET; 
-       delete fHistNPPPi0GammaRecEtaE; 
-       delete fHistNPPPi0GammaRecEtaPt; 
-       delete fHistNPPPi0GammaRectotET; 
-       
-       // *******************
-       // muon ET (+ and -)
-       // *******************
-       delete fHistMuonEtaEET; 
-       delete fHistMuonAccEtaEET; 
-       delete fHistMuonRecEtaEET; 
-       delete fHistMuonMatchEtaEET; 
-
-       delete fHistMuonEtaPtET; 
-       delete fHistMuonAccEtaPtET; 
-       delete fHistMuonRecEtaPtET; 
-       delete fHistMuonMatchEtaPtET; 
-
-       delete fHistMuonEtaET; 
-       delete fHistMuonAccEtaET; 
-       delete fHistMuonRecEtaET; 
-       delete fHistMuonMatchEtaET; 
-       
-       delete fHistMuonEtaE; 
-       delete fHistMuonAccEtaE; 
-       delete fHistMuonRecEtaE; 
-       delete fHistMuonMatchEtaE; 
-       
-       delete fHistMuonEtaPt; 
-       delete fHistMuonAccEtaPt; 
-       delete fHistMuonRecEtaPt; 
-       delete fHistMuonMatchEtaPt; 
-       
-       delete fHistMuontotET; 
-       delete fHistMuonAcctotET; 
-       delete fHistMuonRectotET; 
-       delete fHistMuonMatchtotET; 
-       
-       delete fHistMuonRectotETDep; 
-       delete fHistMuonMatchtotETDep; 
-       
-       delete fHistMuonRecEtaEDepETDep; 
-       delete fHistMuonMatchEtaEDepETDep; 
-
-       delete fHistMuonRecEtaPtETDep; 
-       delete fHistMuonMatchEtaPtETDep; 
-       
-       delete fHistMuonRecEtaETDep; 
-       delete fHistMuonMatchEtaETDep; 
-
-       delete fHistMuonRecResEET; 
-       delete fHistMuonRecResPtET; 
-       delete fHistMuonRecResE; 
-       delete fHistMuonRecResPt; 
-       delete fHistMuonRecResEDepETDep; 
-       delete fHistMuonRecResPtETDep; 
-       
-       // *******************
-       // pion ET (+ and -)
-       // *******************
-       delete fHistPionEtaEET; 
-       delete fHistPionAccEtaEET; 
-       delete fHistPionRecEtaEET; 
-       delete fHistPionMatchEtaEET; 
-       
-       delete fHistPionEtaPtET; 
-       delete fHistPionAccEtaPtET; 
-       delete fHistPionRecEtaPtET; 
-       delete fHistPionMatchEtaPtET; 
-       
-       delete fHistPionEtaET; 
-       delete fHistPionAccEtaET; 
-       delete fHistPionRecEtaET; 
-       delete fHistPionMatchEtaET; 
-       
-       delete fHistPionEtaE; 
-       delete fHistPionAccEtaE; 
-       delete fHistPionRecEtaE; 
-       delete fHistPionMatchEtaE; 
-       
-       delete fHistPionEtaPt; 
-       delete fHistPionAccEtaPt; 
-       delete fHistPionRecEtaPt; 
-       delete fHistPionMatchEtaPt; 
-       
-       delete fHistPiontotET; 
-       delete fHistPionAcctotET; 
-       delete fHistPionRectotET; 
-       delete fHistPionMatchtotET; 
-       
-       delete fHistPionRectotETDep; 
-       delete fHistPionMatchtotETDep; 
-       
-       delete fHistPionRecEtaEDepETDep; 
-       delete fHistPionMatchEtaEDepETDep; 
-
-       delete fHistPionRecEtaPtETDep; 
-       delete fHistPionMatchEtaPtETDep; 
-       
-       delete fHistPionRecEtaETDep; 
-       delete fHistPionMatchEtaETDep; 
-       
-       delete fHistPionRecResEET; 
-       delete fHistPionRecResPtET; 
-       delete fHistPionRecResE; 
-       delete fHistPionRecResPt; 
-       delete fHistPionRecResEDepETDep; 
-       delete fHistPionRecResPtETDep; 
-       
-       // *******************
-       // charged kaon (+ and -) ET
-       // *******************
-       delete fHistKaonEtaEET; 
-       delete fHistKaonAccEtaEET; 
-       delete fHistKaonRecEtaEET; 
-       delete fHistKaonMatchEtaEET; 
-       
-       delete fHistKaonEtaPtET; 
-       delete fHistKaonAccEtaPtET; 
-       delete fHistKaonRecEtaPtET; 
-       delete fHistKaonMatchEtaPtET; 
-       
-       delete fHistKaonEtaET; 
-       delete fHistKaonAccEtaET; 
-       delete fHistKaonRecEtaET; 
-       delete fHistKaonMatchEtaET; 
-       
-       delete fHistKaonEtaE; 
-       delete fHistKaonAccEtaE; 
-       delete fHistKaonRecEtaE; 
-       delete fHistKaonMatchEtaE; 
-       
-       delete fHistKaonEtaPt; 
-       delete fHistKaonAccEtaPt; 
-       delete fHistKaonRecEtaPt; 
-       delete fHistKaonMatchEtaPt; 
-
-       delete fHistKaontotET; 
-       delete fHistKaonAcctotET; 
-       delete fHistKaonRectotET; 
-       delete fHistKaonMatchtotET; 
-       
-       delete fHistKaonRectotETDep; 
-       delete fHistKaonMatchtotETDep; 
-       
-       delete fHistKaonRecEtaEDepETDep; 
-       delete fHistKaonMatchEtaEDepETDep; 
-
-       delete fHistKaonRecEtaPtETDep; 
-       delete fHistKaonMatchEtaPtETDep; 
-       
-       delete fHistKaonRecEtaETDep; 
-       delete fHistKaonMatchEtaETDep; 
-       
-       delete fHistKaonRecResEET; 
-       delete fHistKaonRecResPtET; 
-       delete fHistKaonRecResE; 
-       delete fHistKaonRecResPt; 
-       delete fHistKaonRecResEDepETDep; 
-       delete fHistKaonRecResPtETDep;  
-       
-       // *******************
-       // proton (anti) ET
-       // *******************
-       delete fHistProtonEtaEET; 
-       delete fHistProtonAccEtaEET; 
-       delete fHistProtonRecEtaEET; 
-       delete fHistProtonMatchEtaEET; 
-       
-       delete fHistProtonEtaPtET; 
-       delete fHistProtonAccEtaPtET; 
-       delete fHistProtonRecEtaPtET; 
-       delete fHistProtonMatchEtaPtET; 
-       
-       delete fHistProtonEtaET; 
-       delete fHistProtonAccEtaET; 
-       delete fHistProtonRecEtaET; 
-       delete fHistProtonMatchEtaET; 
-       
-       delete fHistProtonEtaE; 
-       delete fHistProtonAccEtaE; 
-       delete fHistProtonRecEtaE; 
-       delete fHistProtonMatchEtaE; 
-       
-       delete fHistProtonEtaPt; 
-       delete fHistProtonAccEtaPt; 
-       delete fHistProtonRecEtaPt; 
-       delete fHistProtonMatchEtaPt; 
-
-       delete fHistProtontotET; 
-       delete fHistProtonAcctotET; 
-       delete fHistProtonRectotET; 
-       delete fHistProtonMatchtotET; 
-       
-       delete fHistProtonRectotETDep; 
-       delete fHistProtonMatchtotETDep; 
-       
-       delete fHistProtonRecEtaEDepETDep; 
-       delete fHistProtonMatchEtaEDepETDep; 
-       
-       delete fHistProtonRecEtaPtETDep; 
-       delete fHistProtonMatchEtaPtETDep; 
-       
-       delete fHistProtonRecEtaETDep; 
-       delete fHistProtonMatchEtaETDep; 
-
-       delete fHistProtonRecResEET; 
-       delete fHistProtonRecResPtET; 
-       delete fHistProtonRecResE; 
-       delete fHistProtonRecResPt; 
-       delete fHistProtonRecResEDepETDep; 
-       delete fHistProtonRecResPtETDep; 
-       
-       // *******************
-       // total charged ET
-       // *******************
-       delete fHistTotChargedtotET;
-       delete fHistTotChargedAcctotET;
-       delete fHistTotChargedRectotET;
-       delete fHistTotChargedRectotETDep;
-       delete fHistTotChargedMatchtotET;
-       delete fHistTotChargedMatchtotETDep;
-       
-       // *******************
-       // neutron (anti) ET
-       // *******************
-       delete fHistNeutronEtaEET; 
-       delete fHistNeutronAccEtaEET; 
-       delete fHistNeutronRecEtaEET; 
-       
-       delete fHistNeutronEtaPtET; 
-       delete fHistNeutronAccEtaPtET; 
-       delete fHistNeutronRecEtaPtET; 
-       
-       delete fHistNeutronEtaET; 
-       delete fHistNeutronAccEtaET; 
-       delete fHistNeutronRecEtaET; 
-       
-       delete fHistNeutronEtaE; 
-       delete fHistNeutronAccEtaE; 
-       delete fHistNeutronRecEtaE; 
-       
-       delete fHistNeutronEtaPt; 
-       delete fHistNeutronAccEtaPt; 
-       delete fHistNeutronRecEtaPt; 
-       
-       delete fHistNeutrontotET; 
-       delete fHistNeutronAcctotET; 
-       delete fHistNeutronRectotET; 
-       delete fHistNeutronRectotETDep; 
-       
-       delete fHistNeutronRecEtaEDepETDep; 
-       delete fHistNeutronRecEtaETDep; 
-       
-       delete fHistNeutronRecEtaPtETDep; 
+  // *******************
+  // electron ET inside EMCal acceptance
+  // *******************
+  delete fHistElectronAccEtaEET; 
+  delete fHistElectronAccEtaPtET; 
+  delete fHistElectronAccEtaET; 
+  delete fHistElectronAccEtaE; 
+  delete fHistElectronAccEtaPt; 
+  delete fHistElectronAcctotET; 
+       
+  delete fHistConvElectronAccEtaEET;  
+  delete fHistConvElectronAccEtaPtET;  
+  delete fHistConvElectronAccEtaET;  
+  delete fHistConvElectronAccEtaE;  
+  delete fHistConvElectronAccEtaPt;  
+  delete fHistConvElectronAcctotET;  
+       
+  delete fHistScatElectronAccEtaEET;  
+  delete fHistScatElectronAccEtaPtET;  
+  delete fHistScatElectronAccEtaET;  
+  delete fHistScatElectronAccEtaE;  
+  delete fHistScatElectronAccEtaPt;  
+  delete fHistScatElectronAcctotET;  
+       
+  // *******************
+  // total electron ET inside EMCal acceptance
+  // *******************
+  delete fHistTotElectronAcctotET;
+
+  // *******************
+  // gamma ET inside EMCal acceptance
+  // *******************
+  delete fHistGammaAccEtaEET;  
+  delete fHistGammaAccEtaPtET;  
+  delete fHistGammaAccEtaET;  
+  delete fHistGammaAccEtaE;  
+  delete fHistGammaAccEtaPt;  
+  delete fHistGammaAcctotET;  
+       
+  delete fHistAnnihGammaAccEtaEET;  
+  delete fHistAnnihGammaAccEtaPtET;  
+  delete fHistAnnihGammaAccEtaET;  
+  delete fHistAnnihGammaAccEtaE;  
+  delete fHistAnnihGammaAccEtaPt;  
+  delete fHistAnnihGammaAcctotET;  
+       
+  delete fHistScatGammaAccEtaEET;  
+  delete fHistScatGammaAccEtaPtET;  
+  delete fHistScatGammaAccEtaET;  
+  delete fHistScatGammaAccEtaE;  
+  delete fHistScatGammaAccEtaPt;  
+  delete fHistScatGammaAcctotET;  
+       
+  delete fHistConvGammaAccEtaEET;  
+  delete fHistConvGammaAccEtaPtET;  
+  delete fHistConvGammaAccEtaET;  
+  delete fHistConvGammaAccEtaE;  
+  delete fHistConvGammaAccEtaPt;  
+  delete fHistConvGammaAcctotET;  
+       
+  delete fHistNonConvGammaAccEtaEET;  
+  delete fHistNonConvGammaAccEtaPtET;  
+  delete fHistNonConvGammaAccEtaET;  
+  delete fHistNonConvGammaAccEtaE;  
+  delete fHistNonConvGammaAccEtaPt;  
+  delete fHistNonConvGammaAcctotET;  
+       
+  // *******************
+  // total gamma ET inside EMCal acceptance
+  // *******************
+  delete fHistTotGammaAcctotET;
+
+  // *******************
+  // total electromagnetic ET inside EMCal acceptance
+  // *******************
+  delete fHistTotEMAcctotET;
+
+  // non-primary electromagnetic ET
+  delete fHistNPPElectronAccEtaEET; 
+  delete fHistNPPElectronAccEtaPtET; 
+  delete fHistNPPElectronAccEtaE; 
+  delete fHistNPPElectronAccEtaPt; 
+       
+  delete fHistNPPGammaAccEtaEET; 
+  delete fHistNPPGammaAccEtaPtET; 
+  delete fHistNPPGammaAccEtaE; 
+  delete fHistNPPGammaAccEtaPt;        
+       
+  // *******************
+  // electron ET reconstructed in EMCal
+  // *******************
+  delete fHistElectronRecEtaEET; 
+  delete fHistElectronRecEtaPtET; 
+  delete fHistElectronRecEtaET; 
+  delete fHistElectronRecEtaE; 
+  delete fHistElectronRecEtaPt; 
+  delete fHistElectronRectotET; 
+       
+  delete fHistConvElectronRecEtaEET;  
+  delete fHistConvElectronRecEtaPtET;  
+  delete fHistConvElectronRecEtaET;  
+  delete fHistConvElectronRecEtaE;  
+  delete fHistConvElectronRecEtaPt;  
+  delete fHistConvElectronRectotET;  
+       
+  delete fHistScatElectronRecEtaEET;  
+  delete fHistScatElectronRecEtaPtET;  
+  delete fHistScatElectronRecEtaET;  
+  delete fHistScatElectronRecEtaE;  
+  delete fHistScatElectronRecEtaPt;  
+  delete fHistScatElectronRectotET;  
+       
+  // *******************
+  // total Electron ET reconstructed in EMCal
+  // *******************
+  delete fHistTotElectronRectotET;
+
+  // *******************
+  // gamma ET reconstructed in EMCal
+  // *******************
+  delete fHistGammaRecEtaEET;  
+  delete fHistGammaRecEtaPtET;  
+  delete fHistGammaRecEtaET;  
+  delete fHistGammaRecEtaE;  
+  delete fHistGammaRecEtaPt;  
+  delete fHistGammaRectotET;  
+       
+  delete fHistAnnihGammaRecEtaEET;  
+  delete fHistAnnihGammaRecEtaPtET;  
+  delete fHistAnnihGammaRecEtaET;  
+  delete fHistAnnihGammaRecEtaE;  
+  delete fHistAnnihGammaRecEtaPt;  
+  delete fHistAnnihGammaRectotET;  
+       
+  delete fHistScatGammaRecEtaEET;  
+  delete fHistScatGammaRecEtaPtET;  
+  delete fHistScatGammaRecEtaET;  
+  delete fHistScatGammaRecEtaE;  
+  delete fHistScatGammaRecEtaPt;  
+  delete fHistScatGammaRectotET;  
+
+  // *******************
+  // total gamma ET reconstructed in EMCal
+  // *******************
+  delete fHistTotGammaRectotET;
+
+  // *******************
+  // total EM ET reconstructed in EMCal
+  // *******************
+  delete fHistTotEMRectotET;
+
+  // non-primary electromagnetic ET
+  delete fHistNPPElectronRecEtaEET; 
+  delete fHistNPPElectronRecEtaPtET; 
+  delete fHistNPPElectronRecEtaET; 
+  delete fHistNPPElectronRecEtaE; 
+  delete fHistNPPElectronRecEtaPt; 
+  delete fHistNPPElectronRectotET; 
+       
+  delete fHistNPPGammaRecEtaEET; 
+  delete fHistNPPGammaRecEtaPtET; 
+  delete fHistNPPGammaRecEtaET; 
+  delete fHistNPPGammaRecEtaE; 
+  delete fHistNPPGammaRecEtaPt; 
+  delete fHistNPPGammaRectotET; 
+       
+  delete fHistTotNPPEMRectotET;
+
+  delete fHistNPPPi0GammaRecEtaEET; 
+  delete fHistNPPPi0GammaRecEtaPtET; 
+  delete fHistNPPPi0GammaRecEtaET; 
+  delete fHistNPPPi0GammaRecEtaE; 
+  delete fHistNPPPi0GammaRecEtaPt; 
+  delete fHistNPPPi0GammaRectotET; 
+       
+  // *******************
+  // muon ET (+ and -)
+  // *******************
+  delete fHistMuonEtaEET; 
+  delete fHistMuonAccEtaEET; 
+  delete fHistMuonRecEtaEET; 
+  delete fHistMuonMatchEtaEET; 
+
+  delete fHistMuonEtaPtET; 
+  delete fHistMuonAccEtaPtET; 
+  delete fHistMuonRecEtaPtET; 
+  delete fHistMuonMatchEtaPtET; 
+
+  delete fHistMuonEtaET; 
+  delete fHistMuonAccEtaET; 
+  delete fHistMuonRecEtaET; 
+  delete fHistMuonMatchEtaET; 
+       
+  delete fHistMuonEtaE; 
+  delete fHistMuonAccEtaE; 
+  delete fHistMuonRecEtaE; 
+  delete fHistMuonMatchEtaE; 
+       
+  delete fHistMuonEtaPt; 
+  delete fHistMuonAccEtaPt; 
+  delete fHistMuonRecEtaPt; 
+  delete fHistMuonMatchEtaPt; 
+       
+  delete fHistMuontotET; 
+  delete fHistMuonAcctotET; 
+  delete fHistMuonRectotET; 
+  delete fHistMuonMatchtotET; 
+       
+  delete fHistMuonRectotETDep; 
+  delete fHistMuonMatchtotETDep; 
+       
+  delete fHistMuonRecEtaEDepETDep; 
+  delete fHistMuonMatchEtaEDepETDep; 
+
+  delete fHistMuonRecEtaPtETDep; 
+  delete fHistMuonMatchEtaPtETDep; 
+       
+  delete fHistMuonRecEtaETDep; 
+  delete fHistMuonMatchEtaETDep; 
+
+  delete fHistMuonRecResEET; 
+  delete fHistMuonRecResPtET; 
+  delete fHistMuonRecResE; 
+  delete fHistMuonRecResPt; 
+  delete fHistMuonRecResEDepETDep; 
+  delete fHistMuonRecResPtETDep; 
+       
+  // *******************
+  // pion ET (+ and -)
+  // *******************
+  delete fHistPionEtaEET; 
+  delete fHistPionAccEtaEET; 
+  delete fHistPionRecEtaEET; 
+  delete fHistPionMatchEtaEET; 
+       
+  delete fHistPionEtaPtET; 
+  delete fHistPionAccEtaPtET; 
+  delete fHistPionRecEtaPtET; 
+  delete fHistPionMatchEtaPtET; 
+       
+  delete fHistPionEtaET; 
+  delete fHistPionAccEtaET; 
+  delete fHistPionRecEtaET; 
+  delete fHistPionMatchEtaET; 
+       
+  delete fHistPionEtaE; 
+  delete fHistPionAccEtaE; 
+  delete fHistPionRecEtaE; 
+  delete fHistPionMatchEtaE; 
+       
+  delete fHistPionEtaPt; 
+  delete fHistPionAccEtaPt; 
+  delete fHistPionRecEtaPt; 
+  delete fHistPionMatchEtaPt; 
+       
+  delete fHistPiontotET; 
+  delete fHistPionAcctotET; 
+  delete fHistPionRectotET; 
+  delete fHistPionMatchtotET; 
+       
+  delete fHistPionRectotETDep; 
+  delete fHistPionMatchtotETDep; 
+       
+  delete fHistPionRecEtaEDepETDep; 
+  delete fHistPionMatchEtaEDepETDep; 
+
+  delete fHistPionRecEtaPtETDep; 
+  delete fHistPionMatchEtaPtETDep; 
+       
+  delete fHistPionRecEtaETDep; 
+  delete fHistPionMatchEtaETDep; 
+       
+  delete fHistPionRecResEET; 
+  delete fHistPionRecResPtET; 
+  delete fHistPionRecResE; 
+  delete fHistPionRecResPt; 
+  delete fHistPionRecResEDepETDep; 
+  delete fHistPionRecResPtETDep; 
+       
+  // *******************
+  // charged kaon (+ and -) ET
+  // *******************
+  delete fHistKaonEtaEET; 
+  delete fHistKaonAccEtaEET; 
+  delete fHistKaonRecEtaEET; 
+  delete fHistKaonMatchEtaEET; 
+       
+  delete fHistKaonEtaPtET; 
+  delete fHistKaonAccEtaPtET; 
+  delete fHistKaonRecEtaPtET; 
+  delete fHistKaonMatchEtaPtET; 
+       
+  delete fHistKaonEtaET; 
+  delete fHistKaonAccEtaET; 
+  delete fHistKaonRecEtaET; 
+  delete fHistKaonMatchEtaET; 
+       
+  delete fHistKaonEtaE; 
+  delete fHistKaonAccEtaE; 
+  delete fHistKaonRecEtaE; 
+  delete fHistKaonMatchEtaE; 
+       
+  delete fHistKaonEtaPt; 
+  delete fHistKaonAccEtaPt; 
+  delete fHistKaonRecEtaPt; 
+  delete fHistKaonMatchEtaPt; 
+
+  delete fHistKaontotET; 
+  delete fHistKaonAcctotET; 
+  delete fHistKaonRectotET; 
+  delete fHistKaonMatchtotET; 
+       
+  delete fHistKaonRectotETDep; 
+  delete fHistKaonMatchtotETDep; 
+       
+  delete fHistKaonRecEtaEDepETDep; 
+  delete fHistKaonMatchEtaEDepETDep; 
+
+  delete fHistKaonRecEtaPtETDep; 
+  delete fHistKaonMatchEtaPtETDep; 
+       
+  delete fHistKaonRecEtaETDep; 
+  delete fHistKaonMatchEtaETDep; 
+       
+  delete fHistKaonRecResEET; 
+  delete fHistKaonRecResPtET; 
+  delete fHistKaonRecResE; 
+  delete fHistKaonRecResPt; 
+  delete fHistKaonRecResEDepETDep; 
+  delete fHistKaonRecResPtETDep;       
+       
+  // *******************
+  // proton (anti) ET
+  // *******************
+  delete fHistProtonEtaEET; 
+  delete fHistProtonAccEtaEET; 
+  delete fHistProtonRecEtaEET; 
+  delete fHistProtonMatchEtaEET; 
+       
+  delete fHistProtonEtaPtET; 
+  delete fHistProtonAccEtaPtET; 
+  delete fHistProtonRecEtaPtET; 
+  delete fHistProtonMatchEtaPtET; 
+       
+  delete fHistProtonEtaET; 
+  delete fHistProtonAccEtaET; 
+  delete fHistProtonRecEtaET; 
+  delete fHistProtonMatchEtaET; 
+       
+  delete fHistProtonEtaE; 
+  delete fHistProtonAccEtaE; 
+  delete fHistProtonRecEtaE; 
+  delete fHistProtonMatchEtaE; 
+       
+  delete fHistProtonEtaPt; 
+  delete fHistProtonAccEtaPt; 
+  delete fHistProtonRecEtaPt; 
+  delete fHistProtonMatchEtaPt; 
+
+  delete fHistProtontotET; 
+  delete fHistProtonAcctotET; 
+  delete fHistProtonRectotET; 
+  delete fHistProtonMatchtotET; 
+       
+  delete fHistProtonRectotETDep; 
+  delete fHistProtonMatchtotETDep; 
+       
+  delete fHistProtonRecEtaEDepETDep; 
+  delete fHistProtonMatchEtaEDepETDep; 
+       
+  delete fHistProtonRecEtaPtETDep; 
+  delete fHistProtonMatchEtaPtETDep; 
+       
+  delete fHistProtonRecEtaETDep; 
+  delete fHistProtonMatchEtaETDep; 
+
+  delete fHistProtonRecResEET; 
+  delete fHistProtonRecResPtET; 
+  delete fHistProtonRecResE; 
+  delete fHistProtonRecResPt; 
+  delete fHistProtonRecResEDepETDep; 
+  delete fHistProtonRecResPtETDep; 
+       
+  // *******************
+  // total charged ET
+  // *******************
+  delete fHistTotChargedtotET;
+  delete fHistTotChargedAcctotET;
+  delete fHistTotChargedRectotET;
+  delete fHistTotChargedRectotETDep;
+  delete fHistTotChargedMatchtotET;
+  delete fHistTotChargedMatchtotETDep;
+       
+  // *******************
+  // neutron (anti) ET
+  // *******************
+  delete fHistNeutronEtaEET; 
+  delete fHistNeutronAccEtaEET; 
+  delete fHistNeutronRecEtaEET; 
+       
+  delete fHistNeutronEtaPtET; 
+  delete fHistNeutronAccEtaPtET; 
+  delete fHistNeutronRecEtaPtET; 
+       
+  delete fHistNeutronEtaET; 
+  delete fHistNeutronAccEtaET; 
+  delete fHistNeutronRecEtaET; 
+       
+  delete fHistNeutronEtaE; 
+  delete fHistNeutronAccEtaE; 
+  delete fHistNeutronRecEtaE; 
+       
+  delete fHistNeutronEtaPt; 
+  delete fHistNeutronAccEtaPt; 
+  delete fHistNeutronRecEtaPt; 
+       
+  delete fHistNeutrontotET; 
+  delete fHistNeutronAcctotET; 
+  delete fHistNeutronRectotET; 
+  delete fHistNeutronRectotETDep; 
+       
+  delete fHistNeutronRecEtaEDepETDep; 
+  delete fHistNeutronRecEtaETDep; 
+       
+  delete fHistNeutronRecEtaPtETDep; 
                
-       // *******************
-       // neutral kaon ET
-       // *******************
-       delete fHistK0EtaEET; 
-       delete fHistK0RecEtaEET; 
+  // *******************
+  // neutral kaon ET
+  // *******************
+  delete fHistK0EtaEET; 
+  delete fHistK0RecEtaEET; 
        
-       delete fHistK0EtaPtET; 
-       delete fHistK0RecEtaPtET; 
+  delete fHistK0EtaPtET; 
+  delete fHistK0RecEtaPtET; 
        
-       delete fHistK0EtaET; 
-       delete fHistK0RecEtaET; 
+  delete fHistK0EtaET; 
+  delete fHistK0RecEtaET; 
        
-       delete fHistK0EtaE; 
-       delete fHistK0RecEtaE; 
+  delete fHistK0EtaE; 
+  delete fHistK0RecEtaE; 
        
-       delete fHistK0EtaPt; 
-       delete fHistK0RecEtaPt; 
+  delete fHistK0EtaPt; 
+  delete fHistK0RecEtaPt; 
 
-       delete fHistK0totET; 
-       delete fHistK0RectotET; 
+  delete fHistK0totET; 
+  delete fHistK0RectotET; 
        
-       delete fHistK0RectotETDep; 
+  delete fHistK0RectotETDep; 
        
-       delete fHistK0RecEtaEDepETDep; 
-       delete fHistK0RecEtaETDep; 
+  delete fHistK0RecEtaEDepETDep; 
+  delete fHistK0RecEtaETDep; 
        
-       delete fHistK0RecEtaPtETDep; 
+  delete fHistK0RecEtaPtETDep; 
                
-       // *******************
-       // Lambda(anti) ET
-       // *******************
-       delete fHistLambdaEtaEET; 
-       delete fHistLambdaRecEtaEET; 
-       
-       delete fHistLambdaEtaPtET; 
-       delete fHistLambdaRecEtaPtET; 
-       
-       delete fHistLambdaEtaET; 
-       delete fHistLambdaRecEtaET; 
-       
-       delete fHistLambdaEtaE; 
-       delete fHistLambdaRecEtaE; 
-       
-       delete fHistLambdaEtaPt; 
-       delete fHistLambdaRecEtaPt; 
-       
-       delete fHistLambdatotET; 
-       delete fHistLambdaRectotET; 
-       
-       delete fHistLambdaRectotETDep; 
-       
-       delete fHistLambdaRecEtaEDepETDep; 
-       delete fHistLambdaRecEtaETDep; 
-       
-       delete fHistLambdaRecEtaPtETDep; 
-
-       // *******************
-       // total neutral ET
-       // *******************
-       delete fHistTotNeutraltotET;
-       delete fHistTotNeutralRectotET;
-       delete fHistTotNeutralRectotETDep;
-       
-       // *******************
-       // total ET
-       // *******************
-       delete fHistTotaltotET;
-       delete fHistTotalAcctotET;
-       delete fHistTotalRectotET;
-       delete fHistTotalRectotETDep;
-       
-       // *******************
-       // some checks
-       // *******************
-
-       // check produced electrons
-       delete fHistElectronFirstMother; 
-       delete fHistElectronFirstMotherXY; 
-       delete fHistElectronNDaughters; 
-       delete fHistElectronDaughters; 
-       delete fHistElectronDaughtersXY; 
-
-       delete fHistElectronFirstMotherAcc;  
-       delete fHistElectronFirstMotherXYAcc;  
-       delete fHistElectronNDaughtersAcc; 
-       delete fHistElectronDaughtersAcc; 
-       delete fHistElectronDaughtersXYAcc; 
-
-       delete fHistElectronFirstMotherRec;  
-       delete fHistElectronFirstMotherXYRec;  
-       delete fHistElectronNDaughtersRec; 
-       delete fHistElectronDaughtersRec; 
-       delete fHistElectronDaughtersXYRec; 
-
-       delete fHistNPPElectronFirstMother; 
-       delete fHistNPPElectronFirstMotherXY; 
-       delete fHistNPPElectronNDaughters; 
-       delete fHistNPPElectronDaughters; 
-       delete fHistNPPElectronDaughtersXY; 
-       
-       delete fHistNPPElectronFirstMotherAcc;  
-       delete fHistNPPElectronFirstMotherXYAcc;  
-       delete fHistNPPElectronNDaughtersAcc; 
-       delete fHistNPPElectronDaughtersAcc; 
-       delete fHistNPPElectronDaughtersXYAcc; 
-       
-       delete fHistNPPElectronFirstMotherRec;  
-       delete fHistNPPElectronFirstMotherXYRec;  
-       delete fHistNPPElectronNDaughtersRec; 
-       delete fHistNPPElectronDaughtersRec; 
-       delete fHistNPPElectronDaughtersXYRec; 
-       
-       // check produced gammas
-       delete fHistGammaFirstMother; 
-       delete fHistGammaFirstMotherXY; 
-       delete fHistGammaNDaughters; 
-       delete fHistGammaDaughters; 
-       delete fHistGammaDaughtersXY; 
-       delete fHistConvGammaDaughtersXY; 
-       delete fHistNonConvGammaDaughtersXY; 
-       
-       delete fHistGammaFirstMotherAcc;  
-       delete fHistGammaFirstMotherXYAcc;  
-       delete fHistGammaNDaughtersAcc; 
-       delete fHistGammaDaughtersAcc; 
-       delete fHistGammaDaughtersXYAcc; 
-       delete fHistConvGammaDaughtersXYAcc; 
-       delete fHistNonConvGammaDaughtersXYAcc; 
-       
-       delete fHistGammaFirstMotherRec;  
-       delete fHistGammaFirstMotherXYRec;  
-       delete fHistGammaNDaughtersRec; 
-       delete fHistGammaDaughtersRec; 
-       delete fHistGammaDaughtersXYRec; 
-       delete fHistConvGammaDaughtersXYRec; 
-       delete fHistNonConvGammaDaughtersXYRec; 
-       
-       delete fHistNPPGammaFirstMother; 
-       delete fHistNPPGammaFirstMotherXY; 
-       delete fHistNPPGammaNDaughters; 
-       delete fHistNPPGammaDaughters; 
-       delete fHistNPPGammaDaughtersXY; 
-       
-       delete fHistNPPGammaFirstMotherAcc;  
-       delete fHistNPPGammaFirstMotherXYAcc;  
-       delete fHistNPPGammaNDaughtersAcc; 
-       delete fHistNPPGammaDaughtersAcc; 
-       delete fHistNPPGammaDaughtersXYAcc; 
-       
-       delete fHistNPPGammaFirstMotherRec;  
-       delete fHistNPPGammaFirstMotherXYRec;  
-       delete fHistNPPGammaNDaughtersRec; 
-       delete fHistNPPGammaDaughtersRec; 
-       delete fHistNPPGammaDaughtersXYRec; 
-
-       //check projections
-       delete fHistAllERecEMC; 
-       delete fHistAllPtRecPtMC;
-       delete fHistElectronERecEMC;    
-       delete fHistGammaERecEMC;
-       
-       delete fHistChargedRes;
-       delete fHistChargedRes2;
-       delete fHistChargedRes3;
-       delete fHistNeutralRes;
-       delete fHistElectronRes;
-       delete fHistGammaRes;
-       
-       delete fHistIsInAcc;
-       //delete   TH2F * yyyyyy
+  // *******************
+  // Lambda(anti) ET
+  // *******************
+  delete fHistLambdaEtaEET; 
+  delete fHistLambdaRecEtaEET; 
+       
+  delete fHistLambdaEtaPtET; 
+  delete fHistLambdaRecEtaPtET; 
+       
+  delete fHistLambdaEtaET; 
+  delete fHistLambdaRecEtaET; 
+       
+  delete fHistLambdaEtaE; 
+  delete fHistLambdaRecEtaE; 
+       
+  delete fHistLambdaEtaPt; 
+  delete fHistLambdaRecEtaPt; 
+       
+  delete fHistLambdatotET; 
+  delete fHistLambdaRectotET; 
+       
+  delete fHistLambdaRectotETDep; 
+       
+  delete fHistLambdaRecEtaEDepETDep; 
+  delete fHistLambdaRecEtaETDep; 
+       
+  delete fHistLambdaRecEtaPtETDep; 
+
+  // *******************
+  // total neutral ET
+  // *******************
+  delete fHistTotNeutraltotET;
+  delete fHistTotNeutralRectotET;
+  delete fHistTotNeutralRectotETDep;
+       
+  // *******************
+  // total ET
+  // *******************
+  delete fHistTotaltotET;
+  delete fHistTotalAcctotET;
+  delete fHistTotalRectotET;
+  delete fHistTotalRectotETDep;
+       
+  // *******************
+  // some checks
+  // *******************
+
+  // check produced electrons
+  delete fHistElectronFirstMother; 
+  delete fHistElectronFirstMotherXY; 
+  delete fHistElectronNDaughters; 
+  delete fHistElectronDaughters; 
+  delete fHistElectronDaughtersXY; 
+
+  delete fHistElectronFirstMotherAcc;  
+  delete fHistElectronFirstMotherXYAcc;  
+  delete fHistElectronNDaughtersAcc; 
+  delete fHistElectronDaughtersAcc; 
+  delete fHistElectronDaughtersXYAcc; 
+
+  delete fHistElectronFirstMotherRec;  
+  delete fHistElectronFirstMotherXYRec;  
+  delete fHistElectronNDaughtersRec; 
+  delete fHistElectronDaughtersRec; 
+  delete fHistElectronDaughtersXYRec; 
+
+  delete fHistNPPElectronFirstMother; 
+  delete fHistNPPElectronFirstMotherXY; 
+  delete fHistNPPElectronNDaughters; 
+  delete fHistNPPElectronDaughters; 
+  delete fHistNPPElectronDaughtersXY; 
+       
+  delete fHistNPPElectronFirstMotherAcc;  
+  delete fHistNPPElectronFirstMotherXYAcc;  
+  delete fHistNPPElectronNDaughtersAcc; 
+  delete fHistNPPElectronDaughtersAcc; 
+  delete fHistNPPElectronDaughtersXYAcc; 
+       
+  delete fHistNPPElectronFirstMotherRec;  
+  delete fHistNPPElectronFirstMotherXYRec;  
+  delete fHistNPPElectronNDaughtersRec; 
+  delete fHistNPPElectronDaughtersRec; 
+  delete fHistNPPElectronDaughtersXYRec; 
+       
+  // check produced gammas
+  delete fHistGammaFirstMother; 
+  delete fHistGammaFirstMotherXY; 
+  delete fHistGammaNDaughters; 
+  delete fHistGammaDaughters; 
+  delete fHistGammaDaughtersXY; 
+  delete fHistConvGammaDaughtersXY; 
+  delete fHistNonConvGammaDaughtersXY; 
+       
+  delete fHistGammaFirstMotherAcc;  
+  delete fHistGammaFirstMotherXYAcc;  
+  delete fHistGammaNDaughtersAcc; 
+  delete fHistGammaDaughtersAcc; 
+  delete fHistGammaDaughtersXYAcc; 
+  delete fHistConvGammaDaughtersXYAcc; 
+  delete fHistNonConvGammaDaughtersXYAcc; 
+       
+  delete fHistGammaFirstMotherRec;  
+  delete fHistGammaFirstMotherXYRec;  
+  delete fHistGammaNDaughtersRec; 
+  delete fHistGammaDaughtersRec; 
+  delete fHistGammaDaughtersXYRec; 
+  delete fHistConvGammaDaughtersXYRec; 
+  delete fHistNonConvGammaDaughtersXYRec; 
+       
+  delete fHistNPPGammaFirstMother; 
+  delete fHistNPPGammaFirstMotherXY; 
+  delete fHistNPPGammaNDaughters; 
+  delete fHistNPPGammaDaughters; 
+  delete fHistNPPGammaDaughtersXY; 
+       
+  delete fHistNPPGammaFirstMotherAcc;  
+  delete fHistNPPGammaFirstMotherXYAcc;  
+  delete fHistNPPGammaNDaughtersAcc; 
+  delete fHistNPPGammaDaughtersAcc; 
+  delete fHistNPPGammaDaughtersXYAcc; 
+       
+  delete fHistNPPGammaFirstMotherRec;  
+  delete fHistNPPGammaFirstMotherXYRec;  
+  delete fHistNPPGammaNDaughtersRec; 
+  delete fHistNPPGammaDaughtersRec; 
+  delete fHistNPPGammaDaughtersXYRec; 
+
+  //check projections
+  delete fHistAllERecEMC;      
+  delete fHistAllPtRecPtMC;
+  delete fHistElectronERecEMC; 
+  delete fHistGammaERecEMC;
+       
+  delete fHistChargedRes;
+  delete fHistChargedRes2;
+  delete fHistChargedRes3;
+  delete fHistNeutralRes;
+  delete fHistElectronRes;
+  delete fHistGammaRes;
+       
+  delete fHistIsInAcc;
+  //delete   TH2F * yyyyyy
 }
 
 Int_t AliAnalysisEmEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
 { // analyse MC event
-       //ResetEventValues();
+  //ResetEventValues();
        
-    // Get us an mc event
-       if(!ev)
-       {
-               Printf("ERROR: Event does not exist");   
-           return 0;
-       }
-       AliMCEvent *event = dynamic_cast<AliMCEvent*>(ev);
-               
-    // Hijing header
-    AliGenEventHeader* genHeader = event->GenEventHeader();
-    if(!genHeader){
-               Printf("ERROR: Event generation header does not exist");   
-           return 0;
+  // Get us an mc event
+  if(!ev)
+    {
+      Printf("ERROR: Event does not exist");   
+      return 0;
     }
+  AliMCEvent *event = dynamic_cast<AliMCEvent*>(ev);
+               
+  // Hijing header
+  AliGenEventHeader* genHeader = event->GenEventHeader();
+  if(!genHeader){
+    Printf("ERROR: Event generation header does not exist");   
+    return 0;
+  }
        
-    // Let's play with the stack!
-    AliStack *stack = event->Stack();
+  // Let's play with the stack!
+  AliStack *stack = event->Stack();
 
-       if (!stack)
-       {
-               Printf("ERROR: Could not get stack");
-               return 0;
-       }       
+  if (!stack)
+    {
+      Printf("ERROR: Could not get stack");
+      return 0;
+    }  
        
-    //Int_t nStackTracks = stack->GetNtrack();
-    Int_t nStackTracks = event->GetNumberOfTracks();
+  //Int_t nStackTracks = stack->GetNtrack();
+  Int_t nStackTracks = event->GetNumberOfTracks();
        
-    for (Int_t iPart = 0; iPart < nStackTracks; iPart++)
-    {
-               AliMCParticle* aliPart = (AliMCParticle*)event->GetTrack(iPart);
+  for (Int_t iPart = 0; iPart < nStackTracks; iPart++){
+    AliMCParticle* aliPart = (AliMCParticle*)event->GetTrack(iPart);
 
-        //TParticle *part = stack->Particle(iPart);
-        TParticle *part = aliPart->Particle();
-               TParticle *partMom = 0;
-               TParticle *partDaughter = 0;
+    //TParticle *part = stack->Particle(iPart);
+    TParticle *part = aliPart->Particle();
+    TParticle *partMom = 0;
+    TParticle *partDaughter = 0;
                
-        if (!part)
-        {
-            Printf("ERROR: Could not get particle %d", iPart);
-            continue;
-        }
+    if (!part){
+      Printf("ERROR: Could not get particle %d", iPart);
+      continue;
+    }
 
-               Int_t iPartMom = part->GetMother(0);
-               Int_t iPartDaughter = 0;
-               Int_t nPartDaughters = part->GetNDaughters();
-               
-        TParticlePDG *pdg = part->GetPDG(0);
-               TParticlePDG *pdgMom = 0;
-               TParticlePDG *pdgDaugther = 0;
-               
-               if (!pdg)
-        {
-            Printf("ERROR-1: Could not get particle PDG %d", iPart);
-            continue;
-        }              
-               
-               //create an external track param for projection
-               AliExternalTrackParam* extParam = CreateExternalTrackParam(part);
+    Int_t iPartMom = part->GetMother(0);
+    Int_t iPartDaughter = 0;
+    Int_t nPartDaughters = part->GetNDaughters();
+       
+    TParticlePDG *pdg = part->GetPDG(0);
+    TParticlePDG *pdgMom = 0;
+    TParticlePDG *pdgDaugther = 0;
+       
+    if (!pdg){
+      Printf("ERROR-1: Could not get particle PDG %d", iPart);
+      continue;
+    }          
                
-               if ((iPartMom>=0) && (iPartMom < nStackTracks))
-               {
-                       partMom = stack->Particle(iPartMom);
-                       pdgMom = partMom->GetPDG(0);
-               }
+    //create an external track param for projection
+    AliExternalTrackParam* extParam = CreateExternalTrackParam(part);
+       
+    if ((iPartMom>=0) && (iPartMom < nStackTracks))
+      {
+       partMom = stack->Particle(iPartMom);
+       pdgMom = partMom->GetPDG(0);
+      }
                
-               // Check if it is a primary particle
+    // Check if it is a primary particle
                
-        // Check for reasonable (for now neutral and singly charged) charge on the particle
-        //TODO:Maybe not only singly charged?
-        if (TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloSingleChargedParticle())<1e-3 && TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloNeutralParticle())<1e-3) continue;
+    // Check for reasonable (for now neutral and singly charged) charge on the particle
+    //TODO:Maybe not only singly charged?
+    if (TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloSingleChargedParticle())<1e-3 && TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloNeutralParticle())<1e-3) continue;
                
-        fMultiplicity++;
+    fMultiplicity++;
                
-               // Inside ALICE central barrel acceptance
+    // Inside ALICE central barrel acceptance
                
-        if (TMath::Abs(part->Eta()) < fCuts->GetCommonEtaCut())
-        {
-                       Double_t et = CalcET(part,pdg);
+    if (TMath::Abs(part->Eta()) < fCuts->GetCommonEtaCut())
+      {
+       Double_t et = CalcET(part,pdg);
                        
-                       if (et < 0) continue;
-
-                       if (IsPrimary(stack,iPart,pdg,iPartMom,pdgMom))
-                       {               
-                               if (stack->IsPhysicalPrimary(iPart))
-                               {
-                                       fHistPrimEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistPrimEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                       fHistPrimEtaET->Fill(et,part->Eta());                                                                                   
-                                       fPrimtotET += et;
+       if (et < 0) continue;
+
+       if (IsPrimary(stack,iPart,pdg,iPartMom,pdgMom))
+         {             
+           if (stack->IsPhysicalPrimary(iPart))
+             {
+               fHistPrimEtaEET->Fill(part->Energy(),part->Eta(),et);
+               fHistPrimEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+               fHistPrimEtaET->Fill(et,part->Eta());                                                                                   
+               fPrimtotET += et;
                                        
-                                       //if (IsInAcceptance(part,pdg,extParam)) 
-                                       if (IsInAcceptance(aliPart)) 
-                                       {
-                                               fHistPrimAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistPrimAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                               fHistPrimAccEtaET->Fill(et,part->Eta());                                                                                                                                
-                                               fPrimAcctotET += et;
-                                       }                               
-                               }
-
-                               // Fill up total E_T counters for each particle species
-                               if (pdg->PdgCode() == fgProtonCode || pdg->PdgCode() == fgAntiProtonCode)
-                               {
-                                       fProtontotET += et;
-                                       fHistProtonEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistProtonEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                    
-                                       fHistProtonEtaET->Fill(et,part->Eta());                                                 
-                                       fHistProtonEtaE->Fill(part->Energy(),part->Eta());
-                                       fHistProtonEtaPt->Fill(part->Pt(),part->Eta());
+               //if (IsInAcceptance(part,pdg,extParam)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fHistPrimAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistPrimAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                   fHistPrimAccEtaET->Fill(et,part->Eta());                                                                                                                            
+                   fPrimAcctotET += et;
+                 }                             
+             }
+
+           // Fill up total E_T counters for each particle species
+           if (pdg->PdgCode() == fgProtonCode || pdg->PdgCode() == fgAntiProtonCode)
+             {
+               fProtontotET += et;
+               fHistProtonEtaEET->Fill(part->Energy(),part->Eta(),et);
+               fHistProtonEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                    
+               fHistProtonEtaET->Fill(et,part->Eta());                                                 
+               fHistProtonEtaE->Fill(part->Energy(),part->Eta());
+               fHistProtonEtaPt->Fill(part->Pt(),part->Eta());
                                        
-                                       // inside EMCal acceptance
-                                       //if (IsInAcceptance(part,pdg,extParam)) 
-                                       if (IsInAcceptance(aliPart)) 
-                                       {
-                                               fProtonAcctotET += et;
-                                               fHistProtonAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistProtonAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
-                                               fHistProtonAccEtaET->Fill(et,part->Eta());
-                                               fHistProtonAccEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistProtonAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                      
-                                       }                                               
-                               }
-                               if (pdg->PdgCode() == fgPiPlusCode || pdg->PdgCode() == fgPiMinusCode)
-                               {
-                                       fPiontotET += et;
-                                       fHistPionEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistPionEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                       fHistPionEtaET->Fill(et,part->Eta());
-                                       fHistPionEtaE->Fill(part->Energy(),part->Eta());
-                                       fHistPionEtaPt->Fill(part->Pt(),part->Eta());                                                   
-                                       // inside EMCal acceptance
-                                       //if (IsInAcceptance(part,pdg,extParam)) 
-                                       if (IsInAcceptance(aliPart)) 
-                                       {
-                                               fPionAcctotET += et;
-                                               fHistPionAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistPionAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                               fHistPionAccEtaET->Fill(et,part->Eta());
-                                               fHistPionAccEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistPionAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                        
-                                       }                                               
-                               }
-                               if (pdg->PdgCode() == fgKPlusCode || pdg->PdgCode() == fgKMinusCode)
-                               {
-                                       fKaontotET += et;
-                                       fHistKaonEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistKaonEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                       fHistKaonEtaE->Fill(part->Energy(),part->Eta());
-                                       fHistKaonEtaET->Fill(et,part->Eta());
-                                       fHistKaonEtaPt->Fill(part->Pt(),part->Eta());                                                   
-                                       // inside EMCal acceptance
-                                       //if (IsInAcceptance(part,pdg,extParam)) 
-                                       if (IsInAcceptance(aliPart)) 
-                                       {
-                                               fKaonAcctotET += et;
-                                               fHistKaonAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistKaonAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                               fHistKaonAccEtaET->Fill(et,part->Eta());
-                                               fHistKaonAccEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistKaonAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                        
-                                       }                                               
-                               }
-                               if (pdg->PdgCode() == fgMuPlusCode || pdg->PdgCode() == fgMuMinusCode)
-                               {
-                                       fMuontotET += et;
-                                       fHistMuonEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistMuonEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                       fHistMuonEtaET->Fill(et,part->Eta());
-                                       fHistMuonEtaE->Fill(part->Energy(),part->Eta());
-                                       fHistMuonEtaPt->Fill(part->Pt(),part->Eta());                                                                           
-                                       // inside EMCal acceptance
-                                       //if (IsInAcceptance(part,pdg,extParam)) 
-                                       if (IsInAcceptance(aliPart)) 
-                                       {
-                                               fMuonAcctotET += et;
-                                               fHistMuonAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistMuonAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                               fHistMuonAccEtaET->Fill(et,part->Eta());
-                                               fHistMuonAccEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistMuonAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                                                
-                                       }                                               
-                               }
-                               if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
-                               {                               
-                                       if (stack->IsPhysicalPrimary(iPart))
-                                       {
-                                               fElectrontotET += et;                                           
-                                               fHistElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                  
-                                               fHistElectronEtaET->Fill(et,part->Eta());
-                                               fHistElectronEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistElectronEtaPt->Fill(part->Pt(),part->Eta());       
+               // inside EMCal acceptance
+               //if (IsInAcceptance(part,pdg,extParam)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fProtonAcctotET += et;
+                   fHistProtonAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistProtonAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
+                   fHistProtonAccEtaET->Fill(et,part->Eta());
+                   fHistProtonAccEtaE->Fill(part->Energy(),part->Eta());
+                   fHistProtonAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                  
+                 }                                             
+             }
+           if (pdg->PdgCode() == fgPiPlusCode || pdg->PdgCode() == fgPiMinusCode)
+             {
+               fPiontotET += et;
+               fHistPionEtaEET->Fill(part->Energy(),part->Eta(),et);
+               fHistPionEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+               fHistPionEtaET->Fill(et,part->Eta());
+               fHistPionEtaE->Fill(part->Energy(),part->Eta());
+               fHistPionEtaPt->Fill(part->Pt(),part->Eta());                                                   
+               // inside EMCal acceptance
+               //if (IsInAcceptance(part,pdg,extParam)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fPionAcctotET += et;
+                   fHistPionAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistPionAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                   fHistPionAccEtaET->Fill(et,part->Eta());
+                   fHistPionAccEtaE->Fill(part->Energy(),part->Eta());
+                   fHistPionAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                    
+                 }                                             
+             }
+           if (pdg->PdgCode() == fgKPlusCode || pdg->PdgCode() == fgKMinusCode)
+             {
+               fKaontotET += et;
+               fHistKaonEtaEET->Fill(part->Energy(),part->Eta(),et);
+               fHistKaonEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+               fHistKaonEtaE->Fill(part->Energy(),part->Eta());
+               fHistKaonEtaET->Fill(et,part->Eta());
+               fHistKaonEtaPt->Fill(part->Pt(),part->Eta());                                                   
+               // inside EMCal acceptance
+               //if (IsInAcceptance(part,pdg,extParam)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fKaonAcctotET += et;
+                   fHistKaonAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistKaonAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                   fHistKaonAccEtaET->Fill(et,part->Eta());
+                   fHistKaonAccEtaE->Fill(part->Energy(),part->Eta());
+                   fHistKaonAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                    
+                 }                                             
+             }
+           if (pdg->PdgCode() == fgMuPlusCode || pdg->PdgCode() == fgMuMinusCode)
+             {
+               fMuontotET += et;
+               fHistMuonEtaEET->Fill(part->Energy(),part->Eta(),et);
+               fHistMuonEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+               fHistMuonEtaET->Fill(et,part->Eta());
+               fHistMuonEtaE->Fill(part->Energy(),part->Eta());
+               fHistMuonEtaPt->Fill(part->Pt(),part->Eta());                                                                           
+               // inside EMCal acceptance
+               //if (IsInAcceptance(part,pdg,extParam)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fMuonAcctotET += et;
+                   fHistMuonAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistMuonAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                   fHistMuonAccEtaET->Fill(et,part->Eta());
+                   fHistMuonAccEtaE->Fill(part->Energy(),part->Eta());
+                   fHistMuonAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                                            
+                 }                                             
+             }
+           if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
+             {                         
+               if (stack->IsPhysicalPrimary(iPart))
+                 {//Marcelo - isn't this redundant?  Isn't this inside an if statement already?
+                   fElectrontotET += et;                                               
+                   fHistElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+                   fHistElectronEtaET->Fill(et,part->Eta());
+                   fHistElectronEtaE->Fill(part->Energy(),part->Eta());
+                   fHistElectronEtaPt->Fill(part->Pt(),part->Eta());   
                                                
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg,extParam)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       fElectronAcctotET += et;
-                                                       fHistElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
-                                                       fHistElectronAccEtaET->Fill(et,part->Eta());
-                                                       fHistElectronAccEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                    
-                                               }                                                       
-                                       }
-                                       else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
-                                       {
-                                               if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
-                                               {
-                                                       fHistConvElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistConvElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                                       fHistConvElectronEtaET->Fill(et,part->Eta());
-                                                       fHistConvElectronEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistConvElectronEtaPt->Fill(part->Pt(),part->Eta());                                                   
-                                                       fConvElectrontotET += et;
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg,extParam)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {
+                       fElectronAcctotET += et;
+                       fHistElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                       fHistElectronAccEtaET->Fill(et,part->Eta());
+                       fHistElectronAccEtaE->Fill(part->Energy(),part->Eta());
+                       fHistElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                    
+                     }                                                 
+                 }
+               else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
+                 {//Marcelo - are we sure we know what this is doing?  How sensitive is this to geometry?
+                   if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
+                     {
+                       fHistConvElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistConvElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+                       fHistConvElectronEtaET->Fill(et,part->Eta());
+                       fHistConvElectronEtaE->Fill(part->Energy(),part->Eta());
+                       fHistConvElectronEtaPt->Fill(part->Pt(),part->Eta());                                                   
+                       fConvElectrontotET += et;
                                                        
-                                                       // gamma mother is inside EMCal acceptance
-                                                       //if (IsInAcceptance(partMom,pdgMom)) 
-                                                       if (IsInAcceptance(aliPart)) 
-                                                       {
-                                                               fHistConvElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                               fHistConvElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                                               fHistConvElectronAccEtaET->Fill(et,part->Eta());
-                                                               fHistConvElectronAccEtaE->Fill(part->Energy(),part->Eta());
-                                                               fHistConvElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                        
-                                                               fConvElectronAcctotET += et;
-                                                       }                                                       
-                                               }               
-                                               else if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
-                                               {
-                                                       fHistScatElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistScatElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                                       fHistScatElectronEtaET->Fill(et,part->Eta());
-                                                       fHistScatElectronEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistScatElectronEtaPt->Fill(part->Pt(),part->Eta());                                                   
-                                                       fScatElectrontotET += et;
-
-                                                       // inside EMCal acceptance - does it work?
-                                                       //if (IsInAcceptance(part,pdg,extParam)) 
-                                                       if (IsInAcceptance(aliPart)) 
-                                                       {
-                                                               fHistScatElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                               fHistScatElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                                               fHistScatElectronAccEtaET->Fill(et,part->Eta());
-                                                               fHistScatElectronAccEtaE->Fill(part->Energy(),part->Eta());
-                                                               fHistScatElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                        
-                                                               fScatElectronAcctotET += et;
-                                                       }                                                       
-                                               }               
-                                       }
+                       // gamma mother is inside EMCal acceptance
+                       //if (IsInAcceptance(partMom,pdgMom)) 
+                       if (IsInAcceptance(aliPart)) 
+                         {
+                           fHistConvElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                           fHistConvElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                           fHistConvElectronAccEtaET->Fill(et,part->Eta());
+                           fHistConvElectronAccEtaE->Fill(part->Energy(),part->Eta());
+                           fHistConvElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                    
+                           fConvElectronAcctotET += et;
+                         }                                                     
+                     }         
+                   else if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
+                     {
+                       fHistScatElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistScatElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+                       fHistScatElectronEtaET->Fill(et,part->Eta());
+                       fHistScatElectronEtaE->Fill(part->Energy(),part->Eta());
+                       fHistScatElectronEtaPt->Fill(part->Pt(),part->Eta());                                                   
+                       fScatElectrontotET += et;
+
+                       // inside EMCal acceptance - does it work?
+                       //if (IsInAcceptance(part,pdg,extParam)) 
+                       if (IsInAcceptance(aliPart)) 
+                         {
+                           fHistScatElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                           fHistScatElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                           fHistScatElectronAccEtaET->Fill(et,part->Eta());
+                           fHistScatElectronAccEtaE->Fill(part->Energy(),part->Eta());
+                           fHistScatElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                    
+                           fScatElectronAcctotET += et;
+                         }                                                     
+                     }         
+                 }
 
-                                       // few checks
-                                       if ((stack->IsPhysicalPrimary(iPart)) || (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())))
-                                       {
-                                               if (pdgMom)
-                                                       fHistElectronFirstMother->Fill(pdgMom->PdgCode());
-                                               fHistElectronFirstMotherXY->Fill(part->Vx(),part->Vy());                                        
-                                               fHistElectronNDaughters->Fill(nPartDaughters);
+               // few checks
+               if ((stack->IsPhysicalPrimary(iPart)) || (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())))
+                 {//Marcelo - ...isn't this redundant?
+                   if (pdgMom)
+                     fHistElectronFirstMother->Fill(pdgMom->PdgCode());
+                   fHistElectronFirstMotherXY->Fill(part->Vx(),part->Vy());                                    
+                   fHistElectronNDaughters->Fill(nPartDaughters);
                                                
-                                               iPartDaughter = part->GetLastDaughter();
-                                               if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                               {
-                                                       partDaughter = stack->Particle(iPartDaughter);
-                                                       if (partDaughter)
-                                                       {
-                                                               pdgDaugther = partDaughter->GetPDG(0);
-                                                               if (pdgDaugther) {
-                                                                       fHistElectronDaughters->Fill(pdgDaugther->PdgCode());   
-                                                                       fHistElectronDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                               }
-                                                       }
-                                               }
+                   iPartDaughter = part->GetLastDaughter();
+                   if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                     {
+                       partDaughter = stack->Particle(iPartDaughter);
+                       if (partDaughter)
+                         {
+                           pdgDaugther = partDaughter->GetPDG(0);
+                           if (pdgDaugther) {
+                             fHistElectronDaughters->Fill(pdgDaugther->PdgCode());     
+                             fHistElectronDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
+                           }
+                         }
+                     }
                                                
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg,extParam)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       if (pdgMom)
-                                                               fHistElectronFirstMotherAcc->Fill(pdgMom->PdgCode());
-                                                       fHistElectronFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                     
-                                                       fHistElectronNDaughtersAcc->Fill(nPartDaughters);
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg,extParam)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {//Marcelo - should all three of the lines below be in the if statement?
+                       if (pdgMom) fHistElectronFirstMotherAcc->Fill(pdgMom->PdgCode());
+                       fHistElectronFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                     
+                       fHistElectronNDaughtersAcc->Fill(nPartDaughters);
                                                        
-                                                       iPartDaughter = part->GetLastDaughter();
-                                                       if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                                       {
-                                                               partDaughter = stack->Particle(iPartDaughter);
-                                                               if (partDaughter)
-                                                               {
-                                                                       pdgDaugther = partDaughter->GetPDG(0);
-                                                                       if (pdgDaugther) {
-                                                                               fHistElectronDaughtersAcc->Fill(pdgDaugther->PdgCode());        
-                                                                               fHistElectronDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                       }
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               } // end of if electron
-
-                               // some neutrals also
-                               if (pdg->PdgCode() == fgNeutronCode || pdg->PdgCode() == fgAntiNeutronCode)
-                               {
-                                       fHistNeutronEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistNeutronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                       fHistNeutronEtaET->Fill(et,part->Eta());                                                        
-                                       fHistNeutronEtaE->Fill(part->Energy(),part->Eta());
-                                       fHistNeutronEtaPt->Fill(part->Pt(),part->Eta());                
-                                       fNeutrontotET += et;
-                                       
-                                       // inside EMCal acceptance
-                                       //if (IsInAcceptance(part,pdg)) 
-                                       if (IsInAcceptance(aliPart)) 
-                                       {
-                                               fHistNeutronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistNeutronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                        
-                                               fHistNeutronAccEtaET->Fill(et,part->Eta());
-                                               fHistNeutronAccEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistNeutronAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                     
-                                               fNeutronAcctotET += et;
-                                       }                                               
-                                       if(pdg->PdgCode() == fgNeutronCode)
-                                       {
-                                               fNeutronEt += et;
-                                       }
-                                       if(pdg->PdgCode() == fgAntiNeutronCode)
-                                       {
-                                               fAntiNeutronEt += et;
-                                       }
+                       iPartDaughter = part->GetLastDaughter();
+                       if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                         {
+                           partDaughter = stack->Particle(iPartDaughter);
+                           if (partDaughter)
+                             {
+                               pdgDaugther = partDaughter->GetPDG(0);
+                               if (pdgDaugther) {
+                                 fHistElectronDaughtersAcc->Fill(pdgDaugther->PdgCode());      
+                                 fHistElectronDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
                                }
+                             }
+                         }
+                     }
+                 }
+             } // end of if electron
+
+           // some neutrals also
+           if (pdg->PdgCode() == fgNeutronCode || pdg->PdgCode() == fgAntiNeutronCode)
+             {
+               fHistNeutronEtaEET->Fill(part->Energy(),part->Eta(),et);
+               fHistNeutronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
+               fHistNeutronEtaET->Fill(et,part->Eta());                                                        
+               fHistNeutronEtaE->Fill(part->Energy(),part->Eta());
+               fHistNeutronEtaPt->Fill(part->Pt(),part->Eta());                
+               fNeutrontotET += et;
+                                       
+               // inside EMCal acceptance
+               //if (IsInAcceptance(part,pdg)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fHistNeutronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistNeutronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                    
+                   fHistNeutronAccEtaET->Fill(et,part->Eta());
+                   fHistNeutronAccEtaE->Fill(part->Energy(),part->Eta());
+                   fHistNeutronAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                 
+                   fNeutronAcctotET += et;
+                 }                                             
+               if(pdg->PdgCode() == fgNeutronCode)
+                 {
+                   fNeutronEt += et;
+                 }
+               if(pdg->PdgCode() == fgAntiNeutronCode)
+                 {
+                   fAntiNeutronEt += et;
+                 }
+             }
                                
-                               if(pdg->PdgCode() == fgGammaCode)
-                               {
-                                       if (stack->IsPhysicalPrimary(iPart))
-                                       {
-                                               fHistGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
-                                               fHistGammaEtaET->Fill(et,part->Eta());
-                                               fHistGammaEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistGammaEtaPt->Fill(part->Pt(),part->Eta());  
-                                               fGammatotET += et;
+           if(pdg->PdgCode() == fgGammaCode)
+             {
+               if (stack->IsPhysicalPrimary(iPart))
+                 {
+                   fHistGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
+                   fHistGammaEtaET->Fill(et,part->Eta());
+                   fHistGammaEtaE->Fill(part->Energy(),part->Eta());
+                   fHistGammaEtaPt->Fill(part->Pt(),part->Eta());      
+                   fGammatotET += et;
                                                
-                                               if (IsGammaConversion(stack, part, pdg))
-                                               {                                                                               
-                                                       fHistConvGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistConvGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
-                                                       fHistConvGammaEtaET->Fill(et,part->Eta());
-                                                       fHistConvGammaEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistConvGammaEtaPt->Fill(part->Pt(),part->Eta());                                                                      
-                                                       fConvGammatotET += et;
-                                               }
-                                               else
-                                               {                                                                               
-                                                       fHistNonConvGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistNonConvGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                                       fHistNonConvGammaEtaET->Fill(et,part->Eta());
-                                                       fHistNonConvGammaEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistNonConvGammaEtaPt->Fill(part->Pt(),part->Eta());                                                                   
-                                                       fNonConvGammatotET += et;
-                                               }
+                   if (IsGammaConversion(stack, part, pdg))
+                     {                                                                         
+                       fHistConvGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistConvGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
+                       fHistConvGammaEtaET->Fill(et,part->Eta());
+                       fHistConvGammaEtaE->Fill(part->Energy(),part->Eta());
+                       fHistConvGammaEtaPt->Fill(part->Pt(),part->Eta());                                                                      
+                       fConvGammatotET += et;
+                     }
+                   else
+                     {                                                                         
+                       fHistNonConvGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistNonConvGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+                       fHistNonConvGammaEtaET->Fill(et,part->Eta());
+                       fHistNonConvGammaEtaE->Fill(part->Energy(),part->Eta());
+                       fHistNonConvGammaEtaPt->Fill(part->Pt(),part->Eta());                                                                   
+                       fNonConvGammatotET += et;
+                     }
                                                
-                                               Bool_t inAcc=kFALSE;
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       //Printf("phi(1) = %f, eta(1) = %f",part->Phi(),part->Eta());
-                                                       inAcc = kTRUE;
+                   Bool_t inAcc=kFALSE;
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {
+                       //Printf("phi(1) = %f, eta(1) = %f",part->Phi(),part->Eta());
+                       inAcc = kTRUE;
                                                        
-                                                       fHistGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                  
-                                                       fHistGammaAccEtaET->Fill(et,part->Eta());
-                                                       fHistGammaAccEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistGammaAccEtaPt->Fill(part->Pt(),part->Eta());               
-                                                       fGammaAcctotET += et;
-                                               }
+                       fHistGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                  
+                       fHistGammaAccEtaET->Fill(et,part->Eta());
+                       fHistGammaAccEtaE->Fill(part->Energy(),part->Eta());
+                       fHistGammaAccEtaPt->Fill(part->Pt(),part->Eta());               
+                       fGammaAcctotET += et;
+                     }
                                                
-                                               if (IsInAcceptance(part,pdg)) 
-                                               {
-                                                       if (IsGammaConversion(stack, part, pdg))
-                                                       {       
-                                                               if (inAcc)
-                                                                       Printf("phi(1) = %f, eta(1) = %f",part->Phi(),part->Eta());
-
-                                                               fHistConvGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                               fHistConvGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                                               fHistConvGammaAccEtaET->Fill(et,part->Eta());
-                                                               fHistConvGammaAccEtaE->Fill(part->Energy(),part->Eta());
-                                                               fHistConvGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                   
-                                                               fConvGammaAcctotET += et;
-                                                       }
-                                                       else
-                                                       {                       
-                                                               /*
-                                                               if (!inAcc)
-                                                               {
-                                                                       Printf("phi(2) = %f, eta(2) = %f, pt = %f",TMath::RadToDeg()*part->Phi(),part->Eta(),part->Pt());
+                   if (IsInAcceptance(part,pdg)) 
+                     {
+                       if (IsGammaConversion(stack, part, pdg))
+                         {     
+                           if (inAcc)
+                             Printf("phi(1) = %f, eta(1) = %f",part->Phi(),part->Eta());
+
+                           fHistConvGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                           fHistConvGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                  
+                           fHistConvGammaAccEtaET->Fill(et,part->Eta());
+                           fHistConvGammaAccEtaE->Fill(part->Energy(),part->Eta());
+                           fHistConvGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                       
+                           fConvGammaAcctotET += et;
+                         }
+                       else
+                         {                     
+                           /*
+                             if (!inAcc)
+                             {
+                             Printf("phi(2) = %f, eta(2) = %f, pt = %f",TMath::RadToDeg()*part->Phi(),part->Eta(),part->Pt());
                                                                
-                                                                       Int_t iPartDaughter = part->GetLastDaughter();
+                             Int_t iPartDaughter = part->GetLastDaughter();
                                                                        
-                                                                       if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                                                       {
-                                                                               TParticle *partDaughter = stack->Particle(iPartDaughter);
-                                                                               if (partDaughter)
-                                                                               {
-                                                                                       TParticlePDG *pdgDaugther = partDaughter->GetPDG(0);
-                                                                                       if (pdgDaugther) 
-                                                                                       {
-                                                                                               Double_t decayR = sqrt(pow(partDaughter->Vx(),2)+pow(partDaughter->Vy(),2));
-                                                                                               Printf("radius = %f, daughter pid = %d",decayR,pdgDaugther->PdgCode());
-                                                                                       }
-                                                                               }
-                                                                       }
+                             if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                             {
+                             TParticle *partDaughter = stack->Particle(iPartDaughter);
+                             if (partDaughter)
+                             {
+                             TParticlePDG *pdgDaugther = partDaughter->GetPDG(0);
+                             if (pdgDaugther) 
+                             {
+                             Double_t decayR = sqrt(pow(partDaughter->Vx(),2)+pow(partDaughter->Vy(),2));
+                             Printf("radius = %f, daughter pid = %d",decayR,pdgDaugther->PdgCode());
+                             }
+                             }
+                             }
                                                                        
-                                                                       for (int i=0;i<aliPart->GetNumberOfTrackReferences();i++)
-                                                                       {
-                                                                               AliTrackReference* aliTrkRef = aliPart->GetTrackReference(i);
+                             for (int i=0;i<aliPart->GetNumberOfTrackReferences();i++)
+                             {
+                             AliTrackReference* aliTrkRef = aliPart->GetTrackReference(i);
                                                                                
-                                                                               if (aliTrkRef)
-                                                                               {
-                                                                                       Printf("det id = %d, x=%f, y=%f, z=%f", aliTrkRef->DetectorId(),aliTrkRef->X(),aliTrkRef->Y(),aliTrkRef->Z());
-                                                                               }
-                                                                       }
+                             if (aliTrkRef)
+                             {
+                             Printf("det id = %d, x=%f, y=%f, z=%f", aliTrkRef->DetectorId(),aliTrkRef->X(),aliTrkRef->Y(),aliTrkRef->Z());
+                             }
+                             }
                                                                        
-                                                               }
-                                                               */
+                             }
+                           */
                                                                
-                                                               fHistNonConvGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                               fHistNonConvGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                                               fHistNonConvGammaAccEtaET->Fill(et,part->Eta());
-                                                               fHistNonConvGammaAccEtaE->Fill(part->Energy(),part->Eta());
-                                                               fHistNonConvGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                        
-                                                               fNonConvGammaAcctotET += et;
-                                                       }
-                                               }                                                                                       
-                                       }
-                                       else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
-                                       {
-                                               if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
-                                               {
-                                                       fHistAnnihGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistAnnihGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                        
-                                                       fHistAnnihGammaEtaET->Fill(et,part->Eta());
-                                                       fHistAnnihGammaEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistAnnihGammaEtaPt->Fill(part->Pt(),part->Eta());             
-                                                       fAnnihGammatotET += et;
+                           fHistNonConvGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                           fHistNonConvGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                           fHistNonConvGammaAccEtaET->Fill(et,part->Eta());
+                           fHistNonConvGammaAccEtaE->Fill(part->Energy(),part->Eta());
+                           fHistNonConvGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                    
+                           fNonConvGammaAcctotET += et;
+                         }
+                     }                                                                                 
+                 }
+               else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
+                 {
+                   if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
+                     {
+                       fHistAnnihGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistAnnihGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                        
+                       fHistAnnihGammaEtaET->Fill(et,part->Eta());
+                       fHistAnnihGammaEtaE->Fill(part->Energy(),part->Eta());
+                       fHistAnnihGammaEtaPt->Fill(part->Pt(),part->Eta());             
+                       fAnnihGammatotET += et;
                                                        
-                                                       // inside EMCal acceptance
-                                                       //if (IsInAcceptance(part,pdg)) 
-                                                       if (IsInAcceptance(aliPart)) 
-                                                       {
-                                                               fHistAnnihGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                               fHistAnnihGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
-                                                               fHistAnnihGammaAccEtaET->Fill(et,part->Eta());
-                                                               fHistAnnihGammaAccEtaE->Fill(part->Energy(),part->Eta());
-                                                               fHistAnnihGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                          
-                                                               fAnnihGammaAcctotET += et;
-                                                       }
-                                               }
-                                               else if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
-                                               {
-                                                       fHistScatGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistScatGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
-                                                       fHistScatGammaEtaET->Fill(et,part->Eta());
-                                                       fHistScatGammaEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistScatGammaEtaPt->Fill(part->Pt(),part->Eta());              
-                                                       fScatGammatotET += et;
+                       // inside EMCal acceptance
+                       //if (IsInAcceptance(part,pdg)) 
+                       if (IsInAcceptance(aliPart)) 
+                         {
+                           fHistAnnihGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                           fHistAnnihGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
+                           fHistAnnihGammaAccEtaET->Fill(et,part->Eta());
+                           fHistAnnihGammaAccEtaE->Fill(part->Energy(),part->Eta());
+                           fHistAnnihGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                              
+                           fAnnihGammaAcctotET += et;
+                         }
+                     }
+                   else if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
+                     {
+                       fHistScatGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistScatGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
+                       fHistScatGammaEtaET->Fill(et,part->Eta());
+                       fHistScatGammaEtaE->Fill(part->Energy(),part->Eta());
+                       fHistScatGammaEtaPt->Fill(part->Pt(),part->Eta());              
+                       fScatGammatotET += et;
                                                        
-                                                       // inside EMCal acceptance
-                                                       //if (IsInAcceptance(part,pdg)) 
-                                                       if (IsInAcceptance(aliPart)) 
-                                                       {
-                                                               fHistScatGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                               fHistScatGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                                               fHistScatGammaAccEtaET->Fill(et,part->Eta());
-                                                               fHistScatGammaAccEtaE->Fill(part->Energy(),part->Eta());
-                                                               fHistScatGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                           
-                                                               fScatGammaAcctotET += et;
-                                                       }
-                                               }
-                                       }
+                       // inside EMCal acceptance
+                       //if (IsInAcceptance(part,pdg)) 
+                       if (IsInAcceptance(aliPart)) 
+                         {
+                           fHistScatGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                           fHistScatGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                  
+                           fHistScatGammaAccEtaET->Fill(et,part->Eta());
+                           fHistScatGammaAccEtaE->Fill(part->Energy(),part->Eta());
+                           fHistScatGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                               
+                           fScatGammaAcctotET += et;
+                         }
+                     }
+                 }
 
-                                       // few checks
-                                       if ((stack->IsPhysicalPrimary(iPart)) || (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())))
-                                       {
-                                               if (pdgMom)
-                                                       fHistGammaFirstMother->Fill(pdgMom->PdgCode());
-                                               fHistGammaFirstMotherXY->Fill(part->Vx(),part->Vy());                                   
-                                               fHistGammaNDaughters->Fill(nPartDaughters);
+               // few checks
+               if ((stack->IsPhysicalPrimary(iPart)) || (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())))
+                 {
+                   if (pdgMom)
+                     fHistGammaFirstMother->Fill(pdgMom->PdgCode());
+                   fHistGammaFirstMotherXY->Fill(part->Vx(),part->Vy());                                       
+                   fHistGammaNDaughters->Fill(nPartDaughters);
                                                
-                                               iPartDaughter = part->GetLastDaughter();
-                                               if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                               {
-                                                       partDaughter = stack->Particle(iPartDaughter);
-                                                       if (partDaughter)
-                                                       {
-                                                               pdgDaugther = partDaughter->GetPDG(0);
-                                                               if (pdgDaugther) {
-                                                                       fHistGammaDaughters->Fill(pdgDaugther->PdgCode());      
-                                                                       fHistGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
+                   iPartDaughter = part->GetLastDaughter();
+                   if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                     {
+                       partDaughter = stack->Particle(iPartDaughter);
+                       if (partDaughter)
+                         {
+                           pdgDaugther = partDaughter->GetPDG(0);
+                           if (pdgDaugther) {
+                             fHistGammaDaughters->Fill(pdgDaugther->PdgCode());        
+                             fHistGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
                                                                        
-                                                                       if (stack->IsPhysicalPrimary(iPart))
-                                                                       {
-                                                                               if (IsGammaConversion(stack, part, pdg))
-                                                                               {                                                                               
-                                                                                       fHistConvGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                               }
-                                                                               else
-                                                                               {
-                                                                                       fHistNonConvGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                               }
-                                                                       }
-                                                               }
-                                                       }
-                                               }
+                             if (stack->IsPhysicalPrimary(iPart))
+                               {
+                                 if (IsGammaConversion(stack, part, pdg))
+                                   {                                                                           
+                                     fHistConvGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
+                                   }
+                                 else
+                                   {
+                                     fHistNonConvGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
+                                   }
+                               }
+                           }
+                         }
+                     }
                                                
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       if (pdgMom)
-                                                               fHistGammaFirstMotherAcc->Fill(pdgMom->PdgCode());
-                                                       fHistGammaFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                        
-                                                       fHistGammaNDaughtersAcc->Fill(nPartDaughters);
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {
+                       if (pdgMom)//Marcelo - again, should this be all three?
+                         fHistGammaFirstMotherAcc->Fill(pdgMom->PdgCode());
+                       fHistGammaFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                        
+                       fHistGammaNDaughtersAcc->Fill(nPartDaughters);
                                                        
-                                                       iPartDaughter = part->GetLastDaughter();
-                                                       if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                                       {
-                                                               partDaughter = stack->Particle(iPartDaughter);
-                                                               if (partDaughter)
-                                                               {
-                                                                       pdgDaugther = partDaughter->GetPDG(0);
-                                                                       if (pdgDaugther) {
-                                                                               fHistGammaDaughtersAcc->Fill(pdgDaugther->PdgCode());   
-                                                                               fHistGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                               
-                                                                               if (stack->IsPhysicalPrimary(iPart))
-                                                                               {
-                                                                                       if (IsGammaConversion(stack, part, pdg))
-                                                                                       {                                                                               
-                                                                                               fHistConvGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                                       }
-                                                                                       else
-                                                                                       {
-                                                                                               fHistNonConvGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                                       }
-                                                                               }
+                       iPartDaughter = part->GetLastDaughter();
+                       if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                         {
+                           partDaughter = stack->Particle(iPartDaughter);
+                           if (partDaughter)
+                             {
+                               pdgDaugther = partDaughter->GetPDG(0);
+                               if (pdgDaugther) {
+                                 fHistGammaDaughtersAcc->Fill(pdgDaugther->PdgCode()); 
+                                 fHistGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
                                                                                
-                                                                       }
-                                                               }
-                                                       }                                               
-                                               }
+                                 if (stack->IsPhysicalPrimary(iPart))
+                                   {
+                                     if (IsGammaConversion(stack, part, pdg))
+                                       {                                                                               
+                                         fHistConvGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
                                        }
-                               } // end of if gamma
-                                       
-                               // Neutral particles
-                               if (TMath::Abs(pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) <1e-3 )
-                               {
-                                       //fNeutralMultiplicity++;
-                                       fTotNeutralEt += et;
-                                       
-                                       // inside EMCal acceptance
-                                       //if (IsInAcceptance(part,pdg)) 
-                                       if (IsInAcceptance(aliPart)) 
+                                     else
                                        {
-                                               fTotNeutralEtAcc += et;
-                                               //fTotEtAcc += et;                                                                              
+                                         fHistNonConvGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
                                        }
-                               } // end of neutral particles block
-                               //Charged particles
-                               else if (TMath::Abs( pdg->Charge() - fCuts->GetMonteCarloNeutralParticle())>1e-3 )
-                               {
-                                       //fChargedMultiplicity++;
-                                       fTotChargedEt += et;
+                                   }
+                                                                               
+                               }
+                             }
+                         }                                             
+                     }
+                 }
+             } // end of if gamma
+                                       
+           // Neutral particles
+           if (TMath::Abs(pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) <1e-3 )
+             {
+               //fNeutralMultiplicity++;
+               fTotNeutralEt += et;
                                        
-                                       // inside EMCal acceptance
-                                       //if (IsInAcceptance(part,pdg,extParam)) 
-                                       if (IsInAcceptance(aliPart)) 
-                                       {
-                                               fTotChargedEtAcc += et;
-                                               //fTotEtAcc += et;
-                                       } // inside EMCal acceptance
+               // inside EMCal acceptance
+               //if (IsInAcceptance(part,pdg)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fTotNeutralEtAcc += et;
+                   //fTotEtAcc += et;                                                                          
+                 }
+             } // end of neutral particles block
+           //Charged particles
+           else if (TMath::Abs( pdg->Charge() - fCuts->GetMonteCarloNeutralParticle())>1e-3 )
+             {
+               //fChargedMultiplicity++;
+               fTotChargedEt += et;
                                        
-                                       //if (TrackHitsCalo(extParam)) // magnetic field info not filled?
-                                       //{
-                                       //      if (pdg->Charge() > 0) fHistPhivsPtPos->Fill(part->Phi(),part->Pt());
-                                       //      else if (pdg->Charge() < 0) fHistPhivsPtNeg->Fill(part->Phi(), part->Pt());
-                                       //}
-                               } // end of charged particles block
-                       } // end of is primary
-                       else // not a primary
-                       {
-                               if (pdgMom)
-                               {
-                                       if (pdgMom->PdgCode() == fgK0SCode)
-                                       {
-                                               fHistK0EtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistK0EtaPtET->Fill(part->Pt(),part->Eta(),et);                                                        
-                                               fHistK0EtaET->Fill(et,part->Eta());                                                     
-                                               fHistK0EtaE->Fill(part->Energy(),part->Eta());
-                                               fHistK0EtaPt->Fill(part->Pt(),part->Eta());             
-                                               fK0totET += et;
-                                       }
+               // inside EMCal acceptance
+               //if (IsInAcceptance(part,pdg,extParam)) 
+               if (IsInAcceptance(aliPart)) 
+                 {
+                   fTotChargedEtAcc += et;
+                   //fTotEtAcc += et;
+                 } // inside EMCal acceptance
                                        
-                                       if (pdgMom->PdgCode() == fgLambdaCode || pdgMom->PdgCode() == fgAntiLambdaCode)
-                                       {
-                                               fHistLambdaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistLambdaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                    
-                                               fHistLambdaEtaET->Fill(et,part->Eta());                                                 
-                                               fHistLambdaEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistLambdaEtaPt->Fill(part->Pt(),part->Eta());         
-                                               fLambdatotET += et;
-                                       }
-                               }
+               //if (TrackHitsCalo(extParam)) // magnetic field info not filled?
+               //{
+               //      if (pdg->Charge() > 0) fHistPhivsPtPos->Fill(part->Phi(),part->Pt());
+               //      else if (pdg->Charge() < 0) fHistPhivsPtNeg->Fill(part->Phi(), part->Pt());
+               //}
+             } // end of charged particles block
+         } // end of is primary
+       else // not a primary
+         {
+           if (pdgMom)
+             {
+               if (pdgMom->PdgCode() == fgK0SCode)
+                 {
+                   fHistK0EtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistK0EtaPtET->Fill(part->Pt(),part->Eta(),et);                                                    
+                   fHistK0EtaET->Fill(et,part->Eta());                                                 
+                   fHistK0EtaE->Fill(part->Energy(),part->Eta());
+                   fHistK0EtaPt->Fill(part->Pt(),part->Eta());         
+                   fK0totET += et;
+                 }
+                                       
+               if (pdgMom->PdgCode() == fgLambdaCode || pdgMom->PdgCode() == fgAntiLambdaCode)
+                 {
+                   fHistLambdaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistLambdaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                        
+                   fHistLambdaEtaET->Fill(et,part->Eta());                                                     
+                   fHistLambdaEtaE->Fill(part->Energy(),part->Eta());
+                   fHistLambdaEtaPt->Fill(part->Pt(),part->Eta());             
+                   fLambdatotET += et;
+                 }
+             }
                                                                
-                               if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) // exclude secondaries from interactions inside the EMCal
-                               {
-                                       if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
-                                       {
-                                               fHistNPPElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistNPPElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
-                                               fHistNPPElectronEtaET->Fill(et,part->Eta());
-                                               fHistNPPElectronEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistNPPElectronEtaPt->Fill(part->Pt(),part->Eta());    
-                                               fNPPElectrontotET += et;
+           if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) // exclude secondaries from interactions inside the EMCal
+             {
+               if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
+                 {
+                   fHistNPPElectronEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistNPPElectronEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
+                   fHistNPPElectronEtaET->Fill(et,part->Eta());
+                   fHistNPPElectronEtaE->Fill(part->Energy(),part->Eta());
+                   fHistNPPElectronEtaPt->Fill(part->Pt(),part->Eta());        
+                   fNPPElectrontotET += et;
                                                
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg,extParam)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       fHistNPPElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistNPPElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                    
-                                                       fHistNPPElectronAccEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistNPPElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                 
-                                               }                                                       
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg,extParam)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {
+                       fHistNPPElectronAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistNPPElectronAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                    
+                       fHistNPPElectronAccEtaE->Fill(part->Energy(),part->Eta());
+                       fHistNPPElectronAccEtaPt->Fill(part->Pt(),part->Eta());                                                 
+                     }                                                 
                                                
-                                               // few checks
-                                               fHistNPPElectronFirstMother->Fill(pdgMom->PdgCode());
-                                               fHistNPPElectronFirstMotherXY->Fill(part->Vx(),part->Vy());                                     
-                                               fHistNPPElectronNDaughters->Fill(nPartDaughters);
+                   // few checks
+                   fHistNPPElectronFirstMother->Fill(pdgMom->PdgCode());
+                   fHistNPPElectronFirstMotherXY->Fill(part->Vx(),part->Vy());                                 
+                   fHistNPPElectronNDaughters->Fill(nPartDaughters);
                                                
-                                               iPartDaughter = part->GetLastDaughter();
-                                               if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                               {
-                                                       partDaughter = stack->Particle(iPartDaughter);
-                                                       if (partDaughter)
-                                                       {
-                                                               pdgDaugther = partDaughter->GetPDG(0);
-                                                               if (pdgDaugther) {
-                                                                       fHistNPPElectronDaughters->Fill(pdgDaugther->PdgCode());        
-                                                                       fHistNPPElectronDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                               }
-                                                       }
-                                               }
+                   iPartDaughter = part->GetLastDaughter();
+                   if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                     {
+                       partDaughter = stack->Particle(iPartDaughter);
+                       if (partDaughter)
+                         {
+                           pdgDaugther = partDaughter->GetPDG(0);
+                           if (pdgDaugther) {
+                             fHistNPPElectronDaughters->Fill(pdgDaugther->PdgCode());  
+                             fHistNPPElectronDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
+                           }
+                         }
+                     }
                                                
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg,extParam)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       fHistNPPElectronFirstMotherAcc->Fill(pdgMom->PdgCode());
-                                                       fHistNPPElectronFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                  
-                                                       fHistNPPElectronNDaughtersAcc->Fill(nPartDaughters);
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg,extParam)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {
+                       fHistNPPElectronFirstMotherAcc->Fill(pdgMom->PdgCode());
+                       fHistNPPElectronFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                  
+                       fHistNPPElectronNDaughtersAcc->Fill(nPartDaughters);
                                                
-                                                               iPartDaughter = part->GetLastDaughter();
-                                                               if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                                               {
-                                                                       partDaughter = stack->Particle(iPartDaughter);
-                                                                       if (partDaughter)
-                                                                       {
-                                                                               pdgDaugther = partDaughter->GetPDG(0);
-                                                                               if (pdgDaugther) {
-                                                                                       fHistNPPElectronDaughtersAcc->Fill(pdgDaugther->PdgCode());     
-                                                                                       fHistNPPElectronDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                               }
-                                                                       }
-                                                               }
-                                               }                                               
+                       iPartDaughter = part->GetLastDaughter();
+                       if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                         {
+                           partDaughter = stack->Particle(iPartDaughter);
+                           if (partDaughter)
+                             {
+                               pdgDaugther = partDaughter->GetPDG(0);
+                               if (pdgDaugther) {
+                                 fHistNPPElectronDaughtersAcc->Fill(pdgDaugther->PdgCode());   
+                                 fHistNPPElectronDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
+                               }
+                             }
+                         }
+                     }                                         
                                                
-                                       } // end of if electron
+                 } // end of if electron
                                        
-                                       if(pdg->PdgCode() == fgGammaCode)
-                                       {
-                                               fHistNPPGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistNPPGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                  
-                                               fHistNPPGammaEtaET->Fill(et,part->Eta());
-                                               fHistNPPGammaEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistNPPGammaEtaPt->Fill(part->Pt(),part->Eta());                       
-                                               fNPPGammatotET += et;
-                                               
-                                               if (pdgMom)
-                                               {       
-                                                       if (pdgMom->PdgCode() == fgPi0Code)
-                                                       {
-                                                               fHistNPPPi0GammaEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                               fHistNPPPi0GammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
-                                                               fHistNPPPi0GammaEtaET->Fill(et,part->Eta());
-                                                               fHistNPPPi0GammaEtaE->Fill(part->Energy(),part->Eta());
-                                                               fHistNPPPi0GammaEtaPt->Fill(part->Pt(),part->Eta());                                                                    
-                                                               fNPPPi0GammatotET += et;
-                                                       }
-                                               }
+               if(pdg->PdgCode() == fgGammaCode)
+                 {
+                   fHistNPPGammaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                   fHistNPPGammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
+                   fHistNPPGammaEtaET->Fill(et,part->Eta());
+                   fHistNPPGammaEtaE->Fill(part->Energy(),part->Eta());
+                   fHistNPPGammaEtaPt->Fill(part->Pt(),part->Eta());                   
+                   fNPPGammatotET += et;
                                                
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       fHistNPPGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                                       fHistNPPGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
-                                                       fHistNPPGammaAccEtaE->Fill(part->Energy(),part->Eta());
-                                                       fHistNPPGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                                                            
-                                               }                                                                                       
+                   if (pdgMom)
+                     { 
+                       if (pdgMom->PdgCode() == fgPi0Code)
+                         {
+                           fHistNPPPi0GammaEtaEET->Fill(part->Energy(),part->Eta(),et);
+                           fHistNPPPi0GammaEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
+                           fHistNPPPi0GammaEtaET->Fill(et,part->Eta());
+                           fHistNPPPi0GammaEtaE->Fill(part->Energy(),part->Eta());
+                           fHistNPPPi0GammaEtaPt->Fill(part->Pt(),part->Eta());                                                                        
+                           fNPPPi0GammatotET += et;
+                         }
+                     }
                                                
-                                               // few checks
-                                               if (pdgMom)
-                                                       fHistNPPGammaFirstMother->Fill(pdgMom->PdgCode());
-                                               fHistNPPGammaFirstMotherXY->Fill(part->Vx(),part->Vy());                                        
-                                               fHistNPPGammaNDaughters->Fill(nPartDaughters);
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {
+                       fHistNPPGammaAccEtaEET->Fill(part->Energy(),part->Eta(),et);
+                       fHistNPPGammaAccEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                       fHistNPPGammaAccEtaE->Fill(part->Energy(),part->Eta());
+                       fHistNPPGammaAccEtaPt->Fill(part->Pt(),part->Eta());                                                                                                                                            
+                     }                                                                                 
                                                
-                                               iPartDaughter = part->GetLastDaughter();
-                                               if ((iPartDaughter>=0)  && (iPartDaughter < nStackTracks))
-                                               {
-                                                       partDaughter = stack->Particle(iPartDaughter);
-                                                       if (partDaughter)
-                                                       {
-                                                               pdgDaugther = partDaughter->GetPDG(0);
-                                                               if (pdgDaugther) {
-                                                                       fHistNPPGammaDaughters->Fill(pdgDaugther->PdgCode());   
-                                                                       fHistNPPGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                               }
-                                                       }
-                                               }       
+                   // few checks
+                   if (pdgMom)
+                     fHistNPPGammaFirstMother->Fill(pdgMom->PdgCode());
+                   fHistNPPGammaFirstMotherXY->Fill(part->Vx(),part->Vy());                                    
+                   fHistNPPGammaNDaughters->Fill(nPartDaughters);
                                                
-                                               // inside EMCal acceptance
-                                               //if (IsInAcceptance(part,pdg)) 
-                                               if (IsInAcceptance(aliPart)) 
-                                               {
-                                                       fHistNPPGammaFirstMotherAcc->Fill(pdgMom->PdgCode());
-                                                       fHistNPPGammaFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                     
-                                                       fHistNPPGammaNDaughtersAcc->Fill(nPartDaughters);
+                   iPartDaughter = part->GetLastDaughter();
+                   if ((iPartDaughter>=0)  && (iPartDaughter < nStackTracks))
+                     {
+                       partDaughter = stack->Particle(iPartDaughter);
+                       if (partDaughter)
+                         {
+                           pdgDaugther = partDaughter->GetPDG(0);
+                           if (pdgDaugther) {
+                             fHistNPPGammaDaughters->Fill(pdgDaugther->PdgCode());     
+                             fHistNPPGammaDaughtersXY->Fill(partDaughter->Vx(),partDaughter->Vy());
+                           }
+                         }
+                     } 
                                                
-                                                               iPartDaughter = part->GetLastDaughter();
-                                                               if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                                                               {
-                                                                       partDaughter = stack->Particle(iPartDaughter);
-                                                                       if (partDaughter)
-                                                                       {
-                                                                               pdgDaugther = partDaughter->GetPDG(0);
-                                                                               if (pdgDaugther) {
-                                                                                       fHistNPPGammaDaughtersAcc->Fill(pdgDaugther->PdgCode());        
-                                                                                       fHistNPPGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                                               }
-                                                                       }
-                                                               }
-                                               }
+                   // inside EMCal acceptance
+                   //if (IsInAcceptance(part,pdg)) 
+                   if (IsInAcceptance(aliPart)) 
+                     {
+                       fHistNPPGammaFirstMotherAcc->Fill(pdgMom->PdgCode());
+                       fHistNPPGammaFirstMotherXYAcc->Fill(part->Vx(),part->Vy());                                     
+                       fHistNPPGammaNDaughtersAcc->Fill(nPartDaughters);
                                                
-                                       } // end of gamma
+                       iPartDaughter = part->GetLastDaughter();
+                       if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+                         {
+                           partDaughter = stack->Particle(iPartDaughter);
+                           if (partDaughter)
+                             {
+                               pdgDaugther = partDaughter->GetPDG(0);
+                               if (pdgDaugther) {
+                                 fHistNPPGammaDaughtersAcc->Fill(pdgDaugther->PdgCode());      
+                                 fHistNPPGammaDaughtersXYAcc->Fill(partDaughter->Vx(),partDaughter->Vy());
                                }
-                       } // end of NOT a primary
-               } // end of eta cut (Inside ALICE central barrel acceptance)
+                             }
+                         }
+                     }
+                                               
+                 } // end of gamma
+             }
+         } // end of NOT a primary
+      } // end of eta cut (Inside ALICE central barrel acceptance)
                
-               if (extParam)
-                       delete extParam;
+    if (extParam)
+      delete extParam;
                
-       }// end of loop over TParticles
-    fTotEt = fTotChargedEt + fTotNeutralEt;
-    fTotEtAcc = fTotChargedEtAcc + fTotNeutralEtAcc;   
-       
-       fTotElectrontotET = fElectrontotET + fConvElectrontotET + fScatElectrontotET;
-       fTotElectronAcctotET = fElectronAcctotET + fConvElectronAcctotET + fScatElectronAcctotET;
-       fTotGammatotET = fGammatotET + fAnnihGammatotET + fScatGammatotET;
-       fTotGammaAcctotET = fGammaAcctotET + fAnnihGammaAcctotET + fScatGammaAcctotET;
-       fTotEMtotET = fTotElectrontotET + fTotGammatotET;
-       fTotEMAcctotET = fTotElectronAcctotET + fTotGammaAcctotET;
-       fTotNPPEMtotET = fNPPElectrontotET + fNPPGammatotET;
-       fTotChargedtotET = fMuontotET + fPiontotET + fKaontotET + fProtontotET;
-       fTotChargedAcctotET = fMuonAcctotET + fPionAcctotET + fKaonAcctotET + fProtonAcctotET;
-       fTotNeutraltotET = fNeutrontotET + fK0totET + fLambdatotET;
-       fTotaltotET = fTotEMtotET + fTotNPPEMtotET + fTotChargedtotET + fTotNeutraltotET;
-       fTotalAcctotET = fTotEMAcctotET + fTotChargedAcctotET;
-       
-    //FillHistograms();
-       
-       fHistPrimtotET->Fill(fPrimtotET);
-       fHistPrimAcctotET->Fill(fPrimAcctotET);
-       
-       fHistElectrontotET->Fill(fElectrontotET);
-       fHistElectronAcctotET->Fill(fElectronAcctotET);
-       fHistConvElectrontotET->Fill(fConvElectrontotET);
-       fHistConvElectronAcctotET->Fill(fConvElectronAcctotET);
-       fHistScatElectrontotET->Fill(fScatElectrontotET);
-       fHistScatElectronAcctotET->Fill(fScatElectronAcctotET);
-       
-       fHistTotElectrontotET->Fill(fTotElectrontotET);
-       fHistTotElectronAcctotET->Fill(fTotElectronAcctotET);
-       
-       fHistGammatotET->Fill(fGammatotET);
-       fHistGammaAcctotET->Fill(fGammaAcctotET);
-       fHistAnnihGammatotET->Fill(fAnnihGammatotET);
-       fHistAnnihGammaAcctotET->Fill(fAnnihGammaAcctotET);
-       fHistScatGammatotET->Fill(fScatGammatotET);
-       fHistScatGammaAcctotET->Fill(fScatGammaAcctotET);
-       
-       fHistTotGammatotET->Fill(fTotGammatotET);
-       fHistTotGammaAcctotET->Fill(fTotGammaAcctotET);
-       
-       fHistTotEMtotET->Fill(fTotEMtotET);
-       fHistTotEMAcctotET->Fill(fTotEMAcctotET);
-       
-       fHistConvGammatotET->Fill(fConvGammatotET);
-       fHistNonConvGammatotET->Fill(fNonConvGammatotET);
-       fHistConvGammaAcctotET->Fill(fConvGammaAcctotET);
-       fHistNonConvGammaAcctotET->Fill(fNonConvGammaAcctotET);
-
-       fHistNPPElectrontotET->Fill(fNPPElectrontotET);
-       fHistNPPGammatotET->Fill(fNPPGammatotET);
-       
-       fHistTotNPPEMtotET->Fill(fTotNPPEMtotET);
-
-       fHistNPPPi0GammatotET->Fill(fNPPPi0GammatotET);
-
-       fHistMuontotET->Fill(fMuontotET); 
-       fHistMuonAcctotET->Fill(fMuonAcctotET); 
-       fHistPiontotET->Fill(fPiontotET); 
-       fHistPionAcctotET->Fill(fPionAcctotET); 
-       fHistKaontotET->Fill(fKaontotET); 
-       fHistKaonAcctotET->Fill(fKaonAcctotET); 
-       fHistProtontotET->Fill(fProtontotET); 
-       fHistProtonAcctotET->Fill(fProtonAcctotET); 
-
-       fHistTotChargedtotET->Fill(fTotChargedtotET);
-       fHistTotChargedAcctotET->Fill(fTotChargedAcctotET);
-       
-       fHistNeutrontotET->Fill(fNeutrontotET); 
-       fHistNeutronAcctotET->Fill(fNeutronAcctotET); 
-       fHistK0totET->Fill(fK0totET); 
-       fHistLambdatotET->Fill(fNeutrontotET); 
-
-       fHistTotNeutraltotET->Fill(fTotNeutraltotET);
-       
-       fHistTotaltotET->Fill(fTotaltotET);
-       fHistTotalAcctotET->Fill(fTotalAcctotET);
+  }// end of loop over TParticles
+  fTotEt = fTotChargedEt + fTotNeutralEt;
+  fTotEtAcc = fTotChargedEtAcc + fTotNeutralEtAcc;   
+       
+  fTotElectrontotET = fElectrontotET + fConvElectrontotET + fScatElectrontotET;
+  fTotElectronAcctotET = fElectronAcctotET + fConvElectronAcctotET + fScatElectronAcctotET;
+  fTotGammatotET = fGammatotET + fAnnihGammatotET + fScatGammatotET;
+  fTotGammaAcctotET = fGammaAcctotET + fAnnihGammaAcctotET + fScatGammaAcctotET;
+  fTotEMtotET = fTotElectrontotET + fTotGammatotET;
+  fTotEMAcctotET = fTotElectronAcctotET + fTotGammaAcctotET;
+  fTotNPPEMtotET = fNPPElectrontotET + fNPPGammatotET;
+  fTotChargedtotET = fMuontotET + fPiontotET + fKaontotET + fProtontotET;
+  fTotChargedAcctotET = fMuonAcctotET + fPionAcctotET + fKaonAcctotET + fProtonAcctotET;
+  fTotNeutraltotET = fNeutrontotET + fK0totET + fLambdatotET;
+  fTotaltotET = fTotEMtotET + fTotNPPEMtotET + fTotChargedtotET + fTotNeutraltotET;
+  fTotalAcctotET = fTotEMAcctotET + fTotChargedAcctotET;
+       
+  //FillHistograms();
+       
+  fHistPrimtotET->Fill(fPrimtotET);
+  fHistPrimAcctotET->Fill(fPrimAcctotET);
+       
+  fHistElectrontotET->Fill(fElectrontotET);
+  fHistElectronAcctotET->Fill(fElectronAcctotET);
+  fHistConvElectrontotET->Fill(fConvElectrontotET);
+  fHistConvElectronAcctotET->Fill(fConvElectronAcctotET);
+  fHistScatElectrontotET->Fill(fScatElectrontotET);
+  fHistScatElectronAcctotET->Fill(fScatElectronAcctotET);
+       
+  fHistTotElectrontotET->Fill(fTotElectrontotET);
+  fHistTotElectronAcctotET->Fill(fTotElectronAcctotET);
+       
+  fHistGammatotET->Fill(fGammatotET);
+  fHistGammaAcctotET->Fill(fGammaAcctotET);
+  fHistAnnihGammatotET->Fill(fAnnihGammatotET);
+  fHistAnnihGammaAcctotET->Fill(fAnnihGammaAcctotET);
+  fHistScatGammatotET->Fill(fScatGammatotET);
+  fHistScatGammaAcctotET->Fill(fScatGammaAcctotET);
+       
+  fHistTotGammatotET->Fill(fTotGammatotET);
+  fHistTotGammaAcctotET->Fill(fTotGammaAcctotET);
+       
+  fHistTotEMtotET->Fill(fTotEMtotET);
+  fHistTotEMAcctotET->Fill(fTotEMAcctotET);
+       
+  fHistConvGammatotET->Fill(fConvGammatotET);
+  fHistNonConvGammatotET->Fill(fNonConvGammatotET);
+  fHistConvGammaAcctotET->Fill(fConvGammaAcctotET);
+  fHistNonConvGammaAcctotET->Fill(fNonConvGammaAcctotET);
+
+  fHistNPPElectrontotET->Fill(fNPPElectrontotET);
+  fHistNPPGammatotET->Fill(fNPPGammatotET);
+       
+  fHistTotNPPEMtotET->Fill(fTotNPPEMtotET);
+
+  fHistNPPPi0GammatotET->Fill(fNPPPi0GammatotET);
+
+  fHistMuontotET->Fill(fMuontotET); 
+  fHistMuonAcctotET->Fill(fMuonAcctotET); 
+  fHistPiontotET->Fill(fPiontotET); 
+  fHistPionAcctotET->Fill(fPionAcctotET); 
+  fHistKaontotET->Fill(fKaontotET); 
+  fHistKaonAcctotET->Fill(fKaonAcctotET); 
+  fHistProtontotET->Fill(fProtontotET); 
+  fHistProtonAcctotET->Fill(fProtonAcctotET); 
+
+  fHistTotChargedtotET->Fill(fTotChargedtotET);
+  fHistTotChargedAcctotET->Fill(fTotChargedAcctotET);
+       
+  fHistNeutrontotET->Fill(fNeutrontotET); 
+  fHistNeutronAcctotET->Fill(fNeutronAcctotET); 
+  fHistK0totET->Fill(fK0totET); 
+  fHistLambdatotET->Fill(fNeutrontotET); 
+
+  fHistTotNeutraltotET->Fill(fTotNeutraltotET);
+       
+  fHistTotaltotET->Fill(fTotaltotET);
+  fHistTotalAcctotET->Fill(fTotalAcctotET);
         
-       return 0;    
+  return 0;    
 }
 
 Int_t AliAnalysisEmEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
 { // analyse MC and real event info
-       if(!ev || !ev2){
-               Printf("ERROR: Event does not exist");   
-               return 0;
-       }
-       
-       AliMCEvent *mcEvent = dynamic_cast<AliMCEvent*>(ev);
-       AliESDEvent *realEvent = dynamic_cast<AliESDEvent*>(ev2);
-       
-       fGeoUt = new AliEMCALGeometry("EMCAL_FIRSTYEAR","EMCAL");
-       fGeoUt->SetMisalMatrix(realEvent->GetEMCALMatrix(0),0);
-
-       ResetEventValues();
-       AnalyseEvent(ev);
-       
-       AliStack *stack = mcEvent->Stack();
-       if (!stack)
-       {
-               Printf("ERROR: Could not get stack");
-               return 0;
-       }       
+  if(!ev || !ev2){//Marcelo - should use AliError
+    Printf("ERROR: Event does not exist");   
+    return 0;
+  }
+       
+  AliMCEvent *mcEvent = dynamic_cast<AliMCEvent*>(ev);
+  AliESDEvent *realEvent = dynamic_cast<AliESDEvent*>(ev2);
+
+  if(!fGeoUt){
+    fGeoUt = AliEMCALGeometry::GetInstance("EMCAL_FIRSTYEARV1");//new AliEMCALGeometry("EMCAL_FIRSTYEAR","EMCAL");
+    AliInfo("Creating new AliEMCALGeometry");
+  }
+  //fGeoUt = new AliEMCALGeometry("EMCAL_FIRSTYEAR","EMCAL");
+  //fGeoUt->SetMisalMatrix(realEvent->GetEMCALMatrix(0),0);
+
+  ResetEventValues();
+  AnalyseEvent(ev);
+       
+  AliStack *stack = mcEvent->Stack();
+  if (!stack)
+    {
+      Printf("ERROR: Could not get stack");
+      return 0;
+    }  
        
-    Int_t nStackTracks = stack->GetNtrack();
+  Int_t nStackTracks = stack->GetNtrack();
        
-       // get all emcal clusters
-       TRefArray* caloClusters = new TRefArray();
-       realEvent->GetEMCALClusters( caloClusters );
+  // get all emcal clusters
+  TRefArray* caloClusters = new TRefArray();
+  realEvent->GetEMCALClusters( caloClusters );
        
-       Int_t nCluster = caloClusters->GetEntries();
+  Int_t nCluster = caloClusters->GetEntries();
        
-       Float_t pos[3] = {0};
-       TVector3 caloPos(0,0,0);
-       TVector3 trackPos(0,0,0);
+  Float_t pos[3] = {0};
+  TVector3 caloPos(0,0,0);
+  TVector3 trackPos(0,0,0);
        
-       // loop the clusters
-       for (int iCluster = 0; iCluster < nCluster; iCluster++ ) 
-       {
-               AliESDCaloCluster* caloCluster = ( AliESDCaloCluster* )caloClusters->At( iCluster );
-               Float_t caloE = caloCluster->E();
-               caloCluster->GetPosition(pos);          
-               caloPos.SetXYZ(pos[0],pos[1],pos[2]);
+  // loop the clusters
+  for (int iCluster = 0; iCluster < nCluster; iCluster++ ) 
+    {
+      AliESDCaloCluster* caloCluster = ( AliESDCaloCluster* )caloClusters->At( iCluster );
+      Float_t caloE = caloCluster->E();
+      caloCluster->GetPosition(pos);           
+      caloPos.SetXYZ(pos[0],pos[1],pos[2]);
                
-               UInt_t iPart = (UInt_t)TMath::Abs(caloCluster->GetLabel());
-               TParticle *part  = stack->Particle(iPart);
+      UInt_t iPart = (UInt_t)TMath::Abs(caloCluster->GetLabel());
+      TParticle *part  = stack->Particle(iPart);
                
-        if (!part)
-        {
-            Printf("No MC particle %d", iCluster);
-            continue;
+      if (!part)
+        {//Marcelo -- use AliError
+         Printf("No MC particle %d", iCluster);
+         continue;
         }
                
-               TParticlePDG *pdg = part->GetPDG(0);
+      TParticlePDG *pdg = part->GetPDG(0);
                
-               TParticle *partMom = 0;
-               TParticlePDG *pdgMom = 0;
+      TParticle *partMom = 0;
+      TParticlePDG *pdgMom = 0;
                
-               Int_t nPartDaughters = part->GetNDaughters();
-               TParticle *partDaughter = 0;
-               TParticlePDG *pdgDaugther = 0;          
+      Int_t nPartDaughters = part->GetNDaughters();
+      TParticle *partDaughter = 0;
+      TParticlePDG *pdgDaugther = 0;           
                
-               if (!pdg)
-        {
-            Printf("ERROR-2: Could not get particle PDG %d", iPart);
-            continue;
+      if (!pdg)
+        {//Marcelo -- use AliError
+         Printf("ERROR-2: Could not get particle PDG %d", iPart);
+         continue;
         }              
                
-               Int_t iPartMom = part->GetMother(0);
-               Int_t iPartDaughter = 0;
+      Int_t iPartMom = part->GetMother(0);
+      Int_t iPartDaughter = 0;
                
-               if ((iPartMom>=0) && (iPartMom < nStackTracks))
-               {
-                       partMom = stack->Particle(iPartMom);
-                       pdgMom = partMom->GetPDG(0);
-               }                       
+      if ((iPartMom>=0) && (iPartMom < nStackTracks))
+       {
+         partMom = stack->Particle(iPartMom);
+         pdgMom = partMom->GetPDG(0);
+       }                       
                
-               // find the track associated to this MC particle
-               TObjArray* list = fEsdtrackCutsITSTPC->GetAcceptedTracks(realEvent);
-               Int_t nGoodTracks = list->GetEntries();
-               Bool_t trackFound = kFALSE;
-               Bool_t trackProjected = kFALSE;
-               Float_t res = 0;
-               AliESDtrack *track = 0;
-               AliEMCALTrack *emcTrack = 0;
-               AliExternalTrackParam* extParamTPart = 0;
-               AliESDtrack *esdTPart = 0;
-               AliEMCALTrack *emcTPart = 0;
+      // find the track associated to this MC particle
+      TObjArray* list = fEsdtrackCutsITSTPC->GetAcceptedTracks(realEvent);
+      Int_t nGoodTracks = list->GetEntries();
+      Bool_t trackFound = kFALSE;
+      Bool_t trackProjected = kFALSE;
+      Float_t res = 0;
+      AliESDtrack *track = 0;
+      AliEMCALTrack *emcTrack = 0;
+      AliExternalTrackParam* extParamTPart = 0;
+      AliESDtrack *esdTPart = 0;
+      AliEMCALTrack *emcTPart = 0;
                        
-               // find corresponding track
-               for (Int_t iTrack = 0; iTrack < nGoodTracks; iTrack++)
+      // find corresponding track
+      for (Int_t iTrack = 0; iTrack < nGoodTracks; iTrack++)
+       {
+         track = dynamic_cast<AliESDtrack*> (list->At(iTrack));
+         if (!track)
+           {//Marcelo -use AliError
+             Printf("ERROR: Could not get track %d", iTrack);
+             continue;
+           }
+         else
+           {
+             UInt_t label = (UInt_t)TMath::Abs(track->GetLabel());
+             if (label == iPart)
                {
-                       track = dynamic_cast<AliESDtrack*> (list->At(iTrack));
-                       if (!track)
-                       {
-                               Printf("ERROR: Could not get track %d", iTrack);
-                               continue;
-                       }
-                       else
-                       {
-                               UInt_t label = (UInt_t)TMath::Abs(track->GetLabel());
-                               if (label == iPart)
-                               {
-                                       trackFound = kTRUE;
-                                       emcTrack = new AliEMCALTrack(*track);
-                                       fHistAllPtRecPtMC->Fill(part->Pt(),track->Pt());
+                 trackFound = kTRUE;
+                 emcTrack = new AliEMCALTrack(*track);
+                 fHistAllPtRecPtMC->Fill(part->Pt(),track->Pt());
                                        
-                                       if (GetTrackProjection(emcTrack,trackPos,caloPos)) 
-                                       {
-                                               trackProjected = kTRUE;
-                                               res = sqrt(pow(trackPos.Phi()-caloPos.Phi(),2)+pow(trackPos.Eta()-caloPos.Eta(),2));
-                                       }
-                                       else
-                                               res = -1.;
+                 if (GetTrackProjection(emcTrack,trackPos,caloPos)) 
+                   {
+                     trackProjected = kTRUE;
+                     res = sqrt(pow(trackPos.Phi()-caloPos.Phi(),2)+pow(trackPos.Eta()-caloPos.Eta(),2));
+                   }
+                 else
+                   res = -1.;
                                        
-                                       break;                                  
-                               }
-                       }
-               }                       
-
-               if (!trackFound)
-               {
-                       track = 0;
-                       emcTrack = 0;
-                       res = -2.;
+                 break;                                        
                }
+           }
+       }                       
+
+      if (!trackFound)
+       {
+         track = 0;
+         emcTrack = 0;
+         res = -2.;
+       }
                        
-               //create an external track param for projection
-               extParamTPart = CreateExternalTrackParam(part);
-               
-               // create esd and emcal tracks out of TParticle (used for projection)
-               esdTPart = new AliESDtrack(part);
+      //create an external track param for projection
+      extParamTPart = CreateExternalTrackParam(part);
                
-               if (esdTPart && extParamTPart) 
-               {
-                       esdTPart->SetOuterParam(extParamTPart,0);
-                       emcTPart = new AliEMCALTrack(*esdTPart);
-               }
+      // create esd and emcal tracks out of TParticle (used for projection)
+      esdTPart = new AliESDtrack(part);
                
-               // few checks
-               // compare MC and Rec energies for all particles
-               fHistAllERecEMC->Fill(part->Energy(),caloE);
+      if (esdTPart && extParamTPart) 
+       {
+         esdTPart->SetOuterParam(extParamTPart,0);
+         emcTPart = new AliEMCALTrack(*esdTPart);
+       }
                
-               if (TMath::Abs( pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) > 1e-3)
-               {
-                       //Printf("calo.Phi = %f, calo.Eta = %f \n", caloPos.Phi(), caloPos.Eta());
+      // few checks
+      // compare MC and Rec energies for all particles
+      fHistAllERecEMC->Fill(part->Energy(),caloE);
+      //Marcelo - doesn't it make sense to change this so that we use the tracks matched by the official code?         
+      if (TMath::Abs( pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) > 1e-3)
+       {
+         //Printf("calo.Phi = %f, calo.Eta = %f \n", caloPos.Phi(), caloPos.Eta());
                        
-                       if (trackProjected)
-                       {
-                               //Printf("good track.Phi = %f, track.Eta = %f  \n", trackPos.Phi(), trackPos.Eta());
-                               fHistChargedRes->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
-                       }
+         if (trackProjected)
+           {
+             //Printf("good track.Phi = %f, track.Eta = %f  \n", trackPos.Phi(), trackPos.Eta());
+             fHistChargedRes->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
+           }
                        
-                       if (GetTrackProjection(emcTPart,trackPos,caloPos)) 
-                       {
-                               fHistChargedRes2->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
-                               //Printf("track.Phi = %f, track.Eta = %f  \n", trackPos.Phi(), trackPos.Eta());
-                       }
+         if (GetTrackProjection(emcTPart,trackPos,caloPos)) 
+           {
+             fHistChargedRes2->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
+             //Printf("track.Phi = %f, track.Eta = %f  \n", trackPos.Phi(), trackPos.Eta());
+           }
                        
-                       if (GetTrackProjection(extParamTPart,trackPos)) 
-                       {
-                               fHistChargedRes3->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
-                               //Printf("track.Phi = %f, track.Eta = %f  \n", trackPos.Phi(), trackPos.Eta());
-                       }
+         if (GetTrackProjection(extParamTPart,trackPos)) 
+           {
+             fHistChargedRes3->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
+             //Printf("track.Phi = %f, track.Eta = %f  \n", trackPos.Phi(), trackPos.Eta());
+           }
                        
-               } 
-               else if (TMath::Abs(pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) < 1e-3 )
-               {
-                       fHistNeutralRes->Fill(part->Phi()-caloPos.Phi(),part->Eta()-caloPos.Eta());                     
-               }
+       } 
+      else if (TMath::Abs(pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) < 1e-3 )
+       {
+         fHistNeutralRes->Fill(part->Phi()-caloPos.Phi(),part->Eta()-caloPos.Eta());                   
+       }
                
-               if(pdg->PdgCode() == fgGammaCode)
-               {
-                       // compare MC and Rec energies for gammas
-                       fHistGammaERecEMC->Fill(part->Energy(),caloE);          
-                       fHistGammaRes->Fill(part->Phi()-caloPos.Phi(),part->Eta()-caloPos.Eta());
-               }                       
+      if(pdg->PdgCode() == fgGammaCode)
+       {
+         // compare MC and Rec energies for gammas
+         fHistGammaERecEMC->Fill(part->Energy(),caloE);                
+         fHistGammaRes->Fill(part->Phi()-caloPos.Phi(),part->Eta()-caloPos.Eta());
+       }                       
                
-               if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
-               {
-                       // compare MC and Rec energies for electrons
-                       fHistElectronERecEMC->Fill(part->Energy(),caloE);
-                       if (GetTrackProjection(extParamTPart,trackPos))
-                       { 
-                               fHistElectronRes->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
-                       }                       
-               }
+      if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
+       {
+         // compare MC and Rec energies for electrons
+         fHistElectronERecEMC->Fill(part->Energy(),caloE);
+         if (GetTrackProjection(extParamTPart,trackPos))
+           { 
+             fHistElectronRes->Fill(trackPos.Phi()-caloPos.Phi(),trackPos.Eta()-caloPos.Eta());
+           }                   
+       }
                
-               // calculate ET
-               Double_t et = CalcET(part,pdg);
-               Double_t etDep = CalcETDep(caloE,part,pdg);
+      // calculate ET
+      Double_t et = CalcET(part,pdg);
+      Double_t etDep = CalcETDep(caloE,part,pdg);
                
-        // Check if it is a primary particle
-               if (IsPrimary(stack,iPart,pdg,iPartMom,pdgMom))
-               {                               
-                       if (TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloSingleChargedParticle())<1e-3 && TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloNeutralParticle())<1e-3) continue;
+      // Check if it is a primary particle
+      if (IsPrimary(stack,iPart,pdg,iPartMom,pdgMom))
+       {                               
+         if (TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloSingleChargedParticle())<1e-3 && TMath::Abs(TMath::Abs(pdg->Charge()) - fCuts->GetMonteCarloNeutralParticle())<1e-3) continue;
                                
-                       if (stack->IsPhysicalPrimary(iPart))
-                       {
-                               fHistPrimRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                               fHistPrimRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                               fHistPrimRecEtaET->Fill(et,part->Eta());
-                               fPrimRectotET += et;
-
-                               fHistPrimRecEtaEDepETDep->Fill(part->Energy(),part->Eta(),etDep);
-                               fHistPrimRecEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                     
-                               fHistPrimRecEtaETDep->Fill(etDep,part->Eta());
-                               fPrimRectotETDep += etDep;
-                       }
+         if (stack->IsPhysicalPrimary(iPart))
+           {
+             fHistPrimRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+             fHistPrimRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
+             fHistPrimRecEtaET->Fill(et,part->Eta());
+             fPrimRectotET += et;
+
+             fHistPrimRecEtaEDepETDep->Fill(part->Energy(),part->Eta(),etDep);
+             fHistPrimRecEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                       
+             fHistPrimRecEtaETDep->Fill(etDep,part->Eta());
+             fPrimRectotETDep += etDep;
+           }
                                                
-                       if(pdg->PdgCode() == fgGammaCode)
-                       {                       
-                               if (stack->IsPhysicalPrimary(iPart))
-                               {
-                                       fHistGammaRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistGammaRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                  
-                                       fHistGammaRecEtaET->Fill(et,part->Eta());
-                                       fHistGammaRecEtaE->Fill(part->Energy(),part->Eta());
-                                       fHistGammaRecEtaPt->Fill(part->Pt(),part->Eta());       
-                                       fGammaRectotET += et;
-                               }
-                               else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
-                               {
-                                       if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
-                                       {
-                                               fHistAnnihGammaRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistAnnihGammaRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
-                                               fHistAnnihGammaRecEtaET->Fill(et,part->Eta());
-                                               fHistAnnihGammaRecEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistAnnihGammaRecEtaPt->Fill(part->Pt(),part->Eta());          
-                                               fAnnihGammaRectotET += et;
-                                       }                                       
-                                       else if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
-                                       {
-                                               fHistScatGammaRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistScatGammaRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                      
-                                               fHistScatGammaRecEtaET->Fill(et,part->Eta());
-                                               fHistScatGammaRecEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistScatGammaRecEtaPt->Fill(part->Pt(),part->Eta());           
-                                               fScatGammaRectotET += et;
-                                       }                                       
-                               }
+         if(pdg->PdgCode() == fgGammaCode)
+           {                   
+             if (stack->IsPhysicalPrimary(iPart))
+               {
+                 fHistGammaRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+                 fHistGammaRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                        
+                 fHistGammaRecEtaET->Fill(et,part->Eta());
+                 fHistGammaRecEtaE->Fill(part->Energy(),part->Eta());
+                 fHistGammaRecEtaPt->Fill(part->Pt(),part->Eta());     
+                 fGammaRectotET += et;
+               }
+             else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
+               {
+                 if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
+                   {
+                     fHistAnnihGammaRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+                     fHistAnnihGammaRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
+                     fHistAnnihGammaRecEtaET->Fill(et,part->Eta());
+                     fHistAnnihGammaRecEtaE->Fill(part->Energy(),part->Eta());
+                     fHistAnnihGammaRecEtaPt->Fill(part->Pt(),part->Eta());            
+                     fAnnihGammaRectotET += et;
+                   }                                   
+                 else if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
+                   {
+                     fHistScatGammaRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+                     fHistScatGammaRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                        
+                     fHistScatGammaRecEtaET->Fill(et,part->Eta());
+                     fHistScatGammaRecEtaE->Fill(part->Energy(),part->Eta());
+                     fHistScatGammaRecEtaPt->Fill(part->Pt(),part->Eta());             
+                     fScatGammaRectotET += et;
+                   }                                   
+               }
                                
-                               // few checks
-                               if (pdgMom)
-                                       fHistGammaFirstMotherRec->Fill(pdgMom->PdgCode());
-                               fHistGammaFirstMotherXYRec->Fill(part->Vx(),part->Vy());                                        
-                               fHistGammaNDaughtersRec->Fill(nPartDaughters);
+             // few checks
+             if (pdgMom)
+               fHistGammaFirstMotherRec->Fill(pdgMom->PdgCode());
+             fHistGammaFirstMotherXYRec->Fill(part->Vx(),part->Vy());                                  
+             fHistGammaNDaughtersRec->Fill(nPartDaughters);
                                
-                               iPartDaughter = part->GetLastDaughter();
-                               if ((iPartDaughter>=0)  && (iPartDaughter < nStackTracks))
-                               {
-                                       partDaughter = stack->Particle(iPartDaughter);
-                                       if (partDaughter)
-                                       {
-                                               pdgDaugther = partDaughter->GetPDG(0);
-                                               if (pdgDaugther) {
-                                                       fHistGammaDaughtersRec->Fill(pdgDaugther->PdgCode());   
-                                                       fHistGammaDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
+             iPartDaughter = part->GetLastDaughter();
+             if ((iPartDaughter>=0)  && (iPartDaughter < nStackTracks))
+               {
+                 partDaughter = stack->Particle(iPartDaughter);
+                 if (partDaughter)
+                   {
+                     pdgDaugther = partDaughter->GetPDG(0);
+                     if (pdgDaugther) {
+                       fHistGammaDaughtersRec->Fill(pdgDaugther->PdgCode());   
+                       fHistGammaDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
                                                        
-                                                       if (stack->IsPhysicalPrimary(iPart))
-                                                       {
-                                                               if (IsGammaConversion(stack, part, pdg))
-                                                               {                                                                               
-                                                                       fHistConvGammaDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                               }
-                                                               else
-                                                               {
-                                                                       fHistNonConvGammaDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                                               }
-                                                       }                                                       
-                                               }
-                                       }
-                               }
-                       } // gamma
+                       if (stack->IsPhysicalPrimary(iPart))
+                         {
+                           if (IsGammaConversion(stack, part, pdg))
+                             {                                                                         
+                               fHistConvGammaDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
+                             }
+                           else
+                             {
+                               fHistNonConvGammaDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
+                             }
+                         }                                                     
+                     }
+                   }
+               }
+           } // gamma
                        
-                       if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
-                       {
-                               if (stack->IsPhysicalPrimary(iPart))
-                               {
-                                       fHistElectronRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                       fHistElectronRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                       
-                                       fHistElectronRecEtaET->Fill(et,part->Eta());
-                                       fHistElectronRecEtaE->Fill(part->Energy(),part->Eta());
-                                       fHistElectronRecEtaPt->Fill(part->Pt(),part->Eta());    
-                                       fElectronRectotET += et;
-                               }
-                               else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
-                               {
-                                       if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
-                                       {
-                                               fHistConvElectronRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistConvElectronRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                               fHistConvElectronRecEtaET->Fill(et,part->Eta());
-                                               fHistConvElectronRecEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistConvElectronRecEtaPt->Fill(part->Pt(),part->Eta());                                                        
-                                               fConvElectronRectotET += et;
-                                       }               
-                                       else if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
-                                       {
-                                               fHistScatElectronRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistScatElectronRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                                               fHistScatElectronRecEtaET->Fill(et,part->Eta());
-                                               fHistScatElectronRecEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistScatElectronRecEtaPt->Fill(part->Pt(),part->Eta());                                                        
-                                               fScatElectronRectotET += et;
-                                       }               
-                               }
+         if (pdg->PdgCode() == fgEPlusCode || pdg->PdgCode() == fgEMinusCode)
+           {
+             if (stack->IsPhysicalPrimary(iPart))
+               {
+                 fHistElectronRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+                 fHistElectronRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
+                 fHistElectronRecEtaET->Fill(et,part->Eta());
+                 fHistElectronRecEtaE->Fill(part->Energy(),part->Eta());
+                 fHistElectronRecEtaPt->Fill(part->Pt(),part->Eta());  
+                 fElectronRectotET += et;
+               }
+             else if (!fGeoUt->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) 
+               {
+                 if (IsMotherPrimaryGamma(stack,iPartMom,pdgMom))
+                   {
+                     fHistConvElectronRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+                     fHistConvElectronRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
+                     fHistConvElectronRecEtaET->Fill(et,part->Eta());
+                     fHistConvElectronRecEtaE->Fill(part->Energy(),part->Eta());
+                     fHistConvElectronRecEtaPt->Fill(part->Pt(),part->Eta());                                                  
+                     fConvElectronRectotET += et;
+                   }           
+                 else if (IsMotherPrimaryElectron(stack,iPartMom,pdgMom))
+                   {
+                     fHistScatElectronRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+                     fHistScatElectronRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
+                     fHistScatElectronRecEtaET->Fill(et,part->Eta());
+                     fHistScatElectronRecEtaE->Fill(part->Energy(),part->Eta());
+                     fHistScatElectronRecEtaPt->Fill(part->Pt(),part->Eta());                                                  
+                     fScatElectronRectotET += et;
+                   }           
+               }
                                
-                               // few checks
-                               if (pdgMom)
-                                       fHistElectronFirstMotherRec->Fill(pdgMom->PdgCode());
-                               fHistElectronFirstMotherXYRec->Fill(part->Vx(),part->Vy());                                     
-                               fHistElectronNDaughtersRec->Fill(nPartDaughters);
+             // few checks
+             if (pdgMom)
+               fHistElectronFirstMotherRec->Fill(pdgMom->PdgCode());
+             fHistElectronFirstMotherXYRec->Fill(part->Vx(),part->Vy());                                       
+             fHistElectronNDaughtersRec->Fill(nPartDaughters);
                                
-                               iPartDaughter = part->GetLastDaughter();
-                               if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
-                               {
-                                       partDaughter = stack->Particle(iPartDaughter);
-                                       if (partDaughter)
-                                       {
-                                               pdgDaugther = partDaughter->GetPDG(0);
-                                               if (pdgDaugther) {
-                                                       fHistElectronDaughtersRec->Fill(pdgDaugther->PdgCode());        
-                                                       fHistElectronDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
-                                               }
-                                       }
-                               }
-                       } // electrons
+             iPartDaughter = part->GetLastDaughter();
+             if ((iPartDaughter>=0) && (iPartDaughter < nStackTracks))
+               {
+                 partDaughter = stack->Particle(iPartDaughter);
+                 if (partDaughter)
+                   {
+                     pdgDaugther = partDaughter->GetPDG(0);
+                     if (pdgDaugther) {
+                       fHistElectronDaughtersRec->Fill(pdgDaugther->PdgCode());        
+                       fHistElectronDaughtersXYRec->Fill(partDaughter->Vx(),partDaughter->Vy());
+                     }
+                   }
+               }
+           } // electrons
                        
-                       if (pdg->PdgCode() == fgMuPlusCode || pdg->PdgCode() == fgMuMinusCode)
-                       {
-                               fHistMuonRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                               fHistMuonRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                               fHistMuonRecEtaET->Fill(et,part->Eta());
-                               fHistMuonRecEtaE->Fill(part->Energy(),part->Eta());
-                               fHistMuonRecEtaPt->Fill(part->Pt(),part->Eta());        
-                               fMuonRectotET += et;
+         if (pdg->PdgCode() == fgMuPlusCode || pdg->PdgCode() == fgMuMinusCode)
+           {
+             fHistMuonRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+             fHistMuonRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
+             fHistMuonRecEtaET->Fill(et,part->Eta());
+             fHistMuonRecEtaE->Fill(part->Energy(),part->Eta());
+             fHistMuonRecEtaPt->Fill(part->Pt(),part->Eta());  
+             fMuonRectotET += et;
                                
-                               fHistMuonRecEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
-                               fHistMuonRecEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                     
-                               fHistMuonRecEtaETDep->Fill(etDep,part->Eta());
-                               fMuonRectotETDep += etDep;
+             fHistMuonRecEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
+             fHistMuonRecEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                       
+             fHistMuonRecEtaETDep->Fill(etDep,part->Eta());
+             fMuonRectotETDep += etDep;
 
-                               if (trackProjected)
-                               {
-                                       fHistMuonRecResEET->Fill(part->Energy(),res,et);
-                                       fHistMuonRecResPtET->Fill(part->Pt(),res,et);                                                   
-                                       fHistMuonRecResE->Fill(part->Energy(),res);
-                                       fHistMuonRecResPt->Fill(part->Pt(),res);        
-                                       fHistMuonRecResEDepETDep->Fill(caloE,res,etDep);
-                                       fHistMuonRecResPtETDep->Fill(part->Pt(),res,etDep);     
+             if (trackProjected)
+               {
+                 fHistMuonRecResEET->Fill(part->Energy(),res,et);
+                 fHistMuonRecResPtET->Fill(part->Pt(),res,et);                                                 
+                 fHistMuonRecResE->Fill(part->Energy(),res);
+                 fHistMuonRecResPt->Fill(part->Pt(),res);      
+                 fHistMuonRecResEDepETDep->Fill(caloE,res,etDep);
+                 fHistMuonRecResPtETDep->Fill(part->Pt(),res,etDep);   
                                        
-                                       if ((res>0.) && (res<fResCut))
-                                       {
-                                               fHistMuonMatchEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistMuonMatchEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
-                                               fHistMuonMatchEtaET->Fill(et,part->Eta());
-                                               fHistMuonMatchEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistMuonMatchEtaPt->Fill(part->Pt(),part->Eta());      
-                                               fMuonMatchtotET += et;
+                 if ((res>0.) && (res<fResCut))
+                   {
+                     fHistMuonMatchEtaEET->Fill(part->Energy(),part->Eta(),et);
+                     fHistMuonMatchEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
+                     fHistMuonMatchEtaET->Fill(et,part->Eta());
+                     fHistMuonMatchEtaE->Fill(part->Energy(),part->Eta());
+                     fHistMuonMatchEtaPt->Fill(part->Pt(),part->Eta());        
+                     fMuonMatchtotET += et;
                                                
-                                               fHistMuonMatchEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
-                                               fHistMuonMatchEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                   
-                                               fHistMuonMatchEtaETDep->Fill(etDep,part->Eta());
-                                               fMuonMatchtotETDep += etDep;                                            
-                                       }
-                               }
-                       }
+                     fHistMuonMatchEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
+                     fHistMuonMatchEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                     
+                     fHistMuonMatchEtaETDep->Fill(etDep,part->Eta());
+                     fMuonMatchtotETDep += etDep;                                              
+                   }
+               }
+           }
                        
-                       if (pdg->PdgCode() == fgPiPlusCode || pdg->PdgCode() == fgPiMinusCode)
-                       {
-                               fHistPionRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                               fHistPionRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                               fHistPionRecEtaET->Fill(et,part->Eta());
-                               fHistPionRecEtaE->Fill(part->Energy(),part->Eta());
-                               fHistPionRecEtaPt->Fill(part->Pt(),part->Eta());        
-                               fPionRectotET += et;
-
-                               fHistPionRecEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
-                               fHistPionRecEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                     
-                               fHistPionRecEtaETDep->Fill(etDep,part->Eta());
-                               fPionRectotETDep += etDep;
-
-                               if (trackProjected)
-                               {
-                                       fHistPionRecResEET->Fill(part->Energy(),res,et);
-                                       fHistPionRecResPtET->Fill(part->Pt(),res,et);                                                   
-                                       fHistPionRecResE->Fill(part->Energy(),res);
-                                       fHistPionRecResPt->Fill(part->Pt(),res);        
-                                       fHistPionRecResEDepETDep->Fill(caloE,res,etDep);
-                                       fHistPionRecResPtETDep->Fill(part->Pt(),res,etDep);                                                     
-
-                                       if ((res>0.) && (res<fResCut))
-                                       {
-                                               fHistPionMatchEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistPionMatchEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
-                                               fHistPionMatchEtaET->Fill(et,part->Eta());
-                                               fHistPionMatchEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistPionMatchEtaPt->Fill(part->Pt(),part->Eta());      
-                                               fPionMatchtotET += et;
+         if (pdg->PdgCode() == fgPiPlusCode || pdg->PdgCode() == fgPiMinusCode)
+           {
+             fHistPionRecEtaEET->Fill(part->Energy(),part->Eta(),et);
+             fHistPionRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                     
+             fHistPionRecEtaET->Fill(et,part->Eta());
+             fHistPionRecEtaE->Fill(part->Energy(),part->Eta());
+             fHistPionRecEtaPt->Fill(part->Pt(),part->Eta());  
+             fPionRectotET += et;
+
+             fHistPionRecEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
+             fHistPionRecEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                       
+             fHistPionRecEtaETDep->Fill(etDep,part->Eta());
+             fPionRectotETDep += etDep;
+
+             if (trackProjected)
+               {
+                 fHistPionRecResEET->Fill(part->Energy(),res,et);
+                 fHistPionRecResPtET->Fill(part->Pt(),res,et);                                                 
+                 fHistPionRecResE->Fill(part->Energy(),res);
+                 fHistPionRecResPt->Fill(part->Pt(),res);      
+                 fHistPionRecResEDepETDep->Fill(caloE,res,etDep);
+                 fHistPionRecResPtETDep->Fill(part->Pt(),res,etDep);                                                   
+
+                 if ((res>0.) && (res<fResCut))
+                   {
+                     fHistPionMatchEtaEET->Fill(part->Energy(),part->Eta(),et);
+                     fHistPionMatchEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
+                     fHistPionMatchEtaET->Fill(et,part->Eta());
+                     fHistPionMatchEtaE->Fill(part->Energy(),part->Eta());
+                     fHistPionMatchEtaPt->Fill(part->Pt(),part->Eta());        
+                     fPionMatchtotET += et;
                                                
-                                               fHistPionMatchEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
-                                               fHistPionMatchEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                   
-                                               fHistPionMatchEtaETDep->Fill(etDep,part->Eta());
-                                               fPionMatchtotETDep += etDep;
-                                       }
-                               }
-                       }                       
+                     fHistPionMatchEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
+                     fHistPionMatchEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                     
+                     fHistPionMatchEtaETDep->Fill(etDep,part->Eta());
+                     fPionMatchtotETDep += etDep;
+                   }
+               }
+           }                   
                        
-                       if (pdg->PdgCode() == fgKPlusCode || pdg->PdgCode() == fgKMinusCode)
-                       {
-                               fHistKaonRecEtaEET->Fill(part->Energy(),part->Eta(),et);
-                               fHistKaonRecEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                   
-                               fHistKaonRecEtaET->Fill(et,part->Eta());
-                               fHistKaonRecEtaE->Fill(part->Energy(),part->Eta());
-                               fHistKaonRecEtaPt->Fill(part->Pt(),part->Eta());        
-                               fKaonRectotET += et;
-
-                               fHistKaonRecEtaEDepETDep->Fill(caloE,part->Eta(),etDep);
-                               fHistKaonRecEtaPtETDep->Fill(part->Pt(),part->Eta(),etDep);                                                     
-                               fHistKaonRecEtaETDep->Fill(etDep,part->Eta());
-                               fKaonRectotETDep += etDep;
-
-                               if (trackProjected)
-                               {
-                                       fHistKaonRecResEET->Fill(part->Energy(),res,et);
-                                       fHistKaonRecResPtET->Fill(part->Pt(),res,et);                                                   
-                                       fHistKaonRecResE->Fill(part->Energy(),res);
-                                       fHistKaonRecResPt->Fill(part->Pt(),res);        
-
-                                       fHistKaonRecResEDepETDep->Fill(caloE,res,etDep);
-                                       fHistKaonRecResPtETDep->Fill(part->Pt(),res,etDep);                                                     
-
-                                       if ((res>0.) && (res<fResCut))
-                                       {
-                                               fHistKaonMatchEtaEET->Fill(part->Energy(),part->Eta(),et);
-                                               fHistKaonMatchEtaPtET->Fill(part->Pt(),part->Eta(),et);                                                 
-                                               fHistKaonMatchEtaET->Fill(et,part->Eta());
-                                               fHistKaonMatchEtaE->Fill(part->Energy(),part->Eta());
-                                               fHistKaonMatchEtaPt->Fill(part->Pt(),part->Eta());      
-                                               fKaonMatchtotET += et;
+         if (pdg->PdgCode() == fgKPlusCode || pdg->PdgCode() == fgKMinusCode)
+           {
+