]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSTick.cxx
Merging of the three alignment macros into one
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTick.cxx
CommitLineData
7437a0f7 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
88cb7938 21//
7437a0f7 22//*-- Author : Dmitri Peressounko (SUBATECH)
23//////////////////////////////////////////////////////////////////////////////
24
25// --- ROOT system ---
26
27// --- Standard library ---
28
29// --- AliRoot header files ---
30#include "AliPHOSTick.h"
31
32ClassImp(AliPHOSTick)
33
34
35//____________________________________________________________________________
43fbaae1 36AliPHOSTick::AliPHOSTick():
37 fTime(0),
38 fA(0),
39 fB(0)
7437a0f7 40{
7437a0f7 41}
42
43//____________________________________________________________________________
43fbaae1 44AliPHOSTick::AliPHOSTick(Float_t time, Float_t a, Float_t slope):
45 fTime(time),
46 fA(a),
47 fB(slope)
7437a0f7 48{
7437a0f7 49}
43fbaae1 50
7437a0f7 51//____________________________________________________________________________
88cb7938 52Int_t AliPHOSTick::Compare(const TObject * obj) const {
7437a0f7 53 if(obj->InheritsFrom("AliPHOSTick")){
54 AliPHOSTick * tick = (AliPHOSTick *) obj ;
55 if(fTime < tick->fTime)
56 return -1 ;
57 else
58 if(fTime == tick->fTime)
59 return 0 ;
60 else
61 return 1 ;
62 }
63 else
64 return 1 ;
65}
66//____________________________________________________________________________
67void 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 fA = fA + fB*(tick.fTime - fTime) + tick.fA ;
73 fB = fB + tick.fB ;
74 if(tick.fTime > fTime)
75 fTime = tick.fTime ;
76
77}