AliRoot Core  3dc7879 (3dc7879)
AliEMCALTriggerPatch.cxx
Go to the documentation of this file.
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 #include "AliEMCALTriggerPatch.h"
17 #include "AliLog.h"
18 
20 ClassImp(AliEMCALTriggerPatch) ;
22 
25 //____________
27 fPosition(0x0),
28 fSum(0),
29 fTime(0),
30 fPeaks(0)
31 { }
32 
35 //____________
36 AliEMCALTriggerPatch::AliEMCALTriggerPatch(Int_t i, Int_t j, Int_t k, Int_t l) : TObject(),
37 fPosition(new TVector2(i, j)),
38 fSum(k),
39 fTime(l),
40 fPeaks(0)
41 { }
42 
45 //____________________________________________________________________
47 fPosition(new TVector2(*other.fPosition)),
48 fSum(other.fSum),
49 fTime(other.fTime),
50 fPeaks(other.fPeaks)
51 { }
52 
55 //____________
57 {
58  if (fPosition) delete fPosition;
59 }
60 
63 //____________
64 void AliEMCALTriggerPatch::SetPeak(Int_t x, Int_t y, Int_t sizeX, Int_t sizeY)
65 {
66  if (sizeX * sizeY > 31) AliError("32b limit exceeded!");
67 
68  fPeaks = (fPeaks | (1 << (y * sizeX + x)));
69 }
70 
73 //____________
74 void AliEMCALTriggerPatch::Print(const Option_t*) const
75 {
76  printf("]> Patch at (%2d , %2d) w/ sum %3d time %2d\n",
77  (int)fPosition->X(), (int)fPosition->Y(), fSum, fTime);
78 }
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
virtual ~AliEMCALTriggerPatch()
Destructor.
TVector2 * fPosition
Position.
EMCal trigger patch implementation.
void Print(const Option_t *) const
Print patch info.
AliEMCALTriggerPatch()
Default constructor.
Int_t fPeaks
Peaks (L0 only)
#define AliError(message)
Definition: AliLog.h:591
void SetPeak(Int_t x, Int_t y, Int_t sizeX, Int_t sizeY)
Peak (add explanation)