| 1 |
#ifndef DIGITIZER_H |
#ifndef DIGITIZER_H |
| 2 |
#define DIGITIZER_H |
#define DIGITIZER_H |
| 3 |
#include <iostream> |
#include <iostream> |
| 4 |
#include <fstream> |
#include <fstream> |
| 5 |
|
|
| 6 |
|
|
| 7 |
#include <stdlib.h> |
#include <stdlib.h> |
| 8 |
#include <string.h> |
#include <string.h> |
| 9 |
#include <ctype.h> |
#include <ctype.h> |
| 10 |
|
|
| 11 |
#include "Riostream.h" |
#include "Riostream.h" |
| 12 |
#include "TFile.h" |
#include "TFile.h" |
| 13 |
#include "TDirectory.h" |
#include "TDirectory.h" |
| 14 |
#include "TTree.h" |
#include "TTree.h" |
| 15 |
#include "TLeafI.h" |
#include "TLeafI.h" |
| 16 |
#include "TH1.h" |
#include "TH1.h" |
| 17 |
#include "TH2.h" |
#include "TH2.h" |
| 18 |
#include "TMath.h" |
#include "TMath.h" |
| 19 |
#include "TSQLServer.h" |
#include "TSQLServer.h" |
| 20 |
// |
// |
| 21 |
#include "CRC.h" |
#include "CRC.h" |
| 22 |
|
|
| 23 |
class Digitizer{ |
class Digitizer{ |
| 24 |
|
|
| 25 |
|
|
| 26 |
protected: |
protected: |
| 27 |
|
|
| 28 |
// in and output data members |
// in and output data members |
| 29 |
|
|
| 30 |
TTree* fhBookTree; |
TTree* fhBookTree; |
| 31 |
ofstream fOutputfile; |
ofstream fOutputfile; |
| 32 |
|
|
| 33 |
|
|
| 34 |
static const int fPSCUbuffer = 8; |
static const int fPSCUbuffer = 8; |
| 35 |
static const int fTRIGGERbuffer = 153; //(bytes) |
static const int fTRIGGERbuffer = 152; //(bytes) |
| 36 |
static const int fTOFbuffer = 276; //(bytes) |
static const int fTOFbuffer = 276; //(bytes) |
| 37 |
static const int fACbuffer = 128; |
static const int fRunHeaderbuffer = 27; // ?? |
| 38 |
static const int fNDbuffer = 4; |
static const int fRunTrailerbuffer = 17; |
| 39 |
static const int fPADbuffer = 64; // changed from 32! |
static const int fACbuffer = 128; |
| 40 |
static const int fCALObuffer = 10000; |
static const int fNDbuffer = 6; |
| 41 |
static const float fCALOGeV2MIPratio = 0.0001059994; |
static const int fS4buffer = 3; |
| 42 |
|
static const int fPADbuffer = 64; // changed from 32! |
| 43 |
static const int fDummybuffer = 64; |
static const int fCALObuffer = 10000; |
| 44 |
|
static const float fCALOGeV2MIPratio = 0.0001059994; |
| 45 |
// dimensions of vectors and buffer, parameter for tracker |
|
| 46 |
static const int fTRACKbuffer = 50000; // to be optimized |
static const int fDummybuffer = 64; |
| 47 |
static const int fNviews = 12; |
|
| 48 |
static const int fNstrips_view = 3072; |
// dimensions of vectors and buffer, parameter for tracker |
| 49 |
static const int fNladder=3; |
static const int fTRACKbuffer = 50000; // to be optimized |
| 50 |
static const int fNstrips_ladder = 1024; |
static const int fNviews = 12; |
| 51 |
static const int fCutzop= 4; |
static const int fNstrips_view = 3072; |
| 52 |
static const int fCutclu= 7; |
static const int fNladder=3; |
| 53 |
static const int fNclst = 2; |
static const int fNstrips_ladder = 1024; |
| 54 |
|
static const int fCutzop= 4; |
| 55 |
|
static const int fCutclu= 7; |
| 56 |
static const float fAvePedex = 1200.; // to be adjusted |
static const int fNclst = 2; |
| 57 |
static const float fSigmaPedex = 1.; // to be adjusted |
|
| 58 |
static const float fAveSigmax = 4.3; // to be adjusted |
|
| 59 |
static const float fSigmaSigmax =0.1; // to be adjusted |
static const float fAvePedex = 1200.; // to be adjusted |
| 60 |
static const float fAvePedey = 2800.; // to be adjusted |
static const float fSigmaPedex = 1.; // to be adjusted |
| 61 |
static const float fSigmaPedey = 1.; // to be adjusted |
static const float fAveSigmax = 4.3; // to be adjusted |
| 62 |
static const float fAveSigmay = 8.; // to be adjusted |
static const float fSigmaSigmax =0.1; // to be adjusted |
| 63 |
static const float fSigmaSigmay =0.1; // to be adjusted |
static const float fAvePedey = 2800.; // to be adjusted |
| 64 |
static const float fSigmaCommon = 25.; // to be adjusted |
static const float fSigmaPedey = 1.; // to be adjusted |
| 65 |
static const float fMipCor = 1.; // to be adjusted |
static const float fAveSigmay = 8.; // to be adjusted |
| 66 |
|
static const float fSigmaSigmay =0.1; // to be adjusted |
| 67 |
|
static const float fSigmaCommon = 25.; // to be adjusted |
| 68 |
// end dimensions of vectors and buffer, parameter for tracker |
|
| 69 |
|
|
| 70 |
UShort_t fDataPSCU[fPSCUbuffer]; |
// end dimensions of vectors and buffer, parameter for tracker |
| 71 |
UInt_t fCounter; |
|
| 72 |
UInt_t fOBT; |
UShort_t fDataPSCU[fPSCUbuffer]; |
| 73 |
|
UInt_t fCounter; |
| 74 |
UShort_t fDataPadding[fPADbuffer]; |
UInt_t fCounterPhys; |
| 75 |
UInt_t fPadding; |
UInt_t fOBT; |
| 76 |
|
|
| 77 |
UChar_t fDataTrigger[fTRIGGERbuffer]; |
UShort_t fDataPadding[fPADbuffer]; |
| 78 |
|
UInt_t fPadding; |
| 79 |
UChar_t fDataTof[fTOFbuffer]; |
|
| 80 |
|
UShort_t fDataRunHeader[fRunHeaderbuffer]; |
| 81 |
UShort_t fDataAC[fACbuffer]; |
UShort_t fDataRunTrailer[fRunTrailerbuffer]; |
| 82 |
UShort_t fDataND[fACbuffer]; |
|
| 83 |
UShort_t fDataDummy[fDummybuffer]; |
UChar_t fDataTrigger[fTRIGGERbuffer]; |
| 84 |
|
UChar_t fDataTof[fTOFbuffer]; |
| 85 |
UShort_t fDataCALO[fCALObuffer]; |
|
| 86 |
UShort_t fSecCalo[4]; |
UShort_t fDataAC[fACbuffer]; |
| 87 |
UShort_t fSecCALOLength[4]; |
UShort_t fDataND[fNDbuffer]; |
| 88 |
UShort_t fCALOlength; |
UShort_t fDataS4[fS4buffer]; |
| 89 |
UShort_t fModCalo; |
UShort_t fDataDummy[fDummybuffer]; |
| 90 |
Float_t fCalomip[2][22][96]; // ADC to MIP conversion values |
|
| 91 |
Float_t fcalped[4][11][96]; // pedestals |
UShort_t fDataCALO[fCALObuffer]; |
| 92 |
Float_t fcalgood[4][11][96]; // used or not in the common noise calculation |
UShort_t fSecCalo[4]; |
| 93 |
Float_t fcalthr[4][11][6]; // thresholds |
UShort_t fSecCALOLength[4]; |
| 94 |
Float_t fcalrms[4][11][96]; // rms |
UShort_t fCALOlength; |
| 95 |
Float_t fcalbase[4][11][6]; // baselines (common noise) during calibration |
UShort_t fModCalo; |
| 96 |
Float_t fcalvar[4][11][6]; // variance |
Float_t fCalomip[2][22][96]; // ADC to MIP conversion values |
| 97 |
Float_t fcstwerr[4]; // status word |
Float_t fcalped[4][11][96]; // pedestals |
| 98 |
Float_t fcperror[4]; // unpacking error flag |
Float_t fcalgood[4][11][96]; // used or not in the common noise calculation |
| 99 |
UInt_t fGivenCaloCalib; |
Float_t fcalthr[4][11][6]; // thresholds |
| 100 |
|
Float_t fcalrms[4][11][96]; // rms |
| 101 |
char* fFilename; |
Float_t fcalbase[4][11][6]; // baselines (common noise) during calibration |
| 102 |
UInt_t fLen; |
Float_t fcalvar[4][11][6]; // variance |
| 103 |
|
Float_t fcstwerr[4]; // status word |
| 104 |
|
Float_t fcperror[4]; // unpacking error flag |
| 105 |
// vectors, buffer, and variables for tracker |
UInt_t fGivenCaloCalib; |
| 106 |
UShort_t fDataTrack[fTRACKbuffer]; |
|
| 107 |
UInt_t fTracklength; // Actual length of buffer |
char* fFilename; |
| 108 |
Float_t fPedeTrack[fNviews][fNstrips_view]; |
UInt_t fLen; |
| 109 |
Float_t fSigmaTrack[fNviews][fNstrips_view]; |
|
| 110 |
// end vectors, buffer, and variables for tracker |
|
| 111 |
|
// vectors, buffer, and variables for tracker |
| 112 |
|
UShort_t fDataTrack[fTRACKbuffer]; |
| 113 |
|
UInt_t fTracklength; // Actual length of buffer |
| 114 |
// |
Float_t fPedeTrack[fNviews][fNstrips_view]; |
| 115 |
// db variables |
Float_t fSigmaTrack[fNviews][fNstrips_view]; |
| 116 |
// |
Float_t fMipCor[fNladder][fNviews] ; |
| 117 |
TSQLServer *fDbc; |
// end vectors, buffer, and variables for tracker |
| 118 |
// Declaration of leave types |
|
| 119 |
Int_t Irun; |
|
| 120 |
Int_t Ievnt; |
|
| 121 |
Int_t Ipa; |
// |
| 122 |
Float_t X0; |
// db variables |
| 123 |
Float_t Y0; |
// |
| 124 |
Float_t Z0; |
TSQLServer *fDbc; |
| 125 |
Float_t Theta; |
// Declaration of leave types |
| 126 |
Float_t Phi; |
Int_t Irun; |
| 127 |
Float_t P0; |
Int_t Ievnt; |
| 128 |
Int_t Nthtof; |
Int_t Ipa; |
| 129 |
UChar_t Ipltof[100]; //[Nthtof] |
Float_t X0; |
| 130 |
UChar_t Ipaddle[100]; //[Nthtof] |
Float_t Y0; |
| 131 |
UChar_t Ipartof[100]; //[Nthtof] |
Float_t Z0; |
| 132 |
Float_t Xintof[100]; //[Nthtof] |
Float_t Theta; |
| 133 |
Float_t Yintof[100]; //[Nthtof] |
Float_t Phi; |
| 134 |
Float_t Zintof[100]; //[Nthtof] |
Float_t P0; |
| 135 |
Float_t Xouttof[100]; //[Nthtof] |
Int_t Nthtof; |
| 136 |
Float_t Youttof[100]; //[Nthtof] |
UChar_t Ipltof[100]; //[Nthtof] |
| 137 |
Float_t Zouttof[100]; //[Nthtof] |
UChar_t Ipaddle[100]; //[Nthtof] |
| 138 |
Float_t Ereltof[100]; //[Nthtof] |
UChar_t Ipartof[100]; //[Nthtof] |
| 139 |
Float_t Timetof[100]; //[Nthtof] |
Float_t Xintof[100]; //[Nthtof] |
| 140 |
Float_t Pathtof[100]; //[Nthtof] |
Float_t Yintof[100]; //[Nthtof] |
| 141 |
Float_t P0tof[100]; //[Nthtof] |
Float_t Zintof[100]; //[Nthtof] |
| 142 |
Int_t Nthcat; |
Float_t Xouttof[100]; //[Nthtof] |
| 143 |
UChar_t Iparcat[50]; //[Nthcat] |
Float_t Youttof[100]; //[Nthtof] |
| 144 |
UChar_t Icat[50]; //[Nthcat] |
Float_t Zouttof[100]; //[Nthtof] |
| 145 |
Float_t Xincat[50]; //[Nthcat] |
Float_t Ereltof[100]; //[Nthtof] |
| 146 |
Float_t Yincat[50]; //[Nthcat] |
Float_t Timetof[100]; //[Nthtof] |
| 147 |
Float_t Zincat[50]; //[Nthcat] |
Float_t Pathtof[100]; //[Nthtof] |
| 148 |
Float_t Xoutcat[50]; //[Nthcat] |
Float_t P0tof[100]; //[Nthtof] |
| 149 |
Float_t Youtcat[50]; //[Nthcat] |
Int_t Nthcat; |
| 150 |
Float_t Zoutcat[50]; //[Nthcat] |
UChar_t Iparcat[50]; //[Nthcat] |
| 151 |
Float_t Erelcat[50]; //[Nthcat] |
UChar_t Icat[50]; //[Nthcat] |
| 152 |
Float_t Timecat[50]; //[Nthcat] |
Float_t Xincat[50]; //[Nthcat] |
| 153 |
Float_t Pathcat[50]; //[Nthcat] |
Float_t Yincat[50]; //[Nthcat] |
| 154 |
Float_t P0cat[50]; //[Nthcat] |
Float_t Zincat[50]; //[Nthcat] |
| 155 |
Int_t Nthcas; |
Float_t Xoutcat[50]; //[Nthcat] |
| 156 |
UChar_t Iparcas[50]; //[Nthcas] |
Float_t Youtcat[50]; //[Nthcat] |
| 157 |
UChar_t Icas[50]; //[Nthcas] |
Float_t Zoutcat[50]; //[Nthcat] |
| 158 |
Float_t Xincas[50]; //[Nthcas] |
Float_t Erelcat[50]; //[Nthcat] |
| 159 |
Float_t Yincas[50]; //[Nthcas] |
Float_t Timecat[50]; //[Nthcat] |
| 160 |
Float_t Zincas[50]; //[Nthcas] |
Float_t Pathcat[50]; //[Nthcat] |
| 161 |
Float_t Xoutcas[50]; //[Nthcas] |
Float_t P0cat[50]; //[Nthcat] |
| 162 |
Float_t Youtcas[50]; //[Nthcas] |
Int_t Nthcas; |
| 163 |
Float_t Zoutcas[50]; //[Nthcas] |
UChar_t Iparcas[50]; //[Nthcas] |
| 164 |
Float_t Erelcas[50]; //[Nthcas] |
UChar_t Icas[50]; //[Nthcas] |
| 165 |
Float_t Timecas[50]; //[Nthcas] |
Float_t Xincas[50]; //[Nthcas] |
| 166 |
Float_t Pathcas[50]; //[Nthcas] |
Float_t Yincas[50]; //[Nthcas] |
| 167 |
Float_t P0cas[50]; //[Nthcas] |
Float_t Zincas[50]; //[Nthcas] |
| 168 |
Int_t Nthspe; |
Float_t Xoutcas[50]; //[Nthcas] |
| 169 |
UChar_t Iparspe[100]; //[Nthspe] |
Float_t Youtcas[50]; //[Nthcas] |
| 170 |
UChar_t Itrpb[100]; //[Nthspe] |
Float_t Zoutcas[50]; //[Nthcas] |
| 171 |
UChar_t Itrsl[100]; //[Nthspe] |
Float_t Erelcas[50]; //[Nthcas] |
| 172 |
UChar_t Itspa[100]; //[Nthspe] |
Float_t Timecas[50]; //[Nthcas] |
| 173 |
Float_t Xinspe[100]; //[Nthspe] |
Float_t Pathcas[50]; //[Nthcas] |
| 174 |
Float_t Yinspe[100]; //[Nthspe] |
Float_t P0cas[50]; //[Nthcas] |
| 175 |
Float_t Zinspe[100]; //[Nthspe] |
Int_t Nthspe; |
| 176 |
Float_t Xoutspe[100]; //[Nthspe] |
UChar_t Iparspe[100]; //[Nthspe] |
| 177 |
Float_t Youtspe[100]; //[Nthspe] |
UChar_t Itrpb[100]; //[Nthspe] |
| 178 |
Float_t Zoutspe[100]; //[Nthspe] |
UChar_t Itrsl[100]; //[Nthspe] |
| 179 |
Float_t Xavspe[100]; //[Nthspe] |
UChar_t Itspa[100]; //[Nthspe] |
| 180 |
Float_t Yavspe[100]; //[Nthspe] |
Float_t Xinspe[100]; //[Nthspe] |
| 181 |
Float_t Zavspe[100]; //[Nthspe] |
Float_t Yinspe[100]; //[Nthspe] |
| 182 |
Float_t Erelspe[100]; //[Nthspe] |
Float_t Zinspe[100]; //[Nthspe] |
| 183 |
Float_t Pathspe[100]; //[Nthspe] |
Float_t Xoutspe[100]; //[Nthspe] |
| 184 |
Float_t P0spe[100]; //[Nthspe] |
Float_t Youtspe[100]; //[Nthspe] |
| 185 |
UChar_t Nxmult[100]; //[Nthspe] |
Float_t Zoutspe[100]; //[Nthspe] |
| 186 |
UChar_t Nymult[100]; //[Nthspe] |
Float_t Xavspe[100]; //[Nthspe] |
| 187 |
Int_t Nstrpx; |
Float_t Yavspe[100]; //[Nthspe] |
| 188 |
UChar_t Npstripx[1000]; //[Nstrpx] |
Float_t Zavspe[100]; //[Nthspe] |
| 189 |
UChar_t Ntstripx[1000]; //[Nstrpx] |
Float_t Erelspe[100]; //[Nthspe] |
| 190 |
UShort_t Istripx[1000]; //[Nstrpx] |
Float_t Pathspe[100]; //[Nthspe] |
| 191 |
//UInt_t Istripx[1000]; //[Nstrpx] |
Float_t P0spe[100]; //[Nthspe] |
| 192 |
Float_t Qstripx[1000]; //[Nstrpx] |
UChar_t Nxmult[100]; //[Nthspe] |
| 193 |
Float_t Xstripx[1000]; //[Nstrpx] |
UChar_t Nymult[100]; //[Nthspe] |
| 194 |
Int_t Nstrpy; |
Int_t Nstrpx; |
| 195 |
UChar_t Npstripy[1000]; //[Nstrpy] |
UChar_t Npstripx[1000]; //[Nstrpx] |
| 196 |
UChar_t Ntstripy[1000]; //[Nstrpy] |
UChar_t Ntstripx[1000]; //[Nstrpx] |
| 197 |
UShort_t Istripy[1000]; //[Nstrpy] |
UShort_t Istripx[1000]; //[Nstrpx] |
| 198 |
//UInt_t Istripy[1000]; //[Nstrpy] |
//UInt_t Istripx[1000]; //[Nstrpx] |
| 199 |
Float_t Qstripy[1000]; //[Nstrpy] |
Float_t Qstripx[1000]; //[Nstrpx] |
| 200 |
Float_t Ystripy[1000]; //[Nstrpy] |
Float_t Xstripx[1000]; //[Nstrpx] |
| 201 |
Int_t Nthcali; |
Int_t Nstrpy; |
| 202 |
UChar_t Icaplane[4224]; //[Nthcali] |
UChar_t Npstripy[1000]; //[Nstrpy] |
| 203 |
UChar_t Icastrip[4224]; //[Nthcali] |
UChar_t Ntstripy[1000]; //[Nstrpy] |
| 204 |
Int_t Icamod[4224]; //[Nthcali] |
UShort_t Istripy[1000]; //[Nstrpy] |
| 205 |
Float_t Enestrip[4224]; //[Nthcali] |
//UInt_t Istripy[1000]; //[Nstrpy] |
| 206 |
Int_t Nthcal; |
Float_t Qstripy[1000]; //[Nstrpy] |
| 207 |
UChar_t Icapl[1000]; //[Nthcal] |
Float_t Ystripy[1000]; //[Nstrpy] |
| 208 |
UChar_t Icasi[1000]; //[Nthcal] |
Int_t Nthcali; |
| 209 |
UChar_t Icast[1000]; //[Nthcal] |
UChar_t Icaplane[4224]; //[Nthcali] |
| 210 |
Float_t Xincal[1000]; //[Nthcal] |
UChar_t Icastrip[4224]; //[Nthcali] |
| 211 |
Float_t Yincal[1000]; //[Nthcal] |
Int_t Icamod[4224]; //[Nthcali] |
| 212 |
Float_t Zincal[1000]; //[Nthcal] |
Float_t Enestrip[4224]; //[Nthcali] |
| 213 |
Float_t Erelcal[1000]; //[Nthcal] |
Int_t Nthcal; |
| 214 |
Int_t Nthnd; |
UChar_t Icapl[1000]; //[Nthcal] |
| 215 |
UChar_t Itubend[200]; //[Nthnd] |
UChar_t Icasi[1000]; //[Nthcal] |
| 216 |
UChar_t Iparnd[200]; //[Nthnd] |
UChar_t Icast[1000]; //[Nthcal] |
| 217 |
Float_t Xinnd[200]; //[Nthnd] |
Float_t Xincal[1000]; //[Nthcal] |
| 218 |
Float_t Yinnd[200]; //[Nthnd] |
Float_t Yincal[1000]; //[Nthcal] |
| 219 |
Float_t Zinnd[200]; //[Nthnd] |
Float_t Zincal[1000]; //[Nthcal] |
| 220 |
Float_t Xoutnd[200]; //[Nthnd] |
Float_t Erelcal[1000]; //[Nthcal] |
| 221 |
Float_t Youtnd[200]; //[Nthnd] |
Int_t Nthnd; |
| 222 |
Float_t Zoutnd[200]; //[Nthnd] |
UChar_t Itubend[200]; //[Nthnd] |
| 223 |
Float_t Erelnd[200]; //[Nthnd] |
UChar_t Iparnd[200]; //[Nthnd] |
| 224 |
Float_t Timend[200]; //[Nthnd] |
Float_t Xinnd[200]; //[Nthnd] |
| 225 |
Float_t Pathnd[200]; //[Nthnd] |
Float_t Yinnd[200]; //[Nthnd] |
| 226 |
Float_t P0nd[200]; //[Nthnd] |
Float_t Zinnd[200]; //[Nthnd] |
| 227 |
Int_t Nthcard; |
Float_t Xoutnd[200]; //[Nthnd] |
| 228 |
UChar_t Iparcard[100]; //[Nthcard] |
Float_t Youtnd[200]; //[Nthnd] |
| 229 |
UChar_t Icard[100]; //[Nthcard] |
Float_t Zoutnd[200]; //[Nthnd] |
| 230 |
Float_t Xincard[100]; //[Nthcard] |
Float_t Erelnd[200]; //[Nthnd] |
| 231 |
Float_t Yincard[100]; //[Nthcard] |
Float_t Timend[200]; //[Nthnd] |
| 232 |
Float_t Zincard[100]; //[Nthcard] |
Float_t Pathnd[200]; //[Nthnd] |
| 233 |
Float_t Xoutcard[100]; //[Nthcard] |
Float_t P0nd[200]; //[Nthnd] |
| 234 |
Float_t Youtcard[100]; //[Nthcard] |
Int_t Nthcard; |
| 235 |
Float_t Zoutcard[100]; //[Nthcard] |
UChar_t Iparcard[100]; //[Nthcard] |
| 236 |
Float_t Erelcard[100]; //[Nthcard] |
UChar_t Icard[100]; //[Nthcard] |
| 237 |
Float_t Timecard[100]; //[Nthcard] |
Float_t Xincard[100]; //[Nthcard] |
| 238 |
Float_t Pathcard[100]; //[Nthcard] |
Float_t Yincard[100]; //[Nthcard] |
| 239 |
Float_t P0card[100]; //[Nthcard] |
Float_t Zincard[100]; //[Nthcard] |
| 240 |
|
Float_t Xoutcard[100]; //[Nthcard] |
| 241 |
// List of branches |
Float_t Youtcard[100]; //[Nthcard] |
| 242 |
TBranch *b_Irun; //! |
Float_t Zoutcard[100]; //[Nthcard] |
| 243 |
TBranch *b_Ievnt; //! |
Float_t Erelcard[100]; //[Nthcard] |
| 244 |
TBranch *b_Ipa; //! |
Float_t Timecard[100]; //[Nthcard] |
| 245 |
TBranch *b_X0; //! |
Float_t Pathcard[100]; //[Nthcard] |
| 246 |
TBranch *b_Y0; //! |
Float_t P0card[100]; //[Nthcard] |
| 247 |
TBranch *b_Z0; //! |
|
| 248 |
TBranch *b_Theta; //! |
// List of branches |
| 249 |
TBranch *b_Phi; //! |
TBranch *b_Irun; //! |
| 250 |
TBranch *b_P0; //! |
TBranch *b_Ievnt; //! |
| 251 |
TBranch *b_Nthtof; //! |
TBranch *b_Ipa; //! |
| 252 |
TBranch *b_Ipltof; //! |
TBranch *b_X0; //! |
| 253 |
TBranch *b_Ipaddle; //! |
TBranch *b_Y0; //! |
| 254 |
TBranch *b_Ipartof; //! |
TBranch *b_Z0; //! |
| 255 |
TBranch *b_Xintof; //! |
TBranch *b_Theta; //! |
| 256 |
TBranch *b_Yintof; //! |
TBranch *b_Phi; //! |
| 257 |
TBranch *b_Zintof; //! |
TBranch *b_P0; //! |
| 258 |
TBranch *b_Xouttof; //! |
TBranch *b_Nthtof; //! |
| 259 |
TBranch *b_Youttof; //! |
TBranch *b_Ipltof; //! |
| 260 |
TBranch *b_Zouttof; //! |
TBranch *b_Ipaddle; //! |
| 261 |
TBranch *b_Ereltof; //! |
TBranch *b_Ipartof; //! |
| 262 |
TBranch *b_Timetof; //! |
TBranch *b_Xintof; //! |
| 263 |
TBranch *b_Pathtof; //! |
TBranch *b_Yintof; //! |
| 264 |
TBranch *b_P0tof; //! |
TBranch *b_Zintof; //! |
| 265 |
TBranch *b_Nthcat; //! |
TBranch *b_Xouttof; //! |
| 266 |
TBranch *b_Iparcat; //! |
TBranch *b_Youttof; //! |
| 267 |
TBranch *b_Icat; //! |
TBranch *b_Zouttof; //! |
| 268 |
TBranch *b_Xincat; //! |
TBranch *b_Ereltof; //! |
| 269 |
TBranch *b_Yincat; //! |
TBranch *b_Timetof; //! |
| 270 |
TBranch *b_Zincat; //! |
TBranch *b_Pathtof; //! |
| 271 |
TBranch *b_Xoutcat; //! |
TBranch *b_P0tof; //! |
| 272 |
TBranch *b_Youtcat; //! |
TBranch *b_Nthcat; //! |
| 273 |
TBranch *b_Zoutcat; //! |
TBranch *b_Iparcat; //! |
| 274 |
TBranch *b_Erelcat; //! |
TBranch *b_Icat; //! |
| 275 |
TBranch *b_Timecat; //! |
TBranch *b_Xincat; //! |
| 276 |
TBranch *b_Pathcat; //! |
TBranch *b_Yincat; //! |
| 277 |
TBranch *b_P0cat; //! |
TBranch *b_Zincat; //! |
| 278 |
TBranch *b_Nthcas; //! |
TBranch *b_Xoutcat; //! |
| 279 |
TBranch *b_Iparcas; //! |
TBranch *b_Youtcat; //! |
| 280 |
TBranch *b_Icas; //! |
TBranch *b_Zoutcat; //! |
| 281 |
TBranch *b_Xincas; //! |
TBranch *b_Erelcat; //! |
| 282 |
TBranch *b_Yincas; //! |
TBranch *b_Timecat; //! |
| 283 |
TBranch *b_Zincas; //! |
TBranch *b_Pathcat; //! |
| 284 |
TBranch *b_Xoutcas; //! |
TBranch *b_P0cat; //! |
| 285 |
TBranch *b_Youtcas; //! |
TBranch *b_Nthcas; //! |
| 286 |
TBranch *b_Zoutcas; //! |
TBranch *b_Iparcas; //! |
| 287 |
TBranch *b_Erelcas; //! |
TBranch *b_Icas; //! |
| 288 |
TBranch *b_Timecas; //! |
TBranch *b_Xincas; //! |
| 289 |
TBranch *b_Pathcas; //! |
TBranch *b_Yincas; //! |
| 290 |
TBranch *b_P0cas; //! |
TBranch *b_Zincas; //! |
| 291 |
TBranch *b_Nthspe; //! |
TBranch *b_Xoutcas; //! |
| 292 |
TBranch *b_Iparspe; //! |
TBranch *b_Youtcas; //! |
| 293 |
TBranch *b_Itrpb; //! |
TBranch *b_Zoutcas; //! |
| 294 |
TBranch *b_Itrsl; //! |
TBranch *b_Erelcas; //! |
| 295 |
TBranch *b_Itspa; //! |
TBranch *b_Timecas; //! |
| 296 |
TBranch *b_Xinspe; //! |
TBranch *b_Pathcas; //! |
| 297 |
TBranch *b_Yinspe; //! |
TBranch *b_P0cas; //! |
| 298 |
TBranch *b_Zinspe; //! |
TBranch *b_Nthspe; //! |
| 299 |
TBranch *b_Xoutspe; //! |
TBranch *b_Iparspe; //! |
| 300 |
TBranch *b_Youtspe; //! |
TBranch *b_Itrpb; //! |
| 301 |
TBranch *b_Zoutspe; //! |
TBranch *b_Itrsl; //! |
| 302 |
TBranch *b_Xavspe; //! |
TBranch *b_Itspa; //! |
| 303 |
TBranch *b_Yavspe; //! |
TBranch *b_Xinspe; //! |
| 304 |
TBranch *b_Zavspe; //! |
TBranch *b_Yinspe; //! |
| 305 |
TBranch *b_Erelspe; //! |
TBranch *b_Zinspe; //! |
| 306 |
TBranch *b_Pathspe; //! |
TBranch *b_Xoutspe; //! |
| 307 |
TBranch *b_P0spe; //! |
TBranch *b_Youtspe; //! |
| 308 |
TBranch *b_Nxmult; //! |
TBranch *b_Zoutspe; //! |
| 309 |
TBranch *b_Nymult; //! |
TBranch *b_Xavspe; //! |
| 310 |
TBranch *b_Nstrpx; //! |
TBranch *b_Yavspe; //! |
| 311 |
TBranch *b_Npstripx; //! |
TBranch *b_Zavspe; //! |
| 312 |
TBranch *b_Ntstripx; //! |
TBranch *b_Erelspe; //! |
| 313 |
TBranch *b_Istripx; //! |
TBranch *b_Pathspe; //! |
| 314 |
TBranch *b_Qstripx; //! |
TBranch *b_P0spe; //! |
| 315 |
TBranch *b_Xstripx; //! |
TBranch *b_Nxmult; //! |
| 316 |
TBranch *b_Nstrpy; //! |
TBranch *b_Nymult; //! |
| 317 |
TBranch *b_Npstripy; //! |
TBranch *b_Nstrpx; //! |
| 318 |
TBranch *b_Ntstripy; //! |
TBranch *b_Npstripx; //! |
| 319 |
TBranch *b_Istripy; //! |
TBranch *b_Ntstripx; //! |
| 320 |
TBranch *b_Qstripy; //! |
TBranch *b_Istripx; //! |
| 321 |
TBranch *b_Ystripy; //! |
TBranch *b_Qstripx; //! |
| 322 |
TBranch *b_Nthcali; //! |
TBranch *b_Xstripx; //! |
| 323 |
TBranch *b_Icaplane; //! |
TBranch *b_Nstrpy; //! |
| 324 |
TBranch *b_Icastrip; //! |
TBranch *b_Npstripy; //! |
| 325 |
TBranch *b_Icamod; //! |
TBranch *b_Ntstripy; //! |
| 326 |
TBranch *b_Enestrip; //! |
TBranch *b_Istripy; //! |
| 327 |
TBranch *b_Nthcal; //! |
TBranch *b_Qstripy; //! |
| 328 |
TBranch *b_Icapl; //! |
TBranch *b_Ystripy; //! |
| 329 |
TBranch *b_Icasi; //! |
TBranch *b_Nthcali; //! |
| 330 |
TBranch *b_Icast; //! |
TBranch *b_Icaplane; //! |
| 331 |
TBranch *b_Xincal; //! |
TBranch *b_Icastrip; //! |
| 332 |
TBranch *b_Yincal; //! |
TBranch *b_Icamod; //! |
| 333 |
TBranch *b_Zincal; //! |
TBranch *b_Enestrip; //! |
| 334 |
TBranch *b_Erelcal; //! |
TBranch *b_Nthcal; //! |
| 335 |
TBranch *b_Nthnd; //! |
TBranch *b_Icapl; //! |
| 336 |
TBranch *b_Itubend; //! |
TBranch *b_Icasi; //! |
| 337 |
TBranch *b_Iparnd; //! |
TBranch *b_Icast; //! |
| 338 |
TBranch *b_Xinnd; //! |
TBranch *b_Xincal; //! |
| 339 |
TBranch *b_Yinnd; //! |
TBranch *b_Yincal; //! |
| 340 |
TBranch *b_Zinnd; //! |
TBranch *b_Zincal; //! |
| 341 |
TBranch *b_Xoutnd; //! |
TBranch *b_Erelcal; //! |
| 342 |
TBranch *b_Youtnd; //! |
TBranch *b_Nthnd; //! |
| 343 |
TBranch *b_Zoutnd; //! |
TBranch *b_Itubend; //! |
| 344 |
TBranch *b_Erelnd; //! |
TBranch *b_Iparnd; //! |
| 345 |
TBranch *b_Timend; //! |
TBranch *b_Xinnd; //! |
| 346 |
TBranch *b_Pathnd; //! |
TBranch *b_Yinnd; //! |
| 347 |
TBranch *b_P0nd; //! |
TBranch *b_Zinnd; //! |
| 348 |
TBranch *b_Nthcard; //! |
TBranch *b_Xoutnd; //! |
| 349 |
TBranch *b_Iparcard; //! |
TBranch *b_Youtnd; //! |
| 350 |
TBranch *b_Icard; //! |
TBranch *b_Zoutnd; //! |
| 351 |
TBranch *b_Xincard; //! |
TBranch *b_Erelnd; //! |
| 352 |
TBranch *b_Yincard; //! |
TBranch *b_Timend; //! |
| 353 |
TBranch *b_Zincard; //! |
TBranch *b_Pathnd; //! |
| 354 |
TBranch *b_Xoutcard; //! |
TBranch *b_P0nd; //! |
| 355 |
TBranch *b_Youtcard; //! |
TBranch *b_Nthcard; //! |
| 356 |
TBranch *b_Zoutcard; //! |
TBranch *b_Iparcard; //! |
| 357 |
TBranch *b_Erelcard; //! |
TBranch *b_Icard; //! |
| 358 |
TBranch *b_Timecard; //! |
TBranch *b_Xincard; //! |
| 359 |
TBranch *b_Pathcard; //! |
TBranch *b_Yincard; //! |
| 360 |
TBranch *b_P0card; //! |
TBranch *b_Zincard; //! |
| 361 |
// |
TBranch *b_Xoutcard; //! |
| 362 |
|
TBranch *b_Youtcard; //! |
| 363 |
public: |
TBranch *b_Zoutcard; //! |
| 364 |
|
TBranch *b_Erelcard; //! |
| 365 |
Digitizer(TTree *tree, char* &file_raw); // constructor |
TBranch *b_Timecard; //! |
| 366 |
|
TBranch *b_Pathcard; //! |
| 367 |
void Close(); |
TBranch *b_P0card; //! |
| 368 |
|
// |
| 369 |
void SetTree(TTree *tree) {fhBookTree = tree;}; |
|
| 370 |
|
public: |
| 371 |
|
|
| 372 |
void Loop(); // does the looping over events |
Digitizer(TTree *tree, char* &file_raw); // constructor |
| 373 |
|
|
| 374 |
|
void Close(); |
| 375 |
|
|
| 376 |
void DigitizePSCU(UInt_t, UChar_t); // digitizes the CPU header |
void SetTree(TTree *tree) {fhBookTree = tree;}; |
| 377 |
void AddPadding(); |
|
| 378 |
void DigitizeTRIGGER(); // digitizes the trigger |
|
| 379 |
Int_t DigitizeTOF(); // digitizes the tof |
void Loop(); // does the looping over events |
| 380 |
void DigitizeAC(); // digitizes the anti-counter |
|
| 381 |
void DigitizeND(); // digitizes the ND |
|
| 382 |
void DigitizeCALO(); // digitizes the calorimeter |
|
| 383 |
void DigitizeCALOCALIB(); // digitizes the calorimeter calibration |
// void DigitizePSCU(UInt_t, UChar_t); // digitizes the CPU header |
| 384 |
void DigitizeCALORAW(); // digitizes the calorimeter |
void DigitizePSCU(UInt_t, UChar_t, UShort_t*); // digitizes the CPU header |
| 385 |
void DigitizeCALOCOMPRESS(); // digitizes the calorimeter |
void AddPadding(); |
| 386 |
void DigitizeCALOFULL(); // digitizes the calorimeter |
void DigitizeRunHeader(); |
| 387 |
|
void DigitizeRunTrailer(); |
| 388 |
Float_t GetCALOen(Int_t sec, Int_t plane, Int_t strip); // retrieve calorimeter strip energy from the simulation |
// void DigitizeTRIGGER(); // SO nov'07: included in DigitizeTOF |
| 389 |
void ClearCaloCalib(Int_t s); // clear calorimeter calibration variables for section s |
Int_t DigitizeTOF(); // digitizes the tof |
| 390 |
Int_t CaloLoadCalib(Int_t s,TString fcalname, UInt_t calibno); // load calorimeter calibration variables for section s from file fcalname entry calibno |
void DigitizeAC(); // digitizes the anti-counter |
| 391 |
void CaloLoadCalib(); |
void DigitizeND(); // digitizes the ND |
| 392 |
|
void DigitizeS4(); // digitizes the S4 |
| 393 |
void DigitizeDummy(); // digitizes the dummy detector |
void DigitizeCALO(); // digitizes the calorimeter |
| 394 |
|
void DigitizeCALOCALIB(); // digitizes the calorimeter calibration |
| 395 |
// ToF methods: |
void DigitizeCALORAW(); // digitizes the calorimeter |
| 396 |
UChar_t EvaluateCrcTof(UChar_t*); |
void DigitizeCALOCOMPRESS(); // digitizes the calorimeter |
| 397 |
void Paddle2Pmt(Int_t, Int_t, Int_t*, Int_t*); |
void DigitizeCALOFULL(); // digitizes the calorimeter |
| 398 |
//void Paddle2Pmt(Int_t, Int_t, Int_t &pmtleft, Int_t &pmtright); |
|
| 399 |
UChar_t Bin2GrayTof(UChar_t, UChar_t); |
Float_t GetCALOen(Int_t sec, Int_t plane, Int_t strip); // retrieve calorimeter strip energy from the simulation |
| 400 |
|
void ClearCaloCalib(Int_t s); // clear calorimeter calibration variables for section s |
| 401 |
UShort_t* GetDataAC(){return(fDataAC);}; // retrieve AC data (not used right now) |
Int_t CaloLoadCalib(Int_t s,TString fcalname, UInt_t calibno); // load calorimeter calibration variables for section s from file fcalname entry calibno |
| 402 |
|
void CaloLoadCalib(); |
| 403 |
UShort_t* GetDataCALO(){return(fDataCALO);}; // retrieve AC data (not used right now) |
|
| 404 |
|
void DigitizeDummy(); // digitizes the dummy detector |
| 405 |
// methods for Tracker |
|
| 406 |
void DigitizeTrack(); // digitizes the Tracker data |
// ToF methods: |
| 407 |
void DigitizeTrackCalib(Int_t ii); // digitizes the Tracker calibration (x view or y view) |
UChar_t EvaluateCrcTof(UChar_t*); |
| 408 |
void WriteTrackCalib(); // writes Tracker calibration to file |
void Paddle2Pmt(Int_t, Int_t, Int_t*, Int_t*); |
| 409 |
void ClearTrackCalib(); // clear tracker calibration |
//void Paddle2Pmt(Int_t, Int_t, Int_t &pmtleft, Int_t &pmtright); |
| 410 |
void LoadTrackCalib(); // load in memmory tracker calibration |
UChar_t Bin2GrayTof(UChar_t, UChar_t); |
| 411 |
void CompressTrackData(Float_t AdcTrack[fNviews][fNstrips_view]); // Compress and Digitize data of one Ladder in turn |
void Crc8Tof(UChar_t*, UChar_t*); |
| 412 |
void LoadMipCor(); // Load the strip calibration in memory |
|
| 413 |
Float_t SaturationTrack(Float_t ADC); // Saturation simulation |
UChar_t EvaluateCrcTrigger(UChar_t*, Int_t); |
| 414 |
// end methods for Tracker |
|
| 415 |
|
UShort_t* GetDataAC(){return(fDataAC);}; // retrieve AC data (not used right now) |
| 416 |
void WriteData(); // writes data to file |
|
| 417 |
void ReadData(); |
UShort_t* GetDataCALO(){return(fDataCALO);}; // retrieve AC data (not used right now) |
| 418 |
|
|
| 419 |
// |
// methods for Tracker |
| 420 |
|
void DigitizeTrack(); // digitizes the Tracker data |
| 421 |
}; |
void DigitizeTrackCalib(Int_t ii); // digitizes the Tracker calibration (x view or y view) |
| 422 |
|
void WriteTrackCalib(); // writes Tracker calibration to file |
| 423 |
#endif /* DIGITIZER_H */ |
void ClearTrackCalib(); // clear tracker calibration |
| 424 |
|
void LoadTrackCalib(); // load in memmory tracker calibration |
| 425 |
|
void CompressTrackData(Float_t AdcTrack[fNviews][fNstrips_view]); // Compress and Digitize data of one Ladder in turn |
| 426 |
|
void LoadMipCor(); // Load the strip calibration in memory |
| 427 |
|
Float_t SaturationTrack(Float_t ADC); // Saturation simulation |
| 428 |
|
// end methods for Tracker |
| 429 |
|
|
| 430 |
|
void WriteRunHeader(); |
| 431 |
|
void WriteRunTrailer(); |
| 432 |
|
void WriteData(); // writes data to file |
| 433 |
|
void ReadData(); |
| 434 |
|
|
| 435 |
|
// |
| 436 |
|
|
| 437 |
|
}; |
| 438 |
|
|
| 439 |
|
#endif /* DIGITIZER_H */ |
| 440 |
|
|
| 441 |
|
|
| 442 |
|
|