/* $Id$ */
//______________________________________________________________________
-AliITSVertexer3D::AliITSVertexer3D():
+AliITSVertexer3D::AliITSVertexer3D(Double_t zcut):
AliITSVertexer(),
fLines("AliStrLine",1000),
fVert3D(),
SetCoarseMaxRCut();
SetMaxRCut();
SetMaxRCutAlgo2();
- SetZCutDiamond();
+ if(zcut>0.){
+ SetZCutDiamond(zcut);
+ }
+ else {
+ SetZCutDiamond();
+ }
SetMaxZCut();
SetDCACut();
SetDiffPhiMax();
SetPileupAlgo();
SetBinSizeR();
SetBinSizeZ();
- Double_t binsize=0.02; // default 200 micron
- Int_t nbins=static_cast<Int_t>(1+2*fZCutDiamond/binsize);
- fZHisto=new TH1F("hz","",nbins,-fZCutDiamond,-fZCutDiamond+binsize*nbins);
fGenerForDownScale=new TRandom3(987654321);
}
+//______________________________________________________________________
+AliITSVertexer3D::AliITSVertexer3D(TRootIOCtor*):
+ AliITSVertexer(),
+ fLines("AliStrLine",1000),
+ fVert3D(),
+ fCoarseDiffPhiCut(0.),
+ fFineDiffPhiCut(0.),
+ fCutOnPairs(0.),
+ fCoarseMaxRCut(0.),
+ fMaxRCut(0.),
+ fMaxRCut2(0.),
+ fZCutDiamond(0.),
+ fMaxZCut(0.),
+ fDCAcut(0.),
+ fDiffPhiMax(0.),
+ fMeanPSelTrk(0.),
+ fMeanPtSelTrk(0.),
+ fUsedCluster(kMaxCluPerMod*kNSPDMod),
+ fZHisto(0),
+ fDCAforPileup(0.),
+ fDiffPhiforPileup(0.),
+ fBinSizeR(0.),
+ fBinSizeZ(0.),
+ fPileupAlgo(0),
+ fMaxNumOfCl(fgkMaxNumOfClDefault),
+ fMaxNumOfClForRebin(fgkMaxNumOfClRebinDefault),
+ fMaxNumOfClForDownScale(fgkMaxNumOfClDownscaleDefault),
+ fNRecPLay1(0),
+ fNRecPLay2(0),
+ f3DBinSize(fgk3DBinSizeDefault),
+ fDoDownScale(kFALSE),
+ fGenerForDownScale(0),
+ f3DPeak(),
+ fHighMultAlgo(1),
+ fSwitchAlgorithm(kFALSE)
+{
+ // I/O constructor
+
+
+}
+
//______________________________________________________________________
AliITSVertexer3D::~AliITSVertexer3D() {
// Destructor
//______________________________________________________________________
void AliITSVertexer3D::ResetVert3D(){
- //
+ // Reset the fVert3D object and reset the used clusters
ResetVertex();
fVert3D.SetXv(0.);
fVert3D.SetYv(0.);
//______________________________________________________________________
void AliITSVertexer3D::FindVertex3D(TTree *itsClusterTree){
-
+ // Instantiates the fCurrentVertex object. calle by FindVertexForCurrenEvent
Double_t vRadius=TMath::Sqrt(fVert3D.GetXv()*fVert3D.GetXv()+fVert3D.GetYv()*fVert3D.GetYv());
if(vRadius<GetPipeRadius() && fVert3D.GetNContributors()>0){
Double_t position[3]={fVert3D.GetXv(),fVert3D.GetYv(),fVert3D.GetZv()};
default: AliError("Wrong pileup algorithm"); break;
}
if(fNoVertices==1){
+ delete[] fVertArray;
fVertArray = new AliESDVertex[1];
fVertArray[0]=(*fCurrentVertex);
}
//______________________________________________________________________
void AliITSVertexer3D::FindVertex3DIterative(){
- //
+ // find vertex if fPileupAlgo == 2
Int_t nLines=fLines.GetEntriesFast();
Int_t maxPoints=nLines*(nLines-1)/2;
}
}
+//________________________________________________________
+void AliITSVertexer3D::SetZCutDiamond(Double_t zcut){
+ // The fiducial region along Z is set. The TH1 object pointed by
+ // fZHisto is created
+ if(TMath::AreEqualAbs(zcut,fZCutDiamond,1.e-10))return;
+ fZCutDiamond=zcut;
+ if(fZHisto) delete fZHisto;
+ Double_t binsize=0.02; // default 200 micron
+ Int_t nbins=static_cast<Int_t>(1+2*fZCutDiamond/binsize);
+ fZHisto=new TH1F("hz","",nbins,-fZCutDiamond,-fZCutDiamond+binsize*nbins);
+ fZHisto->SetDirectory(0);
+}
+
//________________________________________________________
void AliITSVertexer3D::FindPeaks(TH3F* histo, Double_t *peak, Int_t &nOfTracklets, Int_t &nOfTimes){
// Finds bin with max contents in 3D histo of tracket intersections