]>
Commit | Line | Data |
---|---|---|
299ec65d | 1 | /************************************************************************** |
2 | * Author: Panos Christakoglou. * | |
3 | * Contributors are mentioned in the code where appropriate. * | |
4 | * * | |
5 | * Permission to use, copy, modify and distribute this software and its * | |
6 | * documentation strictly for non-commercial purposes is hereby granted * | |
7 | * without fee, provided that the above copyright notice appears in all * | |
8 | * copies and that both the copyright notice and this permission notice * | |
9 | * appear in the supporting documentation. The authors make no claims * | |
10 | * about the suitability of this software for any purpose. It is * | |
11 | * provided "as is" without express or implied warranty. * | |
12 | **************************************************************************/ | |
13 | ||
14 | /* $Id$ */ | |
15 | ||
16 | //----------------------------------------------------------------- | |
17 | // AliLHCTagCuts class | |
18 | // This is the class to deal with the LHC tag level cuts | |
19 | // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch | |
20 | //----------------------------------------------------------------- | |
21 | ||
22 | class AliLog; | |
23 | ||
24 | #include "AliLHCTag.h" | |
25 | #include "AliLHCTagCuts.h" | |
26 | ||
27 | ClassImp(AliLHCTagCuts) | |
28 | ||
29 | ||
30 | //___________________________________________________________________________ | |
31 | AliLHCTagCuts::AliLHCTagCuts() : | |
32 | TObject(), | |
33 | fLHCState(0), | |
34 | fLHCStateFlag(kFALSE), | |
35 | fLHCLuminosityMin(0), | |
36 | fLHCLuminosityMax(0), | |
37 | fLHCLuminosityFlag(kFALSE) | |
38 | { | |
39 | //Default constructor which calls the Reset method. | |
40 | Reset(); | |
41 | } | |
42 | ||
43 | //___________________________________________________________________________ | |
44 | AliLHCTagCuts::~AliLHCTagCuts() { | |
45 | //Defaut destructor. | |
46 | } | |
47 | ||
48 | //___________________________________________________________________________ | |
49 | void AliLHCTagCuts::Reset() { | |
50 | //Sets dummy values to every private member. | |
51 | fLHCState = "init"; | |
52 | fLHCStateFlag = kFALSE; | |
53 | fLHCLuminosityMin = -1.0; | |
54 | fLHCLuminosityMax = 0.0; | |
55 | fLHCLuminosityFlag = kFALSE; | |
56 | } | |
57 | ||
58 | //___________________________________________________________________________ | |
59 | Bool_t AliLHCTagCuts::IsAccepted(AliLHCTag *lhcTag) const { | |
60 | //Returns true if the event is accepted otherwise false. | |
61 | if(fLHCStateFlag) | |
62 | if((lhcTag->GetLHCState() != fLHCState)) | |
63 | return kFALSE; | |
64 | if(fLHCLuminosityFlag) | |
65 | if((lhcTag->GetLuminosity() < fLHCLuminosityMin)||(lhcTag->GetLuminosity() > fLHCLuminosityMax)) | |
66 | return kFALSE; | |
67 | ||
68 | return kTRUE; | |
69 | } |