-//
// Jet trigger QA analysis task.
//
// Author: M.Verweij
#include <TH1F.h>
#include <TH2F.h>
#include <TH3F.h>
+#include <TProfile.h>
#include <THnSparse.h>
#include <TList.h>
#include <TLorentzVector.h>
#include "AliVCluster.h"
#include "AliVTrack.h"
+#include "AliVVZERO.h"
#include "AliEmcalJet.h"
#include "AliRhoParameter.h"
#include "AliLog.h"
fContainerFull(0),
fContainerCharged(1),
fMaxPatchEnergy(0),
+ fMaxPatchADCEnergy(0),
fTriggerType(-1),
fNFastOR(16),
+ fMainTrigCat(kTriggerLevel1Jet),
+ fMainTrigSimple(kFALSE),
fhNEvents(0),
+ fhTriggerbit(0),
fHistRhovsCentFull(0),
fHistRhovsCentCharged(0),
fh3PtEtaPhiTracks(0),
fh3PtEtaPhiTracksOnEmcal(0),
+ fh3PtEtaPhiTracksToProp(0),
fh3PtEtaPhiTracksProp(0),
+ fh3PtEtaPhiTracksNoProp(0),
fh2CentPtJetFull(0),
fh2CentPtJetCharged(0),
fh3PtEtaPhiJetFull(0),
fh3EEtaPhiCluster(0),
fh3PtLeadJet1VsPatchEnergy(0),
fh3PtLeadJet2VsPatchEnergy(0),
+ fh3PtLeadJet1PatchEnergyVZEROAmp(0),
+ fh3PtLeadJet1RawPatchEnergyVZEROAmp(0),
fh3PatchEnergyEtaPhiCenterJ1(0),
fh3PatchEnergyEtaPhiCenterJ2(0),
fh3PatchEnergyEtaPhiCenterJ1J2(0),
fh3PatchADCEnergyEtaPhiCenterJ1(0),
fh3PatchADCEnergyEtaPhiCenterJ2(0),
fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
+ fh3PatchADCEnergyEtaPhiCenterAll(0),
+ fh3EEtaPhiCell(0),
+ fh2ECellVsCent(0),
fh2CellEnergyVsTime(0),
fh3EClusELeadingCellVsTime(0),
fh3JetReacCent(0)
fContainerFull(0),
fContainerCharged(1),
fMaxPatchEnergy(0),
+ fMaxPatchADCEnergy(0),
fTriggerType(-1),
fNFastOR(16),
+ fMainTrigCat(kTriggerLevel1Jet),
+ fMainTrigSimple(kFALSE),
fhNEvents(0),
+ fhTriggerbit(0),
fHistRhovsCentFull(0),
fHistRhovsCentCharged(0),
fh3PtEtaPhiTracks(0),
fh3PtEtaPhiTracksOnEmcal(0),
+ fh3PtEtaPhiTracksToProp(0),
fh3PtEtaPhiTracksProp(0),
+ fh3PtEtaPhiTracksNoProp(0),
fh2CentPtJetFull(0),
fh2CentPtJetCharged(0),
fh3PtEtaPhiJetFull(0),
fh3EEtaPhiCluster(0),
fh3PtLeadJet1VsPatchEnergy(0),
fh3PtLeadJet2VsPatchEnergy(0),
+ fh3PtLeadJet1PatchEnergyVZEROAmp(0),
+ fh3PtLeadJet1RawPatchEnergyVZEROAmp(0),
fh3PatchEnergyEtaPhiCenterJ1(0),
fh3PatchEnergyEtaPhiCenterJ2(0),
fh3PatchEnergyEtaPhiCenterJ1J2(0),
fh3PatchADCEnergyEtaPhiCenterJ1(0),
fh3PatchADCEnergyEtaPhiCenterJ2(0),
fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
+ fh3PatchADCEnergyEtaPhiCenterAll(0),
+ fh3EEtaPhiCell(0),
+ fh2ECellVsCent(0),
fh2CellEnergyVsTime(0),
fh3EClusELeadingCellVsTime(0),
fh3JetReacCent(0)
AliAnalysisTaskEmcalJetTriggerQA::~AliAnalysisTaskEmcalJetTriggerQA()
{
// Destructor.
- if (fOutput) {
- delete fOutput; // delete output object list
- fOutput = 0;
- }
-
+
}
//________________________________________________________________________
TString trigType2 = "J2";
if(fTriggerClass.Contains("G")) {
trigType1 = "G1";
- trigType1 = "G2";
+ trigType2 = "G2";
}
TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
//Fill trigger patch histos for main trigger
- AliEmcalTriggerPatchInfo *patch = GetMainTriggerPatch();
+ AliEmcalTriggerPatchInfo *patch = GetMainTriggerPatch(fMainTrigCat,fMainTrigSimple);
+ fMaxPatchEnergy = 0;
+ fMaxPatchADCEnergy = 0;
if(patch) {
fMaxPatchEnergy = patch->GetPatchE();
- Double_t patchADCGeV = patch->GetADCAmpGeVRough();
+ fMaxPatchADCEnergy = patch->GetADCAmpGeVRough();
+ fh3PatchADCEnergyEtaPhiCenterAll->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
if(patch->IsJetLow() && !patch->IsJetHigh()) { //main patch only fired low threshold trigger
fh3PatchEnergyEtaPhiCenterJ2->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
- fh3PatchADCEnergyEtaPhiCenterJ2->Fill(patchADCGeV,patch->GetEtaGeo(),patch->GetPhiGeo());
+ fh3PatchADCEnergyEtaPhiCenterJ2->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
}
else if(patch->IsJetHigh() && !patch->IsJetLow()) { //main patch only fired high threshold trigger - should never happen
fh3PatchEnergyEtaPhiCenterJ1->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
- fh3PatchADCEnergyEtaPhiCenterJ1->Fill(patchADCGeV,patch->GetEtaGeo(),patch->GetPhiGeo());
+ fh3PatchADCEnergyEtaPhiCenterJ1->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
}
else if(patch->IsJetHigh() && patch->IsJetLow()) { //main patch fired both triggers
fh3PatchEnergyEtaPhiCenterJ1J2->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
- fh3PatchADCEnergyEtaPhiCenterJ1J2->Fill(patchADCGeV,patch->GetEtaGeo(),patch->GetPhiGeo());
+ fh3PatchADCEnergyEtaPhiCenterJ1J2->Fill(fMaxPatchADCEnergy,patch->GetEtaGeo(),patch->GetPhiGeo());
}
}
}
fhNEvents = new TH1F("fhNEvents","fhNEvents;selection;N_{evt}",5,0,5);
fOutput->Add(fhNEvents);
+ fhTriggerbit = new TProfile("fhTriggerbit","fhTriggerbit;;TriggerBit",1,0,1);
+ fOutput->Add(fhTriggerbit);
+
fHistRhovsCentFull = new TH2F("fHistRhovsCentFull", "fHistRhovsCentFull", 101, -1, 100, 300, 0., 300.);
fHistRhovsCentFull->GetXaxis()->SetTitle("Centrality (%)");
fHistRhovsCentFull->GetYaxis()->SetTitle("s#rho_{ch} (GeV/c * rad^{-1})");
Double_t *binsTime = new Double_t[fgkNTimeBins+1];
for(Int_t i=0; i<=fgkNTimeBins; i++) binsTime[i]=(Double_t)kMinTime + (kMaxTime-kMinTime)/fgkNTimeBins*(Double_t)i ;
+ Int_t fgkNVZEROBins = 100;
+ Float_t kMinVZERO = 0.;
+ Float_t kMaxVZERO = 25000;
+ Double_t *binsVZERO = new Double_t[fgkNVZEROBins+1];
+ for(Int_t i=0; i<=fgkNVZEROBins; i++) binsVZERO[i]=(Double_t)kMinVZERO + (kMaxVZERO-kMinVZERO)/fgkNVZEROBins*(Double_t)i ;
+
Double_t enBinEdges[3][2];
enBinEdges[0][0] = 1.; //10 bins
enBinEdges[0][1] = 0.1;
if(i<=nbin13 && i>nbin12) binsEn[i]=(Double_t)enmin3 + (enmax3-enmin3)/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ;
}
- fh3PtEtaPhiTracks = new TH3F("fh3PtEtaPhiTracks","fh3PtEtaPhiTracks;#it{p}_{T}^{track};#eta;#varphi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+ fh3PtEtaPhiTracks = new TH3F("fh3PtEtaPhiTracks","fh3PtEtaPhiTracks;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
fOutput->Add(fh3PtEtaPhiTracks);
- fh3PtEtaPhiTracksOnEmcal = new TH3F("fh3PtEtaPhiTracksOnEmcal","fh3PtEtaPhiTracksOnEmcal;#it{p}_{T}^{track};#eta;#varphi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+ fh3PtEtaPhiTracksOnEmcal = new TH3F("fh3PtEtaPhiTracksOnEmcal","fh3PtEtaPhiTracksOnEmcal;#it{p}_{T}^{track}_{emc};#eta_{emc};#varphi_{emc}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
fOutput->Add(fh3PtEtaPhiTracksOnEmcal);
- fh3PtEtaPhiTracksProp = new TH3F("fh3PtEtaPhiTracksProp","fh3PtEtaPhiTracksProp;#it{p}_{T}^{track};#eta;#varphi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+ fh3PtEtaPhiTracksToProp = new TH3F("fh3PtEtaPhiTracksToProp","fh3PtEtaPhiTracksToProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+ fOutput->Add(fh3PtEtaPhiTracksToProp);
+
+ fh3PtEtaPhiTracksProp = new TH3F("fh3PtEtaPhiTracksProp","fh3PtEtaPhiTracksProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
fOutput->Add(fh3PtEtaPhiTracksProp);
+ fh3PtEtaPhiTracksNoProp = new TH3F("fh3PtEtaPhiTracksNoProp","fh3PtEtaPhiTracksNoProp;#it{p}_{T}^{track}_{vtx};#eta_{vtx};#varphi_{vtx}",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+ fOutput->Add(fh3PtEtaPhiTracksNoProp);
+
fh2CentPtJetFull = new TH2F("fh2CentPtJetFull","fh2CentPtJetFull;cent;#it{p}_{T}^{jet}",fgkNCentBins,binsCent,fgkNPtBins,binsPt);
fOutput->Add(fh2CentPtJetFull);
fh3PtLeadJet2VsPatchEnergy = new TH3F("fh3PtLeadJet2VsPatchEnergy","fh3PtLeadJet2VsPatchEnergy;#it{p}_{T}^{jet 1};Amplitude_{patch};trig type",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNJetTypeBins,binsJetType);
fOutput->Add(fh3PtLeadJet2VsPatchEnergy);
+ fh3PtLeadJet1PatchEnergyVZEROAmp = new TH3F("fh3PtLeadJet1PatchEnergyVZEROAmp","fh3PtLeadJet1VsPatchEnergyVZEROAmp;#it{p}_{T}^{jet 1};Amplitude_{patch};VZERO amp",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNVZEROBins,binsVZERO);
+ fOutput->Add(fh3PtLeadJet1PatchEnergyVZEROAmp);
+ fh3PtLeadJet1RawPatchEnergyVZEROAmp = new TH3F("fh3PtLeadJet1RawPatchEnergyVZEROAmp","fh3PtLeadJet1RawPatchEnergyVZEROAmp;#it{p}_{T}^{jet 1};ADC Amplitude_{patch} (GeV);VZERO amp",fgkNPtBins,binsPt,fgkNPtBins,binsPt,fgkNVZEROBins,binsVZERO);
+ fOutput->Add(fh3PtLeadJet1RawPatchEnergyVZEROAmp);
+
fh3PatchEnergyEtaPhiCenterJ1 = new TH3F("fh3PatchEnergyEtaPhiCenterJ1","fh3PatchEnergyEtaPhiCenterJ1;E_{patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
fOutput->Add(fh3PatchEnergyEtaPhiCenterJ1);
fh3PatchADCEnergyEtaPhiCenterJ1J2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ1J2","fh3PatchADCEnergyEtaPhiCenterJ1J2;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
fOutput->Add(fh3PatchADCEnergyEtaPhiCenterJ1J2);
+ fh3PatchADCEnergyEtaPhiCenterAll = new TH3F("fh3PatchADCEnergyEtaPhiCenterAll","fh3PatchADCEnergyEtaPhiCenterAll;E_{ADC,patch};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+ fOutput->Add(fh3PatchADCEnergyEtaPhiCenterAll);
+
+ fh3EEtaPhiCell = new TH3F("fh3EEtaPhiCell","fh3EEtaPhiCell;E_{cell};#eta;#phi",fgkNEnBins,binsEn,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+ fOutput->Add(fh3EEtaPhiCell);
+
+ fh2ECellVsCent = new TH2F("fh2ECellVsCent","fh2ECellVsCent;centrality;E_{cell}",101,-1,100,500,0.,5.);
+ fOutput->Add(fh2ECellVsCent);
+
fh2CellEnergyVsTime = new TH2F("fh2CellEnergyVsTime","fh2CellEnergyVsTime;E_{cell};time",fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
fOutput->Add(fh2CellEnergyVsTime);
PostData(1, fOutput); // Post data for ALL output slots > 0 here.
- if(binsCent) delete [] binsCent;
+ delete [] binsCent;
if(binsdEP) delete [] binsdEP;
if(binsEn) delete [] binsEn;
if(binsPt) delete [] binsPt;
if(binsz) delete [] binsz;
if(binsJetType) delete [] binsJetType;
if(binsTime) delete [] binsTime;
+ if(binsVZERO) delete [] binsVZERO;
}
//Tracks
AliParticleContainer *partCont = GetParticleContainer(0);
if (partCont) {
- Int_t i = 0;
AliPicoTrack *track = dynamic_cast<AliPicoTrack*>(partCont->GetNextAcceptParticle(0));
while(track) {
Double_t trkphi = track->Phi()*TMath::RadToDeg();
fh3PtEtaPhiTracks->Fill(track->Pt(),track->Eta(),track->Phi());
- fh3PtEtaPhiTracksOnEmcal->Fill(track->GetTrackPtOnEMCal(),track->GetTrackEtaOnEMCal(),track->GetTrackPhiOnEMCal());
- if(track->IsEMCAL()) {
- i++;
- if(TMath::Abs(track->Eta())<0.9 && trkphi > 10 && trkphi < 250 )
- fh3PtEtaPhiTracksProp->Fill(track->Pt(),track->Eta(),track->Phi());
+ //Select tracks which should be propagated
+ if(track->Pt()>=0.350) {
+ if (TMath::Abs(track->Eta())<=0.9 && trkphi > 10 && trkphi < 250) {
+ fh3PtEtaPhiTracksOnEmcal->Fill(track->GetTrackPtOnEMCal(),track->GetTrackEtaOnEMCal(),track->GetTrackPhiOnEMCal());
+ fh3PtEtaPhiTracksToProp->Fill(track->Pt(),track->Eta(),track->Phi());
+ if(track->GetTrackPtOnEMCal()>=0)
+ fh3PtEtaPhiTracksProp->Fill(track->Pt(),track->Eta(),track->Phi());
+ else
+ fh3PtEtaPhiTracksNoProp->Fill(track->Pt(),track->Eta(),track->Phi());
+ }
}
track = dynamic_cast<AliPicoTrack*>(partCont->GetNextAcceptParticle());
}
Short_t cellId = fCaloCells->GetCellNumber(iCell);
Double_t cellE = fCaloCells->GetCellAmplitude(cellId);
Double_t cellT = fCaloCells->GetCellTime(cellId);
+ TVector3 pos;
+ fGeom->GetGlobal(cellId, pos);
+ TLorentzVector lv(pos,cellE);
+ Double_t cellEta = lv.Eta();
+ Double_t cellPhi = lv.Phi();
+ if(cellPhi<0.) cellPhi+=TMath::TwoPi();
+ if(cellPhi>TMath::TwoPi()) cellPhi-=TMath::TwoPi();
AliDebug(2,Form("cell energy = %f time = %f",cellE,cellT*1e9));
fh2CellEnergyVsTime->Fill(cellE,cellT*1e9);
+ fh3EEtaPhiCell->Fill(cellE,cellEta,cellPhi);
+ fh2ECellVsCent->Fill(fCent,cellE);
}
}
}
}
- if(GetJetContainer(fContainerFull) && GetJetContainer(fContainerCharged)) {
+ if(GetJetContainer(fContainerFull) && GetJetContainer(fContainerCharged))
fh2PtLeadJet1VsLeadJet2->Fill(ptLeadJet1,ptLeadJet2);
- }
fh3PtLeadJet1VsPatchEnergy->Fill(ptLeadJet1,fMaxPatchEnergy,fTriggerType);
fh3PtLeadJet2VsPatchEnergy->Fill(ptLeadJet2,fMaxPatchEnergy,fTriggerType);
- if(nJetsArr) delete nJetsArr;
+ // Get VZERO amplitude
+ Float_t VZEROAmp = InputEvent()->GetVZEROData()->GetTriggerChargeA() + InputEvent()->GetVZEROData()->GetTriggerChargeC();
+
+ fh3PtLeadJet1PatchEnergyVZEROAmp->Fill(ptLeadJet1,fMaxPatchEnergy,VZEROAmp);
+ fh3PtLeadJet1RawPatchEnergyVZEROAmp->Fill(ptLeadJet1,fMaxPatchADCEnergy,VZEROAmp);
+
+ delete nJetsArr;
return kTRUE;
}
{
// Run analysis code here, if needed. It will be executed before FillHistograms().
+ fhTriggerbit->Fill(0.5,GetCollisionCandidates());
+
//Check if event is selected (vertex & pile-up)
if(!SelectEvent())
return kFALSE;
}
//________________________________________________________________________
-Double_t AliAnalysisTaskEmcalJetTriggerQA::GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz) const
+Double_t AliAnalysisTaskEmcalJetTriggerQA::GetZ(Double_t trkPx, Double_t trkPy, Double_t trkPz, Double_t jetPx, Double_t jetPy, Double_t jetPz) const
{
//
// Get the z of a constituent inside of a jet
iCellAbsIdMax = absId;
}
}
-
return iCellAbsIdMax;
}