#include <AliESDtrack.h> //CkovHiddenTrk()
#include <TH2I.h> //InitDatabase()
#include <TGraph.h> //ShapeModel()
-#include <TFile.h> //ShapeModel()
#include <TSpline.h> //ShapeModel()
#include "TStopwatch.h" //
-TH2I* AliHMPIDReconHTA::fDatabase = 0x0;
+TH2I* AliHMPIDReconHTA::fgDatabase = 0x0;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AliHMPIDReconHTA::AliHMPIDReconHTA():TTask("RichRec","RichPat")
fParam=AliHMPIDParam::Instance();
fParam->SetRefIdx(fParam->MeanIdxRad()); // initialization of ref index to a default one
- if(!fDatabase) InitDatabase();
+ if(!fgDatabase) InitDatabase();
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AliHMPIDReconHTA::~AliHMPIDReconHTA()
//
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDReconHTA::DeleteVars()
+void AliHMPIDReconHTA::DeleteVars()const
{
//..
//Delete variables
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bool_t AliHMPIDReconHTA::CluPreFilter(TClonesArray *pCluLst)
{
-// Filter of bkg clusters
-// based on elliptical-shapes...
+// Pre-filter of bkg clusters
+// Arguments: pSluLst - List of the clusters for a given chamber
+// Returns: status - TRUE if filtering leaves enough photons, FALSE if not
//
Int_t nClusTot = pCluLst->GetEntriesFast();
if(nClusTot<4||nClusTot>100) {
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bool_t AliHMPIDReconHTA::FindShape(Double_t &thTrkRec,Double_t &phiTrkRec,Double_t &thetaCRec)
{
+// Finds the estimates for phi and theta of the track and the ThetaCerenkov
+// by using a database of the shapes of the rings
+// Arguments: none
+// Returns: thTrkRec - estimate of theta track
+// phiTrkRec - estimate of phi track
+// thetaCRec - estimate of ThetaCerenkov
+// status - TRUE if a good solution is found, FALSE if not
+
Double_t *phiphot = new Double_t[fNClu];
Double_t *dist = new Double_t[fNClu];
Int_t *indphi = new Int_t[fNClu];
// Printf("FindShape: phi start %f",phiTrkRec*TMath::RadToDeg());
- Int_t bin = fDatabase->FindBin(xA,xB);
- Int_t compact = (Int_t)fDatabase->GetBinContent(bin);
+ Int_t bin = fgDatabase->FindBin(xA,xB);
+ Int_t compact = (Int_t)fgDatabase->GetBinContent(bin);
thetaCRec = (Double_t)(compact%1000);
thTrkRec = (Double_t)(compact/1000);
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bool_t AliHMPIDReconHTA::ShapeModel(Int_t np,Double_t *phiphot,Double_t *dist,Double_t &xA,Double_t &xB,Double_t &phiStart)
{
+// Find a Spline curve to define dist. vs. phi angle
+// in order to estimate the phi of the track
+// Arguments: np - # points corresponding to # photon candidates
+// dist - distance of each photon from MIP
+// phiphot - phi of the photon in the DRS
+// Returns: xA - min. distance from MIP
+// xB - dist. from mip perpedicular to the major axis
+// phiStart- estimate of the track phi
+
TGraph *phigr = new TGraph(np,phiphot,dist);
TSpline3 *sphi = new TSpline3("sphi",phigr);
if(!sphi) {Printf("Spline not created!Bye.");return kFALSE;}
return kTRUE;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-Double_t AliHMPIDReconHTA::VertParab(Double_t x1,Double_t y1,Double_t x2, Double_t y2, Double_t x3, Double_t y3)
+Double_t AliHMPIDReconHTA::VertParab(Double_t x1,Double_t y1,Double_t x2, Double_t y2, Double_t x3, Double_t y3)const
{
+// It uses parabola from 3 points to evaluate the x-coord of the parab
+// Arguments: xi,yi - points
+// Returns: x-coord of the vertex
+
Double_t a = ((x1-x3)*(y1-y2)-(x1-x2)*(y1-y3))/((x1*x1-x2*x2)*(x1-x3)-(x1*x1-x3*x3)*(x1-x2));
Double_t b = (y1-y2 - a*(x1*x1-x2*x2))/(x1-x2);
// Double_t c = y1 - a*x1*x1-b*x1;
// Arguments: PhiRec phi of the track
// Returns: none
-
TMinuit *pMinuit = new TMinuit(2);
pMinuit->mncler();
gMinuit->SetObjectFit((TObject*)this); gMinuit->SetFCN(AliHMPIDReconHTA::FunMinPhot); //set fit function
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDReconHTA::InitDatabase()
{
+// Construction a database of ring shapes on fly
+// Arguments: none
+// Returns : none
+// N.B. fgDatabase points to a TH2I with x-min dist from MIP
+// y-dist from the ring of the MIP perpendicular to major axis
+// The content is the packed info of track theta and thetaC in degrees
+// thetaC+1000*thTrk
+//
TStopwatch timer;
timer.Start();
}
FillZeroChan(deconv);
- fDatabase = deconv;
+ fgDatabase = deconv;
timer.Stop();
Double_t nSecs = timer.CpuTime();
AliInfo(Form("database HTA successfully open in %3.1f sec.(CPU). Reconstruction is started.",nSecs));
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDReconHTA::FillZeroChan(TH2I *deconv)
+void AliHMPIDReconHTA::FillZeroChan(TH2I *deconv)const
{
Int_t nbinx = deconv->GetNbinsX();
Int_t nbiny = deconv->GetNbinsY();