HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MacroMaker.C
Go to the documentation of this file.
1 #include "hmdcgarmacromaker.h"
2 void MacroMaker(Int_t mdc,Int_t angle,Char_t macroname[])
3 {
4 
5  //gROOT->Macro("/misc/kempter/mydir/batch/macros/rootlogon.C");
6  Int_t cathodhv[4]={-1750,-1800,-2000,-2200};
7  Int_t fieldhv [4]={-1750,-1800,-2000,-2200};
8  Int_t maxLoop[4][18]={{25,28,29,31,33,34,35,35,36,36,36,35,35,34,33,31,29,28},
9  {30,33,35,36,38,39,39,40,40,40,40,39,38,37,35,33,31,29},
10  {60,64,67,69,71,72,72,73,72,71,70,68,65,62,59,55,50,46},
11  {70,75,78,81,83,85,86,87,86,85,84,82,79,75,71,67,62,56 }};
12 
13  Int_t minLoop[4][18]={{25,26,26,26,27,28,29,31,33,36,33,31,29,28,27,26,26,26},
14  {30,31,31,32,32,32,35,37,40,37,34,32,31,29,28,27,27,27},
15  {60,61,61,63,64,67,70,70,63,57,53,49,47,45,43,42,41,41},
16  {70,71,72,73,75,78,81,86,78,71,66,62,58,56,54,52,51,51}};
17 
18 
20  macro->setFileNameOut(macroname);
21  macro->setPrintSetup("cell,option,gas,field,drift,signal");
22 
23  macro->setMdcType(mdc);
24  macro->setAngle(angle); // degree : 0->perpendicular track
25  macro->setCathodHv(&cathodhv[0]);
26  macro->setFieldHv (&fieldhv [0]);
27  //macro->setPsFileName("test.ps");// switch on ps-mode
28  macro->setWriteDataSets(kFALSE);
29  macro->setNLines(100);
30  macro->setIsochrones(0.005);
31  //macro->setMaxLoop(&maxLoop[0][0]);
32  macro->setMinLoop(&minLoop[0][0]);
33  macro->setNSignals(100); // 100
34 
35  macro->printMacro();
36 
37  Char_t command[300];
38  sprintf(command,"%s%s","mygarfield7big -batch >/dev/null 2>&1 < ",macroname);
39  cout<<"processing garfield: "<<command<<endl;
40 
41  gSystem->Exec(command);
42 
43 }
void setFieldHv(Int_t *c)
void setAngle(Float_t a)
void MacroMaker(Int_t mdc, Int_t angle, Char_t macroname[])
Definition: MacroMaker.C:2
void setMdcType(Int_t type)
void setPrintSetup(TString)
void setNSignals(Int_t nS)
void setNLines(Int_t ni)
void setFileNameOut(TString)
void setIsochrones(Float_t ni)
void setMinLoop(Int_t *c)
void setWriteDataSets(Bool_t write=kTRUE)
void setCathodHv(Int_t *c)