- Timestamp:
- Mar 7, 2022, 8:57:55 PM (3 years ago)
- Parents:
- 7dbc149 (diff), 54ec182 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Young-Kwon Jo <cccpy98@…> (03/07/22 20:57:55)
- git-committer:
- GitHub <noreply@…> (03/07/22 20:57:55)
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/PdgCodeFilter.cc
r7dbc149 r4564cba 85 85 fCharge = GetInt("Charge", 1); 86 86 87 // keep bhadron 88 fRequireKeepGhostBHadron = GetBool("RequireKeepGhostBHadron", false); 89 87 90 // import input array 88 91 fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles")); … … 124 127 { 125 128 pdgCode = candidate->PID; 129 130 if (fRequireKeepGhostBHadron) { 131 if (isBHadron(abs(pdgCode)) ){ 132 candidate->PT = candidate->PT * 1e-18; 133 if (candidate->PT ==0) candidate->PT = 1e-18; 134 candidate->Momentum.SetPtEtaPhiM(candidate->PT, candidate->Momentum.Eta(), candidate->Momentum.Phi(), candidate->Momentum.M()); 135 fOutputArray->Add(candidate); 136 continue; 137 } 138 } 139 126 140 const TLorentzVector &candidateMomentum = candidate->Momentum; 127 141 pt = candidateMomentum.Pt(); … … 139 153 } 140 154 } 155 156 Bool_t PdgCodeFilter::isBHadron(const unsigned int absPdgId) { 157 if (absPdgId <= 100) 158 return false; // Fundamental particles and MC internals 159 if (absPdgId >= 1000000000) 160 return false; // Nuclei, +-10LZZZAAAI 161 162 // General form of PDG ID is 7 digit form 163 // +- n nr nL nq1 nq2 nq3 nJ 164 //const int nJ = absPdgId % 10; // Spin 165 const int nq3 = (absPdgId / 10) % 10; 166 const int nq2 = (absPdgId / 100) % 10; 167 const int nq1 = (absPdgId / 1000) % 10; 168 169 if (nq3 == 0) 170 return false; // Diquarks 171 if (nq1 == 0 and nq2 == 5) 172 return true; // B mesons 173 if (nq1 == 5) 174 return true; // B baryons 175 176 return false; 177 } 178 -
modules/PdgCodeFilter.h
r7dbc149 r4564cba 55 55 Bool_t fRequireNotPileup; //! 56 56 57 Bool_t fRequireKeepGhostBHadron; //! 58 57 59 std::vector<Int_t> fPdgCodes; 60 61 Bool_t isBHadron(const unsigned int absPdgId); //! 58 62 59 63 TIterator *fItInputArray; //!
Note:
See TracChangeset
for help on using the changeset viewer.