27 #include <TClonesArray.h> 28 #include "AliVEvent.h" 31 #include "AliVParticle.h" 45 fIsParticleLevel(kFALSE),
112 AliError(Form(
"Unable to set class name %s for this container, it must inherits from %s!",clname,
fBaseClassName.Data()));
118 const AliVVertex *vertex =
event->GetPrimaryVertex();
119 if (vertex) vertex->GetXYZ(
fVertex);
139 AliError(Form(
"%s: Could not retrieve array with name %s!",
GetName(),
fClArrayName.Data()));
150 AliError(Form(
"%s: Objects of type %s in %s are not inherited from %s!",
172 for(
int index = 0; index <
GetNEntries(); index++){
173 UInt_t rejectionReason = 0;
182 if (lab < fLabelMap->GetSize()) {
186 AliDebug(3,Form(
"%s_AliEmcalContainer::GetIndexFromLabel - Label not found in the map, returning -1...",
fClArrayName.Data()));
191 AliDebug(3,Form(
"%s_AliEmcalContainer::GetIndexFromLabel - No index-label map found, returning label...",
fClArrayName.Data()));
198 UInt_t rs = rejectionReason;
200 while (rs >>= 1) { p++; }
206 if(!part1)
return kFALSE;
207 if(!part2)
return kFALSE;
208 Double_t dPhi = TMath::Abs(part1->Phi() - part2->Phi());
209 Double_t dEta = TMath::Abs(part1->Eta() - part2->Eta());
210 Double_t dpT = TMath::Abs(part1->Pt() - part2->Pt());
211 dPhi = TVector2::Phi_mpi_pi(dPhi);
212 if (dPhi > dist)
return kFALSE;
213 if (dEta > dist)
return kFALSE;
214 if (dpT > dist)
return kFALSE;
221 rejectionReason |=
kPtCut;
226 rejectionReason |=
kPtCut;
264 vphi = TVector2::Phi_0_2pi(vphi);
265 mphi = TVector2::Phi_0_2pi(mphi);
267 Double_t dphi = TVector2::Phi_mpi_pi(mphi - vphi);
particle not in acceptance in and/or
virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector &mom, UInt_t &rejectionReason) const
Apply kinematical selection to the momentum vector provided.
static const AliVEvent * GetEvent(const AliVEvent *inputEvent, bool isEmbedding=false)
const AliEmcalIterableContainer all() const
Create an iterable container interface over all objects in the EMCAL container.
Int_t GetNAcceptEntries() const
Count accepted entries in the container.
Double_t fMinE
Max. cut on particle energy.
EMCALIterableContainer::AliEmcalIterableContainerT< TObject, EMCALIterableContainer::operator_star_pair< TObject > > AliEmcalIterableMomentumContainer
Double_t fMinPhi
Min. cut on particle .
Bool_t fIsEmbedding
if true, this container will connect to an external event
Double_t fMaxE
Min. cut on particle energy.
Int_t GetIndexFromLabel(Int_t lab) const
Get the index in the container from a given label.
Declaration of class AliTLorentzVector.
static Double_t RelativePhi(Double_t ang1, Double_t ang2)
Calculates the relative phi between two angle values and returns it in [-Pi, +Pi] range...
UInt_t fBitMap
bitmap mask
TString fClassName
name of the class in the TClonesArray
static UShort_t GetRejectionReasonBitPosition(UInt_t rejectionReason)
Returns the highest bit in the rejection map as reason why the object was rejected.
Double_t fMinPt
Min. cut on particle .
TClass * fLoadedClass
! Class of the objects contained in the TClonesArray
virtual void NextEvent(const AliVEvent *event)
Preparation for the next event.
Bool_t fIsParticleLevel
whether or not it is a particle level object collection
virtual Bool_t AcceptObject(Int_t i, UInt_t &rejectionReason) const =0
const AliEmcalIterableMomentumContainer accepted_momentum() const
Create an iterable container interface over accepted objects in the EMCAL container.
Double_t Phi_0_2pi() const
EMCALIterableContainer::AliEmcalIterableContainerT< TObject, EMCALIterableContainer::operator_star_object< TObject > > AliEmcalIterableContainer
Double_t fMaxPhi
Max. cut on particle .
virtual TObject * operator[](int index) const =0
Index operator.
Base class for container structures within the EMCAL framework.
Container implementing iterable functionality of the EMCAL containers.
AliNamedArrayI * fLabelMap
! Label-Index map
void SetClassName(const char *clname)
Int_t fMinMCLabel
minimum MC label
Double_t fMassHypothesis
if < 0 it will use a PID mass when available
Double_t fVertex[3]
! event vertex array
const char * GetName() const
Double_t fMaxPt
Max. cut on particle .
static Bool_t SamePart(const AliVParticle *part1, const AliVParticle *part2, Double_t dist=1.e-4)
Helper function to calculate the distance between two jets or a jet and a particle.
Double_t fMinEta
Min. cut on particle .
virtual void SetArray(const AliVEvent *event)
TString fBaseClassName
name of the base class that this container can handle
TString fClArrayName
name of branch
Int_t fMaxMCLabel
maximum MC label
Double_t fMaxEta
Max. cut on particle .
const AliEmcalIterableContainer accepted() const
Create an iterable container interface over accepted objects in the EMCAL container.
void GetVertexFromEvent(const AliVEvent *event)
Retrieve the vertex from the given event.
TClonesArray * fClArray
! Pointer to array in input event
Int_t GetNEntries() const
Int_t fCurrentID
! current ID for automatic loops
const AliEmcalIterableMomentumContainer all_momentum() const
Create an iterable container interface over all objects in the EMCAL container.
virtual TString GetDefaultArrayName(const AliVEvent *const ev) const
Handling default Array names.
AliEmcalContainer()
Default constructor.