#ifndef ALIMCANALYSISUTILS_H #define ALIMCANALYSISUTILS_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ //_________________________________________________________________________ // Class for analysis utils for MC data // stored in stack or event header. // Contains: // - method to check the origin of a given track/cluster // - method to obtain the generated jets // //*-- Author: Gustavo Conesa (INFN-LNF) // --- ROOT system --- #include #include #include class TList ; class TVector3; //--- AliRoot system --- class AliCaloTrackReader ; class AliStack ; class AliMCAnalysisUtils : public TObject { public: AliMCAnalysisUtils() ; // ctor virtual ~AliMCAnalysisUtils() ;//virtual dtor //-------------------------------------- //Enum with tag for origin of particles //-------------------------------------- //"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 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 } ; //-------------------------------------- // Methods to check origin of clusters //-------------------------------------- Int_t CheckCommonAncestor(Int_t index1, Int_t index2, const AliCaloTrackReader* reader, Int_t & ancPDG, Int_t & ancStatus, TLorentzVector & momentum, TVector3 & v) ; Int_t CheckOrigin(Int_t label, const AliCaloTrackReader * reader, Int_t calorimeter) ; //Check the label of the most significant particle but do checks on the rest of the contributing labels 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) ; // ESD Int_t CheckOriginInAOD (const Int_t *labels, Int_t nlabels, const TClonesArray* mcparticles, const TObjArray *arrayCluster) ; // AOD void CheckOverlapped2GammaDecay(const Int_t *labels, Int_t nlabels, Int_t mesonIndex, AliStack * stack, Int_t & tag); // ESD void CheckOverlapped2GammaDecay(const Int_t *labels, Int_t nlabels, Int_t mesonIndex, const TClonesArray* mcparticles, Int_t & tag); // AOD void CheckLostDecayPair(const TObjArray *arrayCluster, Int_t iMom, Int_t iParent, AliStack* stack, Int_t & tag); // ESD void CheckLostDecayPair(const TObjArray *arrayCluster, Int_t iMom, Int_t iParent, const TClonesArray* mcparticles, Int_t & tag); // AOD 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); 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); Int_t GetNOverlaps(const Int_t * label, UInt_t nlabels, Int_t mctag, Int_t mesonLabel, AliCaloTrackReader * reader,Int_t *overpdg); //Check or set the bits produced in the above methods void SetTagBit(Int_t &tag, UInt_t set) const { // Set bit of type set (mcTypes) in tag tag |= (1<