--- /dev/null
+/**************************************************************************
+ * 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. *
+ **************************************************************************/
+
+/*
+ Checks the quality assurance.
+ By comparing with reference data
+ B.K. Nandi
+*/
+
+// --- ROOT system ---
+#include <TClass.h>
+#include <TH1F.h>
+#include <TH1I.h>
+#include <TIterator.h>
+#include <TKey.h>
+#include <TFile.h>
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliLog.h"
+#include "AliQA.h"
+#include "AliQAChecker.h"
+#include "AliPMDQAChecker.h"
+
+ClassImp(AliPMDQAChecker)
+
+//__________________________________________________________________
+AliPMDQAChecker& AliPMDQAChecker::operator = (const AliPMDQAChecker& qac )
+{
+ // Equal operator.
+ this->~AliPMDQAChecker();
+ new(this) AliPMDQAChecker(qac);
+ return *this;
+}
+
--- /dev/null
+#ifndef ALIPMDQACHECKER_H
+#define ALIPMDQACHECKER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/*
+ Checks the quality assurance.
+ By comparing with reference data
+ B.K. Nandi
+*/
+
+
+// --- ROOT system ---
+class TFile ;
+class TH1F ;
+class TH1I ;
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliQACheckerBase.h"
+class AliPMDLoader ;
+
+class AliPMDQAChecker: public AliQACheckerBase {
+
+public:
+ AliPMDQAChecker() : AliQACheckerBase("PMD","PMD Quality Assurance Data Maker") {;} // ctor
+ AliPMDQAChecker(const AliPMDQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // cpy ctor
+ AliPMDQAChecker& operator = (const AliPMDQAChecker& qac) ;
+ virtual ~AliPMDQAChecker() {;} // dtor
+
+private:
+
+ ClassDef(AliPMDQAChecker,1) // description
+
+};
+
+#endif // AliPMDQAChecker_H
--- /dev/null
+/**************************************************************************
+ * 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. *
+ **************************************************************************/
+
+
+/*
+ Produces the data needed to calculate the quality assurance.
+ All data must be mergeable objects.
+ B.K. Nandi
+*/
+
+// --- ROOT system ---
+#include <TClonesArray.h>
+#include <TFile.h>
+#include <TH1F.h>
+#include <TH1I.h>
+#include <TH2F.h>
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+
+#include "AliESDEvent.h"
+#include "AliLog.h"
+#include "AliPMDQADataMakerRec.h"
+#include "AliQAChecker.h"
+#include "AliPMDrecpoint1.h"
+#include "AliPMDRawStream.h"
+#include "AliPMDddldata.h"
+#include "AliPMDUtility.h"
+#include "AliESDPmdTrack.h"
+//#include "AliPMDRecoParam.h"
+
+ClassImp(AliPMDQADataMakerRec)
+
+//____________________________________________________________________________
+ AliPMDQADataMakerRec::AliPMDQADataMakerRec() :
+ AliQADataMakerRec(AliQA::GetDetName(AliQA::kPMD), "PMD Quality Assurance Data Maker")
+{
+ // ctor
+}
+
+//____________________________________________________________________________
+AliPMDQADataMakerRec::AliPMDQADataMakerRec(const AliPMDQADataMakerRec& qadm) :
+ AliQADataMakerRec()
+{
+ //copy ctor
+ SetName((const char*)qadm.GetName()) ;
+ SetTitle((const char*)qadm.GetTitle());
+}
+
+//__________________________________________________________________
+AliPMDQADataMakerRec& AliPMDQADataMakerRec::operator = (const AliPMDQADataMakerRec& qadm )
+{
+ // Equal operator.
+ this->~AliPMDQADataMakerRec();
+ new(this) AliPMDQADataMakerRec(qadm);
+ return *this;
+}
+
+
+//____________________________________________________________________________
+void AliPMDQADataMakerRec::InitRaws()
+{
+ // create Raws histograms in Raws subdir
+
+ TH1F * h0 = new TH1F("hPreDdl0Edep","DDL0 Energy Distribution PRE(PMD)", 100, 0, 2000);
+ h0->Sumw2();
+ Add2RawsList(h0, 0);
+
+ TH1F * h1 = new TH1F("hPreDdl1Edep","DDL1 Energy Distribution PRE(PMD)", 100, 0, 2000);
+ h1->Sumw2();
+ Add2RawsList(h1, 1);
+
+ TH1F * h2 = new TH1F("hPreDdl2Edep","DDL2 Energy Distribution PRE(PMD)", 100, 0, 2000);
+ h2->Sumw2();
+ Add2RawsList(h2, 2);
+
+ TH1F * h3 = new TH1F("hPreDdl3Edep","DDL3 Energy Distribution PRE(PMD)", 100, 0, 2000);
+ h3->Sumw2();
+ Add2RawsList(h3, 3);
+
+ TH1F * h4 = new TH1F("hCpvDdl4Edep","DDL4 Energy Distribution CPV(PMD)", 100, 0, 2000);
+ h4->Sumw2();
+ Add2RawsList(h4, 4);
+
+ TH1F * h5 = new TH1F("hCpvDdl5Edep","DDL5 Energy Distribution CPV(PMD)", 100, 0, 2000);
+ h5->Sumw2();
+ Add2RawsList(h5, 5);
+
+
+}
+//____________________________________________________________________________
+void AliPMDQADataMakerRec::InitRecPoints()
+{
+ // create Reconstructed Points histograms in RecPoints subdir
+
+/*
+ TH2F * h0 = new TH2F("hPreXY","RecPoints Y vs X PRE(PMD)", 100,-100.,100.,100,-100.,100.);
+ Add2RecPointsList(h0,0) ;
+
+ TH2F * h1 = new TH2F("hCpvXY","RecPoints Y vs X CPV(PMD)", 100,-100.,100.,100,-100.,100.);
+ Add2RecPointsList(h1,1) ;
+*/
+
+ TH1F * h0 = new TH1F("hPreClADC","Cluster ADC of PRE(PMD) plane",500,0.,5000.);
+ h0->Sumw2();
+ Add2RecPointsList(h0, 0) ;
+
+ TH1F * h1 = new TH1F("hCpvClADC","Cluster ADC of CPV(PMD) plane",500,0.,5000.);
+ h1->Sumw2();
+ Add2RecPointsList(h1, 1) ;
+
+
+ TH1I * h2 = new TH1I("hPreClMult","Cluster Multiplicity of PRE(PMD) plane",100,0.,10000.);
+ h2->Sumw2();
+ Add2RecPointsList(h2, 2) ;
+
+ TH1I * h3 = new TH1I("hCpvClMult","Cluster Multiplicity of CPV(PMD) plane",100,0.,10000.);
+ h3->Sumw2();
+ Add2RecPointsList(h3, 3) ;
+
+
+}
+
+//____________________________________________________________________________
+
+void AliPMDQADataMakerRec::InitESDs()
+{
+ //Create histograms to controll ESD
+
+ TH1F * h0 = new TH1F("hPreClADC","Cluster ADC of PRE(PMD) plane",500,0.,5000.);
+ h0->Sumw2();
+ Add2ESDsList(h0, 0) ;
+
+ TH1F * h1 = new TH1F("hCpvClADC","Cluster ADC of CPV(PMD) plane",500,0.,5000.);
+ h1->Sumw2();
+ Add2ESDsList(h1, 1) ;
+
+ TH1I * h2 = new TH1I("hPreClMult","Cluster Multiplicity of PRE(PMD) plane",100,0.,10000.);
+ h2->Sumw2();
+ Add2ESDsList(h2, 2) ;
+
+ TH1I * h3 = new TH1I("hCpvClMult","Cluster Multiplicity of CPV(PMD) plane",100,0.,10000.);
+ h3->Sumw2();
+ Add2ESDsList(h3, 3) ;
+
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
+{
+ //Fill prepared histograms with Raw digit properties
+
+ TObjArray pmdddlcont;
+ AliPMDRawStream stream(rawReader);
+
+
+
+ Int_t iddl = -1;
+ while ((iddl = stream.DdlData(&pmdddlcont)) >=0)
+ {
+ Int_t ientries = pmdddlcont.GetEntries();
+ //printf(" ======= DDLNO = %d ientries = %d \n", iddl, ientries);
+ for (Int_t ient = 0; ient < ientries; ient++)
+ {
+ AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient);
+ //Int_t det = pmdddl->GetDetector();
+ //Int_t smn = pmdddl->GetSMN();
+ //Int_t mcm = pmdddl->GetMCM();
+ //Int_t chno = pmdddl->GetChannel();
+ //Int_t row = pmdddl->GetRow();
+ //Int_t col = pmdddl->GetColumn();
+ Int_t sig = pmdddl->GetSignal();
+ //cout<<sig<<endl;
+
+ if (iddl == 0) GetRawsData(0)->Fill(sig);
+ if (iddl == 1) GetRawsData(1)->Fill(sig);
+ if (iddl == 2) GetRawsData(2)->Fill(sig);
+ if (iddl == 3) GetRawsData(3)->Fill(sig);
+ if (iddl == 4) GetRawsData(4)->Fill(sig);
+ if (iddl == 5) GetRawsData(5)->Fill(sig);
+
+
+ }
+
+ pmdddlcont.Delete();
+ }
+}
+//____________________________________________________________________________
+void AliPMDQADataMakerRec::MakeRecPoints(TTree * clustersTree)
+{
+ // makes data from RecPoints
+
+ Int_t premul = 0, cpvmul = 0;
+ AliPMDrecpoint1 * recpoint;
+
+ TClonesArray * recpoints = new TClonesArray("AliPMDrecpoint1", 1000) ;
+
+ TBranch * branch = clustersTree->GetBranch("PMDRecpoint") ;
+ branch->SetAddress(&recpoints) ;
+
+ if ( ! branch )
+ {
+ AliWarning("PMD branch in SDigit Tree not found") ;
+ }
+ else
+ {
+ for (Int_t imod = 0; imod < branch->GetEntries(); imod++)
+ {
+ branch->GetEntry(imod) ;
+
+ TIter next(recpoints) ;
+
+ while ( (recpoint = dynamic_cast<AliPMDrecpoint1 *>(next())) )
+ {
+ //Float_t xpos = recpoint->GetClusX();
+ //Float_t ypos = recpoint->GetClusY();
+ if(recpoint->GetDetector() == 0)
+ {
+ GetRecPointsData(0)->Fill(recpoint->GetClusADC());
+ premul++;
+ }
+ if(recpoint->GetDetector() == 1)
+ {
+ GetRecPointsData(1)->Fill(recpoint->GetClusADC());
+ cpvmul++;
+ }
+
+ }
+
+ }
+ }
+
+ GetRecPointsData(2)->Fill(premul);
+ GetRecPointsData(3)->Fill(cpvmul);
+}
+
+//____________________________________________________________________________
+
+void AliPMDQADataMakerRec::MakeESDs(AliESDEvent * esd)
+{
+ // make QA data from ESDs
+
+ Int_t premul = 0, cpvmul = 0;
+ for (Int_t icl = 0; icl < esd->GetNumberOfPmdTracks(); icl++)
+ {
+ AliESDPmdTrack *pmdtr = esd->GetPmdTrack(icl);
+
+ //Int_t det = pmdtr->GetDetector();
+ //Float_t clsX = pmdtr->GetClusterX();
+ //Float_t clsY = pmdtr->GetClusterY();
+ //Float_t clsZ = pmdtr->GetClusterZ();
+ //Float_t ncell = pmdtr->GetClusterCells();
+ Float_t adc = pmdtr->GetClusterADC();
+ //Float_t pid = pmdtr->GetClusterPID();
+
+ if (pmdtr->GetDetector() == 0)
+ {
+ GetESDsData(0)->Fill(adc);
+ premul++;
+ }
+ if (pmdtr->GetDetector() == 1)
+ {
+ GetESDsData(1)->Fill(adc) ;
+ cpvmul++;
+ }
+ }
+
+ GetESDsData(2)->Fill(premul) ;
+ GetESDsData(3)->Fill(cpvmul) ;
+}
+
+//____________________________________________________________________________
+
+void AliPMDQADataMakerRec::StartOfDetectorCycle()
+{
+ //Detector specific actions at start of cycle
+
+}
+//____________________________________________________________________________
+void AliPMDQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+{
+ //Detector specific actions at end of cycle
+ // do the QA checking
+ AliQAChecker::Instance()->Run(AliQA::kPMD, task, list) ;
+}
--- /dev/null
+#ifndef ALIPMDQADataMakerRec_H
+#define ALIPMDQADataMakerRec_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+
+/*
+ Produces the data needed to calculate the quality assurance.
+ All data must be mergeable objects.
+ B.K. Nandi
+*/
+
+
+// --- ROOT system ---
+class TH1F ;
+class TH1I ;
+class TObjArray ;
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliQADataMakerRec.h"
+
+class AliPMDQADataMakerRec: public AliQADataMakerRec {
+
+ public:
+ AliPMDQADataMakerRec() ; // ctor
+ AliPMDQADataMakerRec(const AliPMDQADataMakerRec& qadm) ;
+ AliPMDQADataMakerRec& operator = (const AliPMDQADataMakerRec& qadm) ;
+ virtual ~AliPMDQADataMakerRec() {;} // dtor
+
+ private:
+
+ virtual void InitRaws() ;
+ virtual void InitRecPoints() ;
+ virtual void InitESDs() ;
+ virtual void MakeRaws(AliRawReader* rawReader) ;
+ virtual void MakeRecPoints(TTree * recpoTree) ;
+ virtual void MakeESDs(AliESDEvent * esd) ;
+ virtual void StartOfDetectorCycle() ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+
+ ClassDef(AliPMDQADataMakerRec,1) // description
+
+};
+
+#endif // AliPMDQADataMakerRec_H
--- /dev/null
+/**************************************************************************
+ * 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. *
+ **************************************************************************/
+
+
+/*
+ Produces the data needed to calculate the quality assurance.
+ All data must be mergeable objects.
+ B.K. Nandi
+*/
+
+// --- ROOT system ---
+#include <TClonesArray.h>
+#include <TFile.h>
+#include <TH1F.h>
+#include <TH1I.h>
+#include <TH2F.h>
+#include <TTree.h>
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+
+#include "AliLog.h"
+#include "AliPMDhit.h"
+#include "AliPMDsdigit.h"
+#include "AliPMDdigit.h"
+#include "AliPMDQADataMakerSim.h"
+#include "AliQAChecker.h"
+
+ClassImp(AliPMDQADataMakerSim)
+
+//____________________________________________________________________________
+AliPMDQADataMakerSim::AliPMDQADataMakerSim() :
+ AliQADataMakerSim(AliQA::GetDetName(AliQA::kPMD), "PMD Quality Assurance Data Maker")
+{
+ // ctor
+}
+
+//____________________________________________________________________________
+AliPMDQADataMakerSim::AliPMDQADataMakerSim(const AliPMDQADataMakerSim& qadm) :
+ AliQADataMakerSim()
+{
+ //copy ctor
+ SetName((const char*)qadm.GetName()) ;
+ SetTitle((const char*)qadm.GetTitle());
+}
+
+//__________________________________________________________________
+AliPMDQADataMakerSim& AliPMDQADataMakerSim::operator = (const AliPMDQADataMakerSim& qadm )
+{
+ // Assign operator.
+ this->~AliPMDQADataMakerSim();
+ new(this) AliPMDQADataMakerSim(qadm);
+ return *this;
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::InitHits()
+{
+ // create Hits histograms in Hits subdir
+
+ TH1F *h0 = new TH1F("hPreHitsEdep","Hits energy distribution in PRE(PMD)", 100, 0., 2000.);
+ h0->Sumw2() ;
+ Add2HitsList(h0, 0) ;
+
+ TH1F *h1 = new TH1F("hCpvHitsEdep","Hits energy distribution in CPV(PMD)", 100, 0., 2000.);
+ h1->Sumw2() ;
+ Add2HitsList(h1, 1) ;
+
+ TH1I *h2 = new TH1I("hPreHitsMult","Hits multiplicity distribution in PRE(PMD)", 500, 0, 10000) ;
+ h2->Sumw2() ;
+ Add2HitsList(h2, 2) ;
+
+ TH1I *h3 = new TH1I("hCpvHitsMult","Hits multiplicity distribution in PRE(PMD)", 500, 0, 10000) ;
+ h2->Sumw2() ;
+ Add2HitsList(h3, 3) ;
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::InitSDigits()
+{
+ // create SDigits histograms in SDigits subdir
+
+ TH1F *h0 = new TH1F("hPreSDigitsEdep","SDigits energy distribution in PRE(PMD)", 100, 0., 2000.);
+ h0->Sumw2();
+ Add2SDigitsList(h0, 0);
+
+ TH1F *h1 = new TH1F("hCpvSDigitsEdep","SDigits energy distribution in CPV(PMD)", 100, 0., 2000.);
+ h1->Sumw2();
+ Add2SDigitsList(h1, 1);
+
+ TH1I *h2 = new TH1I("hPreSDigitsMult","SDigits multiplicity distribution in PRE(PMD)", 500, 0., 5000.);
+ h2->Sumw2();
+ Add2SDigitsList(h2, 2);
+
+ TH1I *h3 = new TH1I("hCpvSDigitsMult","SDigits multiplicity distribution in CPV(PMD)", 500, 0., 5000.);
+ h3->Sumw2();
+ Add2SDigitsList(h3, 3);
+
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::InitDigits()
+{
+ // create Digits histograms in Digits subdir
+
+ TH1F *h0 = new TH1F("hPreDigitsEdep","Digits energy distribution in PRE(PMD)", 100, 0., 2000.);
+ h0->Sumw2();
+ Add2DigitsList(h0, 0);
+
+ TH1F *h1 = new TH1F("hCpvDigitsEdep","Digits energy distribution in CPV(PMD)", 100, 0., 2000.);
+ h1->Sumw2();
+ Add2DigitsList(h1, 1);
+
+ TH1I *h2 = new TH1I("hPreDigitsMult","Digits multiplicity distribution in PRE(PMD)", 500, 0, 5000) ;
+ h2->Sumw2();
+ Add2DigitsList(h2, 2);
+
+ TH1I *h3 = new TH1I("hCpvDigitsMult","Digits multiplicity distribution in CPV(PMD)", 500, 0, 5000);
+ h3->Sumw2();
+ Add2DigitsList(h3, 3);
+
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::MakeHits(TClonesArray *hits)
+{
+ //make QA data from Hits
+
+ Int_t premul = 0, cpvmul = 0;
+
+ TIter next(hits);
+ AliPMDhit * hit;
+
+ while ( (hit = dynamic_cast<AliPMDhit *>(next())) )
+ {
+ if (hit->Z() > 361.5)
+ {
+ GetHitsData(0)->Fill(hit->GetEnergy());
+ premul++;
+ }
+ else if (hit->Z() < 361.5)
+ {
+ GetHitsData(1)->Fill(hit->GetEnergy());
+ cpvmul++;
+ }
+ }
+
+ if(premul <= 0)
+ {
+ GetHitsData(2)->Fill(-1.);
+ }
+ else
+ {
+ GetHitsData(2)->Fill(premul);
+ }
+
+ if(cpvmul <= 0)
+ {
+ GetHitsData(3)->Fill(-1.);
+ }
+ else
+ {
+ GetHitsData(3)->Fill(cpvmul);
+ }
+
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::MakeHits(TTree * hitTree)
+{
+ // make QA data from Hit Tree
+
+ TBranch * branch = hitTree->GetBranch("PMD") ;
+ if ( ! branch )
+ {
+ AliWarning("PMD branch in Hit Tree not found") ;
+ return;
+ }
+
+ static TClonesArray statichits("AliPMDhit", 1000);
+ statichits.Clear();
+ TClonesArray *hits = &statichits;
+ static TClonesArray staticdummy("AliPMDhit", 1000);
+ staticdummy.Clear();
+ TClonesArray *dummy = &staticdummy;
+ branch->SetAddress(&dummy);
+ Int_t index = 0 ;
+
+ for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
+ branch->GetEntry(ientry) ;
+ for (Int_t ihit = 0 ; ihit < dummy->GetEntries() ; ihit++) {
+ AliPMDhit * hit = dynamic_cast<AliPMDhit *> (dummy->At(ihit)) ;
+ new((*hits)[index]) AliPMDhit(*hit) ;
+
+ index++ ;
+ }
+ }
+
+ MakeHits(hits);
+
+}
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
+{
+ // makes data from SDigits
+
+ Int_t cpvmul = 0, premul = 0;
+
+ TIter next(sdigits) ;
+ AliPMDsdigit * sdigit ;
+ while ( (sdigit = dynamic_cast<AliPMDsdigit *>(next())) )
+ {
+ if(sdigit->GetDetector() == 0)
+ {
+ GetSDigitsData(0)->Fill( sdigit->GetCellEdep());
+ premul++;
+ }
+ if(sdigit->GetDetector() == 1)
+ {
+ GetSDigitsData(1)->Fill( sdigit->GetCellEdep());
+ cpvmul++;
+ }
+
+ }
+ if (premul > 0) GetSDigitsData(2)->Fill(premul);
+ if (cpvmul > 0) GetSDigitsData(3)->Fill(cpvmul);
+
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::MakeSDigits(TTree * sdigitTree)
+{
+ // makes data from SDigit Tree
+
+ TClonesArray * sdigits = new TClonesArray("AliPMDsdigit", 1000) ;
+
+ TBranch * branch = sdigitTree->GetBranch("PMDSDigit") ;
+ branch->SetAddress(&sdigits) ;
+
+ if ( ! branch )
+ {
+ AliWarning("PMD branch in SDigit Tree not found") ;
+ }
+ else
+ {
+ for (Int_t ient = 0; ient < branch->GetEntries(); ient++)
+ {
+ branch->GetEntry(ient) ;
+ MakeSDigits(sdigits) ;
+ }
+ }
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::MakeDigits(TClonesArray * digits)
+{
+ // makes data from Digits
+
+ Int_t cpvmul = 0, premul = 0;
+
+ TIter next(digits) ;
+ AliPMDdigit * digit ;
+ while ( (digit = dynamic_cast<AliPMDdigit *>(next())) )
+ {
+ if(digit->GetDetector() == 0)
+ {
+ GetDigitsData(0)->Fill( digit->GetADC()) ;
+ premul++;
+ }
+ if(digit->GetDetector() == 1)
+ {
+ GetDigitsData(1)->Fill( digit->GetADC());
+ cpvmul++;
+ }
+ }
+
+ if (premul > 0) GetDigitsData(2)->Fill(premul);
+ if (cpvmul > 0) GetDigitsData(3)->Fill(cpvmul);
+
+
+}
+
+//____________________________________________________________________________
+void AliPMDQADataMakerSim::MakeDigits(TTree * digitTree)
+{
+ // makes data from Digit Tree
+
+ TClonesArray * digits = new TClonesArray("AliPMDdigit", 1000) ;
+
+ TBranch * branch = digitTree->GetBranch("PMDDigit") ;
+ branch->SetAddress(&digits) ;
+
+ if ( ! branch )
+ {
+ AliWarning("PMD branch in Digit Tree not found") ;
+ }
+ else
+ {
+ for (Int_t ient = 0; ient < branch->GetEntries(); ient++)
+ {
+
+ branch->GetEntry(ient) ;
+ MakeDigits(digits) ;
+ }
+
+ }
+}
+
+
+//____________________________________________________________________________
+
+void AliPMDQADataMakerSim::StartOfDetectorCycle()
+{
+ //Detector specific actions at start of cycle
+
+}
+//____________________________________________________________________________
+
+void AliPMDQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+{
+ //Detector specific actions at end of cycle
+ // do the QA checking
+ AliQAChecker::Instance()->Run(AliQA::kPMD, task, list) ;
+}
--- /dev/null
+#ifndef ALIPMDQADataMakerSim_H
+#define ALIPMDQADataMakerSim_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+
+/*
+ Produces the data needed to calculate the quality assurance.
+ All data must be mergeable objects.
+ B.K. Nandi
+*/
+
+
+// --- ROOT system ---
+class TH1F ;
+class TH1I ;
+class TObjArray ;
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliQADataMakerSim.h"
+
+class AliPMDQADataMakerSim: public AliQADataMakerSim {
+
+public:
+ AliPMDQADataMakerSim() ; // ctor
+ AliPMDQADataMakerSim(const AliPMDQADataMakerSim& qadm) ;
+ AliPMDQADataMakerSim& operator = (const AliPMDQADataMakerSim& qadm) ;
+ virtual ~AliPMDQADataMakerSim() {;} // dtor
+
+private:
+ virtual void InitHits();
+ virtual void InitSDigits();
+ virtual void InitDigits();
+
+ virtual void MakeHits(TClonesArray * hits);
+ virtual void MakeHits(TTree * hitTree) ;
+ virtual void MakeSDigits(TClonesArray * sigits) ;
+ virtual void MakeSDigits(TTree * sigitTree) ;
+ virtual void MakeDigits(TClonesArray * digits) ;
+ virtual void MakeDigits(TTree * digitTree) ;
+ virtual void StartOfDetectorCycle() ;
+ virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+
+
+ ClassDef(AliPMDQADataMakerSim,1) // description
+
+};
+
+#endif // AliPMDQADataMakerSim_H
#pragma link C++ class AliPMDRawToSDigits+;
#pragma link C++ class AliPMDPedestal+;
#pragma link C++ class AliPMDsdigit+;
+#pragma link C++ class AliPMDQAChecker+;
#endif
#pragma link C++ class AliPMDReconstructor+;
#pragma link C++ class AliPMDCalibPedestal+;
#pragma link C++ class AliPMDCalibGain+;
+#pragma link C++ class AliPMDQADataMakerRec+;
#endif
#pragma link C++ class AliPMDcell+;
#pragma link C++ class AliPMDDigitizer+;
#pragma link C++ class AliPMDDDLRawData+;
+#pragma link C++ class AliPMDQADataMakerSim+;
#endif
#-*- Mode: Makefile -*-
# $Id$
-SRCS:= AliPMDLoader.cxx AliPMDdigit.cxx AliPMDBlockHeader.cxx AliPMDDspHeader.cxx AliPMDPatchBusHeader.cxx AliPMDddldata.cxx AliPMDRawStream.cxx AliPMDCalibData.cxx AliPMDCalibrator.cxx AliPMDPreprocessor.cxx AliPMDRawToSDigits.cxx AliPMDPedestal.cxx AliPMDsdigit.cxx
+SRCS:= AliPMDLoader.cxx AliPMDdigit.cxx AliPMDBlockHeader.cxx AliPMDDspHeader.cxx AliPMDPatchBusHeader.cxx AliPMDddldata.cxx AliPMDRawStream.cxx AliPMDCalibData.cxx AliPMDCalibrator.cxx AliPMDPreprocessor.cxx AliPMDRawToSDigits.cxx AliPMDPedestal.cxx AliPMDsdigit.cxx AliPMDQAChecker.cxx
HDRS:= $(SRCS:.cxx=.h)
#-*- Mode: Makefile -*-
# $Id$
-SRCS:= AliPMDRecPoint.cxx AliPMDUtility.cxx AliPMDrecpoint1.cxx AliPMDrechit.cxx AliPMDcluster.cxx AliPMDClusteringV1.cxx AliPMDClusteringV2.cxx AliPMDclupid.cxx AliPMDEmpDiscriminator.cxx AliPMDClusterFinder.cxx AliPMDtracker.cxx AliPMDReconstructor.cxx AliPMDcludata.cxx AliPMDCalibPedestal.cxx AliPMDCalibGain.cxx
+SRCS:= AliPMDRecPoint.cxx AliPMDUtility.cxx AliPMDrecpoint1.cxx AliPMDrechit.cxx AliPMDcluster.cxx AliPMDClusteringV1.cxx AliPMDClusteringV2.cxx AliPMDclupid.cxx AliPMDEmpDiscriminator.cxx AliPMDClusterFinder.cxx AliPMDtracker.cxx AliPMDReconstructor.cxx AliPMDcludata.cxx AliPMDCalibPedestal.cxx AliPMDCalibGain.cxx AliPMDQADataMakerRec.cxx
HDRS:= $(SRCS:.cxx=.h) AliPMDClustering.h AliPMDDiscriminator.h AliPMDcludata.h
#-*- Mode: Makefile -*-
# $Id$
-SRCS:= AliPMD.cxx AliPMDv0.cxx AliPMDv1.cxx AliPMDhit.cxx AliPMDcell.cxx AliPMDDigitizer.cxx AliPMDDDLRawData.cxx
+SRCS:= AliPMD.cxx AliPMDv0.cxx AliPMDv1.cxx AliPMDhit.cxx AliPMDcell.cxx AliPMDDigitizer.cxx AliPMDDDLRawData.cxx AliPMDQADataMakerSim.cxx
HDRS:= $(SRCS:.cxx=.h)