CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes | Friends

PFBlockLink Class Reference

link between 2 elements More...

#include <PFBlockLink.h>

List of all members.

Public Types

enum  Type {
  NONE = 0, ECALandECAL = 0x8, TRACKandECAL = 0x9, TRACKandHCAL = 0x11,
  ECALandHCAL = 0x18, PS1andECAL = 0xA, PS2andECAL = 0xC, TRACKandPS1 = 0x3,
  TRACKandPS2 = 0x5, PS1andPS2 = 0x6, TRACKandTRACK = 0x1, ECALandGSF = 0x28,
  HCALandGSF = 0x30, TRACKandGSF = 0x21, GSFandBREM = 0x60, GSFandGSF = 0x20,
  ECALandBREM = 0x48, HCALandBREM = 0x50, PS1andGSF = 0x22, PS2andGSF = 0x24,
  PS1andBREM = 0x42, PS2andBREM = 0x44, HFEMandHFHAD = 0x180
}
 

possible types. WARNING: have a look at PFBlockElement

More...

Public Member Functions

double dist () const
unsigned element1 () const
unsigned element2 () const
unsigned neighbour (unsigned elem) const
 PFBlockLink (Type type, reco::PFBlock::LinkTest test, double dist, unsigned elem1, unsigned elem2)
 standard constructor
 PFBlockLink ()
reco::PFBlock::LinkTest test () const
Type type () const

Private Attributes

double dist_
 distance of the link
unsigned element1_
 element 1
unsigned element2_
 element 2
reco::PFBlock::LinkTest test_
 type of test
Type type_
 type of the link

Friends

std::ostream & operator<< (std::ostream &out, const PFBlockLink &l)
 print the link

Detailed Description

link between 2 elements

Author:
Colin Bernet
Date:
March 2006

Definition at line 11 of file PFBlockLink.h.


Member Enumeration Documentation

possible types. WARNING: have a look at PFBlockElement

Enumerator:
NONE 
ECALandECAL 
TRACKandECAL 
TRACKandHCAL 
ECALandHCAL 
PS1andECAL 
PS2andECAL 
TRACKandPS1 
TRACKandPS2 
PS1andPS2 
TRACKandTRACK 
ECALandGSF 
HCALandGSF 
TRACKandGSF 
GSFandBREM 
GSFandGSF 
ECALandBREM 
HCALandBREM 
PS1andGSF 
PS2andGSF 
PS1andBREM 
PS2andBREM 
HFEMandHFHAD 

Definition at line 16 of file PFBlockLink.h.

            {
    NONE=0,
    ECALandECAL=0x8,
    TRACKandECAL=0x9,
    TRACKandHCAL=0x11,
    ECALandHCAL=0x18,
    PS1andECAL=0xA,
    PS2andECAL = 0xC,
    TRACKandPS1 = 0x3,
    TRACKandPS2 = 0x5,
    PS1andPS2 = 0x6,
    TRACKandTRACK = 0x1,
    ECALandGSF = 0x28,
    HCALandGSF = 0x30,
    TRACKandGSF = 0x21,
    GSFandBREM =0x60,
    GSFandGSF = 0x20,
    ECALandBREM = 0x48,
    HCALandBREM = 0x50,
    PS1andGSF = 0x22,
    PS2andGSF = 0x24,
    PS1andBREM = 0x42,
    PS2andBREM = 0x44,
    HFEMandHFHAD = 0x180
  };

Constructor & Destructor Documentation

PFBlockLink::PFBlockLink ( ) [inline]

default constructor

Definition at line 44 of file PFBlockLink.h.

PFBlockLink::PFBlockLink ( Type  type,
reco::PFBlock::LinkTest  test,
double  dist,
unsigned  elem1,
unsigned  elem2 
) [inline]

standard constructor

Definition at line 52 of file PFBlockLink.h.

    :  
    type_(type), 
    test_(test), 
    dist_(dist),
    element1_(elem1), 
    element2_(elem2) {}

Member Function Documentation

double PFBlockLink::dist ( ) const [inline]
Returns:
the distance

Definition at line 80 of file PFBlockLink.h.

References dist_.

{return dist_;}
unsigned PFBlockLink::element1 ( ) const [inline]
Returns:
index to first element

Definition at line 83 of file PFBlockLink.h.

References element1_.

{return element1_;}
unsigned PFBlockLink::element2 ( ) const [inline]
Returns:
index to second element

Definition at line 86 of file PFBlockLink.h.

References element2_.

{return element2_;}
unsigned PFBlockLink::neighbour ( unsigned  elem) const [inline]
Returns:
index to neighbouring element

Definition at line 66 of file PFBlockLink.h.

References element1_, and element2_.

                                          {
    if( elem == element1_ ) return element2_;
    else if(elem == element2_ ) return element1_;
    else return elem;
  }
reco::PFBlock::LinkTest PFBlockLink::test ( void  ) const [inline]
Returns:
the test: test used to compute the value of the distance

Definition at line 77 of file PFBlockLink.h.

References test_.

{return test_;}  
Type PFBlockLink::type ( ) const [inline]
Returns:
the type

Definition at line 73 of file PFBlockLink.h.

References type_.

{return type_;}  

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const PFBlockLink l 
) [friend]

print the link

Definition at line 7 of file PFBlockLink.cc.

                                               {
  if(!out) return out;  

  out<<setiosflags(ios::fixed);
  
  out<<"link : "
     <<" 0x"<<std::hex<<l.type_<<std::dec<<"\t";

  out<<setiosflags(ios::right);
  out<<setw(10)<<l.dist_
     <<" "<<l.element1_<<" "<<l.element2_;
  
  out<<resetiosflags(ios::right|ios::fixed);
  
  return out;  
}

Member Data Documentation

double PFBlockLink::dist_ [private]

distance of the link

Definition at line 100 of file PFBlockLink.h.

Referenced by dist(), and operator<<().

unsigned PFBlockLink::element1_ [private]

element 1

Definition at line 103 of file PFBlockLink.h.

Referenced by element1(), neighbour(), and operator<<().

unsigned PFBlockLink::element2_ [private]

element 2

Definition at line 106 of file PFBlockLink.h.

Referenced by element2(), neighbour(), and operator<<().

type of test

Definition at line 97 of file PFBlockLink.h.

Referenced by test().

type of the link

Definition at line 94 of file PFBlockLink.h.

Referenced by operator<<(), and type().