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 | Private Attributes | Friends
PFBlockLink Class Reference

link between 2 elements More...

#include <PFBlockLink.h>

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, SCandECAL = 0x208,
  TRACKandHO = 0x401, HCALandHO = 0x410
}
 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 ()
 
 PFBlockLink (Type type, reco::PFBlock::LinkTest test, double dist, unsigned elem1, unsigned elem2)
 standard constructor More...
 
reco::PFBlock::LinkTest test () const
 
Type type () const
 

Private Attributes

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

Friends

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

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 
SCandECAL 
TRACKandHO 
HCALandHO 

Definition at line 16 of file PFBlockLink.h.

16  {
17  NONE=0,
18  ECALandECAL=0x8,
19  TRACKandECAL=0x9,
20  TRACKandHCAL=0x11,
21  ECALandHCAL=0x18,
22  PS1andECAL=0xA,
23  PS2andECAL = 0xC,
24  TRACKandPS1 = 0x3,
25  TRACKandPS2 = 0x5,
26  PS1andPS2 = 0x6,
27  TRACKandTRACK = 0x1,
28  ECALandGSF = 0x28,
29  HCALandGSF = 0x30,
30  TRACKandGSF = 0x21,
31  GSFandBREM =0x60,
32  GSFandGSF = 0x20,
33  ECALandBREM = 0x48,
34  HCALandBREM = 0x50,
35  PS1andGSF = 0x22,
36  PS2andGSF = 0x24,
37  PS1andBREM = 0x42,
38  PS2andBREM = 0x44,
39  HFEMandHFHAD = 0x180,
40  SCandECAL = 0x208,
41  TRACKandHO= 0x401,
42  HCALandHO= 0x410
43  };

Constructor & Destructor Documentation

PFBlockLink::PFBlockLink ( )
inline

default constructor

Definition at line 47 of file PFBlockLink.h.

47  :
48  type_(NONE),
50  dist_(0),
51  element1_( 0 ),
52  element2_( 0 ) {}
PFBlockLink::PFBlockLink ( Type  type,
reco::PFBlock::LinkTest  test,
double  dist,
unsigned  elem1,
unsigned  elem2 
)
inline

standard constructor

Definition at line 55 of file PFBlockLink.h.

60  :
61  type_(type),
62  test_(test),
63  dist_(dist),
64  element1_(elem1),
65  element2_(elem2) {}
type
Definition: HCALResponse.h:21

Member Function Documentation

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

Definition at line 83 of file PFBlockLink.h.

References dist_.

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

Definition at line 86 of file PFBlockLink.h.

References element1_.

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

Definition at line 89 of file PFBlockLink.h.

References element2_.

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

Definition at line 69 of file PFBlockLink.h.

References HTMLExport::elem(), element1_, and element2_.

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

Definition at line 80 of file PFBlockLink.h.

References test_.

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

Definition at line 76 of file PFBlockLink.h.

References type_.

Referenced by cuy.ValElement::__init__().

76 {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.

8  {
9  if(!out) return out;
10 
11  out<<setiosflags(ios::fixed);
12 
13  out<<"link : "
14  <<" 0x"<<std::hex<<l.type_<<std::dec<<"\t";
15 
16  out<<setiosflags(ios::right);
17  out<<setw(10)<<l.dist_
18  <<" "<<l.element1_<<" "<<l.element2_;
19 
20  out<<resetiosflags(ios::right|ios::fixed);
21 
22  return out;
23 }

Member Data Documentation

double PFBlockLink::dist_
private

distance of the link

Definition at line 103 of file PFBlockLink.h.

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

unsigned PFBlockLink::element1_
private

element 1

Definition at line 106 of file PFBlockLink.h.

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

unsigned PFBlockLink::element2_
private

element 2

Definition at line 109 of file PFBlockLink.h.

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

reco::PFBlock::LinkTest PFBlockLink::test_
private

type of test

Definition at line 100 of file PFBlockLink.h.

Referenced by test().

Type PFBlockLink::type_
private