]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugixes
authorslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Apr 2010 22:47:37 +0000 (22:47 +0000)
committerslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Apr 2010 22:47:37 +0000 (22:47 +0000)
HLT/global/AliHLTGlobalTrackMatcher.cxx
HLT/global/AliHLTGlobalTrackMatcher.h
HLT/global/physics/AliHLTCaloHistoComponent.cxx

index 1d1fdfb4fb418f68ae9c342c5404fe0e6cad29ab..52260559d314fca1e3b3ad91a74bef1250e54112 100644 (file)
@@ -114,7 +114,7 @@ Bool_t AliHLTGlobalTrackMatcher::IsTrackCloseToDetector(AliExternalTrackParam *
     return kFALSE;
   }
 
-  //  HLTInfo("Track coordinate at R = PHOS radius %f %f %f", trackPosition[0],trackPosition[1],trackPosition[2]);
+  //HLTInfo("Track coordinate at R = PHOS radius %f %f %f", trackPosition[0],trackPosition[1],trackPosition[2]);
 
 
   //Positive y for EMCAL, negative for PHOS
index 06a0a80246eec0432116f54706185d7e385af1bd..ed6190c55d39ea644fbe42d6a7294d9590cbb8dc 100644 (file)
@@ -75,6 +75,8 @@ Int_t AliHLTGlobalTrackMatcher::Match( TObjArray * trackArray, vector<T*>  &phos
   Int_t nEmcalClusters = emcalClustersVector.size(); 
   
 
+  //HLTError("tracks phos emcal %d %d %d", nTracks, nPhosClusters, nEmcalClusters);
+
   //See if there are tracks and clusters to match
   if ( nTracks <= 0 ) {
     return 0;
@@ -82,6 +84,7 @@ Int_t AliHLTGlobalTrackMatcher::Match( TObjArray * trackArray, vector<T*>  &phos
     return 0;
   }
 
+
   Float_t bestMatchPhos[nPhosClusters];   
   for(int ic = 0; ic < nPhosClusters; ic++) {
     bestMatchPhos[ic] = 999999;
@@ -145,6 +148,8 @@ Int_t AliHLTGlobalTrackMatcher::MatchTrackToClusters( AliExternalTrackParam * tr
     Double_t dd = trackPosition[2] - clusterPosition[2];
     Double_t dz = dd*dd;
   
+    //HLTError("dxy dx %f %f", TMath::Sqrt(dxy), TMath::Sqrt(dz));
+
     Double_t match = dz + dxy;
     
     if( match > fMatchDistance  )  {     
index d7c35671b9baca8efcdd7109797c474d0a1b4cc7..d01d8ff9d504d2817dacf706808230a98022bc28 100644 (file)
@@ -266,14 +266,12 @@ Int_t AliHLTCaloHistoComponent::DoEvent(const AliHLTComponentEventData& /*evtDat
 
   
   if (fDoEmcal) {
-    //    HLTInfo("Processing EMCAL blocks");
     for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock( kAliHLTDataTypeCaloCluster | kAliHLTDataOriginEMCAL ); pBlock!=NULL; pBlock=GetNextInputBlock()) {
       ProcessBlocks(pBlock, fEmcalProducerArray);
     }
   }
 
   if (fDoPhos) {
-    //HLTInfo("Processing PHOS blocks");
     for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock( kAliHLTDataTypeCaloCluster | kAliHLTDataOriginPHOS ); pBlock!=NULL; pBlock=GetNextInputBlock()) {
       ProcessBlocks(pBlock, fPhosProducerArray);
     }
@@ -313,32 +311,30 @@ Int_t AliHLTCaloHistoComponent::ProcessBlocks(const AliHLTComponentBlockData * p
     return -1;
   }
   
-  clustersVector.resize((int) (clusterHeader->fNClusters)); 
+  clustersVector.reserve((int) (clusterHeader->fNClusters)); 
   Int_t nClusters = 0;
   Double_t ampFrac;
   UShort_t cellId;
   Bool_t cutCluster = false;
   while( (clusterStruct = fClusterReader->NextCluster()) != 0) {
-     cutCluster = false;
-     if(clusterStruct->fEnergy > 0.5)
-     {
-        for(UInt_t i = 0; i < clusterStruct->fNCells; i++)
-        {
-           fClusterReader->GetCell(clusterStruct, cellId, ampFrac, i);
-           if(ampFrac > 0.9)
-           {
-              cutCluster = true;
-              break;
-           }
-        }
-     if(!cutCluster)
-     {
-        clustersVector[nClusters++] = clusterStruct;  
-     }
-     }
+    cutCluster = false;
+
+    if(clusterStruct->fEnergy > 0.5) {
+      for(UInt_t i = 0; i < clusterStruct->fNCells; i++) {
+       fClusterReader->GetCell(clusterStruct, cellId, ampFrac, i);
+       if(ampFrac > 0.9) {
+         cutCluster = true;
+         break;
+       }
+      }
+    }
+    
+    if(!cutCluster) {
+      clustersVector.push_back(clusterStruct);  
+    }
   }
   
-  nClusters = clusterHeader->fNClusters;
+  nClusters = clustersVector.size();
   
   for(int ih = 0; ih < histoArray->GetEntriesFast(); ih++) {
     iResult = static_cast<AliHLTCaloHistoProducer*>(histoArray->At(ih))->FillHistograms(nClusters, clustersVector);