Updated QA (Sylwester)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 12 Apr 2008 14:06:38 +0000 (14:06 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 12 Apr 2008 14:06:38 +0000 (14:06 +0000)
27 files changed:
TRD/AliTRDQADataMakerRec.cxx
TRD/Macros/AliTRDanalyzeBlackEventsLHC.C
TRD/TRDbaseLinkDef.h
TRD/TRDguiLinkDef.h
TRD/TRDqaAnalysisLinkDef.h
TRD/TRDrecLinkDef.h
TRD/libTRDbase.pkg
TRD/libTRDgui.pkg
TRD/libTRDqaAnalysis.pkg
TRD/libTRDrec.pkg
TRD/qaAnalysis/AliTRDqaAT.cxx
TRD/qaAnalysis/AliTRDqaAT.h
TRD/qaAnalysis/AliTRDqaElectronSpectra.cxx
TRD/qaAnalysis/AliTRDqaEnergyDeposit.cxx
TRD/qaAnalysis/AliTRDqaEnergyDeposit.h
TRD/qaAnalysis/AliTRDqaJPsi.cxx [new file with mode: 0644]
TRD/qaAnalysis/AliTRDqaJPsi.h [new file with mode: 0644]
TRD/qaAnalysis/runTRDqaAnalysis.C
TRD/qaGui/AliTRDqaGuiClustersSM.cxx
TRD/qaGui/AliTRDqaGuiEnergyDeposit.cxx [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiEnergyDeposit.h [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiJPsi.cxx [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiJPsi.h [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiMainAnalysis.cxx [new file with mode: 0644]
TRD/qaGui/AliTRDqaGuiMainAnalysis.h [new file with mode: 0644]
TRD/qaGui/testQAGuiAnalysis.C [new file with mode: 0644]
TRD/qaGui/testQAGuiBlack.C

index 2bf8daa..c3c4af3 100644 (file)
@@ -312,22 +312,24 @@ void AliTRDQADataMakerRec::InitESDs()
   const char *zoneName[4] = {"total charge", "ampilification range", "plateau", "TR range"};
  
   // prepare the scale from 0.1 to 10 GeV
-  Double_t scalex[101];
-  Double_t dd = (TMath::Log(10) - TMath::Log(0.5)) / 100.;
-  for(Int_t ix=0; ix<101; ix++) {
+  const Int_t nscalex= 50;
+  Double_t scalex[nscalex+1];
+  Double_t dd = (TMath::Log(10) - TMath::Log(0.5)) / nscalex;
+  for(Int_t ix=0; ix<nscalex+1; ix++) {
     scalex[ix] = 0.5 * TMath::Exp(dd * ix);
   }
 
-  Double_t scaley[101];
-  for(Int_t iy=0; iy<101; iy++) {
-    scaley[iy] = iy * (3e3/100.);
+  const Int_t nscaley = 50;
+  Double_t scaley[nscaley+1];
+  for(Int_t iy=0; iy<nscaley+1; iy++) {
+    scaley[iy] = iy * (3e3/nscaley);
   }
     
 
   for(Int_t i=0; i<4; i++) {
     hist[41+i] = new TH2D(Form("qaTRD_esd_signalPzone_%d",i), 
                          Form("%s;momentum (GeV/c);singal (a.u.)", zoneName[i]),
-                         100, scalex, 100, scaley);
+                         nscalex, scalex, nscaley, scaley);
   }
 
   for(Int_t i=0; i<kNhist; i++) {
index 0535581..64367f1 100644 (file)
@@ -13,6 +13,7 @@ void AliTRDanalyzeBlackEventsLHC(const char *filename) {
   AliTRDrawStreamTB::DisableStackNumberChecker();
   AliTRDrawStreamTB::DisableStackLinkNumberChecker();
   AliTRDrawStreamTB::DisableSkipData();
+  
 
   AliTRDrawStreamTB *raw = new AliTRDrawStreamTB(reader); 
   //raw->Init();
index be44d85..40edb6a 100644 (file)
@@ -57,7 +57,6 @@
 #pragma link C++ class  AliTRDalignment+;
 
 #pragma link C++ class  AliTRDQAChecker+;
-#pragma link C++ class  AliTRDqaBlackEvents+;
 
 #pragma link C++ class  AliTRDCalibraFillHisto+;
 #pragma link C++ class  AliTRDCalibraFit+;
index c566b64..acab17e 100644 (file)
@@ -15,4 +15,9 @@
 #pragma link C++ class AliTRDqaGuiBlackSM+;
 #pragma link C++ class AliTRDqaGuiBlackChamber+;
 
+#pragma link C++ class AliTRDqaGuiMainAnalysis+;
+#pragma link C++ class AliTRDqaGuiJPsi+;
+#pragma link C++ class AliTRDqaGuiEnergyDeposit+;
+
+
 #endif
index 0f81ccf..975e8d4 100644 (file)
@@ -11,6 +11,7 @@
 #pragma link C++ class  AliTRDqaElectronSpectra+;
 #pragma link C++ class  AliTRDqaESDFriends+;
 #pragma link C++ class  AliTRDqaEnergyDeposit+;
+#pragma link C++ class  AliTRDqaJPsi+;
 #pragma link C++ class  AliTRDqaAT+;
 
 #endif
index 2e19f43..07686a0 100644 (file)
@@ -31,6 +31,7 @@
 #pragma link C++ class  AliTRDtrackingChamber+;
 #pragma link C++ class  AliTRDchamberTimeBin+;
 
+#pragma link C++ class  AliTRDqaBlackEvents+;
 #pragma link C++ class  AliTRDQADataMakerRec+;
 #pragma link C++ class  AliTRDtrackingAnalysis+;
 
index 7d69de8..4321ce1 100644 (file)
@@ -41,7 +41,6 @@ SRCS= AliTRDarrayI.cxx \
       AliTRDCalibraVdriftLinearFit.cxx \
       AliTRDCalibPadStatus.cxx \
       AliTRDQAChecker.cxx \
-      AliTRDqaBlackEvents.cxx \
       AliTRDPreprocessor.cxx \
       AliTRDDataDCS.cxx \
       AliTRDSensor.cxx \
index 9629c02..b826f72 100644 (file)
@@ -5,7 +5,10 @@ SRCS= qaGui/AliTRDqaGuiMain.cxx \
       qaGui/AliTRDqaGuiESDs.cxx \
       qaGui/AliTRDqaGuiMainBlack.cxx \
       qaGui/AliTRDqaGuiBlackSM.cxx \
-      qaGui/AliTRDqaGuiBlackChamber.cxx
+      qaGui/AliTRDqaGuiBlackChamber.cxx \
+      qaGui/AliTRDqaGuiJPsi.cxx \
+      qaGui/AliTRDqaGuiEnergyDeposit.cxx \
+      qaGui/AliTRDqaGuiMainAnalysis.cxx 
 
 HDRS= $(SRCS:.cxx=.h)
 
index 3c881e9..a56ba41 100644 (file)
@@ -1,7 +1,8 @@
 SRCS= qaAnalysis/AliTRDqaElectronSpectra.cxx \
       qaAnalysis/AliTRDqaESDFriends.cxx \
       qaAnalysis/AliTRDqaEnergyDeposit.cxx \
-      qaAnalysis/AliTRDqaAT.cxx
+      qaAnalysis/AliTRDqaJPsi.cxx \
+      qaAnalysis/AliTRDqaAT.cxx 
 
 HDRS= $(SRCS:.cxx=.h)
 
index 0490862..64ba622 100644 (file)
@@ -17,7 +17,8 @@ SRCS= AliTRDcluster.cxx \
       AliTRDtrackingSector.cxx \
       AliTRDtrackingChamber.cxx \
       AliTRDchamberTimeBin.cxx \
-      AliTRDQADataMakerRec.cxx
+      AliTRDQADataMakerRec.cxx \
+      AliTRDqaBlackEvents.cxx
 
 HDRS= $(SRCS:.cxx=.h)
 
index 29c3b94..98ff061 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "TMath.h"
 #include "TH1D.h"
+#include "AliPID.h"
+#include "AliESDtrack.h"
 #include "AliExternalTrackParam.h"
 
 //______________________________________________________________________________
@@ -99,3 +101,48 @@ void AliTRDqaAT::BuildRatio(TH1D *ratio, TH1D *histN, TH1D*histD) {
   ratio->SetMarkerStyle(20);
 }
 //__________________________________________________________________________
+
+void AliTRDqaAT::FillStatus(TH1D *fStatusHist, UInt_t status) {
+
+  UInt_t u = 1;
+  //UInt_t status = track->GetStatus();
+  for(Int_t bit=0; bit<32; bit++) 
+    if (u<<bit & status) fStatusHist->Fill(bit);
+}
+
+//__________________________________________________________________________
+
+void AliTRDqaAT::PrintPID(const AliESDtrack *track) {
+
+  Int_t id = AliPID::kElectron;
+  Double_t pidESD[5], pidITS[5], pidTPC[5], pidTRD[5];
+  
+  track->GetESDpid(pidESD);
+  track->GetITSpid(pidITS);
+  track->GetTPCpid(pidTPC);
+  track->GetTRDpid(pidTRD);
+  //track->GetTOFpid(pidTOF);
+  
+  Double_t comb = pidITS[id] * pidTPC[id] * pidTRD[id];
+
+  Double_t normTot = 0;
+  Double_t norm[5] = {0,0,0,0,0};
+  for(Int_t i=0; i<5; i++) {
+    norm[i] = pidITS[i] * pidTPC[i] * pidTRD[i];
+    normTot += norm[i];
+  }
+  
+  Double_t trdTot = 0;
+  for(Int_t i=0; i<AliPID::kSPECIES; i++) trdTot += pidTRD[i];
+    
+
+  //  comb /= norm;
+  
+  printf("%.3f | %.3f %.3f | %.3f %.3f %.3f | ",
+        pidESD[id], comb, normTot, pidITS[id], pidTPC[id], pidTRD[id]);
+
+  for(Int_t i=0; i<5; i++) printf("%.2f:%.2f:%.2f | ", pidITS[i], pidTPC[i], pidTRD[i]);
+  printf("| %.3f |\n", trdTot);
+}
+
+//__________________________________________________________________________
index a9d82bd..ef1683f 100644 (file)
@@ -17,6 +17,7 @@
 #include "AliAnalysisTask.h"  
 
 class TH1D; 
+class AliESDtrack;
 class AliExternalTrackParam;
 
 class AliTRDqaAT : public TObject {
@@ -29,6 +30,9 @@ class AliTRDqaAT : public TObject {
   static Int_t GetSector(const Double_t alpha);
   static Int_t GetStack(const AliExternalTrackParam *paramOut);
   static void  BuildRatio(TH1D *ratio, TH1D *histN, TH1D *histD);
+  static void  FillStatus(TH1D *fStatusHist, UInt_t status);
+
+  static void  PrintPID(const AliESDtrack *track);
 
   ClassDef(AliTRDqaAT, 0); // TRD analysis tools
 };
index d953f00..4ea7bfb 100644 (file)
@@ -193,7 +193,7 @@ void AliTRDqaElectronSpectra::Exec(Option_t *)
 {
   // Process one event
   Long64_t entry = fChain->GetReadEntry() ;
-  if (!(entry%10)) Info("Exec", "Entry = %ld", entry);
+  if (!(entry%100)) Info("Exec", "Entry = %ld", entry);
 
   // Processing of one event 
    
index aab5749..fbe931f 100644 (file)
@@ -1,3 +1,4 @@
+
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -120,9 +121,16 @@ void AliTRDqaEnergyDeposit::CreateOutputObjects()
 
     for(Int_t j=0; j<AliPID::kSPECIES; j++) {
       Int_t idx = AliPID::kSPECIES*i+j;
+
+      //
       fSignalPtType[idx] = 
        new TH2D(Form("ptSig%s%d", charge[i], j), title, knbinsx, scalex, knbinsy, scaley);
       fOutputContainer->AddAt(fSignalPtType[idx], c++);
+
+      //
+      fSignalPtPure[idx] = 
+       new TH2D(Form("ptSigPure%s%d", charge[i], j), title, knbinsx, scalex, knbinsy, scaley);
+      fOutputContainer->AddAt(fSignalPtPure[idx], c++);
       
       fProb[idx] = new TH1D(Form("prob%s%d", charge[i], j), ";LQ", 100, 0, 1);
       fOutputContainer->AddAt(fProb[idx], c++);
@@ -187,7 +195,7 @@ void AliTRDqaEnergyDeposit::Exec(Option_t *)
       
       Double_t lq = track->GetTRDpid(i);
       fProb[AliPID::kSPECIES*idx+i]->Fill(lq);
-      fSignalPtType[AliPID::kSPECIES*idx+i]->Fill(pt, signal, lq);
+      if (lq > 0.8) fSignalPtType[AliPID::kSPECIES*idx+i]->Fill(pt, signal);
     }
   }
 
@@ -195,6 +203,13 @@ void AliTRDqaEnergyDeposit::Exec(Option_t *)
 }
 
 //______________________________________________________________________________
+void AliTRDqaEnergyDeposit::FillElectrons() {
+
+  
+
+}
+
+//______________________________________________________________________________
 void AliTRDqaEnergyDeposit::Terminate(Option_t *)
 {
   // retrieve histograms
index 48229af..148d626 100644 (file)
@@ -52,6 +52,13 @@ protected:
   TH1D *fProb[2*5];           // probabilities
   //TH2D *fSignalPtChamber[2*540];
 
-   ClassDef(AliTRDqaEnergyDeposit, 0); // a TRD analysis task 
+  TH2D *fSignalPtPure[2*5];   // dedx for a clean sample 
+
+  void FillElectrons();
+  void FillPions() {}
+  void FillKaons() {}
+  void FillProtons() {}
+
+  ClassDef(AliTRDqaEnergyDeposit, 0); // a TRD analysis task 
 };
 #endif // ALITRDQAENERGYDEPOSIT_H
diff --git a/TRD/qaAnalysis/AliTRDqaJPsi.cxx b/TRD/qaAnalysis/AliTRDqaJPsi.cxx
new file mode 100644 (file)
index 0000000..0a6e26e
--- /dev/null
@@ -0,0 +1,322 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as iLs" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+//
+// This class is a part of a package of high level QA monitoring for TRD.
+//
+// S. Radomski
+// radomski@physi.uni-heidelberg.de
+// March 2008
+//
+
+#include "AliTRDqaJPsi.h"
+#include "AliTRDqaAT.h"
+
+#include "TFile.h"
+#include "TH1D.h"
+#include "TH2D.h"
+#include "TChain.h"
+
+#include "AliESDEvent.h" 
+#include "AliESDtrack.h"
+#include "AliKFParticle.h"
+
+#include "TLorentzVector.h"
+
+//const AliTRDqaJPsi::knSteps = 5;
+
+//______________________________________________________________________________
+
+AliTRDqaJPsi::AliTRDqaJPsi() 
+  : AliAnalysisTask("",""),  
+    fChain(0),
+    fESD(0),
+    fOutputContainer(0),
+    fnKFtracks(0)
+{
+  //
+  // default dummy constructor
+  //
+}
+//______________________________________________________________________________
+
+AliTRDqaJPsi:: AliTRDqaJPsi(AliTRDqaJPsi& /*trd*/)
+  : AliAnalysisTask("",""),  
+    fChain(0),
+    fESD(0),
+    fOutputContainer(0),
+    fnKFtracks(0)
+{
+  //
+  // Dummy copy constructor
+  //
+
+  //return *this;
+}
+
+
+//______________________________________________________________________________
+AliTRDqaJPsi::AliTRDqaJPsi(const char *name) 
+  : AliAnalysisTask(name,""),  
+    fChain(0),
+    fESD(0),
+    fOutputContainer(0),
+    fnKFtracks(0)
+    
+{
+  // Constructor.
+  // Input slot #0 works with an Ntuple
+  DefineInput(0, TChain::Class());
+  // Output slot #0 writes into a TH1 container
+  DefineOutput(0,  TObjArray::Class()) ; 
+}
+
+//______________________________________________________________________________
+void AliTRDqaJPsi::ConnectInputData(const Option_t *)
+{
+  // Initialisation of branch container and histograms 
+
+  //AliInfo(Form("*** Initialization of %s", GetName())) ; 
+
+  fChain = (TChain*)GetInputData(0);
+  fESD = new AliESDEvent();
+  fESD->ReadFromTree(fChain);
+}
+
+//________________________________________________________________________
+void AliTRDqaJPsi::CreateOutputObjects()
+{
+  
+  Int_t c = 0;
+  fOutputContainer = new TObjArray(100);
+  
+  const char *charge[2] = {"Neg", "Pos"};
+  
+  // build histograms
+  
+  for(Int_t i=0; i<knSteps; i++) {
+
+    fStatus[i] = new TH1D(Form("status_%d", i), "status", 32, -0.5, 31.5);
+    fOutputContainer->AddAt(fStatus[i], c++);
+    
+    fInvMass[i] = new TH1D(Form("mass_%d", i), ";m_{inv} (GeV);", 100, 0, 5);
+    fOutputContainer->AddAt(fInvMass[i], c++);
+    
+    fInvMassVec[i] = new TH1D(Form("massVec_%d", i), ";m_{inv} (GeV);", 100, 0, 5);
+    fOutputContainer->AddAt(fInvMassVec[i], c++);
+    
+    fInvMassDiff[i] = new TH1D(Form("massDiff_%d", i), ";m_{inv} (GeV);", 100, -1, 1);
+    fOutputContainer->AddAt(fInvMassDiff[i], c++);
+    
+    fAngleSM[i] = new TH1D(Form("angleSM_%d", i), ";#delta SM", 19, -0.5, 18.5);       
+    fOutputContainer->AddAt(fAngleSM[i], c++);
+    
+    fPtAngle[i] = new TH2D(Form("ptAngle_%d", i), ";p_{T} (GeV/c);#delta SM",
+                          20, 0, 5, 10, -0.5, 9.5);
+    fOutputContainer->AddAt(fPtAngle[i], c++);
+    
+
+    for(Int_t j=0; j<2; j++) {
+      fnTracks[j*knSteps+i] = 
+       new TH1D(Form("nTracks%s_%d", charge[j],i), Form("%s;number of tracks",charge[j]), 100, -0.5, 99.5);
+      fPt[j*knSteps+i] = new TH1D(Form("pt%s_%d", charge[j], i), Form("%s;p_{T} (GeV/c)", charge[j]), 100, 0, 5);
+      fPID[j*knSteps+i] = new TH1D(Form("pid%s_%d", charge[j], i), ";electron LQ", 100, 0, 1);
+
+      fOutputContainer->AddAt(fnTracks[j*knSteps+i], c++);
+      fOutputContainer->AddAt(fPt[j*knSteps+i], c++); 
+      fOutputContainer->AddAt(fPID[j*knSteps+i], c++); 
+    }
+  }
+
+  //TH2D *fnGoodTracks;  
+
+  printf("n hist = %d\n", c);
+}
+//______________________________________________________________________________
+void AliTRDqaJPsi::Exec(Option_t *) 
+{
+  /*
+    Selection steps:
+    - Parameters In and Out
+    - TRDrefit bit
+    - TRDpid and quality
+    - pt > 0.8 GeV/c
+    - PID > 0.9
+   */
+
+
+  // Process one event
+  Long64_t entry = fChain->GetReadEntry() ;
+  if (!(entry%100)) Info("Exec", "Entry = %ld", entry);
+
+  // Processing of one event 
+   
+  if (!fESD) {
+    //AliError("fESD is not connected to the input!") ; 
+    return ; 
+  }
+  
+  
+  Int_t nTracks = fESD->GetNumberOfTracks();
+  Int_t cTracks[2*knSteps] = {0,0,0,0,0,0,0,0,0,0};
+  fnKFtracks = 0;
+
+  // track loop
+  for(Int_t i=0; i<nTracks; i++) {
+    
+    //
+    // track selection 
+    //
+    // param in and Out
+    // TRDrefit and TRDPid bit
+    //
+    AliESDtrack *track = fESD->GetTrack(i);
+    const AliExternalTrackParam *paramOut = track->GetOuterParam();
+    const AliExternalTrackParam *paramIn = track->GetInnerParam();
+
+    // long track ..
+    if (!paramIn) continue;
+    if (!paramOut) continue;
+
+    Int_t step    = 0;
+    Int_t charge  = (track->Charge() > 0) ? 1 : 0;
+    UInt_t status = track->GetStatus();
+    Double_t pt   = track->Pt();
+    Double_t pid  = track->GetTRDpid(AliPID::kElectron);
+    
+    Double_t esdPid[5];
+    track->GetESDpid(esdPid); 
+
+    // create a kalman particle
+    Int_t pdg = (charge == 0)? -11 : 11;
+    for(Int_t k=0; k<knSteps; k++) fInSample[fnKFtracks][k] = 0;  
+    vec[fnKFtracks] = CreateVector(track);
+    tracks[fnKFtracks] = new AliKFParticle(*track, pdg);
+    fSM[fnKFtracks] = AliTRDqaAT::GetSector(paramOut->GetAlpha());
+    fnKFtracks++;
+
+    //AliTRDqaAT::PrintPID(track);
+
+    // apply the cuts
+
+    cTracks[knSteps *charge + step]++;
+    FillHist(track, step++);
+
+    if (!(status & AliESDtrack::kTRDrefit)) continue;
+
+    cTracks[knSteps *charge + step]++;    
+    FillHist(track, step++);    
+
+    if (!(status & AliESDtrack::kTRDpid)) continue;
+    if (track->GetTRDpidQuality() < 6) continue;
+
+    cTracks[knSteps *charge + step]++;
+    FillHist(track, step++);  
+
+    if (pt < 0.8) continue;
+
+    cTracks[knSteps *charge + step]++;
+    FillHist(track, step++);      
+
+    if (pid < 0.3) continue; // 
+    //if (esdPid[AliPID::kElectron] < 0.5) continue;
+    
+    cTracks[knSteps *charge + step]++;
+    FillHist(track, step);  
+
+    for(Int_t k=0; k<2*knSteps; k++) fnTracks[k]->Fill(cTracks[k]);
+  }
+
+  // calculate invariant mass
+
+  for(Int_t k=0; k<knSteps; k++) {
+    for(Int_t i=0; i<fnKFtracks; i++) {
+      if (!fInSample[i][k]) continue;
+      for(Int_t j=i+1; j<fnKFtracks; j++) {
+       if (!fInSample[j][k]) continue;
+       AliKFParticle jpsi(*(tracks[i]), *(tracks[j]));
+       TLorentzVector jpsiVec = (*(vec[i])) + (*vec[j]);
+       fInvMass[k]->Fill(jpsi.GetMass());
+       fInvMassVec[k]->Fill(jpsiVec.M());
+       fInvMassDiff[k]->Fill(jpsiVec.M() - jpsi.GetMass());
+       
+       if (jpsi.GetMass() > 2.5 && jpsi.GetMass() < 3.5) {
+         Int_t dSM = TMath::Abs(fSM[i] - fSM[j]);
+         if (dSM > 9) dSM = (18-dSM);
+         fAngleSM[k]->Fill(dSM);
+         fPtAngle[k]->Fill(TMath::Hypot(jpsi.GetPx(), jpsi.GetPy()), dSM);
+       }
+       
+      }
+    }
+  }
+
+  PostData(0, fOutputContainer);
+}
+
+//______________________________________________________________________________
+void AliTRDqaJPsi::Terminate(Option_t *)
+{
+  // save histograms
+  fOutputContainer = (TObjArray*)GetOutputData(0);
+  
+  TFile *file = new TFile("outJPsi.root", "RECREATE");
+  fOutputContainer->Write();
+  
+  file->Flush();
+  file->Close();
+  delete file;  
+
+  //for(Int_t i=0; i<fOutputContainer->GetEntries(); i++) {
+  //  TObject *obj = fOu
+  // }
+}
+
+//______________________________________________________________________________
+
+void AliTRDqaJPsi::FillHist(AliESDtrack *track, Int_t step) {
+
+  Int_t charge  = (track->Charge() > 0) ? 1 : 0;
+  UInt_t status = track->GetStatus();
+  Double_t pt   = track->Pt();
+  Double_t pid  = track->GetTRDpid(AliPID::kElectron);
+  
+  Double_t esdPid[5];
+  track->GetESDpid(esdPid);
+
+  Int_t id = charge * knSteps + step;
+  AliTRDqaAT::FillStatus(fStatus[step], status);
+  fPt[id]->Fill(pt);
+  fPID[id]->Fill(pid);
+  //fPID[id]->Fill(esdPid[AliPID::kElectron]);
+
+  fInSample[fnKFtracks-1][step] = 1;
+}
+
+//______________________________________________________________________________
+
+TLorentzVector *AliTRDqaJPsi::CreateVector(AliESDtrack *track) {
+
+  TLorentzVector *vec = new TLorentzVector();
+  vec->SetXYZM(track->Px(), track->Py(), track->Pz(), 0);
+  return vec;
+}
+
+//______________________________________________________________________________
diff --git a/TRD/qaAnalysis/AliTRDqaJPsi.h b/TRD/qaAnalysis/AliTRDqaJPsi.h
new file mode 100644 (file)
index 0000000..8d8619a
--- /dev/null
@@ -0,0 +1,78 @@
+#ifndef ALITRDQAJPSI_H
+#define ALITRDQAJPSI_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice     */
+
+//
+// This class is a part of a package of high level QA monitoring for TRD.
+//
+// S. Radomski
+// radomski@physi.uni-heidelberg.de
+// March 2008
+//
+
+#include "AliAnalysisTask.h"  
+
+class TTree; 
+class AliESDEvent; 
+class AliESDtrack;
+class TH1D; 
+class TH2D;
+class AliExternalTrackParam;
+class AliKFParticle;
+class TLorentzVector;
+
+class AliTRDqaJPsi : public AliAnalysisTask {
+
+ public:
+
+  AliTRDqaJPsi();
+  AliTRDqaJPsi(const char *name);
+  AliTRDqaJPsi(AliTRDqaJPsi& trd);
+  AliTRDqaJPsi& operator = (const AliTRDqaJPsi& /*g*/) { return *this; };
+  virtual ~AliTRDqaJPsi() {}
+   
+  virtual void Exec(Option_t * opt = "");
+  virtual void ConnectInputData(Option_t *);
+  virtual void CreateOutputObjects();
+  virtual void Terminate(Option_t * opt = "");
+
+ private:
+  TTree        * fChain;             //!pointer to the analyzed TTree or TChain
+  AliESDEvent  * fESD;               //! Declaration of leave types
+
+  TObjArray * fOutputContainer; //! output data container
+  
+  // histograms
+
+  static const Int_t knSteps = 5;   // number of analysis steps (arbitrary)
+
+  TH1D *fStatus[knSteps];      // track status
+  TH1D *fnTracks[2*knSteps];   // number of tracks
+  TH1D *fPt[2*knSteps];        // transverse momentum
+  TH1D *fPID[2*knSteps];       // PID LQ
+  TH1D *fAngleSM[knSteps];     // difference in SM ID
+  
+  //TH2D *fnGoodTracks;          // correlation of the final number of Pos and Neg tracks
+  TH1D *fInvMass[knSteps];       // invariant mass using different cuts
+  TH1D *fInvMassVec[knSteps];    //
+  TH1D *fInvMassDiff[knSteps];   //
+
+  TH2D *fPtAngle[knSteps];
+
+  // tracks
+  AliKFParticle *tracks[1000];
+  TLorentzVector *vec[1000];
+  Int_t fInSample[1000][knSteps];
+  Int_t fSM[1000];
+  Int_t fnKFtracks; //[2];
+  
+  // helper functions
+  void FillHist(AliESDtrack *track, Int_t step);
+  TLorentzVector *CreateVector(AliESDtrack *track);
+
+
+  ClassDef(AliTRDqaJPsi, 0); // a TRD analysis task 
+};
+#endif // ALITRDQAJPSI_H
index 0b66d27..29b0dea 100644 (file)
@@ -29,12 +29,13 @@ void runTRDqaAnalysis(const char *chainName, int limit = 0) {
   
   // Create an analysis manager
   AliAnalysisManager *mgr = new AliAnalysisManager("qaTasks", "No safety");
-  AliAnalysisTask *tasks[3];
-  AliAnalysisDataContainer *out[3];
+  AliAnalysisTask *tasks[4];
+  AliAnalysisDataContainer *out[4];
 
   tasks[0] = new AliTRDqaElectronSpectra("trdElectronSpectra");
   tasks[1] = new AliTRDqaESDFriends("trdESDFriends");
   tasks[2] = new AliTRDqaEnergyDeposit("trdEnergyDeposit");
+  tasks[3] = new AliTRDqaJPsi("trdJPsi");
   
   AliAnalysisDataContainer *cinput = 
     mgr->CreateContainer("inputESD", TTree::Class(), AliAnalysisManager::kInputContainer);
@@ -42,9 +43,10 @@ void runTRDqaAnalysis(const char *chainName, int limit = 0) {
   out[0] = mgr->CreateContainer("oES", TObjArray::Class(), AliAnalysisManager::kOutputContainer);
   out[1] = mgr->CreateContainer("oEF", TObjArray::Class(), AliAnalysisManager::kOutputContainer);
   out[2] = mgr->CreateContainer("oED", TObjArray::Class(), AliAnalysisManager::kOutputContainer);
+  out[3] = mgr->CreateContainer("oEJ", TObjArray::Class(), AliAnalysisManager::kOutputContainer);  
 
   // register
-  for(int i=0; i<3; i++) {
+  for(int i=0; i<4; i++) {
     mgr->AddTask(tasks[i]);
     mgr->ConnectInput(tasks[i],0,cinput);
     mgr->ConnectOutput(tasks[i],0,out[i]);
index a5ca752..33ae020 100644 (file)
@@ -116,8 +116,8 @@ AliTRDqaGuiClustersSM::AliTRDqaGuiClustersSM(TGWindow *parent)
 
   fNameList[0] = "sigTimeShape";
   fNameList[1] = "sigTime";
-  fNameList[2] = "nCls";
-  fNameList[3] = "totalCharge";
+  fNameList[2] = "totalCharge";
+  fNameList[3] = "nCls";
 
   for(Int_t i=0; i<4; i++) {
     fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i], fGCanvas, 480, 300);
diff --git a/TRD/qaGui/AliTRDqaGuiEnergyDeposit.cxx b/TRD/qaGui/AliTRDqaGuiEnergyDeposit.cxx
new file mode 100644 (file)
index 0000000..50c49e0
--- /dev/null
@@ -0,0 +1,174 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+//
+// S. Radomski 
+// Uni-Heidelberg
+// April 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDqaGuiEnergyDeposit.h"
+
+#include "TH1D.h"
+#include "TFile.h"
+#include "TCanvas.h"
+#include "TString.h"
+#include "TSystem.h"
+
+#include "TGLabel.h"
+#include "TGComboBox.h"
+#include "TGButton.h"
+#include "TRootEmbeddedCanvas.h"
+
+ClassImp(AliTRDqaGuiEnergyDeposit)
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiEnergyDeposit::AliTRDqaGuiEnergyDeposit() 
+  : fIdx(0),
+    fGPanel(0),
+    fGCanvas(0),
+    fGSelect(0),
+    fGPrev(0),
+    fGNext(0)
+{
+  
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiEnergyDeposit::AliTRDqaGuiEnergyDeposit(TGWindow *parent) 
+  : TGCompositeFrame(parent, 720, 500),
+    fIdx(0),
+    fGPanel(0),
+    fGCanvas(0),
+    fGSelect(0),
+    fGPrev(0),
+    fGNext(0)
+{
+  //
+  // Main constructor
+  //
+  
+  fIdx = 0;
+  
+  // steering panel 
+  
+  SetLayoutManager(new TGVerticalLayout(this));
+
+  fGPanel = new TGHorizontalFrame(this);
+
+  // fGLabel = new TGLabel(fGPanel, "Current Type: ");
+  fGPrev = new TGTextButton(fGPanel, "Prev Type");
+  fGNext = new TGTextButton(fGPanel, "Next Type");
+
+  const char *types[5] = {"electron", "muon", "pion", "kaon", "proton"};
+  fGSelect = new TGComboBox(fGPanel);
+  for(int i=0; i<5; i++) fGSelect->AddEntry(types[i], i); //Form("Type %d", i), i);
+  fGSelect->Resize(100, fGPrev->GetHeight());
+  fGSelect->Select(fIdx);
+  
+  TGLayoutHints *hint = new TGLayoutHints(kLHintsNormal, 5, 5, 5, 5);
+  
+  // fGPanel->AddFrame(fGLabel, hint);
+  fGPanel->AddFrame(fGPrev, hint);
+  fGPanel->AddFrame(fGSelect, hint);
+  fGPanel->AddFrame(fGNext, hint);
+
+  AddFrame(fGPanel);
+
+  // panel logic
+  fGPrev->Connect("Clicked()", "AliTRDqaGuiEnergyDeposit", this, "PreviusType()");
+  fGNext->Connect("Clicked()", "AliTRDqaGuiEnergyDeposit", this, "NextType()");
+  fGSelect->Connect("Selected(Int_t", "AliTRDqaGuiEnergyDeposit", this, "SelectType(Int_t)");
+  // histograms
+  /**/
+  fGCanvas = new TGCompositeFrame(this);
+  fGCanvas->SetLayoutManager(new TGMatrixLayout(fGCanvas,2,3,1,1));
+
+  fNameList[0] = "probNeg";
+  fNameList[1] = "ptSigNeg";
+  fNameList[2] = "ptSigPureNeg";
+  fNameList[3] = "probPos";
+  fNameList[4] = "ptSigPos";
+  fNameList[5] = "ptSigPurePos";
+
+  for(Int_t i=0; i<6; i++) {
+    fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i], fGCanvas, 320, 300);
+    fGCanvas->AddFrame(fCanvasList[i]);
+    fCanvasList[i]->GetCanvas()->SetRightMargin(0.05);
+  }
+  
+  for(Int_t i=0; i<4; i++) {
+    fHistList[i] = 0;
+  }
+
+  AddFrame(fGCanvas);
+  /**/
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiEnergyDeposit::SetQAFile(const char *filename) {
+  //
+  // Ste file with histograms
+  //
+
+  strcpy(fFileName, filename);
+
+  for(Int_t i=0; i<6; i++) {
+    if (fHistList[i]) delete fHistList[i];
+  }
+  
+  const Int_t logy[] = {1, 0, 0, 1, 0, 0};
+  const Int_t logx[] = {0, 1, 1, 0, 1, 1};
+  const char *opt[] = {"", "colz", "colz", "", "colz", "cloz"}; 
+
+  TFile *file = new TFile(filename);
+  
+  for(Int_t i=0; i<6; i++) {
+    fHistList[i] = (TH1D*)gDirectory->Get(Form("%s%d", fNameList[i], fIdx));
+    if (fHistList[i]) fHistList[i]->SetDirectory(0);
+    fCanvasList[i]->GetCanvas()->cd();
+    if (fHistList[i]) fHistList[i]->Draw(opt[i]);
+    gPad->SetLogy(logy[i]);
+    gPad->SetLogx(logx[i]);
+    fCanvasList[i]->GetCanvas()->Update();
+  }
+
+  file->Close();
+  delete file;
+  
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiEnergyDeposit::SetType(Int_t idx) {
+  //
+  // Sets active supermodule 
+  //
+
+  fIdx = idx; 
+  fGSelect->Select(fIdx, 0); 
+  SetQAFile(fFileName);
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
diff --git a/TRD/qaGui/AliTRDqaGuiEnergyDeposit.h b/TRD/qaGui/AliTRDqaGuiEnergyDeposit.h
new file mode 100644 (file)
index 0000000..9c8b73a
--- /dev/null
@@ -0,0 +1,65 @@
+#ifndef ALITRDQAGUIENERGYDEPOSIT_H
+#define ALITRDQAGUIENERGYDEPOSIT_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+//
+// S. Radomski 
+// Uni-Heidelberg
+// April 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "TGFrame.h"  
+
+class TH1D;
+class TString;
+class TGLabel;
+class TGComboBox;
+class TGTextButton;
+class TRootEmbeddedCanvas;
+
+class AliTRDqaGuiEnergyDeposit : public TGCompositeFrame {
+
+ public:
+
+  AliTRDqaGuiEnergyDeposit();
+  AliTRDqaGuiEnergyDeposit(TGWindow *parent);
+  AliTRDqaGuiEnergyDeposit& operator = (const AliTRDqaGuiEnergyDeposit& /*g*/) { return *this; };
+  AliTRDqaGuiEnergyDeposit(const AliTRDqaGuiEnergyDeposit&);
+  ~AliTRDqaGuiEnergyDeposit() {}
+  
+  void SetQAFile(const char *filename);
+  void SetType(Int_t idx);
+
+  void PreviusType()         {if (fIdx > 0) SetType(fIdx-1);}   // *SLOT*
+  void NextType()            {if (fIdx < 17) SetType(fIdx+1);}  // *SLOT*
+  void SelectType(Int_t idx) {SetType(idx);} // *SLOT*
+  
+ protected:
+
+  Int_t fIdx;                          // super module index
+  const char *fNameList[6];            // names of histograms
+
+  char fFileName[256];                 // file with histograms
+  TRootEmbeddedCanvas *fCanvasList[6];  // canvases
+  TH1D *fHistList[6];                   // and histograms
+  
+  // 
+  TGCompositeFrame *fGPanel;            // panel with buttons
+  TGCompositeFrame *fGCanvas;           // and with histograms
+  
+  // steering panel
+  TGComboBox   *fGSelect;    // step selector button 
+  TGTextButton *fGPrev;      // previus step
+  TGTextButton *fGNext;      // next step
+
+  ClassDef(AliTRDqaGuiEnergyDeposit,1) // 
+};
+
+#endif
diff --git a/TRD/qaGui/AliTRDqaGuiJPsi.cxx b/TRD/qaGui/AliTRDqaGuiJPsi.cxx
new file mode 100644 (file)
index 0000000..9d15364
--- /dev/null
@@ -0,0 +1,173 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+//
+// S. Radomski 
+// Uni-Heidelberg
+// April 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDqaGuiJPsi.h"
+
+#include "TH1D.h"
+#include "TFile.h"
+#include "TCanvas.h"
+#include "TString.h"
+#include "TSystem.h"
+
+#include "TGLabel.h"
+#include "TGComboBox.h"
+#include "TGButton.h"
+#include "TRootEmbeddedCanvas.h"
+
+ClassImp(AliTRDqaGuiJPsi)
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiJPsi::AliTRDqaGuiJPsi() 
+  : fIdx(0),
+    fGPanel(0),
+    fGCanvas(0),
+    fGSelect(0),
+    fGPrev(0),
+    fGNext(0)
+{
+  
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiJPsi::AliTRDqaGuiJPsi(TGWindow *parent) 
+  : TGCompositeFrame(parent, 720, 500),
+    fIdx(0),
+    fGPanel(0),
+    fGCanvas(0),
+    fGSelect(0),
+    fGPrev(0),
+    fGNext(0)
+{
+  //
+  // Main constructor
+  //
+  
+  fIdx = 0;
+  
+  // steering panel 
+  
+  SetLayoutManager(new TGVerticalLayout(this));
+
+  fGPanel = new TGHorizontalFrame(this);
+
+  // fGLabel = new TGLabel(fGPanel, "Current Step: ");
+  fGPrev = new TGTextButton(fGPanel, "Prev Step");
+  fGNext = new TGTextButton(fGPanel, "Next Step");
+
+  fGSelect = new TGComboBox(fGPanel);
+  for(int i=0; i<5; i++) fGSelect->AddEntry(Form("Step %d", i), i);
+  fGSelect->Resize(100, fGPrev->GetHeight());
+  fGSelect->Select(fIdx);
+  
+  TGLayoutHints *hint = new TGLayoutHints(kLHintsNormal, 5, 5, 5, 5);
+  
+  // fGPanel->AddFrame(fGLabel, hint);
+  fGPanel->AddFrame(fGPrev, hint);
+  fGPanel->AddFrame(fGSelect, hint);
+  fGPanel->AddFrame(fGNext, hint);
+
+  AddFrame(fGPanel);
+
+  // panel logic
+  fGPrev->Connect("Clicked()", "AliTRDqaGuiJPsi", this, "PreviusStep()");
+  fGNext->Connect("Clicked()", "AliTRDqaGuiJPsi", this, "NextStep()");
+  fGSelect->Connect("Selected(Int_t", "AliTRDqaGuiJPsi", this, "SelectStep(Int_t)");
+  // histograms
+  /**/
+  fGCanvas = new TGCompositeFrame(this);
+  fGCanvas->SetLayoutManager(new TGMatrixLayout(fGCanvas,2,3,1,1));
+
+  fNameList[0] = "mass";
+  fNameList[1] = "nTracksNeg";
+  fNameList[2] = "ptNeg";
+  fNameList[3] = "pidNeg";
+  //fNameList[3] = "ptAngle";
+  fNameList[4] = "nTracksPos";
+  fNameList[5] = "ptPos";
+
+  for(Int_t i=0; i<6; i++) {
+    fCanvasList[i] = new TRootEmbeddedCanvas(fNameList[i], fGCanvas, 320, 300);
+    fGCanvas->AddFrame(fCanvasList[i]);
+    fCanvasList[i]->GetCanvas()->SetRightMargin(0.05);
+  }
+  
+  for(Int_t i=0; i<4; i++) {
+    fHistList[i] = 0;
+  }
+
+  AddFrame(fGCanvas);
+  /**/
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiJPsi::SetQAFile(const char *filename) {
+  //
+  // Ste file with histograms
+  // 
+
+  strcpy(fFileName, filename);
+
+  for(Int_t i=0; i<6; i++) {
+    if (fHistList[i]) delete fHistList[i];
+  }
+  
+  const Int_t logy[6] = {0, 1, 1, 1, 1, 1};
+  const Int_t logz[6] = {0, 0, 0, 1, 0, 0};
+  const char *opt[6]  = {"", "", "", "", "", ""};
+
+  TFile *file = new TFile(filename);
+  
+  for(Int_t i=0; i<6; i++) {
+    fHistList[i] = (TH1D*)gDirectory->Get(Form("%s_%d", fNameList[i], fIdx));
+    if (fHistList[i]) fHistList[i]->SetDirectory(0);
+    fCanvasList[i]->GetCanvas()->cd();
+    if (fHistList[i]) fHistList[i]->Draw(opt[i]);
+    gPad->SetLogy(logy[i]);
+    gPad->SetLogz(logz[i]);
+    fCanvasList[i]->GetCanvas()->Update();
+  }
+
+  file->Close();
+  delete file;
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+void AliTRDqaGuiJPsi::SetStep(Int_t idx) {
+  //
+  // Sets active supermodule 
+  //
+
+  fIdx = idx; 
+  fGSelect->Select(fIdx, 0); 
+  SetQAFile(fFileName);
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
diff --git a/TRD/qaGui/AliTRDqaGuiJPsi.h b/TRD/qaGui/AliTRDqaGuiJPsi.h
new file mode 100644 (file)
index 0000000..f046f99
--- /dev/null
@@ -0,0 +1,67 @@
+#ifndef ALITRDQAGUIJPSISTEPS_H
+#define ALITRDQAGUIJPSISTEPS_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+//
+// S. Radomski 
+// Uni-Heidelberg
+// April 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "TGFrame.h"  
+
+class TH1D;
+class TString;
+class TGLabel;
+class TGComboBox;
+class TGTextButton;
+class TRootEmbeddedCanvas;
+
+class AliTRDqaGuiJPsi : public TGCompositeFrame {
+
+ public:
+
+  AliTRDqaGuiJPsi();
+  AliTRDqaGuiJPsi(TGWindow *parent);
+  AliTRDqaGuiJPsi& operator = (const AliTRDqaGuiJPsi& /*g*/) { return *this; };
+  AliTRDqaGuiJPsi(const AliTRDqaGuiJPsi&);
+  ~AliTRDqaGuiJPsi() {}
+  
+  void SetQAFile(const char *filename);
+  void SetStep(Int_t idx);
+
+  void PreviusStep()         {if (fIdx > 0) SetStep(fIdx-1);}   // *SLOT*
+  void NextStep()            {if (fIdx < 17) SetStep(fIdx+1);}  // *SLOT*
+  void SelectStep(Int_t idx) {SetStep(idx);} // *SLOT*
+  
+ protected:
+
+  Int_t fIdx;                          // super module index
+  const char *fNameList[6];            // names of histograms
+
+  char fFileName[256];                 // file with histograms
+  TRootEmbeddedCanvas *fCanvasList[6];  // canvases
+  TH1D *fHistList[6];                   // and histograms
+  
+  // 
+  TGCompositeFrame *fGPanel;            // panel with buttons
+  TGCompositeFrame *fGCanvas;           // and with histograms
+  
+  // steering panel
+  TGComboBox   *fGSelect;    // step selector button 
+  TGTextButton *fGPrev;      // previus step
+  TGTextButton *fGNext;      // next step
+
+  ClassDef(AliTRDqaGuiJPsi,1) // 
+};
+
+#endif
diff --git a/TRD/qaGui/AliTRDqaGuiMainAnalysis.cxx b/TRD/qaGui/AliTRDqaGuiMainAnalysis.cxx
new file mode 100644 (file)
index 0000000..af9f77b
--- /dev/null
@@ -0,0 +1,87 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+#include "AliTRDqaGuiMainAnalysis.h"
+#include "AliTRDqaGuiJPsi.h"
+#include "AliTRDqaGuiEnergyDeposit.h"
+#include "TGTab.h"
+
+ClassImp(AliTRDqaGuiMainAnalysis);
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+// of clusters and ESDs. 
+// It displays histograms created by the AliTRDQADataMakerRec 
+// run during the reconstruction 
+//
+// S. Radomski 
+// Uni-Heidelberg
+// Feb. 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiMainAnalysis::AliTRDqaGuiMainAnalysis() 
+  : fGTabPanel(0),
+    fGJPsi(0),
+    fGED(0)
+{
+  //
+  // Default constructor
+  //
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+AliTRDqaGuiMainAnalysis::AliTRDqaGuiMainAnalysis(TGWindow *parent) :
+  TGMainFrame(parent, 400, 400),
+  fGTabPanel(0),
+  fGJPsi(0),
+  fGED(0)
+{
+  //
+  // main constructor
+  //
+  
+  fGTabPanel = new TGTab(this);
+  fGJPsi     = new AliTRDqaGuiJPsi(fGTabPanel);
+  fGED       = new AliTRDqaGuiEnergyDeposit(fGTabPanel);
+   
+  fGTabPanel->AddTab("JPsi", fGJPsi);
+  fGTabPanel->AddTab("Energy Deposit", fGED);
+
+  AddFrame(fGTabPanel);
+  
+  SetWindowName("TRD Analysis QA");
+  MapSubwindows();
+  MapWindow();
+  Resize(GetDefaultSize());
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void AliTRDqaGuiMainAnalysis::SetQAFile() {
+  //
+  // sets a file with histograms
+  // 
+  
+  fGJPsi->SetQAFile("outJPsi.root");
+  fGED->SetQAFile("outEnergyDeposit.root");
+}
+
+////////////////////////////////////////////////////////////////////////////////
diff --git a/TRD/qaGui/AliTRDqaGuiMainAnalysis.h b/TRD/qaGui/AliTRDqaGuiMainAnalysis.h
new file mode 100644 (file)
index 0000000..bc918a7
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef ALITRDQAGUIMAINANALYSIS_H
+#define ALITRDQAGUIMAINANALYSIS_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+//////////////////////////////////////////////////////////////////////////////////
+//
+// This class is a Graphical User Interface for the Quality Monitorig 
+//
+// S. Radomski 
+// Uni-Heidelberg
+// Feb. 2008
+// 
+//////////////////////////////////////////////////////////////////////////////////
+
+#include "TGFrame.h"
+
+class TGWindow;
+class TGTab;
+
+class AliTRDqaGuiJPsi;
+class AliTRDqaGuiEnergyDeposit;
+
+class AliTRDqaGuiMainAnalysis : public TGMainFrame {
+ public:
+
+  AliTRDqaGuiMainAnalysis();
+  AliTRDqaGuiMainAnalysis(TGWindow *parent);
+  AliTRDqaGuiMainAnalysis& operator = (const AliTRDqaGuiMainAnalysis& /*g*/) { return *this; };
+  AliTRDqaGuiMainAnalysis (const AliTRDqaGuiMainAnalysis&);
+  ~AliTRDqaGuiMainAnalysis() {}
+
+  void SetQAFile();
+  
+ protected:
+  
+  TGTab *fGTabPanel;                  // main tab panel
+  AliTRDqaGuiJPsi          *fGJPsi;       // 
+  AliTRDqaGuiEnergyDeposit *fGED;
+
+  ClassDef(AliTRDqaGuiMainAnalysis,1) //
+};
+
+#endif
diff --git a/TRD/qaGui/testQAGuiAnalysis.C b/TRD/qaGui/testQAGuiAnalysis.C
new file mode 100644 (file)
index 0000000..4e1f647
--- /dev/null
@@ -0,0 +1,20 @@
+
+void testQAGuiAnalysis() {
+  
+  gROOT->SetStyle("Plain");
+  gStyle->SetPalette(1);
+  gStyle->SetOptStat(0);
+  TGaxis::SetMaxDigits(3);
+  gStyle->SetTitleX(0.5);
+  gStyle->SetTitleY(0.95);
+  gStyle->SetTitleW(0.45);
+  gStyle->SetTitleH(0.05);
+
+
+  gSystem->Load("libGui.so");
+  gSystem->Load("libTRDgui.so");
+  
+  AliTRDqaGuiMainAnalysis *fMain = new AliTRDqaGuiMainAnalysis(gClient->GetRoot());
+  fMain->SetQAFile();
+}
index b31e5e8..9c9e093 100644 (file)
@@ -6,7 +6,7 @@ void testQAGuiBlack(const char *filename) {
   gStyle->SetOptStat(0);
   
   gSystem->Load("libGui.so");
-  gSystem->Load("libTRDGui.so");
+  gSystem->Load("libTRDgui.so");
   
   AliTRDqaGuiMainBlack *fMain = new AliTRDqaGuiMainBlack(gClient->GetRoot());
   fMain->SetQAFile(filename);