From 75153e10ef790c39a3a563f65c768cf5671fe66a Mon Sep 17 00:00:00 2001 From: gconesab Date: Thu, 29 Sep 2011 13:20:41 +0000 Subject: [PATCH] add one more condition on SM4 to reject LED events --- PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.cxx | 11 ++++++----- PWG4/PartCorrBase/AliAnalysisTaskCounter.cxx | 8 +++++--- PWG4/PartCorrBase/AliCaloTrackReader.cxx | 10 ++++++---- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.cxx b/PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.cxx index 898e891e738..f09deab322c 100644 --- a/PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.cxx +++ b/PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.cxx @@ -422,9 +422,11 @@ void AliAnalysisTaskEMCALClusterize::UserExec(Option_t *) } // Count number of cells with energy larger than 0.1 in SM3, cut on this number - Int_t ncells = 0; + Int_t ncellsSM3 = 0; + Int_t ncellsSM4 = 0; for(Int_t icell = 0; icell < event->GetEMCALCells()->GetNumberOfCells(); icell++){ - if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==3) ncells++; + if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==3) ncellsSM3++; + if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==4) ncellsSM4++; } TString triggerclasses = ""; @@ -434,9 +436,8 @@ void AliAnalysisTaskEMCALClusterize::UserExec(Option_t *) Int_t ncellcut = 21; if(triggerclasses.Contains("EMC")) ncellcut = 35; - if(ncells >= ncellcut ){ - printf("AliAnalysisTaskEMCALClusterize - reject event with cluster - reject event with ncells in SM3: ncells %d\n",ncells); - + if( ncellsSM3 >= ncellcut || ncellsSM4 >= 100 ){ + printf("AliAnalysisTaskEMCALClusterize - reject event with cluster - reject event with ncells in SM3 %d and SM4 %d\n",ncellsSM3, ncellsSM4); return; } diff --git a/PWG4/PartCorrBase/AliAnalysisTaskCounter.cxx b/PWG4/PartCorrBase/AliAnalysisTaskCounter.cxx index 85fde25a719..46d1c14cab7 100644 --- a/PWG4/PartCorrBase/AliAnalysisTaskCounter.cxx +++ b/PWG4/PartCorrBase/AliAnalysisTaskCounter.cxx @@ -347,15 +347,17 @@ void AliAnalysisTaskCounter::UserExec(Option_t *) //LHC11a, 3 last runs, cut with this if(!bEMCALRejected){ // Count number of cells in SM3 with energy larger than 0.1, cut on this number - Int_t ncells = 0; + Int_t ncellsSM3 = 0; + Int_t ncellsSM4 = 0; for(Int_t icell = 0; icell < event->GetEMCALCells()->GetNumberOfCells(); icell++){ - if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==3) ncells++; + if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==3) ncellsSM3++; + if(event->GetEMCALCells()->GetAmplitude(icell) > 0.1 && event->GetEMCALCells()->GetCellNumber(icell)/(24*48)==4) ncellsSM4++; } Int_t ncellcut = 21; if(triggerclasses.Contains("EMC")) ncellcut = 35; - if(ncells >= ncellcut ){ + if( ncellsSM3 >= ncellcut || ncellsSM4 >= 100 ){ //printf("Counter: reject event with ncells in SM3: ncells %d\n",ncells); diff --git a/PWG4/PartCorrBase/AliCaloTrackReader.cxx b/PWG4/PartCorrBase/AliCaloTrackReader.cxx index 706a4ac1edc..275e6fd4a6d 100755 --- a/PWG4/PartCorrBase/AliCaloTrackReader.cxx +++ b/PWG4/PartCorrBase/AliCaloTrackReader.cxx @@ -383,18 +383,20 @@ Bool_t AliCaloTrackReader::FillInputEvent(const Int_t iEntry, const char * /*cur } // Count number of cells with energy larger than 0.1 in SM3, cut on this number - Int_t ncells = 0; + Int_t ncellsSM3 = 0; + Int_t ncellsSM4 = 0; for(Int_t icell = 0; icell < fInputEvent->GetEMCALCells()->GetNumberOfCells(); icell++){ Int_t absID = fInputEvent->GetEMCALCells()->GetCellNumber(icell); Int_t sm = GetCaloUtils()->GetEMCALGeometry()->GetSuperModuleNumber(absID); - if(fInputEvent->GetEMCALCells()->GetAmplitude(icell) > 0.1 && sm==3) ncells++; + if(fInputEvent->GetEMCALCells()->GetAmplitude(icell) > 0.1 && sm==3) ncellsSM3++; + if(fInputEvent->GetEMCALCells()->GetAmplitude(icell) > 0.1 && sm==4) ncellsSM4++; } Int_t ncellcut = 21; if(fFiredTriggerClassName.Contains("EMC")) ncellcut = 35; - if(ncells >= ncellcut ) { - if(fDebug > 0) printf(" AliCaloTrackReader::FillInputEvent() - reject event with ncells in SM3: ncells %d\n",ncells); + if(ncellsSM3 >= ncellcut || ncellsSM4 >= 100) { + if(fDebug > 0) printf(" AliCaloTrackReader::FillInputEvent() - reject event with ncells in SM3 %d and SM4 %d\n",ncellsSM3, ncellsSM4); return kFALSE; } }// Remove LED events -- 2.43.0