1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 // Produces the data needed to calculate the quality assurance.
17 // All data must be mergeable objects.
22 // Luciano Diaz Gonzalez <luciano.diaz@nucleares.unam.mx> (ICN-UNAM)
23 // Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> (FCFM-BUAP)
24 // Arturo Fernandez Tellez <afernan@mail.cern.ch (FCFM-BUAP)
26 // Created: June 13th 2008
31 // --- ROOT system ---
32 #include <TClonesArray.h>
35 #include <TDirectory.h>
36 // --- Standard library ---
38 // --- AliRoot header files ---
39 #include "AliESDEvent.h"
41 #include "AliACORDEdigit.h"
42 #include "AliACORDEhit.h"
43 #include "AliACORDEQADataMakerRec.h"
44 #include "AliQAChecker.h"
45 #include "AliACORDERawReader.h"
46 #include "AliACORDERawStream.h"
47 ClassImp(AliACORDEQADataMakerRec)
49 //____________________________________________________________________________
50 AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQA::GetDetName(AliQA::kACORDE), "ACORDE Quality Assurance Data Maker")
54 //____________________________________________________________________________
55 AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):AliQADataMakerRec()
57 SetName((const char*)qadm.GetName()) ;
58 SetTitle((const char*)qadm.GetTitle());
60 //__________________________________________________________________
61 AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )
64 this->~AliACORDEQADataMakerRec();
65 new(this) AliACORDEQADataMakerRec(qadm);
68 //____________________________________________________________________________
69 void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
71 //Detector specific actions at end of cycle
73 AliQAChecker::Instance()->Run(AliQA::kACORDE, task, list) ;
76 //____________________________________________________________________________
77 void AliACORDEQADataMakerRec::StartOfDetectorCycle()
79 //Detector specific actions at start of cycle
83 //____________________________________________________________________________
84 void AliACORDEQADataMakerRec::InitRaws()
86 // create Raw histograms in Raw subdir
88 TH1D *fhACORDEBitPattern[4];
89 fhACORDEBitPattern[0] = new TH1D("ACORDERawDataSM","ACORDE-SingleMuon",60,1,60);//AcordeSingleMuon BitPattern
90 fhACORDEBitPattern[1] = new TH1D("ACORDERawDataMM","ACORDE-MultiMuon",60,1,60);//AcordeMultiMuon BitPattern
91 fhACORDEBitPattern[2] = new TH1D("ACORDERawDataSMM","ACORDE-SingleMuonMultiplicity",60,1,60);//AcordeSingleMuon Multiplicity
92 fhACORDEBitPattern[3] = new TH1D("ACORDERawDataMMM","ACORDE-MultiMuonMultiplicity",60,1,60);//AcordeMultiMuon Multiplicity
93 for(Int_t i=0;i<4;i++)
95 Add2RawsList(fhACORDEBitPattern[i],i);
98 //____________________________________________________________________________
100 void AliACORDEQADataMakerRec::InitRecPoints()
102 // create cluster histograms in RecPoint subdir
103 // Not needed for ACORDE by now !!!
105 //____________________________________________________________________________
106 void AliACORDEQADataMakerRec::InitESDs()
108 //create ESDs histograms in ESDs subdir
115 name = "hESDsSingle";
116 fhESDsSingle = new TH1F(name.Data(),"hESDsSingle",60,0,60);
117 Add2ESDsList( fhESDsSingle,0);
120 fhESDsMulti = new TH1F(name.Data(),"hESDsMulti",60,0,60);
121 Add2ESDsList( fhESDsMulti,1);
123 //____________________________________________________________________________
124 void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)
126 //fills QA histos for RAW
128 AliACORDERawStream rawStream(rawReader);
133 bool kroSingle[60],kroMulti[60];
136 for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}
140 rawReader->NextEvent();
142 dy[0]=rawStream.GetWord(0);
143 dy[1]=rawStream.GetWord(1);
144 dy[2]=rawStream.GetWord(2);
145 dy[3]=rawStream.GetWord(3);
147 for(Int_t r=0;r<30;++r)
149 kroSingle[r] = tmpDy & 1;
153 for(Int_t r=30;r<60;++r)
155 kroSingle[r] = tmpDy & 1;
159 for(Int_t r=0;r<30;++r)
161 kroMulti[r] = tmpDy & 1;
165 for(Int_t r=30;r<60;++r)
167 kroMulti[r] = tmpDy & 1;
172 for(Int_t r=0;r<60;++r)
176 GetRawsData(0)->Fill(r+1);
177 contSingle=contSingle+1;
181 GetRawsData(1)->Fill(r+1);
185 }GetRawsData(2)->Fill(contSingle);GetRawsData(3)->Fill(contMulti);
188 //____________________________________________________________________________
189 void AliACORDEQADataMakerRec::MakeRecPoints(TTree * clustersTree)
191 //fills QA histos for clusters
192 // Not needed for ACORDE by now !!!
194 //____________________________________________________________________________
195 void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)
197 //fills QA histos for ESD
199 AliESDACORDE * fESDACORDE= esd->GetACORDEData();
200 Int_t *fACORDEMultiMuon =fESDACORDE->GetACORDEMultiMuon();
201 Int_t *fACORDESingleMuon=fESDACORDE->GetACORDESingleMuon();
203 for(int i=0;i<60;i++){
204 if(fACORDESingleMuon[i]==1)
205 GetESDsData(0) -> Fill(i);
206 if(fACORDEMultiMuon[i]==1)
207 GetESDsData(1) -> Fill(i);