]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSQASSDDataMakerRec.h
Updated online raw data QA for the SSD - occupancy calculation per module (Panos)
[u/mrichter/AliRoot.git] / ITS / AliITSQASSDDataMakerRec.h
1 #ifndef AliITSQASSDDataMakerRec_H
2 #define AliITSQASSDDataMakerRec_H
3 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /*  $Id$  */
7
8 //
9 //  Checks the quality assurance. 
10 //  By comparing with reference data
11 //  contained in a DB
12 //  -------------------------------------------------------------
13 //  W. Ferrarese + P. Cerello Feb 2008
14 //  INFN Torino
15
16 #include "AliQA.h"
17 #include "AliITSQADataMakerRec.h"
18 #include "AliQADataMakerRec.h"
19
20 class TObjArray;
21 class TH1D;
22 class AliRawReader;
23 class AliITSQADataMakerRec;
24
25 class AliITSQASSDDataMakerRec: public TObject {
26
27 public:
28   AliITSQASSDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode = kFALSE, Int_t ldc=0);  //ctor
29   AliITSQASSDDataMakerRec(const AliITSQASSDDataMakerRec& qadm);
30   AliITSQASSDDataMakerRec& operator = (const AliITSQASSDDataMakerRec& qac);
31   virtual void InitRaws();
32   virtual void InitRecPoints();
33   virtual void MakeRaws(AliRawReader *rawReader);
34   virtual void MakeRecPoints(TTree *clustersTree);
35   virtual void StartOfDetectorCycle();
36   virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);
37   virtual ~AliITSQASSDDataMakerRec(); // dtor
38   Int_t GetOffset() { return fGenOffset; }
39   Int_t GetTaskHisto() { return fSSDhTask; }
40
41  private:
42
43   Double_t GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix); 
44   Double_t GetOccupancyModule(TH1 *lHisto, Int_t stripside); 
45   
46   static const Int_t fgkNumOfLDCs = 3;      //number of SSD LDCs
47   static const Int_t fgkNumOfDDLs = 16;      //number of SSD DDLs
48   static const Int_t fgkSSDMODULES = 1698;      //total number of SSD modules
49   static const Int_t fgkSSDLADDERSLAYER5 = 34; //ladders on layer 5
50   static const Int_t fgkSSDLADDERSLAYER6 = 38; //ladders on layer 6
51   static const Int_t fgkSSDMODULESPERLADDERLAYER5 = 22; //modules per ladder - layer 5
52   static const Int_t fgkSSDMODULESPERLADDERLAYER6 = 25; //modules per ladder - layer 6
53   static const Int_t fgkSSDMODULESLAYER5 = 748; //total number of SSD modules - layer5
54   static const Int_t fgkSSDMODULESLAYER6 = 950; //total number of SSD modules - layer6
55   static const Int_t fgkNumberOfPSideStrips = 768; //number of P-side strips
56   
57   AliITSQADataMakerRec *fAliITSQADataMakerRec;  //pointer to the main ctor
58   Int_t   fSSDEvent;                            //event counter
59   Int_t   fSSDEventPerCycle;                    //event counter per cycle
60   Bool_t  fkOnline;                             //online (1) or offline (0) use
61   Int_t   fLDC;                                 //LDC number (0 for offline, 1 to 4 for online) 
62   Int_t   fSSDRawsOffset;                       //SSD raw data plot offset
63   Int_t   fSSDRawsCommonLevelOffset;            //Raw data QA - top level offset - histos used both online and offline 
64   Int_t   fSSDhTask;                            //number of histo booked for each SSD task
65   Int_t   fGenOffset;                           //qachecking offset
66   TH1D   *fHistSSDRawSignalModule[fgkSSDMODULES]; //raw signal vs strip number - SSD                   
67   Int_t   fOccupancyMatrix[fgkSSDMODULES][2*fgkNumberOfPSideStrips]; //occupancy values per strip
68
69   ClassDef(AliITSQASSDDataMakerRec,3)           // description 
70
71 };
72
73 #endif