New Trigger Emulation and Trigger access from data (Rachid Guernane)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTriggerData.h
CommitLineData
916f1e76 1#ifndef ALIEMCALTRIGGERDATA_H
2#define ALIEMCALTRIGGERDATA_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/*
7EMCal trigger data container
8for persistency of produced data presently stored in TTreeD
9Author: R. GUERNANE LPSC Grenoble CNRS/IN2P3
10*/
11
12#include <TObject.h>
13#include <TVector2.h>
14
15//#include <TObjArray.h>
16//#include <Riostream.h>
17
18#include <TClonesArray.h>
19
20class AliEMCALTriggerData : public TObject
21{
22
23public:
24 AliEMCALTriggerData();
25 virtual ~AliEMCALTriggerData();
26
27 virtual void SetL0Patches(Int_t i, const TClonesArray& patches);
28 virtual void SetL0RegionSize( TVector2 size ) { fL0RegionSize = size; }
29 virtual void SetL0SubRegionSize( TVector2 size ) { fL0SubRegionSize = size; }
30 virtual void SetL0PatchSize( TVector2 size ) { fL0PatchSize = size; }
31 virtual void SetL0Peaks(Int_t v, Int_t arr[96][2] ) { for (Int_t i=0;i<96;i++) for (Int_t j=0;j<2;j++) fL0Peaks[v][i][j] = arr[i][j]; }
32
33 virtual void SetL1GammaPatches(const TClonesArray& patches);
34 virtual void SetL1JetPatches(const TClonesArray& patches);
35
36 virtual void SetL1Region(Int_t**& region);
37 virtual void SetL1V0(const Int_t*& arr);
38
39 virtual void SetL1RegionSize( TVector2 size ) { fL1RegionSize = size; }
40 virtual void SetL1GammaPatchSize( TVector2 size ) { fL1GammaPatchSize = size; }
41 virtual void SetL1GammaSubRegionSize( TVector2 size ) { fL1GammaSubRegionSize = size; }
42 virtual void SetL1JetPatchSize( TVector2 size ) { fL1JetPatchSize = size; }
43 virtual void SetL1JetSubRegionSize( TVector2 size ) { fL1JetSubRegionSize = size; }
44
45 virtual void L0Patches( TClonesArray& patches ) const { patches = *fL0Patches; }
46 virtual TClonesArray* L0Patches( ) const { return fL0Patches; }
47 virtual void L0RegionSize( TVector2 size ) const { size = fL0RegionSize; }
48 virtual TVector2 L0RegionSize( ) const { return fL0RegionSize; }
49 virtual void L0PatchSize( TVector2 size ) const { size = fL0PatchSize; }
50 virtual TVector2 L0PatchSize( ) const { return fL0PatchSize; }
51 virtual void L0SubRegionSize( TVector2 size ) const { size = fL0SubRegionSize; }
52 virtual TVector2 L0SubRegionSize( ) const { return fL0SubRegionSize; }
53 virtual void L0NPatches( Int_t arr[32] ) const { for (Int_t i=0;i<32;i++) arr[i] = fL0NPatches[i]; }
54 virtual void L0Peaks( Int_t arr[32][96][2] ) const {
55 for (Int_t i=0;i<32;i++) for (Int_t j=0;j<96;j++) for (Int_t k=0;k<2;k++) arr[i][j][k] = fL0Peaks[i][j][k]; }
56
57 virtual void L1GammaPatches( TClonesArray& patches ) const { patches = *fL1GammaPatches; }
58 virtual TClonesArray* L1GammaPatches( ) const { return fL1GammaPatches; }
59 virtual void L1JetPatches( TClonesArray& patches ) const { patches = *fL1JetPatches; }
60 virtual TClonesArray* L1JetPatches( ) const { return fL1JetPatches; }
61 virtual void L1Region( Int_t arr[][64] ) const { for (Int_t i=0;i<48;i++) for (Int_t j=0;j<64;j++) { arr[i][j] = fL1Region[i][j]; } }
62 virtual Int_t* L1V0( ) { return &fL1V0[0]; }
63 virtual void L1RegionSize( TVector2& size ) const { size = fL1RegionSize; }
64 virtual TVector2 L1RegionSize( ) const { return fL1RegionSize; }
65 virtual void L1GammaPatchSize( TVector2& size ) const { size = fL1GammaPatchSize; }
66 virtual TVector2 L1GammaPatchSize( ) const { return fL1GammaPatchSize; }
67 virtual void L1GammaSubRegionSize( TVector2& size ) const { size = fL1GammaSubRegionSize; }
68 virtual TVector2 L1GammaSubRegionSize( ) const { return fL1GammaSubRegionSize; }
69 virtual void L1JetPatchSize( TVector2& size ) const { size = fL1JetPatchSize; }
70 virtual TVector2 L1JetPatchSize( ) const { return fL1JetPatchSize; }
71 virtual void L1JetSubRegionSize( TVector2& size ) const { size = fL1JetSubRegionSize; }
72 virtual TVector2 L1JetSubRegionSize( ) const { return fL1JetSubRegionSize; }
73
74 virtual void Scan() const;
75
76 virtual void Reset();
77
78private:
79
80 AliEMCALTriggerData(const AliEMCALTriggerData& rhs); // NOT implemented
81 AliEMCALTriggerData& operator=(const AliEMCALTriggerData& rhs); // NOT implemented
82
83 TClonesArray* fL0Patches; // array of patches
84 Int_t fL0NPatches[32];
85 TVector2 fL0RegionSize; // region size in units of fast or
86 TVector2 fL0SubRegionSize; // subregion size in units of fast or
87 TVector2 fL0PatchSize; // patch size in units of subregion
88 Int_t fL0Peaks[32][96][2]; // max & pos of the max for ADC channels
89
90 TClonesArray* fL1GammaPatches; // array of patches
91 TClonesArray* fL1JetPatches; // array of patches
92 Int_t fL1Region[48][64]; // STU FastOR 48-by-124
93 Int_t fL1V0[2]; // V0A V0C multiplicity estimates
94 TVector2 fL1RegionSize; // region size in units of fast or
95 TVector2 fL1GammaPatchSize; // patch size in units of subregion
96 TVector2 fL1GammaSubRegionSize; // subregion size in units of fast or
97 TVector2 fL1JetPatchSize; // patch size in units of subregion
98 TVector2 fL1JetSubRegionSize; // subregion size in units of fast or
99
100 ClassDef(AliEMCALTriggerData,1)
101};
102
103#endif