put clusters from fast clusterizer in separate branch (don't toch orig
authormverweij <marta.verweij@cern.ch>
Mon, 10 Nov 2014 12:24:03 +0000 (13:24 +0100)
committermverweij <marta.verweij@cern.ch>
Mon, 10 Nov 2014 13:53:40 +0000 (14:53 +0100)
clusters in ESD/AOD)

increase class def

PWG/EMCAL/AliAnalysisTaskEMCALClusterizeFast.cxx
PWG/EMCAL/macros/AddTaskEmcalPreparation.C
PWGJE/EMCALJetTasks/AliAnalysisTaskEmcalJetSample.cxx
PWGJE/EMCALJetTasks/AliAnalysisTaskEmcalJetSample.h
PWGJE/EMCALJetTasks/macros/AddTaskEmcalJetSample.C

index 6a78c61..8bb0f2c 100644 (file)
@@ -245,7 +245,7 @@ void AliAnalysisTaskEMCALClusterizeFast::UserExec(Option_t *)
   if (fDoClusterize)
     Clusterize();
 
-  if (fDoUpdateCells) 
+  if (fDoUpdateCells)
     UpdateCells();
 
   if (!fDoClusterize || (!fAttachClusters && !fOutputAODBranch) || !fCaloClusters)
@@ -256,6 +256,7 @@ void AliAnalysisTaskEMCALClusterizeFast::UserExec(Option_t *)
 
   if (fOutputAODBranch && fCaloClusters != fOutputAODBranch)
     CopyClusters(fCaloClusters, fOutputAODBranch);
+
 }
 
 //________________________________________________________________________
index db3d240..f43b110 100644 (file)
@@ -58,11 +58,12 @@ AliAnalysisTaskSE *AddTaskEmcalPreparation(const char *perstr  = "LHC11h",
   //----------------------- Add clusterizer -------------------------------------------------------
   clusterizer    = AliEMCALRecParam::kClusterizerv2;
   remExoticCell  = kTRUE;
+  TString tmpClusters = "tmpCaloClusters";
   gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/AddTaskClusterizerFast.C");
-  AliAnalysisTaskEMCALClusterizeFast *clusterizerTask = AddTaskClusterizerFast("ClusterizerFast","","",clusterizer,cellthresh,seedthresh,
+  AliAnalysisTaskEMCALClusterizeFast *clusterizerTask = AddTaskClusterizerFast("ClusterizerFast","",tmpClusters.Data(),clusterizer,cellthresh,seedthresh,
                                                                               timeMin,timeMax,timeCut,remExoticCell,distBC,
                                                                               AliAnalysisTaskEMCALClusterizeFast::kFEEData);
-
+  
   //----------------------- Add cluster maker -----------------------------------------------------
   gROOT->LoadMacro("$ALICE_ROOT/PWG/EMCAL/macros/AddTaskEmcalClusterMaker.C"); //cluster maker: non-linearity, 
   UInt_t nonLinFunct = AliEMCALRecoUtils::kBeamTestCorrected;
@@ -73,7 +74,8 @@ AliAnalysisTaskSE *AddTaskEmcalPreparation(const char *perstr  = "LHC11h",
       nonLinFunct = AliEMCALRecoUtils::kPi0MCv3;
   }
   remExoticClus  = kTRUE;
-  AliEmcalClusterMaker *clusMaker = AddTaskEmcalClusterMaker(nonLinFunct,remExoticClus,0,"EmcCaloClusters",0.,kTRUE);
+  AliEmcalClusterMaker *clusMaker = AddTaskEmcalClusterMaker(nonLinFunct,remExoticClus,tmpClusters.Data(),"EmcCaloClusters",0.,kTRUE);
   
   return clusterizerTask;
+  
 }
index c4ee78c..503bd06 100644 (file)
@@ -39,6 +39,8 @@ AliAnalysisTaskEmcalJetSample::AliAnalysisTaskEmcalJetSample() :
   fHistJetsCorrPtArea(0),
   fHistPtDEtaDPhiTrackClus(0),
   fHistPtDEtaDPhiClusTrack(0),
+  fHistClustDx(0),
+  fHistClustDz(0),
   fJetsCont(0),
   fTracksCont(0),
   fCaloClustersCont(0)
@@ -79,6 +81,8 @@ AliAnalysisTaskEmcalJetSample::AliAnalysisTaskEmcalJetSample(const char *name) :
   fHistJetsCorrPtArea(0),
   fHistPtDEtaDPhiTrackClus(0),
   fHistPtDEtaDPhiClusTrack(0),
+  fHistClustDx(0),
+  fHistClustDz(0),
   fJetsCont(0),
   fTracksCont(0),
   fCaloClustersCont(0)
@@ -200,6 +204,12 @@ void AliAnalysisTaskEmcalJetSample::UserCreateOutputObjects()
   fHistPtDEtaDPhiClusTrack = new TH3F(histname.Data(),Form("%s;#it{p}_{T}^{clus};#Delta#eta;#Delta#varphi",histname.Data()),100,0.,100.,100,-0.1,0.1,100,-0.1,0.1);
   fOutput->Add(fHistPtDEtaDPhiClusTrack);
 
+  fHistClustDx = new TH1F("fHistClustDx","fHistClustDx;Dx",1000,0.,1.);
+  fOutput->Add(fHistClustDx);
+
+  fHistClustDz = new TH1F("fHistClustDz","fHistClustDz;Dz",1000,0.,1.);
+  fOutput->Add(fHistClustDz);
+
   PostData(1, fOutput); // Post data for ALL output slots > 0 here.
 }
 
@@ -215,14 +225,17 @@ Bool_t AliAnalysisTaskEmcalJetSample::FillHistograms()
       track = static_cast<AliVTrack*>(fTracksCont->GetNextAcceptParticle());
     }
   }
-  
+
   if (fCaloClustersCont) {
     AliVCluster *cluster = fCaloClustersCont->GetNextAcceptCluster(0); 
     while(cluster) {
       TLorentzVector nPart;
       cluster->GetMomentum(nPart, fVertex);
       fHistClustersPt[fCentBin]->Fill(nPart.Pt());
-
+      Double_t dx = cluster->GetTrackDx();
+      Double_t dz = cluster->GetTrackDz();
+      fHistClustDx->Fill(dx);
+      fHistClustDz->Fill(dz);
       cluster = fCaloClustersCont->GetNextAcceptCluster();
     }
   }
index bd759de..bd8c030 100644 (file)
@@ -39,6 +39,9 @@ class AliAnalysisTaskEmcalJetSample : public AliAnalysisTaskEmcalJet {
   TH3                        *fHistPtDEtaDPhiTrackClus; //!track pt, delta eta, delta phi to matched cluster
   TH3                        *fHistPtDEtaDPhiClusTrack; //!cluster pt, delta eta, delta phi to matched track
 
+  TH1                        *fHistClustDx; //!
+  TH1                        *fHistClustDz; //!
+
   AliJetContainer            *fJetsCont;                   //!Jets
   AliParticleContainer       *fTracksCont;                 //!Tracks
   AliClusterContainer        *fCaloClustersCont;           //!Clusters  
@@ -47,6 +50,6 @@ class AliAnalysisTaskEmcalJetSample : public AliAnalysisTaskEmcalJet {
   AliAnalysisTaskEmcalJetSample(const AliAnalysisTaskEmcalJetSample&);            // not implemented
   AliAnalysisTaskEmcalJetSample &operator=(const AliAnalysisTaskEmcalJetSample&); // not implemented
 
-  ClassDef(AliAnalysisTaskEmcalJetSample, 3) // jet sample analysis task
+  ClassDef(AliAnalysisTaskEmcalJetSample, 4) // jet sample analysis task
 };
 #endif
index ef38d39..9ff33d5 100644 (file)
@@ -56,7 +56,7 @@ AliAnalysisTaskEmcalJetSample* AddTaskEmcalJetSample(
   jetTask->SetNCentBins(nCentBins);
 
   AliParticleContainer *trackCont  = jetTask->AddParticleContainer(ntracks);
-  trackCont->SetClassName("AliVTrack");
+  if(trackCont) trackCont->SetClassName("AliVTrack");
   AliClusterContainer *clusterCont = jetTask->AddClusterContainer(nclusters);
 
   TString strType(type);