Line data Source code
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 : //_________________________________________________________________________
19 : // Auxiliary class to help calculate the time of crossing
20 : // of the threshold by the front edge of the time signal
21 : //
22 : //*-- Author : Dmitri Peressounko (SUBATECH)
23 : //////////////////////////////////////////////////////////////////////////////
24 :
25 : // --- ROOT system ---
26 :
27 : // --- Standard library ---
28 :
29 : // --- AliRoot header files ---
30 : #include "AliPHOSTick.h"
31 :
32 22 : ClassImp(AliPHOSTick)
33 :
34 :
35 : //____________________________________________________________________________
36 0 : AliPHOSTick::AliPHOSTick():
37 0 : fTime(0),
38 0 : fA(0),
39 0 : fB(0)
40 0 : {
41 0 : }
42 :
43 : //____________________________________________________________________________
44 0 : AliPHOSTick::AliPHOSTick(Float_t time, Float_t a, Float_t slope):
45 0 : fTime(time),
46 0 : fA(a),
47 0 : fB(slope)
48 0 : {
49 0 : }
50 :
51 : //____________________________________________________________________________
52 : Int_t AliPHOSTick::Compare(const TObject * obj) const {
53 0 : if(obj->InheritsFrom("AliPHOSTick")){
54 0 : AliPHOSTick * tick = (AliPHOSTick *) obj ;
55 0 : if(fTime < tick->fTime)
56 0 : return -1 ;
57 : else
58 0 : if(fTime == tick->fTime)
59 0 : return 0 ;
60 : else
61 0 : return 1 ;
62 : }
63 : else
64 0 : return 1 ;
65 0 : }
66 : //____________________________________________________________________________
67 : void AliPHOSTick::operator+=(AliPHOSTick const & tick)
68 : {
69 : // Adds the amplitude of digits and completes the list of primary particles
70 : // if amplitude is larger than
71 :
72 0 : fA = fA + fB*(tick.fTime - fTime) + tick.fA ;
73 0 : fB = fB + tick.fB ;
74 0 : if(tick.fTime > fTime)
75 0 : fTime = tick.fTime ;
76 :
77 0 : }
|