adaptation to AliConfig::GetDeafultFolderName
[u/mrichter/AliRoot.git] / RICH / CreateConfig.C
CommitLineData
cc69fb87 1class KirConfig
2{
3RQ_OBJECT()
4public:
5 enum EDetectors {kPIPE=1,kITS=2,kTPC=4,kTRD=8,kTOF=16,kFRAME=32,kMAG=64,kCRT=128,kHALL=256,kPHOS=512,kSTART=1024,kFMD=2048,kABSO=4096,
6 kPMD=8192,kDIPO=16384,kEMCAL=32768,kVZERO=65536,kMUON=131072,kZDC=262144,kSHILD=524288};
7 enum EProcesses {kDCAY=1,kPAIR=2,kCOMP=4,kPHOT=8,kPFIS=16,kDRAY=32,kANNI=64,kBREM=128,kMUNU=256,kCKOV=512,kHADR=1024,kLOSS=2048,kMULS=4096,
8 kRAYL=8192};
86594bfc 9 enum EGenTypes {kGun1,kGun7,kPythia7,kHijing,kHijingPara};
10
11 KirConfig(const char*sFileName);
12 ~KirConfig() {Info("ctor","");fMain->Cleanup(); delete fMain;}
2bea03c3 13 void AddDetector(Int_t id) {fDetectors+=id; if(id==kTRD || id==kTOF) fDetButGrp->SetButton(kFRAME);}
14 void RemoveDetector(Int_t id) {fDetectors-=id; if(id==kFRAME) {fDetButGrp->SetButton(kTRD,kFALSE);fDetButGrp->SetButton(kTOF,kFALSE);}}
86594bfc 15 void AddProcess(Int_t id) {fProcesses+=id;}
16 void RemoveProcess(Int_t id) {fProcesses-=id;}
17 Bool_t IsDetectorOn(Int_t id) const{return fDetectors&id;}
18 Bool_t IsProcessOn(Int_t id) const{return fProcesses&id;}
19 Float_t Eta2Theta(Float_t arg) const{return (180./TMath::Pi())*2.*TMath::ATan(TMath::Exp(-arg));}
20 void CreateConfigFile();
cc69fb87 21protected:
22 TGMainFrame *fMain;//main window poiter
2bea03c3 23 TGComboBox *fRichVersionCombo; TGButton *fRichTopChkBtn,*fRichDeclusterChkBtn;//RICH
d4c94996 24 TGButton *fMagFldChkBtn; //MAG
25 TGComboBox *fGenTypeCombo,*fGenPartIdCombo,*fGenMomCombo,*fGenChamberCombo; TGNumberEntry *fGenNprimEntry;//GEN
26 Int_t fDetectors; TGButtonGroup *fDetButGrp; //DETECTORS
cc69fb87 27 Int_t fProcesses;
86594bfc 28 char *fFileName;
cc69fb87 29};//class KirConfig
30
86594bfc 31KirConfig::KirConfig(const char *sFileName)
cc69fb87 32{
86594bfc 33 fFileName=sFileName;
d4c94996 34 fDetectors=0;
cc69fb87 35// Create main frame
36 fMain=new TGMainFrame(gClient->GetRoot(),500,400);
37// fMain->Connect("CloseWindow()","KirConfig",this,"CloseWindow()");
38 fMain->AddFrame(pHorFrame=new TGHorizontalFrame(fMain,100,200));
39//RICH
40 pHorFrame->AddFrame(pVerFrame=new TGVerticalFrame(pHorFrame,100,200));
41 pVerFrame->AddFrame(pRichGrpFrm=new TGGroupFrame(pHorFrame,"RICH"));
42 pRichGrpFrm->AddFrame(fRichVersionCombo=new TGComboBox(pRichGrpFrm,100));
d4c94996 43 fRichVersionCombo->AddEntry("no RICH",-1);
44 fRichVersionCombo->AddEntry("version 0",0);
45 fRichVersionCombo->AddEntry("version 1",1);
46 fRichVersionCombo->Select(1); fRichVersionCombo->Resize(160,20);
cc69fb87 47 pRichGrpFrm->AddFrame(fRichTopChkBtn=new TGCheckButton(pRichGrpFrm,"Rotate to Top?"));
2bea03c3 48 pRichGrpFrm->AddFrame(fRichDeclusterChkBtn=new TGCheckButton(pRichGrpFrm,"Declustering")); fRichDeclusterChkBtn->SetState(kButtonDown);
cc69fb87 49//Generator
50 pVerFrame->AddFrame(pGenGrpFrm=new TGGroupFrame(pHorFrame,"Generator"));
51 pGenGrpFrm->AddFrame(fGenTypeCombo=new TGComboBox(pGenGrpFrm,100));
d4c94996 52 fGenTypeCombo->AddEntry("gun to single chamber",kGun1); fGenTypeCombo->AddEntry("gun to all chambers",kGun7);
86594bfc 53 fGenTypeCombo->AddEntry("7 guns on top of Pythia",kPythia7);
54 fGenTypeCombo->AddEntry("HIJING",kHijing); fGenTypeCombo->AddEntry("parametrized HIJING",kHijingPara);
84365c70 55 fGenTypeCombo->Select(kHijingPara);
cc69fb87 56 fGenTypeCombo->Resize(160,20);
57
d4c94996 58 pGenGrpFrm->AddFrame(fGenPartIdCombo=new TGComboBox(pGenGrpFrm,100)); //PID for guns
84365c70 59 fGenPartIdCombo->AddEntry("Pion+",kPiPlus);
60 fGenPartIdCombo->AddEntry("Pion-",kPiMinus);
61 fGenPartIdCombo->AddEntry("Kaon+",kKPlus);
62 fGenPartIdCombo->AddEntry("Kaon-",kKMinus);
63 fGenPartIdCombo->AddEntry("Proton",kProton);
64 fGenPartIdCombo->AddEntry("AntiProton",kProtonBar);
d4c94996 65 fGenPartIdCombo->Select(kPiPlus); fGenPartIdCombo->Resize(160,20);
cc69fb87 66
d4c94996 67 pGenGrpFrm->AddFrame(fGenMomCombo=new TGComboBox(pGenGrpFrm,100)); //particle energy for guns
84365c70 68 fGenMomCombo->AddEntry("1.5 GeV",15);
69 fGenMomCombo->AddEntry("2.0 Gev",20);
70 fGenMomCombo->AddEntry("2.5 GeV",25);
71 fGenMomCombo->AddEntry("3.0 GeV",30);
72 fGenMomCombo->AddEntry("3.5 GeV",35);
73 fGenMomCombo->AddEntry("4.0 GeV",40);
74 fGenMomCombo->AddEntry("4.5 GeV",45);
d4c94996 75 fGenMomCombo->Select(40); fGenMomCombo->Resize(160,20);
84365c70 76
d4c94996 77 pGenGrpFrm->AddFrame(fGenChamberCombo=new TGComboBox(pGenGrpFrm,100)); //chamber number in case of gun1
78 for(int i=1;i<=7;i++) fGenChamberCombo->AddEntry(Form("Chamber %i",i),i);
79 fGenChamberCombo->Select(4); fGenChamberCombo->Resize(160,20);
80
81 pGenGrpFrm->AddFrame(pGenNprimFrm=new TGGroupFrame(pGenGrpFrm,"Number of primiries"));//number of primiries in case of HIJING
84365c70 82 pGenNprimFrm->AddFrame(fGenNprimEntry=new TGNumberEntry(pGenNprimFrm,500));
83
6865fb8d 84// Magnetic Field
85 pVerFrame->AddFrame(pFldGrpFrm=new TGGroupFrame(pHorFrame,"Magnetic Field"));
86594bfc 86 pFldGrpFrm->AddFrame(fMagFldChkBtn=new TGCheckButton(pFldGrpFrm,"On/Off"));
87 fMagFldChkBtn->SetState(kButtonUp);
6865fb8d 88//Detectors
d4c94996 89 pHorFrame->AddFrame(fDetButGrp=new TGButtonGroup(pHorFrame,"Detectors"));
90 fDetButGrp->Connect("Pressed(Int_t)","KirConfig",this,"AddDetector(Int_t)");
91 fDetButGrp->Connect("Released(Int_t)","KirConfig",this,"RemoveDetector(Int_t)");
92 new TGCheckButton(fDetButGrp,"PIPE" ,kPIPE));
93 new TGCheckButton(fDetButGrp,"ITS" ,kITS));
94 new TGCheckButton(fDetButGrp,"TPC" ,kTPC));
95 new TGCheckButton(fDetButGrp,"TRD" ,kTRD));
96 new TGCheckButton(fDetButGrp,"TOF" ,kTOF));
97 new TGCheckButton(fDetButGrp,"FRAME" ,kFRAME));
98 new TGCheckButton(fDetButGrp,"MAG" ,kMAG));
99 new TGCheckButton(fDetButGrp,"CRT" ,kCRT));
100 new TGCheckButton(fDetButGrp,"HALL" ,kHALL));
101 new TGCheckButton(fDetButGrp,"PHOS" ,kPHOS));
102 new TGCheckButton(fDetButGrp,"START" ,kSTART));
103 new TGCheckButton(fDetButGrp,"FMD" ,kFMD));
104 new TGCheckButton(fDetButGrp,"ABSO" ,kABSO));
105 new TGCheckButton(fDetButGrp,"PMD" ,kPMD));
106 new TGCheckButton(fDetButGrp,"DIPO" ,kDIPO));
107 new TGCheckButton(fDetButGrp,"EMCAL" ,kEMCAL));
108 new TGCheckButton(fDetButGrp,"VZERO" ,kVZERO));
109 new TGCheckButton(fDetButGrp,"MUON" ,kMUON));
110 new TGCheckButton(fDetButGrp,"ZDC" ,kZDC));
111 new TGCheckButton(fDetButGrp,"SHILD" ,kSHILD));
cc69fb87 112//Processes
113 pHorFrame->AddFrame(pProcButGrp=new TGButtonGroup(pHorFrame,"Processes"));
114 pProcButGrp->Connect("Pressed(Int_t)","KirConfig",this,"AddProcess(Int_t)");
115 pProcButGrp->Connect("Released(Int_t)","KirConfig",this,"RemoveProcess(Int_t)");
86594bfc 116 new TGCheckButton(pProcButGrp,"DCAY decay",kDCAY)); pProcButGrp->SetButton(kDCAY);
117 new TGCheckButton(pProcButGrp,"PAIR pair production",kPAIR)); pProcButGrp->SetButton(kPAIR);
118 new TGCheckButton(pProcButGrp,"COMP Compton",kCOMP)); pProcButGrp->SetButton(kCOMP);
cc69fb87 119 new TGCheckButton(pProcButGrp,"PHOT",kPHOT)); pProcButGrp->SetButton(kPHOT);
86594bfc 120 new TGCheckButton(pProcButGrp,"PFIS Photofission",kPFIS));
121 new TGCheckButton(pProcButGrp,"DRAY delta electrons",kDRAY));
122 new TGCheckButton(pProcButGrp,"ANNI annihilation",kANNI)); pProcButGrp->SetButton(kANNI);
123 new TGCheckButton(pProcButGrp,"BREM Bremstraslung",kBREM)); pProcButGrp->SetButton(kBREM);
cc69fb87 124 new TGCheckButton(pProcButGrp,"MUNU",kMUNU)); pProcButGrp->SetButton(kMUNU);
86594bfc 125 new TGCheckButton(pProcButGrp,"CKOV Cerenkovs",kCKOV)); pProcButGrp->SetButton(kCKOV);
126 new TGCheckButton(pProcButGrp,"HADR Hadronic interactions ",kHADR)); pProcButGrp->SetButton(kHADR);
cc69fb87 127 new TGCheckButton(pProcButGrp,"LOSS",kLOSS)); pProcButGrp->SetButton(kLOSS);
128 new TGCheckButton(pProcButGrp,"MULS",kMULS)); pProcButGrp->SetButton(kMULS);
129 new TGCheckButton(pProcButGrp,"RAYL",kRAYL)); pProcButGrp->SetButton(kRAYL);
86594bfc 130//File
cc69fb87 131 fMain->AddFrame(pFileHorFrm=new TGHorizontalFrame(fMain,100,200));
132 pFileHorFrm->AddFrame(pCreateBtn=new TGTextButton(pFileHorFrm,"Create"));
133 pCreateBtn->Connect("Clicked()","KirConfig",this,"CreateConfigFile()");
86594bfc 134 pFileHorFrm->AddFrame(new TGLabel(pFileHorFrm,Form(" config file as %s",fFileName)));
cc69fb87 135
136 fMain->MapSubwindows();
137 fMain->Layout();
138 fMain->SetWindowName("Create AliROOT Config script");
139 fMain->MapWindow();
140}//KirCondig::ctor
141
142void KirConfig::CreateConfigFile()
143{
86594bfc 144 FILE *fp=fopen(fFileName,"w"); if(!fp){Info("CreateConfigFile","Cannot open output file:%sn",fFileName);return;}
cc69fb87 145
146 fprintf(fp,"void Config()\n");
147 fprintf(fp,"{\n");
148 fprintf(fp," ::Info(\"RICH private config\",\"Start\");\n\n");
149//Random
150 fprintf(fp," gRandom->SetSeed(123456);//put 0 to use system time\n\n");
151//Geant
152 fprintf(fp," gSystem->Load(\"libgeant321\");\n");
153 fprintf(fp," new TGeant3(\"C++ Interface to Geant3\");\n\n");
154//File
6ae8cba0 155 fprintf(fp," AliRunLoader *pAL=AliRunLoader::Open(\"galice.root\",AliConfig::GetDefaultEventFolderName(),\"recreate\");\n");
cc69fb87 156 fprintf(fp," pAL->SetCompressionLevel(2);\n");
2bea03c3 157 fprintf(fp," pAL->SetNumberOfEventsPerFile(1000);\n");
cc69fb87 158 fprintf(fp," gAlice->SetRunLoader(pAL);\n\n");
159//Decayer
160 fprintf(fp," TVirtualMCDecayer *pDecayer=new AliDecayerPythia();\n");
161 fprintf(fp," pDecayer->SetForceDecay(kAll);\n");
162 fprintf(fp," pDecayer->Init();\n");
163 fprintf(fp," gMC->SetExternalDecayer(pDecayer);\n\n");
164//Physics
165 if(IsProcessOn(kDCAY)) fprintf(fp," gMC->SetProcess(\"DCAY\",1);"); else fprintf(fp," gMC->SetProcess(\"DCAY\",0);");
166 if(IsProcessOn(kPAIR)) fprintf(fp," gMC->SetProcess(\"PAIR\",1);\n");else fprintf(fp," gMC->SetProcess(\"PAIR\",0);\n");
167 if(IsProcessOn(kCOMP)) fprintf(fp," gMC->SetProcess(\"COMP\",1);"); else fprintf(fp," gMC->SetProcess(\"COMP\",0);");
168 if(IsProcessOn(kPHOT)) fprintf(fp," gMC->SetProcess(\"PHOT\",1);\n");else fprintf(fp," gMC->SetProcess(\"PHOT\",0);\n");
169 if(IsProcessOn(kPFIS)) fprintf(fp," gMC->SetProcess(\"PFIS\",1);"); else fprintf(fp," gMC->SetProcess(\"PFIS\",0);");
170 if(IsProcessOn(kDRAY)) fprintf(fp," gMC->SetProcess(\"DRAY\",1);\n");else fprintf(fp," gMC->SetProcess(\"DRAY\",0);\n");
171 if(IsProcessOn(kANNI)) fprintf(fp," gMC->SetProcess(\"ANNI\",1);"); else fprintf(fp," gMC->SetProcess(\"ANNI\",0);");
172 if(IsProcessOn(kBREM)) fprintf(fp," gMC->SetProcess(\"BREM\",1);\n");else fprintf(fp," gMC->SetProcess(\"BREM\",0);\n");
173 if(IsProcessOn(kMUNU)) fprintf(fp," gMC->SetProcess(\"MUNU\",1);"); else fprintf(fp," gMC->SetProcess(\"MUNU\",0);");
174 if(IsProcessOn(kCKOV)) fprintf(fp," gMC->SetProcess(\"CKOV\",1);\n");else fprintf(fp," gMC->SetProcess(\"CKOV\",0);\n");
175 if(IsProcessOn(kHADR)) fprintf(fp," gMC->SetProcess(\"HADR\",1);"); else fprintf(fp," gMC->SetProcess(\"HADR\",0);");
176 if(IsProcessOn(kLOSS)) fprintf(fp," gMC->SetProcess(\"LOSS\",2);\n");else fprintf(fp," gMC->SetProcess(\"LOSS\",0);\n");
177 if(IsProcessOn(kMULS)) fprintf(fp," gMC->SetProcess(\"MULS\",1);"); else fprintf(fp," gMC->SetProcess(\"MULS\",0);");
178 if(IsProcessOn(kRAYL)) fprintf(fp," gMC->SetProcess(\"RAYL\",1);\n");else fprintf(fp," gMC->SetProcess(\"RAYL\",0);\n");
179
180 fprintf(fp," gMC->SetCut(\"CUTGAM\",0.001); "); fprintf(fp," gMC->SetCut(\"CUTELE\",0.001); ");
181 fprintf(fp," gMC->SetCut(\"CUTNEU\",0.001);\n"); fprintf(fp," gMC->SetCut(\"CUTHAD\",0.001); ");
182 fprintf(fp," gMC->SetCut(\"CUTMUO\",0.001); "); fprintf(fp," gMC->SetCut(\"BCUTE\" ,0.001);\n");
183 fprintf(fp," gMC->SetCut(\"BCUTM\" ,0.001); "); fprintf(fp," gMC->SetCut(\"DCUTE\" ,0.001); ");
184 fprintf(fp," gMC->SetCut(\"DCUTM\" ,0.001);\n"); fprintf(fp," gMC->SetCut(\"PPCUTM\",0.001); ");
185 fprintf(fp," gMC->SetCut(\"TOFMAX\",1e10);\n\n");
186//Field
6865fb8d 187 if(fMagFldChkBtn->GetState()==kButtonDown) fprintf(fp," gAlice->SetField();\n\n");else fprintf(fp," gAlice->SetField(0);\n\n");
cc69fb87 188 fprintf(fp," pAL->CdGAFile();\n\n"); //????
189//BODY-ALIC
190 fprintf(fp," new AliBODY(\"BODY\",\"Alice envelop\");\n\n");
d4c94996 191//RICH
192 if(fRichVersionCombo->GetSelected() != -1){
2bea03c3 193 if(fRichTopChkBtn->GetState()==kButtonDown) fprintf(fp," AliRICHParam::AngleRot(0);\n");
194 if(fRichDeclusterChkBtn->GetState()!=kButtonDown) fprintf(fp," AliRICHParam::SetDeclustering(kFALSE);\n");
d4c94996 195 switch(fRichVersionCombo->GetSelected()){//RICH
196 case 0: fprintf(fp," pRICH=new AliRICHv0(\"RICH\",\"RICH version 0\");\n"); break;
197 case 1: fprintf(fp," pRICH=new AliRICHv1(\"RICH\",\"RICH version 1\");\n"); break;
198 }
199 fprintf(fp," ::Info(\"RICH private config\",\"version %i\");\n\n",fRichVersionCombo->GetSelected());
cc69fb87 200 }
201//Generator
202 switch(fGenTypeCombo->GetSelected()){
86594bfc 203 case kHijingPara:
84365c70 204 fprintf(fp," AliGenHIJINGpara *pGen=new AliGenHIJINGpara(%i);\n",(int)fGenNprimEntry->GetNumber());
86594bfc 205 fprintf(fp," pGen->SetMomentumRange(0,999); pGen->SetPhiRange(0,360); pGen->SetThetaRange(%f,%f);\n",Eta2Theta(8),Eta2Theta(-8));
206 fprintf(fp," pGen->SetOrigin(0,0,0); pGen->SetSigma(0,0,0);\n");
207 fprintf(fp," pGen->Init();\n");
208 break;
cc69fb87 209 case kGun1:
210 fprintf(fp," AliGenFixed *pGen=new AliGenFixed(1);\n");
84365c70 211 fprintf(fp," pGen->SetPart(%i); pGen->SetMomentum(%3.1f); pGen->SetOrigin(0,0,0);\n",fGenPartIdCombo->GetSelected(),float(fGenMomCombo->GetSelected())/10);
d4c94996 212 fprintf(fp," pGen->SetPhiRange(pRICH->C(%i)->PhiD()); pGen->SetThetaRange(pRICH->C(%i)->ThetaD()-2);\n",fGenChamberCombo->GetSelected(),fGenChamberCombo->GetSelected());
cc69fb87 213 fprintf(fp," pGen->Init();\n");
86594bfc 214 break;
215 case kGun7:
216 fprintf(fp," AliGenCocktail *pCocktail=new AliGenCocktail();\n");
217 fprintf(fp," for(int i=1;i<=7;i++){\n");
218 fprintf(fp," AliGenFixed *pFixed=new AliGenFixed(1);\n");
84365c70 219 fprintf(fp," pFixed->SetPart(%i); pFixed->SetMomentum(2.5+i*0.4); pFixed->SetOrigin(0,0,0);\n",fGenPartIdCombo->GetSelected());
6ae8cba0 220 fprintf(fp," pFixed->SetPhiRange(pRICH->C(i)->PhiD()); pFixed->SetThetaRange(pRICH->C(i)->ThetaD()-2);\n");
86594bfc 221 fprintf(fp," pCocktail->AddGenerator(pFixed,Form(\"Fixed %i\",i),1);\n }\n");
222 fprintf(fp," pCocktail->Init();\n");
223 break;
224 case kPythia7:
225 fprintf(fp," AliGenCocktail *pCocktail=new AliGenCocktail();\n");
226 fprintf(fp," for(int i=1;i<=7;i++){\n");
227 fprintf(fp," AliGenFixed *pFixed=new AliGenFixed(1);\n");
84365c70 228 fprintf(fp," pFixed->SetPart(%i); pFixed->SetMomentum(2.5+i*0.4); pFixed->SetOrigin(0,0,0);\n",fGenPartIdCombo->GetSelected());
6ae8cba0 229 fprintf(fp," pFixed->SetPhiRange(pRICH->C(i)->PhiD()); pFixed->SetThetaRange(pRICH->C(i)->ThetaD()-2);\n");
86594bfc 230 fprintf(fp," pCocktail->AddGenerator(pFixed,Form(\"Fixed %i\",i),1);\n }\n");
231 fprintf(fp," AliGenPythia *pPythia = new AliGenPythia(-1);\n");
232 fprintf(fp," pPythia->SetMomentumRange(0,999999); pPythia->SetPhiRange(20,80); pPythia->SetThetaRange(75,115);\n");
233 fprintf(fp," pPythia->SetYRange(-12,12); pPythia->SetPtRange(0,1000); pPythia->SetStrucFunc(kCTEQ4L);\n");
234 fprintf(fp," pPythia->SetProcess(kPyMb); pPythia->SetEnergyCMS(14000);\n");
235 fprintf(fp," pCocktail->AddGenerator(pPythia,\"Pythia\",1);\n");
236 fprintf(fp," pCocktail->Init();\n");
237 break;
cc69fb87 238 }
d4c94996 239//central before RICH detectors
cc69fb87 240 if(IsDetectorOn(kPIPE)) fprintf(fp,"\n new AliPIPEv0(\"PIPE\",\"Beam Pipe\");\n");
d4c94996 241 if(IsDetectorOn(kSHILD))fprintf(fp,"\n new AliSHILv2(\"SHIL\",\"Shielding Version 2\");\n");
cc69fb87 242 if(IsDetectorOn(kITS)){
243 fprintf(fp,"\n AliITSvPPRasymmFMD *pIts =new AliITSvPPRasymmFMD(\"ITS\",\"ITS PPR detailed version\");\n");
244 fprintf(fp," pIts->SetMinorVersion(2); pIts->SetReadDet(kTRUE);\n");
245 fprintf(fp," pIts->SetThicknessDet1(200.); pIts->SetThicknessDet2(200.);\n");
246 fprintf(fp," pIts->SetThicknessChip1(200.); pIts->SetThicknessChip2(200.);\n");
247 fprintf(fp," pIts->SetRails(0); pIts->SetCoolingFluid(1);\n");
248 fprintf(fp," pIts->SetEUCLID(0);\n");
d4c94996 249 }
250 if(IsDetectorOn(kTPC)) {fprintf(fp,"\n AliTPC *pTpc=new AliTPCv2(\"TPC\",\"Default\"); pTpc->SetSecAU(-1);pTpc->SetSecAL(-1);\n");}
251 if(IsDetectorOn(kFRAME))fprintf(fp,"\n AliFRAMEv2 *pFrame=new AliFRAMEv2(\"FRAME\",\"Space Frame\"); pFrame->SetHoles(1);\n");
cc69fb87 252 if(IsDetectorOn(kTRD)){
253 fprintf(fp,"\n AliTRD *pTrd=new AliTRDv1(\"TRD\",\"TRD slow simulator\");\n");
254 fprintf(fp," pTrd->SetGasMix(1); pTrd->SetPHOShole(); pTrd->SetRICHhole();pTrd->CreateTR();\n");
d4c94996 255 }
256 if(IsDetectorOn(kTOF)) fprintf(fp,"\n new AliTOFv4T0(\"TOF\", \"normal TOF\");\n");
257//central after RICH detectors
258 if(IsDetectorOn(kMAG)) fprintf(fp,"\n new AliMAG(\"MAG\",\"Magnet\");\n");
259 if(IsDetectorOn(kHALL)) fprintf(fp,"\n new AliHALL(\"HALL\",\"Alice Hall\");\n");
260//forward detectors
cc69fb87 261 if(IsDetectorOn(kFMD)) fprintf(fp,"\n new AliFMDv1(\"FMD\",\"normal FMD\");\n");
d4c94996 262 if(IsDetectorOn(kABSO)) fprintf(fp,"\n new AliABSOv0(\"ABSO\",\"Muon absorber\");\n");
263 if(IsDetectorOn(kDIPO)) fprintf(fp,"\n new AliDIPOv2(\"DIPO\",\"Dipole version 2\");\n");
cc69fb87 264 if(IsDetectorOn(kMUON)) fprintf(fp,"\n new AliMUONv1(\"MUON\",\"default\");\n");
cc69fb87 265 if(IsDetectorOn(kPMD)) fprintf(fp,"\n new AliPMDv1(\"PMD\",\"normal PMD\");\n");
266 if(IsDetectorOn(kSTART)) fprintf(fp,"\n new AliSTARTv1(\"START\",\"START Detector\");\n");
d4c94996 267 if(IsDetectorOn(kVZERO)) fprintf(fp,"\n new AliVZEROv2(\"VZERO\",\"normal VZERO\");\n");
268 if(IsDetectorOn(kZDC)) fprintf(fp,"\n new AliZDCv2(\"ZDC\",\"normal ZDC\");\n");
269//different phase space detectors
270 if(IsDetectorOn(kPHOS)) fprintf(fp,"\n new AliPHOSv1(\"PHOS\",\"IHEP\");\n");
cc69fb87 271 if(IsDetectorOn(kEMCAL)) fprintf(fp,"\n new AliEMCALv1(\"EMCAL\",\"G56_2_55_19_104_14\");\n");
272 if(IsDetectorOn(kCRT)) fprintf(fp,"\n new AliCRTv0(\"CRT\",\"normal ACORDE\");\n");
cc69fb87 273
274 fprintf(fp,"\n ::Info(\"RICH private config\",\"Stop\");\n");
275 fprintf(fp,"}\n");
86594bfc 276 fclose(fp);
277
278// fMain->CloseWindow();
cc69fb87 279}//CreateConfigFile
280
281KirConfig *p;
282void CreateConfig()
283{
86594bfc 284 p=new KirConfig("Config.C");
cc69fb87 285}
286