<commit_before>//----------------------------------------------------------------------
void Displayv11(const char* filename=""){
    // Display AliITSv11 Geometry
    // Inputs:
    //    const char* filename output file with the display in it
    // Outputs:
    //    none.
    // Retrurn:
    //    none.

    gSystem->Load("libGeom");
    //
    if(gGeoManager) delete gGeoManager;
    mgr2 = gGeoManager = new TGeoManager("ITSGeometry",
                                         " ITS Simulation Geometry Manager");
    //
    TGeoMaterial *vacmat = new TGeoMaterial("Vacume",0,0,0);
    TGeoMedium   *vacmed = new TGeoMedium("Vacume_med",1,vacmat);
    TGeoVolume *ALIC = mgr2->MakeBox("ALIC",vacmed,100.,100.,200.);
    mgr2->SetTopVolume(ALIC);
    //
    AliITSv11 *its = new AliITSv11();
    its->SetDebug(ISetits(0,-1));
    its->CreateMaterials();
    its->CreateGeometry();
    //
    mgr2->CloseGeometry();
    //
    TControlBar *bar=new TControlBar("vertical","ITS Geometry Display",10,10);
    bar->AddButton("Set ITS Debug level 1","ISetits(0,1)","Debug on");
    bar->AddButton("Set ITS Debug level 0","ISetits(0,0)","Debug off");
    bar->AddButton("Set ITS Theta,Phi cut on","ISetits(2,1)","Cut on");
    bar->AddButton("Set ITS Theta,Phi cut off","ISetits(2,0)","Cut off");
    bar->AddButton("Set axis on","ISetits(3,1)","Show Axis on");
    bar->AddButton("Set axis off","ISetits(3,0)","Show Axis off");
    bar->AddButton("Set perspective on","ISetits(4,1)","Perspective on");
    bar->AddButton("Set perspective off","ISetits(4,0)","Perspective off");
    bar->AddButton("Set circle/80","ISetits(1,80)","circles ~ by 80 lines");
    bar->AddButton("Display Geometry","Displayit()","Run Displayit");
    bar->AddButton("Display SDD Cone","EngineeringSDDCone()",
                   "Run EngineeringSDDCone");
    bar->AddButton("Display SDD Centeral Cylinder","EngineeringSDDCylinder()",
                   "Run EngineeringSDDCylinder");
    bar->AddButton("Display SUP RB24 side","EngineeringSupRB24()",
                   "Run EngineeringSDDCylinder");
    bar->AddButton("Display SUP RB26 side","EngineeringSupRB26()",
                   "Run EngineeringSupRB26");
    bar->AddButton("Quit/Exit",".q","Exit");
    bar->Show();
    gROOT->SaveContext();
         //Displayit();
}
//----------------------------------------------------------------------
Int_t ISetits(Int_t t,Int_t v){
    static Int_t itsdebug=0,nsegments=80,cut=0,axis=1,perspective=0;

    switch (t) {
    case 0:
        if(v<0) return itsdebug;
        itsdebug = v;
        break;
    case 1:
        if(v<0) return nsegments;
        nsegments= v;
        break;
    case 2:
        if(v<0) return cut;
        cut = v;
        break;
    case 3:
        if(v<0) return axis;
        axis = v;
        break;
    case 4:
        if(v<0) return perspective;
        perspective = v;
        break;
    }// end switch
    return 0;
}
//----------------------------------------------------------------------
Double_t DSetits(Int_t t,Double_t v){
    static Double_t phimincut=0.0,phimaxcut=180.0;
    static Double_t longitude=90.0,latitude=0.0,psi=0.0;

    switch (t) {
    case 0:
        if(v<0.) return phimincut;
        phimincut = v;
        break;
    case 1:
        if(v<0.) return phimaxcut;
        phimaxcut = v;
        break;
    case 2:
        if(v<0.) return longitude;
        longitude = v;
        break;
    case 3:
        if(v<0.) return latitude;
        latitude = v;
        break;
    case 4:
        if(v<0.) return latitude;
        latitude = v;
        break;
    }// end switch
    return 0;
}
//----------------------------------------------------------------------
void Displayit(){
    // Display AliITSv11 Geometry
    // Inputs:
    //    const char* filename output file with the display in it
    // Outputs:
    //    none.
    // Retrurn:
    //    none.
    Int_t irr;
    //
    TGeoManager *mgr2 = gGeoManager;
    TGeoVolume *ALIC = mgr2->GetTopVolume();
    TCanvas *c1;
    if(!(c1 = (TCanvas*)gROOT->FindObject("C1")))
        c1 = new TCanvas("C1","ITS Simulation Geometry",900,900);
    c1->Divide(2,2);
    //
    mgr2->SetNsegments(ISetits(1,-1));
    //
    mgr2->SetVisLevel(6);
    mgr2->SetVisOption(0);
    //mgr2->CheckOverlaps(0.01);
    //mgr2->PrintOverlaps();
    if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
    //
    c1->cd(1);
    ALIC->Draw();
    TPad *p1 = c1->GetPad(1);
    TView *view1 = p1->GetView();
    if(view1){
        view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view1->SetParralel();
        else  view1->SetPerspective();
        view1->Front();
        if(ISetits(3,-1)!=0) view1->ShowAxis();
    } // end if view1
    c1->cd(2);
    ALIC->Draw();
    TPad *p2 = c1->GetPad(2);
    TView *view2 = p2->GetView();
    if(view2){
        view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view2->SetParralel();
        else  view2->SetPerspective();
        view2->RotateView(60.,30.);
        if(ISetits(3,-1)!=0) view2->ShowAxis();
    } // end if view2
    c1->cd(3);
    ALIC->Draw();
    c1->SetPhi(90.0); c1->SetTheta(90.0);
    TPad *p3 = c1->GetPad(3);
    TView *view3 = p3->GetView();
    if(view3){
        view3->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view3->SetParralel();
        else  view3->SetPerspective();
        view3->Top();
        if(ISetits(3,-1)!=0) view3->ShowAxis();
    } // end if view3
    c1->cd(4);
    ALIC->Draw();
    TPad *p4 = c1->GetPad(4);
    TView *view4 = p4->GetView();
    if(view4){
        view4->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view4->SetParralel();
        else  view4->SetPerspective();
        view4->Side();
        if(ISetits(3,-1)!=0) view4->ShowAxis();
    } // end if view4
    //
}
//----------------------------------------------------------------------
void EngineeringSDDCone(){
    // Display SDD Cone Geometry
    // Inputs:
    //    none.
    // Outputs:
    //    none.
    // Retrurn:
    //    none.
    Int_t irr;
    //
    TGeoManager *mgr2 = gGeoManager;
    TGeoVolume *ALIC = mgr2->GetTopVolume();
    TCanvas *c2;
    if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
        c2 = new TCanvas("C2","ITS SDD Cone Geometry",900,450);
    c2->Divide(2,1);
    TGeoVolume *ITS,*SDD=0;
    TGeoNode *node;
    //
    node = ALIC->FindNode("ITSV_1");
    ITS = node->GetVolume();<commit_msg>update of Display macro<commit_after>//----------------------------------------------------------------------
void Displayv11(const char* filename=""){
    // Display AliITSv11 Geometry
    // Inputs:
    //    const char* filename output file with the display in it
    // Outputs:
    //    none.
    // Retrurn:
    //    none.

    gSystem->Load("libGeom");
    //
    if(gGeoManager) delete gGeoManager;
    mgr2 = gGeoManager = new TGeoManager("ITSGeometry",
                                         " ITS Simulation Geometry Manager");
    //
    TGeoMaterial *vacmat = new TGeoMaterial("Vacume",0,0,0);
    TGeoMedium   *vacmed = new TGeoMedium("Vacume_med",1,vacmat);
    TGeoVolume *ALIC = mgr2->MakeBox("ALIC",vacmed,100.,100.,200.);
    mgr2->SetTopVolume(ALIC);
    //
    AliITSv11 *its = new AliITSv11();
    its->SetDebug(ISetits(0,-1));
    its->CreateMaterials();
    its->CreateGeometry();
    //
    mgr2->CloseGeometry();
    //
    TControlBar *bar=new TControlBar("vertical","ITS Geometry Display",10,10);
    bar->AddButton("Set ITS Debug level 1","ISetits(0,1)","Debug on");
    bar->AddButton("Set ITS Debug level 0","ISetits(0,0)","Debug off");
    bar->AddButton("Set ITS Theta,Phi cut on","ISetits(2,1)","Cut on");
    bar->AddButton("Set ITS Theta,Phi cut off","ISetits(2,0)","Cut off");
    bar->AddButton("Set axis on","ISetits(3,1)","Show Axis on");
    bar->AddButton("Set axis off","ISetits(3,0)","Show Axis off");
    bar->AddButton("Set perspective on","ISetits(4,1)","Perspective on");
    bar->AddButton("Set perspective off","ISetits(4,0)","Perspective off");
    bar->AddButton("Set circle/80","ISetits(1,80)","circles ~ by 80 lines");
    bar->AddButton("Display Geometry","Displayit()","Run Displayit");
    bar->AddButton("Display SPD Thermal Sheald","EngineeringSPDThS()",
                   "Run EngineeringSPDThS");
    bar->AddButton("Display SDD Cone","EngineeringSDDCone()",
                   "Run EngineeringSDDCone");
    bar->AddButton("Display SDD Centeral Cylinder","EngineeringSDDCylinder()",
                   "Run EngineeringSDDCylinder");
    bar->AddButton("Display SUP RB24 side","EngineeringSupRB24()",
                   "Run EngineeringSDDCylinder");
    bar->AddButton("Display SUP RB26 side","EngineeringSupRB26()",
                   "Run EngineeringSupRB26");
    bar->AddButton("Quit/Exit",".q","Exit");
    bar->Show();
    gROOT->SaveContext();
         //Displayit();
}
//----------------------------------------------------------------------
Int_t ISetits(Int_t t,Int_t v){
    static Int_t itsdebug=0,nsegments=80,cut=0,axis=1,perspective=0;

    switch (t) {
    case 0:
        if(v<0) return itsdebug;
        itsdebug = v;
        break;
    case 1:
        if(v<0) return nsegments;
        nsegments= v;
        break;
    case 2:
        if(v<0) return cut;
        cut = v;
        break;
    case 3:
        if(v<0) return axis;
        axis = v;
        break;
    case 4:
        if(v<0) return perspective;
        perspective = v;
        break;
    }// end switch
    return 0;
}
//----------------------------------------------------------------------
Double_t DSetits(Int_t t,Double_t v){
    static Double_t phimincut=0.0,phimaxcut=180.0;
    static Double_t longitude=90.0,latitude=0.0,psi=0.0;

    switch (t) {
    case 0:
        if(v<0.) return phimincut;
        phimincut = v;
        break;
    case 1:
        if(v<0.) return phimaxcut;
        phimaxcut = v;
        break;
    case 2:
        if(v<0.) return longitude;
        longitude = v;
        break;
    case 3:
        if(v<0.) return latitude;
        latitude = v;
        break;
    case 4:
        if(v<0.) return latitude;
        latitude = v;
        break;
    }// end switch
    return 0;
}
//----------------------------------------------------------------------
void Displayit(){
    // Display AliITSv11 Geometry
    // Inputs:
    //    const char* filename output file with the display in it
    // Outputs:
    //    none.
    // Retrurn:
    //    none.
    Int_t irr;
    //
    TGeoManager *mgr2 = gGeoManager;
    TGeoVolume *ALIC = mgr2->GetTopVolume();
    TCanvas *c1;
    if(!(c1 = (TCanvas*)gROOT->FindObject("C1")))
        c1 = new TCanvas("C1","ITS Simulation Geometry",900,900);
    c1->Divide(2,2);
    //
    mgr2->SetNsegments(ISetits(1,-1));
    //
    mgr2->SetVisLevel(6);
    mgr2->SetVisOption(0);
    //mgr2->CheckOverlaps(0.01);
    //mgr2->PrintOverlaps();
    if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
    //
    c1->cd(1);
    ALIC->Draw();
    TPad *p1 = c1->GetPad(1);
    TView *view1 = p1->GetView();
    if(view1){
        view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view1->SetParralel();
        else  view1->SetPerspective();
        view1->Front();
        if(ISetits(3,-1)!=0) view1->ShowAxis();
    } // end if view1
    c1->cd(2);
    ALIC->Draw();
    TPad *p2 = c1->GetPad(2);
    TView *view2 = p2->GetView();
    if(view2){
        view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view2->SetParralel();
        else  view2->SetPerspective();
        view2->RotateView(60.,30.);
        if(ISetits(3,-1)!=0) view2->ShowAxis();
    } // end if view2
    c1->cd(3);
    ALIC->Draw();
    c1->SetPhi(90.0); c1->SetTheta(90.0);
    TPad *p3 = c1->GetPad(3);
    TView *view3 = p3->GetView();
    if(view3){
        view3->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view3->SetParralel();
        else  view3->SetPerspective();
        view3->Top();
        if(ISetits(3,-1)!=0) view3->ShowAxis();
    } // end if view3
    c1->cd(4);
    ALIC->Draw();
    TPad *p4 = c1->GetPad(4);
    TView *view4 = p4->GetView();
    if(view4){
        view4->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view4->SetParralel();
        else  view4->SetPerspective();
        view4->Side();
        if(ISetits(3,-1)!=0) view4->ShowAxis();
    } // end if view4
    //
}
//----------------------------------------------------------------------
void EngineeringSPDThS(){
    // Display SPD Thermal Sheald Geometry
    // Inputs:
    //    none.
    // Outputs:
    //    none.
    // Retrurn:
    //    none.
    Int_t irr;
    //
    TGeoManager *mgr2 = gGeoManager;
    TGeoVolume *ALIC = mgr2->GetTopVolume();
    TCanvas *c4;
    if(!(c4 = (TCanvas*)gROOT->FindObject("C4")))
        c4 = new TCanvas("C4","ITS SDD Cylinder Geometry",900,450);
    c4->Divide(2,1);
    TGeoVolume *ITS,*SPDThS=0;
    TGeoNode *node;
    TArrow *arrow=new TArrow();
    //
    node = ALIC->FindNode("ITSV_1");
    ITS = node->GetVolume();
    node = ITS->FindNode("ITSspdThermalSheald_1");
    SPDThS = node->GetVolume();
    //
    mgr2->SetNsegments(ISetits(1,-1));
    //
    mgr2->SetVisLevel(6);
    mgr2->SetVisOption(0);
    //mgr2->CheckOverlaps(0.01);
    //mgr2->PrintOverlaps();
    mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
    if(ISetits(2,-1)!=0) mgr2->SetPhiRange(DSetits(1,-1.),DSetits(0,-1.));
    //
    c4->cd(1);
    SPDThS->Draw();
    TPad *p1 = c4->GetPad(1);
    TView *view1 = p1->GetView();
    if(view1){
        view1->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view1->SetParralel();
        else  view1->SetPerspective();
        view1->Front();
        if(ISetits(3,-1)!=0) view1->ShowAxis();
    } // end if view1
    //
    c4->cd(2);
    SPDThS->Draw();
    TPad *p2 = c4->GetPad(2);
    TView *view2 = p2->GetView();
    if(view2){
        view2->SetView(DSetits(2,-1.),DSetits(3,-1.),DSetits(4,-1.),irr);
        if(irr) cout <<"error="<<irr<<endl;
        if(ISetits(4,-1)==0) view2->SetParralel();
        else  view2->SetPerspective();
        view2->Top();
        if(ISetits(3,-1)!=0) view2->ShowAxis();
    } // end if view2
    //
}
//----------------------------------------------------------------------
void EngineeringSDDCone(){
    // Display SDD Cone Geometry
    // Inputs:
    //    none.
    // Outputs:
    //    none.
    // Retrurn:
    //    none.
    Int_t irr;
    //
    TGeoManager *mgr2 = gGeoManager;
    TGeoVolume *ALIC = mgr2->GetTopVolume();
    TCanvas *c2;
    if(!(c2 = (TCanvas*)gROOT->FindObject("C2")))
        c2 = new TCanvas("C2","ITS SDD Cone Geometry",900,450);
    c2->Divide(2,1);
    TGeoVolume *ITS,*SDD=0;
    TGeoNode *node;
    //
    node = ALIC->FindNode("ITSV_1");
    ITS = node->GetVolume();
{'fraction_non_alphanumeric': 0.23007363389742927, 'fraction_numerical': 0.04224260431468802, 'mean_word_length': 2.0454366640440598, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 188, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7271908', 'n_tokens_mistral': 5818, 'n_tokens_neox': 5637, 'n_words': 957}