CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
TPN Class Reference

#include <TPN.h>

Public Types

enum  outVar {
  iPN, iPNoPN, iPNoPN0, iPNoPN1,
  nOutVar
}
 

Public Member Functions

void addEntry (double, double, double)
 
std::vector< double > get (int)
 
std::vector< double > getPN ()
 
std::vector< double > getPNoPN ()
 
std::vector< double > getPNoPN0 ()
 
std::vector< double > getPNoPN1 ()
 
void init ()
 
void setCut (int, double, double)
 
void setPNCut (double, double)
 
void setPNoPN0Cut (double, double)
 
void setPNoPN1Cut (double, double)
 
void setPNoPNCut (double, double)
 
 TPN (int iPN=0)
 
virtual ~TPN ()
 

Public Attributes

int _nPN
 
double cuts [2][nOutVar]
 
TMommom [nOutVar]
 

Detailed Description

Definition at line 8 of file TPN.h.

Member Enumeration Documentation

Enumerator
iPN 
iPNoPN 
iPNoPN0 
iPNoPN1 
nOutVar 

Definition at line 13 of file TPN.h.

Constructor & Destructor Documentation

TPN::TPN ( int  iPN = 0)

Definition at line 18 of file TPN.cc.

References init.

19 {
20  init();
21  _nPN=iPN;
22 }
Definition: TPN.h:13
int _nPN
Definition: TPN.h:18
void init()
Definition: TPN.cc:30
TPN::~TPN ( )
virtual

Definition at line 26 of file TPN.cc.

27 {
28 }

Member Function Documentation

void TPN::addEntry ( double  pn,
double  pn0,
double  pn1 
)

Definition at line 40 of file TPN.cc.

References heppy_batch::val.

Referenced by EcalLaserAnalyzer2::endJob(), and EcalLaserAnalyzer::endJob().

41 {
42 
43  double val[nOutVar];
44 
45  if(_nPN==0) val[iPN]=pn0;
46  else val[iPN]=pn1;
47 
48  if(pn!=0) val[iPNoPN]=val[iPN]/pn;
49  else val[iPNoPN]=0;
50 
51  if(pn0!=0) val[iPNoPN0]=val[iPN]/pn0;
52  else val[iPNoPN0]=0;
53 
54  if(pn1!=0) val[iPNoPN1]=val[iPN]/pn1;
55  else val[iPNoPN1]=0;
56 
57  for(int ivar=0;ivar<nOutVar;ivar++){
58  mom[ivar]->addEntry(val[ivar]);
59  }
60 
61 }
void addEntry(double val)
Definition: TMom.cc:110
Definition: TPN.h:13
int _nPN
Definition: TPN.h:18
TMom * mom[nOutVar]
Definition: TPN.h:16
std::vector< double > TPN::get ( int  ivar)
std::vector< double > TPN::getPN ( )

Definition at line 96 of file TPN.cc.

References iPN.

Referenced by EcalLaserAnalyzer2::endJob(), and EcalLaserAnalyzer::endJob().

96 {vector <double> x= get(TPN::iPN); return x;}
Definition: TPN.h:13
std::vector< double > TPN::getPNoPN ( )

Definition at line 97 of file TPN.cc.

References iPNoPN.

Referenced by EcalLaserAnalyzer2::endJob(), and EcalLaserAnalyzer::endJob().

97 {vector <double> x= get(TPN::iPNoPN); return x;}
std::vector< double > TPN::getPNoPN0 ( )

Definition at line 98 of file TPN.cc.

References iPNoPN0.

Referenced by EcalLaserAnalyzer2::endJob(), and EcalLaserAnalyzer::endJob().

98 {vector <double> x= get(TPN::iPNoPN0); return x;}
std::vector< double > TPN::getPNoPN1 ( )

Definition at line 99 of file TPN.cc.

References iPNoPN1.

Referenced by EcalLaserAnalyzer2::endJob(), and EcalLaserAnalyzer::endJob().

99 {vector <double> x= get(TPN::iPNoPN1); return x;}
void TPN::init ( )

Definition at line 30 of file TPN.cc.

References particleFlowClusterECALTimeSelected_cfi::cuts.

31 {
32 
33  for(int j=0;j<nOutVar;j++){
34  cuts[0][j]=0.0;
35  cuts[1][j]=10.0e9;
36  mom[j]=new TMom();
37  }
38 }
Definition: TMom.h:7
double cuts[2][nOutVar]
Definition: TPN.h:15
TMom * mom[nOutVar]
Definition: TPN.h:16
void TPN::setCut ( int  ivar,
double  mean,
double  sig 
)

Definition at line 63 of file TPN.cc.

References particleFlowClusterECALTimeSelected_cfi::cuts.

63  {
64 
65  cuts[0][ivar]=mean-2.0*sig;
66  cuts[1][ivar]=mean+2.0*sig;
67  if(cuts[0][ivar]<0)cuts[0][ivar]=0.0 ;
68 
69  mom[ivar]->setCut(cuts[0][ivar],cuts[1][ivar]);
70 }
void setCut(double, double)
Definition: TMom.cc:90
double cuts[2][nOutVar]
Definition: TPN.h:15
TMom * mom[nOutVar]
Definition: TPN.h:16
void TPN::setPNCut ( double  mean,
double  sig 
)

Definition at line 72 of file TPN.cc.

References iPN.

Referenced by EcalLaserAnalyzer2::endJob(), and EcalLaserAnalyzer::endJob().

72 {setCut(TPN::iPN,mean,sig);}
Definition: TPN.h:13
void setCut(int, double, double)
Definition: TPN.cc:63
void TPN::setPNoPN0Cut ( double  mean,
double  sig 
)

Definition at line 74 of file TPN.cc.

References iPNoPN0.

74 {setCut(TPN::iPNoPN0,mean,sig);}
void setCut(int, double, double)
Definition: TPN.cc:63
void TPN::setPNoPN1Cut ( double  mean,
double  sig 
)

Definition at line 75 of file TPN.cc.

References iPNoPN1.

75 {setCut(TPN::iPNoPN1,mean,sig);}
void setCut(int, double, double)
Definition: TPN.cc:63
void TPN::setPNoPNCut ( double  mean,
double  sig 
)

Definition at line 73 of file TPN.cc.

References iPNoPN.

73 {setCut(TPN::iPNoPN,mean,sig);}
void setCut(int, double, double)
Definition: TPN.cc:63

Member Data Documentation

int TPN::_nPN

Definition at line 18 of file TPN.h.

double TPN::cuts[2][nOutVar]

Definition at line 15 of file TPN.h.

Referenced by mvaElectronID_tools.EleMVA_WP::getCutValues().

TMom* TPN::mom[nOutVar]

Definition at line 16 of file TPN.h.