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