CMS 3D CMS Logo

TreeMatrixCalib.cc
Go to the documentation of this file.
2 
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 }
31 
33 {
34  myFile->cd();
35  myTree->Write();
36  myFile->Close();
37  delete myFile;
38 }
39 
41 {
42  myTree->Fill();
43 }
44 
45 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[])
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 }
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
TreeMatrixCalib::myXtalSM
int myXtalSM
Definition: TreeMatrixCalib.h:32
TreeMatrixCalib::myHodoSlopeX
double myHodoSlopeX
Definition: TreeMatrixCalib.h:45
TreeMatrixCalib::myXtalEta
int myXtalEta
Definition: TreeMatrixCalib.h:32
TreeMatrixCalib::myCaloY
double myCaloY
Definition: TreeMatrixCalib.h:49
TreeMatrixCalib::myHodoX
double myHodoX
Definition: TreeMatrixCalib.h:44
TreeMatrixCalib::store
void store()
Definition: TreeMatrixCalib.cc:40
TreeMatrixCalib::myHodoQualityX
double myHodoQualityX
Definition: TreeMatrixCalib.h:46
TreeMatrixCalib::myRun
int myRun
Definition: TreeMatrixCalib.h:31
TreeMatrixCalib::myCrystal
int myCrystal[49]
Definition: TreeMatrixCalib.h:41
TreeMatrixCalib::myAmplit
double myAmplit[49]
Definition: TreeMatrixCalib.h:38
TreeMatrixCalib::myTree
TTree * myTree
Definition: TreeMatrixCalib.h:28
TreeMatrixCalib::myHodoY
double myHodoY
Definition: TreeMatrixCalib.h:44
TreeMatrixCalib::myEvent
int myEvent
Definition: TreeMatrixCalib.h:31
TreeMatrixCalib::myXtalPhi
int myXtalPhi
Definition: TreeMatrixCalib.h:32
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
TreeMatrixCalib::myMaxEneXtal
int myMaxEneXtal
Definition: TreeMatrixCalib.h:35
TreeMatrixCalib::myFile
TFile * myFile
Definition: TreeMatrixCalib.h:27
TreeMatrixCalib::myHodoQualityY
double myHodoQualityY
Definition: TreeMatrixCalib.h:46
TreeMatrixCalib::~TreeMatrixCalib
~TreeMatrixCalib()
Definition: TreeMatrixCalib.cc:32
TreeMatrixCalib::myTdcOffset
double myTdcOffset
Definition: TreeMatrixCalib.h:52
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
fftjetcommon_cfi.sy
sy
Definition: fftjetcommon_cfi.py:203
TreeMatrixCalib::myHodoSlopeY
double myHodoSlopeY
Definition: TreeMatrixCalib.h:45
TreeMatrixCalib::myTbMoving
int myTbMoving
Definition: TreeMatrixCalib.h:34
writedatasetfile.run
run
Definition: writedatasetfile.py:27
TreeMatrixCalib::myAllMatrix
int myAllMatrix
Definition: TreeMatrixCalib.h:55
TreeMatrixCalib::TreeMatrixCalib
TreeMatrixCalib(const char *filename="tb.root")
Definition: TreeMatrixCalib.cc:3
TreeMatrixCalib::myNextXtalSM
int myNextXtalSM
Definition: TreeMatrixCalib.h:33
TreeMatrixCalib.h
TreeMatrixCalib::myNominalXtalSM
int myNominalXtalSM
Definition: TreeMatrixCalib.h:33
cuy.ii
ii
Definition: cuy.py:590
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
HGVHistoProducerAlgoBlock_cfi.maxX
maxX
Definition: HGVHistoProducerAlgoBlock_cfi.py:169
TreeMatrixCalib::myCaloX
double myCaloX
Definition: TreeMatrixCalib.h:49
TreeMatrixCalib::fillInfo
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[])
Definition: TreeMatrixCalib.cc:45
fftjetcommon_cfi.sx
sx
Definition: fftjetcommon_cfi.py:202