]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New version to comply with AMORE requirements
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Aug 2008 00:25:20 +0000 (00:25 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Aug 2008 00:25:20 +0000 (00:25 +0000)
FMD/AliFMDQADataMakerRec.cxx
FMD/AliFMDQADataMakerRec.h

index 64d379c707ffb4e7d8ec53dedfb7f89c55ca3a28..dc0a697732596f50ada9661acf593162c2a1ede5 100644 (file)
@@ -136,12 +136,29 @@ void AliFMDQADataMakerRec::InitRecPoints()
 //_____________________________________________________________________ 
 void AliFMDQADataMakerRec::InitRaws()
 {
-  TH1I* hADCCounts      = new TH1I("hADCCounts","Dist of ADC counts",
+  
+  TH1I* hADCCounts;
+  for(Int_t det = 1; det<=3; det++) {
+    Int_t firstring = (det==1 ? 1 : 0);
+    for(Int_t iring = firstring;iring<=1;iring++) {
+      for(Int_t b = 0; b<=1;b++) {
+       
+       //Hexadecimal board numbers 0x0, 0x1, 0x10, 0x10;
+       UInt_t board = (iring == 1 ? 0 : 1);
+       board = board + b*16;
+       Char_t ring = (iring == 1 ? 'I' : 'O');
+       
+       hADCCounts      = new TH1I(Form("hADCCounts_FMD%d%c_board%d",
+                                       det, ring, board), "ADC counts",
                                   1024,0,1023);
-  hADCCounts->SetXTitle("ADC counts");
-  hADCCounts->SetYTitle("");
-  Add2RawsList(hADCCounts, 0);
-
+       hADCCounts->SetXTitle("ADC counts");
+       hADCCounts->SetYTitle("");
+       Int_t index = GetHalfringIndex(det, ring, board/16);
+       Add2RawsList(hADCCounts, index);
+       
+      }
+    }
+  }
 }
 
 //_____________________________________________________________________
@@ -215,9 +232,19 @@ void AliFMDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
        digitsAddress->Clear();
        fmdReader.ReadAdcs(digitsAddress);
        for(Int_t i=0;i<digitsAddress->GetEntriesFast();i++) {
-               //Raw ADC counts
-               AliFMDDigit* digit = static_cast<AliFMDDigit*>(digitsAddress->At(i));
-               GetRawsData(0)->Fill(digit->Counts());
+         //Raw ADC counts
+         AliFMDDigit* digit = static_cast<AliFMDDigit*>(digitsAddress->At(i));
+         UShort_t det = digit->Detector();
+         Char_t ring  = digit->Ring();
+         UShort_t sec = digit->Sector();
+         UShort_t strip = digit->Strip();
+         UInt_t ddl, board, chip, channel;
+         AliFMDParameters* pars = AliFMDParameters::Instance();
+         pars->Detector2Hardware(det,ring,sec,strip,ddl,board,chip,channel);
+         Int_t index = GetHalfringIndex(det, ring, board/16);
+         
+         GetRawsData(index)->Fill(digit->Counts());
+         
        }
 }
 
@@ -255,6 +282,21 @@ void AliFMDQADataMakerRec::StartOfDetectorCycle()
   // do?
 }
 //_____________________________________________________________________ 
+Int_t AliFMDQADataMakerRec::GetHalfringIndex(UShort_t det, 
+                                            Char_t ring, 
+                                            UShort_t board) {
+  
+  UShort_t iring  =  (ring == 'I' ? 1 : 0);
+  
+  Int_t index = (((det-1) << 2) | (iring << 1) | (board << 0));
+  
+  return index-2;
+  
+}
+
+//_____________________________________________________________________ 
+
+
 //
 // EOF
 //
index 5c431af7b6c05a0385aa7187aa8593fe7b4969e1..2555c3db47521371b643ae9315a538c8477183ab 100644 (file)
@@ -37,7 +37,7 @@ private:
   virtual void   MakeRecPoints(TTree * recpoTree); 
   virtual void   MakeRaws(AliRawReader* rawReader); 
   virtual void   StartOfDetectorCycle(); 
-
+  Int_t GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board);
   ClassDef(AliFMDQADataMakerRec,0)  // description 
   TClonesArray fDigitsArray;
   TClonesArray fRecPointsArray;