Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:25

0001 #include "SimG4Core/GFlash/TB/TreeMatrixCalib.h"
0002 
0003 TreeMatrixCalib::TreeMatrixCalib(const char*) {
0004   edm::Service<TFileService> fs;
0005   myTree_ = fs->make<TTree>("T1", "my tree");
0006 
0007   // Amplitude / hodoscopes / tdc infos
0008   myTree_->Branch("run", &myRun, "run/I");
0009   myTree_->Branch("event", &myEvent, "event/I");
0010   myTree_->Branch("xtalSM", &myXtalSM, "xtalSM/I");
0011   myTree_->Branch("maxEneXtal", &myMaxEneXtal, "maxEneXtal/I");
0012   myTree_->Branch("nominalXtalSM", &myNominalXtalSM, "nominalXtalSM/I");
0013   myTree_->Branch("nextXtalSM", &myNextXtalSM, "nextXtalSM/I");
0014   myTree_->Branch("xtalEta", &myXtalEta, "xtalEta/I");
0015   myTree_->Branch("xtalPhi", &myXtalPhi, "xtalPhi/I");
0016   myTree_->Branch("tbMoving", &myTbMoving, "tbMoving/I");
0017   myTree_->Branch("hodoX", &myHodoX, "hodoX/D");
0018   myTree_->Branch("hodoY", &myHodoY, "hodoY/D");
0019   myTree_->Branch("caloX", &myCaloX, "caloX/D");
0020   myTree_->Branch("caloY", &myCaloY, "caloY/D");
0021   myTree_->Branch("hodoSlopeX", &myHodoSlopeX, "hodoSlopeX/D");
0022   myTree_->Branch("hodoSlopeY", &myHodoSlopeY, "hodoSlopeY/D");
0023   myTree_->Branch("hodoQualityX", &myHodoQualityX, "hodoQualityX/D");
0024   myTree_->Branch("hodoQualityY", &myHodoQualityY, "hodoQualityY/D");
0025   myTree_->Branch("tdcOffset", &myTdcOffset, "tdcOffset/D");
0026   myTree_->Branch("allMatrix", &myAllMatrix, "allMatrix/I");
0027   myTree_->Branch("amplit", &myAmplit, "amplit[49]/D");
0028   myTree_->Branch("crystal", &myCrystal, "crystal[49]/I");
0029 }
0030 
0031 void TreeMatrixCalib::store() { myTree_->Fill(); }
0032 
0033 void TreeMatrixCalib::fillInfo(int run,
0034                                int eve,
0035                                int xnum,
0036                                int maxX,
0037                                int nomX,
0038                                int nextX,
0039                                int xeta,
0040                                int xphi,
0041                                int tbm,
0042                                double xx,
0043                                double yy,
0044                                double ecalx,
0045                                double ecaly,
0046                                double sx,
0047                                double sy,
0048                                double qx,
0049                                double qy,
0050                                double tdcoff,
0051                                int allm,
0052                                double amp[],
0053                                int cry[]) {
0054   myRun = run;
0055   myEvent = eve;
0056   myXtalSM = xnum;
0057   myMaxEneXtal = maxX;
0058   myNominalXtalSM = nomX;
0059   myNextXtalSM = nextX;
0060   myXtalEta = xeta;
0061   myXtalPhi = xphi;
0062   myTbMoving = tbm;
0063   myHodoX = xx;
0064   myHodoY = yy;
0065   myCaloX = ecalx;
0066   myCaloY = ecaly;
0067   myHodoSlopeX = sx;
0068   myHodoSlopeY = sy;
0069   myHodoQualityX = qx;
0070   myHodoQualityY = qy;
0071   myTdcOffset = tdcoff;
0072   myAllMatrix = allm;
0073   for (int ii = 0; ii < 49; ii++) {
0074     myAmplit[ii] = amp[ii];
0075     myCrystal[ii] = cry[ii];
0076   }
0077 }