,fExoticCellFraction(-1)
,fExoticCellDiffTime(-1)
,fExoticCellMinAmplitude(-1)
+,fSetCellMCLabelFromCluster(kFALSE)
{
// Default constructor.
,fExoticCellFraction(-1)
,fExoticCellDiffTime(-1)
,fExoticCellMinAmplitude(-1)
+,fSetCellMCLabelFromCluster(kFALSE)
{
// Named constructor
,fExoticCellFraction(-1)
,fExoticCellDiffTime(-1)
,fExoticCellMinAmplitude(-1)
+,fSetCellMCLabelFromCluster(kFALSE)
{
// Named constructor.
if (!event)
return;
+
+ // In case of MC productions done before aliroot tag v5-02-Rev09
+ // assing the cluster label to all the cells belonging to this cluster
+ // very rough
+ Int_t cellLabels[12672];
+ if(fSetCellMCLabelFromCluster)
+ {
+ for (Int_t i = 0; i < 12672; i++) cellLabels[i] = 0;
+
+ Int_t nClusters = event->GetNumberOfCaloClusters();
+ for (Int_t i = 0; i < nClusters; i++)
+ {
+ AliVCluster *clus = event->GetCaloCluster(i);
+
+ if(!clus) continue;
+
+ if(!clus->IsEMCAL()) continue ;
+
+ Int_t label = clus->GetLabel();
+ UShort_t * index = clus->GetCellsAbsId() ;
+
+ for(Int_t icell=0; icell < clus->GetNCells(); icell++ )
+ cellLabels[index[icell]] = label;
+
+ }// cluster loop
+ }
fDigitsArr->Clear("C");
AliVCaloCells *cells = event->GetEMCALCells();
if (fEMCALRecoUtils->IsExoticCell(cellNumber,cells,event->GetBunchCrossNumber()))
continue;
+ if(fSetCellMCLabelFromCluster) mcLabel = cellLabels[cellNumber];
+
new((*fDigitsArr)[idigit]) AliEMCALDigit(mcLabel, mcLabel, cellNumber,
(Float_t)cellAmplitude, (Float_t)cellTime,
AliEMCALDigit::kHG,idigit, 0, 0, 1);
-
-// AliEMCALDigit *digit = static_cast<AliEMCALDigit*>(fDigitsArr->New(idigit));
-// digit->SetId(cellNumber);
-// digit->SetTime((Float_t)cellTime);
-// digit->SetTimeR((Float_t)cellTime);
-// digit->SetIndexInList(idigit);
-// digit->SetType(AliEMCALDigit::kHG);
-// digit->SetAmplitude((Float_t)cellAmplitude);
idigit++;
}
}
void SwitchOnUpdateCellOnly() { fDoUpdateOnly = kTRUE ;}
void SwitchOffUpdateCellOnly() { fDoUpdateOnly = kFALSE ;}
-
- void SwitchOnTrackMatch() { fDoTrackMatch = kTRUE ;}
- void SwitchOffTrackMatch() { fDoTrackMatch = kFALSE ;}
+ void SwitchOnTrackMatch() { fDoTrackMatch = kTRUE ;}
+ void SwitchOffTrackMatch() { fDoTrackMatch = kFALSE ;}
+
+ void SwitchOnUseClusterMCLabelForCell() { fSetCellMCLabelFromCluster = kTRUE ;}
+ void SwitchOffUseClusterMCLabelForCell() { fSetCellMCLabelFromCluster = kFALSE ;}
+
private:
AliVEvent* GetEvent();
Float_t fExoticCellDiffTime; // if time of candidate to exotic and close cell is too different (in ns), it must be noisy, set amp to 0
Float_t fExoticCellMinAmplitude; // check for exotic only if amplitud is larger than this value
+ Bool_t fSetCellMCLabelFromCluster; // Use cluster MC label as cell label
+
AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
- ClassDef(AliEMCALTenderSupply, 12); // EMCAL tender task
+ ClassDef(AliEMCALTenderSupply, 13); // EMCAL tender task
};
#endif