#ifndef ALITOFTRACKER_H
#define ALITOFTRACKER_H
+
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-// AliTOFtracker Class
-// Task: Perform association of the ESD tracks to TOF Clusters
-// and Update ESD track with associated TOF Cluster parameters
-//
-// -- Authors : S. Arcelli, C. Zampolli (Bologna University and INFN)
-// -- Contacts: Annalisa.De.Caro@cern.ch
-// -- : Chiara.Zampolli@bo.infn.it
-// -- : Silvia.Arcelli@bo.infn.it
-//--------------------------------------------------------------------
/* $Id$ */
+//----------------------------------------------------------------------//
+// //
+// AliTOFtracker Class //
+// Task: Perform association of the ESD tracks to TOF Clusters //
+// and Update ESD track with associated TOF Cluster parameters //
+// //
+// -- Authors : S. Arcelli, C. Zampolli (Bologna University and INFN) //
+// -- Contacts: Annalisa.De.Caro@cern.ch //
+// -- : Chiara.Zampolli@bo.infn.it //
+// -- : Silvia.Arcelli@bo.infn.it //
+// //
+//----------------------------------------------------------------------//
+
#include "AliTracker.h"
#include "AliTOFpidESD.h"
-#include "AliESD.h"
-#include "TClonesArray.h"
+class TClonesArray;
+
+class AliESDEvent;
+
+class AliTOFcluster;
+class AliTOFRecoParam;
class AliTOFGeometry;
+class TH1F;
+class TH2F;
class AliTOFtracker : public AliTracker {
public:
- AliTOFtracker(AliTOFGeometry* geom, Double_t parPID[2]);
+ AliTOFtracker();
AliTOFtracker(const AliTOFtracker &t); //Copy Ctor
- virtual ~AliTOFtracker() {delete fTOFpid;}
- virtual Int_t Clusters2Tracks(AliESD* /*event*/) {return -1;};
- virtual Int_t PropagateBack(AliESD* event);
- virtual Int_t RefitInward(AliESD* /*event*/) {return -1;};
- virtual Int_t LoadClusters(TTree *dTree); // Loading Clusters from Digits
+ AliTOFtracker& operator=(const AliTOFtracker &source); // ass. op.
+
+ virtual ~AliTOFtracker();
+ virtual Int_t Clusters2Tracks(AliESDEvent* /*event*/) {return -1;};
+ virtual Int_t PropagateBack(AliESDEvent* event);
+ virtual Int_t RefitInward(AliESDEvent* /*event*/) {return -1;};
+ virtual Int_t LoadClusters(TTree * cTree); // Load Clusters
virtual void UnloadClusters();// UnLoad Clusters
virtual AliCluster *GetCluster(Int_t /*index*/) const {return NULL;};
-
-public:
- class AliTOFcluster {
- public:
- AliTOFcluster(Double_t *h, Int_t *l, Int_t *ind, Int_t idx) {
- fR=h[0]; fPhi=h[1]; fZ=h[2]; fTDC=h[3]; fADC=h[4];
- fLab[0]=l[0]; fLab[1]=l[1]; fLab[2]=l[2];
- fIdx=idx;
- fdetIndex[0]=ind[0];
- fdetIndex[1]=ind[1];
- fdetIndex[2]=ind[2];
- fdetIndex[3]=ind[3];
- fdetIndex[4]=ind[4];
- }
- void Use() {fADC=-fADC;}
-
- Double_t GetR() const {return fR;} // Cluster Radius
- Double_t GetPhi() const {return fPhi;} // Cluster Phi
- Double_t GetZ() const {return fZ;} // Cluster Z
- Double_t GetTDC() const {return fTDC;} // Cluster ToF
- Double_t GetADC() const {return TMath::Abs(fADC);} // Cluster Charge
- Int_t IsUsed() const {return (fADC<0) ? 1 : 0;} // Flagging
- Int_t GetLabel(Int_t n) const {return fLab[n];} // Labels of tracks in Cluster
- Int_t GetDetInd(Int_t n) const {return fdetIndex[n];} //Cluster Det Indeces
- Int_t GetIndex() const {return fIdx;} // Cluster Index
-
- private:
-
- Int_t fLab[3]; //track labels
- Int_t fIdx; //index of this cluster
- Int_t fdetIndex[5]; //Cluster detector Indeces (plate,strip,..)
- Double_t fR; //r-coordinate
- Double_t fPhi; //phi-coordinate
- Double_t fZ; //z-coordinate
- Double_t fTDC; //TDC count
- Double_t fADC; //ADC count
-
- };
+ Bool_t GetTrackPoint(Int_t index, AliTrackPoint& p) const;
+ void InitCheckHists();
+ void SaveCheckHists();
private:
- Int_t InsertCluster(AliTOFcluster *c); // Fills TofClusters Array
Int_t FindClusterIndex(Double_t z) const; // Returns cluster index
void MatchTracks(Bool_t mLastStep); // Matching Algorithm
void CollectESD(); // Select starting Set for Matching
- void Init();
+ Float_t GetTimeZerofromTOF(AliESDEvent* /*event*/) const; // T0 from TOF
+ Float_t GetTimeZerofromT0(AliESDEvent* event) const; // T0 from T0
+ Float_t CorrectTimeWalk(Float_t dist,Float_t tof); // Time Walk correction
+ AliTOFRecoParam* fRecoParam; // Pointer to TOF Recon. Pars
AliTOFGeometry* fGeom; // Pointer to TOF geometry
- AliTOFpidESD* fTOFpid; // Pointer to TOF PID
+ AliTOFpidESD* fPid; // Pointer to TOF PID
AliTOFcluster *fClusters[kMaxCluster]; // pointers to the TOF clusters
- Bool_t fHoles; // flag for Geometry Version(w/wo Holes) temporary!
Int_t fN; // Number of Clusters
Int_t fNseeds; // Number of track seeds
Int_t fNseedsTOF; // TPC BP tracks
Int_t fnunmatch; // Unmatched tracks
Int_t fnmatch; // Total matched tracks
- Float_t fR; // Intermediate radius in TOF, used in matching
- Float_t fTOFHeigth; // Inner TOF radius for propagation
- Float_t fdCut; // Cut on minimum distance track-pad in matching
- Float_t fDx; // Pad Size in X
- Float_t fDy; // Pad Size in Y (== X TOF convention)
- Float_t fDz; // Pad Size in Z
TClonesArray* fTracks; //! pointer to the TClonesArray with TOF tracks
TClonesArray* fSeeds; //! pointer to the TClonesArray with ESD tracks
-
- ClassDef(AliTOFtracker, 1) // TOF tracker
+ //Digits/Reco QA histos
+
+ TH2F * fHDigClusMap; //Digits QA, Cluster Map
+ TH1F * fHDigNClus; //Digits QA, # of clusters on TOF/event
+ TH1F * fHDigClusTime;//Digits QA, Cluster Time (ns)
+ TH1F * fHDigClusToT; //Digits QA, Cluster ToT (ns)
+ TH1F * fHRecNClus; //Reco QA, cluster occupancy in search window
+ TH1F * fHRecDist;//Reco QA, track-TOF cluster closest distance (cm)
+ TH2F * fHRecSigYVsP;//Reco QA, track error in Y at TOF inner surface (cm)
+ TH2F * fHRecSigZVsP; //Reco QA, track error in Z at TOF inner surface (cm)
+ TH2F * fHRecSigYVsPWin;//Reco QA, search window size in Y (cm)
+ TH2F * fHRecSigZVsPWin;//Reco QA, search window size in X (cm)
+ TTree * fCalTree; // Tree for on-the-fly offline Calibration
+ // internal variables in tree for on-the-fly TOF Calibration
+
+ Int_t fIch; //TOF channel number
+ Float_t fToT; // Time over Threshold, ns
+ Float_t fTime; //TOF time, ps
+ Float_t fExpTimePi; // exp time, Pions
+ Float_t fExpTimeKa; // exp time, Kaons
+ Float_t fExpTimePr; // exp time, Protons
+
+ ClassDef(AliTOFtracker, 2) // TOF tracker
};
#endif
-
-