#include "AliExternalTrackParam.h"
#include "AliITSUAux.h"
+class AliESDtrack;
+
using namespace AliITSUAux;
class AliITSUSeed: public AliExternalTrackParam
{
public:
- enum {kKilled=BIT(14),kFake=BIT(15)};
+ enum {kKilled=BIT(14),kSave=BIT(15),kMark=BIT(16),kFake=BIT(17)};
enum {kF02,kF04,kF12,kF13,kF14,kF24, kF44,kNFElem}; // non-trivial elems of propagation matrix
enum {kK00,kK01,kK10,kK11,kK20,kK21,kK30,kK31,kK40,kK41, kNKElem}; // non-trivial elems of gain matrix
enum {kS00,kS10,kS11,kS20,kS21,kS22,kS30,kS31,kS32,kS33,kS40,kS41,kS42,kS43,kS44,kNSElem}; // elements of 5x5 sym matrix
void SetChi2Cl(Double_t v) {fChi2Cl= v; v>0 ? fChi2Glo+=v : fChi2Penalty -= v;}
void Kill(Bool_t v=kTRUE) {SetBit(kKilled, v);}
void SetFake(Bool_t v=kTRUE) {SetBit(kFake, v);}
+ void Save(Bool_t v=kTRUE) {SetBit(kSave,v);}
+ void SetMark(Bool_t v=kTRUE) {SetBit(kMark,v);}
+ void FlagTree(UInt_t bits, Bool_t v=kTRUE);
+ void SetChi2ITSTPC(Float_t v) {fChi2Match = v;}
+ void SetChi2ITSSA(Float_t v) {fChi2ITSSA = v;}
//
UInt_t GetLrClusterID() const {return fClID;}
Int_t GetLrCluster(Int_t &lr) const {return UnpackCluster(fClID,lr);}
Int_t GetLayerID() const {return UnpackLayer(fClID);}
Int_t GetClusterID() const {return UnpackCluster(fClID);}
Bool_t HasClusterOnLayer(Int_t lr) const {return fHitsPattern&(0x1<<lr);}
+ Bool_t HasCluster() const {return IsCluster(fClID);}
Int_t GetNLayersHit() const {return NumberOfBitsSet(fHitsPattern);}
+ Int_t GetNClusters() const;
+ Int_t GetClusterIndex(Int_t ind) const;
UShort_t GetHitsPattern() const {return fHitsPattern;}
Float_t GetChi2Cl() const {return fChi2Cl;}
Float_t GetChi2Glo() const {return fChi2Glo;}
Float_t GetChi2Penalty() const {return fChi2Penalty;}
Float_t GetChi2GloNrm() const;
+ Float_t GetChi2ITSTPC() const {return fChi2Match;}
+ Float_t GetChi2ITSSA() const {return fChi2ITSSA;}
+ Float_t GetQualityVar() const;
Bool_t IsKilled() const {return TestBit(kKilled);}
Bool_t IsFake() const {return TestBit(kFake);}
+ Bool_t IsSaved() const {return TestBit(kSave);}
+ Bool_t IsMarked() const {return TestBit(kMark);}
+ Bool_t ContainsFake() const;
+ Int_t FetchClusterInfo(Int_t *clIDarr) const;
+ //
+ Int_t GetPoolID() const {return int(GetUniqueID())-1;}
+ void SetPoolID(Int_t id) {SetUniqueID(id+1);}
//
TObject* GetParent() const {return fParent;}
const AliITSUSeed* GetParent(Int_t lr) const;
virtual Int_t Compare(const TObject* obj) const;
//
// test
+ void InitFromSeed(const AliExternalTrackParam* seed);
void ResetFMatrix();
void ApplyELoss2FMatrix(Double_t frac, Bool_t beforeProp);
Bool_t ApplyMaterialCorrection(Double_t xOverX0, Double_t xTimesRho, Double_t mass, Bool_t beforeProp);
Bool_t Smooth(Double_t vecL[5],Double_t matL[15]);
Double_t* ProdABA(const double a[15],const double b[15]) const;
//
+ UInt_t GetNChildren() const {return fNChildren;}
+ Int_t IncChildren() {return ++fNChildren;}
+ Int_t DecChildren() {return --fNChildren;}
+ Double_t GetResidY() const {return fResid[0];}
+ Double_t GetResidZ() const {return fResid[1];}
+ //
+#ifdef _ITSU_TUNING_MODE_ // this is used only for tuning histo filling
+ void SetOrdBranch(UShort_t v) {fOrdBranch=v;}
+ void SetOrdCand(UShort_t v) {fOrdCand=v;}
+ Int_t GetOrdBranch() const {return fOrdBranch;}
+ Int_t GetOrdCand() const {return fOrdCand;}
+ Double_t GetPullY() const {return fResid[0]*Sqrt(fCovIYZ[0]);}
+ Double_t GetPullZ() const {return fResid[1]*Sqrt(fCovIYZ[2]);}
+#endif
+ //
protected:
//
- Double_t fFMatrix[kNFElem]; // matrix of propagation from prev layer (non-trivial elements)
- Double_t fKMatrix[kNKElem]; // Gain matrix non-trivial elements (note: standard MBF formula uses I-K*H)
- Double_t fRMatrix[kNRElem]; // rotation matrix non-trivial elements
- Double_t fCovIYZ[3]; // inverted matrix of propagation + meas errors = [Hi * Pi|i-1 * Hi^T + Ri]^-1
- Double_t fResid[2]; // residuals vector
UShort_t fHitsPattern; // bit pattern of hits
+ UShort_t fNChildren; // number of children (prolongations)
UInt_t fClID; // packed cluster info (see AliITSUAux::PackCluster)
Float_t fChi2Glo; // current chi2 global (sum of track-cluster chi2's on layers with hit)
Float_t fChi2Cl; // track-cluster chi2 (if >0) or penalty for missing cluster (if < 0)
Float_t fChi2Penalty; // total penalty (e.g. for missing clusters)
+ Float_t fChi2Match; // ITS/TPC matching chi2 (per NDF) // RS: to move to separate object of final seed
+ Float_t fChi2ITSSA; // ITSSA backward fit chi2 (per NDF) // RS: to move to separate object of final seed
+ Double_t fFMatrix[kNFElem]; // matrix of propagation from prev layer (non-trivial elements)
+ Double_t fKMatrix[kNKElem]; // Gain matrix non-trivial elements (note: standard MBF formula uses I-K*H)
+ Double_t fRMatrix[kNRElem]; // rotation matrix non-trivial elements
+ Double_t fCovIYZ[3]; // inverted matrix of propagation + meas errors = [Hi * Pi|i-1 * Hi^T + Ri]^-1
+ Double_t fResid[2]; // residuals vector
TObject* fParent; // parent track (in higher tree hierarchy)
-
+ //
+#ifdef _ITSU_TUNING_MODE_ // this is used only for tuning histo filling
+ UShort_t fOrdBranch; //! order in the seed branching
+ UShort_t fOrdCand; //! order in candidates tree
+#endif
+ //
ClassDef(AliITSUSeed,1)
};
return par;
}
+//__________________________________________________________________
+inline Int_t AliITSUSeed::GetNClusters() const
+{
+ // count number of clusters (some layers may have >1 hit)
+ int ncl = 0;
+ const AliITSUSeed* seed = this;
+ while(seed) {
+ if (seed->HasCluster()) ncl++;
+ seed = (AliITSUSeed*)seed->GetParent();
+ }
+ return ncl;
+ //
+}
+
+//__________________________________________________________________
+inline void AliITSUSeed::FlagTree(UInt_t bits, Bool_t v)
+{
+ // set bits on all tree levels
+ AliITSUSeed* seed = this;
+ do {seed->SetBit(bits,v);} while ( (seed=(AliITSUSeed*)seed->GetParent()) );
+ //
+}
+
+//__________________________________________________________________
+inline Float_t AliITSUSeed::GetQualityVar() const
+{
+ // return variable for quality check (the smaller - the better)
+ // return GetChi2ITSSA()/Pt(); // this may change! RS
+ return GetChi2GloNrm()/Pt();
+}
+
+
#endif