]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Put trigger jet information to ESD
authorpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 May 2008 14:50:40 +0000 (14:50 +0000)
committerpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 May 2008 14:50:40 +0000 (14:50 +0000)
EMCAL/AliEMCALReconstructor.cxx

index 7708f9a432bd1d5524d7e750ac76d8201413a120..6f7795ae494c3c96fc57784d97ae42478e9fc801 100644 (file)
@@ -27,6 +27,7 @@
 // --- ROOT system ---
 #include <TList.h>
 #include <TClonesArray.h>
+#include <TH2.h>
 
 // --- Standard library ---
 
@@ -262,7 +263,23 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
   //for(int i=0; i<4; i++) printf(" %i %f : ", i, triggerAmplitudes[i]);
   //printf("\n");
   tr.Print("");
-
+  //
+  // Trigger jet staff
+  //
+  if(tr.GetNJetThreshold()>0) {
+    // Jet phi/eta
+    Int_t n0 = triggerPosition.GetSize();
+    const TH2F *hpatch = tr.GetJetMatrixE();
+    triggerPosition.Set(n0 + 2);
+    for(Int_t i=0; i<2; i++) triggerPosition[n0+i] = hpatch->GetMean(i+1);   
+    // Add jet ampitudes
+    n0 = triggerAmplitudes.GetSize();
+    triggerAmplitudes.Set(n0 + tr.GetNJetThreshold());
+    Double_t *ampJet = tr.GetL1JetThresholds();
+    for(Int_t i=0; i<tr.GetNJetThreshold(); i++){
+      triggerAmplitudes[n0 + i] = Float_t(ampJet[i]);
+    }
+  }
   esd->AddEMCALTriggerPosition(triggerPosition);
   esd->AddEMCALTriggerAmplitudes(triggerAmplitudes);
   // Fill trigger hists