+// $Id$
+
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
* provided "as is" without express or implied warranty. *
**************************************************************************/
#include "AliHLTITSVertexerZ.h"
+#include <TTree.h>
#include<TString.h>
#include<TH1.h>
#include<TMath.h>
#include <AliITS.h>
#include "AliITSLoader.h"
#include <AliITSgeom.h>
+#include <AliITSgeomTGeo.h>
#include <AliITSRecPoint.h>
#include <AliITSclusterV2.h>
SetBinWidthFine();
}
-AliHLTITSVertexerZ::AliHLTITSVertexerZ(TString filename,Float_t x0, Float_t y0):
- AliITSVertexerZ(filename,x0,y0),
+AliHLTITSVertexerZ::AliHLTITSVertexerZ(Float_t x0, Float_t y0):
+ AliITSVertexerZ(x0,y0),
fZCombf(0),
fStepFine(0)
{
}
//______________________________________________________________________
-AliHLTITSVertexerZ::AliHLTITSVertexerZ(const AliHLTITSVertexerZ &vtxr) :
- AliITSVertexerZ(vtxr),
- fZCombf(vtxr.fZCombf),
- fStepFine(vtxr.fStepFine)
-{
- // Copy constructor
-
-}
-
-//______________________________________________________________________
-AliHLTITSVertexerZ& AliHLTITSVertexerZ::operator=(const AliHLTITSVertexerZ& vtxr )
-{
- // Assignment operator
- this->~AliHLTITSVertexerZ();
- new(this) AliHLTITSVertexerZ(vtxr);
- fZCombf = vtxr.fZCombf;
- fStepFine = vtxr.fStepFine;
-
- return *this;
-}
-//______________________________________________________________________
-AliESDVertex* AliHLTITSVertexerZ::FindVertexForCurrentEvent(Int_t evnumber){
- // Defines the AliESDVertex for the current event
-
- fCurrentVertex = 0;
- AliRunLoader *rl =AliRunLoader::GetRunLoader();
- AliITSLoader* itsLoader = (AliITSLoader*) rl->GetLoader("ITSLoader");
- itsLoader->LoadRecPoints();
- rl->GetEvent(evnumber);
-
- /* if(!fITS) {
- fITS = (AliITS*)gAlice->GetModule("ITS");
- if(!fITS) {
- Error("FindVertexForCurrentEvent","AliITS object was not found");
- return fCurrentVertex;
- }
- }
- */
-
- // fITS->SetTreeAddress();
- rl->CdGAFile();
-
- AliITSgeom* geom=itsLoader->GetITSgeom();
- TTree *tR = itsLoader->TreeR();
-
- return FindVertexForCurrentEvent(geom,tR);
-}
-
-//______________________________________________________________________
-AliESDVertex* AliHLTITSVertexerZ::FindVertexForCurrentEvent(AliITSgeom *geom,TTree *tR){
+AliESDVertex* AliHLTITSVertexerZ::FindVertexForCurrentEvent(AliITSgeom* /* geom */,TTree *tR){
// Defines the AliESDVertex for the current event
fCurrentVertex = 0;
- Float_t lc[3]; for(Int_t ii=0; ii<3; ii++) lc[ii]=0.;
- Float_t gc[3]; for(Int_t ii=0; ii<3; ii++) gc[ii]=0.;
- Float_t lc2[3]; for(Int_t ii=0; ii<3; ii++) lc2[ii]=0.;
- Float_t gc2[3]; for(Int_t ii=0; ii<3; ii++) gc2[ii]=0.;
+ Double_t lc[3]; for(Int_t ii=0; ii<3; ii++) lc[ii]=0.;
+ Double_t gc[3]; for(Int_t ii=0; ii<3; ii++) gc[ii]=0.;
+ //Float_t lc2[3]; for(Int_t ii=0; ii<3; ii++) lc2[ii]=0.;
+ //Float_t gc2[3]; for(Int_t ii=0; ii<3; ii++) gc2[ii]=0.;
TClonesArray dummy("AliITSclusterV2",10000), *clusters=&dummy;
TBranch *branch;
AliITSclusterV2 *recp = (AliITSclusterV2*)clusters->UncheckedAt(j);
lc[0]=-recp->GetY()+yshift;
lc[2]=-recp->GetZ()+zshift[module%4];
- geom->LtoG(module,lc,gc);
- gc[0]-=fX0;
- gc[1]-=fY0;
+ AliITSgeomTGeo::LocalToGlobal(module,lc,gc);
+ // geom->LtoG(module,lc,gc);
+ gc[0]-=GetNominalPos()[0];
+ gc[1]-=GetNominalPos()[1];
Float_t xc1,yc1;
xc1=gc[0];
yc1=gc[1];
AliITSclusterV2 *recp = (AliITSclusterV2*)clusters->UncheckedAt(j);
lc[0]=recp->GetY()+yshift;
lc[2]=-recp->GetZ()+zshift[module%4];
- geom->LtoG(module,lc,gc);
- gc[0]-=fX0;
- gc[1]-=fY0;
+ AliITSgeomTGeo::LocalToGlobal(module,lc,gc);
+ // geom->LtoG(module,lc,gc);
+ gc[0]-=GetNominalPos()[0];
+ gc[1]-=GetNominalPos()[1];
Float_t xc2,yc2;
xc2=gc[0];
yc2=gc[1];