]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSVertexer.cxx
Fix for copy/paste error
[u/mrichter/AliRoot.git] / ITS / AliITSVertexer.cxx
index b4e0cdd54f9d9cb683e0e4eb3a9eb47096b5c402..0944a9b84346c0e485514001c68100cd57e11a0d 100644 (file)
@@ -4,6 +4,7 @@
 #include "AliITSVertexer.h"
 #include "AliITSLoader.h"
 #include "AliITSMultReconstructor.h"
+#include "AliITSRecPointContainer.h"
 
 const Float_t AliITSVertexer::fgkPipeRadius = 3.0;
 
@@ -22,6 +23,7 @@ ClassImp(AliITSVertexer)
 AliITSVertexer::AliITSVertexer():AliVertexer(),
 fLadders(), 
 fLadOnLay2(0),
+fComputeMultiplicity(kFALSE),
 fDetTypeRec(NULL),
 fMinTrackletsForPilup(0),
 fIsPileup(0),
@@ -67,18 +69,27 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   // Invokes AliITSMultReconstructor to determine the
   // charged multiplicity in the pixel layers
   if(fMult){delete fMult; fMult = 0;}
+
   Bool_t success=kTRUE;
+  Bool_t cosmics=kFALSE; 
   if(!fCurrentVertex)success=kFALSE;
   if(fCurrentVertex && fCurrentVertex->GetNContributors()<1)success=kFALSE;
+  if(fCurrentVertex && strstr(fCurrentVertex->GetTitle(),"cosmics")) {
+    success=kFALSE; 
+    cosmics=kTRUE;
+  } 
 
   // get the FastOr bit mask
   TBits fastOrFiredMap = fDetTypeRec->GetFastOrFiredMap();
-
+  TBits firedChipMap = fDetTypeRec->GetFiredChipMap(itsClusterTree);
   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(!cosmics) {     
+      AliDebug(1,"Tracklets multiplicity not determined because the primary vertex was not found");
+      AliDebug(1,"Just counting the number of cluster-fired chips on the SPD layers");
+    }
     if (!itsClusterTree) {
       AliError(" Invalid ITS cluster tree !\n");
       return;
@@ -87,6 +98,12 @@ void AliITSVertexer::FindMultiplicity(TTree *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,0,nfcL1,nfcL2,fastOrFiredMap);
+    fMult->SetFiredChipMap(firedChipMap);
+    AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance();
+    fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree));
+    for(Int_t kk=2;kk<=6;kk++){
+      fMult->SetITSClusters(kk-1,rcont->GetNClustersInLayerFast(kk));
+    }
     return;
   }
 
@@ -125,7 +142,12 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){
   Short_t nfcL1 = multReco.GetNFiredChips(0);
   Short_t nfcL2 = multReco.GetNFiredChips(1);
   fMult = new AliMultiplicity(notracks,tht,phi,dtht,dphi,labels,labelsL2,nosingleclus,ths,phs,nfcL1,nfcL2,fastOrFiredMap);
-
+  fMult->SetFiredChipMap(firedChipMap);
+  AliITSRecPointContainer* rcont = AliITSRecPointContainer::Instance();
+  fMult->SetITSClusters(0,rcont->GetNClustersInLayer(1,itsClusterTree));
+  for(Int_t kk=2;kk<=6;kk++){
+    fMult->SetITSClusters(kk-1,rcont->GetNClustersInLayerFast(kk));
+  }
   delete [] tht;
   delete [] phi;
   delete [] dtht;