3 // Emcal physics selection class
7 #include "AliEmcalPhysicsSelection.h"
8 #include "AliESDEvent.h"
11 ClassImp(AliEmcalPhysicsSelection)
13 AliEmcalPhysicsSelection::AliEmcalPhysicsSelection() :
14 AliPhysicsSelection(),
27 // Default constructor.
30 //__________________________________________________________________________________________________
31 UInt_t AliEmcalPhysicsSelection::GetSelectionMask(const TObject* obj)
33 const AliESDEvent *ev = static_cast<const AliESDEvent*>(obj);
34 UInt_t res = IsCollisionCandidate(ev);
37 fIsGoodEvent = kFALSE;
42 if ((res & AliVEvent::kAnyINT) ||
43 (res & AliVEvent::kEMC1) ||
44 (res & AliVEvent::kEMC7))
47 AliAnalysisManager *am = AliAnalysisManager::GetAnalysisManager();
48 am->LoadBranch("EMCALCells.");
49 am->LoadBranch("CaloClusters");
51 AliESDCaloCells *cells = ev->GetEMCALCells();
52 const Short_t nCells = cells->GetNumberOfCells();
54 // mark LHC11a fast only partition if requested
55 if (res & AliVEvent::kFastOnly) {
57 if (fMarkFastOnly||fSkipFastOnly) {
59 AliFatal(Form("Number of cells %d, even though EMCAL should not be in fast only partition.",nCells));
61 fIsGoodEvent = kFALSE;
65 // count cells above threshold
66 Int_t nCellCount[10] = {0,0,0,0,0,0,0,0,0,0};
67 for(Int_t iCell=0; iCell<nCells; ++iCell) {
68 Short_t cellId = cells->GetCellNumber(iCell);
69 Double_t cellE = cells->GetCellAmplitude(cellId);
70 Int_t sm = cellId / (24*48);
77 const Int_t nCaloClusters = ev->GetNumberOfCaloClusters();
78 for(Int_t iClus = 0; iClus<nCaloClusters; ++iClus) {
79 AliESDCaloCluster *cl = ev->GetCaloCluster(iClus);
87 // bad cell criterion for LHC11a from
88 // https://indico.cern.ch/materialDisplay.py?contribId=4&materialId=slides&confId=147067
89 const Int_t runN = ev->GetRunNumber();
90 if ((runN>=144871) && (runN<=146860)) {
91 if (nCellCount[4] > 100)
94 if ((runN>=146858) && (runN<=146860)) {
95 if ((res&AliVEvent::kMB) && (nCellCount[3]>=21))
97 else if ((res&AliVEvent::kEMC1) && (nCellCount[3]>=35))
102 fIsGoodEvent = kFALSE;
106 if (fCellMaxE>=fCellMinE)
109 if (fClusMaxE>=fClusMinE)
115 if ((fSkipLedEvent && fIsLedEvent) ||
116 (fSkipFastOnly && fIsFastOnly))