//Processes one event
if (fProcEvent == 0x0)
{
- Error("ProcessEvent","Analysis option not specified");
+ Error("ProcessEvent","Analysis <<%s>> option not specified.",GetName());
return 1;
}
- if ( Pass(aodrec,aodsim) ) return 0;
+ if ( Rejected(aodrec,aodsim) )
+ {
+// Double_t x = 0, y = 0, z = 0;
+// aodrec->GetPrimaryVertex(x,y,z);
+// Info("ProcessEvent","Event has vertex at %f %f %f",x,y,z);
+ Info("ProcessEvent","Nch is %d",aodsim->GetNumberOfCharged());
+ Info("ProcessEvent","%s: Event cut rejected this event",GetName());
+ return 0;
+ }
//Move event to the apparent vertex -> must be after the event cut
//It is important for any cut that use any spacial coordiantes,
case kReconstructed:
if (nonid) fProcEvent = &AliHBTAnalysis::ProcessRecNonId;
else fProcEvent = &AliHBTAnalysis::ProcessRec;
+ SetCutsOnRec();
break;
case kSimulated:
if (nonid) fProcEvent = &AliHBTAnalysis::ProcessSimNonId;
else fProcEvent = &AliHBTAnalysis::ProcessSim;
+ SetCutsOnSim();
break;
case kSimulatedAndReconstructed:
if ( !partEvent || !trackEvent )
{
- Error("ProcessRecAndSim","Can not get event");
+ Error("ProcessRecAndSim","<<%s>> Can not get event",GetName());
return 1;
}
part1= partEvent->GetParticle(j);
- Bool_t firstcut = fPairCut->GetFirstPartCut()->Pass(part1);
+ Bool_t firstcut = fPairCut->GetFirstPartCut()->Rejected(part1);
if (fBufferSize != 0)
- if ( (firstcut == kFALSE) || ( fPairCut->GetSecondPartCut()->Pass(part1) == kFALSE ) )
+ if ( (firstcut == kFALSE) || ( fPairCut->GetSecondPartCut()->Rejected(part1) == kFALSE ) )
{
//accepted by any cut
// we have to copy because reader keeps only one event
if (part1->GetUID() == part2->GetUID()) continue;
partpair->SetParticles(part1,part2);
- if(fPairCut->Pass(partpair)) //check pair cut
+ if(fPairCut->Rejected(partpair)) //check pair cut
{ //do not meets crietria of the
- if( fPairCut->Pass((AliHBTPair*)partpair->GetSwappedPair()) ) continue;
+ if( fPairCut->Rejected((AliHBTPair*)partpair->GetSwappedPair()) ) continue;
else tmppartpair = (AliHBTPair*)partpair->GetSwappedPair();
}
else
part2= partEvent2->GetParticle(l);
partpair->SetParticles(part1,part2);
- if( fPairCut->Pass(partpair) ) //check pair cut
+ if( fPairCut->Rejected(partpair) ) //check pair cut
{ //do not meets crietria of the
- if( fPairCut->Pass((AliHBTPair*)partpair->GetSwappedPair()) )
+ if( fPairCut->Rejected((AliHBTPair*)partpair->GetSwappedPair()) )
continue;
else
{
track1= trackEvent->GetParticle(j);
- Bool_t firstcut = fPairCut->GetFirstPartCut()->Pass(track1);
+ Bool_t firstcut = fPairCut->GetFirstPartCut()->Rejected(track1);
if (fBufferSize != 0)
- if ( (firstcut == kFALSE) || ( fPairCut->GetSecondPartCut()->Pass(track1) == kFALSE ) )
+ if ( (firstcut == kFALSE) || ( fPairCut->GetSecondPartCut()->Rejected(track1) == kFALSE ) )
{
//accepted by any cut
// we have to copy because reader keeps only one event
if (track1->GetUID() == track2->GetUID()) continue;
trackpair->SetParticles(track1,track2);
- if(fPairCut->Pass(trackpair)) //check pair cut
+ if(fPairCut->Rejected(trackpair)) //check pair cut
{ //do not meets crietria of the
- if( fPairCut->Pass((AliHBTPair*)trackpair->GetSwappedPair()) ) continue;
+ if( fPairCut->Rejected((AliHBTPair*)trackpair->GetSwappedPair()) ) continue;
else tmptrackpair = (AliHBTPair*)trackpair->GetSwappedPair();
}
else
track2= trackEvent2->GetParticle(l);
trackpair->SetParticles(track1,track2);
- if( fPairCut->Pass(trackpair) ) //check pair cut
+ if( fPairCut->Rejected(trackpair) ) //check pair cut
{ //do not meets crietria of the
- if( fPairCut->Pass((AliHBTPair*)trackpair->GetSwappedPair()) )
+ if( fPairCut->Rejected((AliHBTPair*)trackpair->GetSwappedPair()) )
continue;
else
{
in1 = in2 = kTRUE;
part = in->GetParticle(i);
- if ( cut1->Pass(part) ) in1 = kFALSE; //if part is rejected by cut1, in1 is false
- if ( cut2->Pass(part) ) in2 = kFALSE; //if part is rejected by cut2, in2 is false
+ if ( cut1->Rejected(part) ) in1 = kFALSE; //if part is rejected by cut1, in1 is false
+ if ( cut2->Rejected(part) ) in2 = kFALSE; //if part is rejected by cut2, in2 is false
if (gDebug)//to be removed in real analysis
if ( in1 && in2 ) //both cuts accepted, should never happen, just in case
if (in2)
{
- out2->AddParticle(part);
+ out2->AddParticle(new AliAODParticle(*part));
continue;
}
}