Tweaks to destructors and getting code working with plugin
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jun 2012 12:57:42 +0000 (12:57 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jun 2012 12:57:42 +0000 (12:57 +0000)
PWGLF/totEt/AliAnalysisEt.cxx
PWGLF/totEt/AliAnalysisEtMonteCarlo.cxx
PWGLF/totEt/AliAnalysisEtMonteCarloPhos.cxx
PWGLF/totEt/AliAnalysisEtReconstructed.cxx
PWGLF/totEt/AliAnalysisEtReconstructedPhos.cxx
PWGLF/totEt/AliAnalysisEtReconstructedPhos.h
PWGLF/totEt/AliAnalysisTaskTransverseEnergy.h

index 3cf6428..9626d2d 100644 (file)
@@ -163,11 +163,18 @@ AliAnalysisEt::~AliAnalysisEt()
     fEventSummaryTree->Clear();
     delete fEventSummaryTree;
   }
+  if(fAcceptedTree)
+  {
+    fAcceptedTree->Clear();
+    delete fAcceptedTree;
+  }
   delete fHistEt; //Et spectrum
   delete fHistNeutralMult; //Neutral multiplicity
   delete fHistPhivsPtPos; //phi vs pT plot for positive tracks
-  delete fHistPhivsPtNeg; //phi vs pT plot for negative tracks
+  delete fHistPhivsPtNeg; //phi vs pT Moplot for negative tracks
   //delete fCentrality;//this code does not actually own AliCentrality so we don't have to worry about deleting it...  we just borrow it...
+  delete fCutFlow;
+  delete fSelector;
 }
 
 void AliAnalysisEt::FillOutputList(TList *list)
index d4d1a85..b796e7f 100644 (file)
@@ -222,6 +222,11 @@ AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt()
 // dtor
 AliAnalysisEtMonteCarlo::~AliAnalysisEtMonteCarlo()
 {   //Destructor
+
+  if(fPrimaryTree){
+    fPrimaryTree->Clear();
+    delete fPrimaryTree;
+  }
     delete fHistDecayVertexNonRemovedCharged; // Decay vertex for non-removed charged particles
     delete fHistDecayVertexRemovedCharged; // Decay vertex for non-removed charged particles
     delete fHistDecayVertexNonRemovedNeutral; // Decay vertex for non-removed charged particles
index 89c1eec..126cf26 100644 (file)
@@ -32,6 +32,10 @@ AliAnalysisEtMonteCarloPhos::AliAnalysisEtMonteCarloPhos():AliAnalysisEtMonteCar
 
 AliAnalysisEtMonteCarloPhos::~AliAnalysisEtMonteCarloPhos()
 {
+  delete fBadMapM2;
+  delete fBadMapM3;
+  delete fBadMapM4;
+  delete fGeoUtils;
 }
 
 
index 5272533..21b6124 100644 (file)
@@ -71,6 +71,10 @@ AliAnalysisEtReconstructed::~AliAnalysisEtReconstructed()
     delete fHistMuonEnergyDeposit; /** Energy deposited in calorimeter by muons */
 
     delete fHistRemovedEnergy; // removed energy
+    delete fClusterPosition;
+    delete fHistChargedEnergyRemoved;
+    delete fHistNeutralEnergyRemoved;
+    delete fHistGammaEnergyAdded;
 
 }
 
index 0abe592..b694102 100644 (file)
@@ -69,6 +69,7 @@ AliAnalysisEtReconstructedPhos::AliAnalysisEtReconstructedPhos() :
     fSecondaryContributionCorrectionParameters[0] = 0.075;
     fSecondaryContributionCorrectionParameters[1] = 0.150187;
     fSecondaryContributionCorrectionParameters[2] = 0.00329361;
+
 }
 
 AliAnalysisEtReconstructedPhos::~AliAnalysisEtReconstructedPhos()
@@ -79,7 +80,6 @@ void AliAnalysisEtReconstructedPhos::Init()
 { // Init
     AliAnalysisEtReconstructed::Init();
 
-    fSelector = new AliAnalysisEtSelectorPhos(fCuts);
     
     fDetectorRadius = fCuts->GetGeometryPhosDetectorRadius();
     fSingleCellEnergyCut = fCuts->GetReconstructedPhosSingleCellEnergyCut();
@@ -144,3 +144,9 @@ Double_t AliAnalysisEtReconstructedPhos::GetSecondaryContribution(Int_t clusterM
 
 
 
+
+void AliAnalysisEtReconstructedPhos::CreateHistograms()
+{ // add some extra histograms & objects to the ones from base class
+  AliAnalysisEtReconstructed::CreateHistograms();
+  fSelector = new AliAnalysisEtSelectorPhos(fCuts);
+}
index a7f32ee..0d4b511 100644 (file)
@@ -22,6 +22,8 @@ public:
 
     virtual void Init();
 
+    void CreateHistograms();
+
     virtual Double_t GetChargedContribution(Int_t clusterMultiplicity);
 
     virtual Double_t GetNeutralContribution(Int_t clusterMultiplicity);
@@ -34,7 +36,7 @@ public:
     {
         fChargedContributionCorrectionParameters[0] = par[0];
         fChargedContributionCorrectionParameters[1] = par[1];
-       fChargedContributionCorrectionParameters[1] = par[2];
+       fChargedContributionCorrectionParameters[2] = par[2];
     }
     void SetNeutralContributionParameters(Double_t par[3])
     {
index 4902417..12f0092 100644 (file)
@@ -24,7 +24,7 @@ public:
     /** Constructor */
     AliAnalysisTaskTransverseEnergy(const char* name, Bool_t isMc);
 
-    /** Destructro */
+    /** Destructor */
     virtual ~AliAnalysisTaskTransverseEnergy();
 
     AliESDtrackCuts* GetTPCITSTrackCuts(){return (AliESDtrackCuts*) fOutputList->FindObject("fEsdTrackCuts");}