, fRemoveLEDEvents(kTRUE),fRemoveExoticEvents(kFALSE)
, fImportGeometryFromFile(kFALSE), fImportGeometryFilePath("")
, fOADBSet(kFALSE), fAccessOADB(kTRUE), fOADBFilePath("")
-, fCentralityClass("")
+, fCentralityClass(""), fSelectEMCALEvent(0)
+, fEMCALEnergyCut(0.), fEMCALNcellsCut (0)
{
// Constructor
}
+//_______________________________________________________
+Bool_t AliAnalysisTaskEMCALClusterize::AcceptEventEMCAL()
+{
+ // Accept event given there is a EMCAL cluster with enough energy, and not noisy, exotic
+
+ if(!fSelectEMCALEvent) return kTRUE; // accept
+
+ if(fEMCALEnergyCut <= 0) return kTRUE; // accept
+
+ Int_t nCluster = InputEvent() -> GetNumberOfCaloClusters();
+ AliVCaloCells * caloCell = InputEvent() -> GetEMCALCells();
+ Int_t bc = InputEvent() -> GetBunchCrossNumber();
+
+ for(Int_t icalo = 0; icalo < nCluster; icalo++)
+ {
+ AliVCluster *clus = (AliVCluster*) (InputEvent()->GetCaloCluster(icalo));
+
+ if( ( clus->IsEMCAL() ) && ( clus->GetNCells() > fEMCALNcellsCut ) && ( clus->E() > fEMCALEnergyCut ) &&
+ fRecoUtils->IsGoodCluster(clus,fGeom,caloCell,bc))
+ {
+
+ if (fDebug > 0)
+ printf("AliAnalysisTaskEMCALClusterize::AcceptEventEMCAL() - Accept : E %2.2f > %2.2f, nCells %d > %d \n",
+ clus->E(), fEMCALEnergyCut, clus->GetNCells(), fEMCALNcellsCut);
+
+ return kTRUE;
+ }
+
+ }// loop
+
+ if (fDebug > 0)
+ printf("AliAnalysisTaskEMCALClusterize::AcceptEventEMCAL() - Reject \n");
+
+ return kFALSE;
+
+}
+
//_______________________________________________
void AliAnalysisTaskEMCALClusterize::AccessOADB()
{
fEvent = 0x0;
+ //Process events if there is a high energy cluster
+ if(!AcceptEventEMCAL()) return ;
+
AliAODInputHandler* aodIH = dynamic_cast<AliAODInputHandler*>((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler());
Int_t eventN = Entry();
if(aodIH) eventN = aodIH->GetReadEntry();
if(!fCaloClusterArr) fCaloClusterArr = new TObjArray(10000);
else fCaloClusterArr->Delete();//Clear("C"); it leaks?
+ InitGeometry(); // only once, must be done before OADB, geo OADB accessed here
+
//Get the event, do some checks and settings
CheckAndGetEvent() ;
//Init pointers, geometry, clusterizer, ocdb, aodb
- InitGeometry(); // only once, must be done before OADB, geo OADB accessed here
if(fAccessOCDB) AccessOCDB();
if(fAccessOADB) AccessOADB(); // only once
virtual void LocalInit() { Init() ; }
// Event methods, settings
+
+ Bool_t AcceptEventEMCAL();
+ void SwitchOnSelectEMCALEvent() { fSelectEMCALEvent = kTRUE ; }
+ void SwitchOffSelectEMCALEvent() { fSelectEMCALEvent = kFALSE ; }
+ void SetEMCALEnergyCut(Float_t cut) { fEMCALEnergyCut = cut ; }
+ void SetEMCALNcellsCut(Int_t cut) { fEMCALNcellsCut = cut ; }
+
void CheckAndGetEvent();
Bool_t IsExoticEvent();
TString fCentralityClass; // Name of selected centrality class
Float_t fCentralityBin[2]; // Minimum and maximum value of the centrality for the analysis
-
+ // Event selection with some signal in EMCAL
+ Bool_t fSelectEMCALEvent; // Process the event if there is some high energy cluster
+ 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
+
AliAnalysisTaskEMCALClusterize( const AliAnalysisTaskEMCALClusterize&); // not implemented
AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented
- ClassDef(AliAnalysisTaskEMCALClusterize, 22);
+ ClassDef(AliAnalysisTaskEMCALClusterize, 23);
};
const Bool_t bNonLine = kFALSE,
const Int_t minCen = -1,
const Int_t maxCen = -1,
+ const Float_t clusterEnergyCutEvent = -1,
const Int_t nRowDiff = 1,
const Int_t nColDiff = 1
)
ConfigureEMCALRecoUtils(reco,bMC,exotic,bNonLine,bRecalE,bBad,bRecalT);
//-------------------------------------------------------
- //Alignment matrices
+ // Alignment matrices
//-------------------------------------------------------
clusterize->SetImportGeometryFromFile(kTRUE,"$ALICE_ROOT/OADB/EMCAL/geometry_2011.root"); // change only in case 2010 to geometry_2010.root
clusterize->SwitchOnLoadOwnGeometryMatrices();
}
+ //-------------------------------------------------------
+ // Clusterize events with some significant signal
+ //-------------------------------------------------------
+
+ if(clusterEnergyCutEvent > 0)
+ {
+ clusterize->SwitchOnSelectEMCALEvent();
+ clusterize->SetEMCALEnergyCut(clusterEnergyCutEvent);
+ clusterize->SetEMCALNcellsCut(3);
+ }
+ else clusterize->SwitchOffSelectEMCALEvent();
+
//-------------------------------------------------------
// Trigger options
//-------------------------------------------------------