// AliITSVertexerCosmics //
//////////////////////////////////////////////////////////////////////
+/* $Id$ */
+
//______________________________________________________________________
AliITSVertexer::AliITSVertexer():AliVertexer(),
fLadders(),
fLadOnLay2(0),
+fDetTypeRec(NULL),
+fMinTrackletsForPilup(0),
+fIsPileup(0),
+fNTrpuv(-2),
+fZpuv(-9999999.),
fFirstEvent(0),
fLastEvent(-1)
{
// Default Constructor
SetLaddersOnLayer2();
+ SetMinTrackletsForPilup();
+ for(Int_t i=0; i<kNSPDMod;i++) fUseModule[i]=kTRUE;
}
//______________________________________________________________________
Bool_t success=kTRUE;
if(!fCurrentVertex)success=kFALSE;
if(fCurrentVertex && fCurrentVertex->GetNContributors()<1)success=kFALSE;
+
+ // get the FastOr bit mask
+ TBits fastOrFiredMap = fDetTypeRec->GetFastOrFiredMap();
+
+ AliITSMultReconstructor multReco;
+
if(!success){
AliWarning("Tracklets multiplicity not determined because the primary vertex was not found");
+ AliWarning("Just counting the number of cluster-fired chips on the SPD layers");
+ if (!itsClusterTree) {
+ AliError(" Invalid ITS cluster tree !\n");
+ return;
+ }
+ multReco.LoadClusterFiredChips(itsClusterTree);
+ Short_t nfcL1 = multReco.GetNFiredChips(0);
+ Short_t nfcL2 = multReco.GetNFiredChips(1);
+ fMult = new AliMultiplicity(0,0,0,0,0,0,0,0,0,nfcL1,nfcL2,fastOrFiredMap);
return;
}
- AliITSMultReconstructor* multReco = new AliITSMultReconstructor();
if (!itsClusterTree) {
AliError(" Invalid ITS cluster tree !\n");
fCurrentVertex->GetXYZ(vtx);
Float_t vtxf[3];
for(Int_t i=0;i<3;i++)vtxf[i]=vtx[i];
- multReco->SetHistOn(kFALSE);
- multReco->Reconstruct(itsClusterTree,vtxf,vtxf);
- Int_t notracks=multReco->GetNTracklets();
+ multReco.SetHistOn(kFALSE);
+ multReco.Reconstruct(itsClusterTree,vtxf,vtxf);
+ Int_t notracks=multReco.GetNTracklets();
Float_t *tht = new Float_t [notracks];
Float_t *phi = new Float_t [notracks];
Float_t *dphi = new Float_t [notracks];
Int_t *labels = new Int_t[notracks];
Int_t *labelsL2 = new Int_t[notracks];
- for(Int_t i=0;i<multReco->GetNTracklets();i++){
- tht[i] = multReco->GetTracklet(i)[0];
- phi[i] = multReco->GetTracklet(i)[1];
- dphi[i] = multReco->GetTracklet(i)[2];
- labels[i] = static_cast<Int_t>(multReco->GetTracklet(i)[3]);
- labelsL2[i] = static_cast<Int_t>(multReco->GetTracklet(i)[4]);
+ for(Int_t i=0;i<multReco.GetNTracklets();i++){
+ tht[i] = multReco.GetTracklet(i)[0];
+ phi[i] = multReco.GetTracklet(i)[1];
+ dphi[i] = multReco.GetTracklet(i)[2];
+ labels[i] = static_cast<Int_t>(multReco.GetTracklet(i)[3]);
+ labelsL2[i] = static_cast<Int_t>(multReco.GetTracklet(i)[4]);
}
- Int_t nosingleclus=multReco->GetNSingleClusters();
+ Int_t nosingleclus=multReco.GetNSingleClusters();
Float_t *ths = new Float_t [nosingleclus];
Float_t *phs = new Float_t [nosingleclus];
for(Int_t i=0;i<nosingleclus;i++){
- ths[i] = multReco->GetCluster(i)[0];
- phs[i] = multReco->GetCluster(i)[1];
+ ths[i] = multReco.GetCluster(i)[0];
+ phs[i] = multReco.GetCluster(i)[1];
}
- fMult = new AliMultiplicity(notracks,tht,phi,dphi,labels,labelsL2,nosingleclus,ths,phs);
+ Short_t nfcL1 = multReco.GetNFiredChips(0);
+ Short_t nfcL2 = multReco.GetNFiredChips(1);
+ fMult = new AliMultiplicity(notracks,tht,phi,dphi,labels,labelsL2,nosingleclus,ths,phs,nfcL1,nfcL2,fastOrFiredMap);
+
delete [] tht;
delete [] phi;
delete [] dphi;
delete [] labels;
delete [] labelsL2;
- delete multReco;
return;
}
void AliITSVertexer::Init(TString filename){
// Initialize the vertexer in case of
// analysis of an entire file
- AliRunLoader *rl = AliRunLoader::GetRunLoader();
+ AliRunLoader *rl = AliRunLoader::Instance();
if(!rl){
Fatal("AliITSVertexer","Run Loader not found");
}
//______________________________________________________________________
void AliITSVertexer::WriteCurrentVertex(){
// Write the current AliVertex object to file fOutFile
- AliRunLoader *rl = AliRunLoader::GetRunLoader();
+ AliRunLoader *rl = AliRunLoader::Instance();
AliITSLoader* itsLoader = (AliITSLoader*) rl->GetLoader("ITSLoader");
fCurrentVertex->SetName("Vertex");
// const char * name = fCurrentVertex->GetName();
void AliITSVertexer::FindVertices(){
// computes the vertices of the events in the range FirstEvent - LastEvent
- AliRunLoader *rl = AliRunLoader::GetRunLoader();
+ AliRunLoader *rl = AliRunLoader::Instance();
AliITSLoader* itsloader = (AliITSLoader*) rl->GetLoader("ITSLoader");
itsloader->LoadRecPoints("read");
for(Int_t i=fFirstEvent;i<=fLastEvent;i++){