CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
DEutils< T > Struct Template Reference

#include <DEcompare.h>

Inheritance diagram for DEutils< T >:
de_rank< T >

Public Types

typedef de_trait::cand_type cand_type
 
typedef T::const_iterator col_cit
 
typedef T::iterator col_it
 
typedef T::size_type col_sz
 
typedef de_trait::coll_type coll_type
 
typedef DEtrait< Tde_trait
 

Public Member Functions

bool de_equal (const cand_type &, const cand_type &)
 — candidate match definition — More...
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal (const cand_type &lhs, const cand_type &rhs)
 
bool de_equal_loc (const cand_type &, const cand_type &)
 — candidate location-match definition — More...
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
template<>
bool de_equal_loc (const cand_type &lhs, const cand_type &rhs)
 
col_it de_find (col_it, col_it, const cand_type &)
 — find candidate — More...
 
bool de_nequal (const cand_type &, const cand_type &)
 
bool de_nequal_loc (const cand_type &, const cand_type &)
 
int de_type () const
 
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int ctype)
 — form de-digi — More...
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
template<>
L1DataEmulDigi DEDigi (col_cit itd, col_cit itm, int aflag)
 
 DEutils ()
 
std::string GetName (int i=0) const
 — name candidate — More...
 
bool is_empty (col_cit) const
 — candidate emptiness definition — More...
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
template<>
bool is_empty (col_cit it) const
 
std::string print (col_cit) const
 — print candidate — More...
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
template<>
std::string print (col_cit it) const
 
 ~DEutils ()
 

Detailed Description

template<typename T>
struct DEutils< T >

Definition at line 18 of file DEcompare.h.

Member Typedef Documentation

template<typename T>
typedef de_trait::cand_type DEutils< T >::cand_type

Definition at line 23 of file DEutils.h.

template<typename T>
typedef T::const_iterator DEutils< T >::col_cit

Definition at line 20 of file DEutils.h.

template<typename T>
typedef T::iterator DEutils< T >::col_it

Definition at line 21 of file DEutils.h.

template<typename T>
typedef T::size_type DEutils< T >::col_sz

Definition at line 19 of file DEutils.h.

template<typename T>
typedef de_trait::coll_type DEutils< T >::coll_type

Definition at line 24 of file DEutils.h.

template<typename T>
typedef DEtrait<T> DEutils< T >::de_trait

Definition at line 22 of file DEutils.h.

Constructor & Destructor Documentation

template<typename T>
DEutils< T >::DEutils ( )
inline

Definition at line 28 of file DEutils.h.

References DEutils< T >::de_type().

28  {
29  if(de_type()>51)
30  edm::LogError("L1ComparatorDeutilsCollType") //throw cms::Exception("ERROR")
31  << "DEutils::DEutils() :: "
32  << "specialization is still missing for collection of type:"
33  << de_type() << std::endl;
34  }
int de_type() const
Definition: DEutils.h:37
template<typename T>
DEutils< T >::~DEutils ( )
inline

Definition at line 35 of file DEutils.h.

35 {}

Member Function Documentation

template<typename T >
bool DEutils< T >::de_equal ( const cand_type lhs,
const cand_type rhs 
)

— candidate match definition —

Definition at line 626 of file DEutils.h.

Referenced by DEutils< T >::de_find(), DEutils< T >::de_nequal(), and DEutils< T >::de_type().

626  {
627  //declare candidate matching by default
628  return true;
629 }
template<>
bool DEutils< EcalTrigPrimDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 636 of file DEutils.h.

References RecoTauDiscriminantConfiguration::mask, and heppy_batch::val.

636  {
637  bool val = true;
638  unsigned int mask = 0x0fff; //keep only ttf[11:9], fg [8], Et [7:0]
639  mask &= 0x0eff; //fg bit temporary(!) mask
640  val &= ((lhs[lhs.sampleOfInterest()].raw()&mask) == (rhs[rhs.sampleOfInterest()].raw()&mask));
641  val &= (lhs.id().rawId() == rhs.id().rawId());
642  return val;
643 }
template<>
bool DEutils< HcalTrigPrimDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 646 of file DEutils.h.

References RecoTauDiscriminantConfiguration::mask, and heppy_batch::val.

646  {
647  bool val = true;
648  unsigned int mask = 0x01ff;
649  val &= ((lhs.t0().raw()&mask) == (rhs.t0().raw()&mask));
650  val &= (lhs.id().rawId() == rhs.id().rawId());
651  return val;
652 }
template<>
bool DEutils< L1CaloEmCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 655 of file DEutils.h.

References heppy_batch::val.

655  {
656  bool val = true;
657  val &= (lhs.raw() == rhs.raw() );
658  val &= (lhs.rctCrate() == rhs.rctCrate());
659  val &= (lhs.isolated() == rhs.isolated());
660  val &= (lhs.index() == rhs.index() );
661  //val &= (lhs.bx() == rhs.bx() );
662  return val;
663 }
template<>
bool DEutils< L1CaloRegionCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 666 of file DEutils.h.

References heppy_batch::val.

666  {
667  bool val = true;
668  val &= (lhs.et() == rhs.et() );
669  val &= (lhs.rctCrate() == rhs.rctCrate() );
670  val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
671  val &= (lhs.id().isHf() == rhs.id().isHf());
672  if (!lhs.id().isHf()){
673  val &= (lhs.overFlow() == rhs.overFlow() );
674  val &= (lhs.tauVeto() == rhs.tauVeto() );
675  //mask temporarily (!) mip and quiet bits
676  //val &= (lhs.mip() == rhs.mip() );
677  //val &= (lhs.quiet() == rhs.quiet() );
678  val &= (lhs.rctCard() == rhs.rctCard() );
679  } else {
680  val &= (lhs.fineGrain() == rhs.fineGrain());
681  }
682  return val;
683 }
template<>
bool DEutils< L1GctEmCandCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 686 of file DEutils.h.

686 {return lhs==rhs;}
template<>
bool DEutils< L1GctJetCandCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 688 of file DEutils.h.

688 {return lhs==rhs;}
template<>
bool DEutils< L1GctEtHadCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 690 of file DEutils.h.

690 {return lhs==rhs;}
template<>
bool DEutils< L1GctEtMissCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 691 of file DEutils.h.

691 {return lhs==rhs;}
template<>
bool DEutils< L1GctEtTotalCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 692 of file DEutils.h.

692 {return lhs==rhs;}
template<>
bool DEutils< L1GctHtMissCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 693 of file DEutils.h.

693 {return lhs==rhs;}
template<>
bool DEutils< L1GctHFRingEtSumsCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 694 of file DEutils.h.

694 {return lhs==rhs;}
template<>
bool DEutils< L1GctHFBitCountsCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 695 of file DEutils.h.

695 {return lhs==rhs;}
template<>
bool DEutils< L1GctJetCountsCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 696 of file DEutils.h.

696 {return lhs==rhs;}
template<>
bool DEutils< L1MuDTChambPhDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 700 of file DEutils.h.

References heppy_batch::val.

700  {
701  bool val = true;
702  val &= (lhs.whNum() ==rhs.whNum() );
703  val &= (lhs.scNum() ==rhs.scNum() );
704  val &= (lhs.stNum() ==rhs.stNum() );
705  //val &= (lhs.phi() ==rhs.phi() );
706  //val &= (lhs.phiB() ==rhs.phiB() );
707  val &= (lhs.code() ==rhs.code() );
708  val &= (lhs.Ts2Tag()==rhs.Ts2Tag());
709  //val &= (lhs.BxCnt() ==rhs.BxCnt() );
710  //val &= (lhs.bxNum() ==rhs.bxNum() );
711  return val;
712 }
template<>
bool DEutils< L1MuDTChambThDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 715 of file DEutils.h.

References heppy_batch::val.

715  {
716  bool val = true;
717  val &= (lhs.whNum() ==rhs.whNum() );
718  val &= (lhs.scNum() ==rhs.scNum() );
719  val &= (lhs.stNum() ==rhs.stNum() );
720  //for(int i=0; i<7; i++) {
721  // val &= (lhs.code(i) ==rhs.code(i) );
722  // val &= (lhs.position(i)==rhs.position(i));
723  // val &= (lhs.quality(i) ==rhs.quality(i) );
724  //}
725  //val &= (lhs.bxNum() ==rhs.bxNum() );
726  return val;
727 }
template<>
bool DEutils< L1MuRegionalCandCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 730 of file DEutils.h.

References RecoTauDiscriminantConfiguration::mask, and heppy_batch::val.

730  {
731  bool val = true;
732  val &= (lhs.type_idx() == rhs.type_idx());
733  val &= (lhs.bx() == rhs.bx());
734  if(!val) return val;
735  unsigned int dw = lhs.getDataWord();
736  unsigned int ew = rhs.getDataWord();
737  unsigned int mask = 0xffffffff; //32-bit
738  //RPC: mask bits 25-29 (including synch bits)
739  // emulator doesn't set these bits (permanent masking)
740  // 0 DT, 1 bRPC, 2 CSC, 3 fRPC
741  if(rhs.type_idx()==1 || rhs.type_idx()==3)
742  mask &= 0xc1ffffff;
743  dw &= mask; ew &= mask;
744  val &= (dw==ew);
745  //val &= (lhs.getDataWord() == rhs.getDataWord() );
746  //check whether collections being compared refer to same system and bx!
747  return val;
748 }
template<>
bool DEutils< L1MuGMTCandCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 751 of file DEutils.h.

References RecoTauDiscriminantConfiguration::mask, and heppy_batch::val.

751  {
752  //return (lhs.getDataWord() == rhs.getDataWord() );
753  //return lhs==rhs; //(dataword,bx..)
754  bool val = true;
755  unsigned int dw = rhs.getDataWord();
756  unsigned int ew = lhs.getDataWord();
757  unsigned int mask = 0x3ffffff; //26-bit
758  //mask bits 22 (isolation), 23 (mip) [not permanent!]
759  mask &= (~(0x0c00000));
760  dw &= mask; ew &= mask;
761  val &= (dw==ew);
762  return val;
763  }
template<>
bool DEutils< CSCCorrelatedLCTDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 766 of file DEutils.h.

References heppy_batch::val.

766  {
767  // Exclude track number from comparison since it is only meaningful for
768  // LCTs upstream of the MPC but not downstream (the latter ones are
769  // unpacked by the CSC TF unpacker).
770  bool val = true;
771  val &= (lhs.isValid() == rhs.isValid() );
772  val &= (lhs.getQuality() == rhs.getQuality());
773  val &= (lhs.getKeyWG() == rhs.getKeyWG() );
774  val &= (lhs.getStrip() == rhs.getStrip() );
775  val &= (lhs.getPattern() == rhs.getPattern());
776  val &= (lhs.getBend() == rhs.getBend() );
777  val &= (lhs.getBX() == rhs.getBX() );
778  val &= (lhs.getMPCLink() == rhs.getMPCLink());
779  val &= (lhs.getCSCID() == rhs.getCSCID() );
780  return val;
781  //return lhs==rhs;
782 }
template<>
bool DEutils< CSCALCTDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 784 of file DEutils.h.

784  {
785  return lhs==rhs;
786 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 788 of file DEutils.h.

788  {
789  return lhs==rhs;
790 }
template<>
bool DEutils< L1CSCSPStatusDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 792 of file DEutils.h.

References heppy_batch::val.

792  {
793  bool val = true;
794  val &= (lhs.slot() == rhs.slot());
795  val &= (lhs.BXN () == rhs.BXN ());
796  val &= (lhs.FMM () == rhs.FMM ());
797  val &= (lhs.SEs () == rhs.SEs ());
798  val &= (lhs.SMs () == rhs.SMs ());
799  val &= (lhs.BXs () == rhs.BXs ());
800  val &= (lhs.AFs () == rhs.AFs ());
801  val &= (lhs.VPs () == rhs.VPs ());
802  return val;
803 }
template<typename T >
bool DEutils< T >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)

— candidate location-match definition —

Definition at line 808 of file DEutils.h.

Referenced by DEutils< T >::de_nequal_loc(), and DEutils< T >::de_type().

808  {
809  //declare candidate matching by default
810  return true;
811 }
template<>
bool DEutils< EcalTrigPrimDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 819 of file DEutils.h.

References heppy_batch::val.

819  {
820  bool val = true;
821  val &= (lhs.id().zside() == rhs.id().zside() );
822  val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
823  val &= (lhs.id().iphi() == rhs.id().iphi() );
824  return val;
825 }
template<>
bool DEutils< HcalTrigPrimDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 828 of file DEutils.h.

References heppy_batch::val.

828  {
829  bool val = true;
830  val &= (lhs.id().zside() == rhs.id().zside() );
831  val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
832  val &= (lhs.id().iphi() == rhs.id().iphi() );
833  return val;
834 }
template<>
bool DEutils< L1CaloEmCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 837 of file DEutils.h.

References heppy_batch::val.

837  {
838  bool val = true;
839  val &= (lhs.rctCrate() == rhs.rctCrate());
840  val &= (lhs.rctCard() == rhs.rctCard());
841  val &= (lhs.rctRegion() == rhs.rctRegion());
842  return val;
843 }
template<>
bool DEutils< L1CaloRegionCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 846 of file DEutils.h.

References heppy_batch::val.

846  {
847  bool val = true;
848  val &= (lhs.rctCrate() == rhs.rctCrate() );
849  val &= (lhs.id().isHf() == rhs.id().isHf());
850  if (!lhs.id().isHf())
851  val &= (lhs.rctCard() == rhs.rctCard() );
852  val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
853  return val;
854 }
template<>
bool DEutils< L1GctEmCandCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 857 of file DEutils.h.

References heppy_batch::val.

857  {
858  bool val = true;
859  val &= (lhs.etaIndex() == rhs.etaIndex());
860  val &= (lhs.phiIndex() == rhs.phiIndex());
861  return val;
862 }
template<>
bool DEutils< L1GctJetCandCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 864 of file DEutils.h.

References heppy_batch::val.

864  {
865  bool val = true;
866  val &= (lhs.etaIndex() == rhs.etaIndex());
867  val &= (lhs.phiIndex() == rhs.phiIndex());
868  return val;
869 }
template<>
bool DEutils< L1GctEtHadCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 872 of file DEutils.h.

872  {
873  return true; // no associated location defined
874 }
template<>
bool DEutils< L1GctEtMissCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 876 of file DEutils.h.

References heppy_batch::val.

876  {
877  bool val = true;
878  val &= (lhs.phi() == rhs.phi());
879  return val;
880 }
template<>
bool DEutils< L1GctEtTotalCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 882 of file DEutils.h.

882  {
883  return true; // no associated location defined
884 }
template<>
bool DEutils< L1GctHtMissCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 886 of file DEutils.h.

References heppy_batch::val.

886  {
887  bool val = true;
888  val &= (lhs.phi() == rhs.phi());
889  return val;
890 }
template<>
bool DEutils< L1GctHFRingEtSumsCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 892 of file DEutils.h.

892  {
893  return true; // no associated location defined
894 }
template<>
bool DEutils< L1GctHFBitCountsCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 896 of file DEutils.h.

896  {
897  return true; // no associated location defined
898 }
template<>
bool DEutils< L1GctJetCountsCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 900 of file DEutils.h.

900  {
901  return true; // no associated location defined
902 }
template<>
bool DEutils< L1MuRegionalCandCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 906 of file DEutils.h.

References heppy_batch::val.

906  {
907  bool val = true;
908  val &= (lhs.phi_packed() ==rhs.phi_packed() );
909  val &= (lhs.eta_packed() ==rhs.eta_packed() );
910  //val &= (lhs.type_idx() == rhs.type_idx());
911  //val &= (lhs.bx() == rhs.bx());
912  return val;
913 }
template<>
bool DEutils< L1MuGMTCandCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 916 of file DEutils.h.

References heppy_batch::val.

916  {
917  bool val = true;
918  val &= (lhs.phiIndex() ==rhs.phiIndex() );
919  val &= (lhs.etaIndex() ==rhs.etaIndex() );
920  return val;
921 }
template<>
bool DEutils< L1MuDTChambPhDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 924 of file DEutils.h.

References heppy_batch::val.

924  {
925  bool val = true;
926  val &= (lhs.whNum() ==rhs.whNum() );
927  val &= (lhs.scNum() ==rhs.scNum() );
928  val &= (lhs.stNum() ==rhs.stNum() );
929  //val &= (lhs.phi() ==rhs.phi() );
930  //val &= (lhs.phiB() ==rhs.phiB() );
931  //val &= (lhs.bxNum() ==rhs.bxNum() );
932  return val;
933 }
template<>
bool DEutils< L1MuDTChambThDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 936 of file DEutils.h.

References heppy_batch::val.

936  {
937  bool val = true;
938  val &= (lhs.whNum() ==rhs.whNum() );
939  val &= (lhs.scNum() ==rhs.scNum() );
940  val &= (lhs.stNum() ==rhs.stNum() );
941  //val &= (lhs.bxNum() ==rhs.bxNum() );
942  return val;
943 }
template<>
bool DEutils< CSCCorrelatedLCTDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 946 of file DEutils.h.

References heppy_batch::val.

946  {
947  bool val = true;
948  val &= (lhs.getCSCID() == rhs.getCSCID() );
949  val &= (lhs.getStrip() == rhs.getStrip() );
950  val &= (lhs.getKeyWG() == rhs.getKeyWG() );
951  return val;
952 }
template<>
bool DEutils< CSCALCTDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 955 of file DEutils.h.

References heppy_batch::val.

955  {
956  bool val = true;
957  val &= (lhs.getTrknmb() == rhs.getTrknmb() );
958  val &= (lhs.getKeyWG() == rhs.getKeyWG() );
959  return val;
960 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 962 of file DEutils.h.

References heppy_batch::val.

962  {
963  bool val = true;
964  val &= (lhs.getTrknmb() == rhs.getTrknmb() );
965  val &= (lhs.getKeyStrip() == rhs.getKeyStrip() );
966  return val;
967 }
template<>
bool DEutils< L1CSCSPStatusDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 969 of file DEutils.h.

References heppy_batch::val.

969  {
970  bool val = true;
971  val &= (lhs.slot() == rhs.slot());
972  return val;
973 }
template<typename T >
DEutils< T >::col_it DEutils< T >::de_find ( col_it  first,
col_it  last,
const cand_type value 
)

— find candidate —

Definition at line 608 of file DEutils.h.

References DEutils< T >::de_equal(), plotBeamSpotDB::first, and plotBeamSpotDB::last.

Referenced by DEutils< T >::de_type().

608  {
609  for ( ;first!=last; first++)
610  if ( de_equal(*first,value) ) break;
611  return first;
612 }
Definition: value.py:1
bool de_equal(const cand_type &, const cand_type &)
— candidate match definition —
Definition: DEutils.h:626
template<typename T >
bool DEutils< T >::de_nequal ( const cand_type lhs,
const cand_type rhs 
)

Definition at line 631 of file DEutils.h.

References DEutils< T >::de_equal().

Referenced by DEutils< T >::de_type().

631  {
632  return !de_equal(lhs,rhs);
633 }
bool de_equal(const cand_type &, const cand_type &)
— candidate match definition —
Definition: DEutils.h:626
template<typename T >
bool DEutils< T >::de_nequal_loc ( const cand_type lhs,
const cand_type rhs 
)

Definition at line 813 of file DEutils.h.

References DEutils< T >::de_equal_loc().

Referenced by DEutils< T >::de_type().

813  {
814  return !de_equal_loc(lhs,rhs);
815 }
bool de_equal_loc(const cand_type &, const cand_type &)
— candidate location-match definition —
Definition: DEutils.h:808
template<typename T>
int DEutils< T >::de_type ( ) const
inline
template<typename T >
L1DataEmulDigi DEutils< T >::DEDigi ( col_cit  itd,
col_cit  itm,
int  ctype 
)

— form de-digi —

return empty digi by default

Definition at line 57 of file DEutils.h.

Referenced by DEutils< T >::de_type().

57  {
59  return L1DataEmulDigi();
60 }
template<>
L1DataEmulDigi DEutils< EcalTrigPrimDigiCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 63 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::ETP, RecoTauDiscriminantConfiguration::mask, L1DataEmulDigi::setData(), L1DataEmulDigi::setDEpair(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

63  {
64  int cid = de_type();
65  int errt = aflag;
66  //fill data if flagged, otherwise emulator
67  double x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
68  double x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
69  L1DataEmulDigi digi(dedefs::ETP,cid, x1,x2,0, errt);
70  unsigned int dwS = (aflag==4)?0:itd->sample(itd->sampleOfInterest()).raw();
71  unsigned int ewS = (aflag==3)?0:itm->sample(itm->sampleOfInterest()).raw();
72  //dw1 &= 0x01ff; ew1 &= 0x01ff; //9-bit: fg(8),energy(7:0)
73  unsigned int mask = 0x0eff; //fg bit temporary(!) mask
74  dwS &= mask; ewS &= mask;
75  unsigned int dwI = (aflag==4)?0:itd->id().rawId();
76  unsigned int ewI = (aflag==3)?0:itm->id().rawId();
77  //dw2 &= 0xfe00ffff; ew2 &= 0xfe00ffff; //32-bit, reset unused (24:16)
78  //merge id and sample words
79  unsigned int dw = (dwI & 0xfe00ffff ) | ( (dwS & 0x000001ff)<<16 );
80  unsigned int ew = (ewI & 0xfe00ffff ) | ( (ewS & 0x000001ff)<<16 );
81  digi.setData(dw,ew);
82  int de = (aflag==4)?0:itd->compressedEt() ;
83  int ee = (aflag==3)?0:itm->compressedEt() ;
84  digi.setRank((float)de,(float)ee);
85  L1MonitorDigi dedata(dedefs::ETP,cid, itd->id().iphi(),itd->id().ieta(),0,
86  itd->compressedEt(),itd->id().rawId());
87  L1MonitorDigi deemul(dedefs::ETP,cid, itm->id().iphi(),itm->id().ieta(),0,
88  itm->compressedEt(),itm->id().rawId());
89  digi.setDEpair(dedata,deemul);
90  return digi;
91 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< HcalTrigPrimDigiCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 94 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::HTP, RecoTauDiscriminantConfiguration::mask, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

94  {
95  int cid = de_type();
96  int errt = aflag;
97  double x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
98  double x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
99  L1DataEmulDigi digi(dedefs::HTP,cid, x1,x2,0, errt);
100  unsigned int dw = (aflag==4)?0:itd->t0().raw();
101  unsigned int ew = (aflag==3)?0:itm->t0().raw();
102  //16-bit; bits 10:9 not set(?);
103  // bits 15:11 not accessible in emulator (slb/channel ids)
104  unsigned int mask = 0x01ff;
105  dw &= mask; ew &= mask;
106  digi.setData(dw,ew);
107  int de = (aflag==4)?0:itd->SOI_compressedEt();
108  int ee = (aflag==3)?0:itm->SOI_compressedEt();
109  digi.setRank((float)de,(float)ee);
110  return digi;
111 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1CaloEmCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

bits: index(17:16) iso(15) crate(14:10) + card(9:7) region(6) rank (5:0) (rank & 0x3f) + ((region & 0x1)<<6) + ((card & 0x7)<<7)

  • ((card & 0x1f)<<10) + ((0x1)<<15) + ((0x3)<<16)

Definition at line 114 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::RCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

114  {
115  int cid = de_type();
116  int errt = aflag;
117  double x1, x2, x3(0.);
118  // global index ieta (0-21), iphi (0-17), card (0-6)
119  x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
120  x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
121  x3 = (aflag!=4) ? itd->regionId().rctCard() : itm->regionId().rctCard();
122  //alternative coordinates: rctCrate(), rctCard(), index()
123  L1DataEmulDigi digi(dedefs::RCT,cid, x1,x2,x3, errt);
124  unsigned int dw = itd->raw();
125  unsigned int ew = itm->raw();
126  dw &= 0x3ff;
127  dw += (((itd->rctCrate())&0x1f)<<10);
128  dw += (((itd->isolated()?1:0)&0x1)<<15);
129  dw += (((itd->index())&0x3)<<16);
130  ew &= 0x3ff;
131  ew += (((itm->rctCrate())&0x1f)<<10);
132  ew += (((itm->isolated()?1:0)&0x1)<<15);
133  ew += (((itm->index())&0x3)<<16);
134  dw = (aflag==4)?0:dw;
135  ew = (aflag==3)?0:ew;
139  digi.setData(dw,ew);
140  int de = (aflag==4)?0:itd->rank();
141  int ee = (aflag==3)?0:itm->rank();
142  digi.setRank((float)de,(float)ee);
143  return digi;
144 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1CaloRegionCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

bits: iphi(23:19), ieta(18:14) + quiet(13), mip(12), fg(11), ovf(10), et (9:0)

Definition at line 147 of file DEutils.h.

References DEutils< T >::de_type(), RecoTauDiscriminantConfiguration::mask, dedefs::RCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

147  {
148  int cid = de_type();
149  int errt = aflag;
150  double x1, x2, x3(0.);
151  x1 = (aflag!=4) ? itd->id().iphi() : itm->id().iphi();
152  x2 = (aflag!=4) ? itd->id().ieta() : itm->id().ieta();
153  x3 = (aflag!=4) ? itd->id().rctCard() : itm->id().rctCard();
154  L1DataEmulDigi digi(dedefs::RCT,cid, x1,x2,x3, errt);
155  unsigned int dw = itd->raw();
156  unsigned int ew = itm->raw();
157  unsigned int mask = 0x3fff;
158  //mask (temporary) mip(12), quiet (13)
159  mask = 0x0fff;
160  dw &= mask;
161  dw += (((itd->id().ieta())&0x1f)<<14);
162  dw += (((itd->id().iphi())&0x1f)<<19);
163  ew &= mask;
164  ew += (((itm->id().ieta())&0x1f)<<14);
165  ew += (((itm->id().iphi())&0x1f)<<19);
166  dw = (aflag==4)?0:dw;
167  ew = (aflag==3)?0:ew;
169  digi.setData(dw,ew);
170  int de = (aflag==4)?0:itd->et();
171  int ee = (aflag==3)?0:itm->et();
172  digi.setRank((float)de,(float)ee);
173  return digi;
174 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctEmCandCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 177 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

177  {
178  int cid = de_type();
179  int errt = aflag;
180  //phi: 0..17; eta: 0..21
181  // bring it to global coordinates
182  double x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
183  double x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
184  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
185  unsigned int dw = (aflag==4)?0:itd->raw();
186  unsigned int ew = (aflag==3)?0:itm->raw();
187  dw &= 0x7fff; ew &= 0x7fff; //15-bit
188  digi.setData(dw,ew);
189  int de = (aflag==4)?0:itd->rank();
190  int ee = (aflag==3)?0:itm->rank();
191  digi.setRank((float)de,(float)ee);
192  return digi;
193 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctJetCandCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 196 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

196  {
197  int cid = de_type();
198  int errt = aflag;
199  //phi: 0..17; eta: -6..-0,+0..+6; eta sign:1(z-),0(z+)
200  // bring it to global coordinates 0..21 below
201  double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
202  unsigned deta(0), eeta(0);
203  if (!itd->isForward()) deta=(itd->etaSign()==1?10-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+11);
204  else deta=(itd->etaSign()==1? 3-(itd->etaIndex()&0x7):(itd->etaIndex()&0x7)+18 );
205  if (!itm->isForward()) eeta=(itm->etaSign()==1?10-(itm->etaIndex()&0x7):(itm->etaIndex()&0x7)+11);
206  else eeta=(itm->etaSign()==1? 3-(itm->etaIndex()&0x7):(itm->etaIndex()&0x7)+18 );
207  double x2 = (aflag!=4) ? deta : eeta;
208  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
209  unsigned int dw = (aflag==4)?0:itd->raw();
210  unsigned int ew = (aflag==3)?0:itm->raw();
211  dw &= 0x7fff; ew &= 0x7fff; //15-bit
212  digi.setData(dw,ew);
213  int de = (aflag==4)?0:itd->rank();
214  int ee = (aflag==3)?0:itm->rank();
215  digi.setRank((float)de,(float)ee);
216  return digi;
217 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctEtHadCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 220 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

220  {
221  int cid = de_type();
222  int errt = aflag;
223  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
224  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
225  unsigned int dw = (aflag==4)?0:itd->raw();
226  unsigned int ew = (aflag==3)?0:itm->raw();
227  dw &= 0x1fff; ew &= 0x1fff; //13-bit
228  digi.setData(dw,ew);
229  int de = (aflag==4)?0:itd->et();
230  int ee = (aflag==3)?0:itm->et();
231  digi.setRank((float)de,(float)ee);
232  return digi;
233 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctEtMissCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 235 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

235  {
236  int cid = de_type();
237  int errt = aflag;
238  double x1 = (aflag!=4) ? itd->phi() : itm->phi();
239  double x2 = 0; //no 'eta' associated with candidates...
240  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
241  unsigned int dw = (aflag==4)?0:itd->raw();
242  unsigned int ew = (aflag==3)?0:itm->raw();
243  dw &= 0x8f1fff; ew &= 0x8f1fff; //22-bit (bits 13,14,15 not set)
244  digi.setData(dw,ew);
245  int de = (aflag==4)?0:itd->et();
246  int ee = (aflag==3)?0:itm->et();
247  digi.setRank((float)de,(float)ee);
248  return digi;
249 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctEtTotalCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 252 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

252  {
253  int cid = de_type();
254  int errt = aflag;
255  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
256  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
257  unsigned int dw = (aflag==4)?0:itd->raw();
258  unsigned int ew = (aflag==3)?0:itm->raw();
259  dw &= 0x1fff; ew &= 0x1fff; //13-bit
260  digi.setData(dw,ew);
261  int de = (aflag==4)?0:itd->et();
262  int ee = (aflag==3)?0:itm->et();
263  digi.setRank((float)de,(float)ee);
264  return digi;
265 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctHFBitCountsCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 267 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

267  {
268  int cid = de_type();
269  int errt = aflag;
270  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
271  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
272  unsigned int dw = (aflag==4)?0:itd->raw();
273  unsigned int ew = (aflag==3)?0:itm->raw();
274  digi.setData(dw,ew);
275  int de = 0; int ee = 0; //no 'rank' associated with candidates...
276  digi.setRank((float)de,(float)ee);
277  return digi;
278 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctHFRingEtSumsCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 280 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

280  {
281  int cid = de_type();
282  int errt = aflag;
283  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
284  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
285  unsigned int dw = (aflag==4)?0:itd->raw();
286  unsigned int ew = (aflag==3)?0:itm->raw();
287  digi.setData(dw,ew);
288  int de = 0; int ee = 0; //no 'rank' associated with candidates...
289  digi.setRank((float)de,(float)ee);
290  return digi;
291 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctHtMissCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 293 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

293  {
294  int cid = de_type();
295  int errt = aflag;
296  double x1 = (aflag!=4) ? itd->phi() : itm->phi();
297  double x2 = 0; //no 'eta' associated with candidates...
298  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
299  unsigned int dw = (aflag==4)?0:itd->raw();
300  unsigned int ew = (aflag==3)?0:itm->raw();
301  dw &= 0x8f1fff; ew &= 0x8f1fff; //22-bit (bits 13,14,15 not set)
302  digi.setData(dw,ew);
303  int de = (aflag==4)?0:itd->et();
304  int ee = (aflag==3)?0:itm->et();
305  digi.setRank((float)de,(float)ee);
306  return digi;
307 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1GctJetCountsCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 310 of file DEutils.h.

References DEutils< T >::de_type(), dedefs::GCT, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

310  {
311  int cid = de_type();
312  int errt = aflag;
313  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
314  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
315  unsigned int dw = (aflag==4)?0:itd->raw0();//raw0, raw1...
316  unsigned int ew = (aflag==3)?0:itm->raw0();//raw0, raw1...
317  digi.setData(dw,ew);
318  int de = 0; int ee = 0; //no 'rank' associated with candidates...
319  digi.setRank((float)de,(float)ee);
320  return digi;
321 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1MuRegionalCandCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 324 of file DEutils.h.

References gather_cfg::cout, dedefs::CTF, DEutils< T >::de_type(), dedefs::DTF, RecoTauDiscriminantConfiguration::mask, dedefs::RPC, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

324  {
325  int sid;
326  switch(itd->type_idx()) { // 0 DT, 1 bRPC, 2 CSC, 3 fRPC
327  case 0: sid=dedefs::DTF; break;
328  case 1: sid=dedefs::RPC; break;
329  case 2: sid=dedefs::CTF; break;
330  case 3: sid=dedefs::RPC; break;
331  default: sid=-1;
332  }
333  int cid = de_type();
334  int errt = aflag;
335  //double x1 = (aflag!=4) ? itd->phiValue() : itm->phiValue();
336  //double x2 = (aflag!=4) ? itd->etaValue() : itm->etaValue();
337  double x1 = (aflag!=4) ? itd->phi_packed() : itm->phi_packed();
338  double x2 = (aflag!=4) ? itd->eta_packed() : itm->eta_packed();
339  L1DataEmulDigi digi(sid,cid, x1,x2,0, errt);
340  unsigned int dw = (aflag==4)?0 : itd->getDataWord();
341  unsigned int ew = (aflag==3)?0 : itm->getDataWord();
342  unsigned int mask = 0xffffffff; //32-bit
343  //RPC: mask bits 25-29 (including synch bits)
344  // emulator doesn't set these bits (permanent masking)
345  if(sid==dedefs::RPC)
346  mask &= 0xc1ffffff;
347  dw &= mask; ew &= mask;
348  digi.setData(dw,ew);
349  int de = (aflag==4)?0:itd->pt_packed();//ptValue();
350  int ee = (aflag==3)?0:itm->pt_packed();//ptValue();
351  digi.setRank((float)de,(float)ee);
352  //note: phi,eta,pt 'values' not always set for all muon tf systems
353  //(under discussion) need universal mechanism for setting up physical units
354  if(false) //check print
355  std::cout << "L1DataEmulDigi DEutils<L1MuRegionalCandCollection>] dedigi info"
356  //<< " phivalue:" << itd->phiValue() << "," << itm->phiValue()
357  //<< " etavalue:" << itd->etaValue() << "," << itm->etaValue()
358  << " phipackd:" << itd->phi_packed() << "," << itm->phi_packed()
359  << " etapackd:" << itd->eta_packed() << "," << itm->eta_packed()
360  << std::endl;
361  return digi;
362 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1MuGMTCandCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 365 of file DEutils.h.

References gather_cfg::cout, DEutils< T >::de_type(), TauDecayModes::dec, dedefs::GMT, RecoTauDiscriminantConfiguration::mask, L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

365  {
366  int cid = de_type();
367  int errt = aflag;
368  //double x1 = (aflag!=4) ? itd->phiValue() : itm->phiValue();
369  //double x2 = (aflag!=4) ? itd->etaValue() : itm->etaValue();
370  double x1 = (aflag!=4) ? itd->phiIndex() : itm->phiIndex();
371  double x2 = (aflag!=4) ? itd->etaIndex() : itm->etaIndex();
372  L1DataEmulDigi digi(dedefs::GMT,cid, x1,x2,0, errt);
373  unsigned int dw = (aflag==4)?0 : itd->getDataWord();
374  unsigned int ew = (aflag==3)?0 : itm->getDataWord();
375  unsigned int mask = 0x3ffffff; //26-bit
376  //mask bits 22 (isolation), 23 (mip) [not permanent!]
377  mask &= (~(0x0c00000));
378  dw &= mask; ew &= mask;
379  digi.setData(dw,ew);
380  int de = (aflag==4)?0:itd->ptIndex();//ptValue();
381  int ee = (aflag==3)?0:itm->ptIndex();//ptValue();
382  digi.setRank((float)de,(float)ee);
383  if(false) //check print
384  std::cout << "l1dataemuldigi l1mugmtcandcoll type:" << cid
385  //<< " eta:" << itd->etaValue() << ", " << itm->etaValue()
386  //<< " phi:" << itd->phiValue() << ", " << itm->phiValue()
387  << std::hex << " word d:" << dw << "e:" << ew << std::dec
388  << std::endl;
389  return digi;
390 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1MuDTChambPhDigiCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 393 of file DEutils.h.

References DEutils< T >::de_type(), runTauDisplay::dr, dedefs::DTP, L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

393  {
394  int cid = de_type();
395  int errt = aflag;
396  double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
397  double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
398  double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
399  L1DataEmulDigi digi(dedefs::DTP,cid, x1,x2,x3, errt);
400  //other coordinate methods phi(), phiB()
401  //note: no data word defined for candidate
402  int dr = (aflag==4)?0:itd->code();
403  int er = (aflag==3)?0:itm->code();
404  digi.setRank((float)dr,(float)er);
405  return digi;
406 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< L1MuDTChambThDigiCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 409 of file DEutils.h.

References DEutils< T >::de_type(), runTauDisplay::dr, dedefs::DTP, mps_fire::i, L1DataEmulDigi::setRank(), globals_cff::x1, and globals_cff::x2.

409  {
410  int cid = de_type();
411  int errt = aflag;
412  double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
413  double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
414  double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
415  L1DataEmulDigi digi(dedefs::DTP,cid, x1,x2,x3, errt);
416  //note: no data word defined for candidate
417  int dr(0), er(0);
418  for(int i=0; i<7;i++){
419  if(itd->code(i)>=dr) dr=itd->quality(i);
420  if(itm->code(i)>=er) er=itm->quality(i);
421  }
422  //alternatives: code() = quality() + positions()
423  dr = (aflag==4)?0:dr;
424  er = (aflag==3)?0:er;
425  digi.setRank((float)dr,(float)er);
426  return digi;
427 }
int de_type() const
Definition: DEutils.h:37
template<>
L1DataEmulDigi DEutils< CSCCorrelatedLCTDigiCollection_ >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 431 of file DEutils.h.

References DEutils< T >::de_type(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), edm::shift, globals_cff::x1, and globals_cff::x2.

431  {
432  int cid = de_type();
433  int errt = aflag;
434  double x1 = (aflag!=4) ? itd->getStrip() : itm->getStrip();
435  double x2 = (aflag!=4) ? itd->getKeyWG() : itm->getKeyWG();
436  double x3 = (aflag!=4) ? itd->getTrknmb(): itm->getTrknmb();
437  //multiple subsystem ctp,ctf
438  L1DataEmulDigi digi(-1,cid, x1,x2,x3, errt);
439  int dq = (aflag==4)?0:itd->getQuality();
440  int eq = (aflag==3)?0:itm->getQuality();
441  digi.setRank((float)dq,(float)eq);
442  // Pack LCT digi members into 32-bit data words.
443  static const int kValidBitWidth = 1; // Reverse the order of the 1st
444  static const int kQualityBitWidth = 4; // frame to keep the valid bit
445  static const int kPatternBitWidth = 4; // first and quality second, as
446  static const int kWireGroupBitWidth = 7; // is done in ALCT and CLCT.
447  static const int kHalfstripBitWidth = 8;
448  static const int kBendBitWidth = 1;
449  static const int kBxBitWidth = 1;
450  // Use sync_err and bx0_local bits to store MPC link.
451  static const int kMPCLinkBitWidth = 2;
452  static const int kCSCIdBitWidth = 4;
453  // While packing, check that the right number of bits is retained.
454  unsigned shift = 0, dw = 0, ew = 0;
455  dw = itd->isValid() & ((1<<kValidBitWidth)-1);
456  dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
457  (shift += kValidBitWidth);
458  dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
459  (shift += kQualityBitWidth);
460  dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
461  (shift += kPatternBitWidth);
462  dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
463  (shift += kWireGroupBitWidth);
464  dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
465  (shift += kHalfstripBitWidth);
466  dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
467  (shift += kBendBitWidth);
468  dw += (itd->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
469  (shift += kBxBitWidth);
470  dw += (itd->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
471  (shift += kMPCLinkBitWidth);
472  shift = 0;
473  ew = itm->isValid() & ((1<<kValidBitWidth)-1);
474  ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
475  (shift += kValidBitWidth);
476  ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
477  (shift += kQualityBitWidth);
478  ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
479  (shift += kPatternBitWidth);
480  ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
481  (shift += kWireGroupBitWidth);
482  ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
483  (shift += kHalfstripBitWidth);
484  ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
485  (shift += kBendBitWidth);
486  ew += (itm->getMPCLink() & ((1<<kMPCLinkBitWidth)-1)) <<
487  (shift += kBxBitWidth);
488  ew += (itm->getCSCID() & ((1<<kCSCIdBitWidth)-1)) <<
489  (shift += kMPCLinkBitWidth);
490  digi.setData(dw, ew);
491  return digi;
492 }
int de_type() const
Definition: DEutils.h:37
static unsigned int const shift
template<>
L1DataEmulDigi DEutils< CSCALCTDigiCollection_ >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 495 of file DEutils.h.

References dedefs::CTP, DEutils< T >::de_type(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), edm::shift, and globals_cff::x2.

495  {
496  int cid = de_type();
497  int errt = aflag;
498  double x2 = (aflag!=4) ? itd->getKeyWG () : itm->getKeyWG ();
499  double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
500  L1DataEmulDigi digi(dedefs::CTP,cid, 0,x2,x3, errt);
501  int dq = (aflag==4)?0:itd->getQuality();
502  int eq = (aflag==3)?0:itm->getQuality();
503  digi.setRank((float)dq,(float)eq);
504  // Pack anode digi members into 17-bit data words.
505  static const int kValidBitWidth = 1;
506  static const int kQualityBitWidth = 2;
507  static const int kAccelBitWidth = 1;
508  static const int kPatternBBitWidth = 1;
509  static const int kWireGroupBitWidth = 7;
510  static const int kBxBitWidth = 5;
511  // While packing, check that the right number of bits is retained.
512  unsigned shift = 0, dw = 0, ew = 0;
513  dw = itd->isValid() & ((1<<kValidBitWidth)-1);
514  dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
515  (shift += kValidBitWidth);
516  dw += (itd->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
517  (shift += kQualityBitWidth);
518  dw += (itd->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
519  (shift += kAccelBitWidth);
520  dw += (itd->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
521  (shift += kPatternBBitWidth);
522  dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
523  (shift += kWireGroupBitWidth);
524  shift = 0;
525  ew = itm->isValid() & ((1<<kValidBitWidth)-1);
526  ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
527  (shift += kValidBitWidth);
528  ew += (itm->getAccelerator() & ((1<<kAccelBitWidth)-1)) <<
529  (shift += kQualityBitWidth);
530  ew += (itm->getCollisionB() & ((1<<kPatternBBitWidth)-1)) <<
531  (shift += kAccelBitWidth);
532  ew += (itm->getKeyWG() & ((1<<kWireGroupBitWidth)-1)) <<
533  (shift += kPatternBBitWidth);
534  ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
535  (shift += kWireGroupBitWidth);
536  digi.setData(dw, ew);
537  return digi;
538 }
int de_type() const
Definition: DEutils.h:37
static unsigned int const shift
template<>
L1DataEmulDigi DEutils< CSCCLCTDigiCollection_ >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 540 of file DEutils.h.

References dedefs::CTP, DEutils< T >::de_type(), Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), edm::shift, and globals_cff::x1.

540  {
541  int cid = de_type();
542  int errt = aflag;
543  double x1 = (aflag!=4) ? itd->getKeyStrip() : itm->getKeyStrip();
544  double x3 = (aflag!=4) ? itd->getTrknmb() : itm->getTrknmb();
545  L1DataEmulDigi digi(dedefs::CTP,cid, x1,0,x3, errt);
546  int dq = (aflag==4)?0:itd->getQuality();
547  int eq = (aflag==3)?0:itm->getQuality();
548  digi.setRank((float)dq,(float)eq);
549  // Pack cathode digi members into 19-bit data words.
550  static const int kValidBitWidth = 1;
551  static const int kQualityBitWidth = 3;
552  static const int kPatternBitWidth = 4;
553  static const int kBendBitWidth = 1;
554  static const int kHalfstripBitWidth = 5;
555  static const int kCFEBBitWidth = 3;
556  static const int kBxBitWidth = 2;
557  // While packing, check that the right number of bits is retained.
558  unsigned shift = 0, dw = 0, ew = 0;
559  dw = itd->isValid() & ((1<<kValidBitWidth)-1);
560  dw += (itd->getQuality() & ((1<<kQualityBitWidth)-1)) <<
561  (shift += kValidBitWidth);
562  dw += (itd->getPattern() & ((1<<kPatternBitWidth)-1)) <<
563  (shift += kQualityBitWidth);
564  dw += (itd->getBend() & ((1<<kBendBitWidth)-1)) <<
565  (shift += kPatternBitWidth);
566  dw += (itd->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
567  (shift += kBendBitWidth);
568  dw += (itd->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
569  (shift += kHalfstripBitWidth);
570  dw += (itd->getBX() & ((1<<kBxBitWidth)-1)) <<
571  (shift += kCFEBBitWidth);
572  shift = 0;
573  ew = itm->isValid() & ((1<<kValidBitWidth)-1);
574  ew += (itm->getQuality() & ((1<<kQualityBitWidth)-1)) <<
575  (shift += kValidBitWidth);
576  ew += (itm->getPattern() & ((1<<kPatternBitWidth)-1)) <<
577  (shift += kQualityBitWidth);
578  ew += (itm->getBend() & ((1<<kBendBitWidth)-1)) <<
579  (shift += kPatternBitWidth);
580  ew += (itm->getStrip() & ((1<<kHalfstripBitWidth)-1)) <<
581  (shift += kBendBitWidth);
582  ew += (itm->getCFEB() & ((1<<kCFEBBitWidth)-1)) <<
583  (shift += kHalfstripBitWidth);
584  ew += (itm->getBX() & ((1<<kBxBitWidth)-1)) <<
585  (shift += kCFEBBitWidth);
586  digi.setData(dw, ew);
587  return digi;
588 }
int de_type() const
Definition: DEutils.h:37
static unsigned int const shift
template<>
L1DataEmulDigi DEutils< L1CSCSPStatusDigiCollection_ >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 591 of file DEutils.h.

References dedefs::CTF, DEutils< T >::de_type(), and globals_cff::x1.

591  {
592  int cid = de_type();
593  int errt = aflag;
594  double x1; //sector/slot
595  x1 = (aflag!=4) ? itd->slot() : itm->slot();
596  //sector-slot map to be in principle to be provided from event setup
597  //int de_cscstatus_slot2sector[22] =
598  // {0,0,0,0,0, 0,1,2,3,4, 5,6,0,0,0, 0,7,8,9,10, 11,12};
599  //x1 = (aflag!=4) ? slot2sector[itd->slot()] : slot2sector[itm->slot()];
600  L1DataEmulDigi digi(dedefs::CTF,cid, x1,0,0, errt);
601  //note: no data word and rank defined for candidate
602  return digi;
603 }
int de_type() const
Definition: DEutils.h:37
template<typename T >
std::string DEutils< T >::GetName ( int  i = 0) const

— name candidate —

Definition at line 1371 of file DEutils.h.

References dedefs::CSCsta, dedefs::CSCtpa, dedefs::CSCtpc, dedefs::CSCtpl, DEutils< T >::de_type(), dedefs::DTtpPh, dedefs::DTtpTh, dedefs::ECALtp, dedefs::GCTcenjets, dedefs::GCTethad, dedefs::GCTetmiss, dedefs::GCTettot, dedefs::GCTforjets, dedefs::GCThfbit, dedefs::GCThfring, dedefs::GCThtmiss, dedefs::GCTisolaem, dedefs::GCTisotaujets, dedefs::GCTnoisoem, dedefs::GCTtaujets, dedefs::GMTcnd, dedefs::GMTrdt, dedefs::GTdword, dedefs::HCALtp, mps_fire::i, dedefs::LTCi, dedefs::MUrtf, dedefs::RCTem, dedefs::RCTrgn, harvestTrackValidationPlots::str, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by DEutils< T >::de_type().

1371  {
1372 
1373  const int nlabel = 17;
1374  if(!(i<nlabel))
1375  return "un-defined" ;
1376  std::string str[nlabel]= {"un-registered"};
1377 
1378  switch(de_type()) {
1379  case dedefs::ECALtp:
1380  str[0] = "ECAL tp";
1381  str[1] = "EcalTrigPrimDigiCollection";
1382  str[2] = "EcalTriggerPrimitiveDigi";
1383  break;
1384  case dedefs::HCALtp:
1385  str[0] = "HCAL tp";
1386  str[1] = "HcalTrigPrimDigiCollection";
1387  str[2] = "HcalTriggerPrimitiveDigi";
1388  break;
1389  case dedefs::RCTem:
1390  str[0] = "RCT em";
1391  str[1] = "L1CaloEmCollection";
1392  str[2] = "L1CaloEmCand";
1393  break;
1394  case dedefs::RCTrgn:
1395  str[0] = "RCT region";
1396  str[1] = "L1CaloRegionCollection";
1397  str[2] = "L1CaloRegion";
1398  break;
1399  case dedefs::GCTisolaem:
1400  str[0] = "GCT em isolated";
1401  str[1] = "L1GctEmCandCollection";
1402  str[2] = "L1GctEmCand";
1403  break;
1404  case dedefs::GCTnoisoem:
1405  str[0] = "GCT em non-isolated";
1406  str[1] = "L1GctEmCandCollection";
1407  str[2] = "L1GctEmCand";
1408  break;
1409  case dedefs::GCTcenjets:
1410  str[0] = "GCT central jet";
1411  str[1] = "L1GctJetCandCollection";
1412  str[2] = "L1GctJetCand";
1413  break;
1414  case dedefs::GCTforjets:
1415  str[0] = "GCT forward jet";
1416  str[1] = "L1GctJetCandCollection";
1417  str[2] = "L1GctJetCand";
1418  break;
1419  case dedefs::GCTtaujets:
1420  str[0] = "GCT tau jet";
1421  str[1] = "L1GctJetCandCollection";
1422  str[2] = "L1GctJetCand";
1423  break;
1424  case dedefs::GCTisotaujets:
1425  str[0] = "Stage1Layer2 iso-tau jet";
1426  str[1] = "L1GctJetCandCollection";
1427  str[2] = "L1GctJetCand";
1428  break;
1429  case dedefs::GCTethad:
1430  str[0] = "GCT ht";
1431  str[1] = "L1GctEtHadCollection";
1432  str[2] = "L1GctEtHad";
1433  break;
1434  case dedefs::GCTetmiss:
1435  str[0] = "GCT et miss";
1436  str[1] = "L1GctEtMissCollection";
1437  str[2] = "L1GctEtMiss";
1438  break;
1439  case dedefs::GCTettot:
1440  str[0] = "GCT et total";
1441  str[1] = "L1GctEtTotalCollection";
1442  str[2] = "L1GctEtTotal";
1443  break;
1444  case dedefs::GCThtmiss:
1445  str[0] = "GCT ht miss";
1446  str[1] = "L1GctHtMissCollection";
1447  str[2] = "L1GctHtMiss";
1448  break;
1449  case dedefs::GCThfring:
1450  str[0] = "GCT hf ring";
1451  str[1] = "L1GctHFRingEtSumsCollection";
1452  str[2] = "L1GctHFRingEtSums";
1453  break;
1454  case dedefs::GCThfbit:
1455  str[0] = "GCT hf bit counts";
1456  str[1] = "L1GctHFBitCountsCollection";
1457  str[2] = "L1GctHFBitCounts";
1458  break;
1459 
1460  case dedefs::DTtpPh:
1461  str[0] = "DT tp phi";
1462  str[1] = "L1MuDTChambPhDigiCollection";
1463  str[2] = "L1MuDTChambPhDigi";
1464  break;
1465  case dedefs::DTtpTh:
1466  str[0] = "DT tp theta";
1467  str[1] = "L1MuDTChambThDigiCollection";
1468  str[2] = "L1MuDTChambThDigi";
1469  break;
1470  case dedefs::CSCtpa:
1471  str[0] = "CSC tpa";
1472  str[1] = "CSCALCTDigiCollection";
1473  str[2] = "CSCALCTDigi";
1474  break;
1475  case dedefs::CSCtpc:
1476  str[0] = "CSC tpc";
1477  str[1] = "CSCCLCTDigiCollection";
1478  str[2] = "CSCCLCTDigi";
1479  break;
1480  case dedefs::CSCtpl:
1481  str[0] = "CSC tp";
1482  str[1] = "CSCCorrelatedLCTDigiCollection";
1483  str[2] = "CSCCorrelatedLCTDigi";
1484  break;
1485  case dedefs::CSCsta:
1486  str[0] = "CSC tf status";
1487  str[1] = "L1CSCSPStatusDigiCollection_";
1488  str[2] = "L1CSCSPStatusDigi";
1489  break;
1490  case dedefs::MUrtf:
1491  str[0] = "Mu reg tf";
1492  str[1] = "L1MuRegionalCandCollection";
1493  str[2] = "L1MuRegionalCand";
1494  break;
1495  case dedefs::LTCi:
1496  str[0] = "LTC";
1497  str[1] = "LTCDigiCollection";
1498  str[2] = "LTCDigi";
1499  break;
1500  case dedefs::GMTcnd:
1501  str[0] = "GMT cand";
1502  str[1] = "L1MuGMTCandCollection";
1503  str[2] = "L1MuGMTCand";
1504  break;
1505  case dedefs::GMTrdt:
1506  str[0] = "GMT record";
1507  str[1] = "L1MuGMTReadoutRecordCollection";
1508  str[2] = "L1MuGMTReadoutRecord";
1509  break;
1510  case dedefs::GTdword:
1511  str[0] = "";
1512  str[1] = "";
1513  str[2] = "";
1514  break;
1515  //default:
1516  }
1517  return str[i];
1518 }
int de_type() const
Definition: DEutils.h:37
template<typename T >
bool DEutils< T >::is_empty ( col_cit  it) const

— candidate emptiness definition —

Definition at line 978 of file DEutils.h.

Referenced by dirstructure.Directory::__repr__(), DEutils< T >::de_type(), and utils_v2.StatisticalTest::do_test().

978  {
979  //declare candidate non-empty by default
980  return false;
981 }
template<>
bool DEutils< EcalTrigPrimDigiCollection >::is_empty ( col_cit  it) const
inline

Definition at line 984 of file DEutils.h.

References RecoTauDiscriminantConfiguration::mask, and heppy_batch::val.

984  {
985  bool val = false;
986  unsigned int raw = it->sample(it->sampleOfInterest()).raw();
987  unsigned int mask = 0x0fff;
988  mask = 0x0eff; //fg bit temporary(!) mask
989  raw &= mask;
990  val |= (raw==0);
991  if(val) return val;
992  unsigned int ttf = it->ttFlag();
993  val |= ((ttf!=0x1) && (ttf!=0x3)); //compare only if ttf is 1 or 3
994  return val;
995  // return ( it->size()==0 || it->sample(it->sampleOfInterest()).raw()==0);
996 }
template<>
bool DEutils< HcalTrigPrimDigiCollection >::is_empty ( col_cit  it) const
inline

Definition at line 999 of file DEutils.h.

References RecoTauDiscriminantConfiguration::mask.

999  {
1000  unsigned int mask = 0x01ff;
1001  return ( it->size()==0 || ((it->t0().raw()&mask)==0) || it->SOI_compressedEt()==0 );
1002 }
template<>
bool DEutils< L1CaloEmCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1005 of file DEutils.h.

1005  {
1006  return ((it->rank())==0);
1007  //return it->empty();
1008 }
template<>
bool DEutils< L1CaloRegionCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1011 of file DEutils.h.

1011  {
1012  return ((it->et())==0);
1013  //return it->empty();
1014 }
template<>
bool DEutils< L1GctEmCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1017 of file DEutils.h.

1017  {
1018  return (it->empty());
1019 }
template<>
bool DEutils< L1GctJetCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1022 of file DEutils.h.

1022  {
1023  return (it->empty());
1024 }
template<>
bool DEutils< L1GctEtHadCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1026 of file DEutils.h.

1026 {return(it->empty());}
template<>
bool DEutils< L1GctEtMissCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1027 of file DEutils.h.

1027 {return(it->empty());}
template<>
bool DEutils< L1GctEtTotalCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1028 of file DEutils.h.

1028 {return(it->empty());}
template<>
bool DEutils< L1GctHtMissCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1029 of file DEutils.h.

1029 {return(it->empty());}
template<>
bool DEutils< L1GctHFRingEtSumsCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1030 of file DEutils.h.

1030 {return(it->empty());}
template<>
bool DEutils< L1GctHFBitCountsCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1031 of file DEutils.h.

1031 {return(it->empty());}
template<>
bool DEutils< L1GctJetCountsCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1032 of file DEutils.h.

1032 {return(it->empty());}
template<>
bool DEutils< L1MuDTChambPhDigiCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1036 of file DEutils.h.

1036  {
1037  return (it->bxNum() != 0 || it->code() == 7);
1038  //return (it->qualityCode() == 7);
1039  //return false;
1040 }
template<>
bool DEutils< L1MuDTChambThDigiCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1042 of file DEutils.h.

1042  {
1043  return (it->whNum()==0 && it->scNum()==0 && it->stNum()==0);//tmp!
1044  //return false;
1045 }
template<>
bool DEutils< L1MuRegionalCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1048 of file DEutils.h.

1048  {
1049  //note: following call used to give trouble sometimes
1050 
1051  //restrict further processing to bx==0 for RPC
1052  if(it->type_idx()==1 || it->type_idx()==3) //rpc
1053  if (it->bx()!=0)
1054  return true;
1055 
1056  return (it->empty());
1057  //virtual bool empty() const { return readDataField( PT_START, PT_LENGTH) == 0; }
1058  //return (it->getDataWord()==0);
1059  //return (it->pt_packed()==0);
1060 }
template<>
bool DEutils< L1MuGMTCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1063 of file DEutils.h.

1063  {
1064  return (it->empty());
1065  //return (it->ptIndex()==0);
1066  //return (it->getDataWord()==0);
1067 }
template<>
bool DEutils< CSCCorrelatedLCTDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1070 of file DEutils.h.

1070  {
1071  return !(it->isValid());
1072 }
template<>
bool DEutils< CSCALCTDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1074 of file DEutils.h.

1074  {
1075  return !(it->isValid());
1076 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1078 of file DEutils.h.

1078  {
1079  return !(it->isValid());
1080 }
template<>
bool DEutils< L1CSCSPStatusDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1083 of file DEutils.h.

References data.

1083  {
1084  unsigned data =
1085  it->slot() | it->BXN () | it->FMM () | it->SEs () |
1086  it->SMs () | it->BXs () | it->AFs () | it->VPs ();
1087  return data==0;
1088 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<typename T >
std::string DEutils< T >::print ( col_cit  it) const

— print candidate —

Definition at line 1093 of file DEutils.h.

Referenced by DEutils< T >::de_type().

1093  {
1094  std::stringstream ss;
1095  ss << "[DEutils<T>::print()] specialization still missing for collection!";
1096  //ss << *it; // default
1097  ss << std::endl;
1098  return ss.str();
1099 }
template<>
std::string DEutils< EcalTrigPrimDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1102 of file DEutils.h.

References TauDecayModes::dec, and EcalBarrel.

1102  {
1103  std::stringstream ss;
1104  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex
1105  << it->sample(it->sampleOfInterest()).raw()
1106  << std::setfill(' ') << std::dec
1107  << ", et:" << std::setw(3) << it->compressedEt()
1108  << ", fg:" << std::setw(1) << it->fineGrain()
1109  << ", ttf:" << std::setw(2) << it->ttFlag()
1110  << ", sdet:" << ((it->id().subDet()==EcalBarrel)?("Barrel"):("Endcap"))
1111  << ", iz:" << ((it->id().zside()>0)?("+"):("-"))
1112  << ", ieta:" << std::setw(2) << it->id().ietaAbs()
1113  << ", iphi:" << std::setw(2) << it->id().iphi()
1114  //<< "\n\t: " << *it
1115  << std::endl;
1116  return ss.str();
1117 }
template<>
std::string DEutils< HcalTrigPrimDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1120 of file DEutils.h.

References TauDecayModes::dec.

1120  {
1121  std::stringstream ss;
1122  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex
1123  << it->t0().raw()
1124  << std::setfill(' ') << std::dec
1125  << ", et:" << std::setw(3) << it->SOI_compressedEt()
1126  << ", fg:" << std::setw(1) << it->SOI_fineGrain()
1127  << ", sdet:" << it->id().subdet()
1128  << ", iz:" << ((it->id().zside()>0)?("+"):("-"))
1129  << ", ieta:" << std::setw(2) << it->id().ietaAbs()
1130  << ", iphi:" << std::setw(2) << it->id().iphi()
1131  << std::endl;
1132  //ss << *it << std::endl;
1133  return ss.str();
1134 }
template<>
std::string DEutils< L1CaloEmCollection >::print ( col_cit  it) const
inline

Definition at line 1137 of file DEutils.h.

References TauDecayModes::dec.

1137  {
1138  std::stringstream ss;
1139  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex << it->raw()
1140  << ", rank=0x"<< std::setw(2) << std::hex << it->rank()
1141  << std::setfill(' ') << std::dec
1142  << ", region:"<< std::setw(1) << it->rctRegion()
1143  << ", card:" << std::setw(1) << it->rctCard()
1144  << ", crate:" << std::setw(2) << it->rctCrate()
1145  << ", ieta:" << std::setw(2) << it->regionId().ieta() //0..21
1146  << ", iphi:" << std::setw(2) << it->regionId().iphi() //0..17
1147  //<< ", eta:" << std::setw(2) << it->regionId().rctEta() //0..10
1148  //<< ", phi:" << std::setw(2) << it->regionId().rctPhi() //0..1
1149  << ", iso:" << std::setw(1) << it->isolated()
1150  << ", index:" << std::setw(1) << it->index()
1151  << ", bx:" << it->bx()
1152  << std::endl;
1153  //ss << *it;
1154  return ss.str();
1155 }
template<>
std::string DEutils< L1CaloRegionCollection >::print ( col_cit  it) const
inline

Definition at line 1158 of file DEutils.h.

References TauDecayModes::dec.

1158  {
1159  std::stringstream ss;
1160  ss << "L1CaloRegion:"
1161  << " et=" << it->et()
1162  << " o/f=" << it->overFlow()
1163  << " f/g=" << it->fineGrain()
1164  << " tau=" << it->tauVeto()
1165  << " rct(crate=" << it->rctCrate()
1166  << " card=" << it->rctCard()
1167  << " rgn=" << it->rctRegionIndex()
1168  << " eta=" << it->rctEta()
1169  << " phi=" << it->rctPhi()
1170  << ")\n\t\t"
1171  << "gct(eta=" << it->gctEta()
1172  << " phi=" << it->gctPhi()
1173  << ")"
1174  << std::hex << " cap_block=" << it->capBlock()
1175  << std::dec << " index=" << it->capIndex()
1176  << " bx=" << it->bx()
1177  << std::endl;
1178  //ss << *it; ///replace due to too long unformatted verbose
1179  //note: raw() data accessor missing in dataformats
1180  return ss.str();
1181 }
template<>
std::string DEutils< L1GctEmCandCollection >::print ( col_cit  it) const
inline

Definition at line 1184 of file DEutils.h.

References TauDecayModes::dec.

1184  {
1185  std::stringstream ss;
1186  //get rct index
1187  //int ieta = (it->etaIndex()&0x7); ieta = it->etaSign() ? 10-ieta:11+ieta;
1188  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex << it->raw()
1189  << ", rank=0x"<< std::setw(2) << std::hex << it->rank()
1190  << std::setfill(' ') << std::dec
1191  << ", etaSign:" << it->etaSign()
1192  << ", eta:" << (it->etaIndex()&0x7) //0..6
1193  << ", phi:" << std::setw(2) << it->phiIndex() //0..17
1194  << " (ieta:" << std::setw(2) << it->regionId().ieta() //0..21
1195  << ",iphi:" << std::setw(2) << it->regionId().iphi() << ")" //0..17
1196  << ", iso:" << it->isolated()
1197  << ", cap block:" << std::setw(3) << it->capBlock()
1198  << ", index:" << it->capIndex()
1199  << ", bx:" << it->bx()
1200  << std::endl;
1201  //<< " " << *it << std::dec << std::endl;
1202  return ss.str();
1203 }
template<>
std::string DEutils< L1GctJetCandCollection >::print ( col_cit  it) const
inline

Definition at line 1213 of file DEutils.h.

References TauDecayModes::dec.

1213  {
1214  std::stringstream ss;
1215  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex << it->raw()
1216  << " " << *it << std::dec << std::endl;
1217  return ss.str();
1218 }
template<>
std::string DEutils< L1GctEtHadCollection >::print ( col_cit  it) const
inline

Definition at line 1219 of file DEutils.h.

1219 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1GctEtMissCollection >::print ( col_cit  it) const
inline

Definition at line 1220 of file DEutils.h.

1220 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1GctEtTotalCollection >::print ( col_cit  it) const
inline

Definition at line 1221 of file DEutils.h.

1221 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1GctHtMissCollection >::print ( col_cit  it) const
inline

Definition at line 1222 of file DEutils.h.

1222 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1GctHFRingEtSumsCollection >::print ( col_cit  it) const
inline

Definition at line 1223 of file DEutils.h.

1223 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1GctHFBitCountsCollection >::print ( col_cit  it) const
inline

Definition at line 1224 of file DEutils.h.

1224 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1GctJetCountsCollection >::print ( col_cit  it) const
inline

Definition at line 1225 of file DEutils.h.

1225 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1MuDTChambPhDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1228 of file DEutils.h.

1228  {
1229  std::stringstream ss;
1230  ss << ""
1231  << " bxNum:" << it->bxNum()
1232  << " whNum:" << it->whNum()
1233  << " scNum:" << it->scNum()
1234  << " stNum:" << it->stNum()
1235  << " phi:" << it->phi()
1236  << " phiB:" << it->phiB()
1237  << " code:" << it->code()
1238  << " Ts2Tag:" << it->Ts2Tag()
1239  << " BxCnt:" << it->BxCnt()
1240  << std::endl;
1241  //nb: operator << not implemented in base class L1MuDTChambPhDigi
1242  return ss.str();
1243 }
template<>
std::string DEutils< L1MuDTChambThDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1246 of file DEutils.h.

1246  {
1247  std::stringstream ss;
1248  ss << ""
1249  << " bxNum:" << it->bxNum()
1250  << " whNum:" << it->whNum()
1251  << " scNum:" << it->scNum()
1252  << " stNum:" << it->stNum()
1253  << std::endl;
1254  //nb: operator << not implemented in base class L1MuDTChambThDigi
1255  return ss.str();
1256 }
template<>
std::string DEutils< L1MuRegionalCandCollection >::print ( col_cit  it) const
inline

Definition at line 1259 of file DEutils.h.

References TauDecayModes::dec, and alignBH_cfg::fixed.

1259  {
1260  std::stringstream ss;
1261  //const float noval = -10; //L1MuRegionalCand::m_invalidValue;
1262  ss << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right | std::ios::adjustfield);
1263  ss << std::hex << std::setfill('0')
1264  << " 0x" << std::setw(8) << it->getDataWord();
1265  //if(it->phiValue()==noval || it->etaValue()==noval || it->ptValue()==noval )
1266  ss << std::hex << std::setfill('0')
1267  << " pt:0x" << std::setw(2) << it->pt_packed()
1268  << " phi:0x"<< std::setw(2) << it->phi_packed()
1269  << " eta:0x"<< std::setw(2) << it->eta_packed();
1270  //else
1271  // ss << std::dec << std::setfill(' ')
1272  // << " pt:" << std::setw(5) << std::setprecision(1) << it->ptValue() <<"[GeV]"
1273  // << " phi:" << std::setw(5) << std::setprecision(3) << it->phiValue()<<"[rad]"
1274  // << " eta:" << std::setw(6) << std::setprecision(3) << it->etaValue();
1275  ss << std::dec << std::setfill(' ')
1276  << " qua:" << std::setw(1) << it->quality()
1277  << " cha:" << std::setw(2) << it->chargeValue()
1278  << " chav:" << std::setw(1) << it->chargeValid()
1279  << " fh:" << std::setw(1) << it->isFineHalo()
1280  << " bx:" << std::setw(4) << it->bx()
1281  << " [id:" << std::setw(1) << it->type_idx() << "]" // 0 DT, 1 bRPC, 2 CSC, 3 fRPC
1282  << std::endl;
1283  //ss << it->print()
1284  return ss.str();
1285 }
template<>
std::string DEutils< L1MuGMTCandCollection >::print ( col_cit  it) const
inline

Definition at line 1288 of file DEutils.h.

References TauDecayModes::dec, and alignBH_cfg::fixed.

1288  {
1289  std::stringstream ss;
1290  ss << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right | std::ios::adjustfield);
1291  //const float noval = -10; //L1MuGMTCand::m_invalidValue;
1292  ss << std::hex << std::setfill('0')
1293  << " 0x" << std::setw(7) << it->getDataWord();
1294  //if(it->phiValue()==noval || it->etaValue()==noval || it->ptValue()==noval)
1295  ss << std::hex << std::setfill('0')
1296  << " pt:0x" << std::setw(2) << it->ptIndex()
1297  << " eta:0x"<< std::setw(2) << it->etaIndex()
1298  << " phi:0x"<< std::setw(3) << it->phiIndex();
1299  //else
1300  // ss << std::dec << std::setfill(' ')
1301  // << " pt:" << std::setw(5) << std::setprecision(1) << it->ptValue() <<"[GeV]"
1302  // << " phi:" << std::setw(5) << std::setprecision(3) << it->phiValue()<<"[rad]"
1303  // << " eta:" << std::setw(6) << std::setprecision(2) << it->etaValue();
1304  ss << std::dec << std::setfill(' ')
1305  << " cha:" << std::setw(2) << it->charge()
1306  << " qua:" << std::setw(3) << it->quality()
1307  << " iso:" << std::setw(1) << it->isol()
1308  << " mip:" << std::setw(1) << it->mip()
1309  << " bx:" << it->bx()
1310  << std::endl;
1311  //ss << it->print()
1312  return ss.str();
1313 }
template<>
std::string DEutils< CSCCorrelatedLCTDigiCollection_ >::print ( col_cit  it) const
inline

Definition at line 1316 of file DEutils.h.

1316  {
1317  std::stringstream ss;
1318  ss
1319  //<< " lct#:" << it->getTrknmb()
1320  //<< " val:" << it->isValid()
1321  //<< " qua:" << it->getQuality()
1322  //<< " strip:" << it->getStrip()
1323  //<< " bend:" << ((it->getBend() == 0) ? 'L' : 'R')
1324  //<< " patt:" << it->getPattern()
1325  //<<" key wire:" << it->getKeyWG()
1326  //<< " bx:" << it->getBX()
1327  //<< " mpc-link:" << it->getMPCLink()
1328  //<< " csc id:" << it->getCSCID()
1329  //<< std::endl;
1330  << *it;
1331  return ss.str();
1332 }
template<>
std::string DEutils< CSCALCTDigiCollection_ >::print ( col_cit  it) const
inline

Definition at line 1335 of file DEutils.h.

1335  {
1336  std::stringstream ss;
1337  ss
1338  << *it
1339  << std::endl;
1340  return ss.str();
1341 }
template<>
std::string DEutils< CSCCLCTDigiCollection_ >::print ( col_cit  it) const
inline

Definition at line 1344 of file DEutils.h.

1344  {
1345  std::stringstream ss;
1346  ss
1347  << *it
1348  << std::endl;
1349  return ss.str();
1350 }
template<>
std::string DEutils< L1CSCSPStatusDigiCollection_ >::print ( col_cit  it) const
inline

Definition at line 1353 of file DEutils.h.

1353  {
1354  std::stringstream ss;
1355  ss
1356  << " slot:"<< it->slot()
1357  << " bxn:" << it->BXN ()
1358  << " fmm:" << it->FMM ()
1359  << " ses:" << it->SEs ()
1360  << " sms:" << it->SMs ()
1361  << " bxs:" << it->BXs ()
1362  << " afs:" << it->AFs ()
1363  << " vps:" << it->VPs ()
1364  << std::endl;
1365  return ss.str();
1366 }