AliPhysics  9b6b435 (9b6b435)
AliMCParticleContainer Class Reference

Container for MC-true particles within the EMCAL framework. More...

#include <AliMCParticleContainer.h>

Inheritance diagram for AliMCParticleContainer:

Public Member Functions

 AliMCParticleContainer ()
 
 AliMCParticleContainer (const char *name)
 
virtual ~AliMCParticleContainer ()
 
virtual Bool_t ApplyMCParticleCuts (const AliAODMCParticle *vp, UInt_t &rejectionReason) const
 
virtual Bool_t AcceptObject (Int_t i, UInt_t &rejectionReason) const
 
virtual Bool_t AcceptObject (const TObject *obj, UInt_t &rejectionReason) const
 
virtual Bool_t AcceptParticle (Int_t i, UInt_t &rejectionReason) const
 
virtual Bool_t AcceptParticle (const AliVParticle *vp, UInt_t &rejectionReason) const
 
virtual Bool_t AcceptMCParticle (const AliAODMCParticle *vp, UInt_t &rejectionReason) const
 
virtual Bool_t AcceptMCParticle (Int_t i, UInt_t &rejectionReason) const
 
virtual AliAODMCParticle * GetMCParticleWithLabel (Int_t lab) const
 
virtual AliAODMCParticle * GetAcceptMCParticleWithLabel (Int_t lab)
 
virtual AliAODMCParticle * GetLeadingMCParticle (const char *opt="")
 
virtual AliAODMCParticle * GetMCParticle (Int_t i=-1) const
 
virtual AliAODMCParticle * GetAcceptMCParticle (Int_t i=-1) const
 
virtual AliAODMCParticle * GetNextAcceptMCParticle ()
 
virtual AliAODMCParticle * GetNextMCParticle ()
 
virtual AliVParticle * GetParticle (Int_t i=-1) const
 
virtual AliVParticle * GetAcceptParticle (Int_t i=-1) const
 
virtual AliVParticle * GetNextAcceptParticle ()
 
virtual AliVParticle * GetNextParticle ()
 
void SetMCFlag (UInt_t m)
 
void SelectPhysicalPrimaries (Bool_t s)
 
const char * GetTitle () const
 
const AliMCParticleIterableContainer all () const
 
const AliMCParticleIterableContainer accepted () const
 
const AliMCParticleIterableMomentumContainer all_momentum () const
 
const AliMCParticleIterableMomentumContainer accepted_momentum () const
 
- Public Member Functions inherited from AliParticleContainer
 AliParticleContainer ()
 
 AliParticleContainer (const char *name)
 
virtual ~AliParticleContainer ()
 
virtual TObjectoperator[] (int index) const
 
virtual Bool_t ApplyParticleCuts (const AliVParticle *vp, UInt_t &rejectionReason) const
 
virtual Bool_t ApplyKinematicCuts (const AliTLorentzVector &mom, UInt_t &rejectionReason) const
 
Double_t GetParticlePtCut () const
 
Double_t GetParticleEtaMin () const
 
Double_t GetParticleEtaMax () const
 
Double_t GetParticlePhiMin () const
 
Double_t GetParticlePhiMax () const
 
void SetParticlePtCut (Double_t cut)
 
void SetParticleEtaLimits (Double_t min, Double_t max)
 
void SetParticlePhiLimits (Double_t min, Double_t max)
 
virtual AliVParticle * GetLeadingParticle (const char *opt="")
 
virtual Bool_t GetMomentumFromParticle (TLorentzVector &mom, const AliVParticle *part, Double_t mass) const
 
virtual Bool_t GetMomentumFromParticle (TLorentzVector &mom, const AliVParticle *part) const
 
virtual Bool_t GetMomentum (TLorentzVector &mom, Int_t i) const
 
virtual Bool_t GetAcceptMomentum (TLorentzVector &mom, Int_t i) const
 
virtual Bool_t GetNextMomentum (TLorentzVector &mom)
 
virtual Bool_t GetNextAcceptMomentum (TLorentzVector &mom)
 
Int_t GetNParticles () const
 
Int_t GetNAcceptedParticles () const
 
void SetMinDistanceTPCSectorEdge (Double_t min)
 
void SetCharge (EChargeCut_t c)
 
void SelectHIJING (Bool_t s)
 
void SetGeneratorIndex (Short_t i)
 
void SetArray (const AliVEvent *event)
 
const char * GetTitle () const
 
const AliParticleIterableContainer all () const
 
const AliParticleIterableContainer accepted () const
 
const AliParticleIterableMomentumContainer all_momentum () const
 
const AliParticleIterableMomentumContainer accepted_momentum () const
 
- Public Member Functions inherited from AliEmcalContainer
 AliEmcalContainer ()
 Default constructor. More...
 
 AliEmcalContainer (const char *name)
 Standard (named) constructor. More...
 
virtual ~AliEmcalContainer ()
 Destructor. More...
 
TClonesArray * GetArray () const
 
const TStringGetArrayName () const
 
const TStringGetClassName () const
 
TClass * GetClass () const
 
Double_t GetMinE () const
 
Double_t GetMaxE () const
 
Double_t GetMinPt () const
 
Double_t GetMaxPt () const
 
Double_t GetMinEta () const
 
Double_t GetMaxEta () const
 
Double_t GetMinPhi () const
 
Double_t GetMaxPhi () const
 
Double_t GetEtaSwing () const
 
Double_t GetPhiSwing () const
 
Double_t GetAcceptance () const
 
Int_t GetCurrentID () const
 
Bool_t GetIsParticleLevel () const
 
Int_t GetIndexFromLabel (Int_t lab) const
 Get the index in the container from a given label. More...
 
Int_t GetNEntries () const
 
Int_t GetNAcceptEntries () const
 Count accepted entries in the container. More...
 
void ResetCurrentID (Int_t i=-1)
 Reset the iterator to a given index. More...
 
void SetArrayName (const char *n)
 
void SetVertex (Double_t *vtx)
 
void SetBitMap (UInt_t m)
 
void SetIsParticleLevel (Bool_t b)
 
void SortArray ()
 
TClass * GetLoadedClass ()
 
virtual void NextEvent (const AliVEvent *event)
 Preparation for the next event. More...
 
void SetMinMCLabel (Int_t s)
 
void SetMaxMCLabel (Int_t s)
 
void SetMCLabelRange (Int_t min, Int_t max)
 
void SetELimits (Double_t min, Double_t max)
 
void SetMinE (Double_t min)
 
void SetMaxE (Double_t max)
 
void SetPtLimits (Double_t min, Double_t max)
 
void SetMinPt (Double_t min)
 
void SetMaxPt (Double_t max)
 
void SetEtaLimits (Double_t min, Double_t max)
 
void SetPhiLimits (Double_t min, Double_t max)
 
void SetMassHypothesis (Double_t m)
 
void SetClassName (const char *clname)
 
void SetIsEmbedding (Bool_t b)
 Set embedding status. More...
 
Bool_t GetIsEmbedding () const
 Get embedding status. More...
 
const char * GetName () const
 
void SetName (const char *n)
 Set the name of the class of the objets inside the underlying array. More...
 
const AliEmcalIterableContainer all () const
 Create an iterable container interface over all objects in the EMCAL container. More...
 
const AliEmcalIterableContainer accepted () const
 Create an iterable container interface over accepted objects in the EMCAL container. More...
 
const AliEmcalIterableMomentumContainer all_momentum () const
 Create an iterable container interface over all objects in the EMCAL container. More...
 
const AliEmcalIterableMomentumContainer accepted_momentum () const
 Create an iterable container interface over accepted objects in the EMCAL container. More...
 

Protected Member Functions

virtual TString GetDefaultArrayName (const AliVEvent *const ev) const
 Handling default Array names. More...
 
- Protected Member Functions inherited from AliEmcalContainer
void GetVertexFromEvent (const AliVEvent *event)
 Retrieve the vertex from the given event. More...
 

Protected Attributes

UInt_t fMCFlag
 select MC particles with flags More...
 
- Protected Attributes inherited from AliParticleContainer
Double_t fMinDistanceTPCSectorEdge
 require minimum distance to edge of TPC sector edge More...
 
EChargeCut_t fChargeCut
 select particles according to their charge More...
 
Short_t fGeneratorIndex
 select MC particles with generator index (default = -1 = switch off selection) More...
 
- Protected Attributes inherited from AliEmcalContainer
TString fName
 object name More...
 
TString fClArrayName
 name of branch More...
 
TString fBaseClassName
 name of the base class that this container can handle More...
 
Bool_t fIsParticleLevel
 whether or not it is a particle level object collection More...
 
UInt_t fBitMap
 bitmap mask More...
 
Double_t fMinPt
 Min. cut on particle \( p_{t} \). More...
 
Double_t fMaxPt
 Max. cut on particle \( p_{t} \). More...
 
Double_t fMaxE
 Min. cut on particle energy. More...
 
Double_t fMinE
 Max. cut on particle energy. More...
 
Double_t fMinEta
 Min. cut on particle \( \eta \). More...
 
Double_t fMaxEta
 Max. cut on particle \( \eta \). More...
 
Double_t fMinPhi
 Min. cut on particle \( \phi \). More...
 
Double_t fMaxPhi
 Max. cut on particle \( \phi \). More...
 
Int_t fMinMCLabel
 minimum MC label More...
 
Int_t fMaxMCLabel
 maximum MC label More...
 
Double_t fMassHypothesis
 if < 0 it will use a PID mass when available More...
 
Bool_t fIsEmbedding
 if true, this container will connect to an external event More...
 
TClonesArray * fClArray
 ! Pointer to array in input event More...
 
Int_t fCurrentID
 ! current ID for automatic loops More...
 
AliNamedArrayIfLabelMap
 ! Label-Index map More...
 
Double_t fVertex [3]
 ! event vertex array More...
 
TClass * fLoadedClass
 ! Class of the objects contained in the TClonesArray More...
 

Private Member Functions

 AliMCParticleContainer (const AliMCParticleContainer &obj)
 
AliMCParticleContaineroperator= (const AliMCParticleContainer &other)
 

Additional Inherited Members

- Public Types inherited from AliParticleContainer
enum  EChargeCut_t {
  kNoChargeCut, kCharged, kNeutral, kPositiveCharge,
  kNegativeCharge
}
 
- Public Types inherited from AliEmcalContainer
enum  RejectionReason {
  kNullObject = 1<<0, kPtCut = 1<<1, kAcceptanceCut = 1<<2, kMCLabelCut = 1<<3,
  kBitMapCut = 1<<4, kHFCut = 1<<5, kNotHybridTrack = 1<<7, kMCFlag = 1<<8,
  kMCGeneratorCut = 1<<9, kChargeCut = 1<<10, kMinDistanceTPCSectorEdgeCut = 1<<11, kIsEMCalCut = 1<<13,
  kTimeCut = 1<<14, kEnergyCut = 1<<15, kExoticCut = 1<<16, kAreaCut = 1<<18,
  kAreaEmcCut = 1<<19, kZLeadingChCut = 1<<20, kZLeadingEmcCut = 1<<21, kNEFCut = 1<<22,
  kMinLeadPtCut = 1<<23, kMaxTrackPtCut = 1<<24, kMaxClusterPtCut = 1<<25, kFlavourCut = 1<<26,
  kTagStatus = 1<<27, kMinNConstituents = 1<<28, kOverlapTpcHole = 1<<29
}
 Bit definition for the reason a particle was rejected. More...
 
- Static Public Member Functions inherited from AliParticleContainer
static const AliEmcalContainerIndexMap< TClonesArray, AliVParticle > & GetEmcalContainerIndexMap ()
 Get the EMCal container utils associated with particle containers. More...
 
- Static Public Member Functions inherited from AliEmcalContainer
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. More...
 
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. More...
 
static UShort_t GetRejectionReasonBitPosition (UInt_t rejectionReason)
 Returns the highest bit in the rejection map as reason why the object was rejected. More...
 
- Static Protected Attributes inherited from AliParticleContainer
static AliEmcalContainerIndexMap< TClonesArray, AliVParticle > fgEmcalContainerIndexMap
 ! Mapping from containers to indices More...
 

Detailed Description

Container for MC-true particles within the EMCAL framework.

Author
Salvatore Aiola salva.nosp@m.tore.nosp@m..aiol.nosp@m.a@ce.nosp@m.rn.ch, Yale University

Definition at line 24 of file AliMCParticleContainer.h.

Constructor & Destructor Documentation

AliMCParticleContainer::AliMCParticleContainer ( )

Default constructor.

Definition at line 23 of file AliMCParticleContainer.cxx.

AliMCParticleContainer::AliMCParticleContainer ( const char *  name)

Standard constructor.

Parameters
[in]nameName of the container (= name of the array operated on)

Definition at line 35 of file AliMCParticleContainer.cxx.

virtual AliMCParticleContainer::~AliMCParticleContainer ( )
inlinevirtual

Definition at line 29 of file AliMCParticleContainer.h.

AliMCParticleContainer::AliMCParticleContainer ( const AliMCParticleContainer obj)
private

Member Function Documentation

const AliMCParticleIterableContainer AliMCParticleContainer::accepted ( ) const

Create an iterable container interface over accepted objects in the EMCAL container.

Returns
iterable container over accepted objects in the EMCAL container

Definition at line 224 of file AliMCParticleContainer.cxx.

Referenced by AliAnalysisTaskIDFragmentationFunction::FillHistograms(), AliHFAODMCParticleContainer::IsSpecialPDGFound(), and SelectPhysicalPrimaries().

const AliMCParticleIterableMomentumContainer AliMCParticleContainer::accepted_momentum ( ) const

Create an iterable container interface over accepted objects in the EMCAL container.

Returns
iterable container over accepted objects in the EMCAL container

Definition at line 242 of file AliMCParticleContainer.cxx.

Referenced by AliAnalysisTaskEmcalJetPerformance::DoTriggerSimulation(), AliEmcalTrackingQATask::FillHistograms(), AliAnalysisTaskPWGJEQA::FillTrackHistograms(), and SelectPhysicalPrimaries().

Bool_t AliMCParticleContainer::AcceptMCParticle ( const AliAODMCParticle *  vp,
UInt_t rejectionReason 
) const
virtual

Perform full MC particle selection for the particle vp, consisting of kinematical particle selection and MC-specific cuts

Parameters
[in]vpParticle to be checked
[in]rejectionReasonBitmap encoding the reason why the particle was rejected. Note: The variable is not set to NULL inside this function before changing its value.
Returns
True if the particle is accepted, false otherwise

Reimplemented in AliHFAODMCParticleContainer.

Definition at line 155 of file AliMCParticleContainer.cxx.

Referenced by AliHFAODMCParticleContainer::AcceptMCParticle(), AcceptObject(), AcceptParticle(), GetAcceptMCParticle(), and AliAnalysisTaskEmcalJetPerformance::GetContributorType().

Bool_t AliMCParticleContainer::AcceptMCParticle ( Int_t  i,
UInt_t rejectionReason 
) const
virtual

Perform full MC particle selection for the particle vp, consisting of kinematical particle selection and MC-specific cuts

Parameters
[in]iIndex of the particle to check
[in]rejectionReasonBitmap encoding the reason why the particle was rejected. Note: The variable is not set to NULL inside this function before changing its value.
Returns
True if the particle is accepted, false otherwise

Reimplemented in AliHFAODMCParticleContainer.

Definition at line 176 of file AliMCParticleContainer.cxx.

virtual Bool_t AliMCParticleContainer::AcceptObject ( Int_t  i,
UInt_t rejectionReason 
) const
inlinevirtual

Reimplemented from AliParticleContainer.

Definition at line 32 of file AliMCParticleContainer.h.

virtual Bool_t AliMCParticleContainer::AcceptObject ( const TObject obj,
UInt_t rejectionReason 
) const
inlinevirtual

Reimplemented from AliParticleContainer.

Definition at line 33 of file AliMCParticleContainer.h.

virtual Bool_t AliMCParticleContainer::AcceptParticle ( Int_t  i,
UInt_t rejectionReason 
) const
inlinevirtual

Perform full particle selection consisting of kinematical and particle property selection on the \( i^{th} \) particle in the array. In case the particle is rejected, the reason for the rejection is encoded in the bitmap rejectionReason.

Parameters
[in]iIndex of the particle to select.
[out]rejectionReasonBitmap with the reason why the particle was accepted. Note: The value is not set to 0 in the function in order to combine the information with other selection steps.
Returns
True if the particle was accepted, false otherwise

Reimplemented from AliParticleContainer.

Definition at line 34 of file AliMCParticleContainer.h.

virtual Bool_t AliMCParticleContainer::AcceptParticle ( const AliVParticle *  vp,
UInt_t rejectionReason 
) const
inlinevirtual

Perform full particle selection consisting of kinematical and particle property selection on the particle provided. In case the particle is rejected, the reason for the rejection is encoded in the bitmap rejectionReason.

Parameters
vpParticle for which to perform the selection
rejectionReasonBitmap with the reason why the particle was accepted. Note: The value is not set to 0 in the function in order to combine the information with other selection steps.
Returns
True if the particle is accepted, false otherwise.

Reimplemented from AliParticleContainer.

Definition at line 35 of file AliMCParticleContainer.h.

const AliMCParticleIterableContainer AliMCParticleContainer::all ( ) const

Create an iterable container interface over all objects in the EMCAL container.

Returns
iterable container over all objects in the EMCAL container

Definition at line 215 of file AliMCParticleContainer.cxx.

Referenced by AliAnalysisTaskEmcalLight::CheckMCOutliers(), AliAnalysisTaskEmcal::CheckMCOutliers(), and SelectPhysicalPrimaries().

const AliMCParticleIterableMomentumContainer AliMCParticleContainer::all_momentum ( ) const

Create an iterable container interface over all objects in the EMCAL container.

Returns
iterable container over all objects in the EMCAL container

Definition at line 233 of file AliMCParticleContainer.cxx.

Referenced by AliAnalysisTaskDmesonJets::FillPartonLevelHistograms(), AliAnalysisTaskDmesonJetsSub::FillPartonLevelHistograms(), AliAnalysisTaskSVtaskMCFilter::Run(), and SelectPhysicalPrimaries().

Bool_t AliMCParticleContainer::ApplyMCParticleCuts ( const AliAODMCParticle *  vp,
UInt_t rejectionReason 
) const
virtual

Apply MC particle cuts, e.g. primary particle selection.

Parameters
[in]vpParticle to be checked
[in]rejectionReasonBitmap encoding the reason why the particle was rejected. Note: The variable is not set to NULL inside this function before changing its value.
Returns
True if the particle is accepted, false otherwise

Definition at line 197 of file AliMCParticleContainer.cxx.

Referenced by AcceptMCParticle(), and ~AliMCParticleContainer().

AliAODMCParticle * AliMCParticleContainer::GetAcceptMCParticle ( Int_t  i = -1) const
virtual

Get track at index in the container

Parameters
[in]iIndex of the particle in the container
Returns
pointer to particle if particle is accepted, NULL otherwise

Definition at line 93 of file AliMCParticleContainer.cxx.

Referenced by GetAcceptMCParticleWithLabel(), GetAcceptParticle(), GetLeadingMCParticle(), and GetNextAcceptMCParticle().

AliAODMCParticle * AliMCParticleContainer::GetAcceptMCParticleWithLabel ( Int_t  lab)
virtual

Get MC particle using the MC label

Parameters
[in]labLabel of the particle
Returns
pointer to particle if particle is found and accepted, NULL otherwise

Definition at line 64 of file AliMCParticleContainer.cxx.

Referenced by AcceptParticle(), AliEmcalTrackingQATask::FillHistograms(), and AliAnalysisTaskPWGJEQA::FillTrackHistograms().

virtual AliVParticle* AliMCParticleContainer::GetAcceptParticle ( Int_t  i = -1) const
inlinevirtual

Get \( i^{th} \) particle in the container if it is accepted. In case it is not accepted a nullpointer is returned.

Parameters
[in]iIndex of the particle
Returns
Particle at the index if it is accepted, NULL otherwise

Reimplemented from AliParticleContainer.

Definition at line 46 of file AliMCParticleContainer.h.

Referenced by AliAnalysisTaskHFSubstructure::FillHistograms().

virtual TString AliMCParticleContainer::GetDefaultArrayName ( const AliVEvent *const  ev) const
inlineprotectedvirtual

Handling default Array names.

Default names might differ based on the input event type. Therefore it is determined for the first time and event is handled.

Parameters
evInput event used to read the input array
Returns
Default array name

Reimplemented from AliEmcalContainer.

Definition at line 64 of file AliMCParticleContainer.h.

virtual AliAODMCParticle* AliMCParticleContainer::GetLeadingMCParticle ( const char *  opt = "")
inlinevirtual

Definition at line 40 of file AliMCParticleContainer.h.

AliAODMCParticle * AliMCParticleContainer::GetMCParticle ( Int_t  i = -1) const
virtual
AliAODMCParticle * AliMCParticleContainer::GetNextAcceptMCParticle ( )
virtual

Get next accepted particle in the container selected using the track cuts provided.

Deprecated:
Old style iterator - for compatibility reasons, use AliParticleContainer::accept_iterator instead
Returns
Next accepted particle (NULL if the end of the array is reached)

Definition at line 113 of file AliMCParticleContainer.cxx.

Referenced by GetLeadingMCParticle(), and GetNextAcceptParticle().

virtual AliVParticle* AliMCParticleContainer::GetNextAcceptParticle ( )
inlinevirtual

Iterator over accepted particles in the container. Get the next accepted particle in the array. If the end is reached, NULL is returned.

Deprecated:
Only for backward compatibility - use accept_iterator instead
Returns
Next accepted particle in the array (NULL if the end is reached)

Reimplemented from AliParticleContainer.

Definition at line 47 of file AliMCParticleContainer.h.

AliAODMCParticle * AliMCParticleContainer::GetNextMCParticle ( )
virtual

Get next particle in the container

Deprecated:
Old style iterator - for compatibility reasons, use AliParticleContainer::all_iterator instead
Returns
Next track in the container (NULL if end of the container is reached)

Definition at line 131 of file AliMCParticleContainer.cxx.

Referenced by GetLeadingMCParticle(), and GetNextParticle().

virtual AliVParticle* AliMCParticleContainer::GetNextParticle ( )
inlinevirtual

Iterator over all particles in the container. Get the next particle in the array. If the end is reached, NULL is returned.

Deprecated:
Only for backward compatibility - use all_iterator instead.
Returns
Next particle in the array (NULL if the end is reached)

Reimplemented from AliParticleContainer.

Definition at line 48 of file AliMCParticleContainer.h.

virtual AliVParticle* AliMCParticleContainer::GetParticle ( Int_t  i = -1) const
inlinevirtual

Get \( i^{th} \) particle in the container.

Parameters
[in]iIndex of the particle to access
Returns
Parrticle at the given index (NULL if the index is out of range)

Reimplemented from AliParticleContainer.

Definition at line 45 of file AliMCParticleContainer.h.

const char * AliMCParticleContainer::GetTitle ( ) const

Build title of the container consisting of the container name and a string encoding the minimum \( p_{t} \) cut applied in the kinematic particle selection.

Returns
Title of the container

Definition at line 252 of file AliMCParticleContainer.cxx.

Referenced by SelectPhysicalPrimaries().

AliMCParticleContainer& AliMCParticleContainer::operator= ( const AliMCParticleContainer other)
private
void AliMCParticleContainer::SetMCFlag ( UInt_t  m)
inline

Definition at line 50 of file AliMCParticleContainer.h.

Member Data Documentation

UInt_t AliMCParticleContainer::fMCFlag
protected

select MC particles with flags

Definition at line 66 of file AliMCParticleContainer.h.

Referenced by ApplyMCParticleCuts(), SelectPhysicalPrimaries(), and SetMCFlag().


The documentation for this class was generated from the following files: