1 #include "AliAODParticleBaseCut.h"
7 ClassImp(AliAODParticleBaseCut)
8 void AliAODParticleBaseCut::Print(void) const
10 // prints the information anout the base cut to stdout
11 cout<<"fMin="<<fMin <<", fMax=" <<fMax<<" ";
14 /******************************************************************/
16 void AliAODParticleBaseCut::PrintProperty(void) const
18 //prints the property name
24 cout<<"kAODPt"; break;
28 cout<<"kAODRapidity"; break;
29 case kAODPseudoRapidity:
30 cout<<"kAODPseudoRapidity"; break;
32 cout<<"kAODPx"; break;
34 cout<<"kAODPy"; break;
36 cout<<"kAODPz"; break;
38 cout<<"kAODPhi"; break;
40 cout<<"kAODTheta"; break;
42 cout<<"kAODVx"; break;
44 cout<<"kAODVy"; break;
46 cout<<"kAODVz"; break;
48 cout<<"kAODPid"; break;
50 cout<<"kAODNone"; break;
52 cout<<"Property Not Found";
56 ClassImp( AliAODMomentumCut )
58 ClassImp( AliAODPtCut )
59 ClassImp( AliAODEnergyCut )
60 ClassImp( AliAODRapidityCut )
61 ClassImp( AliAODPseudoRapidityCut )
62 ClassImp( AliAODPxCut )
63 ClassImp( AliAODPyCut )
64 ClassImp( AliAODPzCut )
65 ClassImp( AliAODPhiCut )
66 ClassImp( AliAODThetaCut )
67 ClassImp( AliAODVxCut )
68 ClassImp( AliAODVyCut )
69 ClassImp( AliAODVzCut )
71 ClassImp( AliAODPIDCut )
73 void AliAODPIDCut::Print(void) const
75 cout<<"PID "<<fPID<<" ";
76 AliAODParticleBaseCut::Print();
79 ClassImp( AliAODLogicalOperCut )
81 AliAODLogicalOperCut::AliAODLogicalOperCut():
82 AliAODParticleBaseCut(-10e10,10e10,kAODNone),
83 fFirst(new AliAODDummyBaseCut),
84 fSecond(new AliAODDummyBaseCut)
88 /******************************************************************/
90 AliAODLogicalOperCut::AliAODLogicalOperCut(AliAODParticleBaseCut* first, AliAODParticleBaseCut* second):
91 AliAODParticleBaseCut(-10e10,10e10,kAODNone),
92 fFirst((first)?(AliAODParticleBaseCut*)first->Clone():0x0),
93 fSecond((second)?(AliAODParticleBaseCut*)second->Clone():0x0)
96 if ( (fFirst && fSecond) == kFALSE)
98 Fatal("AliAODLogicalOperCut","One of parameters is NULL!");
101 /******************************************************************/
103 AliAODLogicalOperCut::~AliAODLogicalOperCut()
109 /******************************************************************/
111 Bool_t AliAODLogicalOperCut::AliAODDummyBaseCut::Rejected(AliVAODParticle* /*part*/) const
113 //checks if particles passes properties defined by this cut
114 Warning("Pass","You are using dummy base cut! Probobly some logical cut is not set up properly");
115 return kFALSE;//accept
117 /******************************************************************/
119 void AliAODLogicalOperCut::Streamer(TBuffer &b)
121 // Stream all objects in the array to or from the I/O buffer.
130 b.ReadVersion(&R__s, &R__c);
131 TObject::Streamer(b);
134 b.CheckByteCount(R__s, R__c,AliAODLogicalOperCut::IsA());
138 R__c = b.WriteVersion(AliAODLogicalOperCut::IsA(), kTRUE);
139 TObject::Streamer(b);
142 b.SetByteCount(R__c, kTRUE);
146 /******************************************************************/
147 ClassImp(AliAODOrCut)
149 Bool_t AliAODOrCut::Rejected(AliVAODParticle * p) const
151 //returns true when rejected
152 //AND operation is a little bit misleading but is correct
153 //User wants to build logical cuts with natural (positive) logic
154 //while AODAN use inernally reverse (returns true when rejected)
155 if (fFirst->Rejected(p) && fSecond->Rejected(p)) return kTRUE;//rejected (both rejected, returned kTRUE)
156 return kFALSE;//accepted, at least one accepted (returned kFALSE)
158 /******************************************************************/
160 ClassImp(AliAODAndCut)
162 Bool_t AliAODAndCut::Rejected(AliVAODParticle * p) const
164 //returns true when rejected
165 //OR operation is a little bit misleading but is correct
166 //User wants to build logical cuts with natural (positive) logic
167 //while AODAN use inernally reverse (returns true when rejected)
168 if (fFirst->Rejected(p) || fSecond->Rejected(p)) return kTRUE;//rejected (any of two rejected(returned kTRUE) )
169 return kFALSE;//accepted (both accepted (returned kFALSE))
171 /******************************************************************/