if (argc <= 0) return 0;
- int i=0;
-
- TString argument=argv[i];
-
- if (argument.CompareTo("-digitthreshold") == 0)
- {
- if (++i >= argc) return -EPROTO;
- argument = argv[i];
- fClusterizerPtr->SetEmcMinEnergyThreshold(argument.Atof());
- return 1;
- }
-
- if (argument.CompareTo("-recpointthreshold") == 0)
- {
- if (++i >= argc) return -EPROTO;
- argument = argv[i];
- fClusterizerPtr->SetEmcClusteringThreshold(argument.Atof());
- return 1;
- }
-
- if (argument.CompareTo("-cutonsinglecell") == 0)
- {
- if (++i >= argc) return -EPROTO;
- argument = argv[i];
- fAnalyserPtr->SetCutOnSingleCellClusters(true, argument.Atof());
- return 1;
- }
- if (argument.CompareTo("-sortbyposition") == 0)
- {
- fClusterizerPtr->SetSortDigitsByPosition();
- return 1;
+ for(int i=0;i<argc;i++){
+ TString argument=argv[i];
+
+ if (argument.CompareTo("-digitthreshold") == 0)
+ {
+ if (++i >= argc) return -EPROTO;
+ argument = argv[i];
+ fClusterizerPtr->SetEmcMinEnergyThreshold(argument.Atof());
+ }
+
+ if (argument.CompareTo("-recpointthreshold") == 0)
+ {
+ if (++i >= argc) return -EPROTO;
+ argument = argv[i];
+ fClusterizerPtr->SetEmcClusteringThreshold(argument.Atof());
+ }
+
+ if (argument.CompareTo("-cutonsinglecell") == 0)
+ {
+ if (++i >= argc) return -EPROTO;
+ argument = argv[i];
+ fAnalyserPtr->SetCutOnSingleCellClusters(true, argument.Atof());
+ }
+
+ if (argument.CompareTo("-emctimegate") == 0)
+ {
+ if (++i >= argc) return -EPROTO;
+ argument = argv[i];
+ fClusterizerPtr->SetEmcTimeGate(argument.Atof());
+ }
+
+ if (argument.CompareTo("-sortbyposition") == 0)
+ {
+ fClusterizerPtr->SetSortDigitsByPosition();
+ }
}
return 0;
// ConfigureFromCDBTObjString(path);
- for (int i = 0; i < argc; i++)
- {
- ScanConfigurationArgument(i, argv);
- }
+ ScanConfigurationArgument(argc, argv);
return 0;
}
Int_t AliHLTCaloClusterizerNbyN::ClusterizeEvent(Int_t nDigits)
{
-
//see header file for documentation
Int_t nRecPoints = 0;
fNRecPoints = 0;
Int_t maxDiff = fN/2;
for (Int_t j = 0; j < nDigits; j++)
{
- if (fDigitsPointerArray[j]->fEnergy < fEmcMinEnergyThreshold) break; // Sorted by energy
+ if (fDigitsPointerArray[j]->fEnergy < fEmcMinEnergyThreshold) break; // Sorted by energy
+ if(fDigitsPointerArray[j]->fAssociatedCluster!=-1) continue;//cell is already associated with a cluster (higher energy seed)
+ if(TMath::Abs(fRecPointDataPtr->fTime-fDigitsPointerArray[j]->fTime) >= fEmcTimeGate) continue;//time difference between cell and seed is larger than cut
if (TMath::Abs(fDigitsPointerArray[i]->fX - fDigitsPointerArray[j]->fX) <= maxDiff
&& TMath::Abs(fDigitsPointerArray[i]->fZ - fDigitsPointerArray[j]->fZ) <= maxDiff) // The digit is in our grid