fPeriod("LHC11c"),
fTrigBit("kEMC7"),
fIsTrain(0),
+ fIsMc(0),
fExoticCut(0.97),
fIsoConeR(0.4),
fNDimensions(7),
fECut(3.),
fTrackMult(0),
fESD(0),
+ fMCEvent(0),
+ fStack(0),
fOutputList(0),
fEvtSel(0),
fNClusEt10(0),
- fPVtxZ(0),
+ fPVtxZ(0),
+ fDirPhotonPtMC(0),
+ fDecayPhotonPtMC(0),
fCellAbsIdVsAmpl(0),
fNClusHighClusE(0),
fHnOutput(0)
fPeriod("LHC11c"),
fTrigBit("kEMC7"),
fIsTrain(0),
+ fIsMc(0),
fExoticCut(0.97),
fIsoConeR(0.4),
fNDimensions(7),
fECut(3.),
fTrackMult(0),
fESD(0),
+ fMCEvent(0),
+ fStack(0),
fOutputList(0),
fEvtSel(0),
fNClusEt10(0),
fPVtxZ(0),
- fCellAbsIdVsAmpl(0),
+ fDirPhotonPtMC(0),
+ fDecayPhotonPtMC(0),
+ fCellAbsIdVsAmpl(0),
fNClusHighClusE(0),
fHnOutput(0)
{
fPVtxZ = new TH1F("hPVtxZ","primary vertex Z before cut;prim-vz(cm) ;",200,-100,100);
fOutputList->Add(fPVtxZ);
-
+
+ fDirPhotonPtMC = new TH1F("hDirPhotonPtMC","photon (gq->#gammaq) p_{T};GeV/c;dN/dp_{T} (c GeV^{-1})",1000,0,100);
+ fDirPhotonPtMC->Sumw2();
+ fOutputList->Add(fDirPhotonPtMC);
+
+ fDecayPhotonPtMC = new TH1F("hDecayPhotonPtMC","decay photon p_{T};GeV/c;dN/dp_{T} (c GeV^{-1})",1000,0,100);
+ fDecayPhotonPtMC->Sumw2();
+ fOutputList->Add(fDecayPhotonPtMC);
+
fCellAbsIdVsAmpl = new TH2F("hCellAbsIdVsAmpl","cell abs id vs cell amplitude (energy);E (GeV);ID",200,0,100,24*48*10,-0.5,24*48*10-0.5);
fOutputList->Add(fCellAbsIdVsAmpl);
else
isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kINT7);
}
+ if(fIsMc)
+ isSelected = kTRUE;
if(!isSelected )
return;
fCaloClusters->Clear();
fSelPrimTracks->Clear();
+
+ fMCEvent = MCEvent();
+ if(fMCEvent)
+ fStack = (AliStack*)fMCEvent->Stack();
+
PostData(1, fOutputList);
}
return maxe;
}
+//________________________________________________________________________
+void AliAnalysisTaskEMCALIsoPhoton ::FillMcHists()
+{
+ if(!fStack)
+ return;
+ Int_t nTracks = fStack->GetNtrack();
+ for(Int_t iTrack=0;iTrack<nTracks;iTrack++){
+ TParticle *mcp = static_cast<TParticle*>(fStack->Particle(iTrack));
+ if(!mcp)
+ continue;
+ Int_t pdg = mcp->GetPdgCode();
+ if(pdg!=22)
+ continue;
+ Int_t imom = mcp->GetMother(0);
+ if(imom<0 || imom>nTracks)
+ continue;
+ TParticle *mcmom = static_cast<TParticle*>(fStack->Particle(imom));
+ if(!mcmom)
+ continue;
+ Int_t pdgMom = mcmom->GetPdgCode();
+ if(TMath::Abs(pdgMom)<7)
+ fDirPhotonPtMC->Fill(mcp->Pt());
+ else{
+ if(TMath::Abs(pdgMom)>100 && TMath::Abs(pdgMom)<1000)
+ fDecayPhotonPtMC->Fill(mcp->Pt());
+ }
+ }
+}
//________________________________________________________________________
void AliAnalysisTaskEMCALIsoPhoton::Terminate(Option_t *)
{
class AliESDtrack;
class AliESDtrackCuts;
class AliVCluster;
+class AliMCEvent;
+class AliStack;
+class TParticle;
#include "AliAnalysisTaskSE.h"
Double_t GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const;
void GetTrIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core);
void FillClusHists();
+ void FillMcHists();
void SetExotCut(Double_t c) { fExoticCut = c; }
void SetGeoName(const char *n) { fGeoName = n; }
void SetIsoConeR(Double_t r) { fIsoConeR = r; }
void SetTriggerBit(const char *tb) { fTrigBit = tb; }
void SetPrimTrackCuts(AliESDtrackCuts *c) { fPrTrCuts = c; }
void SetTrainMode(Bool_t t) { fIsTrain = t; }
+ void SetMcMode(Bool_t mc) { fIsMc = mc; }
protected:
TRefArray *fCaloClusters; //!pointer to EMCal clusters
TString fPeriod; // string to the LHC period
TString fTrigBit; // string to the trigger bit name
Bool_t fIsTrain; // variable to set train mode
+ Bool_t fIsMc; // variable to set mc mode
Double_t fExoticCut; // variable to set the cut on exotic clusters
Double_t fIsoConeR; // variable to set the isolation cone radius
Int_t fNDimensions; // variable to set the number of dimensions of n-sparse
private:
AliESDEvent *fESD; //! ESD object
+ AliMCEvent *fMCEvent; //! MC event object
+ AliStack *fStack; //!MC particles stack object
+
TList *fOutputList; //! Output list
//histograms for events with 1+ track pt>1
TH1F *fEvtSel; //!evt selection counter: 0=all trg, 1=pv cut
TH1F *fNClusEt10; //!number of clusters w/ Et>10 in the event
TH1F *fPVtxZ; //!primary vertex Z before cut
+ TH1F *fDirPhotonPtMC; //!direct produced photon pt
+ TH1F *fDecayPhotonPtMC; //!decay photon pt
TH2F *fCellAbsIdVsAmpl; //!cell abs id vs cell amplitude (energy)
TH2F *fNClusHighClusE; //!total number of clusters vs. highest clus energy in the event
THnSparse *fHnOutput; //!Output matrix with 7 dimensions