From 14d3c3915cff5cf80fac9eaffe162f923519014c Mon Sep 17 00:00:00 2001 From: ssakai Date: Tue, 4 Nov 2014 22:45:47 +0100 Subject: [PATCH] updated HFE EMC QA task --- PWGHF/hfe/AliAnalysisTaskHFEemcQA.cxx | 66 +++++++++++++++++++++++---- PWGHF/hfe/AliAnalysisTaskHFEemcQA.h | 5 +- 2 files changed, 60 insertions(+), 11 deletions(-) diff --git a/PWGHF/hfe/AliAnalysisTaskHFEemcQA.cxx b/PWGHF/hfe/AliAnalysisTaskHFEemcQA.cxx index ee859a72b79..96aa79c2b32 100644 --- a/PWGHF/hfe/AliAnalysisTaskHFEemcQA.cxx +++ b/PWGHF/hfe/AliAnalysisTaskHFEemcQA.cxx @@ -1,3 +1,24 @@ +/************************************************************************** + * 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. * + **************************************************************************/ + + +////////////////////////////////////////////// +// QA task for EMCAL electron analysis // +// Author: Deepa Thomas, Shingo Sakai // +////////////////////////////////////////////// + #include "TChain.h" #include "TTree.h" #include "TH1F.h" @@ -28,8 +49,6 @@ #include "AliAnalysisTaskHFEemcQA.h" -//QA task for EMCAL electron analysis - using std::cout; using std::endl; @@ -53,6 +72,8 @@ ClassImp(AliAnalysisTaskHFEemcQA) fTrigMulti(0), fHistClustE(0), fEMCClsEtaPhi(0), + fHistoNCls(0), + fHistoNCells(0), fNegTrkIDPt(0), fTrkPt(0), fTrketa(0), @@ -68,6 +89,7 @@ ClassImp(AliAnalysisTaskHFEemcQA) fEMCdEdx(0), fEMCTPCnsig(0), fEMCTPCNpts(0), + fClsEAftMatch(0), fHistdEdxEop(0), fHistNsigEop(0), fHistEop(0), @@ -115,6 +137,8 @@ AliAnalysisTaskHFEemcQA::AliAnalysisTaskHFEemcQA() fTrigMulti(0), fHistClustE(0), fEMCClsEtaPhi(0), + fHistoNCls(0), + fHistoNCells(0), fNegTrkIDPt(0), fTrkPt(0), fTrketa(0), @@ -130,6 +154,7 @@ AliAnalysisTaskHFEemcQA::AliAnalysisTaskHFEemcQA() fEMCdEdx(0), fEMCTPCnsig(0), fEMCTPCNpts(0), + fClsEAftMatch(0), fHistdEdxEop(0), fHistNsigEop(0), fHistEop(0), @@ -218,6 +243,12 @@ void AliAnalysisTaskHFEemcQA::UserCreateOutputObjects() fEMCClsEtaPhi = new TH2F("fEMCClsEtaPhi","EMCAL cluster #eta and #phi distribution;#eta;#phi",100,-0.9,0.9,200,0,6.3); fOutputList->Add(fEMCClsEtaPhi); + + fHistoNCls = new TH1F("fHistoNCls","No of EMCAL cluster in the event;N^{EMC}_{cls};counts",150,0,150); + fOutputList->Add(fHistoNCls); + + fHistoNCells = new TH1F("fHistoNCells","No of EMCAL cells in a cluster;N^{EMC}_{cells};counts",30,0,30); + fOutputList->Add(fHistoNCells); fNegTrkIDPt = new TH1F("fNegTrkIDPt", "p_{T} distribution of tracks with negative track id;p_{T} (GeV/c);counts", 500, 0.0, 50.0); fOutputList->Add(fNegTrkIDPt); @@ -263,6 +294,9 @@ void AliAnalysisTaskHFEemcQA::UserCreateOutputObjects() fEMCTPCNpts = new TH2F("fEMCTPCNpts","TPC Npoints used for dE/dx for tracks matched to EMCAL;p (GeV/c);N points",200,0,20,200,0.,200.); fOutputList->Add(fEMCTPCNpts); + + fClsEAftMatch = new TH1F("fClsEAftMatch", "EMCAL cluster energy distribution after track matching; Cluster E;counts", 500, 0.0, 50.0); + fOutputList->Add(fClsEAftMatch); fHistEop = new TH2F("fHistEop", "E/p distribution;p_{T} (GeV/c);E/p", 200,0,20,60, 0.0, 3.0); fOutputList->Add(fHistEop); @@ -372,10 +406,10 @@ void AliAnalysisTaskHFEemcQA::UserExec(Option_t *) //////////////// //Event vertex// /////////////// - Int_t ntracks; + Int_t ntracks = -999; if(!fUseTender)ntracks = fVevent->GetNumberOfTracks(); if(fUseTender) ntracks = fTracks_tender->GetEntries(); - printf("There are %d tracks in this event\n",ntracks); + if(ntracks < 1) printf("There are %d tracks in this event\n",ntracks); fNevents->Fill(0); //all events Double_t Zvertex = -100, Xvertex = -100, Yvertex = -100; @@ -407,9 +441,11 @@ void AliAnalysisTaskHFEemcQA::UserExec(Option_t *) Int_t trigger = -1; if (fAOD){ - AliAODHeader * header = dynamic_cast(fAOD->GetHeader()); + //Double_t multiplicity=fAOD->GetHeader()->GetRefMultiplicity(); + AliAODHeader *header = dynamic_cast(fAOD->GetHeader()); if(!header) AliFatal("Not a standard AOD"); - Double_t multiplicity=header->GetRefMultiplicity(); + Double_t multiplicity = header->GetRefMultiplicity(); + fTrigMulti->Fill(-0.5, multiplicity); if(evSelMask & AliVEvent::kAny) fTrigMulti->Fill(0.5, multiplicity); if(evSelMask & AliVEvent::kMB) fTrigMulti->Fill(1.5, multiplicity); @@ -444,6 +480,8 @@ void AliAnalysisTaskHFEemcQA::UserExec(Option_t *) Int_t Nclust = -999; if(!fUseTender) Nclust = fVevent->GetNumberOfCaloClusters(); if(fUseTender) Nclust = fCaloClusters_tender->GetEntries(); + fHistoNCls->Fill(Nclust); + for(Int_t icl=0; iclFill(clustE); fEMCClsEtaPhi->Fill(emceta,emcphi); + fHistoNCells->Fill(clust->GetNCells()); } } @@ -551,13 +590,18 @@ void AliAnalysisTaskHFEemcQA::UserExec(Option_t *) if(EMCalIndex < 0) continue; fHistPtMatch->Fill(track->Pt()); - AliVCluster *clustMatch = (AliVCluster*)fVevent->GetCaloCluster(EMCalIndex); + AliVCluster *clustMatch=0x0; + if(!fUseTender) clustMatch = (AliVCluster*)fVevent->GetCaloCluster(EMCalIndex); + if(fUseTender) clustMatch = dynamic_cast(fCaloClusters_tender->At(EMCalIndex)); + if(clustMatch && clustMatch->IsEMCAL()) { ///////////////////////////////////////////// //Properties of tracks matched to the EMCAL// ///////////////////////////////////////////// fEMCTrkMatch->Fill(clustMatch->GetTrackDx(),clustMatch->GetTrackDz()); + if(TMath::Abs(clustMatch->GetTrackDx())>0.05 || TMath::Abs(clustMatch->GetTrackDz())>0.05) continue; + fEMCTrkPt->Fill(track->Pt()); fEMCTrketa->Fill(track->Eta()); fEMCTrkphi->Fill(track->Phi()); @@ -565,8 +609,10 @@ void AliAnalysisTaskHFEemcQA::UserExec(Option_t *) fEMCTPCnsig->Fill(track->P(),fTPCnSigma); fEMCTPCNpts->Fill(track->P(),track->GetTPCsignalN()); - //E/p distribution Double_t clustMatchE = clustMatch->E(); + fClsEAftMatch->Fill(clustMatchE); + + //EMCAL EID info Double_t eop = -1.0; Double_t m02 = -99999; if(track->P()>0)eop = clustMatchE/track->P(); @@ -592,14 +638,14 @@ void AliAnalysisTaskHFEemcQA::UserExec(Option_t *) fvalueElectron[5] = clustMatch->GetM02(); if(fFlagSparse){ - cout << "filling sparse"<Fill(fvalueElectron); } //////////////////////////////////////////////// //Track properties of EMCAL electron cadidates// /////////////////////////////////////////////// - if(fTPCnSigma > -1 && fTPCnSigma < 3 && eop>0.9 && eop<1.2 && m02 > 0.006 && m02 < 0.035){ + if(fTPCnSigma > -1 && fTPCnSigma < 3 && eop>0.9 && eop<1.2 && m02 > 0.006 && m02 < 0.35){ fEleCanTPCNpts->Fill(track->Pt(),track->GetTPCsignalN()); fEleCanTPCNCls->Fill(track->Pt(),track->GetTPCNcls()); diff --git a/PWGHF/hfe/AliAnalysisTaskHFEemcQA.h b/PWGHF/hfe/AliAnalysisTaskHFEemcQA.h index 3593accdc19..daadb863abb 100644 --- a/PWGHF/hfe/AliAnalysisTaskHFEemcQA.h +++ b/PWGHF/hfe/AliAnalysisTaskHFEemcQA.h @@ -58,7 +58,9 @@ class AliAnalysisTaskHFEemcQA : public AliAnalysisTaskSE { TH1F *fVtxY;//!Vertex y TH2F *fTrigMulti;//!trigger multiplicity TH1F *fHistClustE;//!cluster energy - TH2F *fEMCClsEtaPhi;//! EMC cluster eta and phi + TH2F *fEMCClsEtaPhi;//! EMC cluster eta and phi + TH1F *fHistoNCls;//! No of clusters per event + TH1F *fHistoNCells;//! No of cells per cluster TH1F *fNegTrkIDPt;//!neg track ID TH1F *fTrkPt;//!track pt TH1F *fTrketa;//!track eta @@ -74,6 +76,7 @@ class AliAnalysisTaskHFEemcQA : public AliAnalysisTaskSE { TH2F *fEMCdEdx;//!EMC trk dedx TH2F *fEMCTPCnsig;//! EMC trk nsig TH2F *fEMCTPCNpts;//!EMC Npoints used for dedx + TH1F *fClsEAftMatch;//!EMC Cluster energy after track matching TH2F *fHistdEdxEop;//!E/p vs dedx TH2F *fHistNsigEop;//!E/p vs dedx TH2F *fHistEop;//!pt vs E/p -- 2.39.3