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
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;
return 0;
}
+
Float_t bestMatchPhos[nPhosClusters];
for(int ic = 0; ic < nPhosClusters; ic++) {
bestMatchPhos[ic] = 999999;
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 ) {
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);
}
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);