CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 16 of file DEcompare.h.

Member Typedef Documentation

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

Definition at line 20 of file DEutils.h.

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

Definition at line 17 of file DEutils.h.

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

Definition at line 18 of file DEutils.h.

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

Definition at line 16 of file DEutils.h.

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

Definition at line 21 of file DEutils.h.

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

Definition at line 19 of file DEutils.h.

Constructor & Destructor Documentation

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

Definition at line 25 of file DEutils.h.

References DEutils< T >::de_type().

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

Definition at line 32 of file DEutils.h.

32 {}

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 618 of file DEutils.h.

618  {
619  //declare candidate matching by default
620  return true;
621 }
template<>
bool DEutils< EcalTrigPrimDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 628 of file DEutils.h.

628  {
629  bool val = true;
630  unsigned int mask = 0x0fff; //keep only ttf[11:9], fg [8], Et [7:0]
631  mask &= 0x0eff; //fg bit temporary(!) mask
632  val &= ((lhs[lhs.sampleOfInterest()].raw()&mask) == (rhs[rhs.sampleOfInterest()].raw()&mask));
633  val &= (lhs.id().rawId() == rhs.id().rawId());
634  return val;
635 }
template<>
bool DEutils< HcalTrigPrimDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 638 of file DEutils.h.

638  {
639  bool val = true;
640  unsigned int mask = 0x01ff;
641  val &= ((lhs.t0().raw()&mask) == (rhs.t0().raw()&mask));
642  val &= (lhs.id().rawId() == rhs.id().rawId());
643  return val;
644 }
template<>
bool DEutils< L1CaloEmCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 647 of file DEutils.h.

647  {
648  bool val = true;
649  val &= (lhs.raw() == rhs.raw() );
650  val &= (lhs.rctCrate() == rhs.rctCrate());
651  val &= (lhs.isolated() == rhs.isolated());
652  val &= (lhs.index() == rhs.index() );
653  //val &= (lhs.bx() == rhs.bx() );
654  return val;
655 }
template<>
bool DEutils< L1CaloRegionCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 658 of file DEutils.h.

658  {
659  bool val = true;
660  val &= (lhs.et() == rhs.et() );
661  val &= (lhs.rctCrate() == rhs.rctCrate() );
662  val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
663  val &= (lhs.id().isHf() == rhs.id().isHf());
664  if (!lhs.id().isHf()){
665  val &= (lhs.overFlow() == rhs.overFlow() );
666  val &= (lhs.tauVeto() == rhs.tauVeto() );
667  //mask temporarily (!) mip and quiet bits
668  //val &= (lhs.mip() == rhs.mip() );
669  //val &= (lhs.quiet() == rhs.quiet() );
670  val &= (lhs.rctCard() == rhs.rctCard() );
671  } else {
672  val &= (lhs.fineGrain() == rhs.fineGrain());
673  }
674  return val;
675 }
template<>
bool DEutils< L1GctEmCandCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 678 of file DEutils.h.

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

Definition at line 680 of file DEutils.h.

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

Definition at line 682 of file DEutils.h.

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

Definition at line 683 of file DEutils.h.

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

Definition at line 684 of file DEutils.h.

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

Definition at line 685 of file DEutils.h.

685 {return lhs==rhs;}
template<>
bool DEutils< L1GctHFRingEtSumsCollection >::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< L1GctHFBitCountsCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 687 of file DEutils.h.

687 {return lhs==rhs;}
template<>
bool DEutils< L1GctJetCountsCollection >::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< L1MuDTChambPhDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 691 of file DEutils.h.

691  {
692  bool val = true;
693  val &= (lhs.whNum() ==rhs.whNum() );
694  val &= (lhs.scNum() ==rhs.scNum() );
695  val &= (lhs.stNum() ==rhs.stNum() );
696  //val &= (lhs.phi() ==rhs.phi() );
697  //val &= (lhs.phiB() ==rhs.phiB() );
698  val &= (lhs.code() ==rhs.code() );
699  val &= (lhs.Ts2Tag()==rhs.Ts2Tag());
700  //val &= (lhs.BxCnt() ==rhs.BxCnt() );
701  //val &= (lhs.bxNum() ==rhs.bxNum() );
702  return val;
703 }
template<>
bool DEutils< L1MuDTChambThDigiCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 706 of file DEutils.h.

706  {
707  bool val = true;
708  val &= (lhs.whNum() ==rhs.whNum() );
709  val &= (lhs.scNum() ==rhs.scNum() );
710  val &= (lhs.stNum() ==rhs.stNum() );
711  //for(int i=0; i<7; i++) {
712  // val &= (lhs.code(i) ==rhs.code(i) );
713  // val &= (lhs.position(i)==rhs.position(i));
714  // val &= (lhs.quality(i) ==rhs.quality(i) );
715  //}
716  //val &= (lhs.bxNum() ==rhs.bxNum() );
717  return val;
718 }
template<>
bool DEutils< L1MuRegionalCandCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 721 of file DEutils.h.

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

Definition at line 742 of file DEutils.h.

742  {
743  //return (lhs.getDataWord() == rhs.getDataWord() );
744  //return lhs==rhs; //(dataword,bx..)
745  bool val = true;
746  unsigned int dw = rhs.getDataWord();
747  unsigned int ew = lhs.getDataWord();
748  unsigned int mask = 0x3ffffff; //26-bit
749  //mask bits 22 (isolation), 23 (mip) [not permanent!]
750  mask &= (~(0x0c00000));
751  dw &= mask; ew &= mask;
752  val &= (dw==ew);
753  return val;
754 }
template<>
bool DEutils< CSCCorrelatedLCTDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 757 of file DEutils.h.

757  {
758  // Exclude track number from comparison since it is only meaningful for
759  // LCTs upstream of the MPC but not downstream (the latter ones are
760  // unpacked by the CSC TF unpacker).
761  bool val = true;
762  val &= (lhs.isValid() == rhs.isValid() );
763  val &= (lhs.getQuality() == rhs.getQuality());
764  val &= (lhs.getKeyWG() == rhs.getKeyWG() );
765  val &= (lhs.getStrip() == rhs.getStrip() );
766  val &= (lhs.getPattern() == rhs.getPattern());
767  val &= (lhs.getBend() == rhs.getBend() );
768  val &= (lhs.getBX() == rhs.getBX() );
769  val &= (lhs.getMPCLink() == rhs.getMPCLink());
770  val &= (lhs.getCSCID() == rhs.getCSCID() );
771  return val;
772  //return lhs==rhs;
773 }
template<>
bool DEutils< CSCALCTDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 775 of file DEutils.h.

775  {
776  return lhs==rhs;
777 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 779 of file DEutils.h.

779  {
780  return lhs==rhs;
781 }
template<>
bool DEutils< L1CSCSPStatusDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 783 of file DEutils.h.

783  {
784  bool val = true;
785  val &= (lhs.slot() == rhs.slot());
786  val &= (lhs.BXN () == rhs.BXN ());
787  val &= (lhs.FMM () == rhs.FMM ());
788  val &= (lhs.SEs () == rhs.SEs ());
789  val &= (lhs.SMs () == rhs.SMs ());
790  val &= (lhs.BXs () == rhs.BXs ());
791  val &= (lhs.AFs () == rhs.AFs ());
792  val &= (lhs.VPs () == rhs.VPs ());
793  return val;
794 }
template<typename T >
bool DEutils< T >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)

— candidate location-match definition —

Definition at line 799 of file DEutils.h.

799  {
800  //declare candidate matching by default
801  return true;
802 }
template<>
bool DEutils< EcalTrigPrimDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 810 of file DEutils.h.

810  {
811  bool val = true;
812  val &= (lhs.id().zside() == rhs.id().zside() );
813  val &= (lhs.id().ietaAbs() == rhs.id().ietaAbs());
814  val &= (lhs.id().iphi() == rhs.id().iphi() );
815  return val;
816 }
template<>
bool DEutils< HcalTrigPrimDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 819 of file DEutils.h.

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< L1CaloEmCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 828 of file DEutils.h.

828  {
829  bool val = true;
830  val &= (lhs.rctCrate() == rhs.rctCrate());
831  val &= (lhs.rctCard() == rhs.rctCard());
832  val &= (lhs.rctRegion() == rhs.rctRegion());
833  return val;
834 }
template<>
bool DEutils< L1CaloRegionCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 837 of file DEutils.h.

837  {
838  bool val = true;
839  val &= (lhs.rctCrate() == rhs.rctCrate() );
840  val &= (lhs.id().isHf() == rhs.id().isHf());
841  if (!lhs.id().isHf())
842  val &= (lhs.rctCard() == rhs.rctCard() );
843  val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
844  return val;
845 }
template<>
bool DEutils< L1GctEmCandCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 848 of file DEutils.h.

848  {
849  bool val = true;
850  val &= (lhs.etaIndex() == rhs.etaIndex());
851  val &= (lhs.phiIndex() == rhs.phiIndex());
852  return val;
853 }
template<>
bool DEutils< L1GctJetCandCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 855 of file DEutils.h.

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

Definition at line 862 of file DEutils.h.

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

Definition at line 866 of file DEutils.h.

866  {
867  bool val = true;
868  val &= (lhs.phi() == rhs.phi());
869  return val;
870 }
template<>
bool DEutils< L1GctEtTotalCollection >::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< L1GctHtMissCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 876 of file DEutils.h.

876  {
877  bool val = true;
878  val &= (lhs.phi() == rhs.phi());
879  return val;
880 }
template<>
bool DEutils< L1GctHFRingEtSumsCollection >::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< L1GctHFBitCountsCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 886 of file DEutils.h.

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

Definition at line 890 of file DEutils.h.

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

Definition at line 896 of file DEutils.h.

896  {
897  bool val = true;
898  val &= (lhs.phi_packed() ==rhs.phi_packed() );
899  val &= (lhs.eta_packed() ==rhs.eta_packed() );
900  //val &= (lhs.type_idx() == rhs.type_idx());
901  //val &= (lhs.bx() == rhs.bx());
902  return val;
903 }
template<>
bool DEutils< L1MuGMTCandCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 906 of file DEutils.h.

906  {
907  bool val = true;
908  val &= (lhs.phiIndex() ==rhs.phiIndex() );
909  val &= (lhs.etaIndex() ==rhs.etaIndex() );
910  return val;
911 }
template<>
bool DEutils< L1MuDTChambPhDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 914 of file DEutils.h.

914  {
915  bool val = true;
916  val &= (lhs.whNum() ==rhs.whNum() );
917  val &= (lhs.scNum() ==rhs.scNum() );
918  val &= (lhs.stNum() ==rhs.stNum() );
919  //val &= (lhs.phi() ==rhs.phi() );
920  //val &= (lhs.phiB() ==rhs.phiB() );
921  //val &= (lhs.bxNum() ==rhs.bxNum() );
922  return val;
923 }
template<>
bool DEutils< L1MuDTChambThDigiCollection >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 926 of file DEutils.h.

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

Definition at line 936 of file DEutils.h.

936  {
937  bool val = true;
938  val &= (lhs.getCSCID() == rhs.getCSCID() );
939  val &= (lhs.getStrip() == rhs.getStrip() );
940  val &= (lhs.getKeyWG() == rhs.getKeyWG() );
941  return val;
942 }
template<>
bool DEutils< CSCALCTDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 945 of file DEutils.h.

945  {
946  bool val = true;
947  val &= (lhs.getTrknmb() == rhs.getTrknmb() );
948  val &= (lhs.getKeyWG() == rhs.getKeyWG() );
949  return val;
950 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 952 of file DEutils.h.

952  {
953  bool val = true;
954  val &= (lhs.getTrknmb() == rhs.getTrknmb() );
955  val &= (lhs.getKeyStrip() == rhs.getKeyStrip() );
956  return val;
957 }
template<>
bool DEutils< L1CSCSPStatusDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 959 of file DEutils.h.

959  {
960  bool val = true;
961  val &= (lhs.slot() == rhs.slot());
962  return val;
963 }
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 600 of file DEutils.h.

References plotBeamSpotDB::first, and prof2calltree::last.

600  {
601  for ( ;first!=last; first++)
602  if ( de_equal(*first,value) ) break;
603  return first;
604 }
bool de_equal(const cand_type &, const cand_type &)
— candidate match definition —
Definition: DEutils.h:618
template<typename T >
bool DEutils< T >::de_nequal ( const cand_type lhs,
const cand_type rhs 
)

Definition at line 623 of file DEutils.h.

623  {
624  return !de_equal(lhs,rhs);
625 }
bool de_equal(const cand_type &, const cand_type &)
— candidate match definition —
Definition: DEutils.h:618
template<typename T >
bool DEutils< T >::de_nequal_loc ( const cand_type lhs,
const cand_type rhs 
)

Definition at line 804 of file DEutils.h.

804  {
805  return !de_equal_loc(lhs,rhs);
806 }
bool de_equal_loc(const cand_type &, const cand_type &)
— candidate location-match definition —
Definition: DEutils.h:799
template<typename T >
int DEutils< T >::de_type ( ) const
inline

Definition at line 34 of file DEutils.h.

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

34 {return de_trait::de_type();}
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 54 of file DEutils.h.

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

Definition at line 60 of file DEutils.h.

References setup_regression::aflag, dedefs::ETP, L1DataEmulDigi::setData(), L1DataEmulDigi::setDEpair(), and L1DataEmulDigi::setRank().

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

Definition at line 91 of file DEutils.h.

References setup_regression::aflag, dedefs::HTP, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

References setup_regression::aflag, dedefs::RCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

111  {
112  int cid = de_type();
113  int errt = aflag;
114  double x1, x2, x3(0.);
115  // global index ieta (0-21), iphi (0-17), card (0-6)
116  x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
117  x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
118  x3 = (aflag!=4) ? itd->regionId().rctCard() : itm->regionId().rctCard();
119  //alternative coordinates: rctCrate(), rctCard(), index()
120  L1DataEmulDigi digi(dedefs::RCT,cid, x1,x2,x3, errt);
121  unsigned int dw = itd->raw();
122  unsigned int ew = itm->raw();
123  dw &= 0x3ff;
124  dw += (((itd->rctCrate())&0x1f)<<10);
125  dw += (((itd->isolated()?1:0)&0x1)<<15);
126  dw += (((itd->index())&0x3)<<16);
127  ew &= 0x3ff;
128  ew += (((itm->rctCrate())&0x1f)<<10);
129  ew += (((itm->isolated()?1:0)&0x1)<<15);
130  ew += (((itm->index())&0x3)<<16);
131  dw = (aflag==4)?0:dw;
132  ew = (aflag==3)?0:ew;
136  digi.setData(dw,ew);
137  int de = (aflag==4)?0:itd->rank();
138  int ee = (aflag==3)?0:itm->rank();
139  digi.setRank((float)de,(float)ee);
140  return digi;
141 }
int de_type() const
Definition: DEutils.h:34
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 143 of file DEutils.h.

References setup_regression::aflag, dedefs::RCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 172 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 190 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 213 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 228 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 245 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 260 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

260  {
261  int cid = de_type();
262  int errt = aflag;
263  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
264  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
265  unsigned int dw = (aflag==4)?0:itd->raw();
266  unsigned int ew = (aflag==3)?0:itm->raw();
267  digi.setData(dw,ew);
268  int de = 0; int ee = 0; //no 'rank' associated with candidates...
269  digi.setRank((float)de,(float)ee);
270  return digi;
271 }
int de_type() const
Definition: DEutils.h:34
template<>
L1DataEmulDigi DEutils< L1GctHFRingEtSumsCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 273 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

273  {
274  int cid = de_type();
275  int errt = aflag;
276  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
277  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
278  unsigned int dw = (aflag==4)?0:itd->raw();
279  unsigned int ew = (aflag==3)?0:itm->raw();
280  digi.setData(dw,ew);
281  int de = 0; int ee = 0; //no 'rank' associated with candidates...
282  digi.setRank((float)de,(float)ee);
283  return digi;
284 }
int de_type() const
Definition: DEutils.h:34
template<>
L1DataEmulDigi DEutils< L1GctHtMissCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 286 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 303 of file DEutils.h.

References setup_regression::aflag, dedefs::GCT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

303  {
304  int cid = de_type();
305  int errt = aflag;
306  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
307  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
308  unsigned int dw = (aflag==4)?0:itd->raw0();//raw0, raw1...
309  unsigned int ew = (aflag==3)?0:itm->raw0();//raw0, raw1...
310  digi.setData(dw,ew);
311  int de = 0; int ee = 0; //no 'rank' associated with candidates...
312  digi.setRank((float)de,(float)ee);
313  return digi;
314 }
int de_type() const
Definition: DEutils.h:34
template<>
L1DataEmulDigi DEutils< L1MuRegionalCandCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 316 of file DEutils.h.

References setup_regression::aflag, gather_cfg::cout, dedefs::CTF, dedefs::DTF, dedefs::RPC, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 357 of file DEutils.h.

References setup_regression::aflag, gather_cfg::cout, TauDecayModes::dec, dedefs::GMT, L1DataEmulDigi::setData(), and L1DataEmulDigi::setRank().

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

Definition at line 385 of file DEutils.h.

References setup_regression::aflag, dedefs::DTP, and L1DataEmulDigi::setRank().

385  {
386  int cid = de_type();
387  int errt = aflag;
388  double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
389  double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
390  double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
391  L1DataEmulDigi digi(dedefs::DTP,cid, x1,x2,x3, errt);
392  //other coordinate methods phi(), phiB()
393  //note: no data word defined for candidate
394  int dr = (aflag==4)?0:itd->code();
395  int er = (aflag==3)?0:itm->code();
396  digi.setRank((float)dr,(float)er);
397  return digi;
398 }
int de_type() const
Definition: DEutils.h:34
template<>
L1DataEmulDigi DEutils< L1MuDTChambThDigiCollection >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 401 of file DEutils.h.

References setup_regression::aflag, dedefs::DTP, i, and L1DataEmulDigi::setRank().

401  {
402  int cid = de_type();
403  int errt = aflag;
404  double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
405  double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
406  double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
407  L1DataEmulDigi digi(dedefs::DTP,cid, x1,x2,x3, errt);
408  //note: no data word defined for candidate
409  int dr(0), er(0);
410  for(int i=0; i<7;i++){
411  if(itd->code(i)>=dr) dr=itd->quality(i);
412  if(itm->code(i)>=er) er=itm->quality(i);
413  }
414  //alternatives: code() = quality() + positions()
415  dr = (aflag==4)?0:dr;
416  er = (aflag==3)?0:er;
417  digi.setRank((float)dr,(float)er);
418  return digi;
419 }
int i
Definition: DBlmapReader.cc:9
int de_type() const
Definition: DEutils.h:34
template<>
L1DataEmulDigi DEutils< CSCCorrelatedLCTDigiCollection_ >::DEDigi ( col_cit  itd,
col_cit  itm,
int  aflag 
)
inline

Definition at line 423 of file DEutils.h.

References setup_regression::aflag, Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), and edm::shift.

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

Definition at line 487 of file DEutils.h.

References setup_regression::aflag, dedefs::CTP, Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), and edm::shift.

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

Definition at line 532 of file DEutils.h.

References setup_regression::aflag, dedefs::CTP, Vispa.Plugins.EdmBrowser.EdmDataAccessor::eq(), L1DataEmulDigi::setData(), L1DataEmulDigi::setRank(), and edm::shift.

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

Definition at line 583 of file DEutils.h.

References setup_regression::aflag, and dedefs::CTF.

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

— name candidate —

Definition at line 1360 of file DEutils.h.

References dedefs::CSCsta, dedefs::CSCtpa, dedefs::CSCtpc, dedefs::CSCtpl, 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, i, dedefs::LTCi, dedefs::MUrtf, dedefs::RCTem, dedefs::RCTrgn, and AlCaHLTBitMon_QueryRunRegistry::string.

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

— candidate emptiness definition —

Definition at line 968 of file DEutils.h.

Referenced by dirstructure.Directory::__repr__(), and utils_v2.StatisticalTest::do_test().

968  {
969  //declare candidate non-empty by default
970  return false;
971 }
template<>
bool DEutils< EcalTrigPrimDigiCollection >::is_empty ( col_cit  it) const
inline

Definition at line 974 of file DEutils.h.

974  {
975  bool val = false;
976  unsigned int raw = it->sample(it->sampleOfInterest()).raw();
977  unsigned int mask = 0x0fff;
978  mask = 0x0eff; //fg bit temporary(!) mask
979  raw &= mask;
980  val |= (raw==0);
981  if(val) return val;
982  unsigned int ttf = it->ttFlag();
983  val |= ((ttf!=0x1) && (ttf!=0x3)); //compare only if ttf is 1 or 3
984  return val;
985  // return ( it->size()==0 || it->sample(it->sampleOfInterest()).raw()==0);
986 }
template<>
bool DEutils< HcalTrigPrimDigiCollection >::is_empty ( col_cit  it) const
inline

Definition at line 989 of file DEutils.h.

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

Definition at line 995 of file DEutils.h.

995  {
996  return ((it->rank())==0);
997  //return it->empty();
998 }
template<>
bool DEutils< L1CaloRegionCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1001 of file DEutils.h.

1001  {
1002  return ((it->et())==0);
1003  //return it->empty();
1004 }
template<>
bool DEutils< L1GctEmCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1007 of file DEutils.h.

1007  {
1008  return (it->empty());
1009 }
template<>
bool DEutils< L1GctJetCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1012 of file DEutils.h.

1012  {
1013  return (it->empty());
1014 }
template<>
bool DEutils< L1GctEtHadCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1016 of file DEutils.h.

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

Definition at line 1017 of file DEutils.h.

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

Definition at line 1018 of file DEutils.h.

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

Definition at line 1019 of file DEutils.h.

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

Definition at line 1020 of file DEutils.h.

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

Definition at line 1021 of file DEutils.h.

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

Definition at line 1022 of file DEutils.h.

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

Definition at line 1025 of file DEutils.h.

1025  {
1026  return (it->bxNum() != 0 || it->code() == 7);
1027  //return (it->qualityCode() == 7);
1028  //return false;
1029 }
template<>
bool DEutils< L1MuDTChambThDigiCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1031 of file DEutils.h.

1031  {
1032  return (it->whNum()==0 && it->scNum()==0 && it->stNum()==0);//tmp!
1033  //return false;
1034 }
template<>
bool DEutils< L1MuRegionalCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1037 of file DEutils.h.

1037  {
1038  //note: following call used to give trouble sometimes
1039 
1040  //restrict further processing to bx==0 for RPC
1041  if(it->type_idx()==1 || it->type_idx()==3) //rpc
1042  if (it->bx()!=0)
1043  return true;
1044 
1045  return (it->empty());
1046  //virtual bool empty() const { return readDataField( PT_START, PT_LENGTH) == 0; }
1047  //return (it->getDataWord()==0);
1048  //return (it->pt_packed()==0);
1049 }
template<>
bool DEutils< L1MuGMTCandCollection >::is_empty ( col_cit  it) const
inline

Definition at line 1052 of file DEutils.h.

1052  {
1053  return (it->empty());
1054  //return (it->ptIndex()==0);
1055  //return (it->getDataWord()==0);
1056 }
template<>
bool DEutils< CSCCorrelatedLCTDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1059 of file DEutils.h.

1059  {
1060  return !(it->isValid());
1061 }
template<>
bool DEutils< CSCALCTDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1063 of file DEutils.h.

1063  {
1064  return !(it->isValid());
1065 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1067 of file DEutils.h.

1067  {
1068  return !(it->isValid());
1069 }
template<>
bool DEutils< L1CSCSPStatusDigiCollection_ >::is_empty ( col_cit  it) const
inline

Definition at line 1072 of file DEutils.h.

References data.

1072  {
1073  unsigned data =
1074  it->slot() | it->BXN () | it->FMM () | it->SEs () |
1075  it->SMs () | it->BXs () | it->AFs () | it->VPs ();
1076  return data==0;
1077 }
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 1082 of file DEutils.h.

References contentValuesCheck::ss.

1082  {
1083  std::stringstream ss;
1084  ss << "[DEutils<T>::print()] specialization still missing for collection!";
1085  //ss << *it; // default
1086  ss << std::endl;
1087  return ss.str();
1088 }
template<>
std::string DEutils< EcalTrigPrimDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1091 of file DEutils.h.

References TauDecayModes::dec, EcalBarrel, and contentValuesCheck::ss.

1091  {
1092  std::stringstream ss;
1093  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex
1094  << it->sample(it->sampleOfInterest()).raw()
1095  << std::setfill(' ') << std::dec
1096  << ", et:" << std::setw(3) << it->compressedEt()
1097  << ", fg:" << std::setw(1) << it->fineGrain()
1098  << ", ttf:" << std::setw(2) << it->ttFlag()
1099  << ", sdet:" << ((it->id().subDet()==EcalBarrel)?("Barrel"):("Endcap"))
1100  << ", iz:" << ((it->id().zside()>0)?("+"):("-"))
1101  << ", ieta:" << std::setw(2) << it->id().ietaAbs()
1102  << ", iphi:" << std::setw(2) << it->id().iphi()
1103  //<< "\n\t: " << *it
1104  << std::endl;
1105  return ss.str();
1106 }
template<>
std::string DEutils< HcalTrigPrimDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1109 of file DEutils.h.

References TauDecayModes::dec, and contentValuesCheck::ss.

1109  {
1110  std::stringstream ss;
1111  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex
1112  << it->t0().raw()
1113  << std::setfill(' ') << std::dec
1114  << ", et:" << std::setw(3) << it->SOI_compressedEt()
1115  << ", fg:" << std::setw(1) << it->SOI_fineGrain()
1116  << ", sdet:" << it->id().subdet()
1117  << ", iz:" << ((it->id().zside()>0)?("+"):("-"))
1118  << ", ieta:" << std::setw(2) << it->id().ietaAbs()
1119  << ", iphi:" << std::setw(2) << it->id().iphi()
1120  << std::endl;
1121  //ss << *it << std::endl;
1122  return ss.str();
1123 }
template<>
std::string DEutils< L1CaloEmCollection >::print ( col_cit  it) const
inline

Definition at line 1126 of file DEutils.h.

References TauDecayModes::dec, and contentValuesCheck::ss.

1126  {
1127  std::stringstream ss;
1128  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex << it->raw()
1129  << ", rank=0x"<< std::setw(2) << std::hex << it->rank()
1130  << std::setfill(' ') << std::dec
1131  << ", region:"<< std::setw(1) << it->rctRegion()
1132  << ", card:" << std::setw(1) << it->rctCard()
1133  << ", crate:" << std::setw(2) << it->rctCrate()
1134  << ", ieta:" << std::setw(2) << it->regionId().ieta() //0..21
1135  << ", iphi:" << std::setw(2) << it->regionId().iphi() //0..17
1136  //<< ", eta:" << std::setw(2) << it->regionId().rctEta() //0..10
1137  //<< ", phi:" << std::setw(2) << it->regionId().rctPhi() //0..1
1138  << ", iso:" << std::setw(1) << it->isolated()
1139  << ", index:" << std::setw(1) << it->index()
1140  << ", bx:" << it->bx()
1141  << std::endl;
1142  //ss << *it;
1143  return ss.str();
1144 }
template<>
std::string DEutils< L1CaloRegionCollection >::print ( col_cit  it) const
inline

Definition at line 1147 of file DEutils.h.

References TauDecayModes::dec, and contentValuesCheck::ss.

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

Definition at line 1173 of file DEutils.h.

References TauDecayModes::dec, and contentValuesCheck::ss.

1173  {
1174  std::stringstream ss;
1175  //get rct index
1176  //int ieta = (it->etaIndex()&0x7); ieta = it->etaSign() ? 10-ieta:11+ieta;
1177  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex << it->raw()
1178  << ", rank=0x"<< std::setw(2) << std::hex << it->rank()
1179  << std::setfill(' ') << std::dec
1180  << ", etaSign:" << it->etaSign()
1181  << ", eta:" << (it->etaIndex()&0x7) //0..6
1182  << ", phi:" << std::setw(2) << it->phiIndex() //0..17
1183  << " (ieta:" << std::setw(2) << it->regionId().ieta() //0..21
1184  << ",iphi:" << std::setw(2) << it->regionId().iphi() << ")" //0..17
1185  << ", iso:" << it->isolated()
1186  << ", cap block:" << std::setw(3) << it->capBlock()
1187  << ", index:" << it->capIndex()
1188  << ", bx:" << it->bx()
1189  << std::endl;
1190  //<< " " << *it << std::dec << std::endl;
1191  return ss.str();
1192 }
template<>
std::string DEutils< L1GctJetCandCollection >::print ( col_cit  it) const
inline

Definition at line 1202 of file DEutils.h.

References TauDecayModes::dec, and contentValuesCheck::ss.

1202  {
1203  std::stringstream ss;
1204  ss << "0x" << std::setw(4) << std::setfill('0') << std::hex << it->raw()
1205  << " " << *it << std::dec << std::endl;
1206  return ss.str();
1207 }
template<>
std::string DEutils< L1GctEtHadCollection >::print ( col_cit  it) const
inline

Definition at line 1208 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1209 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1210 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1211 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1212 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1213 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1214 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1217 of file DEutils.h.

References contentValuesCheck::ss.

1217  {
1218  std::stringstream ss;
1219  ss << ""
1220  << " bxNum:" << it->bxNum()
1221  << " whNum:" << it->whNum()
1222  << " scNum:" << it->scNum()
1223  << " stNum:" << it->stNum()
1224  << " phi:" << it->phi()
1225  << " phiB:" << it->phiB()
1226  << " code:" << it->code()
1227  << " Ts2Tag:" << it->Ts2Tag()
1228  << " BxCnt:" << it->BxCnt()
1229  << std::endl;
1230  //nb: operator << not implemented in base class L1MuDTChambPhDigi
1231  return ss.str();
1232 }
template<>
std::string DEutils< L1MuDTChambThDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1235 of file DEutils.h.

References contentValuesCheck::ss.

1235  {
1236  std::stringstream ss;
1237  ss << ""
1238  << " bxNum:" << it->bxNum()
1239  << " whNum:" << it->whNum()
1240  << " scNum:" << it->scNum()
1241  << " stNum:" << it->stNum()
1242  << std::endl;
1243  //nb: operator << not implemented in base class L1MuDTChambThDigi
1244  return ss.str();
1245 }
template<>
std::string DEutils< L1MuRegionalCandCollection >::print ( col_cit  it) const
inline

Definition at line 1248 of file DEutils.h.

References TauDecayModes::dec, and contentValuesCheck::ss.

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

Definition at line 1277 of file DEutils.h.

References TauDecayModes::dec, and contentValuesCheck::ss.

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

Definition at line 1305 of file DEutils.h.

References contentValuesCheck::ss.

1305  {
1306  std::stringstream ss;
1307  ss
1308  //<< " lct#:" << it->getTrknmb()
1309  //<< " val:" << it->isValid()
1310  //<< " qua:" << it->getQuality()
1311  //<< " strip:" << it->getStrip()
1312  //<< " bend:" << ((it->getBend() == 0) ? 'L' : 'R')
1313  //<< " patt:" << it->getPattern()
1314  //<<" key wire:" << it->getKeyWG()
1315  //<< " bx:" << it->getBX()
1316  //<< " mpc-link:" << it->getMPCLink()
1317  //<< " csc id:" << it->getCSCID()
1318  //<< std::endl;
1319  << *it;
1320  return ss.str();
1321 }
template<>
std::string DEutils< CSCALCTDigiCollection_ >::print ( col_cit  it) const
inline

Definition at line 1324 of file DEutils.h.

References contentValuesCheck::ss.

1324  {
1325  std::stringstream ss;
1326  ss
1327  << *it
1328  << std::endl;
1329  return ss.str();
1330 }
template<>
std::string DEutils< CSCCLCTDigiCollection_ >::print ( col_cit  it) const
inline

Definition at line 1333 of file DEutils.h.

References contentValuesCheck::ss.

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

Definition at line 1342 of file DEutils.h.

References contentValuesCheck::ss.

1342  {
1343  std::stringstream ss;
1344  ss
1345  << " slot:"<< it->slot()
1346  << " bxn:" << it->BXN ()
1347  << " fmm:" << it->FMM ()
1348  << " ses:" << it->SEs ()
1349  << " sms:" << it->SMs ()
1350  << " bxs:" << it->BXs ()
1351  << " afs:" << it->AFs ()
1352  << " vps:" << it->VPs ()
1353  << std::endl;
1354  return ss.str();
1355 }