added storage of 1D hits histograms for diagnostics
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Aug 2009 09:09:50 +0000 (09:09 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Aug 2009 09:09:50 +0000 (09:09 +0000)
FMD/analysis/AliFMDAnalysisTaskBackgroundCorrection.cxx
FMD/analysis/AliFMDAnalysisTaskDndeta.cxx
FMD/analysis/AliFMDAnalysisTaskSE.cxx

index ee9f956..b9fb176 100644 (file)
@@ -189,8 +189,22 @@ void AliFMDAnalysisTaskBackgroundCorrection::Exec(Option_t */*option*/)
 }
 //_____________________________________________________________________
 void AliFMDAnalysisTaskBackgroundCorrection::Terminate(Option_t */*option*/) {
+  AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
   
+  Int_t nVtxbins = pars->GetNvtxBins();
   
+  for(UShort_t det=1;det<=3;det++) {
+    Int_t nRings = (det==1 ? 1 : 2);
+    for (UShort_t ir = 0; ir < nRings; ir++) {
+      Char_t ringChar = (ir == 0 ? 'I' : 'O');
+      for(Int_t i =0; i<nVtxbins; i++) {
+       TH2F* hHits      = (TH2F*)fOutputList->FindObject(Form("hits_FMD%d%c_vtxbin%d",det,ringChar,i));
+       TH1D* hHitsproj  = hHits->ProjectionX(Form("hits_FMD%d%c_vtxbin%d_proj",det,ringChar,i),1,hHits->GetNbinsY());
+       fHitList->Add(hHitsproj);
+       
+      }
+    }
+  }
 }
 //_____________________________________________________________________
 //
index 934da9b..668d705 100644 (file)
@@ -105,7 +105,7 @@ void AliFMDAnalysisTaskDndeta::CreateOutputObjects()
                              hBg->GetXaxis()->GetXmax(),
                              nSec, 0, 2*TMath::Pi());
            
-           hHits  = new TH1F(Form("hHits_FMD%d%c_vtxbin%d",det,ringChar,i),Form("hHits_FMD%d%c_vtxbin%d",det,ringChar,i),
+           hHits  = new TH1F(Form("hMCHits_FMD%d%c_vtxbin%d",det,ringChar,i),Form("hMCHits_FMD%d%c_vtxbin%d",det,ringChar,i),
                              hBg->GetNbinsX(),
                              hBg->GetXaxis()->GetXmin(),
                              hBg->GetXaxis()->GetXmax());
@@ -274,7 +274,7 @@ void AliFMDAnalysisTaskDndeta::ProcessPrimary() {
          //Double_t x,y,z;
          
          Float_t   eta   = pars->GetEtaFromStrip(det,ring,sec,strip,vertex.At(2));//-1*TMath::Log(TMath::Tan(0.5*theta));
-         TH1F* hHits = (TH1F*)fOutputList->FindObject(Form("hHits_FMD%d%c_vtxbin%d",det,ring,vertexBin));
+         TH1F* hHits = (TH1F*)fOutputList->FindObject(Form("hMCHits_FMD%d%c_vtxbin%d",det,ring,vertexBin));
          hHits->Fill(eta);
          Float_t nstrips = (ring =='O' ? 256 : 512);
          
index 7f5d414..2fc8e55 100644 (file)
@@ -101,6 +101,7 @@ void AliFMDAnalysisTaskSE::UserExec(Option_t */*option*/)
 //_____________________________________________________________________
 void AliFMDAnalysisTaskSE::Terminate(Option_t */*option*/)
 {
+  fBackground.Terminate("");
   fDndeta.Terminate("");
 
 }