**************************************************************************/
/* $Id$ */
+///////////////////////////////////////////////////////////////////
+//Class for reconstruction of clusters V2 //
+// //
+// //
+///////////////////////////////////////////////////////////////////
-#include <TROOT.h>
#include <TFile.h>
#include <TTree.h>
#include <TBranch.h>
#include "AliRun.h"
#include "AliHeader.h"
-#include "AliITS.h"
#include "AliITSRecPoint.h"
#include "AliITSFindClustersV2.h"
#include "AliITSclusterV2.h"
#include "AliITSgeom.h"
+#include "AliMC.h"
ClassImp(AliITSFindClustersV2)
return;
} // end if !fAr
fDeletfAr = kTRUE; // Since gAlice was read in, delete it.
-
+ /*
AliITS *its = (AliITS*) fAr->GetModule("ITS");
if(!its){
Warning("AliITSFindClusterV2",
"Can't fine the ITS geometry in gAlice. Aborting.");
return;
} // end if !fGeom
+ */
+ AliRunLoader* rl = AliRunLoader::Open("galice.root");
+ rl->CdGAFile();
+ fGeom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
+ if(!fGeom){
+ Warning("AliITSFindClusterV2",
+ "Can't fine the ITS geometry in gAlice. Aborting.");
+ return;
+ } // end if !fGeom
+ delete rl;
if(fOut) fOut->cd();
fInit = kTRUE;
return;
} // end if !fAr
fDeletfAr = kTRUE; // Since gAlice was read in, delete it.
+ /*
AliITS *its = (AliITS*) fAr->GetModule("ITS");
if(!its){
Warning("AliITSFindClusterV2",
return;
} // end if !its
fGeom = its->GetITSgeom();
+ */
+ AliRunLoader* rl = AliRunLoader::Open("galice.root");
+ rl->CdGAFile();
+ fGeom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
if(!fGeom){
Warning("AliITSFindClusterV2",
"Can't fine the ITS geometry in gAlice. Aborting.");
return;
} // end if !fGeom
-
+ delete rl;
+
if(fOut) fOut->cd();
fInit = kTRUE;
}
"ar==0. Aborting.");
return;
} // end if !fAr
- AliITS *its = (AliITS*) fAr->GetModule("ITS");
+
+ /* AliITS *its = (AliITS*) fAr->GetModule("ITS");
if(!its){
Warning("AliITSFindClusterV2",
"Can't fine the ITS in gAlice. Aborting.");
return;
} // end if !its
fGeom = its->GetITSgeom();
+ */
+ AliRunLoader* rl = AliRunLoader::Open("galice.root");
+ rl->CdGAFile();
+ fGeom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
if(!fGeom){
Warning("AliITSFindClusterV2",
"Can't fine the ITS geometry in gAlice. Aborting.");
return;
} // end if !fGeom
+ delete rl;
if(fOut) fOut->cd();
fInit = kTRUE;
}
+//______________________________________________________________________
+AliITSFindClustersV2::AliITSFindClustersV2(const AliITSFindClustersV2 &/*rec*/):TTask(/*rec*/){
+ // Copy constructor.
+
+ Error("Copy constructor","Copy constructor not allowed");
+
+}
+//______________________________________________________________________
+AliITSFindClustersV2& AliITSFindClustersV2::operator=(const AliITSFindClustersV2& /*source*/){
+ // Assignment operator. This is a function which is not allowed to be
+ // done.
+ Error("operator=","Assignment operator not allowed\n");
+ return *this;
+}
+
//______________________________________________________________________
AliITSFindClustersV2::~AliITSFindClustersV2(){
// Default constructor.
Char_t name[50];
if(!fInit){
- Warning("Exec","Initilization not succesfull. Aborting.");
+ Warning("Exec","(opt=%s) Initilization not succesfull. Aborting.\n",opt);
return;
} // end if !fInit
if(fGeom->GetModuleType(i)==kSSD) kmip = 38.0;
for(j=0;j<ncl;j++){
p = (AliITSRecPoint*)(points->UncheckedAt(j));
- lp[0] = - (p->GetX() + yshift);
+ lp[0] = - (p->GetDetLocalX() + yshift);
if(lay==1) lp[0] = -lp[0];
lp[1] = p->GetZ() + zshift;
- lp[2] = p->GetSigmaX2();
+ lp[2] = p->GetSigmaDetLocX2();
lp[3] = p->GetSigmaZ2();
lp[4] = p->GetQ()/kmip;
lab[0] = p->GetLabel(0);
lab[3] = i;
lad = lab[0];
if(lad>=0){
- part = (TParticle*) fAr->Particle(lad);
+ part = (TParticle*) fAr->GetMCApp()->Particle(lad);
lad = -3;
while(part->P() < 0.005){
if(part->GetFirstMother()<0){
break;
} // end if part->GetFirstMother()<0
lad = part->GetFirstMother();
- part = (TParticle*) fAr->Particle(lad);
+ part = (TParticle*) fAr->GetMCApp()->Particle(lad);
} // end while part->P() < 0.005
if(lab[1]<0) lab[1] = lad;
else if(lab[2]<0) lab[2] = lad;
else Warning("Exec","No empty lables!");
} // end if lab>=0
- new(cl[j]) AliITSclusterV2(lab,lp);
+ Int_t info[3]={0,0,0};
+ new(cl[j]) AliITSclusterV2(lab,lp,info);
} // end for j
cTree->Fill();
cluster->Delete();