AliPhysics  1909eaa (1909eaa)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliParticleContainer Class Reference

Container for particles within the EMCAL framework. More...

#include <AliParticleContainer.h>

Inheritance diagram for AliParticleContainer:

Public Types

enum  EChargeCut_t {
  kNoChargeCut, kCharged, kNeutral, kPositiveCharge,
  kNegativeCharge
}
 

Public Member Functions

 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
 
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 (const AliVParticle *vp, UInt_t &rejectionReason) const
 
virtual Bool_t AcceptParticle (Int_t i, 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 AliVParticle * GetParticle (Int_t i=-1) const
 
virtual AliVParticle * GetAcceptParticle (Int_t i=-1) const
 
virtual AliVParticle * GetNextAcceptParticle ()
 
virtual AliVParticle * GetNextParticle ()
 
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)
 
const char * GetTitle () const
 
const AliParticleIterableContainer all () const
 
const AliParticleIterableContainer accepted () const
 
const
AliParticleIterableMomentumContainer 
all_momentum () const
 
const
AliParticleIterableMomentumContainer 
accepted_momentum () const
 

Protected Attributes

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...
 

Private Member Functions

 AliParticleContainer (const AliParticleContainer &obj)
 
AliParticleContaineroperator= (const AliParticleContainer &other)
 

Detailed Description

Container for particles within the EMCAL framework.

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

Container with name, TClonesArray and cuts for particles

Definition at line 28 of file AliParticleContainer.h.

Member Enumeration Documentation

Enumerator
kNoChargeCut 
kCharged 
kNeutral 
kPositiveCharge 
kNegativeCharge 

Definition at line 30 of file AliParticleContainer.h.

Constructor & Destructor Documentation

AliParticleContainer::AliParticleContainer ( )

Default constructor.

Definition at line 33 of file AliParticleContainer.cxx.

AliParticleContainer::AliParticleContainer ( const char *  name)

Standard constructor.

Parameters
nameName of the particle branch (TClonesArray)

Definition at line 47 of file AliParticleContainer.cxx.

virtual AliParticleContainer::~AliParticleContainer ( )
inlinevirtual

Definition at line 34 of file AliParticleContainer.h.

AliParticleContainer::AliParticleContainer ( const AliParticleContainer obj)
private

Member Function Documentation

const AliParticleIterableContainer AliParticleContainer::accepted ( ) const
const AliParticleIterableMomentumContainer AliParticleContainer::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 478 of file AliParticleContainer.cxx.

Referenced by AliEmcalJetTask::FindJets().

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

Reimplemented in AliJetContainer, AliTrackContainer, and AliMCParticleContainer.

Definition at line 46 of file AliParticleContainer.h.

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

Reimplemented in AliJetContainer, AliTrackContainer, and AliMCParticleContainer.

Definition at line 47 of file AliParticleContainer.h.

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

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 in AliTrackContainer, and AliMCParticleContainer.

Definition at line 268 of file AliParticleContainer.cxx.

Referenced by AcceptObject(), AliAnalysisTaskEmcal::AcceptTrack(), AliHadCorrTask::ApplyHadCorrAllTracks(), AliEmcalCorrectionClusterHadronicCorrection::ApplyHadCorrAllTracks(), AliHadCorrTask::ApplyHadCorrOneTrack(), AliEmcalCorrectionClusterHadronicCorrection::ApplyHadCorrOneTrack(), AliHadCorrTask::DoMatchedTracksLoop(), AliEmcalCorrectionClusterHadronicCorrection::DoMatchedTracksLoop(), AliAnalysisTaskEmcalJetQA::DoTrackLoop(), GetAcceptParticle(), GetNAcceptedParticles(), AliAnalysisTaskLocalRho::PassesCuts(), AliAnalysisTaskJetV2::PassesCuts(), and TestParticleContainerIterator().

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

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 in AliTrackContainer, and AliMCParticleContainer.

Definition at line 296 of file AliParticleContainer.cxx.

const AliParticleIterableContainer AliParticleContainer::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 451 of file AliParticleContainer.cxx.

Referenced by NS_AliAnalysisTaskEmcalJetCDF::SortTracksPt(), and TestParticleContainerIterator().

const AliParticleIterableMomentumContainer AliParticleContainer::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 469 of file AliParticleContainer.cxx.

Referenced by AliAnalysisTaskEmcalJetQA::DoTrackLoop().

Bool_t AliParticleContainer::ApplyKinematicCuts ( const AliTLorentzVector mom,
UInt_t rejectionReason 
) const
virtual

Apply kinematical cuts to the momentum vector provided. In addition to the standard kinematical cuts in \( p_{t} \), \( \eta \) and \( \phi \), implemented in the AliEmcalContainer::ApplyKinematicCuts, also the distance to the TPC sector boundary is checked.

Parameters
[in]momMomentum vector for which
[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 momentum vector was selected under the given cuts, false otherwise

Definition at line 393 of file AliParticleContainer.cxx.

Referenced by AliJetContainer::AcceptJet(), AliMCParticleContainer::AcceptMCParticle(), AliHFAODMCParticleContainer::AcceptMCParticle(), AcceptParticle(), and AliTrackContainer::AcceptTrack().

Bool_t AliParticleContainer::ApplyParticleCuts ( const AliVParticle *  vp,
UInt_t rejectionReason 
) const
virtual

Apply cuts on the particle properties. Implemented are

Parameters
[in]vpParticle for which the selection is performed
[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 is accepted, False otherwise

Definition at line 319 of file AliParticleContainer.cxx.

Referenced by AcceptParticle(), AliMCParticleContainer::ApplyMCParticleCuts(), and AliTrackContainer::ApplyTrackCuts().

Bool_t AliParticleContainer::GetAcceptMomentum ( TLorentzVector &  mom,
Int_t  i 
) const
virtual

Fills a TLorentzVector with the monentum infomation of the \( i^{th} \) accepted particle in the container, using a global mass hypothesis. In case the provided index is out of range, or the particle under the index is not accepted, false is returned as return value.

Parameters
[out]momMomentum vector of the accepted particle
[in]iIndex to check
Returns
True if the request was successfull, false otherwise

Reimplemented in AliJetContainer, AliTrackContainer, AliMCParticleContainerToyModel, and AliTrackContainerToyModel.

Definition at line 236 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainerToyModel::GetAcceptMomentum().

AliVParticle * AliParticleContainer::GetAcceptParticle ( Int_t  i = -1) const
virtual
AliVParticle * AliParticleContainer::GetLeadingParticle ( const char *  opt = "")
virtual

Get the leading particle in the container. If "p" is contained in the parameter opt, then the absolute momentum is use instead of the transverse momentum.

Parameters
[in]optOptions for the selection of the leading particle
Returns
Leading particle in the container

Definition at line 63 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainer::GetLeadingMCParticle(), AliTrackContainer::GetLeadingTrack(), and AliAnalysisTaskChargedJetsHadronCF::Run().

Bool_t AliParticleContainer::GetMomentum ( TLorentzVector &  mom,
Int_t  i 
) const
virtual

Fills a TLorentzVector with the monentum infomation of the \( i^{th} \) particle in the container, using a global mass hypothesis. In case the provided index is out of range, false is returned as return value.

Parameters
[out]momMomentum vector of the \( i^{th} \) particle in the array
[in]iIndex of th particle to check
Returns
True if the request was successfull, false otherwise

Reimplemented in AliJetContainer, AliTrackContainer, AliMCParticleContainerToyModel, and AliTrackContainerToyModel.

Definition at line 204 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainer::AcceptMCParticle(), AliHFAODMCParticleContainer::AcceptMCParticle(), AcceptParticle(), and AliMCParticleContainerToyModel::GetMomentum().

Bool_t AliParticleContainer::GetMomentumFromParticle ( TLorentzVector &  mom,
const AliVParticle *  part,
Double_t  mass 
) const
virtual

Retrieve momentum information of a particle (part) and fill a TLorentzVector with it. In case the optional parameter mass is provided, it is used as mass hypothesis, otherwise the mass hypothesis from the particle itself is used.

Parameters
[out]momMomentum vector to be filled
[in]partParticle from which the momentum information is obtained.
[in]mass(Optional) Mass hypothesis
Returns

Definition at line 170 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainer::AcceptMCParticle(), AliHFAODMCParticleContainer::AcceptMCParticle(), AcceptParticle(), GetAcceptMomentum(), GetMomentum(), AliMCParticleContainerToyModel::GetMomentumFromParticle(), GetMomentumFromParticle(), GetNextAcceptMomentum(), and GetNextMomentum().

Bool_t AliParticleContainer::GetMomentumFromParticle ( TLorentzVector &  mom,
const AliVParticle *  part 
) const
virtual

Fills a TLorentzVector with the momentum information of the particle provided under a global mass hypothesis.

Parameters
[out]momMomentum vector of the particle provided
[in]partParticle from which to obtain the momentum information
Returns
Always true

Definition at line 190 of file AliParticleContainer.cxx.

Bool_t AliParticleContainer::GetNextAcceptMomentum ( TLorentzVector &  mom)
virtual

Fills a TLorentzVector with the monentum infomation of the next accepted particle in the container, using a global mass hypothesis. In case the iteration reached the end of the array, false is returned as return value.

Deprecated:
Old style iterator - use accept_iterator instead
Parameters
[out]momMomentum vector of the next particle in the array
Returns
True if the request was successfull, false (no more entries) otherwise

Reimplemented in AliJetContainer, AliTrackContainer, AliMCParticleContainerToyModel, and AliTrackContainerToyModel.

Definition at line 252 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainerToyModel::GetNextAcceptMomentum().

AliVParticle * AliParticleContainer::GetNextAcceptParticle ( )
virtual

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 in AliTrackContainer, and AliMCParticleContainer.

Definition at line 129 of file AliParticleContainer.cxx.

Referenced by AliAnalysisTaskSEDmesonsFilterCJ::AddEventTracks(), AliAnalysisTaskSEDmesonsFilterCJ::AddMCEventTracks(), AliAnalysisTaskEmcalJetSparseMaker::CalcAysPlane(), AliAnalysisTaskEmcalTmpSparseMaker::CalcAysPlane(), AliAnalysisTaskJetV2::CalculateRandomCone(), AliAnalysisTaskSoftDrop::CheckClusTrackMatching(), AliAnalysisTaskJetJTJT::CheckClusTrackMatching(), ClassImp(), AliEmcalPicoTrackInGridMaker::CreateGridCells(), AliAnalysisTaskPi0Hadron::DoClusterLoop(), AliJetConstituentTagCopier::DoParticleLoop(), AliAnalysisTaskPi0Hadron::DoTrackLoop(), AliAnalysisTaskHJetSpectra::EstimateBgCone(), AliAnalysisTaskScale::FillHistograms(), AliAnalysisTaskSoftDrop::FillHistograms(), AliAnalysisTaskDcalDijetPerf::FillHistograms(), AliAnalysisTaskJetJTJT::FillHistograms(), AliAnalysisTaskEmcalJetTriggerQA::FillHistograms(), AliAnalysisTaskDijetHadron::FillHistograms(), AliAnalysisTaskEmcalTriggerPatchClusterMatch::FillHistograms(), AliAnalysisTaskEmcalTriggerPatchJetMatch::FillHistograms(), AliAnalysisTaskHJetSpectra::FillHistograms(), AliAnalysisTaskEmcalTmpSparseMaker::FillSparseTrks(), AliEmcalClusTrackMatcherTask::GenerateEmcalParticles(), AliEmcalCorrectionClusterTrackMatcher::GenerateEmcalParticles(), AliAnalysisTaskEmcalJetMassBkg::GetCone(), AliAnalysisTaskHJetSpectra::GetConePt(), GetLeadingParticle(), GetNextAcceptMomentum(), AliAnalysisTaskDeltaPt::GetRandomCone(), AliAnalysisTaskParticleInJet::GetSelectedParticles(), AliAnalysisTaskRhoFlow::Run(), AliEmcalTrackPropagatorTask::Run(), AliAnalysisTaskRhoAverage::Run(), AliAnalysisTaskEmcalJetv2QA::Run(), and AliAnalysisTaskEmcalJetFlavourTagExample::Run().

Bool_t AliParticleContainer::GetNextMomentum ( TLorentzVector &  mom)
virtual

Fills a TLorentzVector with the monentum infomation of the next particle in the container, using a global mass hypothesis. In case the iterator reached the end of the array, false is returned as return value.

Deprecated:
Old style iterator - use all_iterator instead
Parameters
[out]momMomentum vector of the next particle
Returns
True if the request was successfull, false otherwise

Reimplemented in AliJetContainer, AliTrackContainer, AliMCParticleContainerToyModel, and AliTrackContainerToyModel.

Definition at line 220 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainerToyModel::GetNextMomentum().

AliVParticle * AliParticleContainer::GetNextParticle ( )
virtual

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 in AliTrackContainer, and AliMCParticleContainer.

Definition at line 148 of file AliParticleContainer.cxx.

Referenced by GetNextMomentum().

Double_t AliParticleContainer::GetParticlePhiMax ( ) const
inline
Double_t AliParticleContainer::GetParticlePhiMin ( ) const
inline
Double_t AliParticleContainer::GetParticlePtCut ( ) const
inline

Definition at line 50 of file AliParticleContainer.h.

const char * AliParticleContainer::GetTitle ( ) const

Make a title of the container name based on the min \( p_{t} \) used in the particle selection process.

Returns
Title of the container

Definition at line 429 of file AliParticleContainer.cxx.

Referenced by AliJetContainer::GenerateJetName().

AliParticleContainer& AliParticleContainer::operator= ( const AliParticleContainer other)
private
virtual TObject* AliParticleContainer::operator[] ( int  index) const
inlinevirtual

Index operator: Providing access to track in the container with the given index.

Parameters
[in]indexIndex of the particle in the array
Returns
Particle at the given index

Definition at line 42 of file AliParticleContainer.h.

void AliParticleContainer::SelectHIJING ( Bool_t  s)
inline

Definition at line 73 of file AliParticleContainer.h.

void AliParticleContainer::SetCharge ( EChargeCut_t  c)
inline
void AliParticleContainer::SetGeneratorIndex ( Short_t  i)
inline

Definition at line 74 of file AliParticleContainer.h.

void AliParticleContainer::SetMinDistanceTPCSectorEdge ( Double_t  min)
inline

Definition at line 71 of file AliParticleContainer.h.

void AliParticleContainer::SetParticleEtaLimits ( Double_t  min,
Double_t  max 
)
inline
void AliParticleContainer::SetParticlePhiLimits ( Double_t  min,
Double_t  max 
)
inline

Member Data Documentation

EChargeCut_t AliParticleContainer::fChargeCut
protected

select particles according to their charge

Definition at line 89 of file AliParticleContainer.h.

Referenced by ApplyParticleCuts(), and SetCharge().

Short_t AliParticleContainer::fGeneratorIndex
protected

select MC particles with generator index (default = -1 = switch off selection)

Definition at line 90 of file AliParticleContainer.h.

Referenced by ApplyParticleCuts(), SelectHIJING(), and SetGeneratorIndex().

Double_t AliParticleContainer::fMinDistanceTPCSectorEdge
protected

require minimum distance to edge of TPC sector edge

Definition at line 88 of file AliParticleContainer.h.

Referenced by ApplyKinematicCuts(), and SetMinDistanceTPCSectorEdge().


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