Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:47

0001 /**
0002  * This file is part of KFParticle package
0003  * Copyright (C) 2007-2019 FIAS Frankfurt Institute for Advanced Studies
0004  *               2007-2019 Goethe University of Frankfurt
0005  *               2007-2019 Ivan Kisel <I.Kisel@compeng.uni-frankfurt.de>
0006  *               2007-2019 Maksym Zyzak
0007  *
0008  * KFParticle is free software: you can redistribute it and/or modify
0009  * it under the terms of the GNU General Public License as published by
0010  * the Free Software Foundation, either version 3 of the License, or
0011  * (at your option) any later version.
0012  *
0013  * KFParticle is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016  * GNU General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU General Public License
0019  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
0020  */
0021 
0022 #ifndef KFPARTICLESPHENIX_KFPARTICLEEVENTRECONSTRUCTION_H
0023 #define KFPARTICLESPHENIX_KFPARTICLEEVENTRECONSTRUCTION_H
0024 
0025 #include "KFParticle_Tools.h"
0026 
0027 #include <KFParticle.h>
0028 
0029 #include <vector>
0030 
0031 class PHCompositeNode;
0032 
0033 class KFParticle_eventReconstruction : public KFParticle_Tools
0034 {
0035  public:
0036   KFParticle_eventReconstruction();
0037 
0038   ~KFParticle_eventReconstruction() override = default;
0039 
0040   /**
0041    * Starts the reconstruction chain
0042    *
0043    * @param selectedMother Input a vector and it will be filled with any mother candidates
0044    * @param selectedVertex Input a vector and it will be filled with the production vertex associated to your mother
0045    * @param selectedDaughters Input a vector and it will be filled with any tracks associated to your mother
0046    * @param selectedIntermediates Input a vector and it will be filled with any intermediate states associated to your mother
0047    */
0048   void createDecay(PHCompositeNode* topNode, std::vector<KFParticle>& selectedMother, std::vector<KFParticle>& selectedVertex,
0049                    std::vector<std::vector<KFParticle>>& selectedDaughters,
0050                    std::vector<std::vector<KFParticle>>& selectedIntermediates,
0051                    int& nPVs);
0052 
0053   /// Used to reconstruct simple decays with no intermediate states
0054   void buildBasicChain(std::vector<KFParticle>& selectedMotherBasic,
0055                        std::vector<KFParticle>& selectedVertexBasic,
0056                        std::vector<std::vector<KFParticle>>& selectedDaughtersBasic,
0057                        const std::vector<KFParticle>& daughterParticlesBasic,
0058                        const std::vector<int>& goodTrackIndexBasic,
0059                        const std::vector<KFParticle>& primaryVerticesBasic, PHCompositeNode* topNode);
0060 
0061   /// Used to reconstruct more complicated decays with up to four intermediate states
0062   void buildChain(std::vector<KFParticle>& selectedMotherAdv,
0063                   std::vector<KFParticle>& selectedVertexAdv,
0064                   std::vector<std::vector<KFParticle>>& selectedDaughtersAdv,
0065                   std::vector<std::vector<KFParticle>>& selectedIntermediatesAdv,
0066                   const std::vector<KFParticle>& daughterParticlesAdv,
0067                   const std::vector<int>& goodTrackIndexAdv,
0068                   const std::vector<KFParticle>& primaryVerticesAdv, PHCompositeNode* topNode);
0069 
0070   /// Basic building block for event reconstruction and selection
0071   void getCandidateDecay(std::vector<KFParticle>& selectedMotherCand,
0072                          std::vector<KFParticle>& selectedVertexCand,
0073                          std::vector<std::vector<KFParticle>>& selectedDaughtersCand,
0074                          const std::vector<KFParticle>& daughterParticlesCand,
0075                          const std::vector<std::vector<int>>& goodTracksThatMeetCand,
0076                          const std::vector<KFParticle>& primaryVerticesCand,
0077                          int n_track_start, int n_track_stop,
0078                          bool isIntermediate, int intermediateNumber, bool constrainMass, PHCompositeNode* topNode);
0079 
0080   /// Method to chose best candidate from a selection of common SV's
0081   int selectBestCombination(bool PVconstraint, bool isAnInterMother,
0082                             std::vector<KFParticle> possibleCandidates,
0083                             std::vector<KFParticle> possibleVertex);
0084 
0085   KFParticle createFakePV();
0086 
0087  protected:
0088   bool m_constrain_to_vertex;
0089   bool m_constrain_int_mass;
0090   bool m_use_fake_pv;
0091 
0092   // private:
0093 };
0094 
0095 #endif  // KFPARTICLESPHENIX_KFPARTICLEEVENTRECONSTRUCTION_H