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()>38)
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 623 of file DEutils.h.

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

Definition at line 633 of file DEutils.h.

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

Definition at line 643 of file DEutils.h.

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

Definition at line 652 of file DEutils.h.

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

Definition at line 663 of file DEutils.h.

663  {
664  bool val = true;
665  val &= (lhs.et() == rhs.et() );
666  val &= (lhs.rctCrate() == rhs.rctCrate() );
667  val &= (lhs.rctRegionIndex() == rhs.rctRegionIndex());
668  val &= (lhs.id().isHf() == rhs.id().isHf());
669  if (!lhs.id().isHf()){
670  val &= (lhs.overFlow() == rhs.overFlow() );
671  val &= (lhs.tauVeto() == rhs.tauVeto() );
672  //mask temporarily (!) mip and quiet bits
673  //val &= (lhs.mip() == rhs.mip() );
674  //val &= (lhs.quiet() == rhs.quiet() );
675  val &= (lhs.rctCard() == rhs.rctCard() );
676  } else {
677  val &= (lhs.fineGrain() == rhs.fineGrain());
678  }
679  return val;
680 }
template<>
bool DEutils< L1GctEmCandCollection >::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< L1GctJetCandCollection >::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< L1GctEtHadCollection >::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< L1GctEtMissCollection >::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< L1GctEtTotalCollection >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 689 of file DEutils.h.

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

Definition at line 697 of file DEutils.h.

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

Definition at line 712 of file DEutils.h.

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

Definition at line 727 of file DEutils.h.

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

Definition at line 748 of file DEutils.h.

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

Definition at line 763 of file DEutils.h.

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

Definition at line 781 of file DEutils.h.

781  {
782  return lhs==rhs;
783 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::de_equal ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 785 of file DEutils.h.

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

Definition at line 789 of file DEutils.h.

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

— candidate location-match definition —

Definition at line 805 of file DEutils.h.

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

Definition at line 816 of file DEutils.h.

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

Definition at line 825 of file DEutils.h.

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

Definition at line 834 of file DEutils.h.

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

Definition at line 843 of file DEutils.h.

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

Definition at line 854 of file DEutils.h.

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

Definition at line 861 of file DEutils.h.

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

Definition at line 869 of file DEutils.h.

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

Definition at line 873 of file DEutils.h.

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

Definition at line 879 of file DEutils.h.

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

Definition at line 883 of file DEutils.h.

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

Definition at line 889 of file DEutils.h.

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

Definition at line 893 of file DEutils.h.

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

Definition at line 897 of file DEutils.h.

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

Definition at line 903 of file DEutils.h.

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

Definition at line 913 of file DEutils.h.

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

Definition at line 921 of file DEutils.h.

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

Definition at line 933 of file DEutils.h.

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

Definition at line 943 of file DEutils.h.

943  {
944  bool val = true;
945  val &= (lhs.getCSCID() == rhs.getCSCID() );
946  val &= (lhs.getStrip() == rhs.getStrip() );
947  val &= (lhs.getKeyWG() == rhs.getKeyWG() );
948  return val;
949 }
template<>
bool DEutils< CSCALCTDigiCollection_ >::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.getKeyWG() == rhs.getKeyWG() );
956  return val;
957 }
template<>
bool DEutils< CSCCLCTDigiCollection_ >::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.getTrknmb() == rhs.getTrknmb() );
962  val &= (lhs.getKeyStrip() == rhs.getKeyStrip() );
963  return val;
964 }
template<>
bool DEutils< L1CSCSPStatusDigiCollection_ >::de_equal_loc ( const cand_type lhs,
const cand_type rhs 
)
inline

Definition at line 966 of file DEutils.h.

966  {
967  bool val = true;
968  val &= (lhs.slot() == rhs.slot());
969  return val;
970 }
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 605 of file DEutils.h.

References first, and prof2calltree::last.

605  {
606  for ( ;first!=last; first++)
607  if ( de_equal(*first,value) ) break;
608  return first;
609 }
bool first
Definition: L1TdeRCT.cc:94
bool de_equal(const cand_type &, const cand_type &)
— candidate match definition —
Definition: DEutils.h:623
template<typename T >
bool DEutils< T >::de_nequal ( const cand_type lhs,
const cand_type rhs 
)

Definition at line 628 of file DEutils.h.

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

Definition at line 810 of file DEutils.h.

810  {
811  return !de_equal_loc(lhs,rhs);
812 }
bool de_equal_loc(const cand_type &, const cand_type &)
— candidate location-match definition —
Definition: DEutils.h:805
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 144 of file DEutils.h.

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

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

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

174  {
175  int cid = de_type();
176  int errt = aflag;
177  //phi: 0..17; eta: 0..21
178  // bring it to global coordinates
179  double x1 = (aflag!=4) ? itd->regionId().iphi() : itm->regionId().iphi();
180  double x2 = (aflag!=4) ? itd->regionId().ieta() : itm->regionId().ieta();
181  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
182  unsigned int dw = (aflag==4)?0:itd->raw();
183  unsigned int ew = (aflag==3)?0:itm->raw();
184  dw &= 0x7fff; ew &= 0x7fff; //15-bit
185  digi.setData(dw,ew);
186  int de = (aflag==4)?0:itd->rank();
187  int ee = (aflag==3)?0:itm->rank();
188  digi.setRank((float)de,(float)ee);
189  return digi;
190 }
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 193 of file DEutils.h.

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

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

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

217  {
218  int cid = de_type();
219  int errt = aflag;
220  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
221  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
222  unsigned int dw = (aflag==4)?0:itd->raw();
223  unsigned int ew = (aflag==3)?0:itm->raw();
224  dw &= 0x1fff; ew &= 0x1fff; //13-bit
225  digi.setData(dw,ew);
226  int de = (aflag==4)?0:itd->et();
227  int ee = (aflag==3)?0:itm->et();
228  digi.setRank((float)de,(float)ee);
229  return digi;
230 }
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 232 of file DEutils.h.

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

232  {
233  int cid = de_type();
234  int errt = aflag;
235  double x1 = (aflag!=4) ? itd->phi() : itm->phi();
236  double x2 = 0; //no 'eta' associated with candidates...
237  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
238  unsigned int dw = (aflag==4)?0:itd->raw();
239  unsigned int ew = (aflag==3)?0:itm->raw();
240  dw &= 0x8f1fff; ew &= 0x8f1fff; //22-bit (bits 13,14,15 not set)
241  digi.setData(dw,ew);
242  int de = (aflag==4)?0:itd->et();
243  int ee = (aflag==3)?0:itm->et();
244  digi.setRank((float)de,(float)ee);
245  return digi;
246 }
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 249 of file DEutils.h.

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

249  {
250  int cid = de_type();
251  int errt = aflag;
252  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
253  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
254  unsigned int dw = (aflag==4)?0:itd->raw();
255  unsigned int ew = (aflag==3)?0:itm->raw();
256  dw &= 0x1fff; ew &= 0x1fff; //13-bit
257  digi.setData(dw,ew);
258  int de = (aflag==4)?0:itd->et();
259  int ee = (aflag==3)?0:itm->et();
260  digi.setRank((float)de,(float)ee);
261  return digi;
262 }
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 264 of file DEutils.h.

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

264  {
265  int cid = de_type();
266  int errt = aflag;
267  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
268  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
269  unsigned int dw = (aflag==4)?0:itd->raw();
270  unsigned int ew = (aflag==3)?0:itm->raw();
271  digi.setData(dw,ew);
272  int de = 0; int ee = 0; //no 'rank' associated with candidates...
273  digi.setRank((float)de,(float)ee);
274  return digi;
275 }
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 277 of file DEutils.h.

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

277  {
278  int cid = de_type();
279  int errt = aflag;
280  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
281  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
282  unsigned int dw = (aflag==4)?0:itd->raw();
283  unsigned int ew = (aflag==3)?0:itm->raw();
284  digi.setData(dw,ew);
285  int de = 0; int ee = 0; //no 'rank' associated with candidates...
286  digi.setRank((float)de,(float)ee);
287  return digi;
288 }
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 290 of file DEutils.h.

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

290  {
291  int cid = de_type();
292  int errt = aflag;
293  double x1 = (aflag!=4) ? itd->phi() : itm->phi();
294  double x2 = 0; //no 'eta' associated with candidates...
295  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
296  unsigned int dw = (aflag==4)?0:itd->raw();
297  unsigned int ew = (aflag==3)?0:itm->raw();
298  dw &= 0x8f1fff; ew &= 0x8f1fff; //22-bit (bits 13,14,15 not set)
299  digi.setData(dw,ew);
300  int de = (aflag==4)?0:itd->et();
301  int ee = (aflag==3)?0:itm->et();
302  digi.setRank((float)de,(float)ee);
303  return digi;
304 }
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 307 of file DEutils.h.

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

307  {
308  int cid = de_type();
309  int errt = aflag;
310  double x1 = 0; double x2 = 0; //no 'location' associated with candidates...
311  L1DataEmulDigi digi(dedefs::GCT,cid, x1,x2,0., errt);
312  unsigned int dw = (aflag==4)?0:itd->raw0();//raw0, raw1...
313  unsigned int ew = (aflag==3)?0:itm->raw0();//raw0, raw1...
314  digi.setData(dw,ew);
315  int de = 0; int ee = 0; //no 'rank' associated with candidates...
316  digi.setRank((float)de,(float)ee);
317  return digi;
318 }
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 321 of file DEutils.h.

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

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

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

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

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

390  {
391  int cid = de_type();
392  int errt = aflag;
393  double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
394  double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
395  double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
396  L1DataEmulDigi digi(dedefs::DTP,cid, x1,x2,x3, errt);
397  //other coordinate methods phi(), phiB()
398  //note: no data word defined for candidate
399  int dr = (aflag==4)?0:itd->code();
400  int er = (aflag==3)?0:itm->code();
401  digi.setRank((float)dr,(float)er);
402  return digi;
403 }
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 406 of file DEutils.h.

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

406  {
407  int cid = de_type();
408  int errt = aflag;
409  double x1 = (aflag!=4) ? itd->scNum() : itm->scNum();
410  double x2 = (aflag!=4) ? itd->whNum() : itm->whNum();
411  double x3 = (aflag!=4) ? itd->stNum() : itm->stNum();
412  L1DataEmulDigi digi(dedefs::DTP,cid, x1,x2,x3, errt);
413  //note: no data word defined for candidate
414  int dr(0), er(0);
415  for(int i=0; i<7;i++){
416  if(itd->code(i)>=dr) dr=itd->quality(i);
417  if(itm->code(i)>=er) er=itm->quality(i);
418  }
419  //alternatives: code() = quality() + positions()
420  dr = (aflag==4)?0:dr;
421  er = (aflag==3)?0:er;
422  digi.setRank((float)dr,(float)er);
423  return digi;
424 }
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 428 of file DEutils.h.

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

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

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

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

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

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

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

588  {
589  int cid = de_type();
590  int errt = aflag;
591  double x1; //sector/slot
592  x1 = (aflag!=4) ? itd->slot() : itm->slot();
593  //sector-slot map to be in principle to be provided from event setup
594  //int de_cscstatus_slot2sector[22] =
595  // {0,0,0,0,0, 0,1,2,3,4, 5,6,0,0,0, 0,7,8,9,10, 11,12};
596  //x1 = (aflag!=4) ? slot2sector[itd->slot()] : slot2sector[itm->slot()];
597  L1DataEmulDigi digi(dedefs::CTF,cid, x1,0,0, errt);
598  //note: no data word and rank defined for candidate
599  return digi;
600 }
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 1368 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::GCTnoisoem, dedefs::GCTtaujets, dedefs::GMTcnd, dedefs::GMTrdt, dedefs::GTdword, dedefs::HCALtp, i, dedefs::LTCi, dedefs::MUrtf, dedefs::RCTem, and dedefs::RCTrgn.

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

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

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

Definition at line 981 of file DEutils.h.

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

Definition at line 996 of file DEutils.h.

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

Definition at line 1002 of file DEutils.h.

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

Definition at line 1008 of file DEutils.h.

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

Definition at line 1014 of file DEutils.h.

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

Definition at line 1019 of file DEutils.h.

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

Definition at line 1023 of file DEutils.h.

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

Definition at line 1024 of file DEutils.h.

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

Definition at line 1025 of file DEutils.h.

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

Definition at line 1026 of file DEutils.h.

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

Definition at line 1027 of file DEutils.h.

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

Definition at line 1028 of file DEutils.h.

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

Definition at line 1029 of file DEutils.h.

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

Definition at line 1033 of file DEutils.h.

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

Definition at line 1039 of file DEutils.h.

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

Definition at line 1045 of file DEutils.h.

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

Definition at line 1060 of file DEutils.h.

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

Definition at line 1067 of file DEutils.h.

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

Definition at line 1071 of file DEutils.h.

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

Definition at line 1075 of file DEutils.h.

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

Definition at line 1080 of file DEutils.h.

References data.

1080  {
1081  unsigned data =
1082  it->slot() | it->BXN () | it->FMM () | it->SEs () |
1083  it->SMs () | it->BXs () | it->AFs () | it->VPs ();
1084  return data==0;
1085 }
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 1090 of file DEutils.h.

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

Definition at line 1099 of file DEutils.h.

References EcalBarrel.

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

Definition at line 1117 of file DEutils.h.

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

Definition at line 1134 of file DEutils.h.

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

Definition at line 1155 of file DEutils.h.

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

Definition at line 1181 of file DEutils.h.

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

Definition at line 1210 of file DEutils.h.

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

Definition at line 1216 of file DEutils.h.

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

Definition at line 1217 of file DEutils.h.

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

Definition at line 1218 of file DEutils.h.

1218 {std::stringstream ss; ss<<*it; return ss.str();}
template<>
std::string DEutils< L1GctHtMissCollection >::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< L1GctHFRingEtSumsCollection >::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< L1GctHFBitCountsCollection >::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< L1GctJetCountsCollection >::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< L1MuDTChambPhDigiCollection >::print ( col_cit  it) const
inline

Definition at line 1225 of file DEutils.h.

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

Definition at line 1243 of file DEutils.h.

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

Definition at line 1256 of file DEutils.h.

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

Definition at line 1285 of file DEutils.h.

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

Definition at line 1313 of file DEutils.h.

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

Definition at line 1332 of file DEutils.h.

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

Definition at line 1341 of file DEutils.h.

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

Definition at line 1350 of file DEutils.h.

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