AliPhysics  b0c77bb (b0c77bb)
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)
 
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
 

Static Public Member Functions

static const AliEmcalContainerIndexMap< TClonesArray, AliVParticle > & GetEmcalContainerIndexMap ()
 Get the EMCal container utils associated with particle containers. More...
 

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

Static Protected Attributes

static AliEmcalContainerIndexMap< TClonesArray, AliVParticle > fgEmcalContainerIndexMap
 ! Mapping from containers to indices 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 31 of file AliParticleContainer.h.

Member Enumeration Documentation

Enumerator
kNoChargeCut 
kCharged 
kNeutral 
kPositiveCharge 
kNegativeCharge 

Definition at line 33 of file AliParticleContainer.h.

Constructor & Destructor Documentation

AliParticleContainer::AliParticleContainer ( )

Default constructor.

Definition at line 36 of file AliParticleContainer.cxx.

AliParticleContainer::AliParticleContainer ( const char *  name)

Standard constructor.

Parameters
nameName of the particle branch (TClonesArray)

Definition at line 50 of file AliParticleContainer.cxx.

virtual AliParticleContainer::~AliParticleContainer ( )
inlinevirtual

Definition at line 37 of file AliParticleContainer.h.

AliParticleContainer::AliParticleContainer ( const AliParticleContainer obj)
private

Member Function Documentation

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 489 of file AliParticleContainer.cxx.

Referenced by AliAnalysisTaskEmcalJetPerformance::ComputeBackground(), AliAnalysisTaskJetPP::EstimateLocalBg(), AliAnalysisTaskJetPP::FillHistograms(), AliEmcalJetTask::FindJets(), AliEmcalCorrectionClusterTrackMatcher::GenerateEmcalParticles(), and SetGeneratorIndex().

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

Reimplemented in AliJetContainer, AliTrackContainer, and AliMCParticleContainer.

Definition at line 49 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 50 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 271 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 301 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 462 of file AliParticleContainer.cxx.

Referenced by SetGeneratorIndex(), 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 480 of file AliParticleContainer.cxx.

Referenced by AliAnalysisTaskEmcalJetQA::DoTrackLoop(), and SetGeneratorIndex().

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 398 of file AliParticleContainer.cxx.

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

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 324 of file AliParticleContainer.cxx.

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

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 239 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainerToyModel::GetAcceptMomentum(), and SetParticlePhiLimits().

static const AliEmcalContainerIndexMap<TClonesArray, AliVParticle>& AliParticleContainer::GetEmcalContainerIndexMap ( )
inlinestatic
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 66 of file AliParticleContainer.cxx.

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

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 207 of file AliParticleContainer.cxx.

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

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 173 of file AliParticleContainer.cxx.

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

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 193 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 255 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainerToyModel::GetNextAcceptMomentum(), and SetParticlePhiLimits().

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 132 of file AliParticleContainer.cxx.

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

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 223 of file AliParticleContainer.cxx.

Referenced by AliMCParticleContainerToyModel::GetNextMomentum(), and SetParticlePhiLimits().

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 151 of file AliParticleContainer.cxx.

Referenced by GetNextMomentum(), and SetParticlePhiLimits().

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

Definition at line 53 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 434 of file AliParticleContainer.cxx.

Referenced by AliJetContainer::GenerateJetName(), and SetGeneratorIndex().

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 45 of file AliParticleContainer.h.

void AliParticleContainer::SelectHIJING ( Bool_t  s)
inline

Definition at line 76 of file AliParticleContainer.h.

void AliParticleContainer::SetArray ( const AliVEvent *  event)

Connect the container to the array with content stored inside the virtual event. The object name in the event must match the name given in the constructor.

Additionally register the array into the index map.

Parameters
eventInput event containing the array with content.

Definition at line 449 of file AliParticleContainer.cxx.

Referenced by AliEmcalCorrectionTask::ExecOnce(), AliAnalysisTaskEmcal::ExecOnce(), AliTrackContainer::SetArray(), and SetGeneratorIndex().

void AliParticleContainer::SetGeneratorIndex ( Short_t  i)
inline

Definition at line 77 of file AliParticleContainer.h.

void AliParticleContainer::SetMinDistanceTPCSectorEdge ( Double_t  min)
inline

Definition at line 74 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 100 of file AliParticleContainer.h.

Referenced by ApplyParticleCuts(), and SetCharge().

AliEmcalContainerIndexMap< TClonesArray, AliVParticle > AliParticleContainer::fgEmcalContainerIndexMap
staticprotected

! Mapping from containers to indices

Definition at line 96 of file AliParticleContainer.h.

Referenced by SetArray(), and SetGeneratorIndex().

Short_t AliParticleContainer::fGeneratorIndex
protected

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

Definition at line 101 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 99 of file AliParticleContainer.h.

Referenced by ApplyKinematicCuts(), and SetMinDistanceTPCSectorEdge().


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