//________________________________________________________________________
AliAnalysisTaskEMCALClusterize::AliAnalysisTaskEMCALClusterize(const char *name)
: AliAnalysisTaskSE(name)
- , fGeom(0), fGeomName("EMCAL_COMPLETEV1"), fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
- , fCalibData(0), fPedestalData(0), fOCDBpath("raw://"), fAccessOCDB(kFALSE)
- , fDigitsArr(0), fClusterArr(0), fCaloClusterArr(0)
- , fRecParam(0), fClusterizer(0), fUnfolder(0), fJustUnfold(kFALSE)
- , fOutputAODBranch(0), fOutputAODBranchName("newEMCALClusters")
- , fFillAODFile(kTRUE), fFillAODHeader(0), fFillAODCaloCells(0)
- , fRun(-1), fRecoUtils(0), fConfigName("")
- , fCellLabels(), fCellSecondLabels(), fCellTime()
+ , fGeom(0), fGeomName("EMCAL_COMPLETEV1")
+ , fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
+ , fCalibData(0), fPedestalData(0)
+ , fOCDBpath("raw://"), fAccessOCDB(kFALSE)
+ , fDigitsArr(0), fClusterArr(0), fCaloClusterArr(0)
+ , fRecParam(0), fClusterizer(0)
+ , fUnfolder(0), fJustUnfold(kFALSE)
+ , fOutputAODBranch(0), fOutputAODBranchName("newEMCALClusters")
+ , fFillAODFile(kTRUE), fFillAODHeader(0)
+ , fFillAODCaloCells(0), fRun(-1)
+ , fRecoUtils(0), fConfigName("")
+ , fCellLabels(), fCellSecondLabels(), fCellTime()
, fMaxEvent(1000000000), fDoTrackMatching(kFALSE)
- , fSelectCell(kFALSE), fSelectCellMinE(0.005), fSelectCellMinFrac(0.001)
+ , fSelectCell(kFALSE), fSelectCellMinE(0.005), fSelectCellMinFrac(0.001)
+ , fRemoveLEDEvents(kFALSE)
{
//ctor
for(Int_t i = 0; i < 10; i++) fGeomMatrix[i] = 0;
//________________________________________________________________________
AliAnalysisTaskEMCALClusterize::AliAnalysisTaskEMCALClusterize()
: AliAnalysisTaskSE("DefaultAnalysis_AliAnalysisTaskEMCALClusterize")
- , fGeom(0), fGeomName("EMCAL_COMPLETEV1"), fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
- , fCalibData(0), fPedestalData(0), fOCDBpath("raw://"), fAccessOCDB(kFALSE)
- , fDigitsArr(0), fClusterArr(0), fCaloClusterArr(0)
- , fRecParam(0), fClusterizer(0), fUnfolder(0), fJustUnfold(kFALSE)
- , fOutputAODBranch(0), fOutputAODBranchName("newEMCALClusters")
- , fFillAODFile(kFALSE), fFillAODHeader(0), fFillAODCaloCells(0)
- , fRun(-1), fRecoUtils(0), fConfigName("")
- , fCellLabels(), fCellSecondLabels(), fMaxEvent(1000000000), fDoTrackMatching(kFALSE)
- , fSelectCell(kFALSE), fSelectCellMinE(0.005), fSelectCellMinFrac(0.001)
+, fGeom(0), fGeomName("EMCAL_COMPLETEV1")
+, fGeomMatrixSet(kFALSE), fLoadGeomMatrices(kFALSE)
+, fCalibData(0), fPedestalData(0)
+, fOCDBpath("raw://"), fAccessOCDB(kFALSE)
+, fDigitsArr(0), fClusterArr(0), fCaloClusterArr(0)
+, fRecParam(0), fClusterizer(0)
+, fUnfolder(0), fJustUnfold(kFALSE)
+, fOutputAODBranch(0), fOutputAODBranchName("newEMCALClusters")
+, fFillAODFile(kTRUE), fFillAODHeader(0)
+, fFillAODCaloCells(0), fRun(-1)
+, fRecoUtils(0), fConfigName("")
+, fCellLabels(), fCellSecondLabels(), fCellTime()
+, fMaxEvent(1000000000), fDoTrackMatching(kFALSE)
+, fSelectCell(kFALSE), fSelectCellMinE(0.005), fSelectCellMinFrac(0.001)
+, fRemoveLEDEvents(kFALSE)
+
{
// Constructor
for(Int_t i = 0; i < 10; i++) fGeomMatrix[i] = 0;
//Remove the contents of output list set in the previous event
fOutputAODBranch->Clear("C");
+ // Reject event if large clusters with large energy
+ // Use only for LHC11a data for the moment, and if input is clusterizer V1 or V1+unfolding
+ // If clusterzer NxN or V2 it does not help
+ if(fRemoveLEDEvents){
+ for (Int_t i = 0; i < InputEvent()->GetNumberOfCaloClusters(); i++)
+ {
+ AliVCluster *clus = InputEvent()->GetCaloCluster(i);
+ if(clus->IsEMCAL()){
+
+ if ((clus->E() > 500 && clus->GetNCells() > 200 ) || clus->GetNCells() > 300) {
+ Int_t absID = clus->GetCellsAbsId()[0];
+ Int_t sm = fGeom->GetSuperModuleNumber(absID);
+ printf("AliAnalysisTaskEMCALClusterize - reject event with cluster : E %f, ncells %d, absId(0) %d, SM %d\n",clus->E(), clus->GetNCells(),absID, sm);
+
+ return;
+ }
+ }
+ }
+ }// Remove LED events
+
//Magic line to write events to AOD file
AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(fFillAODFile);
LoadBranches();
-/**************************************************************************\r
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *\r
- * *\r
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
* *
fOutputContainer->Add(fhYGoodVertex);
- fhNEvents = new TH1I("hNEvents", "Number of analyzed events", 17, 0, 17) ;
+ fhNEvents = new TH1I("hNEvents", "Number of analyzed events", 20, 0, 20) ;
fhNEvents->SetXTitle("Selection");
fhNEvents->SetYTitle("# events");
fhNEvents->GetXaxis()->SetBinLabel(1 ,"1 = PS");
fhNEvents->GetXaxis()->SetBinLabel(15,"15 = 9 & 11");
fhNEvents->GetXaxis()->SetBinLabel(16,"16 = 10 & 11");
fhNEvents->GetXaxis()->SetBinLabel(17,"17 = 6 & 10");
+ fhNEvents->GetXaxis()->SetBinLabel(17,"17 = 1 & |Z|<50");
+ fhNEvents->GetXaxis()->SetBinLabel(18,"18 = Reject EMCAL");
+ fhNEvents->GetXaxis()->SetBinLabel(19,"19 = 18 & 2");
+ fhNEvents->GetXaxis()->SetBinLabel(20,"20 = 18 & |Z|<50");
fOutputContainer->Add(fhNEvents);
//printf("AliAnalysisTaskCounter::UserExec() : z vertex %d, good vertex %d, v0and %d, pile up %d, track mult %d\n ", bSelectVZ, bGoodV, bV0AND, bPileup, trackMult);
+ // Events that could be rejected in EMCAL
+ for (Int_t i = 0; i < InputEvent()->GetNumberOfCaloClusters(); i++)
+ {
+ AliVCluster *clus = InputEvent()->GetCaloCluster(i);
+ if(clus->IsEMCAL()){
+
+ if ((clus->E() > 500 && clus->GetNCells() > 200 ) || clus->GetNCells() > 300) {
+ //printf("Counter: Reject event with cluster: E %f, ncells %d\n",clus->E(),clus->GetNCells());
+ fhNEvents->Fill(17.5);
+ if(bSelectVZ) fhNEvents->Fill(18.5);
+ if(TMath::Abs(v[2]) < 50.) fhNEvents->Fill(19.5);
+ break;
+ }
+
+ }
+ }
+
PostData(1,fOutputContainer);
}