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;
50  myMaxEneXtal = maxX;
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(const char *filename="tb.root")
double myAmplit[49]
ii
Definition: cuy.py:588
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[])