fSecondPartCut= new AliHBTEmptyParticleCut(); //empty cuts
fCuts = new AliHbtBasePairCut*[fgkMaxCuts];
+ for (Int_t i = 0;i<fNCuts;i++)
+ {
+ fCuts[i] = 0x0;
+ }
}
/**********************************************************/
}
/**********************************************************/
+void AliHBTPairCut::Print()
+{
+ //Prints the cut
+ for (Int_t i = 0;i<fNCuts;i++)
+ {
+ fCuts[i]->Dump();
+ }
+}
+/**********************************************************/
+
void AliHBTPairCut::SetFirstPartCut(AliHBTParticleCut* cut)
{
// set cut for the first particle
void AliHBTPairCut::SetQOutCMSLRange(Double_t min, Double_t max)
{
// set range of accepted QOut in CMS
- AliHBTQOutCMSLCCut* cut= (AliHBTQOutCMSLCCut*)FindCut(kHbtPairCutPropQOutCMSLC);
+ AliHBTQOutLCMSCut* cut= (AliHBTQOutLCMSCut*)FindCut(kHbtPairCutPropQOutLCMS);
if(cut) cut->SetRange(min,max);
- else fCuts[fNCuts++] = new AliHBTQOutCMSLCCut(min,max);
+ else fCuts[fNCuts++] = new AliHBTQOutLCMSCut(min,max);
}
/**********************************************************/
void AliHBTPairCut::SetQSideCMSLRange(Double_t min, Double_t max)
{
// set range of accepted QSide in CMS
- AliHBTQSideCMSLCCut* cut= (AliHBTQSideCMSLCCut*)FindCut(kHbtPairCutPropQSideCMSLC);
+ AliHBTQSideLCMSCut* cut= (AliHBTQSideLCMSCut*)FindCut(kHbtPairCutPropQSideLCMS);
if(cut) cut->SetRange(min,max);
- else fCuts[fNCuts++] = new AliHBTQSideCMSLCCut(min,max);
+ else fCuts[fNCuts++] = new AliHBTQSideLCMSCut(min,max);
}
/**********************************************************/
void AliHBTPairCut::SetQLongCMSLRange(Double_t min, Double_t max)
{
// set range of accepted QLong in CMS
- AliHBTQLongCMSLCCut* cut= (AliHBTQLongCMSLCCut*)FindCut(kHbtPairCutPropQLongCMSLC);
+ AliHBTQLongLCMSCut* cut= (AliHBTQLongLCMSCut*)FindCut(kHbtPairCutPropQLongLCMS);
if(cut) cut->SetRange(min,max);
- else fCuts[fNCuts++] = new AliHBTQLongCMSLCCut(min,max);
+ else fCuts[fNCuts++] = new AliHBTQLongLCMSCut(min,max);
}
/**********************************************************/
else fCuts[fNCuts++] = new AliHBTKStarCut(min,max);
}
/**********************************************************/
+
void AliHBTPairCut::SetAvSeparationRange(Double_t min, Double_t max)
{
//sets avarage separation cut ->Anti-Merging cut
}
/**********************************************************/
+void AliHBTPairCut::SetITSSeparation(Int_t layer, Double_t drphi, Double_t dz)
+{
+ //Anti-Merging Cut for first pixel layer
+ AliHBTITSSeparationCut* cut= dynamic_cast<AliHBTITSSeparationCut*>(FindCut(kHbtPairCutPropPixelSepar));
+ if(cut)
+ {
+ if (layer == cut->GetLayer())
+ {
+ cut->SetRange(drphi,dz);//In this cut fMin is drphi, and fMax dz
+ return;
+ }
+ }
+ fCuts[fNCuts++] = new AliHBTITSSeparationCut(layer,drphi,dz);
+// Info("SetITSSeparation","Added %d at address %#x",fNCuts-1,fCuts[fNCuts-1]);
+}
+/**********************************************************/
+
void AliHBTPairCut::SetClusterOverlapRange(Double_t min,Double_t max)
{
//sets cluster overlap factor cut ->Anti-Splitting cut
if(cut) cut->SetRange(min,max);
else fCuts[fNCuts++] = new AliHBTCluterOverlapCut(min,max);
}
+/**********************************************************/
AliHbtBasePairCut* AliHBTPairCut::FindCut(AliHBTPairCutProperty property)
{
ClassImp(AliHbtBasePairCut)
ClassImp(AliHBTQInvCut)
ClassImp(AliHBTKtCut)
-ClassImp(AliHBTQSideCMSLCCut)
-ClassImp(AliHBTQOutCMSLCCut)
-ClassImp(AliHBTQLongCMSLCCut)
+ClassImp(AliHBTQSideLCMSCut)
+ClassImp(AliHBTQOutLCMSCut)
+ClassImp(AliHBTQLongLCMSCut)
/******************************************************************/
ClassImp(AliHBTAvSeparationCut)
return tpts1->AvarageDistance(*tpts2);
}
/******************************************************************/
+ClassImp(AliHBTSeparationCut)
+
+Double_t AliHBTSeparationCut::GetValue(AliHBTPair* pair) const
+{
+ //chacks if avarage distance of two tracks is in given range
+ AliHBTTrackPoints* tpts1 = pair->Particle1()->GetTrackPoints();
+ if ( tpts1 == 0x0)
+ {//it could be simulated pair
+// Warning("GetValue","Track 1 does not have Track Points. Pair NOT Passed.");
+ return -1.0;
+ }
+
+ AliHBTTrackPoints* tpts2 = pair->Particle2()->GetTrackPoints();
+ if ( tpts2 == 0x0)
+ {
+// Warning("GetValue","Track 2 does not have Track Points. Pair NOT Passed.");
+ return -1.0;
+ }
+ Float_t x1=0,y1=0,z1=0;
+ Float_t x2=0,y2=0,z2=0;
+
+ tpts1->PositionAt(fPoint,x1,y1,z1);
+ tpts2->PositionAt(fPoint,x2,y2,z2);
+ Double_t dx1 = x1 - x2;
+ Double_t dy1 = y1 - y2;
+ Double_t dz1 = z1 - z2;
+ Double_t d = TMath::Sqrt(dx1*dx1 + dy1*dy1 + dz1*dz1);
+ return d;
+}
+/******************************************************************/
+
+ClassImp(AliHBTITSSeparationCut)
+
+Bool_t AliHBTITSSeparationCut::Pass(AliHBTPair* pair) const
+{
+ //Checks if two tracks do not cross first pixels too close to each other
+ //If two tracks use the same cluster in pixels they are given
+ //the same position what skews theta angles (both are the same)
+ //These guys create artificial correlation in non-id analyses
+ //which is positive for identical polar angles (Qlong=0)
+ //and negative for a little bit different theta angle (Qlong=epsilon)
+ //Such tracks "attracks" each other.
+
+ AliHBTTrackPoints* tpts1 = pair->Particle1()->GetITSTrackPoints();
+ if ( tpts1 == 0x0)
+ {//it could be simulated pair
+ Warning("Pass","Track 1 does not have ITS Track Points. Pair NOT Passed.");
+ return kTRUE;//reject
+ }
+
+ AliHBTTrackPoints* tpts2 = pair->Particle2()->GetITSTrackPoints();
+ if ( tpts2 == 0x0)
+ {
+ Warning("Pass","Track 2 does not have ITS Track Points. Pair NOT Passed.");
+ return kTRUE;//reject
+ }
+ Float_t x1=0.0,y1=0.0,z1=0.0,x2=0.0,y2=0.0,z2=0.0;
+ tpts1->PositionAt(fLayer,x1,y1,z1);
+ tpts2->PositionAt(fLayer,x2,y2,z2);
+
+// Info("Pass","rphi %f z %f",fMin,fMax);
+// Info("Pass","P1: %f %f %f", x1,y1,z1);
+// Info("Pass","P2: %f %f %f", x2,y2,z2);
+
+ Double_t dz = TMath::Abs(z1-z2);
+
+ //fMax encodes treshold valaue of distance in Z
+ if (dz > fMax) return kFALSE;//pair accepted
+
+ Double_t drphi = TMath::Hypot(x1-x2,y1-y2);
+
+ //fMin encodes treshold valaue of distance in r-phi
+ if (drphi > fMin) return kFALSE;
+
+ return kTRUE;//they are too close, rejected
+}
+/******************************************************************/
ClassImp(AliHBTCluterOverlapCut)
return cm1->GetOverlapFactor(*cm2);
}
/******************************************************************/
+ClassImp(AliHBTOutSideSameSignCut)
+Bool_t AliHBTOutSideSameSignCut::Pass(AliHBTPair *p) const
+{
+ //returns kTRUE if pair DO NOT meet cut criteria
+
+ if ( p->GetQOutLCMS()*p->GetQSideLCMS() > 0 )
+ {
+ return kFALSE;//accpeted
+ }
+
+ return kTRUE ;//rejected
+}
+/******************************************************************/
+ClassImp(AliHBTOutSideDiffSignCut)
+
+Bool_t AliHBTOutSideDiffSignCut::Pass(AliHBTPair *p) const
+{
+ //returns kTRUE if pair DO NOT meet cut criteria
+
+ if ( p->GetQOutLCMS()*p->GetQSideLCMS() > 0 )
+ {
+ return kTRUE;//rejected
+ }
+
+ return kFALSE;//accepted
+}
+/******************************************************************/
ClassImp( AliHBTLogicalOperPairCut )
AliHBTLogicalOperPairCut::AliHBTLogicalOperPairCut():