From Marta
authorConstantin Loizides <loizides@localhost.localdomain>
Thu, 5 Dec 2013 15:18:29 +0000 (16:18 +0100)
committerConstantin Loizides <loizides@localhost.localdomain>
Thu, 5 Dec 2013 15:18:29 +0000 (16:18 +0100)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.h
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetTriggerQA.cxx
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalJetTriggerQA.h

index 7afbf7f..5754afe 100644 (file)
@@ -46,7 +46,6 @@ AliAnalysisTaskEmcalDiJetAna::AliAnalysisTaskEmcalDiJetAna() :
   fhnDiJetVarsCh(0),
   fhnDiJetVarsFullCharged(0),
   fhnMatchingFullCharged(0),
-  fh3JetPtFullFractionDR(0),
   fh3PtTrigKt1Kt2Ch(0),
   fh3PtTrigKt1Kt2FuCh(0),
   fh3PtTrigDPhi1DPhi2Ch(0),
@@ -79,7 +78,6 @@ AliAnalysisTaskEmcalDiJetAna::AliAnalysisTaskEmcalDiJetAna(const char *name) :
   fhnDiJetVarsCh(0),
   fhnDiJetVarsFullCharged(0),
   fhnMatchingFullCharged(0),
-  fh3JetPtFullFractionDR(0),
   fh3PtTrigKt1Kt2Ch(0),
   fh3PtTrigKt1Kt2FuCh(0),
   fh3PtTrigDPhi1DPhi2Ch(0),
@@ -162,7 +160,7 @@ void AliAnalysisTaskEmcalDiJetAna::UserCreateOutputObjects()
   const Int_t nBinsKt       = 50;
   const Int_t nBinsDiJetEta = 40;
   const Int_t nBinsCentr    = fNcentBins;
-  const Int_t nBinsAj       = 50;
+  const Int_t nBinsAj       = 20;
   const Int_t nBins0[nBinsSparse0] = {nBinsPtW,nBinsPtW,nBinsDPhi,nBinsKt,nBinsDiJetEta,nBinsCentr,nBinsAj};
   //pT1, pT2, deltaPhi, kT
   const Double_t xmin0[nBinsSparse0]  = {  minPt, minPt, -0.5*TMath::Pi(),   0.,-1.,0.  , 0.};
@@ -250,8 +248,6 @@ void AliAnalysisTaskEmcalDiJetAna::UserCreateOutputObjects()
                                          nBinsSparseMatch,nBinsMatch,xminMatch,xmaxMatch);
     fOutput->Add(fhnMatchingFullCharged);
   }
-  fh3JetPtFullFractionDR = new TH3F("fh3JetPtFullFractionDR","fh3JetPtFullFractionDR;#it{p}_{T,full} (GeV/#it{c}); #it{f}_{ch};#Delta R",nBinsPt,minPt,maxPt,nBinsFraction,0.,1.05,nBinsDR,0.,1.);
-  fOutput->Add(fh3JetPtFullFractionDR);
   
   // =========== Switch on Sumw2 for all histos ===========
   for (Int_t i=0; i<fOutput->GetEntries(); ++i) {
index b28b6dd..dd1b55e 100644 (file)
@@ -60,7 +60,6 @@ class AliAnalysisTaskEmcalDiJetAna : public AliAnalysisTaskEmcalDiJetBase {
   THnSparse        *fhnDiJetVarsCh;                       //! sparse with di-jet properties (charged-charged)
   THnSparse        *fhnDiJetVarsFullCharged;              //! sparse with di-jet properties (full-charged)
   THnSparse        *fhnMatchingFullCharged;               //! sparse comparing full with matched charged jet
-  TH3F             *fh3JetPtFullFractionDR;               //! full jet pt vs highest shared charged fraction vs DeltaR
 
   TH3F             *fh3DiJetKtNEFPtAssoc[4];              //! dijet kt vs NEF vs pTassoc for 4 trigger intervals
 
@@ -82,6 +81,6 @@ class AliAnalysisTaskEmcalDiJetAna : public AliAnalysisTaskEmcalDiJetBase {
   AliAnalysisTaskEmcalDiJetAna(const AliAnalysisTaskEmcalDiJetAna&);            // not implemented
   AliAnalysisTaskEmcalDiJetAna &operator=(const AliAnalysisTaskEmcalDiJetAna&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcalDiJetAna, 8) // dijet analysis task
+  ClassDef(AliAnalysisTaskEmcalDiJetAna, 9) // dijet analysis task
 };
 #endif
index f720e97..8ed995a 100644 (file)
@@ -22,6 +22,7 @@
 #include "AliVCaloCells.h"
 #include "AliJetContainer.h"
 #include "AliClusterContainer.h"
+#include "AliParticleContainer.h"
 #include "AliEmcalTriggerPatchInfo.h"
 #include "AliAODHeader.h"
 
@@ -42,6 +43,7 @@ AliAnalysisTaskEmcalJetTriggerQA::AliAnalysisTaskEmcalJetTriggerQA() :
   fTriggerType(-1),
   fNFastOR(16),
   fhNEvents(0),
+  fh3PtEtaPhiTracks(0),
   fh3PtEtaPhiJetFull(0),
   fh3PtEtaPhiJetCharged(0),
   fh2NJetsPtFull(0),
@@ -64,6 +66,10 @@ AliAnalysisTaskEmcalJetTriggerQA::AliAnalysisTaskEmcalJetTriggerQA() :
   fh3PtLeadJet2VsPatchEnergy(0),
   fh3PatchEnergyEtaPhiCenterJ1(0),
   fh3PatchEnergyEtaPhiCenterJ2(0),
+  fh3PatchEnergyEtaPhiCenterJ1J2(0),
+  fh3PatchADCEnergyEtaPhiCenterJ1(0),
+  fh3PatchADCEnergyEtaPhiCenterJ2(0),
+  fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
   fh2CellEnergyVsTime(0),
   fh3EClusELeadingCellVsTime(0)
 {
@@ -85,6 +91,7 @@ AliAnalysisTaskEmcalJetTriggerQA::AliAnalysisTaskEmcalJetTriggerQA(const char *n
   fTriggerType(-1),
   fNFastOR(16),
   fhNEvents(0),
+  fh3PtEtaPhiTracks(0),
   fh3PtEtaPhiJetFull(0),
   fh3PtEtaPhiJetCharged(0),
   fh2NJetsPtFull(0),
@@ -107,6 +114,10 @@ AliAnalysisTaskEmcalJetTriggerQA::AliAnalysisTaskEmcalJetTriggerQA(const char *n
   fh3PtLeadJet2VsPatchEnergy(0),
   fh3PatchEnergyEtaPhiCenterJ1(0),
   fh3PatchEnergyEtaPhiCenterJ2(0),
+  fh3PatchEnergyEtaPhiCenterJ1J2(0),
+  fh3PatchADCEnergyEtaPhiCenterJ1(0),
+  fh3PatchADCEnergyEtaPhiCenterJ2(0),
+  fh3PatchADCEnergyEtaPhiCenterJ1J2(0),
   fh2CellEnergyVsTime(0),
   fh3EClusELeadingCellVsTime(0)
 {
@@ -133,17 +144,19 @@ Bool_t AliAnalysisTaskEmcalJetTriggerQA::SelectEvent() {
     //Check if requested trigger was fired
     TString firedTrigClass = InputEvent()->GetFiredTriggerClasses();
     
-    if(fTriggerClass.Contains("J1") && fTriggerClass.Contains("J2")) {      
+     if(fTriggerClass.Contains("J1") && fTriggerClass.Contains("J2")) {
       if(!firedTrigClass.Contains("J1") || !firedTrigClass.Contains("J2") )
-       return kFALSE; 
+        return kFALSE;
     }
     else {
-
       if(!firedTrigClass.Contains(fTriggerClass))
-       return kFALSE;
+        return kFALSE;
       if(fTriggerClass.Contains("J2") && firedTrigClass.Contains("J1")) //only accept J2 triggers which were not fired by J1 as well
-       return kFALSE;
+        return kFALSE;
+      else if(fTriggerClass.Contains("J1") && firedTrigClass.Contains("J2")) //only accept J2 triggers which were not fired by J1 as well
+        return kFALSE;
     }
+     
   }
 
   fhNEvents->Fill(1.5);
@@ -160,11 +173,21 @@ void AliAnalysisTaskEmcalJetTriggerQA::FindTriggerPatch() {
   AliEmcalTriggerPatchInfo *patch = GetMainTriggerPatch();
   if(patch) {
     fMaxPatchEnergy = patch->GetPatchE();
-    if(patch->IsJetLow() && !patch->IsJetHigh())  
+    Double_t patchADCGeV = patch->GetADCAmpGeVRough();
+    if(patch->IsJetLow() && !patch->IsJetHigh()) {
       fh3PatchEnergyEtaPhiCenterJ2->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
-    if(patch->IsJetHigh()) 
+      fh3PatchADCEnergyEtaPhiCenterJ2->Fill(patchADCGeV,patch->GetEtaGeo(),patch->GetPhiGeo());
+    }
+    else if(patch->IsJetHigh() && !patch->IsJetLow()) {
       fh3PatchEnergyEtaPhiCenterJ1->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
+      fh3PatchADCEnergyEtaPhiCenterJ1->Fill(patchADCGeV,patch->GetEtaGeo(),patch->GetPhiGeo());
+    }
+    else if(patch->IsJetHigh() && patch->IsJetLow()) {
+      fh3PatchEnergyEtaPhiCenterJ1J2->Fill(patch->GetPatchE(),patch->GetEtaGeo(),patch->GetPhiGeo());
+      fh3PatchADCEnergyEtaPhiCenterJ1J2->Fill(patchADCGeV,patch->GetEtaGeo(),patch->GetPhiGeo());
+    }
   }
+
 }
 
 //________________________________________________________________________
@@ -266,6 +289,8 @@ void AliAnalysisTaskEmcalJetTriggerQA::UserCreateOutputObjects()
     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);
+  fOutput->Add(fh3PtEtaPhiTracks);
 
   fh3PtEtaPhiJetFull = new TH3F("fh3PtEtaPhiJetFull","fh3PtEtaPhiJetFull;#it{p}_{T}^{jet};#eta;#varphi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
   fOutput->Add(fh3PtEtaPhiJetFull);
@@ -332,6 +357,18 @@ void AliAnalysisTaskEmcalJetTriggerQA::UserCreateOutputObjects()
   fh3PatchEnergyEtaPhiCenterJ2 = new TH3F("fh3PatchEnergyEtaPhiCenterJ2","fh3PatchEnergyEtaPhiCenterJ2;E_{patch};#eta;#phi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
   fOutput->Add(fh3PatchEnergyEtaPhiCenterJ2);
 
+  fh3PatchEnergyEtaPhiCenterJ1J2 = new TH3F("fh3PatchEnergyEtaPhiCenterJ1J2","fh3PatchEnergyEtaPhiCenterJ1J2;E_{patch};#eta;#phi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+  fOutput->Add(fh3PatchEnergyEtaPhiCenterJ1J2);
+
+  fh3PatchADCEnergyEtaPhiCenterJ1 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ1","fh3PatchADCEnergyEtaPhiCenterJ1;E_{ADC,patch};#eta;#phi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+  fOutput->Add(fh3PatchADCEnergyEtaPhiCenterJ1);
+
+  fh3PatchADCEnergyEtaPhiCenterJ2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ2","fh3PatchADCEnergyEtaPhiCenterJ2;E_{ADC,patch};#eta;#phi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+  fOutput->Add(fh3PatchADCEnergyEtaPhiCenterJ2);
+
+  fh3PatchADCEnergyEtaPhiCenterJ1J2 = new TH3F("fh3PatchADCEnergyEtaPhiCenterJ1J2","fh3PatchADCEnergyEtaPhiCenterJ1J2;E_{ADC,patch};#eta;#phi",fgkNPtBins,binsPt,fgkNEtaBins,binsEta,fgkNPhiBins,binsPhi);
+  fOutput->Add(fh3PatchADCEnergyEtaPhiCenterJ1J2);
+
   fh2CellEnergyVsTime = new TH2F("fh2CellEnergyVsTime","fh2CellEnergyVsTime;E_{cell};time",fgkNEnBins,binsEn,fgkNTimeBins,binsTime);
   fOutput->Add(fh2CellEnergyVsTime);
 
@@ -383,6 +420,16 @@ Bool_t AliAnalysisTaskEmcalJetTriggerQA::FillHistograms()
 {
   // Fill histograms.
 
+  AliParticleContainer *partCont = GetParticleContainer(0);
+  if (partCont) {
+    AliVParticle *track = partCont->GetNextAcceptParticle(0);
+    while(track) {
+      fh3PtEtaPhiTracks->Fill(track->Pt(),track->Eta(),track->Phi());
+      track = partCont->GetNextAcceptParticle();
+    }
+  }
+
+
   AliClusterContainer  *clusCont = GetClusterContainer(0);
   if (clusCont) {
     Int_t nclusters = clusCont->GetNClusters();
@@ -553,7 +600,7 @@ Bool_t AliAnalysisTaskEmcalJetTriggerQA::Run()
   if(!SelectEvent())
     return kFALSE;
   
-  if(!fTriggerClass.IsNull())
+  if(fTriggerPatchInfo) 
     FindTriggerPatch();
 
   return kTRUE;  // If return kFALSE FillHistogram() will NOT be executed.
@@ -626,3 +673,52 @@ Double_t AliAnalysisTaskEmcalJetTriggerQA::GetEnergyLeadingCell(const AliVCluste
     return -1.;
 
 }
+
+//________________________________________________________________________
+Double_t AliAnalysisTaskEmcalJetTriggerQA::GetECross(Int_t absID) const {
+
+  //Get Ecross = sum of energy of neighbouring cells (using uncalibrated energy)
+
+  if(!fCaloCells)
+    return -1.;
+
+  Double_t ecross = -1.;
+
+  Int_t absID1 = -1;
+  Int_t absID2 = -1;
+  Int_t absID3 = -1;
+  Int_t absID4 = -1;
+
+  Int_t imod = -1, iphi =-1, ieta=-1,iTower = -1, iIphi = -1, iIeta = -1;
+  fGeom->GetCellIndex(absID,imod,iTower,iIphi,iIeta);
+  fGeom->GetCellPhiEtaIndexInSModule(imod,iTower,iIphi, iIeta,iphi,ieta);
+
+  if( iphi < AliEMCALGeoParams::fgkEMCALRows-1)
+    absID1 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi+1, ieta);
+  if( iphi > 0 )
+    absID2 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi-1, ieta);
+
+  if( ieta == AliEMCALGeoParams::fgkEMCALCols-1 && !(imod%2) ) {
+    absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod+1, iphi, 0);
+    absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod,   iphi, ieta-1);
+  }
+  else if( ieta == 0 && imod%2 ) {
+    absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod,   iphi, ieta+1);
+    absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod-1, iphi, AliEMCALGeoParams::fgkEMCALCols-1);
+  }
+  else  {
+    if( ieta < AliEMCALGeoParams::fgkEMCALCols-1 )
+      absID3 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta+1);
+    if( ieta > 0 )
+      absID4 = fGeom->GetAbsCellIdFromCellIndexes(imod, iphi, ieta-1);
+  }
+
+  Double_t ecell1 = fCaloCells->GetCellAmplitude(absID1);
+  Double_t ecell2 = fCaloCells->GetCellAmplitude(absID2);
+  Double_t ecell3 = fCaloCells->GetCellAmplitude(absID3);
+  Double_t ecell4 = fCaloCells->GetCellAmplitude(absID4);
+
+  ecross = ecell1+ecell2+ecell3+ecell4;
+
+  return ecross;
+}
index a9bb4c6..8e0088c 100644 (file)
@@ -36,6 +36,7 @@ class AliAnalysisTaskEmcalJetTriggerQA : public AliAnalysisTaskEmcalJet {
 
   Int_t    GetLeadingCellId(const AliVCluster *clus) const;
   Double_t GetEnergyLeadingCell(const AliVCluster *clus) const;
+  Double_t GetECross(Int_t absID) const;
 
   Double_t GetZ(const AliVParticle *trk, const AliEmcalJet *jet)       const;
   Double_t 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;
@@ -59,6 +60,7 @@ class AliAnalysisTaskEmcalJetTriggerQA : public AliAnalysisTaskEmcalJet {
   Int_t              fNFastOR;               // size of trigger patch fNFastORxfNFastOR
 
   TH1F  *fhNEvents;                         //! Histo number of events
+  TH3F  *fh3PtEtaPhiTracks;                 //! pt,eta,phi of tracks
   TH3F  *fh3PtEtaPhiJetFull;                //! pt,eta,phi of full jets
   TH3F  *fh3PtEtaPhiJetCharged;             //! pt,eta,phi of charged jets
   TH2F  *fh2NJetsPtFull;                    //! NJets per event vs pT,jet
@@ -81,6 +83,10 @@ class AliAnalysisTaskEmcalJetTriggerQA : public AliAnalysisTaskEmcalJet {
   TH3F  *fh3PtLeadJet2VsPatchEnergy;        //! leading jet energy vs leading patch energy vs jet trigger (J1/J2)
   TH3F  *fh3PatchEnergyEtaPhiCenterJ1;      //! patch energy vs eta, phi at center of patch, high threshold
   TH3F  *fh3PatchEnergyEtaPhiCenterJ2;      //! patch energy vs eta, phi at center of patch, low threshold
+  TH3F  *fh3PatchEnergyEtaPhiCenterJ1J2;    //! patch energy vs eta, phi at center of patch, low + high threshold
+  TH3F  *fh3PatchADCEnergyEtaPhiCenterJ1;   //! patch ADC energy vs eta, phi at center of patch, high threshold
+  TH3F  *fh3PatchADCEnergyEtaPhiCenterJ2;   //! patch ADC energy vs eta, phi at center of patch, low threshold
+  TH3F  *fh3PatchADCEnergyEtaPhiCenterJ1J2; //! patch ADC energy vs eta, phi at center of patch, low + high threshold
   TH2F  *fh2CellEnergyVsTime;               //! emcal cell energy vs time
   TH3F  *fh3EClusELeadingCellVsTime;        //! cluster energy vs energy of leading cell in cluster vs time of the leading cell
 
@@ -88,6 +94,6 @@ class AliAnalysisTaskEmcalJetTriggerQA : public AliAnalysisTaskEmcalJet {
   AliAnalysisTaskEmcalJetTriggerQA(const AliAnalysisTaskEmcalJetTriggerQA&);            // not implemented
   AliAnalysisTaskEmcalJetTriggerQA &operator=(const AliAnalysisTaskEmcalJetTriggerQA&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcalJetTriggerQA, 5)
+  ClassDef(AliAnalysisTaskEmcalJetTriggerQA, 6)
 };
 #endif