/
StBFChain.cxx
1984 lines (1844 loc) · 75 KB
/
StBFChain.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// @(#)StRoot/StBFChain:$Name: $:$Id: StBFChain.cxx,v 1.670 2021/03/21 03:32:28 genevb Exp $
#include "TROOT.h"
#include "TPRegexp.h"
#include "TString.h"
#include "TObjString.h"
#include "TSystem.h"
#include "TInterpreter.h"
#include "TClassTable.h"
#include "StMemStat.h"
#include "StBFChain.h"
#include "StBFChainOpt.h"
#include "St_db_Maker/St_db_Maker.h"
#include "StTreeMaker/StTreeMaker.h"
#include "StIOMaker/StIOMaker.h"
#include "StMessMgr.h"
#include "StShadowMaker/StShadowMaker.h"
#include "StEnumerations.h"
#include "TTree.h"
#include "TEnv.h"
#define STAR_LOGGER 1
// PLease, preserve the comment after = { . It is used for documentation formatting
//
#if 0
// Keep to be compatible with old documentaion
#define STR_OBSOLETE "WARNING *** Option is OBSOLETE ***"
//#include "BFC.h"
// ITTF Chain will be put here. Option list starting from minimalistic requirements
// and may not initially work.
// Please, preserve the comment after = { . It is used for documentation formatting
//
// ITTF Chains
//#include "BFC2.h"
#endif
// JL - define this once, use two places
#define BFC_DBREGEXP "(dbv|sdt)(\\d+)(_)(.*)(_)(.*)"
// NoChainOptions -> Number of chain options auto-calculated
TableImpl(Bfc);
ClassImp(StBFChain);
StBFChain *chain = nullptr;
//_____________________________________________________________________________
// Hack constructor.
/*!
* This method can be called with mode 1 or 2 to enable chain setup 1 or chain
* setup 2.
*
* Note: This constructor now accepts a second argument for the chain name.
* Embedding scripts were modified accordingly.
*
* This was primarily set to make possible the transition between the regular
* chain and the ITTF chain options.
*/
void StBFChain::Setup(Int_t mode) {
static const Char_t *path = "./StRoot/StBFChain:$STAR/StRoot/StBFChain";
TString fileName("BFC.C");
Char_t *file = gSystem->Which(path,fileName,kReadPermission);
#ifdef STAR_LOGGER
if (! file) { LOG_FATAL << Form("StBFChain::Setup\tFile %s has not been found in path %s",fileName.Data(),path) << endm; }
else { LOG_WARN << Form("StBFChain::Setup\tFile %s has been found as %s",fileName.Data(),file) << endm; }
#else
if (! file) Fatal("StBFChain::Setup","File %s has not been found in path %s",fileName.Data(),path);
else Warning("StBFChain::Setup","File %s has been found as %s",fileName.Data(),file);
#endif
TString cmd(".L ");
cmd += file;
gInterpreter->ProcessLine(cmd);
fchainOpt = (St_Bfc *) gInterpreter->Calc("CreateTable()");
cmd = ".U ";
cmd += file;
gInterpreter->ProcessLine(cmd);
assert(fchainOpt);
delete [] file;
fNoChainOptions = fchainOpt->GetNRows();
fBFC = fchainOpt->GetTable();
// add predifined time stamps and geometry versions
const DbAlias_t *DbAlias = GetDbAliases();
Bfc_st row = {"","","","db,detDb","","","",kFALSE};
for (Int_t i = 0; DbAlias[i].tag; i++) {
for (Int_t r = 0; r < 2; r++) {
TString dbTag("");
if (r) dbTag += "r";
dbTag += DbAlias[i].tag;
if (! kOpt(dbTag,kFALSE)) {
memset (&row.Key, 0, sizeof(row.Key));
memcpy (&row.Key, dbTag.Data(), dbTag.Length());
fchainOpt->AddAt(&row);
fNoChainOptions = fchainOpt->GetNRows();
fBFC = fchainOpt->GetTable();
}
}
}
FDate = FTime = 0;
FDateS = FTimeS = 0;
fFiltTrg = "";
fRunG = -1;
fFmsGainCorrTag="";
Gproperty.clear();
Gvalue.clear();
Gpattern.clear();
}
//_____________________________________________________________________________
/// Destructor. Call Finish() . See this method for detail on what is cleaned.
StBFChain::~StBFChain(){
Finish();
}
//_____________________________________________________________________________
/// Routine handling library loading depending on chain options
Int_t StBFChain::Load()
{
static const Char_t *prefix[3] = {"lib_","lib",""};
Int_t status = kStOk;
Int_t i, iok;
TString lib(gSystem->GetLibraries(0,"D"));
TObjArray LoadedLibs;
ParseString(lib,LoadedLibs);
TIter next(&LoadedLibs);
TObjString *LoadedLib;
while ((LoadedLib = (TObjString *) next())){
TString Base(gSystem->BaseName(LoadedLib->GetName()));
Base.ReplaceAll(".so","");
Base.ReplaceAll(".sl","");
if (Base.BeginsWith("lib_")) Base.ReplaceAll("lib_","");
if (Base.BeginsWith("lib")) Base.ReplaceAll("lib","");
LoadedLib->SetString(Base);
}
for (i = 1; i< fNoChainOptions; i++) { // Load Libraries if any
if (fBFC[i].Flag) {
if (strlen(fBFC[i].Libs) > 0) {
TObjArray Libs;
ParseString(fBFC[i].Libs,Libs);
TIter nextL(&Libs);
TObjString *libe = 0;
Char_t *path = 0;
while ((libe = (TObjString *) nextL())) {
TString libN(libe->GetString());
if (libN.BeginsWith("lib_")) libN.ReplaceAll("lib_","");
if (libN.BeginsWith("lib")) libN.ReplaceAll("lib","");
TString libL("");
for (Int_t j = 0; j < 3; j++) {
libL = prefix[j]; libL += libN;
//LOG_QA << " Checking " << libL << endm;
if ((path = gSystem->DynamicPathName(libL,kTRUE))) break;
}
iok = -1;
if (path) {
TIter next(&LoadedLibs);
TObjString *LoadedLib;
while ((LoadedLib = (TObjString *) next())){
TString Base(LoadedLib->GetName());
//LOG_QA << " Checking " << Base << endm;
if (Base == libN) {iok = 1; break;}
}
if (iok > 0) continue;
//LOG_QA << "Trying to load Library " << libL << endm;
iok = gSystem->Load(libL);
if (iok < 0) {
LOG_FATAL << "problem with loading of " << libL.Data() << endm;
LOG_FATAL << fBFC[i].Key << " is switched off \t!!!!" << endm;
//fBFC[i].Flag = kFALSE;
//status = kStErr;
//assert(iok >= 0); ?? obviously it is so, but not very specific
Int_t libraryload = kStErr;
assert(libraryload!=kStErr); // this is obvious and will display an explicit
break;
} else {
LOG_QA << Form("Library %-22s [%15s] (%s)\tis loaded",libL.Data(),fBFC[i].Key,path) << endm;
StMemStat::doPs(libL.Data(), "Load");
LoadedLibs.Add(new TObjString(libN));
}
} else {
if ( ! index(fBFC[i].Libs,',') || Debug() > 1 ) {
LOG_WARN << "No path for Key=" << fBFC[i].Key << "-> Searched for [" << libL
<< "] from Libs=" << fBFC[i].Libs << " (will proceed)" << endm;
}
}
}
Libs.Delete();
}
}
}
LoadedLibs.Delete();
return status;
}
//_____________________________________________________________________________
/// Maker-instantiation handler.
/*!
This routine contains it all (make instantiation that is), from calibration
precedence to parameter setting depending on option etc ... Other thing done
here which deserves attention
- The maker's SetMode() mechanism is treated here.
- Calibration options like NoMySQLDb, NoCintCalDb or NoCintDb and path are set
- SetFlavor() sim+ofl or sim, and filestreams is made
If a maker is added along with some flag options, this is the place to
implement the switches.
*/
Int_t StBFChain::Instantiate()
{
Int_t status = kStOk;
Int_t i;
if (! fNoChainOptions) return status;
Long64_t maxsize = kMaxLong64;
TTree::SetMaxTreeSize(maxsize);
for (i = 1; i< fNoChainOptions; i++) {// Instantiate Makers if any
if (! fBFC[i].Flag) continue;
TString maker(fBFC[i].Maker);
if (maker == "") continue;
TString Key(fBFC[i].Key);
TString name(fBFC[i].Name);
Key.ToLower();
StMaker *myChain = 0;
StMaker *mk = 0;
// Require only instance for the following named makers
if (maker == "St_db_Maker" || maker == "StTpcDbMaker" ||
maker == "StSvtDbMaker" || maker == "StSsdDbMaker" || maker == "StSstDbMaker" ||
maker == "StDetectorDbMaker" ||
maker == "StMagFMaker" ||
maker == "StEEmcDbMaker" ||
maker == "St_geant_Maker" ||
maker == "StVMCMaker") {
mk = GetTopChain()->GetMakerInheritsFrom(maker);
if (mk) {
if (maker == "St_geant_Maker" || maker == "StVMCMaker") {
LOG_INFO << "StBFChain::Instantiate ignore request for instantiation of " << maker
<< "(\"" << fBFC[i].Name << "\") because chain alreary has one." << endm;
continue;
}
if (name == "" || name == mk->GetName()) {
LOG_INFO << "StBFChain::Instantiate ignore request for instantiation of " << maker
<< "(\"" << fBFC[i].Name << "\") because chain alreary has one"
<< " but accumulate options" << endm;
//Accumulate option for these makers continue;
}
}
}
if (strlen(fBFC[i].Chain) > 0) myChain = GetMaker(fBFC[i].Chain);
if (maker == "St_db_Maker"){
if (Key.CompareTo("db",TString::kIgnoreCase) == 0) {
St_db_Maker* dbMk = (St_db_Maker *) mk;
if (! dbMk) {
TString MySQLDb("MySQL:StarDb");
TString MainCintDb("$STAR/StarDb");
TString MainCintDbObj("$STAR/.$STAR_HOST_SYS/obj/StarDb");
TString MyCintDb("$PWD/StarDb");
TString MyCintDbObj("$PWD/.$STAR_HOST_SYS/obj/StarDb");
if (GetOption("NoMySQLDb")) {MySQLDb = "";}
// Removed twice already and put back (start to be a bit boring)
// DO NOT REMOVE THE NEXT OPTION - Used in AutoCalibration
if (GetOption("NoLocalCintDb")) {MyCintDb = "";}
if (GetOption("NoStarCintDb") ) {MainCintDb = "";}
if (GetOption("NoCintDb") ) {MainCintDb = ""; MyCintDb = "";}
TString Dirs[10];
Int_t j;
for (j = 0; j < 10; j++) Dirs[j] = "";
j = 0;
if (MySQLDb != "") {Dirs[j] = MySQLDb; j++;}
if (MainCintDb != "") {Dirs[j] = MainCintDb; j++;}
if (MainCintDbObj != "") {Dirs[j] = MainCintDbObj; j++;}
if (MyCintDb != "") {Dirs[j] = MyCintDb; j++;}
if (MyCintDbObj != "") {Dirs[j] = MyCintDbObj; j++;}
dbMk = new St_db_Maker(fBFC[i].Name,Dirs[0],Dirs[1],Dirs[2],Dirs[3],Dirs[4]);
if (!dbMk) goto Error;
TString namec = dbMk->GetName();
int len = sizeof(fBFC[i].Name);
if ( namec.Length() <= len){
strncpy (fBFC[i].Name, namec.Data(),len);
} else {
gMessMgr->Error() << "Maker name [" << namec
<< "] length is > " << len
<< " - increase BFC Name field length" << endm;
}
// Determine flavors
TString flavors = "ofl"; // default flavor for offline
// fixed target flavor
if (GetOption("FXT")) flavors.Prepend("FXT+");
// simulation flavors
if (GetOption("Simu") && ! GetOption("NoSimuDb")) flavors.Prepend("sim+");
// filestream flavors
if (fSetFiles) {
TString firstFileName = fSetFiles->GetFileName(0);
firstFileName = firstFileName(firstFileName.Last('/')+1,firstFileName.Length());
if (firstFileName.BeginsWith("st_")) {
TString fileStream = firstFileName(3,firstFileName.Index('_',3)-3);
if (fileStream.Length()>0) flavors.Prepend(fileStream += '+');
}
}
LOG_INFO << "Using DB flavors: " << flavors << endm;
dbMk->SetFlavor(flavors.Data());
mk = dbMk;
}
if (GetOption("dbSnapshot")) dbMk->SetAttr("dbSnapshot","dbSnapshot.root",dbMk->GetName());
SetDbOptions(dbMk);
}
goto Add2Chain;
}
if (!mk && maker == "StIOMaker" && fSetFiles) {
StIOMaker *inpMk=0;
if (GetOption("InTree")) {
Char_t line[80] = "bfcTree";
Int_t k = kOpt("InTree");
sscanf(fBFC[k].Comment,"%s",line);
inpMk = new StIOMaker("inputStream","r",fSetFiles,line);
}
else inpMk = new StIOMaker("inputStream","r",fSetFiles);
mk = inpMk;
if (mk) {
TString namec = mk->GetName();
int len = sizeof(fBFC[i].Name);
if ( namec.Length() <= len){
strncpy (fBFC[i].Name, namec.Data() , len);
} else {
gMessMgr->Error() << "Maker name [" << namec
<< "] length is > " << len
<< " - increase BFC Name field length" << endm;
}
SetInput("StDAQReader",".make/inputStream/.make/inputStream_DAQ/.const/StDAQReader");
if (GetOption("ReadAll")) { //activate all branches
// inpMk->SetBranch("*",0,"r");
const Char_t *allBranches[] = {
"emc_rawBranch","eventBranch","ftpc_rawBranch",
"geantBranch","globalBranch","McEventBranch","svt_hitsBranch","svt_tracksBranch",
"tpc_hitsBranch","trgBranch",0};
for (Int_t i = 0; allBranches[i]; i++) inpMk->SetBranch(allBranches[i],0,"r");
}
if (GetOption("adcOnly")) mk->SetAttr("adcOnly",1); ;
goto Add2Chain;
}
goto Error;
}
if (!mk && maker == "StTreeMaker" && fFileOut != "") {
StTreeMaker *treeMk = 0;
if (GetOption("OutTree")) {
Char_t line[80] = "bfcTree";
Int_t k = kOpt("OutTree");
sscanf(fBFC[k].Comment,"%s",line);
treeMk = new StTreeMaker("outputStream",fFileOut.Data(),line);
}
else treeMk = new StTreeMaker("outputStream",fFileOut.Data());
mk = treeMk;
if (mk) {
TString namec = treeMk->GetName();
int len = sizeof(fBFC[i].Name);
if ( namec.Length() <= len ){
strncpy (fBFC[i].Name, namec.Data() , len);
} else {
gMessMgr->Error() << "Maker name [" << namec
<< "] length is > " << len
<< " - increase BFC Name field length" << endm;
}
treeMk->SetIOMode("w");
SetTreeOptions();
goto Add2Chain;
}
}
// Special makers already created or action which
// need to take place before 'maker' is created.
if (! mk) {
if (strlen(fBFC[i].Name) > 0) mk = New(fBFC[i].Maker,fBFC[i].Name);
else mk = New(fBFC[i].Maker);
if (! mk) {
LOG_FATAL << Form("StBFChain::Instantiate() problem with instantiation Maker=[%s] Name=[%s]",fBFC[i].Maker,fBFC[i].Name) << endm;
assert(mk);
}
}
{
TString namec = mk->GetName();
int len = sizeof(fBFC[i].Name);
if ( namec.Length() <= len){
strncpy (fBFC[i].Name,namec.Data(),len);
} else {
gMessMgr->Error() << "Maker name [" << namec
<< "] length is > " << len
<< " - increase BFC Name field length" << endm;
}
}
if (maker == "StTpcDbMaker" && GetOption("laserIT")) mk->SetAttr("laserIT" ,kTRUE);
if (maker == "StDAQMaker") {
if (GetOption("adcOnly")) mk->SetAttr("adcOnly",1); ;
}
if (maker == "St_geant_Maker") { // takes only first request for geant, if it is active then it should be the first one
Int_t NwGeant = 10; // default geant parameters
if (!GetOption("fzin") &&
!GetOption("ntin") &&
!GetOption("gstar") &&
!GetOption("pythia")) NwGeant = 5;
if (GetOption("big")) NwGeant = 20;
if (GetOption("bigbig")) NwGeant = 40;
if (GetOption("huge")) NwGeant = 80;
ProcessLine(Form("((St_geant_Maker *) %p)->SetNwGEANT(%i);",mk,NwGeant));
if (GetOption("Higz")) ProcessLine(Form("((St_geant_Maker *) %p)->SetIwtype(1);",mk));
if (GetOption("paw")) ProcessLine(Form("((St_geant_Maker *) %p)->SetNwPAW(2);",mk));
if (GetOption("fzin") ||
GetOption("ntin") ||
GetOption("gstar") ||
GetOption("pythia") ||
GetOption("hijing") ||
GetOption("PrepEmbed") ||
GetOption("mtin")) {
mk->SetActive(kTRUE);
// if (GetOption("PrepEmbed")) mk->SetMode(10*(mk->GetMode()/10)+1);
if (GetOption("PrepEmbed") || GetOption("pythiaEmbed")) mk->SetAttr("Don'tTouchTimeStamp",kTRUE);
if (GetOption("flux")) mk->SetAttr("flux",kTRUE);
if (GetOption("pythia")) {
mk->SetAttr("Pythia",kTRUE);
if (GetOption("Wenu")) mk->SetAttr("Wenu",kTRUE);
if (GetOption("beamLine")) mk->SetAttr("beamLine",kTRUE);
}
if (GetOption("hijing")) {
mk->SetAttr("hijing",kTRUE);
}
}
else mk->SetActive(kFALSE);
//if (! mk) goto Error;
SetGeantOptions(mk);
}
// special maker options
// m_Mode xyz
// x = 1 phys_off
// y = 1 Passive mode (do not call RunMC()
// z = 1 Mixer Mode
if (maker == "StVMCMaker") {
if (GetOption("VMCPassive")) {// don't use mk->SetActive(kFALSE) because we want to have InitRun
mk->SetAttr("VMCPassive",kTRUE);
}
else {
if (GetOption("phys_off")) mk->SetAttr("phys_off",kTRUE);
if (GetOption("hadr_off")) mk->SetAttr("hadr_off",kTRUE);
if (fInFile != "") {
if (ProcessLine(Form("((StVMCMaker *) %p)->SetInputFile(\"%s\")",mk,fInFile.Data())))
goto Error;
}
}
if (GetOption("Embedding")) mk->SetAttr("Embedding",kTRUE);
}
// ---
// Sti(ITTF) start
// ---
if (maker == "StiMaker" || maker == "StiVMCMaker" ) {
// When StiCA library is requested CA will be used as seed finder in StiMaker
if ( GetOption("StiCA") ) {
mk->SetAttr("seedFinders", "CA DEF");
}
// Option to re-use hits in other tracks
if ( GetOption("hitreuseon") ){
mk->SetAttr("SetMaxTimes", 100);
}
// By default iTpc hits are used in tracking
mk->SetAttr("activeiTpc", GetOption("iTpcIT") ? kTRUE : kFALSE);
// old logic for svt and ssd
if (GetOption("NoSvtIT")){
mk->SetAttr("useSvt" ,kFALSE);
} else {
if (GetOption("SvtIT")){
mk->SetAttr("useSvt" ,kTRUE);
mk->SetAttr("activeSvt" ,kTRUE);
}
}
if ( GetOption("NoSsdIT") &&
!GetOption("SstIT") ){
mk->SetAttr("useSsd" ,kFALSE);
} else {
if (GetOption("SsdIT")){
mk->SetAttr("useSsd" ,kTRUE);
mk->SetAttr("activeSsd" ,kTRUE);
}
}
// this was an R&D detector never implemented
// simulations were made nonetheless
if (GetOption("HpdIT")){
mk->SetAttr("useHpd" ,kTRUE);
mk->SetAttr("activeHpd" ,kTRUE);
}
// back to the HFT sub-system
if (GetOption("NoPxlIT")) {
mk->SetAttr("usePxl" ,kTRUE);
mk->SetAttr("usePixel" ,kTRUE);
} else {
if (GetOption("PixelIT") || GetOption("PxlIT") ){
mk->SetAttr("usePxl" ,kTRUE);
mk->SetAttr("usePixel" ,kTRUE);
mk->SetAttr("activePxl" ,kTRUE);
mk->SetAttr("activePixel",kTRUE);
}
}
if (GetOption("NoIstIT")) {
mk->SetAttr("useIst" ,kTRUE);
} else {
if (GetOption("IstIT")){
mk->SetAttr("useIst" ,kTRUE);
mk->SetAttr("activeIst" ,kTRUE);
}
}
if (GetOption("NoSstIT")) {
mk->SetAttr("useSst" ,kTRUE);
} else {
if (GetOption("SstIT")){
mk->SetAttr("useSst" ,kTRUE);
mk->SetAttr("activeSst" ,kTRUE);
}
}
// other sub-systems
if (GetOption("BTofIT")){
mk->SetAttr("useBTof" ,kTRUE);
mk->SetAttr("activeBTof" ,kTRUE);
}
if (GetOption("StiPulls")) mk->SetAttr("makePulls" ,kTRUE);
if (GetOption("skip1row")) mk->SetAttr("skip1row" ,kTRUE);
if (GetOption("EastOff")) mk->SetAttr("EastOff" ,kTRUE);
if (GetOption("WestOff")) mk->SetAttr("WestOff" ,kTRUE);
if (GetOption("laserIT")) mk->SetAttr("laserIT" ,kTRUE);
if (GetOption("Alignment")) mk->SetAttr("Alignment" ,kTRUE);
if (GetOption("Cosmics")) mk->SetAttr("Cosmics" ,kTRUE);
mk->PrintAttr();
}
if (maker=="StKFVertexMaker" && GetOption("laserIT")) mk->SetAttr("laserIT" ,kTRUE);
// Sti(ITTF) end
if (maker=="StGenericVertexMaker") {
// VertexFinder methods
if (GetOption("Sti") || GetOption("StiCA") || GetOption("StiVMC" ) ) mk->SetAttr("ITTF" , kTRUE);
if (GetOption("VFMinuit" ) ) mk->SetAttr("VFMinuit" , kTRUE);
if (GetOption("VFppLMV" ) ) mk->SetAttr("VFppLMV" , kTRUE);
if (GetOption("VFppLMV5" ) ) mk->SetAttr("VFppLMV5" , kTRUE);
if ( GetOption("VFPPVEv") ) {
gSystem->Load("StBTofUtil.so");
mk->SetAttr("VFPPVEv" , kTRUE);
}
else if (GetOption("VFPPV") && GetOption("Sti")) mk->SetAttr( "VFPPV", kTRUE);
if (GetOption("VFPPVEvNoBtof")){
gSystem->Load("StBTofUtil.so"); //Not used but loaded to avoid fail
mk->SetAttr("VFPPVEvNoBtof", kTRUE);
}
if (GetOption("VFPPVnoCTB" ) ) mk->SetAttr("VFPPVnoCTB" , kTRUE);
if (GetOption("VFFV" ) ) mk->SetAttr("VFFV" , kTRUE);
if (GetOption("VFMCE" ) ) mk->SetAttr("VFMCE" , kTRUE);
if (GetOption("VFMinuit2" ) ) mk->SetAttr("VFMinuit2" , kTRUE);
if (GetOption("VFMinuit3" ) ) mk->SetAttr("VFMinuit3" , kTRUE);
if (GetOption("beamLine" ) ) mk->SetAttr("BeamLine" , kTRUE);
if (GetOption("beamLine3D" ) ) mk->SetAttr("BeamLine3D" , kTRUE);
if (GetOption("CtbMatchVtx") ) mk->SetAttr("CTB" , kTRUE);
if (GetOption("min2trkVtx" ) ) mk->SetAttr("minTracks" , 2);
if (GetOption("VtxSeedCalG") ) mk->SetAttr("calibBeamline" , kTRUE);
if (GetOption("usePct4Vtx" ) ) mk->SetAttr("PCT" , kTRUE);
if (GetOption("useBTOF4Vtx") ) mk->SetAttr("BTOF" , kTRUE);
if (GetOption("useBTOFmatchOnly") ) mk->SetAttr("useBTOFmatchOnly", kTRUE);
// X-tended works only for VFPPV, VFPPVnoCTB, VFPPVev for now but could be re-used
// However, we will change this to a more flexible arbitrarry setting later
if (GetOption("VFStoreX") ) mk->SetAttr("VFStore" , 100);
//if (GetOption("VFStoreX") ) mk->SetAttr("VFStore" , 100);
mk->PrintAttr();
}
if (maker=="StKFVertexMaker") {
if (GetOption("beamLine" ) ) mk->SetAttr("BeamLine" , kTRUE);
}
if (maker=="StAssociationMaker") {
LOG_QA << "StBFChain::Instantiate Setting the Parameters for the Association Maker" << endm;
TString cmd("");
if (GetOption("ITTF") || GetOption("StiVMC") || GetOption("useInTracker"))
cmd = Form ("((StAssociationMaker *) %p)->useInTracker();",mk);
cmd += "StMcParameterDB* parameterDB = StMcParameterDB::instance();";
// TPC
#if 0
cmd += "parameterDB->setXCutTpc(.5);"; // 5 mm
cmd += "parameterDB->setYCutTpc(.5);"; // 5 mm
cmd += "parameterDB->setZCutTpc(.5);"; // 5 mm
#endif
cmd += "parameterDB->setReqCommonHitsTpc(3);"; // Require 3 hits in common for tracks to be associated
// FTPC
#if 0
cmd += "parameterDB->setRCutFtpc(.3);"; // 3 mm
cmd += "parameterDB->setPhiCutFtpc(5*(3.1415927/180.0));"; // 5 degrees
#endif
cmd += "parameterDB->setReqCommonHitsFtpc(3);"; // Require 3 hits in common for tracks to be associated
// SVT
#if 0
cmd += "parameterDB->setXCutSvt(.08);"; // 800 um
cmd += "parameterDB->setYCutSvt(.08);"; // 800 um
cmd += "parameterDB->setZCutSvt(.08);"; // 800 um
#endif
cmd += "parameterDB->setReqCommonHitsSvt(1);"; // Require 1 hits in common for tracks to be associated
if (GetOption("IdTruth")) cmd += Form("((StAssociationMaker *) %p)->useIdAssoc();",mk);
ProcessLine(cmd);
}
if (maker == "StMiniMcMaker" && GetOption("IdTruth") && ! GetOption("OldMiniMc")) {
mk->SetMode(1);
gMessMgr->QAInfo() << "StBFChain::Instantiate create simplified MiniMcTree in " << maker << endm;
}
// usually, we do maker first and option second but the
// logic is more readable with option first here (as it
// got a bit out of hand)
if (GetOption("ppOpt") ) { // pp specific stuff
if (maker == "StTrsMaker")
mk->SetMode(1); // Pile-up correction
}
if (maker == "StStrangeMuDstMaker" && GetOption("CMuDST")&& GetOption("StrngMuDST") ) {
mk -> SetAttr( "DoV0", 1 );
mk -> SetAttr( "DoXi", 1 );
mk -> SetAttr( "DoKink", 1 );
mk -> SetAttr( "SetNoKeep", 1 );
}
// Alex requested an option (not turned by default) to disable all
// hit reco cuts. This will make allm hits saved to MuDST /ezTree.
if ( maker == "StEmcRawMaker" && GetOption("BEmcDebug"))
mk->SetMode(1); // only one option now, bit a bitmask
// Use status tables for raw BEMC data (helpful for QA)
if ( maker == "StEmcRawMaker" && GetOption("BEmcChkStat"))
mk->SetAttr("BEmcCheckStatus",kTRUE);
// trigger simu maker
if ( maker == "StEmcRawMaker" && GetOption("picoWrite") ) {
mk->SetMode(10); // picoDst production - save all BTOW hits for triggerSimuMaker
}
// trigger simu maker
if ( maker == "StTriggerSimuMaker" && GetOption("picoWrite") ) {
mk->SetMode(10); // picoDst production
}
// MuDST and ezTree. Combinations are
// ezTree -> ezTree only
// CMuDST -> regular MuDST only
// ezTree,CMuDST -> both
if (maker == "StMuDstMaker" && GetOption("ezTree") ){
TString cmd(Form("StMuDstMaker *pMuMk = (StMuDstMaker *) %p;",mk));
if ( ! GetOption("CMuDST")) cmd += "pMuMk->SetStatus(\"*\",0);";
cmd += "pMuMk->SetStatus(\"EztAll\",1);";
ProcessLine(cmd);
}
// FST Raw hits in StEvent
if (maker == "StFstRawHitMaker" && GetOption("fstEvtRawHit") ){
mk->SetAttr("fstEvtRawHit", kTRUE);
}
// FST Raw hits in MuDST
if (maker == "StMuDstMaker" && GetOption("fstMuRawHit") ){
mk->SetAttr("fstMuRawHit", kTRUE);
}
if ( maker == "StPicoDstMaker"){
if ( GetOption("picoWrite") ) mk->SetMode(1);
if ( GetOption("picoRead") ) mk->SetMode(2); // possibly more magic
if ( GetOption("PicoVtxVpd")) mk->SetAttr("PicoVtxMode", "PicoVtxVpd");
else if ( GetOption("PicoVtxFXT")) mk->SetAttr("PicoVtxMode", "PicoVtxFXT");
else if ( GetOption("PicoVtxMtd")) mk->SetAttr("PicoVtxMode", "PicoVtxMtd");
else if ( GetOption("PicoVtxVpdOrDefault")) mk->SetAttr("PicoVtxMode", "PicoVtxVpdOrDefault");
else if ( GetOption("PicoVtxDefault")) mk->SetAttr("PicoVtxMode", "PicoVtxDefault");
if ( GetOption("PicoCovMtxWrite")) mk->SetAttr("PicoCovMtxMode", "PicoCovMtxWrite");
else if ( GetOption("PicoCovMtxSkip")) mk->SetAttr("PicoCovMtxMode", "PicoCovMtxSkip"); // Default mode
if ( GetOption("PicoBEmcSmdWrite")) mk->SetAttr("PicoBEmcSmdMode", "PicoBEmcSmdWrite");
else if ( GetOption("PicoBEmcSmdSkip")) mk->SetAttr("PicoBEmcSmdMode", "PicoBEmcSmdSkip"); // Default mode
}
if (maker == "StLaserEventMaker"){
// Bill stuff - Empty place-holder
}
if (maker == "StDetectorDbMaker") {
if ( GetOption("DbRichSca") ) mk->SetMode(1);
}
if (maker == "StTpcRSMaker") {
if (! GetOption("TrsToF")) {
Int_t mode = mk->GetMode();
mode |= (1 << 10); // kNoToflight //10 don't account for particle time of flight
mk->SetMode(mode);
}
if (GetOption("EbyET0")) mk->SetAttr("EbyET0", kTRUE);
}
if (maker == "StTrsMaker") {
Int_t mode = 0;
if (GetOption("TrsPileUp")) mode += 1; // Pile-up correction
if (GetOption("TrsToF")) mode += 2; // account for particle time of flight
if (mode) mk->SetMode(mode);
}
// Place-holder. Would possibly be a bitmask
if (maker == "StTofrMatchMaker"){
mk->SetMode(0);
}
if (maker == "StSpaceChargeEbyEMaker") {
if ( GetOption("SpcChgCal") ||
GetOption("SpcChgCalG")) mk->SetMode(2);
if ( GetOption("SCScalerCal") ) mk->SetMode(4);
if ( GetOption("EastOff")) mk->SetAttr("EastOff",kTRUE);
if ( GetOption("WestOff")) mk->SetAttr("WestOff",kTRUE);
}
if (maker == "StEventQAMaker" && GetOption("QAalltrigs"))
ProcessLine(Form("((StEventQAMaker *) %p)->AllTriggers();",mk));
//Special options for V0s and Xis using estGlobal tracks
if(maker=="StV0FinderMaker" && Key=="v0svt"){
TString cmd(Form("StV0FinderMaker *V0mk=(StV0FinderMaker*) %p;",mk));
cmd += "V0mk->SetLanguageUsage(0);";
cmd += "V0mk->SetSVTUsage(1);";
cmd += "V0mk->SetV0LanguageUsage(3);";
ProcessLine(cmd);
}
if(maker=="StXiFinderMaker" && Key=="xisvt"){
TString cmd(Form("StXiFinderMaker *Ximk=(StXiFinderMaker*) %p;",mk));
cmd += "Ximk->SetLanguageUsage(0);";
cmd += "Ximk->SetSVTUsage(1);";
cmd += "Ximk->SetV0LanguageUsage(3);";
cmd += "Ximk->SetXiLanguageUsage(5);";
ProcessLine(cmd);
}
// TPC
if (maker == "StTpcRTSHitMaker") {
if ( GetOption("TpxClu2D")) mk->SetAttr("TpxClu2D", kTRUE);
if ( GetOption("TPC23")) mk->SetAttr("TPC23", kTRUE);
}
if (maker == "StTpcDbMaker"){
if ( GetOption("Simu") && ! GetOption("NoSimuDb")) mk->SetAttr("Simu",kTRUE);
if ( GetOption("useLDV") ) mk->SetAttr("useLDV",kTRUE) ;// uses laserDV database
if ( GetOption("useCDV") ) mk->SetAttr("useCDV",kTRUE) ;// uses ofl database
if ( GetOption("useNewLDV") ) mk->SetAttr("useNewLDV",kTRUE);// uses new laserDV
if ( GetOption("shadow") ) mk->SetAttr("NoReset",kTRUE);// no resetting ExB
if ( GetOption("ExB")){
mk->SetAttr("ExB", kTRUE); // bit 0 is ExB ON or OFF
if ( GetOption("EB1") ) mk->SetAttr("EB1", kTRUE);
else if ( GetOption("EB2") ) mk->SetAttr("EB2", kTRUE);
else {
// depend on RY option i.e. take default for that RealYear data
// expectations.
if(GetOption("RY1H") ||
GetOption("RY2000") ||
GetOption("RY2001") ||
GetOption("RY2001N") ||
GetOption("RY2003") ||
GetOption("RY2003X")) mk->SetAttr("OldRuns", kTRUE);
}
// Other options introduced in October 2001 for distortion corrections
// studies and year1 re-production. Those are OR additive to the mask.
//(void) printf("StBFChain:: Options list : %d %d %d %d %d %d %d %d\n",
// kPadrow13,kTwist,kClock,kMembrane,kEndcap,
// kIFCShift,kSpaceCharge,kSpaceChargeR2);
if( GetOption("OBmap") ) mk->SetAttr("OBmap" , kTRUE);
if( GetOption("OPr13") ) mk->SetAttr("OPr13" , kTRUE);
if( GetOption("OPr40") ) mk->SetAttr("OPr40" , kTRUE);
if( GetOption("OTwist") ) mk->SetAttr("OTwist" , kTRUE);
if( GetOption("OClock") ) mk->SetAttr("OClock" , kTRUE);
if( GetOption("OCentm") ) mk->SetAttr("OCentm" , kTRUE);
if( GetOption("OECap") ) mk->SetAttr("OECap" , kTRUE);
if( GetOption("OIFC") ) mk->SetAttr("OIFC" , kTRUE);
if( GetOption("OSpaceZ") ) mk->SetAttr("OSpaceZ" , kTRUE);
if( GetOption("OSpaceZ2") ) {
if( GetOption("FXT") ) mk->SetAttr("OSpaceFXT" , kTRUE);
else mk->SetAttr("OSpaceZ2" , kTRUE);
}
if( GetOption("OShortR") ) mk->SetAttr("OShortR" , kTRUE);
if( GetOption("OBMap2d") ) mk->SetAttr("OBMap2d" , kTRUE);
if( GetOption("OGridLeak") ) mk->SetAttr("OGridLeak" , kTRUE);
if( GetOption("OGridLeak3D")) mk->SetAttr("OGridLeak3D", kTRUE);
if( GetOption("OGridLeakFull")) mk->SetAttr("OGridLeakFull", kTRUE);
if( GetOption("OGGVoltErr") ) mk->SetAttr("OGGVoltErr" , kTRUE);
if( GetOption("OSectorAlign"))mk->SetAttr("OSectorAlign",kTRUE);
if( GetOption("ODistoSmear")) mk->SetAttr("ODistoSmear", kTRUE);
if( GetOption("OAbortGap")) mk->SetAttr("OAbortGap" , kTRUE);
}
mk->PrintAttr();
}
if (maker == "StTpcHitMover" && GetOption("EbyET0")) {
mk->SetAttr("EbyET0", kTRUE);
}
if ((maker == "StdEdxY2Maker" || maker == "StTpcHitMover") &&
GetOption("EmbeddingShortCut")) {
mk->SetAttr("EmbeddingShortCut", kTRUE);
mk->PrintAttr();
}
if (maker == "StdEdxY2Maker" && !GetOption("CalcdNdx")) {
mk->SetAttr("SkipdNdx", kTRUE);
}
if (maker == "StSvtDbMaker" || maker == "StSsdDbMaker"){
mk->SetMode(0);
// If simulation running make sure pick up simu stuff from db
if (GetOption("Simu") && ! GetOption("NoSimuDb")) mk->SetMode(1);
}
// FTPC
if ((maker == "StFtpcClusterMaker" ||
maker == "StFtpcTrackMaker" ) &&
GetOption("fdbg")) mk->SetMode(mk->GetMode()+2);
if ( ( maker == "StFtpcClusterMaker" || // ?
maker == "StFtpcTrackMaker" ) &&
GetOption("flaser")) mk->SetMode(mk->GetMode()+1);
if ((maker == "StFtpcClusterMaker" ||
maker == "StFtpcTrackMaker" ) &&
GetOption("fgain")) mk->SetMode(mk->GetMode()+4);
// PMD
if ( maker == "StPmdReadMaker" &&
GetOption("pmdRaw")) mk->SetAttr("pmdRaw",kTRUE);
// HFT
//if (maker == "StPxlSimMaker" &&
// GetOption("pxlSlowSim")) mk->SetAttr("useDIGMAPSSim",kTRUE);
// ... PXL
if (maker == "StPxlSimMaker") {
if (GetOption("pxlSlowSim")) mk->SetAttr("useDIGMAPSSim",kTRUE);
}
//FMS GainCorrection flavors
if (maker == "StFmsDbMaker"){
if(fFmsGainCorrTag!="") mk->SetAttr("FmsGainCorr",fFmsGainCorrTag.Data());
}
// Hit filtering will be made from a single maker in
// future with flexible filtering method
if (maker == "StHitFilterMaker") {
if (GetOption("SvtHitFilt")){
// Filter out SVT bad hits, TPC hits not on tracks and all hits if fabs(ZVert)>30
LOG_QA << "SVT hit filter is ON" << endm;
TString cmd(Form("StHitFilterMaker *Filtmk=(StHitFilterMaker*) %p;",mk));
cmd += "Filtmk->setPtLowerCut(-99.);";
cmd += "Filtmk->setPtUpperCut(-99.);";
cmd += "Filtmk->setAbsEtaCut(-99);";
cmd += "Filtmk->setAbsZVertCut(30);";
ProcessLine(cmd);
} else if (GetOption("TpcHitFilt")){
// Filter out TPC hits not on tracks
LOG_QA << "TPC hit filter is ON" << endm;
TString cmd(Form("StHitFilterMaker *Filtmk=(StHitFilterMaker*) %p;",mk));
cmd += "Filtmk->setPtLowerCut(-99.);";
cmd += "Filtmk->setPtUpperCut(-99.);";
cmd += "Filtmk->setAbsEtaCut(-99);";
cmd += "Filtmk->setAbsZVertCut(999);";
ProcessLine(cmd);
} else if (GetOption("HftHitFilt")){
// Filter out TPC hits not on tracks
LOG_QA << "HFT hit filter is ON" << endm;
TString cmd(Form("StHitFilterMaker *Filtmk=(StHitFilterMaker*) %p;",mk));
cmd += "Filtmk->setAbsZVertCut(-1);";
cmd += "Filtmk->setKeepWestHighEtaHitsForFgt(0);";
ProcessLine(cmd);
} else {
LOG_QA << "Default hit filtering is ON" << endm;
}
Int_t mode = 0;
if (GetOption("KeepTpcHit")) mode |= (1 << kTpcId);
if (GetOption("KeepSvtHit")) mode |= (1 << kSvtId);
mk->SetMode(mode);
// the m_Mode (Int_t is signed integer 4 bytes) mask is too short for the FGT
if (GetOption("KeepFgtHit")){
TString cmd(Form("StHitFilterMaker *Filtmk=(StHitFilterMaker*) %p;",mk));
cmd += "Filtmk->setKeepWestHighEtaHitsForFgt(1.0);";
ProcessLine(cmd);
}
}
if (maker == "StMiniMcMaker" && fFileOut != "") {
ProcessLine(Form("((StMiniMcMaker *) %p)->setFileName(\"%s\");", mk, fFileOut.Data()));
}
if (maker == "StMcAnalysisMaker") {
Int_t mode = 0;
if (GetOption("McAnaTpc")) mode += 0x1;
if (GetOption("McAnaSvt")) mode += 0x2;
if (GetOption("McAnaSsd")) mode += 0x4;
if (mode)
ProcessLine(Form("((StMaker *) %p)->SetMode(%i);", mk, mode));
}
if (maker == "StBTofCalibMaker") {
if (GetOption("UseProjectedVertex")) mk->SetAttr("UseProjectedVertex",kTRUE);
if (GetOption("setOutlierRej4BToft0")) mk->SetAttr("setPPPAOutlierRej", kTRUE);
if (GetOption("ImpBToFt0Mode")) mk->SetAttr("pppAMode", kTRUE);
if (GetOption("btofFXT")) mk->SetAttr("btofFXT", kTRUE);
}
if (maker == "StVpdCalibMaker" && GetOption("ImpBToFt0Mode")) mk->SetAttr("pppAMode", kTRUE);
if (maker == "StEventMaker" && fFiltTrg.Length()) {
mk->SetAttr("FiltTrg",(Int_t) (fFiltTrg.BeginsWith('+') ? 1 : -1));
TString FiltTrgFlavor = fFiltTrg(1,128);
if (FiltTrgFlavor.Length())
SetFlavor((FiltTrgFlavor += "+ofl").Data(),"trgOfflineFilter");
}
if (maker == "StTagsMaker"){
if ( GetOption("shadow") ) mk->SetAttr("shadow",kTRUE);
}
Add2Chain:
if (! mk) continue;
if (name == "") strncpy (fBFC[i].Name,(Char_t *) mk->GetName() , sizeof(fBFC[i].Name));
if (myChain) myChain->AddMaker(mk);
continue;
Error:
status = kStErr;
LOG_QA << " ======================================" << endm;
LOG_QA << " problem with Instantiation of " << fBFC[i].Maker << endm;
LOG_QA << " ======================================" << endm;
}
// PrintQAInfo();
PrintInfo();
// START the chain (may the force be with you)
// Create HTML docs of all Maker's inv
#if 0
if (GetOption("MakeDoc")) MakeDoc();
#endif
if (GetOption("Debug")) SetDEBUG(1);
if (GetOption("Debug1")) SetDEBUG(1);
if (GetOption("Debug2")) SetDEBUG(2);
if (GetOption("nohistos")) SetAttr(".histos",0,"*");
else SetAttr(".histos",1,"*");
if (GetOption("NoRepeat")) gMessMgr->IgnoreRepeats();
if (GetOption("svt1hit")) SetAttr("minPrecHits",1,"Sti");
if (GetOption("svt1hit")) SetAttr("minPrecHits",1,"StiCA");
if (GetOption("svt1hit")) SetAttr("minPrecHits",1,"StiVMC");
for ( unsigned int n=0 ; n < Gproperty.size() ; n++ ){
gMessMgr->QAInfo() << "+++ Setting attribute "
<< (Gproperty.at(n)).Data() << " = " << (Gvalue.at(n)).Data() << " for "
<< (Gpattern.at(n).Data()) << endm;
SetAttr( (Gproperty.at(n)).Data(),
(Gvalue.at(n)).Data(),
(Gpattern.at(n)).Data() );
}
return status;
}
//_____________________________________________________________________
Int_t StBFChain::Init() {
TDatime td;
Info("Init","Time=%s Cwd=%s",td.AsString(),gSystem->pwd());
SetChainOpt(new StBFChainOpt(this));
// SetDbOptions(); moved to Instantiation
if (fNoChainOptions) {
// SetGeantOptions(); move back to Init
if (GetOption("Simu") && ! (GetOption("mtin") || GetOption("PrepEmbed") || GetOption("pythiaEmbed"))) { // ! Simu
StEvtHddr *fEvtHddr = (StEvtHddr*)GetDataSet("EvtHddr");
if (!fEvtHddr) {
fEvtHddr = new StEvtHddr(m_ConstSet);
SetOutput(fEvtHddr); //Declare this "EvtHddr" for output
}
if (fEvtHddr->GetRunNumber() < 0 || fEvtHddr->GetRunNumber() >= 1000000) {
fEvtHddr->SetRunNumber(1); // to have run positive and < 1000000 (to avoid mess with RunLog)
}
}
}
if (fNoChainOptions) {
if (GetOption("NoOutput") || GetOption("EvOutOnly")) {
if (! GetOption("RMuDst"))
SetAttr(".call","SetActive(0)","MuDst"); //NO MuDst
if (! GetOption("EvOutOnly")) {
SetAttr(".call","SetActive(0)","outputStream"); //NO Out
}
SetAttr(".call","SetActive(0)","kink2");
SetAttr(".call","SetActive(0)","StTagsMaker::");
SetAttr(".call","SetActive(0)","StStrangeMuDstMaker::");
}
#if 1