]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSTick.cxx
Centrality edges <0% and >90% checks are removed
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTick.cxx
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 ClassImp(AliPHOSTick)
33
34
35 //____________________________________________________________________________ 
36 AliPHOSTick::AliPHOSTick():
37   fTime(0),
38   fA(0),
39   fB(0)
40 {
41 }
42
43 //____________________________________________________________________________ 
44 AliPHOSTick::AliPHOSTick(Float_t time, Float_t a, Float_t slope):
45   fTime(time),
46   fA(a),
47   fB(slope)
48 {
49 }
50
51 //____________________________________________________________________________ 
52 Int_t AliPHOSTick::Compare(const TObject * obj) const {
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 //____________________________________________________________________________
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   fA = fA + fB*(tick.fTime - fTime) + tick.fA ;
73   fB = fB + tick.fB ;
74   if(tick.fTime > fTime) 
75     fTime = tick.fTime ;
76   
77 }