FairRoot/PandaRoot
tracks_BARREL_1000sep_proof.C
Go to the documentation of this file.
1 int tracks_BARREL_1000sep_proof(Int_t nofFiles = 1, Int_t nofEvents=1000, TString proofName="") {
2 
3  Int_t nparts = 22;
4  Int_t pid = 13;
5  Int_t nStations = 3;
6 
7  Int_t nEvents = 0;
8 
9  nEvents = nofFiles*nofEvents;
10  TString workDir = gSystem->WorkingDirectory();
11 
12  if ( nStations != 3 && nStations != 4 ) {
13  cout << "WRONG number of stations, only 3 or 4 allowed." << endl;
14  return;
15  }
16 
17  // ========================================================================
18  // Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
19  Int_t iVerbose = 0;
20 
21  // Parameter file
22  TString parFile = Form("%s/params_22Part_n%d_f0_sep.root",workDir.Data(),nofEvents);
23 
24  // Output file
25  TString outFile = Form("tracks_%dPart_n%d.root",nparts,nEvents);
26 
27  // ---- Load libraries -------------------------------------------------
28  // gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C");
29  // rootlogon();
30  TString sysFile = gSystem->Getenv("VMCWORKDIR");
31  // ------------------------------------------------------------------------
32 
33  // --- Now choose concrete engines for the different tasks -------------
34  // ------------------------------------------------------------------------
35 
36  // In general, the following parts need not be touched
37  // ========================================================================
38 
39  // ----- Timer --------------------------------------------------------
40  TStopwatch timer;
41  timer.Start();
42  // ------------------------------------------------------------------------
43 
44  // ----- Digitization run -------------------------------------------
45  FairRunAnaProof *fRun= new FairRunAnaProof(proofName.Data());
46  fRun->SetOutputFile(outFile.Data());
47  // fRun->SetProofParName("$VMCWORKDIR/gconfig/libFairRoot3.par");
48  // fRun->GetProof()->SetParameter("PROOF_PacketizerStrategy", (Int_t)0);
49 
50  fRun->SetInputFile(Form("file://%s/points_%dPart_n%d_f%d_sep.root",workDir.Data(),nparts,nofEvents,0));
51  for ( Int_t ifile = 1 ; ifile < nofFiles ; ifile++ )
52  fRun->AddFile (Form("file://%s/points_%dPart_n%d_f%d_sep.root",workDir.Data(),nparts,nofEvents,ifile));
53  // ------------------------------------------------------------------------
54 
55  // ----- Parameter database --------------------------------------------
56  TString allDigiFile = sysFile+"/macro/params/all.par";
57  if ( nStations == 4 ) allDigiFile = sysFile+"/macro/params/all4.par";
58 
59  FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
60  FairParRootFileIo* parInput1 = new FairParRootFileIo();
61 
62  TList* fnamelist = new TList();
63 
64  for ( Int_t ifile = 0 ; ifile < nofFiles ; ifile++ )
65  fnamelist->Add(new TObjString(Form("%s/params_%dPart_n%d_f%d_sep.root",workDir.Data(),nparts,nofEvents,ifile)));
66 
67  // parInput1->open(parFile.Data());
68  parInput1->open(fnamelist);
69  //parInput1->open(Form("%s/allParams_20120504_171441.root",workDir.Data()));
70 
71  FairParAsciiFileIo* parIo1 = new FairParAsciiFileIo();
72  parIo1->open(allDigiFile.Data(),"in");
73 
74  rtdb->setFirstInput(parInput1);
75  rtdb->setSecondInput(parIo1);
76  // ------------------------------------------------------------------------
77 
78  // ################################################################## MVD
79  // ----- MDV digi producer ----------------------------------------
81  mvddigi->SetVerbose(iVerbose);
82  fRun->AddTask(mvddigi);
83 
84  // ----- MDV cluster producer -----------------------------------
85  Double_t chargecut = 5000., pixelrad=1.8; // one day this will move to the parameter db.
87  mvdmccls->SetVerbose(iVerbose);
88  fRun->AddTask(mvdmccls);
89 
90  // ################################################################## STT
92  // PndSttHitProducerRealFast* sttHitProducer = new PndSttHitProducerRealFast();
93  fRun->AddTask(sttHitProducer);
94 
95  // ################################################################## GEM
96  // ----- GEM digi producer --------------------------------------
97 
98  Int_t verboseLevel = 0;
99  PndGemDigitize* gemDigitize = new PndGemDigitize("GEM Digitizer", verboseLevel);
100  fRun->AddTask(gemDigitize);
101  // ----- GEM hit producer ---------------------------------------
102  PndGemFindHits* gemFindHits = new PndGemFindHits("GEM Hit Finder", verboseLevel);
103  fRun->AddTask(gemFindHits);
104 
105  // ----- GEM Ideal Hit Producer ---------------------------------------
106  //PndGemIdealHitProducer* gemHitProducer = new PndGemIdealHitProducer("GEM Ideal hit producer", verboseLevel);
107  //fRun->AddTask(gemHitProducer);
108 
109  // ##################################################################
110 
111  PndBarrelTrackFinder* barrelTF = new PndBarrelTrackFinder();
112  barrelTF->SetVerbose(0);
113  barrelTF->UseMvdSttGem(kTRUE,kTRUE,kTRUE);
114  fRun->AddTask(barrelTF);
115 
116  PndBarrelTrackFinderQA* barrelQA = new PndBarrelTrackFinderQA();
117  barrelQA->SetVerbose(0);
118  barrelQA->UseMvdSttGem(kTRUE,kTRUE,kTRUE);
119  fRun->AddTask(barrelQA);
120 
121  // ----- Intialise and run --------------------------------------------
122  fRun->Init();
123 
124  // fRun->SetProofServerName(proofName);
125  // TString anaType = type;
126  // if ( anaType.Contains("local") )
127  fRun->Run(0,0);//nEvents);
128  // else
129  // fRun->Run(type,0,nEvents);
130 
131  rtdb->saveOutput();
132  rtdb->print();
133  // ------------------------------------------------------------------------
134 
135  // ----- Finish -------------------------------------------------------
136  timer.Stop();
137  Double_t rtime = timer.RealTime();
138  Double_t ctime = timer.CpuTime();
139  cout << endl << endl;
140  cout << "Macro finished succesfully." << endl;
141  cout << "Output file is " << outFile << endl;
142  cout << "Parameter file is " << parFile << endl;
143  cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
144  cout << endl;
145  // ------------------------------------------------------------------------
146 
147 
148  return 0;
149 }
150 
151 
152 
153 /*
154 
155 Warning in <TClass::TClass>: no dictionary for class pair<double,FairTimeStamp*> is available
156 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
157 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
158 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
159 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
160 Error in <TClass::BuildRealData>: Cannot find any ShowMembers function for PndSdsCalcStrip!
161 
162 */
163 
164 /*
165 
166 Warning in <TClass::TClass>: no dictionary for class pair<double,FairTimeStamp*> is available
167 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
168 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
169 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
170 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
171 Error in <TClass::BuildRealData>: Cannot find any ShowMembers function for PndSdsCalcStrip!
172 Warning in <TClass::TClass>: no dictionary for class BinaryFunctor is available
173 Error in <TStreamerInfo::Build:>: PndSdsPixelClusterTask: BinaryFunctor* has no streamer or dictionary, data member fFunctor will not be saved
174 Error in <TStreamerInfo::Build:>: PndSdsPixelClusterTask: BinaryFunctor* has no streamer or dictionary, data member fStartFunctor will not be saved
175 Warning in <TClass::TClass>: no dictionary for class PndSdsPixelBackMapping is available
176 Error in <TStreamerInfo::Build:>: PndSdsPixelClusterTask: PndSdsPixelBackMapping* has no streamer or dictionary, data member fBackMapping will not be saved
177 Warning in <TClass::TClass>: no dictionary for class PndSdsFEAmpModelSimple is available
178 Error in <TStreamerInfo::Build:>: PndSdsFE: PndSdsFEAmpModelSimple* has no streamer or dictionary, data member fFrontEndModel will not be saved
179 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
180 Error in <Pair Emulation Building>: const char* is not yet supported in pair emulation
181 Error in <TStreamerInfo::Build:>: PndSdsStripClusterTask: BinaryFunctor* has no streamer or dictionary, data member fFunctor will not be saved
182 Error in <TClass::New>: cannot create object of class PndSdsChargeWeightingAlgorithms
183 
184 */
PndGemFindHits * gemFindHits
int verboseLevel
Definition: Lars/runMvdSim.C:7
TString outFile
Definition: hit_dirc.C:17
int tracks_BARREL_1000sep_proof(Int_t nofFiles=1, Int_t nofEvents=1000, TString proofName="")
int pid()
Double_t chargecut
Definition: runclust.C:44
PndMvdStripClusterTask * mvdmccls
Definition: runclust.C:45
PndSttHitProducerRealFast * sttHitProducer
TString allDigiFile
Definition: hit_muo.C:36
FairRunAna * fRun
Definition: hit_dirc.C:58
TString sysFile
Double_t
TString parFile
Definition: hit_dirc.C:14
Int_t nEvents
Definition: hit_dirc.C:11
TStopwatch timer
Definition: hit_dirc.C:51
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
void SetVerbose(Int_t iVerbose)
FairParRootFileIo * parInput1
Definition: hit_dirc.C:67
Double_t ctime
Definition: hit_dirc.C:114
PndGemDigitize * gemDigitize
FairParAsciiFileIo * parIo1
Definition: bump_emc.C:53
void UseMvdSttGem(const Bool_t useMvd, const Bool_t useStt, const Bool_t useGem)
Int_t iVerbose
PndMvdDigiTask * mvddigi
Double_t rtime
Definition: hit_dirc.C:113