+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
#include "TObjArray.h"
#include "TF1.h"
#include "TH1F.h"
#include "TH2I.h"
#include "TH3F.h"
#include "TParticle.h"
+#include "TList.h"
+#include "THashList.h"
#include "AliAnalysisTaskSE.h"
#include "AliAnalysisTaskEpRatio.h"
#include "AliPHOSCalibData.h"
#include "AliOADBContainer.h"
-// E/p analysis task.
+// Analysis task to fill histograms with E/p ratios for electrons, positrons, muons
+// and hadrons (pions, kaons..), where E is an energy of PHOS cluster
+// and p is the momentum of it's matched track.
+
// Authors: Boris Polishchuk,Tsubasa Okubo
-// Date : 28.05.2009
+// Date : 04.07.2013
ClassImp(AliAnalysisTaskEpRatio)
//________________________________________________________________________
if(fOutputContainer != NULL){
delete fOutputContainer;
}
- fOutputContainer = new TList();
+ fOutputContainer = new THashList();
fOutputContainer->SetOwner();
fOutputContainer->Add( new TH1F("h_CellMultEvent","PHOS Cell Multiplicity per Event",200,0,200) );
AliError(Form("Calling FillHistogram with 2 parameters for histo <%s> of type %s",key,tmp->IsA()->GetName())) ;
}
-//_____________________________________________________________________________
-void AliAnalysisTaskEpRatio::FillHistogram(const char * key,Double_t x,Double_t y, Double_t z) const{
- //Fills 1D histograms with key
- TObject * tmp = fOutputContainer->FindObject(key) ;
- if(!tmp){
- AliInfo(Form("can not find histogram <%s> ",key)) ;
- return ;
- }
- if(tmp->IsA() == TClass::GetClass("TH2F")){
- ((TH2F*)tmp)->Fill(x,y,z) ;
- return ;
- }
- if(tmp->IsA() == TClass::GetClass("TH3F")){
- ((TH3F*)tmp)->Fill(x,y,z) ;
- return ;
- }
-}
-
//_____________________________________________________________________________
void AliAnalysisTaskEpRatio::SetGeometry()
{
- //Init geometry
+ //Init geometry.
if(!fPHOSGeo){
// E/p analysis task.
// Authors: Boris Polishchuk, Tsubasa Okubo
-class TObjArray;
-class TH1F;
-class TH2I;
-class TH2F;
-class TH3F;
class AliPHOSGeometry;
class AliAnalysisTaskSE;
class AliPIDResponse;
-
-#include "TH2I.h"
#include "AliAnalysisTaskSE.h"
class AliAnalysisTaskEpRatio : public AliAnalysisTaskSE {
void SetGeometry();
void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
- void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
-
+
private:
Int_t fRunNumber;
- TList * fOutputContainer; //final histogram container
- AliPHOSGeometry *fPHOSGeo; // PHOS geometry
+ TList * fOutputContainer; // final histogram container
+ AliPHOSGeometry *fPHOSGeo; // PHOS geometry
AliPIDResponse *fPIDResponse; // PID Response
- ClassDef(AliAnalysisTaskEpRatio, 2); // PHOS analysis task
+ ClassDef(AliAnalysisTaskEpRatio, 1); // PHOS analysis task
};
#endif