CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/SimG4Core/GFlash/TB/TreeMatrixCalib.cc

Go to the documentation of this file.
00001 #include "SimG4Core/GFlash/TB/TreeMatrixCalib.h"
00002 
00003 TreeMatrixCalib::TreeMatrixCalib(const char * filename) 
00004 {
00005   myFile = new TFile(filename,"RECREATE");
00006   myTree = new TTree("T1","my tree");
00007 
00008   // Amplitude / hodoscopes / tdc infos
00009   myTree->Branch("run",             &myRun,            "run/I");  
00010   myTree->Branch("event",           &myEvent,          "event/I");  
00011   myTree->Branch("xtalSM",          &myXtalSM,         "xtalSM/I");  
00012   myTree->Branch("maxEneXtal",      &myMaxEneXtal,     "maxEneXtal/I");  
00013   myTree->Branch("nominalXtalSM",   &myNominalXtalSM,  "nominalXtalSM/I");  
00014   myTree->Branch("nextXtalSM",      &myNextXtalSM,     "nextXtalSM/I");  
00015   myTree->Branch("xtalEta",         &myXtalEta,        "xtalEta/I");  
00016   myTree->Branch("xtalPhi",         &myXtalPhi,        "xtalPhi/I");  
00017   myTree->Branch("tbMoving",        &myTbMoving,       "tbMoving/I");
00018   myTree->Branch("hodoX",           &myHodoX,          "hodoX/D");  
00019   myTree->Branch("hodoY",           &myHodoY,          "hodoY/D");  
00020   myTree->Branch("caloX",           &myCaloX,          "caloX/D");  
00021   myTree->Branch("caloY",           &myCaloY,          "caloY/D");  
00022   myTree->Branch("hodoSlopeX",      &myHodoSlopeX,     "hodoSlopeX/D");  
00023   myTree->Branch("hodoSlopeY",      &myHodoSlopeY,     "hodoSlopeY/D");  
00024   myTree->Branch("hodoQualityX",    &myHodoQualityX,   "hodoQualityX/D");  
00025   myTree->Branch("hodoQualityY",    &myHodoQualityY,   "hodoQualityY/D");  
00026   myTree->Branch("tdcOffset",       &myTdcOffset,      "tdcOffset/D");  
00027   myTree->Branch("allMatrix",       &myAllMatrix,      "allMatrix/I");
00028   myTree->Branch("amplit",          &myAmplit,         "amplit[49]/D");    
00029   myTree->Branch("crystal",         &myCrystal,        "crystal[49]/I");  
00030 }
00031 
00032 TreeMatrixCalib::~TreeMatrixCalib() 
00033 {
00034   myFile->cd();
00035   myTree->Write();
00036   myFile->Close();
00037   delete myFile;
00038 }
00039 
00040 void TreeMatrixCalib::store()
00041 {
00042   myTree->Fill();
00043 }
00044 
00045 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[])
00046 {
00047   myRun           = run;
00048   myEvent         = eve;
00049   myXtalSM        = xnum;
00050   myMaxEneXtal    = maxX;
00051   myNominalXtalSM = nomX;
00052   myNextXtalSM    = nextX;
00053   myXtalEta       = xeta;
00054   myXtalPhi       = xphi;
00055   myTbMoving      = tbm;
00056   myHodoX         = xx;
00057   myHodoY         = yy;
00058   myCaloX         = ecalx;
00059   myCaloY         = ecaly;
00060   myHodoSlopeX    = sx;
00061   myHodoSlopeY    = sy;
00062   myHodoQualityX  = qx;
00063   myHodoQualityY  = qy;
00064   myTdcOffset     = tdcoff;
00065   myAllMatrix     = allm;
00066   for (int ii=0; ii<49; ii++){
00067     myAmplit[ii]  = amp[ii]; 
00068     myCrystal[ii] = cry[ii]; 
00069   }
00070 }
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087