1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
19 // An event cut class for the AliStarEvent
21 // origin: Mikolaj Krzewicki (mikolaj.krzewicki@cern.ch)
26 #include "AliStarEvent.h"
27 #include "AliStarEventCuts.h"
29 ClassImp(AliStarEventCuts)
31 //-----------------------------------------------------------------------
32 AliStarEventCuts::AliStarEventCuts():
37 fCutEventNumber(kFALSE),
38 fEventNumberMax(INT_MAX),
39 fEventNumberMin(INT_MIN),
55 fCutCentralityID(kFALSE),
56 fCentralityIDMax(INT_MAX),
57 fCentralityIDMin(INT_MIN),
58 fCutNumberOfPrimaryTracks(kFALSE),
59 fNumberOfPrimaryTracksMax(INT_MAX),
60 fNumberOfPrimaryTracksMin(INT_MIN),
61 fCutNumberOfTracks(kFALSE),
62 fNumberOfTracksMax(INT_MAX),
63 fNumberOfTracksMin(INT_MIN)
68 ////-----------------------------------------------------------------------
69 //AliStarEventCuts::AliStarEventCuts(const AliStarEventCuts& someCuts):
71 // fCutID(that.fCutID),
72 // fIDMax(that.fIDMax),
73 // fIDMin(that.fIDMin),
78 ////-----------------------------------------------------------------------
79 //AliStarEventCuts& AliStarEventCuts::operator=(const AliStarEventCuts& someCuts)
82 // fCutID=that.fCutID;
83 // fIDMax=that.fIDMax;
84 // fIDMin=that.fIDMin;
89 //-----------------------------------------------------------------------
90 Bool_t AliStarEventCuts::PassesCuts(const AliStarEvent *event) const
92 ///check if event passes cuts
93 if(fCutRunID) {if (event->GetRunID() < fRunIDMin || event->GetRunID() > fRunIDMax ) return kFALSE;} //integer value: non inclusive bounds!
94 if(fCutEventNumber) {if (event->GetEventNumber() < fEventNumberMin || event->GetEventNumber() > fEventNumberMax ) return kFALSE;}
95 if(fCutVtxX) {if (event->GetVtxX() < fVtxXMin || event->GetVtxX() >= fVtxXMax ) return kFALSE;}
96 if(fCutVtxY) {if (event->GetVtxY() < fVtxYMin || event->GetVtxY() >= fVtxYMax ) return kFALSE;}
97 if(fCutVtxZ) {if (event->GetVtxZ() < fVtxZMin || event->GetVtxZ() >= fVtxZMax ) return kFALSE;}
98 if(fCutBField) {if (event->GetBField() < fBFieldMin || event->GetBField() >= fBFieldMax ) return kFALSE;}
99 if(fCutRefMult) {if (event->GetRefMult() < fRefMultMin || event->GetRefMult() > fRefMultMax ) return kFALSE;}
100 if(fCutCentralityID) {if (event->GetCentralityID() < fCentralityIDMin || event->GetCentralityID() > fCentralityIDMax ) return kFALSE;}
101 if(fCutNumberOfPrimaryTracks) {if (event->GetNumberOfPrimaryTracks() < fNumberOfPrimaryTracksMin || event->GetNumberOfPrimaryTracks() > fNumberOfPrimaryTracksMax ) return kFALSE;}
102 if(fCutNumberOfTracks) {if (event->GetNumberOfTracks() < fNumberOfTracksMin || event->GetNumberOfTracks() > fNumberOfTracksMax ) return kFALSE;}
106 //-----------------------------------------------------------------------
107 AliStarEventCuts* AliStarEventCuts::StandardCuts()
109 //make a set of standard event cuts, caller becomes owner
110 AliStarEventCuts* cuts = new AliStarEventCuts();
111 cuts->SetVtxXMin(-1.0);
112 cuts->SetVtxXMax(1.0);
113 cuts->SetVtxYMin(-1.0);
114 cuts->SetVtxYMax(1.0);
115 cuts->SetVtxZMin(-30.0);
116 cuts->SetVtxZMax(30.0);
117 cuts->SetRefMultMin(10);
118 cuts->SetRefMultMax(1000);
119 cuts->SetNumberOfPrimaryTracksMin(0);
120 cuts->SetNumberOfPrimaryTracksMax(3000);