ATLAS Offline Software
Jet.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Filename : Jet.cxx
7 // Author : Ambreesh Gupta, Ed Frank
8 // Created : Sep, 2000
9 //
10 // HISTORY;
11 //
12 // 21Sep01 Peter Loch Implement Tucson agreement for Jet class.
13 // 23Apr02 Peter Loch Move to JetEvent package
14 // 10Oct02 Peter Loch New package structure implemented
15 // 31Jan03 Peter Loch New navigation code implemented
16 // 27Jul03 Ambreesh Modified addJet method to add a constituent
17 // if it does not belong to the jet.
18 // 11Feb08 PL & RS new JetEDM: new inheritance structure and
19 // information stores for b-tagging attached
20 // Nov09 PO & PA Externalize Signal States to ParticleSigStateImpl
21 // Remove pre/post processors
22 //
24 
25 // externals
26 #include "CLHEP/Units/SystemOfUnits.h"
27 #include "CLHEP/Vector/LorentzVector.h"
28 #include "GaudiKernel/MsgStream.h"
29 
30 // Navigation
31 #include "Navigation/Navigable.h"
33 
34 // FourMom
35 #include "FourMom/P4PxPyPzE.h"
36 #include "FourMom/P4PtEtaPhiM.h"
37 #include "FourMom/P4EEtaPhiM.h"
39 
40 // JetEvent
41 #include "JetEvent/Jet.h"
44 #include "JetEvent/JetCollection.h"
45 
46 // STL
47 #include <algorithm>
48 #include <vector>
49 
50 #include <cmath>
51 #include <sstream>
52 
53 
54 const size_t Jet::s_defaultJetId = 0 ;
55 const size_t Jet::s_defaultJetAuthor = 0 ;
56 
57 // DO NOT change these lines EVER!!!!!
58 // std::string Jet::m_shpCat = "JetShapes";
59 // std::string Jet::m_assCat = "JetAssociations";
60 // std::string Jet::m_tagCat = "JetTags";
61 // std::string Jet::m_infCat = "JetInfo";
62 
63 
64 
65 // size_t Jet::m_invalidKeyIndex = size_t(-1);
66 // size_t Jet::m_momMapInvalidIndex = size_t(-1);
67 
68 
69 
70 const double Jet::m_ignoreWeight = 1.0e-06;
71 
72 // Little helper function
73 bool jet_component_identity(double p1, double p2, double epsilon = 0.1){
74  return fabs(p1-p2)< epsilon ;
75 }
76 
77 
79 // Constructors //
81 
82 #define JET_CONSTRUCTOR_BASE m_constituentsN(0) \
83  , m_RoIword(0xFFFFFFFF) \
84  , m_jetId(Jet::s_defaultJetId) \
85  , m_collection(NULL) \
86  , m_jetAuthor(Jet::s_defaultJetAuthor) \
87  , m_assocStore(0) \
88  , m_tagInfoStore(0) \
89  , m_constituentSigState(P4SignalState::UNKNOWN) \
90  , m_num_combinedLikelihood(0) \
91  , m_pseudoJet(0)
92 
93 
99  : base_t(3, signalstate_t(1)),
101 
102 {
103  this->setup(hlv_t(0.,0.,0.,0.));
104 }
105 
106 
118 Jet::Jet(const collection_t* pColl,
119  const constituent_t* pConst,
120  double wght)
121  : base_t(3, signalstate_t(1)),
123 {
124 
125  this->setup(hlv_t(0.,0.,0.,0.));
126  this->addConstituent(pColl,pConst,wght);
127 }
128 
140 Jet::Jet(const collection_t* pColl,index_t ind,double wght)
141  : base_t(3, signalstate_t(1)),
143  this->setup(hlv_t(0.,0.,0.,0.));
144  this->addConstituent(pColl,ind,wght);
145 }
146 
147 
154 Jet::Jet(const fourmom_t* pMom)
155  : base_t(3, signalstate_t(1)),
157  this->setup(hlv_t(pMom->px(),pMom->py(),pMom->pz(),pMom->e()));
158 }
159 
166 Jet::Jet(const fourmom_t& rMom)
167  : base_t(3, signalstate_t(1)),
169  this->setup(hlv_t(rMom.px(),rMom.py(),rMom.pz(),rMom.e()));
170 }
177 Jet::Jet(const hlv_t& rVec)
178  : base_t(3, signalstate_t(1)),
180 {
181  this->setup(rVec);
182 }
192 Jet::Jet(double px, double py, double pz, double e)
193  : base_t(3, signalstate_t(1)),
195 {
196  this->setup(hlv_t(px,py,pz,e));
197 }
202 Jet::Jet(const Jet* pJet)
203  : base_t((const base_t) *pJet) ,
205 {
206 
207  copy_from_jet( pJet, CopyAll);
208 
209 }
210 
211 // constructor with arguements
212 Jet::Jet(const Jet* pJet, bool copyStores, bool copyConstituents)
213  : base_t( (const base_t) *pJet),
215 {
216 
217  CopyDataMembers cmd0 = CopyDataMembers ( copyStores ?
219 
220  CopyDataMembers cmd1 = CopyDataMembers ( copyConstituents ? CopyConstituents : CopyNone ) ;
221 
222  //std::cout <<"Jet copyStores:"<< copyStores << " "<< cmd0 << "| copyConstituents:"<<copyConstituents<< " "<< cmd1<< " size ="<< this->size() <<std::endl;
223 
224  copy_from_jet( pJet, cmd0 , cmd1);
225 }
226 
227 // constructor with arguements
228 Jet::Jet(const Jet* pJet,
229  CopyDataMembers cmd0, CopyDataMembers cmd1,
230  CopyDataMembers cmd2, CopyDataMembers cmd3)
231  : base_t( (const base_t) *pJet ),
233 {
234  copy_from_jet( pJet, cmd0 , cmd1, cmd2, cmd3 );
235 }
236 
242 Jet::Jet(const Jet& rJet)
243  : IAthenaBarCode(),
244  INavigable(),
245  I4Momentum(),
247  base_t(rJet),
249 {
250  copy_from_jet(&rJet, CopyAll);
251 }
252 
253 void Jet::setup(const hlv_t& v)
254 {
255 
256  this->setupKine(v);
257 
258 }
259 
260 void Jet::copy_from_jet( const Jet* pJet, CopyDataMembers cdm0, CopyDataMembers cdm1 ,
261  CopyDataMembers cdm2 , CopyDataMembers cdm3)
262 {
263  CopyDataMembers cdm = CopyDataMembers(cdm0 | cdm1 | cdm2 | cdm3);
264 
265 
266  //std::cout<<"Jet::copy_from_jet this="<< this->constit4MomGetter.empty() << " pjet="<< pJet->constit4MomGetter.empty() << std::endl;
267 
268  // copy all kinematics
270  this->set4Mom(pJet->hlv());
271 
273  this->set4Mom(pJet->hlv(P4SignalState::JETEMSCALE));
278 
279 
280  this->m_RoIword = pJet->m_RoIword;
281  m_jetAuthor = pJet->m_jetAuthor;
283 
284  m_pseudoJet = pJet->m_pseudoJet;
285 
286  // copy members if requested
287  if ( cdm & CopyConstituents )
288  {
289  //std::cout<< "copy constituent "<< std::endl;
290  const_iterator firstConst = pJet->firstConstituent();
291  const_iterator lastConst = pJet->lastConstituent();
292  for ( ; firstConst != lastConst; ++firstConst )
293  {
294  Jet::index_type theIndex;
295  if ( pJet->getIndex(firstConst,theIndex) ) // getIndex by iterator more efficient ?
296  {
297  this->putElement(pJet->getContainer(firstConst),
298  theIndex,
299  pJet->getWeight(firstConst));
300  }
301  }
302  } else {
303  this->navigableBase().removeAll();
304  }
305 
306  // this line MUST stay after copyconstituents otherwise m_constituentsN will be double.
308 
309  if ( cdm & CopyMoments )
310  {
311  const shape_map_t* oMap = pJet->getMomentMap();
312  //std::cout << " Copying moment other map "<< oMap<< " author="<< pJet->jetAuthor() <<" id="<< pJet->id()<< std::endl;
313  if ( oMap != nullptr ){
314 
315  const JetMomentMap::record_t *oldrec = oMap->getRecord( pJet->id() );
316  // copy the moments :
317  //std::cout << " oldrec = "<< oldrec << std::endl;
318  if( oldrec){
319  const shape_map_t* mMap = this->getMomentMap(true);
320  // this should guaranty we have a map.
321 
322  JetMomentMap::record_t *newrec =
323  new JetMomentMap::record_t( *oldrec );
324 
325  // assign them in the map
326  mMap->assignRecord(m_jetId, newrec);
327  }
328  }
329  }
330 
331 
332  if ( cdm & CopyAssociations )
333  if ( bool(pJet->m_assocStore) )
334  {
336 
337  const assostore_t& old = *pJet->m_assocStore;
338  m_assocStore->reserve (old.size());
339  for (size_t i = 0; i < old.size(); i++)
340  if (bool(old[i])) m_assocStore->push_back (old[i]->clone());
341  else m_assocStore->push_back ( nullptr );
342  }
343  if ( cdm & CopyTagInfos )
344  if ( bool(pJet->m_tagInfoStore) )
345  {
347 
348  const tagstore_t& old = *pJet->m_tagInfoStore;
349  m_tagInfoStore->reserve (old.size());
350  for (size_t i = 0; i < old.size(); i++)
351  if (bool(old[i])) m_tagInfoStore->push_back (old[i]->clone());
352  else m_tagInfoStore->push_back(nullptr);
353  }
354 
355 }
356 
357 
369 {
370  // FIXME jet owns stores for right now
371 
372  if( m_jetId != s_defaultJetId){
373  // we may have an entry in a moment map
374  // and need to remove ourselves from the map
375  const shape_map_t *map = getMomentMap();
376  if(map) map->removeRecord( m_jetId );
377  }
378 
379  if ( m_assocStore != nullptr ) {
380  for (size_t i = 0; i < m_assocStore->size(); i++)
381  delete (*m_assocStore)[i];
382  delete m_assocStore;
383  }
384  if ( m_tagInfoStore != nullptr ) {
385  for (size_t i = 0; i < m_tagInfoStore->size(); i++)
386  delete (*m_tagInfoStore)[i];
387  delete m_tagInfoStore;
388  }
389 
390 }
391 
392 
394 // Jet Constituent Algebra //
396 
414  const constituent_t* pConst,
415  double wght)
416 {
417  double w = this->contains(pConst) ? wght + this->getWeight(pConst) : wght;
418  this->putElement(pColl,pConst,w);
419  this->updateKine(pConst,wght);
420  return true;
421 }
422 
439 bool Jet::addConstituent(const collection_t* pColl,index_t ind,double wght)
440 {
441 
442  const constituent_t * constit = (pColl->operator[])(ind) ;
443  double w = this->contains(pColl,ind) ? wght + this->getWeight(pColl,ind) : wght;
444  this->putElement(pColl,ind,w);
445  this->updateKine(constit,wght);
446  return true;
447 }
448 
468  index_t ind,
469  size_t sizeHint,
470  bool noKine,
471  double wght)
472 {
473  // Avoid multiple linear searches if we can.
474  // Unfortunately, we can't avoid it for the case in which
475  // the constituent is already in the jet (without changing
476  // the Navigable interface, anyway); but that should be the
477  // uncommon case anyway.
478  //std::cout << " adding constit. e="<< this->e() << " c_e="<< (pColl->operator[])(ind)->e() << " size "<< this->size()<< std::endl;
479  if (this->contains(pColl, ind))
480  this->reweight(pColl,ind, wght + this->getWeight(pColl, ind));
481  else
482  this->insertElement(pColl, ind, wght, sizeHint);
483 
484  if (!noKine)
485  this->updateKine(((pColl->operator[])(ind))->hlv(),wght);
486  return true;
487 }
488 
489 // remove constituents
491 {
492  if ( this->contains(pConst) )
493  {
494  double w(this->getWeight(pConst));
495  //this->updateKine(pConst->hlv(),-w);
496  this->updateKine(pConst,-w);
497  this->remove(pConst);
498  return true;
499  }
500  return false;
501 }
502 
503 // add Jet to Jet with a global weight
504 bool Jet::addJet(const Jet* pJet, double wght)
505 {
506  const_iterator fC(pJet->begin());
507  const_iterator lC(pJet->end());
508  for ( ; fC != lC ; ++fC )
509  {
510  index_t ind(index_t(-1));
511  if ( pJet->getIndex(fC,ind) )
512  {
513  if ( !(this->contains(*fC)) )
514  {
515  this->addConstituent(pJet->getContainer(fC),
516  ind,
517  wght*(pJet->getWeight(fC)));
518  }
519  }
520  }
521  return pJet->size() > 0;
522 }
523 
525 // Jet Kinematics Manipulations //
527 
528 // remove all children with kinematic weight 0
530 {
531  unsigned int aCtr = 0;
532  // check content
533  if ( this->size() > 0 )
534  {
535  const_iterator fC(this->begin());
536  const_iterator lC(this->end());
537  for ( ; fC != lC; ++fC )
538  {
539  double weight(this->getWeight(fC));
540  if ( std::abs(weight)< m_ignoreWeight )
541  {
542  ++aCtr;
543  this->removeConstituent(*fC);
544  }
545  }
546  }
547  return aCtr > 0;
548 }
549 
550 // re-weight child in Jet
551 bool Jet::reweight(const constituent_t* pConst,double wght)
552 {
553  if ( this->contains(pConst) )
554  {
555  const collection_t* pColl = this->getContainer(pConst);
556  this->removeConstituent(pConst);
557  return this->addConstituent(pColl,pConst,wght);
558  }
559  return false;
560 }
561 
562 bool Jet::reweight(const collection_t* pColl,index_t ind,double wght)
563 {
564  // std::cout << "reweighting "<< wght << std::endl;
565  return this->removeConstituent(pColl,ind)
566  ? this->addConstituent(pColl,ind,wght)
567  : false;
568 }
569 
571 // Jet Kinematics // ///// kinematic variables from P4PxPyPzE /////
573 
574 void Jet::scale_momentum(double scale_factor){
575  this->set4Mom(this->hlv()*scale_factor);
576 }
577 
578 Jet * Jet::get_scaled_copy(double scale_factor) const{
579  Jet* newjet = new Jet(this,true,true);
580  newjet->scale_momentum(scale_factor);
581  return newjet;
582 }
583 
585 // Jet Composition //
587 
588 // test Jets on identity by composition
589 bool Jet::isIdentical(const Jet* pJet ) const
590 {
591  // need to have same size (number of constituents)
592  if ( pJet->size() != this->size() ) return false;
593 
594  if( pJet->size() == 0 ){
595  // fall back on mometum comparison
596  bool isEqual = ( fabs( pJet->e() - e() )< m_ignoreWeight ) ;
597  isEqual = isEqual && ( fabs( pJet->px() - px() )< m_ignoreWeight) ;
598  isEqual = isEqual && ( fabs( pJet->py() - py() )< m_ignoreWeight) ;
599  isEqual = isEqual && ( fabs( pJet->pz() - pz() )< m_ignoreWeight) ;
600  return isEqual;
601  }
602 
603  bool isEqual = true;
604  const_iterator fC(pJet->begin());
605  const_iterator lC(pJet->end());
606 
607  while ( isEqual && fC != lC )
608  {
609  double wJ(pJet->getWeight(fC));
610  const_iterator fK(this->begin());
611  const_iterator lK(this->end());
612  while ( ( fK != lK ) && ((*fC) != (*fK) ||
613  fabs(this->getWeight(fK)-wJ) >= m_ignoreWeight) )
614 
615  { ++fK; }
616  isEqual = fK != lK;
617  ++fC;
618  }
619 
620  return isEqual;
621 }
622 
623 // Print-out a single line to describe the Jet
624 std::string Jet::str() {
625  std::ostringstream out;
626  out << jetAuthor() << ": NConstituents: " << size() << "; Eta: " << eta() << "; Phi: " << phi() << "; Pt: " << pt();
627  return out.str();
628 }
629 
630 // Difference between two jets - Non-class method required for trigger
631 void diff(const Jet& rJet1, const Jet& rJet2, std::map<std::string,double> varDiff)
632 {
633  // Since this isn't part of the Jet Class, we need to re-define it here
634  // not very elegant
635  double ignoreWeight = 1.0e-06;
636  // Compare sizes
637  if(rJet1.size() != rJet2.size())
638  varDiff["NConstituents"] = rJet1.size() - rJet2.size();
639 
640  // Compare 4 momenta
641  if(fabs(rJet1.e() - rJet2.e()) > ignoreWeight)
642  varDiff["e"] = rJet1.e() - rJet2.e();
643  if(fabs(rJet1.px() - rJet2.px()) > ignoreWeight)
644  varDiff["px"] = rJet1.px() - rJet2.px();
645  if(fabs(rJet1.py() - rJet2.py()) > ignoreWeight)
646  varDiff["py"] = rJet1.py() - rJet2.py();
647  if(fabs(rJet1.pz() - rJet2.pz()) > ignoreWeight)
648  varDiff["pz"] = rJet1.pz() - rJet2.pz();
649 }
650 
651 
652 
653 // find overlap region
654 Jet* Jet::getOverlap(const Jet* pJet, bool /*noKine = false*/) const
655 {
656  if ( pJet->size() == 0 || this->size() == 0 ) return (Jet*)nullptr;
657 
658  // Dereferencing ELs is a little expensive.
659  // Get the constituents into a vector so that we only
660  // need to do it once.
661  std::vector<const constituent_type*> constituents (this->begin(),
662  this->end());
663  //unused - fix warning
664  //size_t sz = std::min (this->size(), pJet->size());
665 
666  // Defer allocating the new jet until we know we have something
667  // to put into it.
668  Jet* newJet = nullptr;
669  // de-compose Jet
670  const_iterator fC(pJet->begin());
671  const_iterator lC(pJet->end());
672  for ( ; fC != lC; ++fC )
673  {
674  const constituent_type* c = *fC;
675  if ( std::find (constituents.begin(), constituents.end(), c) !=
676  constituents.end() )
677  {
678  if (!newJet){
679  newJet = new Jet(this, true, false); // we copy the stores, not the constituent
680  newJet->set4Mom(hlv_t(0. ,0. , 0., 0.)) ; //and reset its fourmom to nill
681  }
682  index_t index;
683 #ifndef NDEBUG
684  bool result =
685 #endif
686  this->getIndex (fC, index);
687  assert (result);
688  newJet->addConstituent(this->getContainer(fC),
689  index);
690 // sz,
691 // noKine);
692  //std::cout<< "getoverlap new e="<< newJet->e() << " / e1="<< e() << " e2="<< pJet->e()<<" | eta= "<< newJet->eta() << " f="<< newJet->pt()/pt() << std::endl;
693  }
694  }
695  return newJet;
696 }
697 
699 // Kinematic Updates // ///// protected /////
701 
703 {
704  hlv_t fmom(0.,0.,0.,0.);
707 
708  for (;fC!=lC;++fC)
709  {
710  if (! fC.get_real_constit()) continue; // constit may be invalid if broken EL
711  fmom += (fC.hlv() * this->getWeight(fC.get_real_constit()));
712  }
713  return fmom;
714 }
715 
717 {
718  hlv_t fmom(0.,0.,0.,0.);
721 
722  for (;fC!=lC;++fC)
723  {
724  if (! fC.get_real_constit()) continue; // constit may be invalid if broken EL
725  fmom += (fC.hlv() * this->getWeight(fC.get_real_constit()));
726  }
727  return fmom;
728 }
729 
736 {
737  // reset four momentum
738  this->setPx(0.);
739  this->setPy(0.);
740  this->setPz(0.);
741  this->setE(0.);
742 
743  // loop children
744 
747  for (;fC!=lC;++fC)
748  {
749  if (! fC.get_real_constit()) continue; // constit may be invalid if broken EL
750  this->updateKine(fC.hlv(),this->getWeight(fC.get_real_constit()));
751  }
752 }
753 
757 void Jet::updateKine(const hlv_t& rVec,double wght)
758 {
759  this->set4Mom(this->hlv()+rVec*wght);
760 }
761 
762 void Jet::updateKine(const Jet::constituent_t* pConst,double wght)
763 {
764 
765  // Attempt to cast into an ISignalState object
766  const ISignalState* pSigState = dynamic_cast<const ISignalState*>(pConst);
767 
768  if(bool(pSigState) && m_constituentSigState != P4SignalState::UNKNOWN)
769  {
770  // Copy kinematics for the chosen Signal State
771  this->updateKine(pSigState->hlv(m_constituentSigState),wght);
772  } else
773  this->updateKine(pConst->hlv(),wght);
774 }
775 
776 Jet* Jet::clone() const
777 {
778  Jet* jet = new Jet(this, false, false);
779  return jet;
780 }
781 
782 Jet* Jet::clone(bool copyStores, bool copyConstituents) const
783 {
784  Jet* jet = new Jet(this, copyStores,copyConstituents);
785  return jet;
786 }
787 
789  if( m_collection ) return m_collection->keyDesc();
791 }
792 
794 // Moments //
796 
797 void Jet::setShape(const mkey_t& shapeName,shape_t shapeValue,
798  bool createIfMissing) const
799 {
800  // use check function to find index of moment - index is generated if
801  // not yet in key descriptor store
802  size_t keyIndex;
803  if ( this->checkKey(JetKeyConstants::ShapeCat,shapeName,keyIndex,true) )
804  {
805  // access jet moment map
806  const shape_map_t* map = this->getMomentMap(createIfMissing);
807  // store data
808  if ( map != nullptr )
809  {
810  map->setMoment(m_jetId,keyIndex,shapeValue);
811  // m_newMomKeys = true;
812  }
813  }
814 }
815 
816 // get shape keys
817 std::vector<Jet::mkey_t> Jet::getShapeKeys() const
818 {
819  std::vector<Jet::mkey_t> keys;
820  const shape_map_t* pMap = this->getMomentMap();
821  if ( pMap != nullptr )
822  {
823  size_t n(pMap->numberOfMoments(m_jetId));
824  keys.reserve(n/2);
825  for ( size_t i(0); i < n; ++i )
826  {
827  float data(0.);
828  if ( pMap->getMoment(m_jetId,i,data) )
830  }
831  }
832 
833  return keys;
834 }
835 
836 Jet::shape_t Jet::getShape(const mkey_t& shapeName,bool addIfMissing) const
837 {
838 
839  size_t keyIndex;
840  if ( this->checkKey(JetKeyConstants::ShapeCat,shapeName,keyIndex,false) )
841  {
842  const shape_map_t* pMap = this->getMomentMap(addIfMissing);
843  return pMap != nullptr ? pMap->getMoment(m_jetId,keyIndex) : shape_t();
844  }
845  return shape_t();
846 }
847 
849 // TagInfo //
851 
852 
854  const taginfo_t* pTagInfo,
855  bool /* useLink */ )
856 {
857  // use check function
858  size_t aInd;
859  //
860  if ( ! bool(m_tagInfoStore) )
861  {
862  // checkKey automatically build new store !!!
863  m_tagInfoStore = new tagstore_t();
864  }
865  if ( this->checkKeyStore(JetKeyConstants::TagCat,key,m_tagInfoStore,aInd, true) )
866  {
867  removeInfo(aInd);
868  (m_tagInfoStore->operator[])(aInd) = pTagInfo;
869  }
870 }
871 
872 void Jet::removeInfo (unsigned int index)
873 {
874  delete (m_tagInfoStore->operator[])(index);
875  (m_tagInfoStore->operator[])(index) = nullptr;
876 }
877 
879 {
880  if ( bool(m_tagInfoStore) ) {
881  size_t aInd;
882  if ( this->checkKeyStore(JetKeyConstants::TagCat,key,m_tagInfoStore,aInd, false) ) {
883  removeInfo(aInd);
884  }
885  }
886 }
887 
888 
889 void Jet::setupKine(const hlv_t& vIn)
890 {
891  this->set4Mom(vIn, statename_t::JETEMSCALE);
893  this->set4Mom(vIn, statename_t::JETFINAL);
894 }
895 
897 // Signal States //
899 
900 
901 void Jet::setRawE(double e)
903 void Jet::setRawPx(double px)
905 void Jet::setRawPy(double py)
907 void Jet::setRawPz(double pz)
909 
910 void Jet::setCScaleE(double e)
912 void Jet::setCScalePx(double px)
914 void Jet::setCScalePy(double py)
916 void Jet::setCScalePz(double pz)
918 
919 void Jet::setCalE(double e)
921 void Jet::setCalPx(double px)
923 void Jet::setCalPy(double py)
925 void Jet::setCalPz(double pz)
927 
928 double Jet::getRawE() const { return e(P4SignalState::JETEMSCALE); }
929 double Jet::getRawPx() const { return px(P4SignalState::JETEMSCALE); }
930 double Jet::getRawPy() const { return py(P4SignalState::JETEMSCALE); }
931 double Jet::getRawPz() const { return pz(P4SignalState::JETEMSCALE); }
932 
937 
938 double Jet::getCalE() const { return e(P4SignalState::JETFINAL); }
939 double Jet::getCalPx() const { return px(P4SignalState::JETFINAL); }
940 double Jet::getCalPy() const { return py(P4SignalState::JETFINAL); }
941 double Jet::getCalPz() const { return pz(P4SignalState::JETFINAL); }
942 
943 double Jet::ei() const { return this->e(); }
944 
945 double Jet::pxi() const { return this->px(); }
946 
947 double Jet::pyi() const { return this->py(); }
948 
949 double Jet::pzi() const { return this->pz(); }
950 
951 double Jet::pti() const { return this->pt(); }
952 
954  bool ok = jet_component_identity( getRawE() , getCalE() );
958  return ok;
959 }
960 
962 // Public: CombinedLikelihood //
964 
965 
966 std::vector<double> Jet::combinedLikelihood() const
967 {
968  std::vector<double> combinedLikelihood;
970  const std::string base="LikeLihood_";
971  for(unsigned int i=0; i<m_num_combinedLikelihood; i++){
973  }
974 
975  return combinedLikelihood;
976 }
977 
978 void Jet::setCombinedLikelihood(const std::vector<double>&
979  combinedLikelihood)
980 {
981  const std::string base="LikeLihood_";
982  for(unsigned int i=0; i<combinedLikelihood.size(); i++){
984  }
986 }
987 
988 
990 {
991  double w = 0.;
992  if ( this->jetAuthor().find("Atlfast") != std::string::npos) {
993  // Fastsim
994  w = -30.;
995  const JetTagInfoBase* pos(this->tagInfo("SV1IP3D"));
996  if (pos != nullptr) {
997  std::vector<double> prob = pos->tagLikelihood();
998  if(prob.size()>1) {
999  double pb = prob[0];
1000  double pu = prob[1];
1001  if (pb != 0 && pu != 0)
1002  w = log(pb/pu);
1003  else
1004  w = 0.; //Hopefully a warning appears in the BTagger Tool
1005  }
1006  } else {
1007  // Use "binary" random b-tag only if no IP3D nor SV1 Info
1008  if (m_num_combinedLikelihood > 0) {
1009  std::vector<double> Likelihood = combinedLikelihood();
1010  if (Likelihood[0] > 0.9) w = 100;
1011  }
1012  }
1013  } else {
1014  // FullSim
1015  bool found = false;
1016  // get W from IP3D:
1017  const JetTagInfoBase* pos(this->tagInfo("IP3D"));
1018  if( pos != nullptr ) {
1019  found = true;
1020  std::vector<double> prob = pos->tagLikelihood();
1021  if(prob.size()>1) {
1022  double pb = prob[0];
1023  double pu = prob[1];
1024  if (pb > 0. && pu > 0.) {
1025  if(pb!=1.||pu!=1.e9) {
1026  w = log(pb/pu);
1027  }
1028  } else
1029  w = 0.; //Hopefully a warning appears in the BTagger Tool
1030  }
1031  }
1032  // get W from SV:
1033  pos = this->tagInfo("SV1");
1034  if( pos != nullptr ) {
1035  found = true;
1036  std::vector<double> prob = pos->tagLikelihood();
1037  if(prob.size()>1) {
1038  double pb = prob[0];
1039  double pu = prob[1];
1040  if (pb > 0. && pu > 0.) //Hopefully a warning appears in the BTagger Tool if not the case
1041  w += log(pb/pu);
1042  }
1043  }
1044  if (!found) w = -30.;
1045  }
1046  return w;
1047 }
1048 
1049 double Jet::getFlavourTagWeight(const std::string& infoName) const
1050 {
1051  double w = -100.;
1052  const JetTagInfoBase* pos(this->tagInfo(infoName));
1053  if( pos != nullptr ) {
1054  std::vector<double> prob = pos->tagLikelihood();
1055  if(prob.size() == 1) {
1056  w = prob[0];
1057  } else {
1058  if(prob.size() > 1) {
1059  double pb = prob[0];
1060  double pu = prob[1];
1061  if(pb<=0.) { // A different protection than the above one... In any case, this is not OK and should be watched out !
1062  w = -30.;
1063  } else if (pu<=0.) {
1064  w = +100.;
1065  } else {
1066  w = log(pb/pu);
1067  }
1068  }
1069  }
1070  }
1071  return w;
1072 }
1073 
1074 
1075 
1076 
1077 const std::vector<Jet::mkey_t>& Jet::getAssociationKeys() const
1078 {
1080 }
1081 
1082 
1084 {
1085  return getObject<assoc_t,assostore_t>(key, m_assocStore, JetKeyConstants::AssoCat, false);
1086 }
1087 
1088 
1089 
1091 // Public: Jet Author //
1093 
1095 {
1097 
1098  std::string full_auth = keyDesc()->getKey(JetKeyConstants::InfoCat,m_jetAuthor);
1099  size_t pos = full_auth.find_first_of('_');
1100 
1101  if( pos != std::string::npos) // we add the _XXX_YYY part to author
1102  m_jetAuthor = keyDesc()->getIndex(JetKeyConstants::InfoCat,author+full_auth.substr(pos),true);
1103  else
1105 }
1106 
1107 
1109 {
1110  std::string full_auth = keyDesc()->getKey(JetKeyConstants::InfoCat,m_jetAuthor);
1111  // return the first part in JetAuth_XXX_YYY
1112  size_t found=full_auth.find_first_of('_');
1113  return found != std::string::npos ? full_auth.substr(0 , found) : full_auth;
1114 }
1115 
1116 
1117 
1118 std::string Jet::jetAuthorAndCalibTags() const{
1120 }
1121 
1122 void Jet::setJetAuthorAndCalibTags(const std::string& author) {
1124 }
1125 
1126 
1127 
1128 bool Jet::hasCalibTag(const std::string& tag) const{
1129  std::string full_auth = keyDesc()->getKey(JetKeyConstants::InfoCat,m_jetAuthor);
1130  std::string full_tag = ""; full_tag+="_"; full_tag+=tag;
1131  return ( full_auth.find(full_tag) != std::string::npos );
1132 }
1133 
1134 int Jet::numCalibTag() const {
1135  std::string full_auth = keyDesc()->getKey(JetKeyConstants::InfoCat,m_jetAuthor);
1136  size_t p = full_auth.find_first_of('_');
1137  int c=0;
1138  while(p != std::string::npos){
1139  c++;
1140  p = full_auth.find_first_of('_',p+1);
1141  }
1142  return c;
1143 }
1144 
1145 std::string Jet::getCalibTag(int i) const{
1146  std::string full_auth = keyDesc()->getKey(JetKeyConstants::InfoCat,m_jetAuthor);
1147  size_t p = full_auth.find_first_of('_');
1148  int c=0;
1149  while(p != std::string::npos){
1150  c++;
1151  if( c==i ){
1152  return full_auth.substr(p+1,full_auth.find_first_of('_',p+1)-p-1);
1153  }
1154  p = full_auth.find_first_of('_',p+1);
1155  }
1156  return "";
1157 }
1158 
1159 void Jet::addCalibTag(const std::string& tag){
1160  std::string full_auth = keyDesc()->getKey(JetKeyConstants::InfoCat,m_jetAuthor);
1161  full_auth +="_"+tag;
1162  m_jetAuthor = keyDesc()->getIndex(JetKeyConstants::InfoCat,full_auth,true);
1163 }
1164 const Jet::shape_map_t* Jet::getMomentMap(bool addIfMissing) const
1165 {
1166  if( (m_jetId == s_defaultJetId) && addIfMissing ){
1167  // we need an id to be registered in a map
1169  }
1170  return getMomentMap();
1171 }
1172 
1174 {
1175 
1176  // jets must be identified
1177  if(m_jetId == s_defaultJetId ) return nullptr;
1178 
1179  if( m_collection ){
1180  // This jet belongs to a JetCollection, ask the map
1181  return m_collection->getMomentMap();
1182  }
1183  // Else, this is an orphan jet, return the global instance :
1185 
1186 }
1187 
1188 std::string Jet::getMomentMapName() const {
1189  std::string mapname = jetAuthor();
1190  mapname +="MomentMap";
1191  return mapname;
1192 }
1193 
1194 size_t Jet::id() const {return m_jetId;}
1195 
1197  return m_collection;
1198 }
1199 
1200 void Jet::setJetId(size_t id){ m_jetId = id ; }
1201 
1202 void Jet::setPxPyPzE(double px, double py, double pz, double e){
1203  setPx(px);setPy(py);setPz(pz);setE(e);
1204 }
1205 void Jet::setPtEtaPhiE( double pt, double eta, double phi, double e ){
1206  double pz = pt*std::sinh( eta) ;
1207  double px = pt*std::cos(phi);
1208  double py = pt*std::sin(phi);
1209  setPx(px);setPy(py);setPz(pz);setE(e);
1210 }
1211 void Jet::setPtEtaPhiM( double a, double b, double c, double d ){
1212  set4Mom( P4PtEtaPhiM(a,b,c,d) );
1213 }
1214 void Jet::setEEtaPhiM( double a, double b, double c, double d ){
1215  set4Mom( P4EEtaPhiM(a,b,c,d) );
1216 }
1217 
1218 MsgStream& Jet::operator<<( MsgStream& out) {
1219  return ( out << str() );
1220 }
Jet::setPtEtaPhiM
void setPtEtaPhiM(double a, double b, double c, double d)
Definition: Jet.cxx:1211
Jet::getOverlap
Jet * getOverlap(const Jet &rJet, bool noKine=false) const
Retrieve constituent overlap between jets.
Jet::setE
virtual void setE(double e)
Kinematics are now handled by the base class, except for the following.
JetMomentMap
Definition: JetMomentMap.h:21
Jet::s_defaultJetAuthor
static const size_t s_defaultJetAuthor
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:723
Jet::getCalPy
double getCalPy() const
Definition: Jet.cxx:940
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
base
std::string base
Definition: hcg.cxx:78
Jet::pxi
virtual double pxi() const
Definition: Jet.cxx:945
Jet::end
const_iterator end() const
End iterator for constituent store.
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::py
virtual double py() const
y component of momentum
Definition: ParticleSigStateImpl.h:679
Jet::m_num_combinedLikelihood
size_t m_num_combinedLikelihood
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:833
I4Momentum
Definition: I4Momentum.h:31
ParticleSigStateImpl::hlv
virtual CLHEP::HepLorentzVector hlv() const
CLHEP HepLorentzVector.
Definition: ParticleSigStateImpl.h:832
ISignalState::hlv
virtual CLHEP::HepLorentzVector hlv(P4SignalState::State s) const =0
obtain the CLHEP HepLorentzVector
Jet::setJetId
void setJetId(size_t id)
Definition: Jet.cxx:1200
Jet::setPz
virtual void setPz(double pz)
Jet::getCalPz
double getCalPz() const
Definition: Jet.cxx:941
Jet::m_ignoreWeight
static const double m_ignoreWeight
Maximum difference up to which weights are considered equal.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:620
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
test_pyathena.px
px
Definition: test_pyathena.py:18
Jet::getMomentMap
const shape_map_t * getMomentMap(bool addIfMissing) const
Definition: Jet.cxx:1164
JetConstituentIterator::first
static JetConstituentIterator first(const Jet *jet)
get a default iterator
Definition: JetConstituentIterator.h:81
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::eta
virtual double eta() const
pseudo rapidity
Definition: ParticleSigStateImpl.h:735
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::e
virtual double e() const
energy
Definition: ParticleSigStateImpl.h:751
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
Jet::setCalE
void setCalE(double e)
Sets calibrated
Definition: Jet.cxx:919
Jet::setJetAuthorAndCalibTags
void setJetAuthorAndCalibTags(const std::string &author)
Set the full author-and-tag string.
Definition: Jet.cxx:1122
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
Jet::getShape
shape_t getShape(const mkey_t &shapeName, bool addIfMissing=false) const
Retrieve shape variable.
Definition: Jet.cxx:836
Jet::getFlavourTagWeight
double getFlavourTagWeight() const
get the final b-tag result from the default tagger
Definition: Jet.cxx:989
JetCollection::keyDesc
JetKeyDescriptorInstance * keyDesc() const
Definition: JetCollection.cxx:43
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
JetKeyDescriptor.h
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
INavigable4Momentum.h
Jet::index_t
navigable_t::external_index_type index_t
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:109
Jet::CopyNone
@ CopyNone
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:145
Navigable::removeAll
bool removeAll()
Definition: Navigable.h:237
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
Jet::removeConstituent
bool removeConstituent(const constituent_t *pConst)
Remove a constituent.
Definition: Jet.cxx:490
index
Definition: index.py:1
Jet::setPx
virtual void setPx(double Px)
ISignalState
Definition: ISignalState.h:42
Jet::setup
void setup(const hlv_t &v)
hist_file_dump.d
d
Definition: hist_file_dump.py:137
Jet::getAssociationBase
const assoc_t * getAssociationBase(const mkey_t &key) const
Definition: Jet.cxx:1083
ParticleSigStateImpl::px
virtual double px() const
We re-define here extra class routines that will allow direct access to signal state kinematics witho...
Definition: ParticleSigStateImpl.h:671
JetKeyConstants::ShapeCat
static const key_t ShapeCat
Index category for jet shapes.
Definition: JetKeyDescriptor.h:88
Jet::setCScalePz
void setCScalePz(double pz)
Sets uncalibrated .
Definition: Jet.cxx:916
Jet::ei
virtual double ei() const
Definition: Jet.cxx:943
P4EEtaPhiM
Definition: P4EEtaPhiM.h:25
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
Jet::setEEtaPhiM
void setEEtaPhiM(double a, double b, double c, double d)
Definition: Jet.cxx:1214
test_pyathena.pt
pt
Definition: test_pyathena.py:11
P4SignalState::JETEMSCALE
@ JETEMSCALE
Definition: ISignalState.h:33
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Jet::cleanUp
bool cleanUp()
Remove all constituents with kinematic weight = 0.
Definition: Jet.cxx:529
Jet::getCScalePy
double getCScalePy() const
Definition: Jet.cxx:935
Jet::scale_momentum
void scale_momentum(double scale_factor)
scale the jet 4mom by scale_factor
Definition: Jet.cxx:574
Jet::setCScalePx
void setCScalePx(double px)
Sets uncalibrated .
Definition: Jet.cxx:912
Jet::tagInfo
const taginfo_t * tagInfo(const mkey_t &key) const
Retrieve tag info object.
Jet::~Jet
virtual ~Jet()
Destructor.
Definition: Jet.cxx:368
Jet::getCScaleE
double getCScaleE() const
Definition: Jet.cxx:933
JetKeyConstants::TagCat
static const key_t TagCat
Index category for jet tag info.
Definition: JetKeyDescriptor.h:92
Jet::index_type
navigable_t::external_index_type index_type
Constituent index type (obsolete)
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:101
Jet::getCalE
double getCalE() const
Definition: Jet.cxx:938
Jet::setCScaleE
void setCScaleE(double e)
Sets uncalibrated
Definition: Jet.cxx:910
Jet::clone
virtual Jet * clone() const
clone method : do not clone stores and constituent
Definition: Jet.cxx:776
Jet::CopyMoments
@ CopyMoments
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:146
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
Jet::remove
bool remove()
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Jet::pzi
virtual double pzi() const
Definition: Jet.cxx:949
Jet::getCalPx
double getCalPx() const
Definition: Jet.cxx:939
covarianceTool.prob
prob
Definition: covarianceTool.py:678
JET_CONSTRUCTOR_BASE
#define JET_CONSTRUCTOR_BASE
Definition: Jet.cxx:82
Jet::firstConstituent
const_iterator firstConstituent() const
(obsolete) begin iterator for constituent store
Jet::hasCalibTag
bool hasCalibTag(const std::string &tag) const
test if jet has calib tag tag
Definition: Jet.cxx:1128
P4SignalState::UNKNOWN
@ UNKNOWN
Definition: ISignalState.h:29
I4Momentum::hlv
virtual CLHEP::HepLorentzVector hlv() const =0
CLHEP HepLorentzVector.
Jet::getRawPz
double getRawPz() const
Definition: Jet.cxx:931
Jet::assostore_t
std::vector< const assoc_t * > assostore_t
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:126
Jet::setShape
void setShape(const mkey_t &shapeName, shape_t shape, bool addIfMissing=true) const
Set shape variable.
Definition: Jet.cxx:797
JetTagInfoBase
Definition: JetTagInfoBase.h:56
Jet::mkey_t
JetKeyDescriptor::key_t mkey_t
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:115
OrphanJetMomentMap::instance
static OrphanJetMomentMap instance
Definition: JetMomentMap.h:59
Jet::checkKey
bool checkKey(const mcat_t &cat, const mkey_t &key, size_t &aInd, bool createIfMissing) const
Jet::getMomentMap
const shape_map_t * getMomentMap() const
Definition: Jet.cxx:1173
JetKeyDescriptorInstance::instance
static JetKeyDescriptorInstance * instance()
Definition: JetKeyDescriptor.h:123
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
Jet::const_iterator
navigable_t::object_iter const_iterator
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:108
Jet::tagstore_t
std::vector< const taginfo_t * > tagstore_t
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:130
JetMapBase::numberOfMoments
virtual size_t numberOfMoments(size_t jetIndex) const
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::p
virtual double p() const
mass momentum magnitude
Definition: ParticleSigStateImpl.h:711
Jet::pti
virtual double pti() const
Definition: Jet.cxx:951
Jet::removeInfo
void removeInfo(const mkey_t &key)
(depreciated) Remove tag info object
Definition: Jet.cxx:878
Jet::id
size_t id() const
returns this jet unique identifier in its collection
Definition: Jet.cxx:1194
JetMapBase::removeRecord
virtual void removeRecord(size_t jetIndex) const
remove a record
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
Jet::setRawPy
void setRawPy(double py)
Sets uncalibrated .
Definition: Jet.cxx:905
Jet::CopyTagInfos
@ CopyTagInfos
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:147
Jet::getCalibTag
std::string getCalibTag(int i) const
retrieve calib tag number i (start at 1).
Definition: Jet.cxx:1145
Jet::parentCollection
const JetCollection * parentCollection() const
a pointer to the collection this jet belongs to (can be NULL)
Definition: Jet.cxx:1196
JetKeyConstants::AssoCat
static const key_t AssoCat
Index category for jet associations.
Definition: JetKeyDescriptor.h:90
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
Jet::setCalPx
void setCalPx(double px)
Sets calibrated .
Definition: Jet.cxx:921
Jet::Jet
Jet()
Default constructor.
Definition: Jet.cxx:98
Jet::setupKine
virtual void setupKine(const hlv_t &v)
Definition: Jet.cxx:889
Jet::constituent_sum4Mom
hlv_t constituent_sum4Mom() const
Sum of weighted constituent four-momentums.
Definition: Jet.cxx:702
P4SignalState::JETCONSTITUENTSCALE
@ JETCONSTITUENTSCALE
Definition: ISignalState.h:35
diff
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Definition: Jet.cxx:631
Jet::setRawE
void setRawE(double e)
Sets uncalibrated
Definition: Jet.cxx:901
Jet::setCombinedLikelihood
void setCombinedLikelihood(const std::vector< double > &combinedLikelihood)
(depreciated) Likelihood store setter
Definition: Jet.cxx:978
lumiFormat.i
int i
Definition: lumiFormat.py:85
Jet::shape_t
JetMoment::float_t shape_t
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:120
JetCollection.h
beamspotman.n
n
Definition: beamspotman.py:731
OrphanJetCounter::getNewId
size_t getNewId()
Definition: JetMapBase.h:173
Jet::size
size_t size() const
Size of constituent store.
Jet::lastConstituent
const_iterator lastConstituent() const
(obsolere) end iterator for constituent store
Athena_test::isEqual
bool isEqual(double x1, double x2, double thresh=1e-6)
Definition: FLOATassert.h:26
INavigable4MomentumCollection.h
Jet::numCalibTag
int numCalibTag() const
number of calib tags for this jet
Definition: Jet.cxx:1134
Jet::getIndex
bool getIndex(const constituent_t *pConst, index_t &ind) const
Retrieve index of object in container.
Jet::getShapeKeys
std::vector< mkey_t > getShapeKeys() const
Retrieve list of avalailable keys.
Definition: Jet.cxx:817
Jet::getMomentMapName
std::string getMomentMapName() const
Definition: Jet.cxx:1188
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
Jet::finalScaleEqualsEMScale
bool finalScaleEqualsEMScale() const
True if JETFINAL state equals JETEMSCALE state within 0.1 MeV on each E,px,pypz components.
Definition: Jet.cxx:953
JetMomentMap::record_t
base_t::record_t record_t
Definition: JetMomentMap.h:32
Jet::get_scaled_copy
Jet * get_scaled_copy(double scale_factor) const
return a NEW copy of this jet with 4mom scaled
Definition: Jet.cxx:578
Jet::getRawPy
double getRawPy() const
Definition: Jet.cxx:930
Jet::jetAuthor
std::string jetAuthor() const
Author and calibration history are encoded in a simple way inside the jet object.
Definition: Jet.cxx:1108
Jet::m_tagInfoStore
tagstore_t * m_tagInfoStore
Tag info store.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:741
P4SignalState::UNCALIBRATED
@ UNCALIBRATED
Definition: ISignalState.h:30
Jet::getContainer
const collection_t * getContainer(const constituent_t *pConst) const
Retrieve pointer to constituent object container.
JetKeyDescriptorInstance::getKey
const key_t & getKey(const category_t &cat, size_t index) const
Definition: JetKeyDescriptor.cxx:161
INavigable
Definition: INavigable.h:18
Jet::insertElement
void insertElement(const collection_t *pColl, const constituent_t *pConst, double wght=1.0, size_t sizeHint=0)
insert element without checking
Jet::getAssociationKeys
const std::vector< mkey_t > & getAssociationKeys() const
Definition: Jet.cxx:1077
Jet::setCalPz
void setCalPz(double pz)
Sets calibrated .
Definition: Jet.cxx:925
Jet::m_collection
const JetCollection * m_collection
Shape store link.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:676
Jet::setConstituentSignalState
void setConstituentSignalState(signalstate_t s)
Set the current Signal state of the jet constituents.
Jet::isIdentical
bool isIdentical(const Jet &rJet) const
Test if Jet is identical to given Jet.
ParticleSigStateImpl
Definition: ParticleSigStateImpl.h:42
JetAssociationBase
Definition: JetAssociationBase.h:21
Jet::addCalibTag
void addCalibTag(const std::string &tag)
set calib tag tag must be of the form "AAA"
Definition: Jet.cxx:1159
Jet::setRawPz
void setRawPz(double pz)
Sets uncalibrated .
Definition: Jet.cxx:907
Jet::setPtEtaPhiE
void setPtEtaPhiE(double a, double b, double c, double d)
Definition: Jet.cxx:1205
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::navigableBase
const navigable_type & navigableBase() const
access to underlying base type (INavigable-like)
Definition: ParticleSigStateImpl.h:439
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
JetConstituentIterator.h
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::phi
virtual double phi() const
phi in [-pi,pi[
Definition: ParticleSigStateImpl.h:743
IAthenaBarCode
Definition: AthenaKernel/AthenaKernel/IAthenaBarCode.h:48
Jet::combinedLikelihood
std::vector< double > combinedLikelihood() const
(depreciated) Likelihood store access
Definition: Jet.cxx:966
MVAUtils::index_t
int32_t index_t
The index type of the node in the vector.
Definition: MVAUtilsDefs.h:12
JetKeyConstants::InfoCat
static const key_t InfoCat
Index category for general jet info.
Definition: JetKeyDescriptor.h:94
JetKeyDescriptorInstance::getKeys
const std::vector< key_t > & getKeys(const category_t &cat) const
Definition: JetKeyDescriptor.cxx:178
Jet::setCalPy
void setCalPy(double py)
Sets calibrated .
Definition: Jet.cxx:923
Jet::addConstituent
bool addConstituent(const collection_t *pColl, const constituent_t *pConst, double wght=1.0)
Add a constituent with optional kinematic weight.
Definition: Jet.cxx:413
Amg::py
@ py
Definition: GeoPrimitives.h:39
Jet::copy_from_jet
void copy_from_jet(const Jet *pjet, CopyDataMembers cdm0, CopyDataMembers cdm1=CopyNone, CopyDataMembers cdm2=CopyNone, CopyDataMembers cdm3=CopyNone)
Definition: Jet.cxx:260
P4EEtaPhiM.h
Jet::m_jetAuthor
size_t m_jetAuthor
Jet author store.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:725
Jet::begin
const_iterator begin() const
Begin iterator for constituent store.
jet_component_identity
bool jet_component_identity(double p1, double p2, double epsilon=0.1)
Definition: Jet.cxx:73
Jet::setCScalePy
void setCScalePy(double py)
Sets uncalibrated .
Definition: Jet.cxx:914
Jet::CopyConstituents
@ CopyConstituents
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:149
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
Jet::putElement
void putElement(const collection_t *pColl, const constituent_t *pConst, double wght=1.0, size_t sizeHint=0)
Add element with checking.
Jet::hlv_t
CLHEP::HepLorentzVector hlv_t
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:133
JetConstituentIterator::get_real_constit
const Jet::constituent_t * get_real_constit()
access to the real constituent pointer
Definition: JetConstituentIterator.h:70
Jet::m_constituentSigState
signalstate_t m_constituentSigState
Constituent Signal State.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:744
Jet::addJet
bool addJet(const Jet *pJet, double wght=1.0)
Add a jet.
Definition: Jet.cxx:504
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
JetMapBase::assignRecord
virtual void assignRecord(size_t jetIndex, record_t *rec) const
assign a given record to a given jet
CheckAppliedSFs.pu
pu
Definition: CheckAppliedSFs.py:311
JetCollection::getMomentMap
const JetMomentMap * getMomentMap() const
Definition: JetCollection.cxx:53
python.PyAthena.v
v
Definition: PyAthena.py:154
Jet::keyDesc
JetKeyDescriptorInstance * keyDesc() const
Definition: Jet.cxx:788
P4SignalState::JETFINAL
@ JETFINAL
Definition: ISignalState.h:34
Jet::m_assocStore
assostore_t * m_assocStore
key descriptor for all jet stores
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:738
Jet::constituentSignalState
signalstate_t constituentSignalState() const
Get the current Signal state of the jet constituents.
Navigable.h
DeMoScan.index
string index
Definition: DeMoScan.py:364
Jet::getRawPx
double getRawPx() const
Definition: Jet.cxx:929
a
TList * a
Definition: liststreamerinfos.cxx:10
Jet::getWeight
double getWeight(const constituent_t *pConst) const
Retrieve kinematic weight of constituent.
Jet::m_RoIword
unsigned int m_RoIword
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:540
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
P4PtEtaPhiM.h
JetConstituentIterator
A safe iterator on jet constituents.
Definition: JetConstituentIterator.h:31
P4PxPyPzEBase::hlv
virtual CLHEP::HepLorentzVector hlv() const
CLHEP HepLorentzVector.
Definition: P4PxPyPzEBase.cxx:147
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
Jet::getCScalePx
double getCScalePx() const
Definition: Jet.cxx:934
xAOD::TauJetParameters::Likelihood
@ Likelihood
needed by TauJet_v1/2
Definition: TauDefs.h:52
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::setSignalState
virtual bool setSignalState(state_t s)
set the current signal state
Definition: ParticleSigStateImpl.h:1157
JetCollection
Container for Jets
Definition: JetCollection.h:30
P4SignalState::State
State
Definition: ISignalState.h:28
INavigable4Momentum
Definition: INavigable4Momentum.h:21
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::pt
virtual double pt() const
transverse momentum
Definition: ParticleSigStateImpl.h:767
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:26
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Jet::m_jetId
size_t m_jetId
the identifier of this jet within its collection.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:672
JetMapBase::getRecord
virtual const record_t * getRecord(size_t jetIndex) const
get the full record for a given jet
Jet::s_defaultJetId
static const size_t s_defaultJetId
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:670
Jet::reweight
bool reweight(const constituent_t *pConst, double wght)
Change kinematic weight of constituent.
Definition: Jet.cxx:551
Jet::updateKine
virtual void updateKine()
Resummation of kinematics from constituents.
Definition: Jet.cxx:735
Jet::str
std::string str()
Jet print-out function.
Definition: Jet.cxx:624
Jet::getRawE
double getRawE() const
Definition: Jet.cxx:928
Jet::setPy
virtual void setPy(double py)
JetConstituentIterator::last
static JetConstituentIterator last(const Jet *jet)
get the end iterator
Definition: JetConstituentIterator.h:96
JetKeyDescriptorInstance::getIndex
size_t getIndex(const category_t &cat, const key_t &key, bool createIfMissing=true)
Definition: JetKeyDescriptor.cxx:47
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Jet::setPxPyPzE
void setPxPyPzE(double px, double py, double pz, double e)
compatibility with analysis EDM
Definition: Jet.cxx:1202
Jet::contains
bool contains(const constituent_t *pConst) const
Check on containment.
Jet.h
Jet::jetAuthorAndCalibTags
std::string jetAuthorAndCalibTags() const
Retrieve the full author-and-tag string of this Jet.
Definition: Jet.cxx:1118
pool::getKey
std::string getKey(const std::string &key, const std::string &encoded)
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
P4PtEtaPhiM
Definition: P4PtEtaPhiM.h:25
Jet::operator<<
MsgStream & operator<<(MsgStream &out)
Output operator.
Definition: Jet.cxx:1218
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
P4PxPyPzE.h
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::pz
virtual double pz() const
z component of momentum
Definition: ParticleSigStateImpl.h:687
Jet::getCScalePz
double getCScalePz() const
Definition: Jet.cxx:936
Jet::m_pseudoJet
const fastjet::PseudoJet * m_pseudoJet
Pointer to the fastjet object this jet is build from.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:846
python.compressB64.c
def c
Definition: compressB64.py:93
JetKeyDescriptorInstance
Definition: JetKeyDescriptor.h:100
Jet::CopyAll
@ CopyAll
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:150
JetMomentMap::setMoment
virtual bool setMoment(size_t jetIndex, size_t keyIndex, float_t moment)
Definition: JetMomentMap.cxx:18
Jet::setTagInfo
void setTagInfo(const mkey_t &key, const taginfo_t *pTagInfo, bool useLink=false)
Set tag info object.
Definition: Jet.cxx:853
Jet::m_constituentsN
numconstit_t m_constituentsN
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:310
Jet::setRawPx
void setRawPx(double px)
Sets uncalibrated .
Definition: Jet.cxx:903
Jet::checkKeyStore
bool checkKeyStore(const mcat_t &cat, const mkey_t &key, STORE *&store, size_t &aInd, bool createIfMissing) const
Check key validity with automatic store generation.
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:754
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
Jet::setJetAuthor
void setJetAuthor(const std::string &author)
Set author of this Jet (only the author, tags unchanged)
Definition: Jet.cxx:1094
Jet::CopyAssociations
@ CopyAssociations
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:148
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
Jet::CopyDataMembers
CopyDataMembers
@ brief fine control over what's copied in the various stores and constituents
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:145
ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE >::set4Mom
virtual void set4Mom(const I4Momentum &p4)
Definition: ParticleSigStateImpl.h:1059
Jet::pyi
virtual double pyi() const
Definition: Jet.cxx:947
JetMomentMap::getMoment
virtual bool getMoment(size_t jetIndex, size_t keyIndex, float_t &moment) const
Definition: JetMomentMap.cxx:34