Data stored depends on trigger type (single/multi)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Oct 2009 08:59:41 +0000 (08:59 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Oct 2009 08:59:41 +0000 (08:59 +0000)
Mario Rodriguez Cahuantzi <mario.rodriguez.cahuantzi@cern.ch>

ACORDE/AliACORDEQADataMakerRec.cxx
ACORDE/AliACORDEReconstructor.cxx
STEER/AliESDACORDE.cxx
STEER/AliESDACORDE.h

index fd0ac99..e1e0249 100755 (executable)
-/**************************************************************************
- * 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.
-
-
-//  Authors:
-//
-//  Luciano Diaz Gonzalez <luciano.diaz@nucleares.unam.mx> (ICN-UNAM)
-//  Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> (FCFM-BUAP)
-//  Arturo Fernandez Tellez <afernan@mail.cern.ch (FCFM-BUAP)
-//
-//  Created: June 13th 2008
-//---
-// Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram
-
-
-// --- ROOT system ---
-#include <TClonesArray.h>
-#include <TFile.h> 
-#include <TH1F.h> 
-#include <TDirectory.h>
-// --- Standard library ---
-
-// --- AliRoot header files ---
-#include "AliESDEvent.h"
-#include "AliLog.h"
-#include "AliACORDEdigit.h" 
-#include "AliACORDEhit.h"
-#include "AliACORDEQADataMakerRec.h"
-#include "AliQAChecker.h"
-#include "AliACORDERawReader.h"
-#include "AliACORDERawStream.h"
-ClassImp(AliACORDEQADataMakerRec)
-           
-//____________________________________________________________________________ 
-AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker")
-{
-
-}
-//____________________________________________________________________________ 
-AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):AliQADataMakerRec() 
-{
-  SetName((const char*)qadm.GetName()) ; 
-  SetTitle((const char*)qadm.GetTitle()); 
-}
-//__________________________________________________________________
-AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )
-{
-  // Equal operator.
-  this->~AliACORDEQADataMakerRec();
-  new(this) AliACORDEQADataMakerRec(qadm);
-  return *this;
-}
-//____________________________________________________________________________
-void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
-{
-  //Detector specific actions at end of cycle
-  // do the QA checking
-  AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
-}
-
-//____________________________________________________________________________
-void AliACORDEQADataMakerRec::StartOfDetectorCycle()
-{
-  //Detector specific actions at start of cycle
-
-}
-//____________________________________________________________________________ 
-void AliACORDEQADataMakerRec::InitRaws()
-{
-  // create Raw histograms in Raw subdir
-
-  const Bool_t expert   = kTRUE ; 
-  const Bool_t saveCorr = kTRUE ; 
-  const Bool_t image    = kTRUE ; 
-  char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",
-                        "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
-                        "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
-                        "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
-                        "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
-                        "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
-
-
-  TH1F *fhACORDEBitPattern[4];
-  fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,1,60);//AcordeSingleMuon BitPattern
-  fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,1,60);//AcordeMultiMuon BitPattern
-  fhACORDEBitPattern[2] = new TH1F("ACORDEMultiplicityfromRAWSingle","Number of fired ACORDE modules;No. of fired ACORDE modules;No. of events in ACORDE",60,1,60);//AcordeSingleMuon Multiplicity
-  fhACORDEBitPattern[3] = new TH1F("ACORDEMultiplicityfromRAWMulti","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,1,60);//AcordeMultiMuon Multiplicity
-  for(Int_t i=0;i<4;i++) 
-    Add2RawsList(fhACORDEBitPattern[i],i,!expert, image, !saveCorr);
-  
-  for (Int_t iModule = 0; iModule<60; iModule++)
-  {
-       fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
-       fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);
-  }
-
-}
-//____________________________________________________________________________ 
-void AliACORDEQADataMakerRec::InitDigits()
-{
-  // create Digits histograms in Digits subdir
-  
-  const Bool_t expert   = kTRUE ; 
-  const Bool_t image    = kTRUE ; 
-  TH1F *    fhDigitsModule;
-   char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",
-                        "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
-                        "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
-                        "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
-                        "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
-                        "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
-
-
-  fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60);
-  Add2DigitsList(fhDigitsModule,0,!expert,image);
-  for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]); 
-}
-
-//____________________________________________________________________________ 
-
-void AliACORDEQADataMakerRec::InitRecPoints()
-{
-  // create cluster histograms in RecPoint subdir
-  // Not needed for ACORDE by now !!!
-}
-
-//____________________________________________________________________________
-void AliACORDEQADataMakerRec::InitESDs()
-{
-  //create ESDs histograms in ESDs subdir
-
-  const Bool_t expert   = kTRUE ; 
-  const Bool_t image    = kTRUE ; 
-  
-  TH1F *    fhESDsSingle;
-  TH1F *    fhESDsMulti;
-   char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",
-                        "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",
-                        "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",
-                        "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",
-                        "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",
-                        "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};
-
-
-   fhESDsSingle = new TH1F("ACORDEBitPatternfromESDsSingle","Distribution of ACORDE fired modules from ESDs-Single;Modules;Counts",60,1,60);
-   Add2ESDsList(fhESDsSingle,0,!expert,image);
-
-   fhESDsMulti = new TH1F("ACORDEBitPatternfromESDsMulti","Distribution of ACORDE fired modules from ESDs-Multi;Modules;Counts",60,1,60);
-   Add2ESDsList(fhESDsMulti,1,!expert,image);
-       
-   for (Int_t i=0;i<60;i++)
-   {
-       fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
-       fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);
-   }
-
-
-}
-//____________________________________________________________________________
-void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)
-{
-  //fills QA histos for RAW
-
-  rawReader->Reset();
-  AliACORDERawStream rawStream(rawReader);
-  size_t contSingle=0;
-  size_t contMulti=0;
-  UInt_t dy[4];
-
-  bool kroSingle[60],kroMulti[60];
-  UInt_t tmpDy;
-
-  for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}
-
-if(rawStream.Next())
-{
-        dy[0]=rawStream.GetWord(0);
-        dy[1]=rawStream.GetWord(1);
-        dy[2]=rawStream.GetWord(2);
-        dy[3]=rawStream.GetWord(3);
-        tmpDy=dy[0];
-        for(Int_t r=0;r<30;++r)
-        {
-                kroSingle[r] = tmpDy & 1;
-                tmpDy>>=1;
-        }
-        tmpDy=dy[1];
-        for(Int_t r=30;r<60;++r)
-        {
-                kroSingle[r] = tmpDy & 1;
-                tmpDy>>=1;
-        }
-        tmpDy=dy[2];
-        for(Int_t r=0;r<30;++r)
-        {
-                kroMulti[r] = tmpDy & 1;
-                tmpDy>>=1;
-        }
-        tmpDy=dy[3];
-        for(Int_t r=30;r<60;++r)
-        {
-                kroMulti[r] = tmpDy & 1;
-                tmpDy>>=1;
-        }
-        contSingle=0;
-       contMulti=0;
-        for(Int_t r=0;r<60;++r)
-        {
-                if(kroSingle[r]==1)
-                {
-                        GetRawsData(0)->Fill(r+1);
-                        contSingle=contSingle+1;
-                }
-               if(kroMulti[r]==1)
-               {
-                       GetRawsData(1)->Fill(r+1);
-                       contMulti++;
-               }
-
-        }GetRawsData(2)->Fill(contSingle);GetRawsData(3)->Fill(contMulti);
-}
-}
-//____________________________________________________________________________
-void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)
-{
-  //fills QA histos for Digits
-  if (fDigitsArray) 
-    fDigitsArray->Clear() ; 
-  else 
-    fDigitsArray = new TClonesArray("AliACORDEdigit",1000);
-  TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
-  if (!branch) {
-    AliWarning("ACORDE branch in Digits Tree not found");
-  } else {
-    branch->SetAddress(&fDigitsArray);
-    for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
-      branch->GetEntry(track);
-      for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) {
-        AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit);
-        if (!AcoDigit) {
-          AliError("The unchecked digit doesn't exist");
-          continue ;
-        }
-        GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
-      }
-    }
-  }
-}
-
-//____________________________________________________________________________
-void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)
-{
-  //fills QA histos for ESD
-
-  AliESDACORDE * fESDACORDE= esd->GetACORDEData();
-        Int_t *fACORDEMultiMuon =fESDACORDE->GetACORDEMultiMuon();
-        Int_t *fACORDESingleMuon=fESDACORDE->GetACORDESingleMuon();
-
-       for(int i=0;i<60;i++){
-            if(fACORDESingleMuon[i]==1)
-               GetESDsData(0) -> Fill(i);
-            if(fACORDEMultiMuon[i]==1)
-               GetESDsData(1) -> Fill(i);
-        }
-}
-
+/**************************************************************************\r
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
+ *                                                                        *\r
+ * Author: The ALICE Off-line Project.                                    *\r
+ * Contributors are mentioned in the code where appropriate.              *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          *\r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+//---\r
+//  Produces the data needed to calculate the quality assurance. \r
+//  All data must be mergeable objects.\r
+\r
+\r
+//  Authors:\r
+//\r
+//  Luciano Diaz Gonzalez <luciano.diaz@nucleares.unam.mx> (ICN-UNAM)\r
+//  Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> (FCFM-BUAP)\r
+//  Arturo Fernandez Tellez <afernan@mail.cern.ch (FCFM-BUAP)\r
+//\r
+//  Created: June 13th 2008\r
+//---\r
+// Last Update: Aug. 27th 2008 --> Implementation to declare QA expert histogram\r
+\r
+\r
+// --- ROOT system ---\r
+#include <TClonesArray.h>\r
+#include <TFile.h> \r
+#include <TH1F.h> \r
+#include <TDirectory.h>\r
+// --- Standard library ---\r
+\r
+// --- AliRoot header files ---\r
+#include "AliESDEvent.h"\r
+#include "AliLog.h"\r
+#include "AliACORDEdigit.h" \r
+#include "AliACORDEhit.h"\r
+#include "AliACORDEQADataMakerRec.h"\r
+#include "AliQAChecker.h"\r
+#include "AliACORDERawReader.h"\r
+#include "AliACORDERawStream.h"\r
+ClassImp(AliACORDEQADataMakerRec)\r
+           \r
+//____________________________________________________________________________ \r
+AliACORDEQADataMakerRec::AliACORDEQADataMakerRec():AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker")\r
+{\r
+\r
+}\r
+//____________________________________________________________________________ \r
+AliACORDEQADataMakerRec::AliACORDEQADataMakerRec(const AliACORDEQADataMakerRec& qadm):AliQADataMakerRec() \r
+{\r
+  SetName((const char*)qadm.GetName()) ; \r
+  SetTitle((const char*)qadm.GetTitle()); \r
+}\r
+//__________________________________________________________________\r
+AliACORDEQADataMakerRec& AliACORDEQADataMakerRec::operator = (const AliACORDEQADataMakerRec& qadm )\r
+{\r
+  // Equal operator.\r
+  this->~AliACORDEQADataMakerRec();\r
+  new(this) AliACORDEQADataMakerRec(qadm);\r
+  return *this;\r
+}\r
+//____________________________________________________________________________\r
+void AliACORDEQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)\r
+{\r
+  //Detector specific actions at end of cycle\r
+  // do the QA checking\r
+  AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;\r
+}\r
+\r
+//____________________________________________________________________________\r
+void AliACORDEQADataMakerRec::StartOfDetectorCycle()\r
+{\r
+  //Detector specific actions at start of cycle\r
+\r
+}\r
\r
+//____________________________________________________________________________ \r
+void AliACORDEQADataMakerRec::InitRaws()\r
+{\r
+  // create Raw histograms in Raw subdir\r
+\r
+  const Bool_t expert   = kTRUE ; \r
+  const Bool_t saveCorr = kTRUE ; \r
+  const Bool_t image    = kTRUE ; \r
+  char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",\r
+                        "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",\r
+                        "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",\r
+                        "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",\r
+                        "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",\r
+                        "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};\r
+\r
+\r
+  TH1F *fhACORDEBitPattern[4];\r
+  fhACORDEBitPattern[0] = new TH1F("ACORDEBitPatternfromRAWSingle","Distribution of ACORDE fired modules from RAW-Single;Modules;Counts",60,1,60);//AcordeSingleMuon BitPattern\r
+  fhACORDEBitPattern[1] = new TH1F("ACORDEBitPatternfromRAWMulti","Distribution of ACORDE fired modules from RAW-Multi;Modules;Counts",60,1,60);//AcordeMultiMuon BitPattern\r
+  fhACORDEBitPattern[2] = new TH1F("ACORDEMultiplicityfromRAWSingle","Number of fired ACORDE modules;No. of fired ACORDE modules;No. of events in ACORDE",60,1,60);//AcordeSingleMuon Multiplicity\r
+  fhACORDEBitPattern[3] = new TH1F("ACORDEMultiplicityfromRAWMulti","Number of fired ACORDE modules; No. of fired ACORDE modules;No. of events in ACORDE",60,1,60);//AcordeMultiMuon Multiplicity\r
+  for(Int_t i=0;i<4;i++) \r
+    Add2RawsList(fhACORDEBitPattern[i],i,!expert, image, !saveCorr);\r
+  \r
+  for (Int_t iModule = 0; iModule<60; iModule++)\r
+  {\r
+       fhACORDEBitPattern[0]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
+       fhACORDEBitPattern[1]->GetXaxis()->SetBinLabel(iModule+1,acoModule[iModule]);\r
+  }\r
+\r
+}\r
+//____________________________________________________________________________ \r
+void AliACORDEQADataMakerRec::InitDigits()\r
+{\r
+  // create Digits histograms in Digits subdir\r
+  \r
+  const Bool_t expert   = kTRUE ; \r
+  const Bool_t image    = kTRUE ; \r
+  TH1F *    fhDigitsModule;\r
+   char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",\r
+                        "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",\r
+                        "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",\r
+                        "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",\r
+                        "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",\r
+                        "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};\r
+\r
+\r
+  fhDigitsModule = new TH1F("ACORDEBitPatternfromDigits","Distribution of ACORDE from DIGITS;Modules;Counts",60,1,60);\r
+  Add2DigitsList(fhDigitsModule,0,!expert,image);\r
+  for (Int_t i=0;i<60;i++) fhDigitsModule->GetXaxis()->SetBinLabel(i+1,acoModule[i]); \r
+}\r
+\r
+//____________________________________________________________________________ \r
+\r
+void AliACORDEQADataMakerRec::InitRecPoints()\r
+{\r
+  // create cluster histograms in RecPoint subdir\r
+  // Not needed for ACORDE by now !!!\r
+}\r
+\r
+//____________________________________________________________________________\r
+void AliACORDEQADataMakerRec::InitESDs()\r
+{\r
+  //create ESDs histograms in ESDs subdir\r
+\r
+  const Bool_t expert   = kTRUE ; \r
+  const Bool_t image    = kTRUE ; \r
+  \r
+  TH1F *    fhESDsSingle;\r
+  TH1F *    fhESDsMulti;\r
+   char *acoModule[60]={"0_0","0_1","0_2","0_3","0_4","0_5","0_6","0_7","0_8","0_9",\r
+                        "1_0","1_1","1_2","1_3","1_4","1_5","1_6","1_7","1_8","1_9",\r
+                        "2_0","2_1","2_2","2_3","2_4","2_5","2_6","2_7","2_8","2_9",\r
+                        "3_0","3_1","3_2","3_3","3_4","3_5","3_6","3_7","3_8","3_9",\r
+                        "4_0","4_1","4_2","4_3","4_4","4_5","4_6","4_7","4_8","4_9",\r
+                        "5_0","5_1","5_2","5_3","5_4","5_5","5_6","5_7","5_8","5_9"};\r
+\r
+\r
+   fhESDsSingle = new TH1F("ACORDEBitPatternfromESDsSingle","Distribution of ACORDE fired modules from ESDs-Single;Modules;Counts",60,1,60);\r
+   Add2ESDsList(fhESDsSingle,0,!expert,image);\r
+\r
+   fhESDsMulti = new TH1F("ACORDEBitPatternfromESDsMulti","Distribution of ACORDE fired modules from ESDs-Multi;Modules;Counts",60,1,60);\r
+   Add2ESDsList(fhESDsMulti,1,!expert,image);\r
+       \r
+   for (Int_t i=0;i<60;i++)\r
+   {\r
+       fhESDsSingle->GetXaxis()->SetBinLabel(i+1,acoModule[i]);\r
+       fhESDsMulti->GetXaxis()->SetBinLabel(i+1,acoModule[i]);\r
+   }\r
+\r
+\r
+}\r
+//____________________________________________________________________________\r
+void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader)\r
+{\r
+  //fills QA histos for RAW\r
+\r
+  rawReader->Reset();\r
+  AliACORDERawStream rawStream(rawReader);\r
+  size_t contSingle=0;\r
+  size_t contMulti=0;\r
+  UInt_t dy[4];\r
+\r
+  bool kroSingle[60],kroMulti[60];\r
+  UInt_t tmpDy;\r
+\r
+  for(Int_t m=0;m<60;m++) {kroSingle[m]=0;kroMulti[m]=0;}\r
+\r
+if(rawStream.Next())\r
+{\r
+        dy[0]=rawStream.GetWord(0);\r
+        dy[1]=rawStream.GetWord(1);\r
+        dy[2]=rawStream.GetWord(2);\r
+        dy[3]=rawStream.GetWord(3);\r
+        tmpDy=dy[0];\r
+        for(Int_t r=0;r<30;++r)\r
+        {\r
+                kroSingle[r] = tmpDy & 1;\r
+                tmpDy>>=1;\r
+        }\r
+        tmpDy=dy[1];\r
+        for(Int_t r=30;r<60;++r)\r
+        {\r
+                kroSingle[r] = tmpDy & 1;\r
+                tmpDy>>=1;\r
+        }\r
+        tmpDy=dy[2];\r
+        for(Int_t r=0;r<30;++r)\r
+        {\r
+                kroMulti[r] = tmpDy & 1;\r
+                tmpDy>>=1;\r
+        }\r
+        tmpDy=dy[3];\r
+        for(Int_t r=30;r<60;++r)\r
+        {\r
+                kroMulti[r] = tmpDy & 1;\r
+                tmpDy>>=1;\r
+        }\r
+        contSingle=0;\r
+       contMulti=0;\r
+        for(Int_t r=0;r<60;++r)\r
+        {\r
+                if(kroSingle[r]==1)\r
+                {\r
+                        GetRawsData(0)->Fill(r+1);\r
+                        contSingle=contSingle+1;\r
+                }\r
+               if(kroMulti[r]==1)\r
+               {\r
+                       GetRawsData(1)->Fill(r+1);\r
+                       contMulti++;\r
+               }\r
+\r
+        }GetRawsData(2)->Fill(contSingle);GetRawsData(3)->Fill(contMulti);\r
+}\r
+}\r
+//____________________________________________________________________________\r
+void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree)\r
+{\r
+  //fills QA histos for Digits\r
+  if (fDigitsArray) \r
+    fDigitsArray->Clear() ; \r
+  else \r
+    fDigitsArray = new TClonesArray("AliACORDEdigit",1000);\r
+  TBranch * branch = digitsTree->GetBranch("ACORDEdigit");\r
+  if (!branch) {\r
+    AliWarning("ACORDE branch in Digits Tree not found");\r
+  } else {\r
+    branch->SetAddress(&fDigitsArray);\r
+    for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {\r
+      branch->GetEntry(track);\r
+      for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) {\r
+        AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit);\r
+        if (!AcoDigit) {\r
+          AliError("The unchecked digit doesn't exist");\r
+          continue ;\r
+        }\r
+        GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);\r
+      }\r
+    }\r
+  }\r
+}\r
+\r
+//____________________________________________________________________________\r
+void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd)\r
+{\r
+  //fills QA histos for ESD\r
+\r
+  AliESDACORDE * fESDACORDE= esd->GetACORDEData();\r
+       \r
+  for(int i=0;i<60;i++)\r
+  {\r
+       if(fESDACORDE->GetHitChannel(i)) \r
+       {\r
+               GetESDsData(0)->Fill(i);\r
+               GetESDsData(1)->Fill(i);\r
+       }\r
+  }\r
+\r
+}\r
index fad1633..609c184 100644 (file)
-/**************************************************************************
- * 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: AliACORDEReconstructor.cxx 20956 2007-09-26 14:22:18Z mrodrigu $ */
-//////////////////////////////////////////////////////////////////////////////
-//                                                                          //
-//  Class for ACORDE reconstruction                                         //
-//////////////////////////////////////////////////////////////////////////////
-
-#include "AliRawReader.h"
-
-#include "AliACORDEReconstructor.h"
-#include "AliACORDERawStream.h"
-#include "AliESDEvent.h"
-#include "AliACORDEdigit.h"
-#include "AliACORDERecoParam.h"
-
-ClassImp(AliACORDEReconstructor)
-
-AliACORDEReconstructor:: AliACORDEReconstructor():
-  AliReconstructor(),
-  fESDACORDE(0x0),
-  fAcordeRecoParam(0x0),
-  fCalibData(0x0)
-{
-  // Default constructor  
-  // Get calibration data
-
-  fCalibData = GetCalibData();
-  fAcordeRecoParam = GetRecoParam();
-}
-
-//_______________________________________________________________________
-AliACORDECalibData *AliACORDEReconstructor::GetCalibData() const
-{
-  return 0x0;
-}
-//____________________________________________________________________________
-AliACORDERecoParam *AliACORDEReconstructor::GetRecoParam() const
-{
-  return 0x0;
-}
-//_____________________________________________________________________________
-AliACORDEReconstructor& AliACORDEReconstructor::operator = 
-  (const AliACORDEReconstructor& /*reconstructor*/)
-{
-// assignment operator
-
-  Fatal("operator =", "assignment operator not implemented");
-  return *this;
-}
-
-//_____________________________________________________________________________
-AliACORDEReconstructor::~AliACORDEReconstructor()
-{
-// destructor
-  delete fESDACORDE; 
-}
-
-//_____________________________________________________________________________
-void AliACORDEReconstructor::Init()
-{
-// initializer
-    fESDACORDE  = new AliESDACORDE;
-}
-
-void AliACORDEReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const
-{
-
-  if (!digitsTree) {
-    AliError("No digits tree!");
-    return;
-  }
-
-  TClonesArray* digitsArray = new TClonesArray("AliACORDEdigit");
-  digitsTree->Branch("ACORDEdigit", &digitsArray);
-
-  rawReader->Reset();
-  AliACORDERawStream rawStream(rawReader);
-  if (rawStream.Next()) {
-    for(Int_t iChannel = 0; iChannel < 60; iChannel++) {
-      Int_t  index = iChannel / 30;
-      Int_t  bit   = iChannel % 30;
-      if (rawStream.GetWord(index) & (1 << bit))
-        new ((*digitsArray)[digitsArray->GetEntriesFast()]) AliACORDEdigit(iChannel+1,0);
-    }
-  }
-
-  digitsTree->Fill();
-                       
-}
-
-void AliACORDEReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,AliESDEvent* esd) const
-{
-
-  // fills ESD with ACORDE Digits
-
-  if (!digitsTree)
-    {
-      AliError("No digits tree!");
-      return;
-    }
-
-  TClonesArray* digitsArray = NULL;
-  TBranch* digitBranch = digitsTree->GetBranch("ACORDEdigit");
-  if (!digitBranch) {
-    AliError("No ACORDE digits branch found!");
-    return;
-  }
-  digitBranch->SetAddress(&digitsArray);
-
-  digitsTree->GetEvent(0);
-
-  Bool_t AcoADCSingle[60],AcoADCMulti[60];
-  for(Int_t i = 0; i < 60; i++) { AcoADCSingle[i] = AcoADCMulti[i] = kFALSE; }
-
-  Int_t nDigits = digitsArray->GetEntriesFast();
-    
-  for (Int_t d=0; d<nDigits; d++) {    
-    AliACORDEdigit* digit = (AliACORDEdigit*)digitsArray->At(d);
-    Int_t module = digit->GetModule();
-
-    AcoADCSingle[module-1] = kTRUE;
-    AcoADCMulti[module-1] = kTRUE;
-  }
-       
-  fESDACORDE->SetACORDESingleMuon(AcoADCSingle);
-  fESDACORDE->SetACORDEMultiMuon(AcoADCMulti);
-
-  if (esd)
-    {
-      AliDebug(1, Form("Writing ACORDE data to ESD Tree"));
-      esd->SetACORDEData(fESDACORDE);
-    }  
-}
-
-
+/**************************************************************************\r
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
+ *                                                                        *\r
+ * Author: The ALICE Off-line Project.                                    *\r
+ * Contributors are mentioned in the code where appropriate.              *\r
+ *                                                                        *\r
+ * Permission to use, copy, modify and distribute this software and its   *\r
+ * documentation strictly for non-commercial purposes is hereby granted   *\r
+ * without fee, provided that the above copyright notice appears in all   *\r
+ * copies and that both the copyright notice and this permission notice   *\r
+ * appear in the supporting documentation. The authors make no claims     *\r
+ * about the suitability of this software for any purpose. It is          *\r
+ * provided "as is" without express or implied warranty.                  *\r
+ **************************************************************************/\r
+\r
+/* $Id: AliACORDEReconstructor.cxx 20956 2007-09-26 14:22:18Z mrodrigu $ */\r
+//////////////////////////////////////////////////////////////////////////////\r
+//                                                                          //\r
+//  Class for ACORDE reconstruction                                         //\r
+//////////////////////////////////////////////////////////////////////////////\r
+\r
+#include "AliRawReader.h"\r
+\r
+#include "AliACORDEReconstructor.h"\r
+#include "AliACORDERawStream.h"\r
+#include "AliESDEvent.h"\r
+#include "AliACORDEdigit.h"\r
+#include "AliACORDERecoParam.h"\r
+\r
+ClassImp(AliACORDEReconstructor)\r
+\r
+AliACORDEReconstructor:: AliACORDEReconstructor():\r
+  AliReconstructor(),\r
+  fESDACORDE(0x0),\r
+  fAcordeRecoParam(0x0),\r
+  fCalibData(0x0)\r
+{\r
+  // Default constructor  \r
+  // Get calibration data\r
+\r
+  fCalibData = GetCalibData();\r
+  fAcordeRecoParam = GetRecoParam();\r
+}\r
+\r
+//_______________________________________________________________________\r
+AliACORDECalibData *AliACORDEReconstructor::GetCalibData() const\r
+{\r
+  return 0x0;\r
+}\r
+//____________________________________________________________________________\r
+AliACORDERecoParam *AliACORDEReconstructor::GetRecoParam() const\r
+{\r
+  return 0x0;\r
+}\r
+//_____________________________________________________________________________\r
+AliACORDEReconstructor& AliACORDEReconstructor::operator = \r
+  (const AliACORDEReconstructor& /*reconstructor*/)\r
+{\r
+// assignment operator\r
+\r
+  Fatal("operator =", "assignment operator not implemented");\r
+  return *this;\r
+}\r
+\r
+//_____________________________________________________________________________\r
+AliACORDEReconstructor::~AliACORDEReconstructor()\r
+{\r
+// destructor\r
+  delete fESDACORDE; \r
+}\r
+\r
+//_____________________________________________________________________________\r
+void AliACORDEReconstructor::Init()\r
+{\r
+// initializer\r
+    fESDACORDE  = new AliESDACORDE;\r
+}\r
+\r
+void AliACORDEReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digitsTree) const\r
+{\r
+\r
+  if (!digitsTree) {\r
+    AliError("No digits tree!");\r
+    return;\r
+  }\r
+\r
+  TClonesArray* digitsArray = new TClonesArray("AliACORDEdigit");\r
+  digitsTree->Branch("ACORDEdigit", &digitsArray);\r
+\r
+  rawReader->Reset();\r
+  AliACORDERawStream rawStream(rawReader);\r
+  if (rawStream.Next()) {\r
+    for(Int_t iChannel = 0; iChannel < 60; iChannel++) {\r
+      Int_t  index = iChannel / 30;\r
+      Int_t  bit   = iChannel % 30;\r
+      if (rawStream.GetWord(index) & (1 << bit))\r
+        new ((*digitsArray)[digitsArray->GetEntriesFast()]) AliACORDEdigit(iChannel+1,0);\r
+    }\r
+  }\r
+\r
+  digitsTree->Fill();\r
+                       \r
+}\r
+\r
+void AliACORDEReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,AliESDEvent* esd) const\r
+{\r
+\r
+  // fills ESD with ACORDE Digits\r
+\r
+  if (!digitsTree)\r
+    {\r
+      AliError("No digits tree!");\r
+      return;\r
+    }\r
+\r
+  TClonesArray* digitsArray = NULL;\r
+  TBranch* digitBranch = digitsTree->GetBranch("ACORDEdigit");\r
+  if (!digitBranch) {\r
+    AliError("No ACORDE digits branch found!");\r
+    return;\r
+  }\r
+  digitBranch->SetAddress(&digitsArray);\r
+\r
+  digitsTree->GetEvent(0);\r
+\r
+  Bool_t AcoHitSingle[60],AcoHitMulti[60];\r
+  for(Int_t i = 0; i < 60; i++) { AcoHitSingle[i] = AcoHitMulti[i] = kFALSE; }\r
+\r
+  Int_t nDigits = digitsArray->GetEntriesFast();\r
+    \r
+  for (Int_t d=0; d<nDigits; d++) {    \r
+    AliACORDEdigit* digit = (AliACORDEdigit*)digitsArray->At(d);\r
+    Int_t module = digit->GetModule();\r
+\r
+    AcoHitSingle[module-1] = kTRUE;\r
+    AcoHitMulti[module-1] = kTRUE;\r
+  }  \r
+  TString ActiveTriggerDetector = esd->GetFiredTriggerClasses();\r
+  if (ActiveTriggerDetector.Contains("ASL")) fESDACORDE->SetACORDEBitPattern(AcoHitSingle);\r
+  else if (ActiveTriggerDetector.Contains("AMU")) fESDACORDE->SetACORDEBitPattern(AcoHitMulti);\r
+       else fESDACORDE->SetACORDEBitPattern(AcoHitSingle);\r
+\r
+  if (esd)\r
+    {\r
+      AliDebug(1, Form("Writing ACORDE data to ESD Tree"));\r
+      esd->SetACORDEData(fESDACORDE);\r
+    }  \r
+}\r
+\r
+\r
index f642521..ecfe117 100644 (file)
@@ -1,68 +1,75 @@
-#include "AliESDACORDE.h"
-
-ClassImp(AliESDACORDE)
-
-AliESDACORDE::AliESDACORDE():TObject()
-{
- //Default constructor
-       for(Int_t i=0;i<60;i++)
-       {
-               fACORDESingleMuon[i] = fACORDEMultiMuon[i] = 0;
-       }
-}
-
-
-AliESDACORDE::AliESDACORDE(const AliESDACORDE &o)
-  :TObject(o)
-
-{      
-       //Default constructor
-       for(Int_t i=0;i<60;i++)
-       {
-               fACORDESingleMuon[i] = o.fACORDESingleMuon[i];
-               fACORDEMultiMuon[i] = o.fACORDEMultiMuon[i];
-       }
-}
-
-
-AliESDACORDE::AliESDACORDE(Int_t* MACORDESingleMuon, Int_t* MACORDEMultiMuon):TObject()
-{
-
-       //Constructor
-
-       for(Int_t i=0;i<60;i++)
-       {
-               fACORDESingleMuon[i] = MACORDESingleMuon[i];
-               fACORDEMultiMuon[i] = MACORDEMultiMuon[i];
-       }
-}
-
-AliESDACORDE& AliESDACORDE::operator=(const AliESDACORDE& o)
-{
-       if(this==&o)return *this;
-       TObject::operator=(o);
-
-       // Assignment operator
-       for(Int_t i=0; i<60; i++)
-       {
-               fACORDESingleMuon[i] = o.fACORDESingleMuon[i];
-               fACORDEMultiMuon[i] = o.fACORDEMultiMuon[i];
-       }
-       
-       return *this;
-}
-
-void AliESDACORDE::Copy(TObject &obj) const {
-  
-  // this overwrites the virtual TOBject::Copy()
-  // to allow run time copying without casting
-  // in AliESDEvent
-
-  if(this==&obj)return;
-  AliESDACORDE *robj = dynamic_cast<AliESDACORDE*>(&obj);
-  if(!robj)return; // not an AliESDACRDE
-  *robj = *this;
-
-}
-
-
+\r
+\r
+// Last update: October 2th 2009 \r
+\r
+#include "AliESDACORDE.h"\r
+\r
+ClassImp(AliESDACORDE)\r
+\r
+AliESDACORDE::AliESDACORDE():TObject()\r
+{\r
+ //Default constructor\r
+       for(Int_t i=0;i<60;i++)\r
+       {\r
+               fACORDEBitPattern[i] = 0;\r
+       }\r
+}\r
+\r
+\r
+AliESDACORDE::AliESDACORDE(const AliESDACORDE &o)\r
+  :TObject(o)\r
+\r
+{      \r
+       //Default constructor\r
+       for(Int_t i=0;i<60;i++)\r
+       {\r
+               fACORDEBitPattern[i] = o.fACORDEBitPattern[i];\r
+       }\r
+}\r
+\r
+\r
+AliESDACORDE::AliESDACORDE(Bool_t* MACORDEBitPattern):TObject()\r
+{\r
+\r
+       //Constructor\r
+\r
+       for(Int_t i=0;i<60;i++)\r
+       {\r
+               fACORDEBitPattern[i] = MACORDEBitPattern[i];\r
+       }\r
+}\r
+\r
+AliESDACORDE& AliESDACORDE::operator=(const AliESDACORDE& o)\r
+{\r
+       if(this==&o)return *this;\r
+       TObject::operator=(o);\r
+\r
+       // Assignment operator\r
+       for(Int_t i=0; i<60; i++)\r
+       {\r
+               fACORDEBitPattern[i] = o.fACORDEBitPattern[i];\r
+       }\r
+       \r
+       return *this;\r
+}\r
+\r
+\r
+Bool_t AliESDACORDE::GetHitChannel(Int_t i)\r
+{\r
+       return fACORDEBitPattern[i];\r
+}\r
+\r
+void AliESDACORDE::Copy(TObject &obj) const {\r
+  \r
+  // this overwrites the virtual TOBject::Copy()\r
+  // to allow run time copying without casting\r
+  // in AliESDEvent\r
+\r
+  if(this==&obj)return;\r
+  AliESDACORDE *robj = dynamic_cast<AliESDACORDE*>(&obj);\r
+  if(!robj)return; // not an AliESDACRDE\r
+  *robj = *this;\r
+\r
+}\r
+\r
+\r
index b645c92..a860d3e 100644 (file)
@@ -1,39 +1,38 @@
-#ifndef AliESDACORDE_H
-#define AliESDACORDE_H
-
-#include <TObject.h>
-// Send comments to:
-// Mario Rodriguez <mrodrigu@mail.cern.ch>
-// Luciano Diaz <luciano.diaz@nucleares.unam.mx>
-class AliESDACORDE : public TObject
-{
-
- public:
-  AliESDACORDE();
-  AliESDACORDE(const AliESDACORDE&);
-  AliESDACORDE(Int_t *ACORDESingleMuon,Int_t *ACORDEMultiMuon); 
-  virtual ~AliESDACORDE() {};
-  virtual void Copy(TObject &) const;
-
- // We define the "setters" for ACORDE
-
-  void SetACORDEMultiMuon(Bool_t ACORDEMultiMuon[60]){for(Int_t i=0;i<60;i++){fACORDEMultiMuon[i]=ACORDEMultiMuon[i];}}
-  
-  void SetACORDESingleMuon(Bool_t ACORDESingleMuon[60]){for(Int_t i=0;i<60;i++){fACORDESingleMuon[i]=ACORDESingleMuon[i];}} 
-  
- // Getters    
-
-  Int_t* GetACORDESingleMuon() const{return (int*) fACORDESingleMuon;}
-  Int_t* GetACORDEMultiMuon()  const{return (int*) fACORDEMultiMuon;}
-  AliESDACORDE &operator=(const AliESDACORDE& source);
-  
- protected:
-  
-  Bool_t       fACORDESingleMuon[60];  // array with the Single Muon hits in the 60 Acorde's Modules 
-  Bool_t       fACORDEMultiMuon[60];   // array with the Multi Muon hits in the 60 Acorde's Modules
-
-  ClassDef(AliESDACORDE, 2)
-
-};
-
-#endif
+#ifndef AliESDACORDE_H\r
+#define AliESDACORDE_H\r
+\r
+#include <TObject.h>\r
+// Send comments to:\r
+// Mario Rodriguez <mrodrigu@mail.cern.ch>\r
+// Luciano Diaz <luciano.diaz@nucleares.unam.mx>\r
+// Last update: October 2th 2009 \r
+\r
+class AliESDACORDE : public TObject\r
+{\r
+\r
+ public:\r
+  AliESDACORDE();\r
+  AliESDACORDE(const AliESDACORDE&);\r
+  AliESDACORDE(Bool_t *ACORDEBitPattern); \r
+  virtual ~AliESDACORDE() {};\r
+  virtual void Copy(TObject &) const;\r
+\r
+ // We define the "setters" for ACORDE\r
+\r
+  void SetACORDEBitPattern(Bool_t ACORDEBitPattern[60]){for (Int_t i=0;i<60;i++){fACORDEBitPattern[i]=ACORDEBitPattern[i];}}\r
+\r
+  \r
+  \r
+ // Getters    \r
+  Bool_t GetHitChannel(Int_t i);\r
+  AliESDACORDE &operator=(const AliESDACORDE& source);\r
+  \r
+ protected:\r
+\r
+  Bool_t       fACORDEBitPattern[60];  // Array with the ACORDE's bitpattern\r
+\r
+  ClassDef(AliESDACORDE, 2)\r
+\r
+};\r
+\r
+#endif\r