X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGGA%2FCaloTrackCorrelations%2FAliAnaCalorimeterQA.cxx;h=76dac4a5ad210b5eac206c24bd595516ef49f2df;hb=b4204b737701df10f6eb64d96b32aa7df3ad75e8;hp=72da46d8558a54dcbc0ca607faa7aa6cd71c0edd;hpb=a87e069da00c6927d76b84ec618427e075adbd5e;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGGA/CaloTrackCorrelations/AliAnaCalorimeterQA.cxx b/PWGGA/CaloTrackCorrelations/AliAnaCalorimeterQA.cxx index 72da46d8558..76dac4a5ad2 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaCalorimeterQA.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaCalorimeterQA.cxx @@ -22,16 +22,10 @@ // --- ROOT system --- -//#include "Riostream.h" -#include "TObjArray.h" -#include "TParticle.h" -#include "TDatabasePDG.h" -#include "TCanvas.h" -#include "TPad.h" -#include "TROOT.h" -#include "TH3F.h" -#include "TH2F.h" -#include "TLegend.h" +#include +#include +#include +#include #include //---- AliRoot system ---- @@ -40,14 +34,12 @@ #include "AliStack.h" #include "AliVCaloCells.h" #include "AliFiducialCut.h" -#include "AliAODTrack.h" #include "AliVCluster.h" +#include "AliVTrack.h" #include "AliVEvent.h" #include "AliVEventHandler.h" -#include "AliAnalysisManager.h" #include "AliAODMCParticle.h" #include "AliMCAnalysisUtils.h" -#include "AliExternalTrackParam.h" // --- Detectors --- #include "AliPHOSGeoUtils.h" @@ -57,14 +49,16 @@ ClassImp(AliAnaCalorimeterQA) //________________________________________ AliAnaCalorimeterQA::AliAnaCalorimeterQA() : -AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""), +AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""), //Switches +fFillAllCellTimeHisto(kTRUE), fFillAllPosHisto(kFALSE), fFillAllPosHisto2(kTRUE), fFillAllTH12(kFALSE), fFillAllTH3(kTRUE), fFillAllTMHisto(kTRUE), fFillAllPi0Histo(kTRUE), fCorrelate(kTRUE), fStudyBadClusters(kFALSE), -fStudyClustersAsymmetry(kFALSE), fStudyWeight(kFALSE), +fStudyClustersAsymmetry(kFALSE), fStudyExotic(kFALSE), +fStudyWeight(kFALSE), //Parameters and cuts fNModules(12), fNRCU(2), @@ -72,6 +66,10 @@ fNMaxCols(48), fNMaxRows(24), fTimeCutMin(-10000), fTimeCutMax(10000), fEMCALCellAmpMin(0), fPHOSCellAmpMin(0), +// Exotic +fExoNECrossCuts(0), fExoECrossCuts(), +fExoNDTimeCuts(0), fExoDTimeCuts(), + //Histograms fhE(0), fhPt(0), fhPhi(0), fhEta(0), fhEtaPhiE(0), @@ -129,7 +127,10 @@ fhCaloV0MCorrNClusters(0), fhCaloV0MCorrEClusters(0), fhCaloV0MCorrNCells(0), fhCaloV0MCorrECells(0), fhCaloTrackMCorrNClusters(0), fhCaloTrackMCorrEClusters(0), fhCaloTrackMCorrNCells(0), fhCaloTrackMCorrECells(0), - +fhCaloCenNClusters(0), fhCaloCenEClusters(0), +fhCaloCenNCells(0), fhCaloCenECells(0), +fhCaloEvPNClusters(0), fhCaloEvPEClusters(0), +fhCaloEvPNCells(0), fhCaloEvPECells(0), //Super-Module dependent histgrams fhEMod(0), fhAmpMod(0), fhTimeMod(0), fhNClustersMod(0), fhNCellsMod(0), @@ -142,6 +143,8 @@ fhTimeAmpPerRCU(0), fhIMMod(0), fhECellClusterRatio(0), fhECellClusterLogRatio(0), fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0), +fhExoL0ECross(0), fhExoL1ECross(0), + // MC and reco fhRecoMCE(), fhRecoMCPhi(), fhRecoMCEta(), fhRecoMCDeltaE(), fhRecoMCRatioE(), @@ -154,12 +157,16 @@ fhGenMCAccE(), fhGenMCAccEtaPhi(), //matched MC fhEMVxyz(0), fhEMR(0), fhHaVxyz(0), fhHaR(0), -fh1pOverE(0), fh2dR(0), +fh1EOverP(0), fh2dR(0), fh2EledEdx(0), fh2MatchdEdx(0), -fhMCEle1pOverE(0), fhMCEle1dR(0), fhMCEle2MatchdEdx(0), -fhMCChHad1pOverE(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0), -fhMCNeutral1pOverE(0), fhMCNeutral1dR(0), fhMCNeutral2MatchdEdx(0), fh1pOverER02(0), -fhMCEle1pOverER02(0), fhMCChHad1pOverER02(0), fhMCNeutral1pOverER02(0) +fhMCEle1EOverP(0), fhMCEle1dR(0), fhMCEle2MatchdEdx(0), +fhMCChHad1EOverP(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0), +fhMCNeutral1EOverP(0), fhMCNeutral1dR(0), fhMCNeutral2MatchdEdx(0), fh1EOverPR02(0), +fhMCEle1EOverPR02(0), fhMCChHad1EOverPR02(0), fhMCNeutral1EOverPR02(0), +fh1EleEOverP(0), fhMCEle1EleEOverP(0), +fhMCChHad1EleEOverP(0), fhMCNeutral1EleEOverP(0), +fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0), +fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0) { //Default Ctor @@ -184,6 +191,22 @@ fhMCEle1pOverER02(0), fhMCChHad1pOverER02(0), f fhDeltaIAMC[0] = 0 ; fhDeltaIAMC[1] = 0; fhDeltaIAMC[2] = 0 ; fhDeltaIAMC[3] = 0; + // Exotic + for (Int_t ie = 0; ie < 10 ; ie++) + { + fhExoDTime[ie] = 0; + for (Int_t idt = 0; idt < 5 ; idt++) + { + fhExoNCell [ie][idt] = 0; + fhExoL0 [ie][idt] = 0; + fhExoL1 [ie][idt] = 0; + fhExoECross [ie][idt] = 0; + fhExoTime [ie][idt] = 0; + fhExoL0NCell [ie][idt] = 0; + fhExoL1NCell [ie][idt] = 0; + } + } + // MC for(Int_t i = 0; i < 6; i++){ @@ -202,11 +225,10 @@ fhMCEle1pOverER02(0), fhMCChHad1pOverER02(0), f InitParameters(); } -//____________________________________________________________________________________________________________________________ +//______________________________________________________________________________________________________________________ void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells, - const Int_t absIdMax, const Double_t maxCellFraction, const Float_t eCrossFrac, - const Double_t tmax, Double_t timeAverages[2] - ) + Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac, + Double_t tmax, Double_t timeAverages[2] ) { //Bad cluster histograms @@ -240,7 +262,7 @@ void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArra } // loop // Max cell compared to other cells in cluster - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) + if(fFillAllCellTimeHisto) { fhBadClusterMaxCellDiffAverageTime ->Fill(clus->E(),tmax-timeAverages[0]); fhBadClusterMaxCellDiffWeightedTime ->Fill(clus->E(),tmax-timeAverages[1]); @@ -256,7 +278,7 @@ void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArra fhBadClusterMaxCellCloseCellRatio->Fill(clus->E(),frac); fhBadClusterMaxCellCloseCellDiff ->Fill(clus->E(),cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId)); - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) + if(fFillAllCellTimeHisto) { Double_t time = cells->GetCellTime(absId); GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber()); @@ -264,7 +286,7 @@ void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArra Float_t diff = (tmax-time*1e9); fhBadCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff); - } // ESD + } }// Not max }//loop @@ -280,7 +302,7 @@ void AliAnaCalorimeterQA::CalculateAverageTime(AliVCluster *clus, // First recalculate energy in case non linearity was applied Float_t energy = 0; Float_t ampMax = 0, amp = 0; - Int_t absIdMax =-1; +// Int_t absIdMax =-1; for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) { Int_t id = clus->GetCellsAbsId()[ipos]; @@ -294,7 +316,7 @@ void AliAnaCalorimeterQA::CalculateAverageTime(AliVCluster *clus, if(amp> ampMax) { ampMax = amp; - absIdMax = id; +// absIdMax = id; } } // energy loop @@ -365,8 +387,8 @@ void AliAnaCalorimeterQA::CellHistograms(AliVCaloCells *cells) if(GetDebug() > 2) printf("\t module %d, column %d, row %d \n", nModule,icol,irow); - if(nModule < fNModules) { - + if(nModule < fNModules) + { //Check if the cell is a bad channel if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn()){ if(fCalorimeter=="EMCAL") @@ -392,14 +414,12 @@ void AliAnaCalorimeterQA::CellHistograms(AliVCaloCells *cells) //Transform time to ns time *= 1.0e9; - // Remove noisy channels, only possible in ESDs - if(GetReader()->GetDataType() == AliCaloTrackReader::kESD) + if(time < fTimeCutMin || time > fTimeCutMax) { - if(time < fTimeCutMin || time > fTimeCutMax){ - if(GetDebug() > 0 )printf("AliAnaCalorimeterQA - Remove cell with Time %f\n",time); + if(GetDebug() > 0 ) + printf("AliAnaCalorimeterQA - Remove cell with Time %f\n",time); continue; - } - } + } // Remove exotic cells, defined only for EMCAL if(fCalorimeter=="EMCAL" && @@ -416,7 +436,7 @@ void AliAnaCalorimeterQA::CellHistograms(AliVCaloCells *cells) //E cross for exotic cells if(amp > 0.01) fhCellECross->Fill(amp,1-GetECross(id,cells)/amp); - + nCellsInModule[nModule]++ ; Int_t icols = icol; @@ -438,7 +458,7 @@ void AliAnaCalorimeterQA::CellHistograms(AliVCaloCells *cells) fhGridCells ->Fill(icols,irows); fhGridCellsE->Fill(icols,irows,amp); - if(GetReader()->GetDataType() == AliCaloTrackReader::kESD) + if(fFillAllCellTimeHisto) { //printf("%s: time %g\n",fCalorimeter.Data(), time); @@ -584,8 +604,8 @@ void AliAnaCalorimeterQA::CellInClusterPositionHistograms(AliVCluster* clus) } //___________________________________________________________________________________________ -void AliAnaCalorimeterQA::ClusterAsymmetryHistograms(AliVCluster* clus, const Int_t absIdMax, - const Bool_t goodCluster) +void AliAnaCalorimeterQA::ClusterAsymmetryHistograms(AliVCluster* clus, Int_t absIdMax, + Bool_t goodCluster) { // Study the shape of the cluster in cell units terms @@ -647,7 +667,7 @@ void AliAnaCalorimeterQA::ClusterAsymmetryHistograms(AliVCluster* clus, const In Int_t nLabel = clus->GetNLabels(); Int_t* labels = clus->GetLabels(); if(IsDataMC()){ - Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader(),0); + Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader()); if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta) && @@ -679,10 +699,10 @@ void AliAnaCalorimeterQA::ClusterAsymmetryHistograms(AliVCluster* clus, const In } } -//_________________________________________________________________________________________________________________________ -void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus,const TObjArray *caloClusters, AliVCaloCells * cells, - const Int_t absIdMax, const Double_t maxCellFraction, const Float_t eCrossFrac, - const Double_t tmax, Double_t timeAverages[2]) +//__________________________________________________________________________________________________________________ +void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells, + Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac, + Double_t tmax, Double_t timeAverages[2]) { //Fill CaloCluster related histograms @@ -719,7 +739,7 @@ void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus,const TObjArray *c // check time of cells respect to max energy cell - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) + if(fFillAllCellTimeHisto) { fhClusterMaxCellDiffAverageTime ->Fill(clus->E(),tmax-timeAverages[0]); fhClusterMaxCellDiffWeightedTime ->Fill(clus->E(),tmax-timeAverages[1]); @@ -734,7 +754,7 @@ void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus,const TObjArray *c fhClusterMaxCellCloseCellRatio->Fill(clus->E(),frac); fhClusterMaxCellCloseCellDiff ->Fill(clus->E(),cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId)); - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) + if(fFillAllCellTimeHisto) { Double_t time = cells->GetCellTime(absId); GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber()); @@ -844,7 +864,8 @@ void AliAnaCalorimeterQA::ClusterLoopHistograms(const TObjArray *caloClusters, //Cut on time of clusters Double_t tof = clus->GetTOF()*1.e9; - if(tof < fTimeCutMin || tof > fTimeCutMax){ + if(tof < fTimeCutMin || tof > fTimeCutMax) + { if(GetDebug() > 0 )printf("AliAnaCalorimeterQA - Remove cluster with TOF %f\n",tof); continue; } @@ -891,9 +912,11 @@ void AliAnaCalorimeterQA::ClusterLoopHistograms(const TObjArray *caloClusters, Float_t ampMax = cells->GetCellAmplitude(absIdMax); GetCaloUtils()->RecalibrateCellAmplitude(ampMax,fCalorimeter, absIdMax); + if(fStudyExotic) ExoticHistograms(absIdMax, ampMax, clus, cells); + //Check bad clusters if requested and rejection was not on Bool_t goodCluster = IsGoodCluster(absIdMax, cells); - + Float_t eCrossFrac = 0; if(ampMax > 0.01) eCrossFrac = 1-GetECross(absIdMax,cells)/ampMax; @@ -956,9 +979,9 @@ void AliAnaCalorimeterQA::ClusterLoopHistograms(const TObjArray *caloClusters, } -//______________________________________________________________________________________________________ -Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const Bool_t matched, - const Int_t * labels, const Int_t nLabels, Int_t & pdg ) +//__________________________________________________________________________________________ +Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(TLorentzVector mom, Bool_t matched, + const Int_t * labels, Int_t nLabels, Int_t & pdg ) { //Fill histograms only possible when simulation @@ -993,11 +1016,12 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const Int_t pdg0 =-1;Int_t status = -1; Int_t iMother = -1; Int_t iParent = -1; Float_t vxMC= 0; Float_t vyMC = 0; - Float_t eMC = 0; Float_t ptMC= 0; Float_t phiMC =0; Float_t etaMC = 0; + Float_t eMC = 0; //Float_t ptMC= 0; + Float_t phiMC =0; Float_t etaMC = 0; Int_t charge = 0; //Check the origin. - Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader(),0); + Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader()); if ( GetReader()->ReadStack() && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)) @@ -1053,7 +1077,6 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const if( iParent < 0 ) { iParent = iMother; - printf("break\n"); break; } @@ -1099,7 +1122,7 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const } eMC = primary->Energy(); - ptMC = primary->Pt(); + //ptMC = primary->Pt(); phiMC = primary->Phi(); etaMC = primary->Eta(); pdg = TMath::Abs(primary->GetPdgCode()); @@ -1110,10 +1133,10 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)) {//it MC AOD and known tag //Get the list of MC particles - if(!GetReader()->GetAODMCParticles(0)) + if(!GetReader()->GetAODMCParticles()) AliFatal("MCParticles not available!"); - aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles(0))->At(label); + aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles())->At(label); iMother = label; pdg0 = TMath::Abs(aodprimary->GetPdgCode()); pdg = pdg0; @@ -1135,13 +1158,13 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted cluster!. Find before conversion: \n"); //Get the parent - aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iParent); + aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iParent); pdg = TMath::Abs(aodprimary->GetPdgCode()); while ((pdg == 22 || pdg == 11) && !aodprimary->IsPhysicalPrimary()) { Int_t iMotherOrg = iMother; iMother = iParent; - aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iMother); + aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMother); status = aodprimary->IsPrimary(); iParent = aodprimary->GetMother(); pdg = TMath::Abs(aodprimary->GetPdgCode()); @@ -1150,7 +1173,7 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const // there are other possible decays, ignore them for the moment if(pdg==111 || pdg==221) { - aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iMotherOrg); + aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMotherOrg); break; } @@ -1182,7 +1205,7 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const while(pdg != 111 && pdg != 221) { iMother = iParent; - aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iMother); + aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMother); status = aodprimary->IsPrimary(); iParent = aodprimary->GetMother(); pdg = TMath::Abs(aodprimary->GetPdgCode()); @@ -1204,7 +1227,7 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const status = aodprimary->IsPrimary(); eMC = aodprimary->E(); - ptMC = aodprimary->Pt(); + //ptMC = aodprimary->Pt(); phiMC = aodprimary->Phi(); etaMC = aodprimary->Eta(); pdg = TMath::Abs(aodprimary->GetPdgCode()); @@ -1302,7 +1325,7 @@ Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const //________________________________________________________________________________________________ void AliAnaCalorimeterQA::ClusterMatchedWithTrackHistograms(AliVCluster *clus, TLorentzVector mom, - const Bool_t okPrimary, const Int_t pdg) + Bool_t okPrimary, Int_t pdg) { //Histograms for clusters matched with tracks @@ -1331,16 +1354,36 @@ void AliAnaCalorimeterQA::ClusterMatchedWithTrackHistograms(AliVCluster *clus, T Double_t dedx = track->GetTPCsignal(); Int_t nITS = track->GetNcls(0); Int_t nTPC = track->GetNcls(1); + Bool_t positive = kFALSE; + if(track) positive = (track->Charge()>0); // Residuals Float_t deta = clus->GetTrackDz(); Float_t dphi = clus->GetTrackDx(); Double_t dR = TMath::Sqrt(dphi*dphi + deta*deta); - Double_t eOverP = e/tmom; + if(TMath::Abs(dphi) < 999) + { + fhTrackMatchedDEta->Fill(e,deta); + fhTrackMatchedDPhi->Fill(e,dphi); + if(e > 0.5) fhTrackMatchedDEtaDPhi->Fill(deta,dphi); + + if(track && positive) + { + + fhTrackMatchedDEtaPos->Fill(e,deta); + fhTrackMatchedDPhiPos->Fill(e,dphi); + if(e > 0.5) fhTrackMatchedDEtaDPhiPos->Fill(deta,dphi); + } + } - fh1pOverE->Fill(tpt, eOverP); - if(dR < 0.02) fh1pOverER02->Fill(tpt,eOverP); + Double_t eOverP = e/tmom; + fh1EOverP->Fill(tpt, eOverP); + if(dR < 0.02) + { + fh1EOverPR02->Fill(tpt,eOverP); + if(dedx > 60 && dedx < 100) fh1EleEOverP->Fill(tpt,eOverP); + } fh2dR->Fill(e,dR); fh2MatchdEdx->Fill(tmom,dedx); @@ -1351,24 +1394,36 @@ void AliAnaCalorimeterQA::ClusterMatchedWithTrackHistograms(AliVCluster *clus, T if(TMath::Abs(pdg) == 11) { - fhMCEle1pOverE->Fill(tpt,eOverP); + fhMCEle1EOverP->Fill(tpt,eOverP); fhMCEle1dR->Fill(dR); fhMCEle2MatchdEdx->Fill(tmom,dedx); - if(dR < 0.02) fhMCEle1pOverER02->Fill(tpt,eOverP); + if(dR < 0.02) + { + fhMCEle1EOverPR02->Fill(tpt,eOverP); + if(dedx > 60 && dedx < 100) fhMCEle1EleEOverP->Fill(tpt,eOverP); + } } else if(charge!=0) { - fhMCChHad1pOverE->Fill(tpt,eOverP); + fhMCChHad1EOverP->Fill(tpt,eOverP); fhMCChHad1dR->Fill(dR); fhMCChHad2MatchdEdx->Fill(tmom,dedx); - if(dR < 0.02) fhMCChHad1pOverER02->Fill(tpt,eOverP); + if(dR < 0.02) + { + fhMCChHad1EOverPR02->Fill(tpt,eOverP); + if(dedx > 60 && dedx < 100) fhMCChHad1EleEOverP->Fill(tpt,eOverP); + } } else if(charge == 0) { - fhMCNeutral1pOverE->Fill(tpt,eOverP); + fhMCNeutral1EOverP->Fill(tpt,eOverP); fhMCNeutral1dR->Fill(dR); fhMCNeutral2MatchdEdx->Fill(tmom,dedx); - if(dR < 0.02) fhMCNeutral1pOverER02->Fill(tpt,eOverP); + if(dR < 0.02) + { + fhMCNeutral1EOverPR02->Fill(tpt,eOverP); + if(dedx > 60 && dedx < 100) fhMCNeutral1EleEOverP->Fill(tpt,eOverP); + } } }//DataMC @@ -1392,6 +1447,9 @@ void AliAnaCalorimeterQA::Correlate() Int_t nclEMCAL = caloClustersEMCAL->GetEntriesFast(); Int_t nclPHOS = caloClustersPHOS ->GetEntriesFast(); + Float_t cen = GetEventCentrality(); + Float_t ep = GetEventPlaneAngle(); + Float_t sumClusterEnergyEMCAL = 0; Float_t sumClusterEnergyPHOS = 0; Int_t iclus = 0; @@ -1400,7 +1458,6 @@ void AliAnaCalorimeterQA::Correlate() for(iclus = 0 ; iclus < caloClustersPHOS->GetEntriesFast(); iclus++) sumClusterEnergyPHOS += ((AliVCluster*)caloClustersPHOS->At(iclus))->E(); - //Cells AliVCaloCells * cellsEMCAL = GetEMCALCells(); @@ -1427,7 +1484,8 @@ void AliAnaCalorimeterQA::Correlate() Int_t v0S = GetV0Signal(0)+GetV0Signal(1); Int_t v0M = GetV0Multiplicity(0)+GetV0Multiplicity(1); Int_t trM = GetTrackMultiplicity(); - if(fCalorimeter=="PHOS"){ + if(fCalorimeter=="PHOS") + { fhCaloV0MCorrNClusters ->Fill(v0M,nclPHOS); fhCaloV0MCorrEClusters ->Fill(v0M,sumClusterEnergyPHOS); fhCaloV0MCorrNCells ->Fill(v0M,ncellsPHOS); @@ -1442,8 +1500,19 @@ void AliAnaCalorimeterQA::Correlate() fhCaloTrackMCorrEClusters->Fill(trM,sumClusterEnergyPHOS); fhCaloTrackMCorrNCells ->Fill(trM,ncellsPHOS); fhCaloTrackMCorrECells ->Fill(trM,sumCellEnergyPHOS); + + fhCaloCenNClusters ->Fill(cen,nclPHOS); + fhCaloCenEClusters ->Fill(cen,sumClusterEnergyPHOS); + fhCaloCenNCells ->Fill(cen,ncellsPHOS); + fhCaloCenECells ->Fill(cen,sumCellEnergyPHOS); + + fhCaloEvPNClusters ->Fill(ep ,nclPHOS); + fhCaloEvPEClusters ->Fill(ep ,sumClusterEnergyPHOS); + fhCaloEvPNCells ->Fill(ep ,ncellsPHOS); + fhCaloEvPECells ->Fill(ep ,sumCellEnergyPHOS); } - else{ + else + { fhCaloV0MCorrNClusters ->Fill(v0M,nclEMCAL); fhCaloV0MCorrEClusters ->Fill(v0M,sumClusterEnergyEMCAL); fhCaloV0MCorrNCells ->Fill(v0M,ncellsEMCAL); @@ -1458,6 +1527,16 @@ void AliAnaCalorimeterQA::Correlate() fhCaloTrackMCorrEClusters->Fill(trM,sumClusterEnergyEMCAL); fhCaloTrackMCorrNCells ->Fill(trM,ncellsEMCAL); fhCaloTrackMCorrECells ->Fill(trM,sumCellEnergyEMCAL); + + fhCaloCenNClusters ->Fill(cen,nclEMCAL); + fhCaloCenEClusters ->Fill(cen,sumClusterEnergyEMCAL); + fhCaloCenNCells ->Fill(cen,ncellsEMCAL); + fhCaloCenECells ->Fill(cen,sumCellEnergyEMCAL); + + fhCaloEvPNClusters ->Fill(ep ,nclEMCAL); + fhCaloEvPEClusters ->Fill(ep ,sumClusterEnergyEMCAL); + fhCaloEvPNCells ->Fill(ep ,ncellsEMCAL); + fhCaloEvPECells ->Fill(ep ,sumCellEnergyEMCAL); } if(GetDebug() > 0 ) @@ -1468,6 +1547,7 @@ void AliAnaCalorimeterQA::Correlate() printf("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n", ncellsPHOS,nclPHOS,sumCellEnergyPHOS,sumClusterEnergyPHOS); printf("\t V0 : Signal %d, Multiplicity %d, Track Multiplicity %d \n", v0S,v0M,trM); + printf("\t centrality : %f, Event plane angle %f \n", cen,ep); } } @@ -1497,6 +1577,74 @@ TObjString * AliAnaCalorimeterQA::GetAnalysisCuts() return new TObjString(parList) ; } +//_________________________________________________________________________________ +void AliAnaCalorimeterQA::ExoticHistograms(Int_t absIdMax, Float_t ampMax, + AliVCluster *clus, AliVCaloCells* cells) +{ + // Calculate weights + + if(ampMax < 0.01) + { + printf("AliAnaCalorimeterQA::ExoticHistograms()- Low amplitude energy %f\n",ampMax); + return; + } + + Float_t l0 = clus->GetM02(); + Float_t l1 = clus->GetM20(); + Float_t en = clus->E(); + Int_t nc = clus->GetNCells(); + Double_t tmax = clus->GetTOF()*1.e9; // recalibrated elsewhere + + Float_t eCrossFrac = 1-GetECross(absIdMax,cells, 10000000)/ampMax; + + if(en > 5) + { + fhExoL0ECross->Fill(eCrossFrac,l0); + fhExoL1ECross->Fill(eCrossFrac,l1); + } + + for(Int_t ie = 0; ie < fExoNECrossCuts; ie++) + { + for(Int_t idt = 0; idt < fExoNDTimeCuts; idt++) + { + eCrossFrac = 1-GetECross(absIdMax,cells, fExoDTimeCuts[idt])/ampMax; + + if(eCrossFrac > fExoECrossCuts[ie]) + { + //Exotic + fhExoL0 [ie][idt]->Fill(en,l0 ); + fhExoL1 [ie][idt]->Fill(en,l1 ); + fhExoTime [ie][idt]->Fill(en,tmax); + + if(en > 5) + { + fhExoL0NCell[ie][idt]->Fill(nc,l0); + fhExoL1NCell[ie][idt]->Fill(nc,l1); + } + + // Diff time, do for one cut in e cross + if(ie == 0) + { + for (Int_t icell = 0; icell < clus->GetNCells(); icell++) + { + Int_t absId = clus->GetCellsAbsId()[icell]; + Double_t time = cells->GetCellTime(absId); + GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber()); + + Float_t diff = (tmax-time)*1e9; + fhExoDTime[idt]->Fill(en, diff); + } + } + } + else + { + fhExoECross[ie][idt]->Fill(en,eCrossFrac); + fhExoNCell [ie][idt]->Fill(en,nc); + } + } // D time cut loop + } // e cross cut loop +} + //____________________________________________________ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() { @@ -1506,6 +1654,10 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() TList * outputContainer = new TList() ; outputContainer->SetName("QAHistos") ; + // Init the number of modules, set in the class AliCalorimeterUtils + fNModules = GetCaloUtils()->GetNumberOfSuperModulesUsed(); + if(fCalorimeter=="PHOS" && fNModules > 4) fNModules = 4; + //Histograms Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin(); Int_t nfineptbins = GetHistogramRanges()->GetHistoFinePtBins(); Float_t ptfinemax = GetHistogramRanges()->GetHistoFinePtMax(); Float_t ptfinemin = GetHistogramRanges()->GetHistoFinePtMin(); @@ -1513,7 +1665,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin(); Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins(); Float_t massmax = GetHistogramRanges()->GetHistoMassMax(); Float_t massmin = GetHistogramRanges()->GetHistoMassMin(); Int_t nasymbins = GetHistogramRanges()->GetHistoAsymmetryBins(); Float_t asymmax = GetHistogramRanges()->GetHistoAsymmetryMax(); Float_t asymmin = GetHistogramRanges()->GetHistoAsymmetryMin(); - Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax(); Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin(); + Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); Float_t eOverPmax = GetHistogramRanges()->GetHistoPOverEMax(); Float_t eOverPmin = GetHistogramRanges()->GetHistoPOverEMin(); Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins(); Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax(); Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin(); Int_t ndRbins = GetHistogramRanges()->GetHistodRBins(); Float_t dRmax = GetHistogramRanges()->GetHistodRMax(); Float_t dRmin = GetHistogramRanges()->GetHistodRMin(); Int_t ntimebins = GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin(); @@ -1537,7 +1689,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fNMaxRows = 24; fNRCU = 2 ; //PHOS - if(fCalorimeter=="PHOS"){ + if(fCalorimeter=="PHOS") + { fNMaxCols = 56; fNMaxRows = 64; fNRCU = 4 ; @@ -1547,7 +1700,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhE->SetXTitle("E (GeV)"); outputContainer->Add(fhE); - if(fFillAllTH12){ + if(fFillAllTH12) + { fhPt = new TH1F ("hPt","p_{T} reconstructed clusters", nptbins,ptmin,ptmax); fhPt->SetXTitle("p_{T} (GeV/c)"); outputContainer->Add(fhPt); @@ -1561,7 +1715,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() outputContainer->Add(fhEta); } - if(fFillAllTH3){ + if(fFillAllTH3) + { fhEtaPhiE = new TH3F ("hEtaPhiE","#eta vs #phi vs energy, reconstructed clusters", netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax); fhEtaPhiE->SetXTitle("#eta "); @@ -1630,9 +1785,23 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhClusterMaxCellECross->SetYTitle("1- E_{cross}/E_{cell max}"); outputContainer->Add(fhClusterMaxCellECross); + fhNCellsPerClusterNoCut = new TH2F ("hNCellsPerClusterNoCut","# cells per cluster vs energy, no bad clusters cut", + nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); + fhNCellsPerClusterNoCut->SetXTitle("E (GeV)"); + fhNCellsPerClusterNoCut->SetYTitle("n cells"); + outputContainer->Add(fhNCellsPerClusterNoCut); + + fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); + fhNCellsPerCluster->SetXTitle("E (GeV)"); + fhNCellsPerCluster->SetYTitle("n cells"); + outputContainer->Add(fhNCellsPerCluster); + + fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax); + fhNClusters->SetXTitle("number of clusters"); + outputContainer->Add(fhNClusters); + if(fStudyBadClusters) { - fhBadClusterEnergy = new TH1F ("hBadClusterEnergy","Bad cluster energy", nptbins,ptmin,ptmax); fhBadClusterEnergy->SetXTitle("E_{cluster} (GeV) "); outputContainer->Add(fhBadClusterEnergy); @@ -1672,7 +1841,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhBadClusterMaxCellECross->SetYTitle("1- E_{cross}/E_{cell max}"); outputContainer->Add(fhBadClusterMaxCellECross); - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { + if(fFillAllCellTimeHisto) + { fhBadCellTimeSpreadRespectToCellMax = new TH2F ("hBadCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax); fhBadCellTimeSpreadRespectToCellMax->SetXTitle("E (GeV)"); fhBadCellTimeSpreadRespectToCellMax->SetYTitle("#Delta t_{cell max - i} (ns)"); @@ -1692,8 +1862,90 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() } + if(fStudyExotic) + { + fhExoL0ECross = new TH2F("hExoL0_ECross", + "#lambda^{2}_{0} vs 1-E_{+}/E_{max} for E > 5 GeV", + 400,0,1,ssbins,ssmin,ssmax); + fhExoL0ECross ->SetXTitle("1-E_{+}/E_{cell max}"); + fhExoL0ECross ->SetYTitle("#lambda^{2}_{0}"); + outputContainer->Add(fhExoL0ECross) ; + + fhExoL1ECross = new TH2F("hExoL1_ECross", + "#lambda^{2}_{1} vs 1-E_{+}/E_{max} for E > 5 GeV", + 400,0,1,ssbins,ssmin,ssmax); + fhExoL1ECross ->SetXTitle("1-E_{+}/E_{cell max}"); + fhExoL1ECross ->SetYTitle("#lambda^{2}_{1}"); + outputContainer->Add(fhExoL1ECross) ; + + for(Int_t ie = 0; ie SetYTitle("#Delta t (ns)"); + fhExoDTime[ie] ->SetXTitle("E (GeV)"); + outputContainer->Add(fhExoDTime[ie]) ; + + for(Int_t idt = 0; idt < fExoNDTimeCuts; idt++) + { + fhExoNCell[ie][idt] = new TH2F(Form("hExoNCell_ECross%d_DT%d",ie,idt), + Form("N cells per cluster vs E cluster, 1-E_{+}/E_{max} < %2.2f, #Delta t < %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), + nptbins,ptmin,ptmax,nceclbins,nceclmin,nceclmax); + fhExoNCell[ie][idt] ->SetYTitle("N cells"); + fhExoNCell[ie][idt] ->SetXTitle("E (GeV)"); + outputContainer->Add(fhExoNCell[ie][idt]) ; + + fhExoL0 [ie][idt] = new TH2F(Form("hExoL0_ECross%d_DT%d",ie,idt), + Form("#lambda^{2}_{0} vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), + nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); + fhExoL0 [ie][idt] ->SetYTitle("#lambda^{2}_{0}"); + fhExoL0 [ie][idt] ->SetXTitle("E (GeV)"); + outputContainer->Add(fhExoL0[ie][idt]) ; + + fhExoL1 [ie][idt] = new TH2F(Form("hExoL1_ECross%d_DT%d",ie,idt), + Form("#lambda^{2}_{1} vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), + nptbins,ptmin,ptmax,ssbins,ssmin,ssmax); + fhExoL1 [ie][idt] ->SetYTitle("#lambda^{2}_{1}"); + fhExoL1 [ie][idt] ->SetXTitle("E (GeV)"); + outputContainer->Add(fhExoL1[ie][idt]) ; + + fhExoECross[ie][idt] = new TH2F(Form("hExoECross_ECross%d_DT%d",ie,idt), + Form("E cross for cells vs E cell, 1-E_{+}/E_{max} < %2.2f, #Delta t < %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), + nptbins,ptmin,ptmax,400,0,1); + fhExoECross[ie][idt] ->SetYTitle("1-E_{+}/E_{cell max}"); + fhExoECross[ie][idt] ->SetXTitle("E_{cell} (GeV)"); + outputContainer->Add(fhExoECross[ie][idt]) ; + + fhExoTime [ie][idt] = new TH2F(Form("hExoTime_ECross%d_DT%d",ie,idt), + Form("Time of cluster (max cell) vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), + nptbins,ptmin,ptmax,ntimebins,timemin,timemax); + fhExoTime [ie][idt] ->SetYTitle("time_{max} (ns)"); + fhExoTime [ie][idt] ->SetXTitle("E (GeV)"); + outputContainer->Add(fhExoTime[ie][idt]) ; + + fhExoL0NCell[ie][idt] = new TH2F(Form("hExoL0_NCell%d_DT%d",ie,idt), + Form("#lambda^{2}_{0} vs N cells per clusters for E > 5 GeV, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), + nptbins,ptmin,ptmax,ntimebins,timemin,timemax); + fhExoL0NCell[ie][idt] ->SetYTitle("N cells"); + fhExoL0NCell[ie][idt] ->SetXTitle("#lambda^{2}_{0}"); + outputContainer->Add(fhExoL0NCell[ie][idt]) ; + + fhExoL1NCell[ie][idt] = new TH2F(Form("hExoL1_NCell%d_DT%d",ie,idt), + Form("#lambda^{2}_{1} vs N cells per clusters for E > 5 GeV, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]), + nptbins,ptmin,ptmax,ntimebins,timemin,timemax); + fhExoL1NCell[ie][idt] ->SetYTitle("N cells"); + fhExoL1NCell[ie][idt] ->SetXTitle("#lambda^{2}_{1}"); + outputContainer->Add(fhExoL1NCell[ie][idt]) ; + + } + } + } + // Cluster size in terms of cells - if(fStudyClustersAsymmetry){ + if(fStudyClustersAsymmetry) + { fhDeltaIEtaDeltaIPhiE0[0] = new TH2F ("hDeltaIEtaDeltaIPhiE0"," Cluster size in columns vs rows for E < 2 GeV, n cells > 3", 50,0,50,50,0,50); fhDeltaIEtaDeltaIPhiE0[0]->SetXTitle("#Delta Column"); @@ -1790,6 +2042,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() outputContainer->Add(fhDeltaIAMC[iPart]); } } + if(fStudyBadClusters) { fhBadClusterDeltaIEtaDeltaIPhiE0 = new TH2F ("hBadClusterDeltaIEtaDeltaIPhiE0"," Cluster size in columns vs rows for E < 2 GeV, n cells > 3", @@ -1818,8 +2071,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() } } - if(fStudyWeight){ - + if(fStudyWeight) + { fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy", nptbins,ptmin,ptmax, 100,0,1.); fhECellClusterRatio->SetXTitle("E_{cluster} (GeV) "); @@ -1875,15 +2128,59 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() // outputContainer->Add(fhLambda1ForW0MC[iw][imc]); } } - - } - + } } //Track Matching - if(fFillAllTMHisto){ - if(fFillAllTH12){ - fhECharged = new TH1F ("hECharged","E reconstructed clusters, matched with track", nptbins,ptmin,ptmax); + if(fFillAllTMHisto) + { + Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins(); + Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax(); + Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin(); + Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins(); + Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax(); + Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin(); + + fhTrackMatchedDEta = new TH2F("hTrackMatchedDEta","d#eta of cluster-track vs cluster energy", + nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); + fhTrackMatchedDEta->SetYTitle("d#eta"); + fhTrackMatchedDEta->SetXTitle("E_{cluster} (GeV)"); + + fhTrackMatchedDPhi = new TH2F("hTrackMatchedDPhi","d#phi of cluster-track vs cluster energy", + nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); + fhTrackMatchedDPhi->SetYTitle("d#phi (rad)"); + fhTrackMatchedDPhi->SetXTitle("E_{cluster} (GeV)"); + + fhTrackMatchedDEtaDPhi = new TH2F("hTrackMatchedDEtaDPhi","d#eta vs d#phi of cluster-track vs cluster energy", + nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); + fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)"); + fhTrackMatchedDEtaDPhi->SetXTitle("d#eta"); + + fhTrackMatchedDEtaPos = new TH2F("hTrackMatchedDEtaPos","d#eta of cluster-track vs cluster energy", + nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax); + fhTrackMatchedDEtaPos->SetYTitle("d#eta"); + fhTrackMatchedDEtaPos->SetXTitle("E_{cluster} (GeV)"); + + fhTrackMatchedDPhiPos = new TH2F("hTrackMatchedDPhiPos","d#phi of cluster-track vs cluster energy", + nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax); + fhTrackMatchedDPhiPos->SetYTitle("d#phi (rad)"); + fhTrackMatchedDPhiPos->SetXTitle("E_{cluster} (GeV)"); + + fhTrackMatchedDEtaDPhiPos = new TH2F("hTrackMatchedDEtaDPhiPos","d#eta vs d#phi of cluster-track vs cluster energy", + nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax); + fhTrackMatchedDEtaDPhiPos->SetYTitle("d#phi (rad)"); + fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta"); + + outputContainer->Add(fhTrackMatchedDEta) ; + outputContainer->Add(fhTrackMatchedDPhi) ; + outputContainer->Add(fhTrackMatchedDEtaDPhi) ; + outputContainer->Add(fhTrackMatchedDEtaPos) ; + outputContainer->Add(fhTrackMatchedDPhiPos) ; + outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ; + + if(fFillAllTH12) + { + fhECharged = new TH1F ("hECharged","E reconstructed clusters, matched with track", nptbins,ptmin,ptmax); fhECharged->SetXTitle("E (GeV)"); outputContainer->Add(fhECharged); @@ -1908,10 +2205,10 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() outputContainer->Add(fhEtaPhiECharged); } - fh1pOverE = new TH2F("h1pOverE","TRACK matches E/p",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fh1pOverE->SetYTitle("E/p"); - fh1pOverE->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fh1pOverE); + fh1EOverP = new TH2F("h1EOverP","TRACK matches E/p",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fh1EOverP->SetYTitle("E/p"); + fh1EOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fh1EOverP); fh2dR = new TH2F("h2dR","TRACK matches dR",nptbins,ptmin,ptmax,ndRbins,dRmin,dRmax); fh2dR->SetXTitle("#Delta R (rad)"); @@ -1928,13 +2225,19 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fh2EledEdx->SetYTitle(""); outputContainer->Add(fh2EledEdx) ; - fh1pOverER02 = new TH2F("h1pOverER02","TRACK matches E/p, all",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fh1pOverER02->SetYTitle("E/p"); - fh1pOverER02->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fh1pOverER02); + fh1EOverPR02 = new TH2F("h1EOverPR02","TRACK matches E/p, all",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fh1EOverPR02->SetYTitle("E/p"); + fh1EOverPR02->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fh1EOverPR02); + + fh1EleEOverP = new TH2F("h1EleEOverP","Electron candidates E/p (60SetYTitle("E/p"); + fh1EleEOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fh1EleEOverP); } - if(fFillAllPi0Histo){ + if(fFillAllPi0Histo) + { fhIM = new TH2F ("hIM","Cluster pairs Invariant mass vs reconstructed pair energy, ncell > 1",nptbins,ptmin,ptmax,nmassbins,massmin,massmax); fhIM->SetXTitle("p_{T, cluster pairs} (GeV) "); fhIM->SetYTitle("M_{cluster pairs} (GeV/c^{2})"); @@ -1944,27 +2247,13 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhAsym->SetXTitle("p_{T, cluster pairs} (GeV) "); fhAsym->SetYTitle("Asymmetry"); outputContainer->Add(fhAsym); - } - fhNCellsPerClusterNoCut = new TH2F ("hNCellsPerClusterNoCut","# cells per cluster vs energy, no bad clusters cut", - nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); - fhNCellsPerClusterNoCut->SetXTitle("E (GeV)"); - fhNCellsPerClusterNoCut->SetYTitle("n cells"); - outputContainer->Add(fhNCellsPerClusterNoCut); - - fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); - fhNCellsPerCluster->SetXTitle("E (GeV)"); - fhNCellsPerCluster->SetYTitle("n cells"); - outputContainer->Add(fhNCellsPerCluster); - - fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax); - fhNClusters->SetXTitle("number of clusters"); - outputContainer->Add(fhNClusters); - if(fFillAllPosHisto2){ - - if(fFillAllTH3){ + if(fFillAllPosHisto2) + { + if(fFillAllTH3) + { fhXYZ = new TH3F ("hXYZ","Cluster: x vs y vs z",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax); fhXYZ->SetXTitle("x (cm)"); fhXYZ->SetYTitle("y (cm)"); @@ -2013,8 +2302,9 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhYE->SetYTitle("E (GeV)"); outputContainer->Add(fhYE); } - if(fFillAllPosHisto){ - + + if(fFillAllPosHisto) + { fhRCellE = new TH2F ("hRCellE","Cell R position vs cell energy",rbins,rmin,rmax,nptbins,ptmin,ptmax); fhRCellE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)"); fhRCellE->SetYTitle("E (GeV)"); @@ -2096,7 +2386,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() } //Calo cells - fhNCells = new TH1F ("hNCells","# cells", ncebins,ncemin,ncemax); + fhNCells = new TH1F ("hNCells","# cells", ncebins,ncemin+0.5,ncemax); fhNCells->SetXTitle("n cells"); outputContainer->Add(fhNCells); @@ -2108,9 +2398,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhAmpId->SetXTitle("Cell Energy (GeV)"); outputContainer->Add(fhAmpId); - //Cell Time histograms, time only available in ESDs - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { - + if(fFillAllCellTimeHisto) + { fhCellTimeSpreadRespectToCellMax = new TH2F ("hCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} per cluster", nptbins,ptmin,ptmax,tdbins,tdmin,tdmax); fhCellTimeSpreadRespectToCellMax->SetXTitle("E (GeV)"); fhCellTimeSpreadRespectToCellMax->SetYTitle("#Delta t_{cell max-i} (ns)"); @@ -2160,14 +2449,15 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() outputContainer->Add(fhCellECross); - if(fCorrelate){ + if(fCorrelate) + { //PHOS vs EMCAL fhCaloCorrNClusters = new TH2F ("hCaloCorrNClusters","# clusters in EMCAL vs PHOS", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax); fhCaloCorrNClusters->SetXTitle("number of clusters in EMCAL"); fhCaloCorrNClusters->SetYTitle("number of clusters in PHOS"); outputContainer->Add(fhCaloCorrNClusters); - fhCaloCorrEClusters = new TH2F ("hCaloCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins,ptmin,ptmax,nptbins,ptmin,ptmax); + fhCaloCorrEClusters = new TH2F ("hCaloCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2); fhCaloCorrEClusters->SetXTitle("#Sigma E of clusters in EMCAL (GeV)"); fhCaloCorrEClusters->SetYTitle("#Sigma E of clusters in PHOS (GeV)"); outputContainer->Add(fhCaloCorrEClusters); @@ -2177,7 +2467,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhCaloCorrNCells->SetYTitle("number of Cells in PHOS"); outputContainer->Add(fhCaloCorrNCells); - fhCaloCorrECells = new TH2F ("hCaloCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*2,nptbins*2,ptmin,ptmax*2); + fhCaloCorrECells = new TH2F ("hCaloCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4); fhCaloCorrECells->SetXTitle("#Sigma E of Cells in EMCAL (GeV)"); fhCaloCorrECells->SetYTitle("#Sigma E of Cells in PHOS (GeV)"); outputContainer->Add(fhCaloCorrECells); @@ -2188,7 +2478,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhCaloV0SCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data())); outputContainer->Add(fhCaloV0SCorrNClusters); - fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax); + fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2); fhCaloV0SCorrEClusters->SetXTitle("V0 signal"); fhCaloV0SCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data())); outputContainer->Add(fhCaloV0SCorrEClusters); @@ -2198,7 +2488,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhCaloV0SCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data())); outputContainer->Add(fhCaloV0SCorrNCells); - fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax); + fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2); fhCaloV0SCorrECells->SetXTitle("V0 signal"); fhCaloV0SCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data())); outputContainer->Add(fhCaloV0SCorrECells); @@ -2209,7 +2499,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhCaloV0MCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data())); outputContainer->Add(fhCaloV0MCorrNClusters); - fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax); + fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2); fhCaloV0MCorrEClusters->SetXTitle("V0 signal"); fhCaloV0MCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data())); outputContainer->Add(fhCaloV0MCorrEClusters); @@ -2219,7 +2509,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhCaloV0MCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data())); outputContainer->Add(fhCaloV0MCorrNCells); - fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax); + fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2); fhCaloV0MCorrECells->SetXTitle("V0 signal"); fhCaloV0MCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data())); outputContainer->Add(fhCaloV0MCorrECells); @@ -2230,7 +2520,7 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhCaloTrackMCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data())); outputContainer->Add(fhCaloTrackMCorrNClusters); - fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax); + fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2); fhCaloTrackMCorrEClusters->SetXTitle("# tracks"); fhCaloTrackMCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data())); outputContainer->Add(fhCaloTrackMCorrEClusters); @@ -2240,11 +2530,51 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhCaloTrackMCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data())); outputContainer->Add(fhCaloTrackMCorrNCells); - fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax); + fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2); fhCaloTrackMCorrECells->SetXTitle("# tracks"); fhCaloTrackMCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data())); outputContainer->Add(fhCaloTrackMCorrECells); + fhCaloCenNClusters = new TH2F ("hCaloCenNClusters","# clusters in calorimeter vs centrality",100,0,100,nclbins,nclmin,nclmax); + fhCaloCenNClusters->SetYTitle("number of clusters in calorimeter"); + fhCaloCenNClusters->SetXTitle("Centrality"); + outputContainer->Add(fhCaloCenNClusters); + + fhCaloCenEClusters = new TH2F ("hCaloCenEClusters","summed energy of clusters in calorimeter vs centrality",100,0,100,nptbins,ptmin,ptmax*2); + fhCaloCenEClusters->SetYTitle("#Sigma E of clusters in calorimeter (GeV)"); + fhCaloCenEClusters->SetXTitle("Centrality"); + outputContainer->Add(fhCaloCenEClusters); + + fhCaloCenNCells = new TH2F ("hCaloCenNCells","# Cells in calorimeter vs centrality",100,0,100,ncebins,ncemin,ncemax); + fhCaloCenNCells->SetYTitle("number of Cells in calorimeter"); + fhCaloCenNCells->SetXTitle("Centrality"); + outputContainer->Add(fhCaloCenNCells); + + fhCaloCenECells = new TH2F ("hCaloCenECells","summed energy of Cells in calorimeter vs centrality",100,0,100,nptbins*2,ptmin,ptmax*4); + fhCaloCenECells->SetYTitle("#Sigma E of Cells in calorimeter (GeV)"); + fhCaloCenECells->SetXTitle("Centrality"); + outputContainer->Add(fhCaloCenECells); + + fhCaloEvPNClusters = new TH2F ("hCaloEvPNClusters","# clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nclbins,nclmin,nclmax); + fhCaloEvPNClusters->SetYTitle("number of clusters in calorimeter"); + fhCaloEvPNClusters->SetXTitle("Event plane angle (rad)"); + outputContainer->Add(fhCaloEvPNClusters); + + fhCaloEvPEClusters = new TH2F ("hCaloEvPEClusters","summed energy of clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins,ptmin,ptmax*2); + fhCaloEvPEClusters->SetYTitle("#Sigma E of clusters in calorimeter (GeV)"); + fhCaloEvPEClusters->SetXTitle("Event plane angle (rad)"); + outputContainer->Add(fhCaloEvPEClusters); + + fhCaloEvPNCells = new TH2F ("hCaloEvPNCells","# Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),ncebins,ncemin,ncemax); + fhCaloEvPNCells->SetYTitle("number of Cells in calorimeter"); + fhCaloEvPNCells->SetXTitle("Event plane angle (rad)"); + outputContainer->Add(fhCaloEvPNCells); + + fhCaloEvPECells = new TH2F ("hCaloEvPECells","summed energy of Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins*2,ptmin,ptmax*4); + fhCaloEvPECells->SetYTitle("#Sigma E of Cells in calorimeter (GeV)"); + fhCaloEvPECells->SetXTitle("Event plane angle (rad)"); + outputContainer->Add(fhCaloEvPECells); + }//correlate calorimeters @@ -2260,30 +2590,33 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhAmpMod->SetYTitle("Module"); outputContainer->Add(fhAmpMod); - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { + if(fFillAllCellTimeHisto) + { fhTimeMod = new TH2F ("hTime_Mod","Cell time in each present Module",ntimebins,timemin,timemax,fNModules,0,fNModules); fhTimeMod->SetXTitle("t (ns)"); fhTimeMod->SetYTitle("Module"); outputContainer->Add(fhTimeMod); } - fhNClustersMod = new TH2F ("hNClusters_Mod","# clusters vs Module", nclbins,nclmin,nclmax,fNModules,0,fNModules); + fhNClustersMod = new TH2F ("hNClusters_Mod","# clusters vs Module", nclbins,nclmin+0.5,nclmax,fNModules,0,fNModules); fhNClustersMod->SetXTitle("number of clusters"); fhNClustersMod->SetYTitle("Module"); outputContainer->Add(fhNClustersMod); - fhNCellsMod = new TH2F ("hNCells_Mod","# cells vs Module", ncebins,ncemin,ncemax,fNModules,0,fNModules); + fhNCellsMod = new TH2F ("hNCells_Mod","# cells vs Module", ncebins,ncemin+0.5,ncemax,fNModules,0,fNModules); fhNCellsMod->SetXTitle("n cells"); fhNCellsMod->SetYTitle("Module"); outputContainer->Add(fhNCellsMod); Int_t colmaxs = fNMaxCols; Int_t rowmaxs = fNMaxRows; - if(fCalorimeter=="EMCAL"){ + if(fCalorimeter=="EMCAL") + { colmaxs=2*fNMaxCols; rowmaxs=Int_t(fNModules/2)*fNMaxRows; } - else{ + else + { rowmaxs=fNModules*fNMaxRows; } @@ -2299,7 +2632,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhGridCellsE->SetXTitle("column (eta direction)"); outputContainer->Add(fhGridCellsE); - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD){ + if(fFillAllCellTimeHisto) + { fhGridCellsTime = new TH2F ("hGridCellsTime","Accumulated time in grid of cells", colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5); fhGridCellsTime->SetYTitle("row (phi direction)"); @@ -2307,13 +2641,13 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() outputContainer->Add(fhGridCellsTime); } - fhNCellsPerClusterMod = new TH2F*[fNModules]; + fhNCellsPerClusterMod = new TH2F*[fNModules]; fhNCellsPerClusterModNoCut = new TH2F*[fNModules]; - fhIMMod = new TH2F*[fNModules]; - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) fhTimeAmpPerRCU = new TH2F*[fNModules*fNRCU]; + fhIMMod = new TH2F*[fNModules]; + if(fFillAllCellTimeHisto) fhTimeAmpPerRCU = new TH2F*[fNModules*fNRCU]; - for(Int_t imod = 0; imod < fNModules; imod++){ - + for(Int_t imod = 0; imod < fNModules; imod++) + { fhNCellsPerClusterMod[imod] = new TH2F (Form("hNCellsPerCluster_Mod%d",imod), Form("# cells per cluster vs cluster energy in Module %d",imod), nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax); @@ -2328,9 +2662,10 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhNCellsPerClusterModNoCut[imod]->SetYTitle("n cells"); outputContainer->Add(fhNCellsPerClusterModNoCut[imod]); - if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) { - - for(Int_t ircu = 0; ircu < fNRCU; ircu++){ + if(fFillAllCellTimeHisto) + { + for(Int_t ircu = 0; ircu < fNRCU; ircu++) + { fhTimeAmpPerRCU[imod*fNRCU+ircu] = new TH2F (Form("hTimeAmp_Mod%d_RCU%d",imod,ircu), Form("Cell Energy vs Cell Time in Module %d, RCU %d ",imod,ircu), nptbins,ptmin,ptmax,ntimebins,timemin,timemax); @@ -2341,7 +2676,8 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() } } - if(fFillAllPi0Histo){ + if(fFillAllPi0Histo) + { fhIMMod[imod] = new TH2F (Form("hIM_Mod%d",imod), Form("Cluster pairs Invariant mass vs reconstructed pair energy in Module %d, n cell > 1",imod), nptbins,ptmin,ptmax,nmassbins,massmin,massmax); @@ -2356,34 +2692,39 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() TString particleName[] = { "Photon", "Pi0", "Eta", "Electron", "NeutralHadron", "ChargedHadron" }; - if(IsDataMC()){ - for(Int_t iPart = 0; iPart < 6; iPart++){ - - for(Int_t iCh = 0; iCh < 2; iCh++){ - + if(IsDataMC()) + { + for(Int_t iPart = 0; iPart < 6; iPart++) + { + for(Int_t iCh = 0; iCh < 2; iCh++) + { fhRecoMCRatioE[iPart][iCh] = new TH2F (Form("hRecoMCRatioE_%s_Match%d",particleName[iPart].Data(),iCh), - Form("Reco/Gen E, %s, Matched %d",particleName[iPart].Data(),iCh), + Form("Reconstructed/Generated E, %s, Matched %d",particleName[iPart].Data(),iCh), nptbins, ptmin, ptmax, 200,0,2); - fhRecoMCRatioE[iPart][iCh]->SetXTitle("E_{reconstructed}/E_{generated}"); + fhRecoMCRatioE[iPart][iCh]->SetYTitle("E_{reconstructed}/E_{generated}"); + fhRecoMCRatioE[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); outputContainer->Add(fhRecoMCRatioE[iPart][iCh]); fhRecoMCDeltaE[iPart][iCh] = new TH2F (Form("hRecoMCDeltaE_%s_Match%d",particleName[iPart].Data(),iCh), - Form("MC - Reco E, %s, Matched %d",particleName[iPart].Data(),iCh), + Form("Generated - Reconstructed E, %s, Matched %d",particleName[iPart].Data(),iCh), nptbins, ptmin, ptmax, nptbins*2,-ptmax,ptmax); - fhRecoMCDeltaE[iPart][iCh]->SetXTitle("#Delta E (GeV)"); + fhRecoMCDeltaE[iPart][iCh]->SetYTitle("#Delta E (GeV)"); + fhRecoMCDeltaE[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); outputContainer->Add(fhRecoMCDeltaE[iPart][iCh]); fhRecoMCDeltaPhi[iPart][iCh] = new TH2F (Form("hRecoMCDeltaPhi_%s_Match%d",particleName[iPart].Data(),iCh), - Form("MC - Reco #phi, %s, Matched %d",particleName[iPart].Data(),iCh), + Form("Generated - Reconstructed #phi, %s, Matched %d",particleName[iPart].Data(),iCh), nptbins, ptmin, ptmax, nphibins*2,-phimax,phimax); - fhRecoMCDeltaPhi[iPart][iCh]->SetXTitle("#Delta #phi (rad)"); + fhRecoMCDeltaPhi[iPart][iCh]->SetYTitle("#Delta #phi (rad)"); + fhRecoMCDeltaPhi[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); outputContainer->Add(fhRecoMCDeltaPhi[iPart][iCh]); fhRecoMCDeltaEta[iPart][iCh] = new TH2F (Form("hRecoMCDeltaEta_%s_Match%d",particleName[iPart].Data(),iCh), - Form("MC- Reco #eta, %s, Matched %d",particleName[iPart].Data(),iCh), + Form("Generated - Reconstructed #eta, %s, Matched %d",particleName[iPart].Data(),iCh), nptbins, ptmin, ptmax,netabins*2,-etamax,etamax); - fhRecoMCDeltaEta[iPart][iCh]->SetXTitle("#Delta #eta "); + fhRecoMCDeltaEta[iPart][iCh]->SetYTitle("#Delta #eta "); + fhRecoMCDeltaEta[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)"); outputContainer->Add(fhRecoMCDeltaEta[iPart][iCh]); fhRecoMCE[iPart][iCh] = new TH2F (Form("hRecoMCE_%s_Match%d",particleName[iPart].Data(),iCh), @@ -2396,21 +2737,22 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhRecoMCPhi[iPart][iCh] = new TH2F (Form("hRecoMCPhi_%s_Match%d",particleName[iPart].Data(),iCh), Form("#phi distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh), nphibins,phimin,phimax, nphibins,phimin,phimax); - fhRecoMCPhi[iPart][iCh]->SetXTitle("#phi_{rec} (rad)"); - fhRecoMCPhi[iPart][iCh]->SetYTitle("#phi_{gen} (rad)"); + fhRecoMCPhi[iPart][iCh]->SetXTitle("#phi_{reconstructed} (rad)"); + fhRecoMCPhi[iPart][iCh]->SetYTitle("#phi_{generated} (rad)"); outputContainer->Add(fhRecoMCPhi[iPart][iCh]); fhRecoMCEta[iPart][iCh] = new TH2F (Form("hRecoMCEta_%s_Match%d",particleName[iPart].Data(),iCh), Form("#eta distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh), netabins,etamin,etamax,netabins,etamin,etamax); - fhRecoMCEta[iPart][iCh]->SetXTitle("#eta_{rec} "); - fhRecoMCEta[iPart][iCh]->SetYTitle("#eta_{gen} "); + fhRecoMCEta[iPart][iCh]->SetXTitle("#eta_{reconstructed} "); + fhRecoMCEta[iPart][iCh]->SetYTitle("#eta_{generated} "); outputContainer->Add(fhRecoMCEta[iPart][iCh]); } } //Pure MC - for(Int_t iPart = 0; iPart < 4; iPart++){ + for(Int_t iPart = 0; iPart < 4; iPart++) + { fhGenMCE[iPart] = new TH1F(Form("hGenMCE_%s",particleName[iPart].Data()) , Form("p_{T} of generated %s",particleName[iPart].Data()), nptbins,ptmin,ptmax); @@ -2469,10 +2811,10 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() //Track Matching - fhMCEle1pOverE = new TH2F("hMCEle1pOverE","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fhMCEle1pOverE->SetYTitle("E/p"); - fhMCEle1pOverE->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fhMCEle1pOverE); + fhMCEle1EOverP = new TH2F("hMCEle1EOverP","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fhMCEle1EOverP->SetYTitle("E/p"); + fhMCEle1EOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCEle1EOverP); fhMCEle1dR = new TH1F("hMCEle1dR","TRACK matches dR, MC electrons",ndRbins,dRmin,dRmax); fhMCEle1dR->SetXTitle("#Delta R (rad)"); @@ -2483,10 +2825,10 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhMCEle2MatchdEdx->SetYTitle(""); outputContainer->Add(fhMCEle2MatchdEdx); - fhMCChHad1pOverE = new TH2F("hMCChHad1pOverE","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fhMCChHad1pOverE->SetYTitle("E/p"); - fhMCChHad1pOverE->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fhMCChHad1pOverE); + fhMCChHad1EOverP = new TH2F("hMCChHad1EOverP","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fhMCChHad1EOverP->SetYTitle("E/p"); + fhMCChHad1EOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCChHad1EOverP); fhMCChHad1dR = new TH1F("hMCChHad1dR","TRACK matches dR, MC charged hadrons",ndRbins,dRmin,dRmax); fhMCChHad1dR->SetXTitle("#Delta R (rad)"); @@ -2497,10 +2839,10 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhMCChHad2MatchdEdx->SetYTitle(""); outputContainer->Add(fhMCChHad2MatchdEdx); - fhMCNeutral1pOverE = new TH2F("hMCNeutral1pOverE","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fhMCNeutral1pOverE->SetYTitle("E/p"); - fhMCNeutral1pOverE->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fhMCNeutral1pOverE); + fhMCNeutral1EOverP = new TH2F("hMCNeutral1EOverP","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fhMCNeutral1EOverP->SetYTitle("E/p"); + fhMCNeutral1EOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCNeutral1EOverP); fhMCNeutral1dR = new TH1F("hMCNeutral1dR","TRACK matches dR, MC neutrals",ndRbins,dRmin,dRmax); fhMCNeutral1dR->SetXTitle("#Delta R (rad)"); @@ -2511,20 +2853,36 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() fhMCNeutral2MatchdEdx->SetYTitle(""); outputContainer->Add(fhMCNeutral2MatchdEdx); - fhMCEle1pOverER02 = new TH2F("hMCEle1pOverER02","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fhMCEle1pOverER02->SetYTitle("E/p"); - fhMCEle1pOverER02->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fhMCEle1pOverER02); + fhMCEle1EOverPR02 = new TH2F("hMCEle1EOverPR02","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fhMCEle1EOverPR02->SetYTitle("E/p"); + fhMCEle1EOverPR02->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCEle1EOverPR02); + + fhMCChHad1EOverPR02 = new TH2F("hMCChHad1EOverPR02","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fhMCChHad1EOverPR02->SetYTitle("E/p"); + fhMCChHad1EOverPR02->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCChHad1EOverPR02); + + fhMCNeutral1EOverPR02 = new TH2F("hMCNeutral1EOverPR02","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax); + fhMCNeutral1EOverPR02->SetYTitle("E/p"); + fhMCNeutral1EOverPR02->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCNeutral1EOverPR02); - fhMCChHad1pOverER02 = new TH2F("hMCChHad1pOverER02","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fhMCChHad1pOverER02->SetYTitle("E/p"); - fhMCChHad1pOverER02->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fhMCChHad1pOverER02); + fhMCEle1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates E/p (60SetYTitle("E/p"); + fhMCEle1EleEOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCEle1EleEOverP); + + fhMCChHad1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates E/p (60SetYTitle("E/p"); + fhMCChHad1EleEOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCChHad1EleEOverP); + + fhMCNeutral1EleEOverP = new TH2F("hMCNeutral1EleEOverP","Electron candidates E/p (60SetYTitle("E/p"); + fhMCNeutral1EleEOverP->SetXTitle("p_{T} (GeV/c)"); + outputContainer->Add(fhMCNeutral1EleEOverP); - fhMCNeutral1pOverER02 = new TH2F("hMCNeutral1pOverER02","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax); - fhMCNeutral1pOverER02->SetYTitle("E/p"); - fhMCNeutral1pOverER02->SetXTitle("p_{T} (GeV/c)"); - outputContainer->Add(fhMCNeutral1pOverER02); } // for(Int_t i = 0; i < outputContainer->GetEntries() ; i++) @@ -2533,20 +2891,23 @@ TList * AliAnaCalorimeterQA::GetCreateOutputObjects() return outputContainer; } -//_____________________________________________________________________________________________ -Float_t AliAnaCalorimeterQA::GetECross(const Int_t absID, AliVCaloCells* cells) +//______________________________________________________________________________________ +Float_t AliAnaCalorimeterQA::GetECross(Int_t absID, AliVCaloCells* cells, Float_t dtcut) { // Get energy in cross axis around maximum cell, for EMCAL only Int_t icol =-1, irow=-1,iRCU = -1; Int_t imod = GetModuleNumberCellIndexes(absID, fCalorimeter, icol, irow, iRCU); - + if(fCalorimeter=="EMCAL") { //Get close cells index, energy and time, not in corners - Int_t absID1 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow+1, icol); - Int_t absID2 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow-1, icol); - + + Int_t absID1 = -1; + Int_t absID2 = -1; + + if( irow < AliEMCALGeoParams::fgkEMCALRows-1) absID1 = GetCaloUtils()->GetEMCALGeometry()->GetAbsCellIdFromCellIndexes(imod, irow+1, icol); + if( irow > 0 ) absID2 = GetCaloUtils()->GetEMCALGeometry()->GetAbsCellIdFromCellIndexes(imod, irow-1, icol); // In case of cell in eta = 0 border, depending on SM shift the cross cell index Int_t absID3 = -1; @@ -2554,18 +2915,20 @@ Float_t AliAnaCalorimeterQA::GetECross(const Int_t absID, AliVCaloCells* cells) if ( icol == AliEMCALGeoParams::fgkEMCALCols - 1 && !(imod%2) ) { - absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, 0); - absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol-1); + absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod+1, irow, 0); + absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod , irow, icol-1); } else if( icol == 0 && imod%2 ) { - absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol+1); - absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, AliEMCALGeoParams::fgkEMCALCols-1); + absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod , irow, icol+1); + absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod-1, irow, AliEMCALGeoParams::fgkEMCALCols-1); } else { - absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol+1); - absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol-1); + if( icol < AliEMCALGeoParams::fgkEMCALCols-1 ) + absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol+1); + if( icol > 0 ) + absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol-1); } //Recalibrate cell energy if needed @@ -2605,11 +2968,11 @@ Float_t AliAnaCalorimeterQA::GetECross(const Int_t absID, AliVCaloCells* cells) tcell4 = cells->GetCellTime(absID4); GetCaloUtils()->RecalibrateCellTime (tcell4, fCalorimeter, absID4, GetReader()->GetInputEvent()->GetBunchCrossNumber()); } - - if(TMath::Abs(tcell-tcell1)*1.e9 > 50) ecell1 = 0 ; - if(TMath::Abs(tcell-tcell2)*1.e9 > 50) ecell2 = 0 ; - if(TMath::Abs(tcell-tcell3)*1.e9 > 50) ecell3 = 0 ; - if(TMath::Abs(tcell-tcell4)*1.e9 > 50) ecell4 = 0 ; + + if(TMath::Abs(tcell-tcell1)*1.e9 > dtcut) ecell1 = 0 ; + if(TMath::Abs(tcell-tcell2)*1.e9 > dtcut) ecell2 = 0 ; + if(TMath::Abs(tcell-tcell3)*1.e9 > dtcut) ecell3 = 0 ; + if(TMath::Abs(tcell-tcell4)*1.e9 > dtcut) ecell4 = 0 ; return ecell1+ecell2+ecell3+ecell4; } @@ -2642,8 +3005,8 @@ Float_t AliAnaCalorimeterQA::GetECross(const Int_t absID, AliVCaloCells* cells) } //__________________________________________________________________________________________________ -void AliAnaCalorimeterQA::InvariantMassHistograms(const Int_t iclus, const TLorentzVector mom, - const Int_t nModule, const TObjArray* caloClusters, +void AliAnaCalorimeterQA::InvariantMassHistograms(Int_t iclus, TLorentzVector mom, + Int_t nModule, const TObjArray* caloClusters, AliVCaloCells * cells) { // Fill Invariant mass histograms @@ -2707,8 +3070,8 @@ void AliAnaCalorimeterQA::Init() if(fCalorimeter != "PHOS" && fCalorimeter !="EMCAL") AliFatal(Form("Wrong calorimeter name <%s>", fCalorimeter.Data())); - if(GetReader()->GetDataType()== AliCaloTrackReader::kMC) - AliFatal("Analysis of reconstructed data, MC reader not aplicable"); + //if(GetReader()->GetDataType()== AliCaloTrackReader::kMC) + // AliFatal("Analysis of reconstructed data, MC reader not aplicable"); } @@ -2719,17 +3082,25 @@ void AliAnaCalorimeterQA::InitParameters() AddToHistogramsName("AnaCaloQA_"); fCalorimeter = "EMCAL"; //or PHOS - fNModules = 12; // set maximum to maximum number of EMCAL modules + fNModules = 22; // set maximum to maximum number of EMCAL modules fNRCU = 2; // set maximum number of RCU in EMCAL per SM - fTimeCutMin = -1; - fTimeCutMax = 9999999; + fTimeCutMin = -9999999; + fTimeCutMax = 9999999; fEMCALCellAmpMin = 0.2; fPHOSCellAmpMin = 0.2; + // Exotic studies + fExoNECrossCuts = 10 ; + fExoNDTimeCuts = 4 ; + + fExoDTimeCuts [0] = 1.e4 ; fExoDTimeCuts [1] = 50.0 ; fExoDTimeCuts [2] = 25.0 ; fExoDTimeCuts [3] = 10.0 ; + fExoECrossCuts[0] = 0.80 ; fExoECrossCuts[1] = 0.85 ; fExoECrossCuts[2] = 0.90 ; fExoECrossCuts[3] = 0.92 ; fExoECrossCuts[4] = 0.94 ; + fExoECrossCuts[5] = 0.95 ; fExoECrossCuts[6] = 0.96 ; fExoECrossCuts[7] = 0.97 ; fExoECrossCuts[8] = 0.98 ; fExoECrossCuts[9] = 0.99 ; + } -//___________________________________________________________________________________ -Bool_t AliAnaCalorimeterQA::IsGoodCluster(const Int_t absIdMax, AliVCaloCells* cells) +//_____________________________________________________________________________ +Bool_t AliAnaCalorimeterQA::IsGoodCluster(Int_t absIdMax, AliVCaloCells* cells) { //Identify cluster as exotic or not @@ -2844,13 +3215,13 @@ void AliAnaCalorimeterQA::MCHistograms() } else if(GetReader()->ReadAODMCParticles()){ - if(!GetReader()->GetAODMCParticles(0)) + if(!GetReader()->GetAODMCParticles()) AliFatal("AODMCParticles not available!"); //Fill some pure MC histograms, only primaries. - for(Int_t i=0 ; i < (GetReader()->GetAODMCParticles(0))->GetEntriesFast(); i++) + for(Int_t i=0 ; i < (GetReader()->GetAODMCParticles())->GetEntriesFast(); i++) { - AliAODMCParticle *aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles(0))->At(i) ; + AliAODMCParticle *aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles())->At(i) ; if (!aodprimary->IsPrimary()) continue; //accept all which is not MC transport generated. Don't know how to avoid partons @@ -2862,7 +3233,7 @@ void AliAnaCalorimeterQA::MCHistograms() } //_______________________________________________________________________________ -void AliAnaCalorimeterQA::MCHistograms(const TLorentzVector mom, const Int_t pdg) +void AliAnaCalorimeterQA::MCHistograms(TLorentzVector mom, Int_t pdg) { //Fill pure monte carlo related histograms @@ -3007,7 +3378,7 @@ void AliAnaCalorimeterQA::WeightHistograms(AliVCluster *clus, AliVCaloCells* cel if(IsDataMC()){ - Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader(),0); + Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader()); if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) &&