CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TreeMatrixCalib Class Reference

#include <TreeMatrixCalib.h>

Public Member Functions

void fillInfo (int run, int eve, int xnum, int maxX, int nomX, int nextX, int xeta, int xphi, int tbm, double xx, double yy, double ecalx, double ecaly, double sx, double sy, double qx, double qy, double tdcoff, int allm, double amp[], int cry[])
 
void store ()
 
 TreeMatrixCalib (const char *filename="tb.root")
 
 ~TreeMatrixCalib ()
 

Private Attributes

int myAllMatrix
 
double myAmplit [49]
 
double myCaloX
 
double myCaloY
 
int myCrystal [49]
 
int myEvent
 
TFile * myFile
 
double myHodoQualityX
 
double myHodoQualityY
 
double myHodoSlopeX
 
double myHodoSlopeY
 
double myHodoX
 
double myHodoY
 
int myMaxEneXtal
 
int myNextXtalSM
 
int myNominalXtalSM
 
int myRun
 
int myTbMoving
 
double myTdcOffset
 
TTree * myTree
 
int myXtalEta
 
int myXtalPhi
 
int myXtalSM
 

Detailed Description

Definition at line 15 of file TreeMatrixCalib.h.

Constructor & Destructor Documentation

TreeMatrixCalib::TreeMatrixCalib ( const char *  filename = "tb.root")

Definition at line 3 of file TreeMatrixCalib.cc.

References myAllMatrix, myAmplit, myCaloX, myCaloY, myCrystal, myEvent, myFile, myHodoQualityX, myHodoQualityY, myHodoSlopeX, myHodoSlopeY, myHodoX, myHodoY, myMaxEneXtal, myNextXtalSM, myNominalXtalSM, myRun, myTbMoving, myTdcOffset, myTree, myXtalEta, myXtalPhi, and myXtalSM.

4 {
5  myFile = new TFile(filename,"RECREATE");
6  myTree = new TTree("T1","my tree");
7 
8  // Amplitude / hodoscopes / tdc infos
9  myTree->Branch("run", &myRun, "run/I");
10  myTree->Branch("event", &myEvent, "event/I");
11  myTree->Branch("xtalSM", &myXtalSM, "xtalSM/I");
12  myTree->Branch("maxEneXtal", &myMaxEneXtal, "maxEneXtal/I");
13  myTree->Branch("nominalXtalSM", &myNominalXtalSM, "nominalXtalSM/I");
14  myTree->Branch("nextXtalSM", &myNextXtalSM, "nextXtalSM/I");
15  myTree->Branch("xtalEta", &myXtalEta, "xtalEta/I");
16  myTree->Branch("xtalPhi", &myXtalPhi, "xtalPhi/I");
17  myTree->Branch("tbMoving", &myTbMoving, "tbMoving/I");
18  myTree->Branch("hodoX", &myHodoX, "hodoX/D");
19  myTree->Branch("hodoY", &myHodoY, "hodoY/D");
20  myTree->Branch("caloX", &myCaloX, "caloX/D");
21  myTree->Branch("caloY", &myCaloY, "caloY/D");
22  myTree->Branch("hodoSlopeX", &myHodoSlopeX, "hodoSlopeX/D");
23  myTree->Branch("hodoSlopeY", &myHodoSlopeY, "hodoSlopeY/D");
24  myTree->Branch("hodoQualityX", &myHodoQualityX, "hodoQualityX/D");
25  myTree->Branch("hodoQualityY", &myHodoQualityY, "hodoQualityY/D");
26  myTree->Branch("tdcOffset", &myTdcOffset, "tdcOffset/D");
27  myTree->Branch("allMatrix", &myAllMatrix, "allMatrix/I");
28  myTree->Branch("amplit", &myAmplit, "amplit[49]/D");
29  myTree->Branch("crystal", &myCrystal, "crystal[49]/I");
30 }
double myAmplit[49]
TreeMatrixCalib::~TreeMatrixCalib ( )

Definition at line 32 of file TreeMatrixCalib.cc.

References myFile, and myTree.

33 {
34  myFile->cd();
35  myTree->Write();
36  myFile->Close();
37  delete myFile;
38 }

Member Function Documentation

void TreeMatrixCalib::fillInfo ( int  run,
int  eve,
int  xnum,
int  maxX,
int  nomX,
int  nextX,
int  xeta,
int  xphi,
int  tbm,
double  xx,
double  yy,
double  ecalx,
double  ecaly,
double  sx,
double  sy,
double  qx,
double  qy,
double  tdcoff,
int  allm,
double  amp[],
int  cry[] 
)

Definition at line 45 of file TreeMatrixCalib.cc.

References cuy::ii, hgcaltilesconstants::maxX, myAllMatrix, myAmplit, myCaloX, myCaloY, myCrystal, myEvent, myHodoQualityX, myHodoQualityY, myHodoSlopeX, myHodoSlopeY, myHodoX, myHodoY, myMaxEneXtal, myNextXtalSM, myNominalXtalSM, myRun, myTbMoving, myTdcOffset, myXtalEta, myXtalPhi, myXtalSM, writedatasetfile::run, fftjetcommon_cfi::sx, fftjetcommon_cfi::sy, geometryCSVtoXML::xx, and geometryCSVtoXML::yy.

46 {
47  myRun = run;
48  myEvent = eve;
49  myXtalSM = xnum;
51  myNominalXtalSM = nomX;
52  myNextXtalSM = nextX;
53  myXtalEta = xeta;
54  myXtalPhi = xphi;
55  myTbMoving = tbm;
56  myHodoX = xx;
57  myHodoY = yy;
58  myCaloX = ecalx;
59  myCaloY = ecaly;
60  myHodoSlopeX = sx;
61  myHodoSlopeY = sy;
62  myHodoQualityX = qx;
63  myHodoQualityY = qy;
64  myTdcOffset = tdcoff;
65  myAllMatrix = allm;
66  for (int ii=0; ii<49; ii++){
67  myAmplit[ii] = amp[ii];
68  myCrystal[ii] = cry[ii];
69  }
70 }
double myAmplit[49]
ii
Definition: cuy.py:590
void TreeMatrixCalib::store ( )

Definition at line 40 of file TreeMatrixCalib.cc.

References myTree.

41 {
42  myTree->Fill();
43 }

Member Data Documentation

int TreeMatrixCalib::myAllMatrix
private

Definition at line 55 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myAmplit[49]
private

Definition at line 38 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myCaloX
private

Definition at line 49 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myCaloY
private

Definition at line 49 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myCrystal[49]
private

Definition at line 41 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myEvent
private

Definition at line 31 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

TFile* TreeMatrixCalib::myFile
private

Definition at line 27 of file TreeMatrixCalib.h.

Referenced by TreeMatrixCalib(), and ~TreeMatrixCalib().

double TreeMatrixCalib::myHodoQualityX
private

Definition at line 46 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myHodoQualityY
private

Definition at line 46 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myHodoSlopeX
private

Definition at line 45 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myHodoSlopeY
private

Definition at line 45 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myHodoX
private

Definition at line 44 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myHodoY
private

Definition at line 44 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myMaxEneXtal
private

Definition at line 35 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myNextXtalSM
private

Definition at line 33 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myNominalXtalSM
private

Definition at line 33 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myRun
private

Definition at line 31 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myTbMoving
private

Definition at line 34 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

double TreeMatrixCalib::myTdcOffset
private

Definition at line 52 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

TTree* TreeMatrixCalib::myTree
private

Definition at line 28 of file TreeMatrixCalib.h.

Referenced by store(), TreeMatrixCalib(), and ~TreeMatrixCalib().

int TreeMatrixCalib::myXtalEta
private

Definition at line 32 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myXtalPhi
private

Definition at line 32 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().

int TreeMatrixCalib::myXtalSM
private

Definition at line 32 of file TreeMatrixCalib.h.

Referenced by fillInfo(), and TreeMatrixCalib().