]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSTriggerRawDigit.cxx
Update pr task: drathee
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTriggerRawDigit.cxx
CommitLineData
e1aec4f9 1/**************************************************************************
2 * Copyright(c) 1998-1999, 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/*
16 4x4 TRU represented by position and amplitude.
17 Author: Boris Polishchuk (Boris.Polishchuk@cern.ch)
18*/
19
20// --- AliRoot header files ---
21#include "AliPHOSTriggerRawDigit.h"
22
23ClassImp(AliPHOSTriggerRawDigit)
24
25AliPHOSTriggerRawDigit::AliPHOSTriggerRawDigit() :
26AliDigitNew(),fMod(-1),fXIdx(-1),fZIdx(-1),fTRURow(-1),fBranch(-1)
27{
28 //Default constructor.
29}
30
31AliPHOSTriggerRawDigit::AliPHOSTriggerRawDigit(Int_t module, Int_t xIdx, Int_t zIdx, Int_t TRURow, Int_t branch, Int_t amp) :
32 AliDigitNew(),fMod(module),fXIdx(xIdx),fZIdx(zIdx),fTRURow(TRURow),fBranch(branch)
33{
34 fAmp = amp;
35}
36
37AliPHOSTriggerRawDigit::AliPHOSTriggerRawDigit(const AliPHOSTriggerRawDigit & tdigit) :
38 AliDigitNew(tdigit),fMod(tdigit.fMod),fXIdx(tdigit.fXIdx),fZIdx(tdigit.fZIdx),
39 fTRURow(tdigit.fTRURow),fBranch(tdigit.fBranch)
40{
41 fAmp = tdigit.fAmp;
42}
43
9e8a4ac0 44AliPHOSTriggerRawDigit& AliPHOSTriggerRawDigit::operator=(const AliPHOSTriggerRawDigit & tdigit)
45{
46 if (&tdigit != this) {
47 AliDigitNew::operator=(tdigit);
48 fMod = tdigit.fMod;
49 fXIdx = tdigit.fXIdx;
50 fZIdx = tdigit.fZIdx;
51 fTRURow = tdigit.fTRURow;
52 fBranch = tdigit.fBranch;
53 }
54
55 return *this;
56}
57
e1aec4f9 58void AliPHOSTriggerRawDigit::GetModXZ(Int_t& mod, Int_t& modX, Int_t& modZ)
59{
60 //Return 4x4 region bottom left cell position.
61
62 Int_t kN2x2XPrTRURow = 8;
63 Int_t kN2x2ZPrBranch = 14;
64
65 modX = (fXIdx + fTRURow * kN2x2XPrTRURow)*2;
66 modZ = (fZIdx + fBranch * kN2x2ZPrBranch)*2;
67 mod = fMod;
68
69}