fRadioTPC(0),
fRadioSideA(0),
fRadioSideC(0),
+ fRadioROC(0),
fRadioSector(0),
fComboAddDrawOpt(0),
fChkAuto(0),
fRadioSideC->Connect("Clicked()", "AliTPCCalibViewerGUI", this, "HandleButtonsCuts()");
fRadioSideC->SetToolTipText("Use only side C.");
- // sector radio button
- fRadioSector = new TGRadioButton(fContCuts, "ROC", 23);
+ // roc radio button
+ fRadioROC = new TGRadioButton(fContCuts, "ROC", 23);
+ fContCuts->AddFrame(fRadioROC, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
+ fRadioROC->Connect("Clicked()", "AliTPCCalibViewerGUI", this, "HandleButtonsCuts()");
+ fRadioROC->SetToolTipText("Use only one ROC (readout chamber).");
+
+ // sector radio button
+ fRadioSector = new TGRadioButton(fContCuts, "Sector", 24);
fContCuts->AddFrame(fRadioSector, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
fRadioSector->Connect("Clicked()", "AliTPCCalibViewerGUI", this, "HandleButtonsCuts()");
- fRadioSector->SetToolTipText("Use only one ROC (readout chamber).");
+ fRadioSector->SetToolTipText("Use only one Sector (0-17 A-Side, 18-35 C-Side).");
// sector options container
fContSector = new TGCompositeFrame(fContCuts, 200, 200, kHorizontalFrame | kFitWidth | kFitHeight);
fRadioTPC(0),
fRadioSideA(0),
fRadioSideC(0),
+ fRadioROC(0),
fRadioSector(0),
fComboAddDrawOpt(0),
fChkAuto(0),
}
-AliTPCCalibViewerGUI & AliTPCCalibViewerGUI::operator =(const AliTPCCalibViewerGUI & param) {
+AliTPCCalibViewerGUI & AliTPCCalibViewerGUI::operator =(const AliTPCCalibViewerGUI & /*param*/) {
//
// dummy assignment operator
//
*/
-void AliTPCCalibViewerGUI::Initialize(char* fileName, char* treeName) {
+void AliTPCCalibViewerGUI::Initialize(const char* fileName, const char* treeName) {
//
// initialize the GUI with a calibrationTree from fileName
//
// fill fListVariables, list of drawable variables:
TObjArray* arr = fViewer->GetListOfVariables();
+ if (!arr) return;
TIterator* iter = arr->MakeIterator();
iter->Reset();
TObjString* currentStr = 0;
case 20: // fRadioTPC
fRadioSideA->SetState(kButtonUp);
fRadioSideC->SetState(kButtonUp);
+ fRadioROC->SetState(kButtonUp);
fRadioSector->SetState(kButtonUp);
break;
case 21: // fRadioSideA
fRadioTPC->SetState(kButtonUp);
fRadioSideC->SetState(kButtonUp);
+ fRadioROC->SetState(kButtonUp);
fRadioSector->SetState(kButtonUp);
break;
case 22: // fRadioSideC
fRadioTPC->SetState(kButtonUp);
fRadioSideA->SetState(kButtonUp);
+ fRadioROC->SetState(kButtonUp);
fRadioSector->SetState(kButtonUp);
break;
- case 23: // fRadioSector
+ case 23: // fRadioROC
fRadioTPC->SetState(kButtonUp);
fRadioSideA->SetState(kButtonUp);
fRadioSideC->SetState(kButtonUp);
+ fRadioSector->SetState(kButtonUp);
+ break;
+ case 24: // fRadioSector
+ fRadioTPC->SetState(kButtonUp);
+ fRadioSideA->SetState(kButtonUp);
+ fRadioSideC->SetState(kButtonUp);
+ fRadioROC->SetState(kButtonUp);
break;
case 31: // fComboAddCuts
fChkAddCuts->SetState(kButtonDown);
cutStr += "(sector/18)%2==0"; // side A
if (fRadioSideC->GetState() == kButtonDown)
cutStr+= "(sector/18)%2==1"; // side C
- if (fRadioSector->GetState() == kButtonDown) {
+ if (fRadioROC->GetState() == kButtonDown) {
Int_t sector = (Int_t)(fNmbSector->GetNumber());
cutStr += "sector==";
cutStr += sector;
}
+ if (fRadioSector->GetState() == kButtonDown) {
+ Int_t sector = ((Int_t)(fNmbSector->GetNumber()))%36;
+ cutStr += "sector%36==";
+ cutStr += sector;
+ }
if (fChkAddCuts->GetState() == kButtonDown && strcmp(fComboAddCuts->GetTextEntry()->GetText(), "") != 0){
if (fRadioTPC->GetState() != kButtonDown) cutStr += " && ";
cutStr += fComboAddCuts->GetTextEntry()->GetText();
sectorStr += "A"; //cuts += "(sector/18)%2==0";
if (fRadioSideC->GetState() == kButtonDown)
sectorStr+= "C"; //cuts += "(sector/18)%2==1";
- if (fRadioSector->GetState() == kButtonDown) {
+ if (fRadioROC->GetState() == kButtonDown) {
Int_t sector = (Int_t)(fNmbSector->GetNumber());
sectorStr += sector; //cuts += "sector==";
}
+ if (fRadioSector->GetState() == kButtonDown) {
+ Int_t sector = ((Int_t)(fNmbSector->GetNumber()))%36;
+ sectorStr += "S";
+ sectorStr += sector; //cuts += "sector%36==";
+ }
return new TString(sectorStr.Data());
}
//
// specify data to plot:
+ if (!GetDrawString()) return;
TString desiredData(GetDrawString()->Data());
// specify sector:
TString sectorStr(GetSectorString()->Data());
cutStr += "(sector/18)%2==0"; // side A
if (fRadioSideC->GetState() == kButtonDown)
cutStr+= "(sector/18)%2==1"; // side C
- if (fRadioSector->GetState() == kButtonDown) {
+ if (fRadioROC->GetState() == kButtonDown) {
Int_t sector = (Int_t)(fNmbSector->GetNumber());
cutStr += "sector==";
cutStr += sector;
}
+ if (fRadioSector->GetState() == kButtonDown) {
+ Int_t sector = (Int_t)(fNmbSector->GetNumber())%36;
+ cutStr += "sector%36==";
+ cutStr += sector;
+ }
if (fChkAddCuts->GetState() == kButtonDown && strcmp(fComboAddCuts->GetTextEntry()->GetText(), "") != 0){
if (fRadioTPC->GetState() != kButtonDown) cutStr += " && ";
cutStr += fComboAddCuts->GetTextEntry()->GetText();
// to change the sector label
//
Int_t sector = (Int_t)(fNmbSector->GetNumber());
- char* secLabel = "";
- if (sector >= 0 && sector <= 17) // IROC, Side A
- secLabel = "IROC, A";
- if (sector >= 18 && sector <= 35) // IROC, Side C
- secLabel = "IROC, C";
- if (sector >= 36 && sector <= 53) // OROC, Side A
- secLabel = "OROC, A";
- if (sector >= 54 && sector <= 71) // OROC, Side C
- secLabel = "OROC, C";
+ TString secLabel = "";
+ if ( sector < 36 )
+ secLabel = "IROC";
+ else
+ secLabel = "OROC";
+
+ if (fRadioSector->GetState()==kButtonDown)
+ secLabel="Sector";
+
+ if ( sector%36<18 ) //A-Side
+ secLabel += ", A";
+ else
+ secLabel += ", C";
+
+ secLabel += Form("%02d",sector%18);
+
fLblSector->SetText(secLabel);
DoNewSelection();
}
if (!selectedObject->InheritsFrom("TH2")) return;
// zoom to sector works ONLY in 2D mode, if one side is specified
if (fRadio2D->GetState() == kButtonUp) return;
- if (fRadioSector->GetState() == kButtonDown) { // return to full side view
+ if (fRadioROC->GetState() == kButtonDown) { // return to full side view
// return to full side view
Int_t sector = (Int_t)(fNmbSector->GetNumber());
if ( (sector >= 0 && sector <= 17) || (sector >= 36 && sector <= 53) ) {
}
// printf("r: %f, phi: %f, phiGrad: %f, gy/gx: %f, quadrant: %i, sector: %i \n", r, phi, phiGrad, gy/gx, quadrant, sector);
fNmbSector->SetNumber(sector);
- fRadioSector->Clicked();
- fRadioSector->SetState(kButtonDown);
+ fRadioROC->Clicked();
+ fRadioROC->SetState(kButtonDown);
ChangeSector();
}