]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALTick.cxx
Fix for mother volume length.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTick.cxx
CommitLineData
51ecce10 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/* $Id$ */
17
18//_________________________________________________________________________
14ce0a6e 19// Auxiliary class to
20// help calculate the
21// time of crossing
22// of the threshold by
23// the front edge of the
24// time signal
51ecce10 25//
26//*-- Author : Dmitri Peressounko (SUBATECH)
27//////////////////////////////////////////////////////////////////////////////
28
29// --- ROOT system ---
30
31// --- Standard library ---
32
33// --- AliRoot header files ---
34#include "AliEMCALTick.h"
35
36ClassImp(AliEMCALTick)
37
38
39//____________________________________________________________________________
40 AliEMCALTick::AliEMCALTick():TObject()
41{
d64c959b 42 //ctor
51ecce10 43 fTime = 0;
44 fA = 0;
45 fB = 0 ;
46}
47
48//____________________________________________________________________________
49AliEMCALTick::AliEMCALTick(Float_t time, Float_t a, Float_t slope):TObject()
50{
d64c959b 51 //ctor
51ecce10 52 fTime = time;
53 fA = a;
54 fB = slope ;
55}
56//____________________________________________________________________________
d64c959b 57Int_t AliEMCALTick::Compare(const TObject * obj) const
58{
59 // compares time values
51ecce10 60 if(obj->InheritsFrom("AliEMCALTick")){
61 AliEMCALTick * tick = (AliEMCALTick *) obj ;
62 if(fTime < tick->fTime)
63 return -1 ;
64 else
65 if(fTime == tick->fTime)
66 return 0 ;
67 else
68 return 1 ;
69 }
70 else
71 return 1 ;
72}
73//____________________________________________________________________________
74void AliEMCALTick::operator+=(AliEMCALTick const & tick)
75{
76 // Adds the amplitude of digits and completes the list of primary particles
77 // if amplitude is larger than
78
79 fA = fA + fB*(tick.fTime - fTime) + tick.fA ;
80 fB = fB + tick.fB ;
81 if(tick.fTime > fTime)
82 fTime = tick.fTime ;
83
84}