Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 1998-2013, ALICE Experiment at CERN, All rights reserved. *
3 : * *
4 : * Author: The ALICE Off-line Project. *
5 : * Contributors are mentioned in the code where appropriate. *
6 : * *
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 : **************************************************************************/
15 : #include "AliEMCALTriggerFastOR.h"
16 : #include "AliEMCALGeometry.h"
17 :
18 : AliEMCALTriggerFastOR::AliEMCALTriggerFastOR() :
19 0 : fAbsId(0),
20 0 : fGlobalCol(0),
21 0 : fGlobalRow(0),
22 0 : fSM(0),
23 0 : fCol(0),
24 0 : fRow(0),
25 0 : fL0Amp(0),
26 0 : fL1Amp(0),
27 0 : fL0Time(0)
28 0 : {
29 :
30 0 : }
31 :
32 : AliEMCALTriggerFastOR::AliEMCALTriggerFastOR(UInt_t L0amp, UInt_t L1amp, Int_t absId, const AliEMCALGeometry* geom) :
33 0 : fAbsId(0),
34 0 : fGlobalCol(0),
35 0 : fGlobalRow(0),
36 0 : fSM(0),
37 0 : fCol(0),
38 0 : fRow(0),
39 0 : fL0Amp(L0amp),
40 0 : fL1Amp(L1amp),
41 0 : fL0Time(0)
42 0 : {
43 0 : Initialize(absId, geom);
44 0 : }
45 :
46 : AliEMCALTriggerFastOR::AliEMCALTriggerFastOR(UInt_t L0amp, UInt_t L1amp, Int_t globalRow, Int_t glocalCol, const AliEMCALGeometry* geom) :
47 0 : fAbsId(0),
48 0 : fGlobalCol(0),
49 0 : fGlobalRow(0),
50 0 : fSM(0),
51 0 : fCol(0),
52 0 : fRow(0),
53 0 : fL0Amp(L0amp),
54 0 : fL1Amp(L1amp),
55 0 : fL0Time(0)
56 0 : {
57 0 : Initialize(globalRow, glocalCol, geom);
58 0 : }
59 :
60 :
61 : void AliEMCALTriggerFastOR::Initialize(UInt_t L0amp, UInt_t L1amp, Int_t absId, const AliEMCALGeometry* geom)
62 : {
63 0 : fL0Amp = L0amp;
64 0 : fL1Amp = L1amp;
65 :
66 0 : Initialize(absId, geom);
67 0 : }
68 :
69 : void AliEMCALTriggerFastOR::Initialize(Int_t absId, const AliEMCALGeometry* geom)
70 : {
71 0 : Int_t SM = 0;
72 0 : Int_t col = 0;
73 0 : Int_t row = 0;
74 0 : Int_t gcol = 0;
75 0 : Int_t grow = 0;
76 :
77 0 : geom->GetPositionInEMCALFromAbsFastORIndex(absId, gcol, grow);
78 0 : geom->GetPositionInSMFromAbsFastORIndex(absId, SM, col, row);
79 :
80 0 : fCol = col;
81 0 : fRow = row;
82 0 : fGlobalCol = gcol;
83 0 : fGlobalRow = grow;
84 0 : fSM = SM;
85 0 : fAbsId = absId;
86 0 : }
87 :
88 : void AliEMCALTriggerFastOR::Initialize(UInt_t L0amp, UInt_t L1amp, Int_t globalRow, Int_t glocalCol, Int_t L0time, const AliEMCALGeometry* geom)
89 : {
90 0 : fL0Amp = L0amp;
91 0 : fL1Amp = L1amp;
92 0 : fL0Time = L0time;
93 :
94 0 : Initialize(globalRow, glocalCol, geom);
95 0 : }
96 :
97 : void AliEMCALTriggerFastOR::Initialize(Int_t globalRow, Int_t glocalCol, const AliEMCALGeometry* geom)
98 : {
99 0 : Int_t absId = 0;
100 0 : Int_t SM = 0;
101 0 : Int_t col = 0;
102 0 : Int_t row = 0;
103 :
104 0 : geom->GetAbsFastORIndexFromPositionInEMCAL(glocalCol, globalRow, absId);
105 0 : geom->GetPositionInSMFromAbsFastORIndex(absId, SM, col, row);
106 :
107 0 : fCol = col;
108 0 : fRow = row;
109 0 : fGlobalCol = glocalCol;
110 0 : fGlobalRow = globalRow;
111 0 : fSM = SM;
112 0 : fAbsId = absId;
113 0 : }
|