1 #ifndef ROOT_EdbShowRec
2 #define ROOT_EdbShowRec
9 #include "TBenchmark.h"
11 #include "TEventList.h"
14 #include "TMLPAnalyzer.h"
15 #include "TMultiLayerPerceptron.h"
69 Int_t eShowAlgArraySingleN[10];
124 Int_t eActualAlgParameterset[10];
129 TString eParaNames[8];
203 void CheckPlateValues();
206 void SetPlateNumberValues();
212 void Create_eShowAlgArray();
215 void Fill_eShowAlgArray();
218 void AddAlg(Int_t AlgType, Float_t* par);
220 void ResetShowAlgArray();
226 void ResetUse_InBTType();
229 void Create_eInBTArray();
235 void Create_eInBTTree();
238 void Cut_eInBTTree_To_InBTArray();
241 void Fill_eInBTArray(Int_t FilType);
242 void Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks();
243 void Fill_eInBTArray_ByRecoLinkTracks_eAli();
244 void Fill_eInBTArray_ByBaseTracksOf_eAli();
245 void Fill_eInBTArray_ByBaseTracksOf_RootFile();
249 void Add_INBTCut(Int_t layer, TCut &
cut);
257 void BuildParametrizations();
258 void BuildParametrizationsAll();
290 EdbShowRec(TString treebranchFileName, TString treebranchName);
291 EdbShowRec(TString TxtFileName, Int_t TxtFileType);
298 void ReconstructTEST();
299 void ReconstructTESTSHORT();
300 void ReconstructTESTSTANDARD();
301 void ReconstructTEST_CA();
302 void ReconstructTEST_OI();
303 void ReconstructTEST_NN();
304 void ReconstructTEST_N3();
311 void ResetRecoShowerArray();
312 void ResetInBTArray();
319 eDoReconstruction = dospec;
322 eDoParametrization = dospec;
331 eDoVtxAttach = dospec;
349 AddInBTArray(pattern);
352 cout <<
" TO BE IMPLEMENTED !!! 13. 09. 2017 !!! Set InBTArray from a EdbTrackP object " << endl;
361 eInBTArray = InBTArray;
362 eInBTArrayN=eInBTArray->GetEntries();
365 if (InBTArrayFraction>1) {
366 cout <<
"WARNUNG ..... InBTArrayFraction > 1. Set to 1." << endl;
367 eInBTArrayFraction=1;
370 eInBTArrayFraction=InBTArrayFraction;
378 eShowAlgArray = ShowAlgArray;
379 eShowAlgArrayN=eShowAlgArray->GetEntries();
383 eRecoShowerArrayN=eRecoShowerArray->GetEntries();
386 eInBTArrayN = InBTArrayN;
389 eShowAlgArrayN = ShowAlgArrayN;
392 eRecoShowerArrayN = RecoShowerArrayN;
399 eFirstPlate = FirstPlate;
402 eLastPlate = LastPlate;
405 eMiddlePlate = MiddlePlate;
408 eNumberPlate = NumberPlate;
411 void SetFirstPlate_eAliPID(Int_t FP, Int_t StreamTypeStep);
412 void SetLastPlate_eAliPID(Int_t
plate, Int_t StreamTypeStep);
413 void SetMiddlePlate_eAliPID(Int_t
plate, Int_t StreamTypeStep);
414 void SetNumberPlate_eAliPID(Int_t
plate, Int_t StreamTypeStep);
417 eName_Out_shower = Name_Out_shower;
420 eWriteFileShower = WriteFileShower;
423 eName_Out_treebranch = Name_Out_treebranch;
427 eFilename_Out_shower = Filename_Out_shower;
430 eWriteFileTreebranch = WriteFileTreebranch;
433 eFilename_Out_treebranch = Filename_Out_treebranch;
436 void SetSimpleFileName(Int_t
type, Int_t dotype);
438 void SetDoParaType(Int_t
type);
439 void SetDoParaType(TString typestring);
440 void SetUseAliSub(Int_t
type);
447 void AddInBTArray( TObjArray* InBTArray );
448 void AddInBT(
EdbSegP* segment);
449 void AddInBTArray(
EdbSegP* segment);
451 void AddInBTArray(
EdbPVRec* volume);
453 void AddShowAlgArray( TObjArray* ShowAlgArray );
470 return eShowAlgArray;
473 return eRecoShowerArray;
484 return eShowAlgArrayN;
487 return eRecoShowerArrayN;
506 return eProposedFirstPlate;
509 return eProposedLastPlate;
512 return eProposedMiddlePlate;
515 return eProposedNumberPlate;
519 return eName_Out_shower;
522 return eName_Out_treebranch;
525 return eParaTypes[
type];
533 cout <<
"EdbShowRec::Update ONLY showers!"<< endl;
537 cout <<
"EdbShowRec::Update all showers and build their parametrisations!"<< endl;
547 void Check_eInBTArray();
548 Bool_t Check_eInBTArray_ByRecoLinkTracks_eAli();
549 Bool_t Check_Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks();
550 Bool_t Check_Fill_eInBTArray_ByBaseTracksOf_eAli();
551 Bool_t Check_Fill_eInBTArray_ByBaseTracksOf_RootFile();
560 void RecoShowerArray_To_Treebranch();
562 void Treebranch_To_RecoShowerArray(TObjArray* showarr, TTree* treebranch);
565 void TxtToRecoShowerArray();
566 void TxtToRecoShowerArray(TString TxtFileName, Int_t TxtFileType);
567 void TxtToRecoShowerArray_FeedBack(TString TxtFileName);
568 void TxtToRecoShowerArray_SimpleList(TString TxtFileName);
569 void TxtToRecoShowerArray_SimpleListNagoya(TString TxtFileName);
570 void TxtToRecoShowerArray_EDAList(TString TxtFileName);
575 void WriteParametrisation_FJ();
576 void WriteParametrisation_LT();
577 void WriteParametrisation_YC();
578 void WriteParametrisation_JC();
579 void WriteParametrisation_XX();
580 void WriteParametrisation_YY();
582 void WriteParametrisation_AS();
583 void WriteParametrisation_SE();
585 void WriteParametrisation_ExtraInfo();
588 void BuildParametrizationsMCInfo(TString MCInfoFilename, Int_t
type);
590 void BuildParametrizationsMCInfo_Event(TString MCInfoFilename);
591 void WriteParametrisation_MCInfo_PGun();
592 void ExtendParametrisation_ExtraInfo();
604 void CheckFilePresence();
605 bool FileExists(
string strFilename);
608 int ReadShowRecPar(
const char *
file);
615 void PrintRecoShowerArray(Int_t
entry=-1);
616 void PrintRecoShowerArrayFast(Int_t
entry=-1);
617 void PrintParametrisation(Int_t ParaNr);
620 void Print_UseInBTType();
621 void Print_InBTCut(Int_t layer);
622 void Print_InBTArray();
TLegendEntry * entry
Definition: Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__ELECTRON.C:130
TObjArray * RecoShowerArray
Definition: Shower_E_FromShowerRoot.C:12
cout<< ShowerRec-> GetRecoShowerArrayN()<< endl
void BuildParametrizationsMCInfo_PGun(TString MCInfoFilename)
Definition: ShowRec.cpp:8904
TCut cut
Definition: check_shower.C:6
Definition: EdbPVRec.h:148
Definition: EdbPattern.h:280
Int_t Npatterns() const
Definition: EdbPattern.h:380
Definition: EdbShowAlg.h:40
Definition: EdbShowRec.h:40
Bool_t eInBTArrayLoaded
Definition: EdbShowRec.h:64
TTree * eInBTTree
root-style text cuts
Definition: EdbShowRec.h:181
TFile * eFile_Out_shower
Definition: EdbShowRec.h:150
TString eFilename_Out_treebranch
Definition: EdbShowRec.h:147
void SetInBTUseNr(Int_t UseNr)
Definition: EdbShowRec.h:374
Bool_t eUse_AliBT
Definition: EdbShowRec.h:173
void SetInBTArrayFraction(Double_t InBTArrayFraction)
Definition: EdbShowRec.h:364
Bool_t eUseAliSub
Definition: EdbShowRec.h:189
Int_t eDoParametrization
Definition: EdbShowRec.h:52
Int_t eFirstPlate_eAliPID
Definition: EdbShowRec.h:95
Int_t eUseNr
Definition: EdbShowRec.h:177
void SetTreebranchName(TString Name_Out_treebranch)
Definition: EdbShowRec.h:422
void SetTreebranchFileName(TString Filename_Out_treebranch)
Definition: EdbShowRec.h:432
TString eName_Out_treebranch
Definition: EdbShowRec.h:160
void WriteRecoShowerArray(TObjArray *RecoShowerArray)
void SetLastPlate(Int_t LastPlate)
Definition: EdbShowRec.h:401
Int_t GetShowAlgArrayN() const
Definition: EdbShowRec.h:483
TString eName_Out_shower
Definition: EdbShowRec.h:159
Int_t eDoReconstruction
Definition: EdbShowRec.h:51
TObjArray * GetInBTArray() const
Definition: EdbShowRec.h:466
TObjArray * eInBTArray
Definition: EdbShowRec.h:62
Bool_t eAliLoaded
Definition: EdbShowRec.h:60
Bool_t eWriteFileShower
Definition: EdbShowRec.h:148
Bool_t eUse_PVREC
Definition: EdbShowRec.h:172
Int_t GetProposedMiddlePlate() const
Definition: EdbShowRec.h:511
TString GetTreebranchName() const
Definition: EdbShowRec.h:521
Bool_t eWriteFileTreebranch
Definition: EdbShowRec.h:149
Int_t GetNumberPlate() const
Definition: EdbShowRec.h:501
EdbPVRec * eAli
Definition: EdbShowRec.h:58
Int_t eInBTArrayN
Definition: EdbShowRec.h:63
void SetWriteFileShower(Int_t WriteFileShower)
Definition: EdbShowRec.h:419
Int_t GetRecoShowerArrayN() const
Definition: EdbShowRec.h:486
TFile * eFile_In_shower
Definition: EdbShowRec.h:142
Int_t eAliZMinPID
Definition: EdbShowRec.h:112
Bool_t eUse_ROOTInBT
Definition: EdbShowRec.h:175
void Update()
Definition: EdbShowRec.h:532
void SetInBTArray(EdbPattern *pattern)
Definition: EdbShowRec.h:347
TString GetShowName() const
Definition: EdbShowRec.h:518
TObjArray * eRecoShowerArray
Definition: EdbShowRec.h:73
void SetInBTArray(TObjArray *InBTArray)
Definition: EdbShowRec.h:360
Int_t eInBTArrayMaxSize
Definition: EdbShowRec.h:65
Int_t GetFirstPlate() const
Definition: EdbShowRec.h:492
Int_t eAliStreamTypeStep
Definition: EdbShowRec.h:116
Int_t eLastPlate_eAliPID
Definition: EdbShowRec.h:96
Int_t eProposedFirstPlate
Definition: EdbShowRec.h:103
EdbShowAlg * eActualAlg
Definition: EdbShowRec.h:123
void SetNumberPlate(Int_t NumberPlate)
Definition: EdbShowRec.h:407
Int_t eFirstPlate
Definition: EdbShowRec.h:88
Int_t eProposedMiddlePlate
Definition: EdbShowRec.h:105
Int_t eShowAlgArrayMaxSize
Definition: EdbShowRec.h:71
Int_t eProposedNumberPlate
Definition: EdbShowRec.h:106
void SetInBTArray(EdbTrackP *track)
Definition: EdbShowRec.h:351
TString eFilename_In_treebranch
Definition: EdbShowRec.h:139
Int_t eDoVtxAttach
Definition: EdbShowRec.h:55
Int_t eAliZMaxPID
Definition: EdbShowRec.h:111
void SetInBTArray(EdbSegP *seg)
Definition: EdbShowRec.h:356
Double_t eInBTArrayFraction
Definition: EdbShowRec.h:184
void SetShowName(TString Name_Out_shower)
Definition: EdbShowRec.h:416
void SetShowAlgArray(TObjArray *ShowAlgArray)
Definition: EdbShowRec.h:377
TObjArray * GetShowAlgArray() const
Definition: EdbShowRec.h:469
Float_t eAliZMin
Definition: EdbShowRec.h:110
TFile * eFile_Out_treebranch
Definition: EdbShowRec.h:151
TTree * eRecoShowerTreetreebranch
Definition: EdbShowRec.h:78
EdbShowerP * GetShower(Int_t i) const
Definition: EdbShowRec.h:475
Int_t eNumberPlate
Definition: EdbShowRec.h:91
void SetEdbPVRec(EdbPVRec *Ali)
Definition: EdbShowRec.h:335
Int_t GetProposedLastPlate() const
Definition: EdbShowRec.h:508
Int_t GetMiddlePlate() const
Definition: EdbShowRec.h:498
void SetInBTArrayN(Int_t InBTArrayN)
Definition: EdbShowRec.h:385
Bool_t eUse_InBTelse
Definition: EdbShowRec.h:176
TString eFilename_LnkDef
Definition: EdbShowRec.h:135
Int_t eRecoShowerArrayN
Definition: EdbShowRec.h:74
Int_t eDoEnergy
Definition: EdbShowRec.h:54
void ResetINBTArray()
Definition: EdbShowRec.h:339
void SetRecoShowerArrayN(Int_t RecoShowerArrayN)
Definition: EdbShowRec.h:391
Bool_t eShowAlgArrayLoaded
Definition: EdbShowRec.h:70
Int_t GetProposedFirstPlate() const
Definition: EdbShowRec.h:505
TString eAliStreamType
Definition: EdbShowRec.h:115
Bool_t GetEdbPVRecLoaded() const
Definition: EdbShowRec.h:463
TObjArray * eShowAlgArray
Definition: EdbShowRec.h:67
void UpdateX()
Definition: EdbShowRec.h:536
void SetDoParametrisation(Int_t dospec)
Definition: EdbShowRec.h:321
void SetDoId(Int_t dospec)
Definition: EdbShowRec.h:324
void SetDoReconstruction(Int_t dospec)
Definition: EdbShowRec.h:318
void SetFirstPlate(Int_t FirstPlate)
Definition: EdbShowRec.h:398
void SetShowFileName(TString Filename_Out_shower)
Definition: EdbShowRec.h:426
Int_t eNumberPlate_eAliPID
Definition: EdbShowRec.h:98
Int_t eDoId
Definition: EdbShowRec.h:53
void WriteRecoShowerArrayWithoutTTree(TObjArray *RecoShowerArray)
TString eFilename_LinkedTracks
Definition: EdbShowRec.h:136
TString eFilename_Out_shower
Definition: EdbShowRec.h:146
Int_t eShowAlgArrayN
Definition: EdbShowRec.h:68
Bool_t eReadFileShower
Definition: EdbShowRec.h:140
EdbPVRec * GetEdbPVRec() const
Definition: EdbShowRec.h:460
Bool_t eUse_AliLT
Definition: EdbShowRec.h:174
void SetWriteFileTreebranch(Int_t WriteFileTreebranch)
Definition: EdbShowRec.h:429
Int_t eAliNpat
Definition: EdbShowRec.h:59
Int_t eMiddlePlate_eAliPID
Definition: EdbShowRec.h:97
Bool_t eUse_LT
Definition: EdbShowRec.h:171
Bool_t IsPlateValuesLabel
Definition: EdbShowRec.h:119
Int_t eProposedLastPlate
Definition: EdbShowRec.h:104
Int_t GetDoParaType(Int_t type) const
Definition: EdbShowRec.h:524
void SetRecoShowerArray(TObjArray *RecoShowerArray)
Definition: EdbShowRec.h:381
void SetInBTArray(EdbPVRec *Ali)
Definition: EdbShowRec.h:343
TFile * eFile_In_treebranch
Definition: EdbShowRec.h:143
Float_t eAliZMax
Definition: EdbShowRec.h:109
Int_t eMiddlePlate
Definition: EdbShowRec.h:90
Int_t GetLastPlate() const
Definition: EdbShowRec.h:495
TObjArray * GetRecoShowerArray() const
Definition: EdbShowRec.h:472
void SetDoEnergy(Int_t dospec)
Definition: EdbShowRec.h:327
void SetDoVtxAttach(Int_t dospec)
Definition: EdbShowRec.h:330
void SetShowAlgArrayN(Int_t ShowAlgArrayN)
Definition: EdbShowRec.h:388
TString eFilename_EdbPVRecObject
Definition: EdbShowRec.h:137
Int_t GetProposedNumberPlate() const
Definition: EdbShowRec.h:514
TString eFilename_In_shower
Definition: EdbShowRec.h:138
void SetMiddlePlate(Int_t MiddlePlate)
Definition: EdbShowRec.h:404
Int_t GetInBTArrayN() const
Definition: EdbShowRec.h:480
Bool_t eReadFileTreebranch
Definition: EdbShowRec.h:141
Int_t eLastPlate
Definition: EdbShowRec.h:89
Definition: EdbShowerP.h:28
Definition: EdbPattern.h:118
EdbPVRec gAli
Definition: emvertex.cpp:20
void Finalize()
Definition: ShowRec.cpp:513
void Help()
Definition: mc2raw.cxx:20
Int_t plate
Definition: merge_Energy_SytematicSources_Electron.C:1
void Initialize()
Definition: rwcToEdb.cpp:28
Int_t type
Definition: testBGReduction_By_ANN.C:15
TFile * file
Definition: write_pvr.C:3