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

Definition: TPN.h:13

Constructor & Destructor Documentation

TPN::TPN ( int  iPN = 0)

Definition at line 19 of file TPN.cc.

References init.

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

Definition at line 27 of file TPN.cc.

28 {
29 }

Member Function Documentation

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

Definition at line 41 of file TPN.cc.

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

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

Definition at line 79 of file TPN.cc.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

79  {
80 
81  std::vector<double> res;
82 
83  if(ivar<nOutVar){
84 
85  res.push_back(mom[ivar]->getMean());
86  res.push_back(mom[ivar]->getRMS());
87  res.push_back(mom[ivar]->getM3());
88  res.push_back(mom[ivar]->getNevt());
89  res.push_back(mom[ivar]->getMin());
90  res.push_back(mom[ivar]->getMax());
91  }
92 
93  return res;
94 
95 }
TMom * mom[nOutVar]
Definition: TPN.h:16
std::vector< double > TPN::getPN ( )

Definition at line 97 of file TPN.cc.

References iPN, and x.

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

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

Definition at line 98 of file TPN.cc.

References iPNoPN, and x.

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

98 {vector <double> x= get(TPN::iPNoPN); return x;}
Definition: DDAxes.h:10
std::vector< double > TPN::getPNoPN0 ( )

Definition at line 99 of file TPN.cc.

References iPNoPN0, and x.

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

99 {vector <double> x= get(TPN::iPNoPN0); return x;}
Definition: DDAxes.h:10
std::vector< double > TPN::getPNoPN1 ( )

Definition at line 100 of file TPN.cc.

References iPNoPN1, and x.

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

100 {vector <double> x= get(TPN::iPNoPN1); return x;}
Definition: DDAxes.h:10
void TPN::init ( )

Definition at line 31 of file TPN.cc.

References hpstanc_transforms::cuts, and j.

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

Definition at line 64 of file TPN.cc.

References hpstanc_transforms::cuts.

64  {
65 
66  cuts[0][ivar]=mean-2.0*sig;
67  cuts[1][ivar]=mean+2.0*sig;
68  if(cuts[0][ivar]<0)cuts[0][ivar]=0.0 ;
69 
70  mom[ivar]->setCut(cuts[0][ivar],cuts[1][ivar]);
71 }
void setCut(double, double)
Definition: TMom.cc:91
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 73 of file TPN.cc.

References iPN.

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

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

Definition at line 75 of file TPN.cc.

References iPNoPN0.

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

Definition at line 76 of file TPN.cc.

References iPNoPN1.

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

Definition at line 74 of file TPN.cc.

References iPNoPN.

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

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.

TMom* TPN::mom[nOutVar]

Definition at line 16 of file TPN.h.