#include <ReadPGInfo.h>
Public Member Functions | |
char * | getId (int, int, int) |
TMatrixD | giveQC (int, int, int) |
TMatrixD | giveQCCal (int, int, int) |
TMatrixD | giveR (int, int, int) |
TMatrixD | giveSurvey (int, int, int) |
ReadPGInfo (const char *name) | |
~ReadPGInfo () | |
Private Attributes | |
TFile * | rootFile |
ReadPGInfo::ReadPGInfo | ( | const char * | name | ) |
Definition at line 775 of file ReadPGInfo.cc.
References rootFile.
ReadPGInfo::~ReadPGInfo | ( | ) |
char * ReadPGInfo::getId | ( | int | wheel, |
int | station, | ||
int | sector | ||
) |
Definition at line 783 of file ReadPGInfo.cc.
References chambers, NULL, position, and TOTALCHAMBERS.
Referenced by giveQC(), giveR(), and giveSurvey().
TMatrixD ReadPGInfo::giveQC | ( | int | wheel, |
int | station, | ||
int | sector | ||
) |
Definition at line 824 of file ReadPGInfo.cc.
References relativeConstraints::empty, getId(), NULL, and rootFile.
Referenced by giveQCCal().
{ TMatrixD *empty = new TMatrixD(0,0); char *id = getId(wheel, station, sector); if(id == NULL) return *empty; TDirectoryFile *myDir = (TDirectoryFile *)rootFile->Get(id); TDirectoryFile *myQC = (TDirectoryFile *)myDir->Get("QCW"); TMatrixD *QC; if(myQC == NULL) { QC = new TMatrixD(0,0); } else { QC = (TMatrixD *)myQC->Get("matrix"); } return *QC; }
TMatrixD ReadPGInfo::giveQCCal | ( | int | wheel, |
int | station, | ||
int | sector | ||
) |
Definition at line 803 of file ReadPGInfo.cc.
References trackerHits::c, error, and giveQC().
Referenced by DTMuonMillepede::getbcsMatrix(), DTMuonMillepede::getbqcMatrix(), DTMuonMillepede::getCcsMatrix(), and DTMuonMillepede::getCqcMatrix().
{ TMatrixD *mat = new TMatrixD(0,0); TMatrixD qc = giveQC(wheel, station, sector); if(qc.GetNrows() == 0) return *mat; mat->ResizeTo(12,2); int maxCount = 12; if(station == 4) maxCount = 8; for(int c = 0; c < maxCount; ++c) { float error; if(qc(c,1) == 0 || qc(c,3) == 0) { (*mat)(c,0) = (qc(c,0)+qc(c,2)) /2.0; (*mat)(c,1) = 500; } else { error = 1.0/(1.0/(qc(c,1)*qc(c,1))+1.0/(qc(c,3)*qc(c,3))); (*mat)(c, 0) = (qc(c,0)/(qc(c,1)*qc(c,1))+qc(c,2)/(qc(c,3)*qc(c,3)))*error; (*mat)(c, 1) = TMath::Sqrt(error); } } return *mat; }
TMatrixD ReadPGInfo::giveR | ( | int | wheel, |
int | station, | ||
int | sector | ||
) |
Definition at line 792 of file ReadPGInfo.cc.
References relativeConstraints::empty, getId(), NULL, dttmaxenums::R, and rootFile.
TMatrixD ReadPGInfo::giveSurvey | ( | int | wheel, |
int | station, | ||
int | sector | ||
) |
Definition at line 840 of file ReadPGInfo.cc.
References relativeConstraints::empty, getId(), NULL, and rootFile.
Referenced by DTMuonMillepede::getbcsMatrix(), and DTMuonMillepede::getbsurveyMatrix().
{ TMatrixD *empty = new TMatrixD(0,0); char *id = getId(wheel, station, sector); if(id == NULL) return *empty; TDirectoryFile *myDir = (TDirectoryFile *)rootFile->Get(id); TDirectoryFile *mySur = (TDirectoryFile *)myDir->Get("Survey"); TMatrixD *Survey = (TMatrixD *)mySur->Get("matrix_layer"); return *Survey; }
TFile* ReadPGInfo::rootFile [private] |
Definition at line 29 of file ReadPGInfo.h.
Referenced by giveQC(), giveR(), giveSurvey(), ReadPGInfo(), and ~ReadPGInfo().