AliPhysics  0e0bd91 (0e0bd91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AliMCAnalysisUtils Class Reference

Class with analysis utils for simulations. More...

#include <AliMCAnalysisUtils.h>

Inheritance diagram for AliMCAnalysisUtils:

Public Types

enum  mcTypes {
  kMCPhoton, kMCPrompt, kMCFragmentation, kMCISR,
  kMCPi0Decay, kMCEtaDecay, kMCOtherDecay, kMCDecayPairLost,
  kMCDecayPairInCalo, kMCDecayDalitz, kMCConversion, kMCElectron,
  kMCEFromCFromB, kMCEFromC, kMCEFromB, kMCZDecay,
  kMCWDecay, kMCMuon, kMCPion, kMCPi0,
  kMCKaon, kMCEta, kMCProton, kMCAntiProton,
  kMCNeutron, kMCAntiNeutron, kMCUnknown, kMCBadLabel
}
 
enum  generator { kPythia = 0, kHerwig = 1, kHijing = 2, kBoxLike = 3 }
 

Public Member Functions

 AliMCAnalysisUtils ()
 Constructor. More...
 
virtual ~AliMCAnalysisUtils ()
 Destructor. More...
 
Int_t CheckCommonAncestor (Int_t index1, Int_t index2, const AliCaloTrackReader *reader, Int_t &ancPDG, Int_t &ancStatus, TLorentzVector &momentum, TVector3 &prodVertex)
 
Int_t CheckOrigin (Int_t label, const AliCaloTrackReader *reader, Int_t calorimeter)
 
Int_t CheckOrigin (const Int_t *label, Int_t nlabels, const AliCaloTrackReader *reader, Int_t calorimeter)
 
Int_t CheckOriginInStack (const Int_t *labels, Int_t nlabels, AliStack *stack, const TObjArray *arrayCluster)
 
Int_t CheckOriginInAOD (const Int_t *labels, Int_t nlabels, const TClonesArray *mcparticles, const TObjArray *arrayCluster)
 
void CheckOverlapped2GammaDecay (const Int_t *labels, Int_t nlabels, Int_t mesonIndex, AliStack *stack, Int_t &tag)
 
void CheckOverlapped2GammaDecay (const Int_t *labels, Int_t nlabels, Int_t mesonIndex, const TClonesArray *mcparticles, Int_t &tag)
 
void CheckLostDecayPair (const TObjArray *arrayCluster, Int_t iMom, Int_t iParent, AliStack *stack, Int_t &tag)
 Check on ESDs if the current decay photon has the second photon companion lost. More...
 
void CheckLostDecayPair (const TObjArray *arrayCluster, Int_t iMom, Int_t iParent, const TClonesArray *mcparticles, Int_t &tag)
 Check on AODs if the current decay photon has the second photon companion lost. More...
 
TLorentzVector GetMother (Int_t label, const AliCaloTrackReader *reader, Bool_t &ok)
 
TLorentzVector GetMother (Int_t label, const AliCaloTrackReader *reader, Int_t &pdg, Int_t &status, Bool_t &ok)
 
TLorentzVector GetMother (Int_t label, const AliCaloTrackReader *reader, Int_t &pdg, Int_t &status, Bool_t &ok, Int_t &momLabel)
 
TLorentzVector GetGrandMother (Int_t label, const AliCaloTrackReader *reader, Int_t &pdg, Int_t &status, Bool_t &ok, Int_t &grandMomLabel, Int_t &greatMomLabel)
 
TLorentzVector GetMotherWithPDG (Int_t label, Int_t pdg, const AliCaloTrackReader *reader, Bool_t &ok, Int_t &momLabel)
 
void GetMCDecayAsymmetryAngleForPDG (Int_t label, Int_t pdg, const AliCaloTrackReader *reader, Float_t &asy, Float_t &angle, Bool_t &ok)
 In case of an eta or pi0 decay into 2 photons, get the asymmetry in the energy of the photons. More...
 
Int_t GetNDaughters (Int_t label, const AliCaloTrackReader *reader, Bool_t &ok)
 
TLorentzVector GetDaughter (Int_t daughter, Int_t label, const AliCaloTrackReader *reader, Int_t &pdg, Int_t &status, Bool_t &ok, Int_t &daugLabel, TVector3 &prodVertex)
 
Int_t GetNOverlaps (const Int_t *label, UInt_t nlabels, Int_t mctag, Int_t mesonLabel, AliCaloTrackReader *reader, Int_t *overpdg)
 
void SetTagBit (Int_t &tag, UInt_t set) const
 
Bool_t CheckTagBit (Int_t tag, UInt_t test) const
 
TList * GetJets (const AliCaloTrackReader *reader)
 
void SetDebug (Int_t deb)
 
Int_t GetDebug () const
 
void SetMCGenerator (Int_t mcgen)
 Set the generator type. More...
 
void SetMCGenerator (TString mcgen)
 Set the generator type. More...
 
Int_t GetMCGenerator () const
 
TString GetMCGeneratorString () const
 
void Print (const Option_t *opt) const
 Print some relevant parameters set for the analysis. More...
 
void PrintMCTag (Int_t tag) const
 Print the assigned origins to this particle. More...
 

Private Member Functions

AliMCAnalysisUtilsoperator= (const AliMCAnalysisUtils &mcu)
 Copy constructor not implemented. More...
 
 AliMCAnalysisUtils (const AliMCAnalysisUtils &mcu)
 Assignment operator not implemented. More...
 

Private Attributes

Int_t fCurrentEvent
 Current Event number. More...
 
Int_t fDebug
 Debug level. More...
 
TList * fJetsList
 List of jets. More...
 
Int_t fMCGenerator
 MC generator used to generate data in simulation. More...
 
TString fMCGeneratorString
 MC generator used to generate data in simulation. More...
 
TLorentzVector fDaughMom
 ! particle momentum More...
 
TLorentzVector fDaughMom2
 ! particle momentum More...
 
TLorentzVector fMotherMom
 ! particle momentum More...
 
TLorentzVector fGMotherMom
 ! particle momentum More...
 

Detailed Description

Class with analysis utils for simulations.

Class containing utility methods for analysis of simulations, ESD or AOD format. Contains:

  • method to check the origin of a given track/cluster, in several levels of ancestry
  • methods to check if a cluster contains several particles, particularly decay photons pairs form same neutral meson.
  • method to obtain the generated jets

More information can be found in this twiki.

Author
Gustavo Conesa Balbastre Gusta.nosp@m.vo.C.nosp@m.onesa.nosp@m..Bal.nosp@m.bastr.nosp@m.e@ce.nosp@m.rn.ch, LPSC-IN2P3-CNRS

Definition at line 33 of file AliMCAnalysisUtils.h.

Member Enumeration Documentation

Enumerator
kPythia 
kHerwig 
kHijing 
kBoxLike 

Definition at line 121 of file AliMCAnalysisUtils.h.

"Mostly" photon parent types on line 1,

then "mostly" electron parent types on line 3, (e.g. electrons can come from pi0 decay) then charged particles on line 4, followed by other and unknown on line 5

Enumerator
kMCPhoton 
kMCPrompt 
kMCFragmentation 
kMCISR 
kMCPi0Decay 
kMCEtaDecay 
kMCOtherDecay 
kMCDecayPairLost 
kMCDecayPairInCalo 
kMCDecayDalitz 
kMCConversion 
kMCElectron 
kMCEFromCFromB 
kMCEFromC 
kMCEFromB 
kMCZDecay 
kMCWDecay 
kMCMuon 
kMCPion 
kMCPi0 
kMCKaon 
kMCEta 
kMCProton 
kMCAntiProton 
kMCNeutron 
kMCAntiNeutron 
kMCUnknown 
kMCBadLabel 

Definition at line 51 of file AliMCAnalysisUtils.h.

Constructor & Destructor Documentation

AliMCAnalysisUtils::AliMCAnalysisUtils ( )

Constructor.

Definition at line 38 of file AliMCAnalysisUtils.cxx.

AliMCAnalysisUtils::~AliMCAnalysisUtils ( )
virtual

Destructor.

Definition at line 52 of file AliMCAnalysisUtils.cxx.

AliMCAnalysisUtils::AliMCAnalysisUtils ( const AliMCAnalysisUtils mcu)
private

Assignment operator not implemented.

Member Function Documentation

Int_t AliMCAnalysisUtils::CheckCommonAncestor ( Int_t  index1,
Int_t  index2,
const AliCaloTrackReader reader,
Int_t &  ancPDG,
Int_t &  ancStatus,
TLorentzVector &  momentum,
TVector3 &  prodVertex 
)

Check the first common ancestor of 2 clusters, given the most likely labels of the primaries generating such clusters.

Definition at line 65 of file AliMCAnalysisUtils.cxx.

Referenced by AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(), AliAnaPi0::FillMCVersusRecDataHistograms(), AliAnaElectron::FillShowerShapeHistograms(), GetNOverlaps(), and AliAnaPhotonConvInCalo::MakeAnalysisFillAOD().

void AliMCAnalysisUtils::CheckLostDecayPair ( const TObjArray *  arrayCluster,
Int_t  iMom,
Int_t  iParent,
AliStack *  stack,
Int_t &  tag 
)

Check on ESDs if the current decay photon has the second photon companion lost.

Definition at line 1092 of file AliMCAnalysisUtils.cxx.

Referenced by CheckOriginInAOD(), and CheckOriginInStack().

void AliMCAnalysisUtils::CheckLostDecayPair ( const TObjArray *  arrayCluster,
Int_t  iMom,
Int_t  iParent,
const TClonesArray *  mcparticles,
Int_t &  tag 
)

Check on AODs if the current decay photon has the second photon companion lost.

Definition at line 1185 of file AliMCAnalysisUtils.cxx.

Int_t AliMCAnalysisUtils::CheckOrigin ( Int_t  label,
const AliCaloTrackReader reader,
Int_t  calorimeter 
)
Returns
tag with primary particle(S) at the origin of the cluster/track. Here we just check if the event is AOD or ESD and then assign to the corresponding method and we have only one input MC label not multiple. See CheckOriginInStack and CheckOriginInAOD.

Definition at line 252 of file AliMCAnalysisUtils.cxx.

Referenced by AliAnaCalorimeterQA::ClusterAsymmetryHistograms(), AliAnaCalorimeterQA::ClusterMCHistograms(), AliAnaPhoton::FillAcceptanceHistograms(), AliAnaParticleIsolation::FillAcceptanceHistograms(), AliAnaPhoton::FillTrackMatchingResidualHistograms(), AliAnaInsideClusterInvariantMass::GetMCIndex(), AliAnaPhoton::MakeAnalysisFillAOD(), AliAnaElectron::MakeAnalysisFillAOD(), AliAnaPi0EbE::MakeShowerShapeIdentification(), and AliAnaCalorimeterQA::WeightHistograms().

Int_t AliMCAnalysisUtils::CheckOrigin ( const Int_t *  label,
Int_t  nlabels,
const AliCaloTrackReader reader,
Int_t  calorimeter 
)
Returns
tag with primary particle(S) at the origin of the cluster/track. Here we just check if the event is AOD or ESD and then assign to the corresponding method.

Definition at line 217 of file AliMCAnalysisUtils.cxx.

Int_t AliMCAnalysisUtils::CheckOriginInAOD ( const Int_t *  labels,
Int_t  nlabels,
const TClonesArray *  mcparticles,
const TObjArray *  arrayCluster 
)
Returns
tag with primary particle(S) at the origin of the cluster/track. Do this for AODs, same things as in CheckOriginInStack.

Generally speaking, label is the MC label of a reconstructed entity (track, cluster, etc) for which we want to know something about its heritage, but one can also use it directly with stack particles not connected to reconstructed entities.

Definition at line 585 of file AliMCAnalysisUtils.cxx.

Referenced by CheckOrigin().

Int_t AliMCAnalysisUtils::CheckOriginInStack ( const Int_t *  labels,
Int_t  nlabels,
AliStack *  stack,
const TObjArray *  arrayCluster 
)
Returns
tag with primary particle(S) at the origin of the cluster/track. Do this for ESDs, same things as in CheckOriginInAOD.

Generally speaking, label is the MC label of a reconstructed entity (track, cluster, etc) for which we want to know something about its heritage, but one can also use it directly with stack particles not connected to reconstructed entities.

Definition at line 288 of file AliMCAnalysisUtils.cxx.

Referenced by CheckOrigin().

void AliMCAnalysisUtils::CheckOverlapped2GammaDecay ( const Int_t *  labels,
Int_t  nlabels,
Int_t  mesonIndex,
AliStack *  stack,
Int_t &  tag 
)

Check if cluster is formed from the contribution of 2 decay photons from pi0 or eta. Input in stack.

Definition at line 835 of file AliMCAnalysisUtils.cxx.

Referenced by CheckOriginInAOD(), and CheckOriginInStack().

void AliMCAnalysisUtils::CheckOverlapped2GammaDecay ( const Int_t *  labels,
Int_t  nlabels,
Int_t  mesonIndex,
const TClonesArray *  mcparticles,
Int_t &  tag 
)

Check if cluster is formed from the contribution of 2 decay photons from pi0 or eta. Input are AliAODMCParticles.

Definition at line 960 of file AliMCAnalysisUtils.cxx.

TLorentzVector AliMCAnalysisUtils::GetDaughter ( Int_t  idaugh,
Int_t  label,
const AliCaloTrackReader reader,
Int_t &  pdg,
Int_t &  status,
Bool_t &  ok,
Int_t &  daughlabel,
TVector3 &  prodVertex 
)
Returns
the kinematics of the particle that generated the signal, its pdg and its status and its label mother.

Definition at line 1450 of file AliMCAnalysisUtils.cxx.

Referenced by AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(), AliAnaParticleIsolation::FillAcceptanceHistograms(), AliAnaPhoton::MakeAnalysisFillHistograms(), and AliAnaParticleIsolation::MakeAnalysisFillHistograms().

Int_t AliMCAnalysisUtils::GetDebug ( ) const
inline

Definition at line 119 of file AliMCAnalysisUtils.h.

Referenced by AliAnaCaloTrackCorrBaseClass::InitDebug().

TLorentzVector AliMCAnalysisUtils::GetGrandMother ( Int_t  label,
const AliCaloTrackReader reader,
Int_t &  pdg,
Int_t &  status,
Bool_t &  ok,
Int_t &  grandMomLabel,
Int_t &  greatMomLabel 
)
Returns
the kinematics of the particle that generated the signal.

Definition at line 1724 of file AliMCAnalysisUtils.cxx.

Referenced by AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(), and GetNOverlaps().

TList * AliMCAnalysisUtils::GetJets ( const AliCaloTrackReader reader)
Returns
list of jets (TParticles) and index of most likely parton that originated it.

Definition at line 1302 of file AliMCAnalysisUtils.cxx.

void AliMCAnalysisUtils::GetMCDecayAsymmetryAngleForPDG ( Int_t  label,
Int_t  pdg,
const AliCaloTrackReader reader,
Float_t &  asy,
Float_t &  angle,
Bool_t &  ok 
)

In case of an eta or pi0 decay into 2 photons, get the asymmetry in the energy of the photons.

Definition at line 1801 of file AliMCAnalysisUtils.cxx.

Referenced by AliAnaInsideClusterInvariantMass::GetMCPrimaryKine().

Int_t AliMCAnalysisUtils::GetMCGenerator ( ) const
inline
TString AliMCAnalysisUtils::GetMCGeneratorString ( ) const
inline

Definition at line 125 of file AliMCAnalysisUtils.h.

TLorentzVector AliMCAnalysisUtils::GetMother ( Int_t  label,
const AliCaloTrackReader reader,
Int_t &  pdg,
Int_t &  status,
Bool_t &  ok 
)

Definition at line 1545 of file AliMCAnalysisUtils.cxx.

TLorentzVector AliMCAnalysisUtils::GetMother ( Int_t  label,
const AliCaloTrackReader reader,
Int_t &  pdg,
Int_t &  status,
Bool_t &  ok,
Int_t &  momlabel 
)
Returns
the kinematics of the particle that generated the signal, its pdg and its status and its label mother.

Definition at line 1556 of file AliMCAnalysisUtils.cxx.

TLorentzVector AliMCAnalysisUtils::GetMotherWithPDG ( Int_t  label,
Int_t  pdg,
const AliCaloTrackReader reader,
Bool_t &  ok,
Int_t &  momlabel 
)
Int_t AliMCAnalysisUtils::GetNDaughters ( Int_t  label,
const AliCaloTrackReader reader,
Bool_t &  ok 
)
Returns
the the number of daughters of a given MC particle.

Definition at line 1908 of file AliMCAnalysisUtils.cxx.

Referenced by AliAnaInsideClusterInvariantMass::CheckLocalMaximaMCOrigin(), and AliAnaParticleIsolation::FillAcceptanceHistograms().

Int_t AliMCAnalysisUtils::GetNOverlaps ( const Int_t *  label,
UInt_t  nlabels,
Int_t  mctag,
Int_t  mesonLabel,
AliCaloTrackReader reader,
Int_t *  overpdg 
)

Compare the primary depositing more energy with the rest, if no photon/electron (conversion) or neutral meson as comon ancestor, consider it as other particle contributing. Give as input the meson label in case it was a pi0 or eta merged cluster.

Definition at line 1967 of file AliMCAnalysisUtils.cxx.

Referenced by AliAnaPhoton::FillShowerShapeHistograms(), AliAnaParticleIsolation::FillTrackMatchingShowerShapeControlHistograms(), AliAnaInsideClusterInvariantMass::GetMCPrimaryKine(), and AliAnaPi0EbE::MakeShowerShapeIdentification().

AliMCAnalysisUtils& AliMCAnalysisUtils::operator= ( const AliMCAnalysisUtils mcu)
private

Copy constructor not implemented.

void AliMCAnalysisUtils::Print ( const Option_t *  opt) const

Print some relevant parameters set for the analysis.

Definition at line 2043 of file AliMCAnalysisUtils.cxx.

void AliMCAnalysisUtils::PrintMCTag ( Int_t  tag) const

Print the assigned origins to this particle.

Definition at line 2058 of file AliMCAnalysisUtils.cxx.

void AliMCAnalysisUtils::SetDebug ( Int_t  deb)
inline

Definition at line 118 of file AliMCAnalysisUtils.h.

void AliMCAnalysisUtils::SetMCGenerator ( Int_t  mcgen)

Set the generator type.

Definition at line 2088 of file AliMCAnalysisUtils.cxx.

void AliMCAnalysisUtils::SetMCGenerator ( TString  mcgen)

Set the generator type.

Definition at line 2104 of file AliMCAnalysisUtils.cxx.

void AliMCAnalysisUtils::SetTagBit ( Int_t &  tag,
UInt_t  set 
) const
inline

Member Data Documentation

Int_t AliMCAnalysisUtils::fCurrentEvent
private

Current Event number.

Definition at line 132 of file AliMCAnalysisUtils.h.

Referenced by GetJets().

TLorentzVector AliMCAnalysisUtils::fDaughMom
private

! particle momentum

Definition at line 142 of file AliMCAnalysisUtils.h.

Referenced by GetDaughter(), and GetMCDecayAsymmetryAngleForPDG().

TLorentzVector AliMCAnalysisUtils::fDaughMom2
private

! particle momentum

Definition at line 144 of file AliMCAnalysisUtils.h.

Referenced by GetMCDecayAsymmetryAngleForPDG().

Int_t AliMCAnalysisUtils::fDebug
private

Debug level.

Definition at line 134 of file AliMCAnalysisUtils.h.

Referenced by GetDebug(), Print(), and SetDebug().

TLorentzVector AliMCAnalysisUtils::fGMotherMom
private

! particle momentum

Definition at line 148 of file AliMCAnalysisUtils.h.

Referenced by GetGrandMother(), GetMotherWithPDG(), and GetNOverlaps().

TList* AliMCAnalysisUtils::fJetsList
private

List of jets.

Definition at line 136 of file AliMCAnalysisUtils.h.

Referenced by GetJets(), and ~AliMCAnalysisUtils().

Int_t AliMCAnalysisUtils::fMCGenerator
private

MC generator used to generate data in simulation.

Definition at line 138 of file AliMCAnalysisUtils.h.

Referenced by CheckOriginInAOD(), CheckOriginInStack(), GetJets(), GetMCGenerator(), and SetMCGenerator().

TString AliMCAnalysisUtils::fMCGeneratorString
private

MC generator used to generate data in simulation.

Definition at line 140 of file AliMCAnalysisUtils.h.

Referenced by GetMCGeneratorString(), Print(), and SetMCGenerator().

TLorentzVector AliMCAnalysisUtils::fMotherMom
private

! particle momentum

Definition at line 146 of file AliMCAnalysisUtils.h.

Referenced by GetMother(), and GetNOverlaps().


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