update from salvatore
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 5 Aug 2012 19:11:09 +0000 (19:11 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 5 Aug 2012 19:11:09 +0000 (19:11 +0000)
PWGGA/EMCALJetTasks/AliJetRandomizerTask.cxx
PWGGA/EMCALJetTasks/AliJetRandomizerTask.h
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.cxx
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAJF.h
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.cxx
PWGGA/EMCALJetTasks/UserTasks/AliAnalysisTaskSAQA.h

index ce45221..b6a2a4f 100644 (file)
@@ -23,7 +23,8 @@ ClassImp(AliJetRandomizerTask)
 
 //________________________________________________________________________
 AliJetRandomizerTask::AliJetRandomizerTask() : 
-  AliJetModelBaseTask("AliJetRandomizerTask")
+  AliJetModelBaseTask("AliJetRandomizerTask"),
+  fRandomizeEta(0)
 {
   // Default constructor.
 
@@ -33,7 +34,8 @@ AliJetRandomizerTask::AliJetRandomizerTask() :
 
 //________________________________________________________________________
 AliJetRandomizerTask::AliJetRandomizerTask(const char *name) : 
-  AliJetModelBaseTask(name)
+  AliJetModelBaseTask(name),
+  fRandomizeEta(0)
 {
   // Standard constructor.
 
@@ -70,6 +72,8 @@ void AliJetRandomizerTask::Run()
 {
   // Randomize particles.
 
+  Double_t eta = -999;
+
   if (fNClusters > 0 && fOutClusters) {
     const Int_t nClusters = fClusters->GetEntriesFast();
     for (Int_t i = 0; i < nClusters; ++i) {
@@ -82,8 +86,11 @@ void AliJetRandomizerTask::Run()
       Float_t pos[3];
       cluster->GetPosition(pos);
       TVector3 clusVec(pos);
-
-      AddCluster(cluster->E(), clusVec.Eta());
+      if (fRandomizeEta == 0)
+       eta = clusVec.Eta();
+      else if (fRandomizeEta == 2)
+       eta = -clusVec.Eta();
+      AddCluster(cluster->E(), eta);
     }
   }
  
@@ -93,8 +100,11 @@ void AliJetRandomizerTask::Run()
       AliPicoTrack *track = dynamic_cast<AliPicoTrack*>(fTracks->At(i));
       if (!track)
        continue;
-
-      AddTrack(track->Pt(), track->Eta());
+      if (fRandomizeEta == 0)
+       eta = track->Eta();
+      else if (fRandomizeEta == 2)
+       eta = -track->Eta();
+      AddTrack(track->Pt(), eta);
     }
   }
 }
index 2a86eeb..efb5e63 100644 (file)
@@ -13,11 +13,16 @@ class AliJetRandomizerTask : public AliJetModelBaseTask {
   AliJetRandomizerTask(const char *name); 
   virtual ~AliJetRandomizerTask();
 
+  void         SetRandomizeEta(Int_t opt = 1)    { fRandomizeEta = opt; }
+
   void         UserExec(Option_t* /*option*/);
 
+
  protected:
   void         Run();
 
+  Int_t        fRandomizeEta;  //0 = do not randomize eta; 1 = randomize eta uniformly; 2 = invert eta sign
+
  private:
   AliJetRandomizerTask(const AliJetRandomizerTask&);            // not implemented
   AliJetRandomizerTask &operator=(const AliJetRandomizerTask&); // not implemented
index c5c740d..725ad5d 100644 (file)
@@ -78,6 +78,7 @@ AliAnalysisTaskSAJF::AliAnalysisTaskSAJF() :
     fHistMaxTrackPtvsJetCorrPt[i] = 0;
     fHistMaxClusPtvsJetCorrPt[i] = 0;
     fHistMaxPartPtvsJetCorrPt[i] = 0;
+    fHistConstituents[i] = 0;
     fHistRho[i] = 0;
     fHistJetsCorrPt[i] = 0;
     fHistJetsCorrPtArea[i] = 0;
@@ -148,6 +149,7 @@ AliAnalysisTaskSAJF::AliAnalysisTaskSAJF(const char *name) :
     fHistMaxTrackPtvsJetCorrPt[i] = 0;
     fHistMaxClusPtvsJetCorrPt[i] = 0;
     fHistMaxPartPtvsJetCorrPt[i] = 0;
+    fHistConstituents[i] = 0;
     fHistRho[i] = 0;
     fHistJetsCorrPt[i] = 0;
     fHistJetsCorrPtArea[i] = 0;
@@ -362,11 +364,18 @@ void AliAnalysisTaskSAJF::UserCreateOutputObjects()
 
     histname = "fHistMaxPartPtvsJetCorrPt_";
     histname += i;
-    fHistMaxPartPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt,  (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
+    fHistMaxPartPtvsJetCorrPt[i] = new TH2F(histname.Data(), histname.Data(), fNbins * 2, -fMaxBinPt, fMaxBinPt, (Int_t)(fNbins / 2.5), fMinBinPt, fMaxBinPt / 2.5);
     fHistMaxPartPtvsJetCorrPt[i]->GetXaxis()->SetTitle("p_{T}^{jet} [GeV/c]");
     fHistMaxPartPtvsJetCorrPt[i]->GetYaxis()->SetTitle("p_{T}^{part} [GeV/c]");
     fOutput->Add(fHistMaxPartPtvsJetCorrPt[i]);
 
+    histname = "fHistConstituents_";
+    histname += i;
+    fHistConstituents[i] = new TH2F(histname.Data(), histname.Data(), 100, 1, 101, 100, -0.5, 99.5);
+    fHistConstituents[i]->GetXaxis()->SetTitle("p_{T,part} [GeV/c]");
+    fHistConstituents[i]->GetYaxis()->SetTitle("no. of particles");
+    fOutput->Add(fHistConstituents[i]);
+
     histname = "fHistRho_";
     histname += i;
     fHistRho[i] = new TH1F(histname.Data(), histname.Data(), fNbins, fMinBinPt, fMaxBinPt * 2);
@@ -807,6 +816,9 @@ void AliAnalysisTaskSAJF::DoJetLoop()
 
   const Int_t njets = fJets->GetEntriesFast();
 
+  TH1F constituents("constituents", "constituents", 
+                   fHistConstituents[0]->GetNbinsX(), fHistConstituents[0]->GetXaxis()->GetXmin(), fHistConstituents[0]->GetXaxis()->GetXmax()); 
+
   for (Int_t ij = 0; ij < njets; ij++) {
 
     AliEmcalJet* jet = static_cast<AliEmcalJet*>(fJets->At(ij));
@@ -849,6 +861,7 @@ void AliAnalysisTaskSAJF::DoJetLoop()
        AliVParticle *track = jet->TrackAt(it, fTracks);
        if (track) {
          fHistJetsZvsPt[fCentBin]->Fill(track->Pt() / jet->Pt(), jet->Pt());
+         constituents.Fill(track->Pt());
          scalarpt += track->Pt();
        }
       }
@@ -863,11 +876,18 @@ void AliAnalysisTaskSAJF::DoJetLoop()
          cluster->GetMomentum(nPart, fVertex);
          fHistJetsZvsPt[fCentBin]->Fill(nPart.Et() / jet->Pt(), jet->Pt());
          scalarpt += nPart.Pt();
+         constituents.Fill(nPart.Pt());
        }
       }
     }
 
     fHistDeltaVectorPt->Fill(scalarpt - jet->Pt());
+
+    for (Int_t i = 1; i <= constituents.GetNbinsX(); i++) {
+      fHistConstituents[fCentBin]->Fill(constituents.GetBinCenter(i), constituents.GetBinContent(i));
+    }
+
+    constituents.Reset();
   } //jet loop 
 }
 
index 9d41750..da0d035 100644 (file)
@@ -81,6 +81,7 @@ class AliAnalysisTaskSAJF : public AliAnalysisTaskEmcalJet {
   TH2F                       *fHistMaxTrackPtvsJetCorrPt[4];   //!Max constituent track pt vs. jet pt
   TH2F                       *fHistMaxClusPtvsJetCorrPt[4];    //!Max constituent cluster pt vs. jet pt
   TH2F                       *fHistMaxPartPtvsJetCorrPt[4];    //!Max constituent particle (track or cluster) pt vs. jet pt
+  TH2F                       *fHistConstituents[4];            //!x axis = constituents pt; y axis = no. of constituents; z axis = jet pt
   TH1F                       *fHistDeltaVectorPt;              //!Delta Pt between vector and scalar sum
 
   // Rho
index 3f61ca2..c3160eb 100644 (file)
@@ -70,7 +70,7 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA() :
   }
 
   for (Int_t i = 0; i < 4; i++) {
-    fHistJetsPhiEtaPt[i] = 0;
+    fHistJetsPhiEta[i] = 0;
     fHistJetsPtNonBias[i] = 0;
     fHistJetsPtTrack[i] = 0;
     fHistJetsPtClus[i] = 0;
@@ -122,7 +122,7 @@ AliAnalysisTaskSAQA::AliAnalysisTaskSAQA(const char *name) :
   }
 
   for (Int_t i = 0; i < 4; i++) {
-    fHistJetsPhiEtaPt[i] = 0;
+    fHistJetsPhiEta[i] = 0;
     fHistJetsPtNonBias[i] = 0;
     fHistJetsPtTrack[i] = 0;
     fHistJetsPtClus[i] = 0;
@@ -317,13 +317,13 @@ void AliAnalysisTaskSAQA::UserCreateOutputObjects()
     TString histname;
 
     for (Int_t i = 0; i < 4; i++) {
-      histname = "fHistJetsPhiEtaPt_";
+      histname = "fHistJetsPhiEta_";
       histname += i;
-      fHistJetsPhiEtaPt[i] = new TH3F(histname.Data(), histname.Data(), 80, -2, 2, 128, 0, 6.4, (Int_t)(fNbins * 2.5), fMinBinPt, fMaxBinPt * 2.5);
-      fHistJetsPhiEtaPt[i]->GetXaxis()->SetTitle("#eta");
-      fHistJetsPhiEtaPt[i]->GetYaxis()->SetTitle("#phi");
-      fHistJetsPhiEtaPt[i]->GetZaxis()->SetTitle("p_{T} [GeV/c]");
-      fOutput->Add(fHistJetsPhiEtaPt[i]);
+      fHistJetsPhiEta[i] = new TH2F(histname.Data(), histname.Data(), 80, -2, 2, 128, 0, 6.4);
+      fHistJetsPhiEta[i]->GetXaxis()->SetTitle("#eta");
+      fHistJetsPhiEta[i]->GetYaxis()->SetTitle("#phi");
+      fHistJetsPhiEta[i]->GetZaxis()->SetTitle("p_{T} [GeV/c]");
+      fOutput->Add(fHistJetsPhiEta[i]);
 
       histname = "fHistJetsPtNonBias_";
       histname += i;
@@ -664,7 +664,7 @@ void AliAnalysisTaskSAQA::DoJetLoop()
     fHistJetsPt[fCentBin]->Fill(jet->Pt());
     fHistJetsPtArea[fCentBin]->Fill(jet->Pt(), jet->Area());
 
-    fHistJetsPhiEtaPt[fCentBin]->Fill(jet->Eta(), jet->Phi(), jet->Pt());
+    fHistJetsPhiEta[fCentBin]->Fill(jet->Eta(), jet->Phi());
   }
 }
 
index 4bdb5d3..76b6865 100644 (file)
@@ -69,7 +69,7 @@ class AliAnalysisTaskSAQA : public AliAnalysisTaskEmcalJet {
   TH2F                       *fHistNCellsEnergy;         //!Number of cells vs. energy of cluster
   TH2F                       *fHistClusTimeEnergy;       //!Time vs. energy of cluster
   //Jets
-  TH3F                       *fHistJetsPhiEtaPt[4];      //!Phi-Eta-Pt distribution of jets
+  TH2F                       *fHistJetsPhiEta[4];        //!Phi-Eta distribution of jets
   TH1F                       *fHistJetsPtNonBias[4];     //!Non biased inclusive jet pt spectrum
   TH1F                       *fHistJetsPtClus[4];        //!Inclusive jet pt spectrum cluster biased
   TH1F                       *fHistJetsPtTrack[4];       //!Inclusive jet pt spectrum track biased