Particle definition and quality - SpiRIT-Collaboration/FLowAnalysis GitHub Wiki

Particle Definition

 void STKParticle::SetRecoTrack(STRecoTrack *atrack, STRecoTrack *atrackva)
{
 Clear();
 fRTrack  = atrack;  // trackArray
 fVATrack = atrackva; // trackVAArra
 fdEdx   = fVATrack -> GetdEdxWithCut(0, 0.7);
 forigP3 = fVATrack -> GetMomentumTargetPlane(); //v56
 fncl    = fVATrack -> GetClusterIDArray() -> size();
 frmom   = forigP3;
 fP    = forigP3.Mag();
 fChar = fVATrack->GetCharge();
 fGFChar = fVATrack->GetGenfitCharge();
 rVertexID      =  fRTrack -> GetVertexID();
 rHelixID       =  fRTrack -> GetHelixID();
 rdEdxPointSize =  fRTrack -> GetdEdxPointArray() -> size();
 rNDF           =  fRTrack -> GetNDF();
 rPOCAVertex    =  fRTrack -> GetPOCAVertex();
 rChi2          =  fRTrack -> GetChi2();
 rncl           =  fRTrack -> GetClusterIDArray() -> size();  //<- rClusterSize(STParticle.hh)
 // vertex pos
 Bool_t bgtrack =
   (abs(fRTrack->GetPOCAVertex().Z() + 14.85 ) <= 3.* 1.33) &&
   (abs(fRTrack->GetPOCAVertex().X()) <= 15.) &&
   (abs(fRTrack->GetPOCAVertex().Y() + 205.) <= 20. );
 if( !bgtrack )
   SetVertexAtTargetFlag(0);  //fVatTargetf
 SetGoodTrackFlag();
}

Setup Track quality flag

void STSpiRITTPCTask::SetupTrackQualityFlag(STKParticle *apart)
{
 if( bmA == 100 ) {
   cout << " vDistance " << apart->GetDistanceAtVertex() << " NDF " << apart->GetNDF() << endl;
   return ;
 }
if( apart->GetNCL() < 15 )  // since v55
  apart->SetNCLFlag(0); //// fnclf//
UInt_t pids = apart->GetPID_seq();
  if( pids < 7 ) {
    if( apart->GetP() < momRange[pids][0] ) {
      apart->SetMomentumFlag(0);
    }
  }
}
 void STKParticle::SetVertex(TVector3 value)
{
 fvertex = value;
 rDist = (rPOCAVertex - fvertex).Mag();
 if( rDist > 20 ) SetDistanceAtVertexFlag(0); //fdistanceatvertexf
}

Flag definition

void STKParticle::SetGoodTrackFlag()
{
 fgoodtrackf = fgoodtrackf != 0 ?
   1     * fdoublef    +
   10    * fmomentumf  +
   100   * fmassf      +
   1000  * fnclf       +
   10000 * fVatTargetf +
   100000* fdistanceatvertexf
   : 0;
}
⚠️ **GitHub.com Fallback** ⚠️