, fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath("")
, fCentralityClass(""), fSelectEMCALEvent(0)
, fEMCALEnergyCut(0.), fEMCALNcellsCut (0)
+, fSetCellMCLabelFromCluster(kFALSE)
{
// Constructor
, fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath("")
, fCentralityClass(""), fSelectEMCALEvent(0)
, fEMCALEnergyCut(0.), fEMCALNcellsCut (0)
+, fSetCellMCLabelFromCluster(kFALSE)
{
// Constructor
continue;
}
- //Create the digit, put a fake primary deposited energy to trick the clusterizer when checking the most likely primary
- new((*fDigitsArr)[idigit]) AliEMCALDigit( fCellLabels[id], fCellLabels[id],id, amp, time,AliEMCALDigit::kHG,idigit, 0, 0, 1);
+ Int_t mcLabel = cells->GetMCLabel(icell);
+ //if(fCellLabels[id]!=mcLabel)printf("mcLabel %d - %d\n",mcLabel,fCellLabels[id]);
+ if(fSetCellMCLabelFromCluster) mcLabel = fCellLabels[id]; // Older aliroot MC productions
+
+ // Create the digit, put a fake primary deposited energy to trick the clusterizer
+ // when checking the most likely primary
+
+ new((*fDigitsArr)[idigit]) AliEMCALDigit( mcLabel, mcLabel, id, amp, time,AliEMCALDigit::kHG,idigit, 0, 0, 1);
fCellLabels[id] =-1; //reset the entry in the array for next event
Float_t GetCentralityBin(Int_t i) const { if(i < 0 || i > 1) return -1 ;
else return fCentralityBin[i] ; }
+ void SwitchOnUseClusterMCLabelForCell() { fSetCellMCLabelFromCluster = kTRUE ;}
+ void SwitchOffUseClusterMCLabelForCell() { fSetCellMCLabelFromCluster = kFALSE ;}
+
+
private:
virtual void FillCaloClusterInEvent();
Float_t fEMCALEnergyCut; // At least an EMCAL cluster with this energy in the event
Int_t fEMCALNcellsCut; // At least an EMCAL cluster with fNCellsCut cells over fEnergyCut
+ Bool_t fSetCellMCLabelFromCluster; // Use cluster MC label as cell label
+
+
AliAnalysisTaskEMCALClusterize( const AliAnalysisTaskEMCALClusterize&); // not implemented
AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented
- ClassDef(AliAnalysisTaskEMCALClusterize, 24);
+ ClassDef(AliAnalysisTaskEMCALClusterize, 25);
};