#include "AliAnaPhoton.h"
#include "AliCaloTrackReader.h"
#include "AliCaloPID.h"
+#include "AliMCAnalysisUtils.h"
+#include "AliStack.h"
ClassImp(AliAnaPhoton)
//MC
fhPtPrompt(0),fhPhiPrompt(0),fhEtaPrompt(0),
fhPtFragmentation(0),fhPhiFragmentation(0),fhEtaFragmentation(0),
+ fhPtISR(0),fhPhiISR(0),fhEtaISR(0),
fhPtPi0Decay(0),fhPhiPi0Decay(0),fhEtaPi0Decay(0),
fhPtOtherDecay(0),fhPhiOtherDecay(0),fhEtaOtherDecay(0),
fhPtConversion(0),fhPhiConversion(0),fhEtaConversion(0),
//MC
fhPtPrompt(g.fhPtPrompt),fhPhiPrompt(g.fhPhiPrompt),fhEtaPrompt(g.fhEtaPrompt),
fhPtFragmentation(g.fhPtFragmentation),fhPhiFragmentation(g.fhPhiFragmentation),fhEtaFragmentation(g.fhEtaFragmentation),
+ fhPtISR(g.fhPtISR),fhPhiISR(g.fhPhiISR),fhEtaISR(g.fhEtaISR),
fhPtPi0Decay(g.fhPtPi0Decay),fhPhiPi0Decay(g.fhPhiPi0Decay),fhEtaPi0Decay(g.fhEtaPi0Decay),
fhPtOtherDecay(g.fhPtOtherDecay),fhPhiOtherDecay(g.fhPhiOtherDecay),fhEtaOtherDecay(g.fhEtaOtherDecay),
fhPtConversion(g. fhPtConversion),fhPhiConversion(g.fhPhiConversion),fhEtaConversion(g.fhEtaConversion),
- fhPtUnknown(g.fhPtUnknown),fhPhiUnknown(g.fhPhiUnknown),fhEtaUnknown(g.fhEtaUnknown)
+ fhPtUnknown(g.fhPtUnknown),fhPhiUnknown(g.fhPhiUnknown),fhEtaUnknown(g.fhEtaUnknown)
+
{
// cpy ctor
fMinDist2 = g.fMinDist2;
fMinDist3 = g.fMinDist3;
- fhPtPhoton = g.fhPtPhoton ;
+ fhPtPhoton = g.fhPtPhoton ;
fhPhiPhoton = g.fhPhiPhoton ;
fhEtaPhoton = g.fhEtaPhoton ;
- fhPtPrompt = g.fhPtPrompt;
+ fhPtPrompt = g.fhPtPrompt;
fhPhiPrompt = g.fhPhiPrompt;
fhEtaPrompt = g.fhEtaPrompt;
- fhPtFragmentation = g.fhPtFragmentation;
+ fhPtFragmentation = g.fhPtFragmentation;
fhPhiFragmentation = g.fhPhiFragmentation;
fhEtaFragmentation = g.fhEtaFragmentation;
- fhPtPi0Decay = g.fhPtPi0Decay;
+ fhPtISR = g.fhPtISR;
+ fhPhiISR = g.fhPhiISR;
+ fhEtaISR = g.fhEtaISR;
+ fhPtPi0Decay = g.fhPtPi0Decay;
fhPhiPi0Decay = g.fhPhiPi0Decay;
fhEtaPi0Decay = g.fhEtaPi0Decay;
- fhPtOtherDecay = g.fhPtOtherDecay;
+ fhPtOtherDecay = g.fhPtOtherDecay;
fhPhiOtherDecay = g.fhPhiOtherDecay;
fhEtaOtherDecay = g.fhEtaOtherDecay;
- fhPtConversion = g. fhPtConversion;
+ fhPtConversion = g. fhPtConversion;
fhPhiConversion = g.fhPhiConversion;
fhEtaConversion = g.fhEtaConversion;
- fhPtUnknown = g.fhPtUnknown;
+ fhPtUnknown = g.fhPtUnknown;
fhPhiUnknown = g.fhPhiUnknown;
fhEtaUnknown = g.fhEtaUnknown;
fhEtaPrompt->SetYTitle("#eta");
fhEtaPrompt->SetXTitle("p_{T #gamma} (GeV/c)");
outputContainer->Add(fhEtaPrompt) ;
-
+
fhPtFragmentation = new TH1F("hPtFragmentation","Number of #gamma over calorimeter",nptbins,ptmin,ptmax);
fhPtFragmentation->SetYTitle("N");
fhPtFragmentation->SetXTitle("p_{T #gamma}(GeV/c)");
fhEtaFragmentation->SetXTitle("p_{T #gamma} (GeV/c)");
outputContainer->Add(fhEtaFragmentation) ;
+ fhPtISR = new TH1F("hPtISR","Number of initial state radiation #gamma over calorimeter",nptbins,ptmin,ptmax);
+ fhPtISR->SetYTitle("N");
+ fhPtISR->SetXTitle("p_{T #gamma}(GeV/c)");
+ outputContainer->Add(fhPtISR) ;
+
+ fhPhiISR = new TH2F
+ ("hPhiISR","#phi_{#gamma} initial state radiation",nptbins,ptmin,ptmax,nphibins,phimin,phimax);
+ fhPhiISR->SetYTitle("#phi");
+ fhPhiISR->SetXTitle("p_{T #gamma} (GeV/c)");
+ outputContainer->Add(fhPhiISR) ;
+
+ fhEtaISR = new TH2F
+ ("hEtaISR","#phi_{#gamma} initial state radiation",nptbins,ptmin,ptmax,netabins,etamin,etamax);
+ fhEtaISR->SetYTitle("#eta");
+ fhEtaISR->SetXTitle("p_{T #gamma} (GeV/c)");
+ outputContainer->Add(fhEtaISR) ;
+
fhPtPi0Decay = new TH1F("hPtPi0Decay","Number of #gamma over calorimeter",nptbins,ptmin,ptmax);
fhPtPi0Decay->SetYTitle("N");
fhPtPi0Decay->SetXTitle("p_{T #gamma}(GeV/c)");
fhEtaConversion->SetYTitle("#eta");
fhEtaConversion->SetXTitle("p_{T #gamma} (GeV/c)");
outputContainer->Add(fhEtaConversion) ;
-
+
fhPtUnknown = new TH1F("hPtUnknown","Number of #gamma over calorimeter",nptbins,ptmin,ptmax);
fhPtUnknown->SetYTitle("N");
fhPtUnknown->SetXTitle("p_{T #gamma}(GeV/c)");
fhEtaUnknown->SetYTitle("#eta");
fhEtaUnknown->SetXTitle("p_{T #gamma} (GeV/c)");
outputContainer->Add(fhEtaUnknown) ;
+
}//Histos with MC
//Save parameters used for analysis
}
+//____________________________________________________________________________
+void AliAnaPhoton::Init()
+{
+
+ //Init
+ //Do some checks
+ if(fCalorimeter == "PHOS" && !GetReader()->IsPHOSSwitchedOn()){
+ printf("!!ABORT: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n");
+ abort();
+ }
+ else if(fCalorimeter == "EMCAL" && !GetReader()->IsEMCALSwitchedOn()){
+ printf("!!ABORT: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n");
+ abort();
+ }
+
+}
+
+
//____________________________________________________________________________
void AliAnaPhoton::InitParameters()
{
//Play with the MC stack if available
//Check origin of the candidates
if(IsDataMC()){
- aodph.SetTag(GetCaloPID()->CheckOrigin(calo->GetLabel(0),GetMCStack()));
+ aodph.SetTag(GetMCAnalysisUtils()->CheckOrigin(calo->GetLabel(0),GetMCStack()));
if(GetDebug() > 0) printf("AliAnaPhoton::FillAOD: Origin of candidate %d\n",aodph.GetTag());
}//Work with stack also
fhPtPhoton ->Fill(ptcluster);
fhPhiPhoton ->Fill(ptcluster,phicluster);
fhEtaPhoton ->Fill(ptcluster,etacluster);
-
+
if(IsDataMC()){
Int_t tag =ph->GetTag();
- if(tag == AliCaloPID::kMCPrompt){
- fhPtPrompt ->Fill(ptcluster);
+ if(tag == AliMCAnalysisUtils::kMCPrompt){
+ fhPtPrompt ->Fill(ptcluster);
fhPhiPrompt ->Fill(ptcluster,phicluster);
fhEtaPrompt ->Fill(ptcluster,etacluster);
}
- else if(tag==AliCaloPID::kMCFragmentation)
+ else if(tag==AliMCAnalysisUtils::kMCFragmentation)
{
- fhPtFragmentation ->Fill(ptcluster);
+ fhPtFragmentation ->Fill(ptcluster);
fhPhiFragmentation ->Fill(ptcluster,phicluster);
fhEtaFragmentation ->Fill(ptcluster,etacluster);
}
- else if(tag==AliCaloPID::kMCPi0Decay)
+ else if(tag==AliMCAnalysisUtils::kMCISR)
{
- fhPtPi0Decay ->Fill(ptcluster);
+ fhPtISR ->Fill(ptcluster);
+ fhPhiISR ->Fill(ptcluster,phicluster);
+ fhEtaISR ->Fill(ptcluster,etacluster);
+ }
+ else if(tag==AliMCAnalysisUtils::kMCPi0Decay)
+ {
+ fhPtPi0Decay ->Fill(ptcluster);
fhPhiPi0Decay ->Fill(ptcluster,phicluster);
fhEtaPi0Decay ->Fill(ptcluster,etacluster);
}
- else if(tag==AliCaloPID::kMCEtaDecay || tag==AliCaloPID::kMCOtherDecay)
+ else if(tag==AliMCAnalysisUtils::kMCEtaDecay || tag==AliMCAnalysisUtils::kMCOtherDecay)
{
- fhPtOtherDecay ->Fill(ptcluster);
+ fhPtOtherDecay ->Fill(ptcluster);
fhPhiOtherDecay ->Fill(ptcluster,phicluster);
fhEtaOtherDecay ->Fill(ptcluster,etacluster);
}
- else if(tag==AliCaloPID::kMCConversion)
+ else if(tag==AliMCAnalysisUtils::kMCConversion)
{
- fhPtConversion ->Fill(ptcluster);
+ fhPtConversion ->Fill(ptcluster);
fhPhiConversion ->Fill(ptcluster,phicluster);
fhEtaConversion ->Fill(ptcluster,etacluster);
+
}
else{
- fhPtUnknown ->Fill(ptcluster);
+ fhPtUnknown ->Fill(ptcluster);
fhPhiUnknown ->Fill(ptcluster,phicluster);
fhEtaUnknown ->Fill(ptcluster,etacluster);
}