FEDRA emulsion software from the OPERA Collaboration
EdbShowRec Class Reference

#include <EdbShowRec.h>

Inheritance diagram for EdbShowRec:
Collaboration diagram for EdbShowRec:

Public Member Functions

void AddEdbPVRec (EdbPVRec *Ali)
 
void AddInBT (EdbSegP *segment)
 
void AddInBTArray (EdbPattern *pattern)
 
void AddInBTArray (EdbPVRec *volume)
 
void AddInBTArray (EdbSegP *segment)
 
void AddInBTArray (TObjArray *InBTArray)
 
void AddRecoShowerArray (TObjArray *RecoShowerArray)
 
void AddShowAlgArray (TObjArray *ShowAlgArray)
 
void BuildParametrizationsMCInfo (TString MCInfoFilename, Int_t type)
 
void BuildParametrizationsMCInfo_Event (TString MCInfoFilename)
 
void BuildParametrizationsMCInfo_PGun (TString MCInfoFilename)
 
void Check_eInBTArray ()
 
Bool_t Check_eInBTArray_ByRecoLinkTracks_eAli ()
 
Bool_t Check_Fill_eInBTArray_ByBaseTracksOf_eAli ()
 
Bool_t Check_Fill_eInBTArray_ByBaseTracksOf_RootFile ()
 
Bool_t Check_Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks ()
 
void CheckFilePresence ()
 
 ClassDef (EdbShowRec, 1)
 
 EdbShowRec ()
 
 EdbShowRec (EdbPVRec *gAli)
 
 EdbShowRec (EdbPVRec *gAli, TObjArray *InBTArray)
 
 EdbShowRec (EdbPVRec *gAli, TObjArray *InBTArray, EdbShowAlg *StandardAlg)
 
 EdbShowRec (EdbPVRec *gAli, TObjArray *InBTArray, TObjArray *ShowAlgArray)
 
 EdbShowRec (TString treebranchFileName, TString treebranchName)
 
 EdbShowRec (TString TxtFileName, Int_t TxtFileType)
 
void ExtendParametrisation_ExtraInfo ()
 
bool FileExists (string strFilename)
 
Int_t GetDoParaType (Int_t type) const
 
EdbPVRecGetEdbPVRec () const
 
Bool_t GetEdbPVRecLoaded () const
 
Int_t GetFirstPlate () const
 
TObjArray * GetInBTArray () const
 
Int_t GetInBTArrayN () const
 
Int_t GetLastPlate () const
 
Int_t GetMiddlePlate () const
 
Int_t GetNumberPlate () const
 
Int_t GetProposedFirstPlate () const
 
Int_t GetProposedLastPlate () const
 
Int_t GetProposedMiddlePlate () const
 
Int_t GetProposedNumberPlate () const
 
TObjArray * GetRecoShowerArray () const
 
Int_t GetRecoShowerArrayN () const
 
TObjArray * GetShowAlgArray () const
 
Int_t GetShowAlgArrayN () const
 
EdbShowerPGetShower (Int_t i) const
 
TString GetShowName () const
 
TString GetTreebranchName () const
 
void Help ()
 
void Print ()
 
void Print_InBTArray ()
 
void Print_InBTCut (Int_t layer)
 
void Print_UseInBTType ()
 
void PrintAll ()
 
void PrintMore ()
 
void PrintParametrisation (Int_t ParaNr)
 
void PrintRecoShowerArray (Int_t entry=-1)
 
void PrintRecoShowerArrayFast (Int_t entry=-1)
 
int ReadShowRecPar (const char *file)
 
void Reconstruct ()
 
void ReconstructTEST ()
 
void ReconstructTEST_CA ()
 
void ReconstructTEST_N3 ()
 
void ReconstructTEST_NN ()
 
void ReconstructTEST_OI ()
 
void ReconstructTESTSHORT ()
 
void ReconstructTESTSTANDARD ()
 
void RecoShowerArray_To_Treebranch ()
 
void Reset ()
 
void ResetInBTArray ()
 
void ResetINBTArray ()
 
void ResetRecoShowerArray ()
 
void SetDoEnergy (Int_t dospec)
 
void SetDoId (Int_t dospec)
 
void SetDoParametrisation (Int_t dospec)
 
void SetDoParaType (Int_t type)
 
void SetDoParaType (TString typestring)
 
void SetDoReconstruction (Int_t dospec)
 
void SetDoVtxAttach (Int_t dospec)
 
void SetEdbPVRec (EdbPVRec *Ali)
 
void SetFirstPlate (Int_t FirstPlate)
 
void SetFirstPlate_eAliPID (Int_t FP, Int_t StreamTypeStep)
 
void SetInBTArray (EdbPattern *pattern)
 
void SetInBTArray (EdbPVRec *Ali)
 
void SetInBTArray (EdbSegP *seg)
 
void SetInBTArray (EdbTrackP *track)
 
void SetInBTArray (TObjArray *InBTArray)
 
void SetInBTArrayFraction (Double_t InBTArrayFraction)
 
void SetInBTArrayN (Int_t InBTArrayN)
 
void SetInBTUseNr (Int_t UseNr)
 
void SetLastPlate (Int_t LastPlate)
 
void SetLastPlate_eAliPID (Int_t plate, Int_t StreamTypeStep)
 
void SetMiddlePlate (Int_t MiddlePlate)
 
void SetMiddlePlate_eAliPID (Int_t plate, Int_t StreamTypeStep)
 
void SetNumberPlate (Int_t NumberPlate)
 
void SetNumberPlate_eAliPID (Int_t plate, Int_t StreamTypeStep)
 
void SetRecoShowerArray (TObjArray *RecoShowerArray)
 
void SetRecoShowerArrayN (Int_t RecoShowerArrayN)
 
void SetShowAlgArray (TObjArray *ShowAlgArray)
 
void SetShowAlgArrayN (Int_t ShowAlgArrayN)
 
void SetShowFileName (TString Filename_Out_shower)
 
void SetShowName (TString Name_Out_shower)
 
void SetSimpleFileName (Int_t type, Int_t dotype)
 
void SetTreebranchFileName (TString Filename_Out_treebranch)
 
void SetTreebranchName (TString Name_Out_treebranch)
 
void SetUseAliSub (Int_t type)
 
void SetWriteFileShower (Int_t WriteFileShower)
 
void SetWriteFileTreebranch (Int_t WriteFileTreebranch)
 
void Treebranch_To_RecoShowerArray (TObjArray *showarr, TTree *treebranch)
 
void TxtToRecoShowerArray ()
 
void TxtToRecoShowerArray (TString TxtFileName, Int_t TxtFileType)
 
void TxtToRecoShowerArray_EDAList (TString TxtFileName)
 
void TxtToRecoShowerArray_FeedBack (TString TxtFileName)
 
void TxtToRecoShowerArray_SimpleList (TString TxtFileName)
 
void TxtToRecoShowerArray_SimpleListNagoya (TString TxtFileName)
 
void Update ()
 
void UpdateX ()
 
void WriteParametrisation_AS ()
 void WriteParametrisation_PP(); //6 More...
 
void WriteParametrisation_ExtraInfo ()
 
void WriteParametrisation_FJ ()
 
void WriteParametrisation_JC ()
 
void WriteParametrisation_LT ()
 
void WriteParametrisation_MCInfo_PGun ()
 
void WriteParametrisation_SE ()
 
void WriteParametrisation_XX ()
 
void WriteParametrisation_YC ()
 
void WriteParametrisation_YY ()
 
void WriteRecoShowerArray (TObjArray *RecoShowerArray)
 
void WriteRecoShowerArrayWithoutTTree (TObjArray *RecoShowerArray)
 
virtual ~EdbShowRec ()
 

Private Member Functions

void Add_INBTCut (Int_t layer, TCut &cut)
 
void AddAlg (Int_t AlgType, Float_t *par)
 
void BuildParametrizations ()
 
void BuildParametrizationsAll ()
 
void CheckPlateValues ()
 
void Create_eInBTArray ()
 
void Create_eInBTTree ()
 
void Create_eShowAlgArray ()
 
void Cut_eInBTTree_To_InBTArray ()
 
void Execute ()
 
void Fill_eInBTArray (Int_t FilType)
 
void Fill_eInBTArray_ByBaseTracksOf_eAli ()
 
void Fill_eInBTArray_ByBaseTracksOf_RootFile ()
 
void Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks ()
 
void Fill_eInBTArray_ByRecoLinkTracks_eAli ()
 
void Fill_eShowAlgArray ()
 
void Finalize ()
 
void Init ()
 
void Initialize ()
 
void ResetShowAlgArray ()
 
void ResetUse_InBTType ()
 
void Set0 ()
 
void SetOutNames ()
 
void SetPlateNumberValues ()
 
void Write_RecoShowerArray (TObjArray *RecoShowerArray)
 Write Reconstructed Showers to File: More...
 

Private Attributes

EdbShowAlgeActualAlg
 
Int_t eActualAlgParameterset [10]
 
EdbPVReceAli
 
Bool_t eAliLoaded
 
Int_t eAliNpat
 
TString eAliStreamType
 
Int_t eAliStreamTypeStep
 
Float_t eAliZMax
 
Int_t eAliZMaxPID
 
Float_t eAliZMin
 
Int_t eAliZMinPID
 
Int_t eDoEnergy
 
Int_t eDoId
 
Int_t eDoParametrization
 
Int_t eDoReconstruction
 
Int_t eDoVtxAttach
 
TFile * eFile_In_shower
 
TFile * eFile_In_treebranch
 
TFile * eFile_Out_shower
 
TFile * eFile_Out_treebranch
 
TString eFilename_EdbPVRecObject
 
TString eFilename_In_shower
 
TString eFilename_In_treebranch
 
TString eFilename_LinkedTracks
 
TString eFilename_LnkDef
 
TString eFilename_Out_shower
 
TString eFilename_Out_treebranch
 
Int_t eFirstPlate
 
Int_t eFirstPlate_eAliPID
 
TObjArray * eInBTArray
 
Double_t eInBTArrayFraction
 
Bool_t eInBTArrayLoaded
 
Int_t eInBTArrayMaxSize
 
Int_t eInBTArrayN
 
TCut * eInBTCuts [3]
 
TTree * eInBTTree
 root-style text cuts More...
 
Int_t eLastPlate
 
Int_t eLastPlate_eAliPID
 
Int_t eMiddlePlate
 
Int_t eMiddlePlate_eAliPID
 
TString eName_Out_shower
 
TString eName_Out_treebranch
 
Int_t eNumberPlate
 
Int_t eNumberPlate_eAliPID
 
TString eParaNames [8]
 
Int_t eParaTypes [8]
 
Int_t eProposedFirstPlate
 
Int_t eProposedLastPlate
 
Int_t eProposedMiddlePlate
 
Int_t eProposedNumberPlate
 
Bool_t eReadFileShower
 
Bool_t eReadFileTreebranch
 
TObjArray * eRecoShowerArray
 
Int_t eRecoShowerArrayN
 
TTree * eRecoShowerTreetreebranch
 
TObjArray * eShowAlgArray
 
Bool_t eShowAlgArrayLoaded
 
Int_t eShowAlgArrayMaxSize
 
Int_t eShowAlgArrayN
 
Int_t eShowAlgArraySingleN [10]
 
Bool_t eUse_AliBT
 
Bool_t eUse_AliLT
 
Bool_t eUse_InBTelse
 
Bool_t eUse_LT
 
Bool_t eUse_PVREC
 
Bool_t eUse_ROOTInBT
 
Bool_t eUseAliSub
 
Int_t eUseNr
 
Bool_t eWriteFileShower
 
Bool_t eWriteFileTreebranch
 
Bool_t IsPlateValuesLabel
 

Constructor & Destructor Documentation

◆ EdbShowRec() [1/7]

EdbShowRec::EdbShowRec ( )

◆ EdbShowRec() [2/7]

EdbShowRec::EdbShowRec ( EdbPVRec gAli)
23 {
24  // Default Constructor using a EdbPVRec object (usually called gAli):
25  // By default, do _not_ do a reconstruction of showers at this stage
26  // Reconstruction() call is to made by hand at the time being
27 
28  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli)","Default Constructor");
29  Set0();
30 
31  eAli=gAli;
33  eAliLoaded=kTRUE;
34 
35  // Create already the RecoShowerArray at the very beginning.
36  // Recheck if this is good style please...
37  eRecoShowerArray=new TObjArray();
39 
40  // Set Shower Algorithm Array to zero
42 
43  Init();
44 
47 
48  // In this constructor no InBT Array is given by default, but we search
49  // for possible InBTs automatically<f.
51 
52  Print();
53  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli)","Default Constructor...done.");
54 }
bool Log(int level, const char *location, const char *fmt,...)
Definition: EdbLog.cxx:75
Int_t Npatterns() const
Definition: EdbPattern.h:380
void Set0()
Definition: EdbShowRec.cxx:358
Bool_t eAliLoaded
Definition: EdbShowRec.h:60
EdbPVRec * eAli
Definition: EdbShowRec.h:58
void SetPlateNumberValues()
Definition: EdbShowRec.cxx:1601
TObjArray * eRecoShowerArray
Definition: EdbShowRec.h:73
void CheckPlateValues()
Definition: EdbShowRec.cxx:3663
void Check_eInBTArray()
Definition: EdbShowRec.cxx:1093
void SetRecoShowerArrayN(Int_t RecoShowerArrayN)
Definition: EdbShowRec.h:391
void Init()
Definition: EdbShowRec.cxx:419
Int_t eAliNpat
Definition: EdbShowRec.h:59
void Print()
Definition: EdbShowRec.cxx:1869
void SetShowAlgArrayN(Int_t ShowAlgArrayN)
Definition: EdbShowRec.h:388
EdbPVRec gAli
Definition: emvertex.cpp:20

◆ EdbShowRec() [3/7]

EdbShowRec::EdbShowRec ( EdbPVRec gAli,
TObjArray *  InBTArray 
)

STILL DEBUG STATUS....... IS THIS TRUE???----------------------------—

STILL DEBUG STATUS....... IS THIS TRUE???----------------------------—

59 {
60  // Default Constructor using
61  // a EdbPVRec object (usually called gAli)
62  // a TObjArray containing segments (basetracks) for the Initiator BTs:
63  // By default, do _not_ do a reconstruction of showers at this stage
64  // Reconstruction() call is to made by hand at the time being
65 
66  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli, TObjArray* InBTArray)","Default Constructor");
67  Set0();
68 
69  eAli=gAli;
71  eAliLoaded=kTRUE;
72 
73  // Preliminary check if array is already existing:
74  eInBTArray = new TObjArray();
75  eInBTArray=InBTArray;
76  SetInBTArrayN(eInBTArray->GetEntries());
77  eInBTArrayMaxSize=999999;
78  eInBTArrayLoaded=kTRUE;
79 
80  // Create already the RecoShowerArray at the very beginning.
81  // Recheck if this is good style please...
82  eRecoShowerArray=new TObjArray();
84 
85  // Set Shower Algorithm Array to zero
87 
88  Init();
89 
91  // If Initiator BT Array and gAli is given then we can directly proceed to check plate values!!
92  // Initiator BT Array is already filled, so every other method to fill this must be kFALSE;
93  eUse_LT=kFALSE;
94  eUse_AliBT=kFALSE;
95  eUse_AliLT=kFALSE;
96  eUse_PVREC=kFALSE;
97  eUseNr=-1;
101 
102  Print();
103  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli, TObjArray* InBTArray)","Default Constructor...done.");
104 }
Bool_t eInBTArrayLoaded
Definition: EdbShowRec.h:64
Bool_t eUse_AliBT
Definition: EdbShowRec.h:173
Int_t eUseNr
Definition: EdbShowRec.h:177
TObjArray * eInBTArray
Definition: EdbShowRec.h:62
Bool_t eUse_PVREC
Definition: EdbShowRec.h:172
Int_t eInBTArrayMaxSize
Definition: EdbShowRec.h:65
void SetInBTArrayN(Int_t InBTArrayN)
Definition: EdbShowRec.h:385
Bool_t eUse_AliLT
Definition: EdbShowRec.h:174
Bool_t eUse_LT
Definition: EdbShowRec.h:171

◆ EdbShowRec() [4/7]

EdbShowRec::EdbShowRec ( EdbPVRec gAli,
TObjArray *  InBTArray,
EdbShowAlg StandardAlg 
)

STILL DEBUG STATUS....... IS THIS TRUE???----------------------------—

STILL DEBUG STATUS....... IS THIS TRUE???----------------------------—

109 {
110  // Default Constructor using
111  // a EdbPVRec object (usually called gAli)
112  // a TObjArray containing segments (basetracks) for the Initiator BTs
113  // a EdbShowAlg object (StandardAlg):
114 
115  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli, TObjArray* InBTArray, EdbShowAlg* StandardAlg)","Default Constructor");
116  Set0();
117 
118  eAli=gAli;
120  eAliLoaded=kTRUE;
121 
122  // Preliminary check if array is already existing:
123  eInBTArray = new TObjArray();
124  eInBTArray=InBTArray;
125  SetInBTArrayN(eInBTArray->GetEntries());
126  eInBTArrayMaxSize=999999;
127  eInBTArrayLoaded=kTRUE;
128 
129  eShowAlgArray = new TObjArray();
130  eShowAlgArray->Add(StandardAlg);
131  SetShowAlgArrayN(eShowAlgArray->GetEntries());
133  eShowAlgArrayLoaded=kTRUE;
134 
135  // Create already the RecoShowerArray at the very beginning.
136  // Recheck if this is good Style please...
137  eRecoShowerArray=new TObjArray();
138 
139  Init();
140 
142  // If Initiator BT Array and gAli is given then we can directly proceed to check plate values!!
143  // Initiator BT Array is already filled, so every other method to fill this must be kFALSE;
144  eUse_LT=kFALSE;
145  eUse_AliBT=kFALSE;
146  eUse_AliLT=kFALSE;
147  eUse_PVREC=kFALSE;
148  eUseNr=-1;
152 
153 // if (gEDBDEBUGLEVEL>0) Print();
154  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli, TObjArray* InBTArray, EdbShowAlg* StandardAlg)","Default Constructor...done.");
155 }
Int_t eShowAlgArrayMaxSize
Definition: EdbShowRec.h:71
Bool_t eShowAlgArrayLoaded
Definition: EdbShowRec.h:70
TObjArray * eShowAlgArray
Definition: EdbShowRec.h:67

◆ EdbShowRec() [5/7]

EdbShowRec::EdbShowRec ( EdbPVRec gAli,
TObjArray *  InBTArray,
TObjArray *  ShowAlgArray 
)
161 {
162  // Default Constructor using
163  // a EdbPVRec object (usually called gAli)
164  // a TObjArray containing segments (basetracks) for the Initiator BTs
165  // a EdbShowAlg object (StandardAlg):
166 
167  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli, TObjArray* InBTArray, TObjArray* ShowAlgArray)","Default Constructor");
168  Set0();
169 
170  eAli=gAli;
172  eAliLoaded=kTRUE;
173 
174  // Preliminary check if array is already existing:
175  // if(!eInBTArray)
176  eInBTArray = new TObjArray();
177  eInBTArray=InBTArray;
178  SetInBTArrayN(eInBTArray->GetEntries());
179  eInBTArrayMaxSize=999999;
180  eInBTArrayLoaded=kTRUE;
181  // if(!eShowAlgArray)
182  eShowAlgArray = new TObjArray();
183  eShowAlgArray=ShowAlgArray;
184  SetShowAlgArrayN(eShowAlgArray->GetEntries());
186  eShowAlgArrayLoaded=kTRUE;
187 
188  // Create already the RecoShowerArray at the very beginning.
189  // Recheck if this is good Style please...
190  eRecoShowerArray=new TObjArray();
191 
192  Init();
193 
194  //if (gEDBDEBUGLEVEL>0) Print();
195  Log(2,"EdbShowRec::EdbShowRec(EdbPVRec* gAli, TObjArray* InBTArray, TObjArray* ShowAlgArray)","Default Constructor...done.");
196 }

◆ EdbShowRec() [6/7]

EdbShowRec::EdbShowRec ( TString  treebranchFileName,
TString  treebranchName = "treebranch" 
)

Strangely this constructor does not work... If I use like this: EdbShowRec* ee = new EdbShowRec("Shower.root") then at the end The object ee calls its contructor and the objects isnt there anymore.... Some c++ tutorials say calling constructor from constructor inst possible so easy... http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.3 For now we take this opportunity out... maybe someday we find a better one... Ok, for now we copy the code from the ' EdbShowRec::EdbShowRec(TString treebranchFileName, TString treebranchName="treebranch") ' constructor. See always that these codes then are equal:

217 {
218  //----------------------------------------------------------
219  // Default Constructor using
220  // a file which contains "treebranch" reconstructed showers
221  // Converts them to the RecoShowerArray.
222  // Mainly used for backward compability!
223  //----------------------------------------------------------
224  Log(2,"EdbShowRec::EdbShowRec(TString treebranchFileName, TString treebranchName=treebranch)","Default Constructor");
225 
226 
227  Set0();
228  Init();
229 
230  eRecoShowerArray=new TObjArray();
231  SetRecoShowerArrayN(999999);
232 
233  // Just open given file:
234  cout << "EdbShowRec::EdbShowRec() Just open given file: "<< treebranchFileName << endl;
235  TFile* file=new TFile(treebranchFileName);
236 
237  // Try to find ParasetNumber from Filename....(useful only for the reconstruction
238  // where the file was named like:
239  // "ShowRecShower__PADI_0_BTPA_0_BGTP_0_ALTP_4_FP_1_MP_21_NP_30_LT_0_MC_1_FZHP_1__ParaSet_-1_To_-1.txt.root"
240 // Bool_t isSpecialName=kTRUE;
241  Bool_t isSpecialName=kFALSE;
242 
243  if (isSpecialName) {
244  TString buf=treebranchFileName;
245  cout << "buf = " << buf << endl;
246  int paset;
247  sscanf(buf.Data()+buf.Index("ParaSet_")+8,"%d", &paset);
248  cout << " paset = " << paset << endl;
249  treebranchName = TString(Form(treebranchName+"_%d",paset));
250  }
251  else {
252  // nothing, take normal treebranchName
253  }
254  cout << "treebranchName = " << treebranchName << endl;
255  TTree* treebranchTree=(TTree*)file->Get(treebranchName);
256 
257 
258  // Get treebranch tree out of it:
260  eRecoShowerTreetreebranch= new TTree();
261  }
262  else {
263  ; // do nothing....
264  }
265 
266  /*
267  cout << "EdbShowRec::EdbShowRec() Get treebranch tree out of it:"<< endl;
268  TTree* treebranchTree=(TTree*)file->Get(treebranchName);
269  if (treebranchTree==NULL && treebranchName=="treebranch") {
270  cout << "treebranchTree==NULL"<< endl;
271  treebranchName = TString(Form(treebranchName+"_%d",paset));
272  cout << treebranchName << endl;
273  TTree* treebranchTree=(TTree*)file->Get(treebranchName);
274  if (treebranchTree==NULL) cout << "treebranchTree==NULL"<< endl;
275  }
276  */
277 
278  // Clone it to have it also when closing the file(s):
279  eRecoShowerTreetreebranch=(TTree*)treebranchTree->Clone();
280 
281  treebranchTree->Print();
282  eRecoShowerTreetreebranch->Print();
283 
284  cout << "treebranchTree " << treebranchTree << endl;
285  cout << "eRecoShowerTreetreebranch " << eRecoShowerTreetreebranch << endl;
286 // return;
287 
288 
289  // Try version with tree as new operator, in order not to loose it when closing file
290  if (gEDBDEBUGLEVEL>2) treebranchTree->Show(0);
291 
292 
293  // Write Treebranch_To_RecoShowerArray
294  cout << "EdbShowRec::EdbShowRec() Write Treebranch_To_RecoShowerArray:"<< endl;
296 
297  if (gEDBDEBUGLEVEL>3) cout << "EdbShowRec::EdbShowRec() eRecoShowerArray->Print();"<< endl;
298  if (gEDBDEBUGLEVEL>3) eRecoShowerArray->Print();
299  if (gEDBDEBUGLEVEL>3) cout << "EdbShowRec::EdbShowRec() eRecoShowerArray->Print()...done."<< endl;
300 
301 // cout << "EdbShowRec::EdbShowRec() do now: delete file;"<< endl;
302 // delete file; file=0;
303 // cout << "EdbShowRec::EdbShowRec() delete file done...;"<< endl;
304  // This may be the reason why the histogram creation for shower crashes....
305  // to be investigated....(maybe it is due to histogram creation in root, cause it wants to
306  // Append the THI when creating to a file.; Otherwise the crash happens only for a shower
307  // file with 1 entry, for a file with 5 entries, for example it works....Very strange...)
308  // maybe the histogram TH1F* eProfileLongitudinal;TH1F* eProfileTransversal;
309  // is still connected to this file!
310 
311  Log(2,"EdbShowRec::EdbShowRec()","EdbShowRec(TString treebranchFileName)... Do NOT delete file because the Histograms are still connected with");
312  Log(2,"EdbShowRec::EdbShowRec()","EdbShowRec(TString treebranchFileName)... the file.... THIS IS TO BE DONE CORRECTLY .... ");
313  if (gEDBDEBUGLEVEL>1) Print();
314 
315  Log(2,"EdbShowRec::EdbShowRec(TString treebranchFileName, TString treebranchName=treebranch)","Default Constructor...done.");
316 }
TTree * eRecoShowerTreetreebranch
Definition: EdbShowRec.h:78
void Treebranch_To_RecoShowerArray(TObjArray *showarr, TTree *treebranch)
Definition: EdbShowRec.cxx:3293
gEDBDEBUGLEVEL
Definition: energy.C:7
TFile * file
Definition: write_pvr.C:3

◆ EdbShowRec() [7/7]

EdbShowRec::EdbShowRec ( TString  TxtFileName,
Int_t  TxtFileType 
)
322 {
323  //----------------------------------------------------------
324  // Default Constructor using
325  // a Txt File which contains segments
326  // Converts them to the RecoShowerArray.
327  // There are different types of listing segments (eda,manual check...)
328  // This will be defined....
329  //----------------------------------------------------------
330  Log(2,"EdbShowRec::EdbShowRec(TString TxtFileName, Int_t TxtFileType)","Default Constructor STILL EMPTY CONSTRUCTOR ");
331 
332  Set0();
333  Init();
334  eRecoShowerArray=new TObjArray();
335 
336  // Just open given txt file:
337  cout << "EdbShowRec::EdbShowRec() Just open given txt file: "<< TxtFileName << endl;
338 
339  // Convert File To Reco Shower Array ...
340  TxtToRecoShowerArray(TxtFileName,TxtFileType);
341 
342  Log(2,"EdbShowRec::EdbShowRec(TString TxtFileName, Int_t TxtFileType)","Default Constructor...done.");
343 }
void TxtToRecoShowerArray()
Definition: EdbShowRec.cxx:2352

◆ ~EdbShowRec()

EdbShowRec::~EdbShowRec ( )
virtual
351 {
352  // Default Destructor
353  Log(2,"EdbShowRec::~EdbShowRec()","Destructor called.");
354 }

Member Function Documentation

◆ Add_INBTCut()

void EdbShowRec::Add_INBTCut ( Int_t  layer,
TCut &  cut 
)
private
2324 {
2325  Log(2,"EdbShowRec::Add_INBTCut","EdbShowRec::Add_INBTCut");
2326  if (layer<0) return;
2327  if (layer>2) return;
2328  if (!eInBTCuts[layer]) {
2329  cout << " EdbShowRec::Add_INBTCut No eInBTCuts[layer] yet"<<endl;
2330  eInBTCuts[layer] = new TCut(cut);
2331  }
2332  else (*(eInBTCuts[layer]))+=cut;
2333  Log(2,"EdbShowRec::Add_INBTCut","EdbShowRec::Add_INBTCut...done.");
2334 }
TCut cut
Definition: check_shower.C:6
TCut * eInBTCuts[3]
Definition: EdbShowRec.h:180

◆ AddAlg()

void EdbShowRec::AddAlg ( Int_t  AlgType,
Float_t *  par 
)
private
3557 {
3558  Log(2,"EdbShowRec::AddAlg","EdbShowRec::AddAlg");
3559 
3560  if (!eShowAlgArray) {
3562  }
3563 
3564  cout << "CT, CL, NN are not yet implemented "<<endl;
3565 // switch command gives compiler errors.... change to simple if statements:
3566 
3567  if (AlgType==0) {
3568  cout << "= = = = = CT not yet implemented = = = = = "<<endl;
3569  return;
3570  }; // CT
3571  if (AlgType==1) {
3572  cout << "= = = = = CL not yet implemented = = = = = "<<endl;
3573  return;
3574  }; // CL
3575  if (AlgType==2) {
3576  // C_one A_dvanced algorithm
3577  EdbShowAlg_CA* StandardAlg = new EdbShowAlg_CA();
3578  eShowAlgArray->Add(StandardAlg);
3579  StandardAlg->SetParameters(par);
3580  StandardAlg->Print();
3581  };
3582  if (AlgType==3) {
3583  // N_eural N_et algorithm
3584  cout << "= = = = = NN not yet implemented = = = = = "<<endl;
3585  return;
3586  }; // NN
3587  if (AlgType==4) {
3588  // O_fficial I_mplementation algorithm
3589  EdbShowAlg_OI* StandardAlg = new EdbShowAlg_OI();
3590  eShowAlgArray->Add(StandardAlg);
3591  StandardAlg->SetParameters(par);
3592  StandardAlg->Print();
3593  };
3594  if (AlgType==5) {
3595  // S_??? A_??? algorithm
3596  EdbShowAlg_SA* StandardAlg = new EdbShowAlg_SA();
3597  eShowAlgArray->Add(StandardAlg);
3598  StandardAlg->SetParameters(par);
3599  StandardAlg->Print();
3600  };
3601  if (AlgType==6) {
3602  // T_rack C_one algorithm
3603  cout << "= = = = = TC not yet implemented = = = = = "<<endl;
3604  return;
3605  }; // TC
3606  if (AlgType==7) {
3607  // R_ecursive C_one algorithm
3608  EdbShowAlg_RC* StandardAlg = new EdbShowAlg_RC();
3609  eShowAlgArray->Add(StandardAlg);
3610  StandardAlg->SetParameters(par);
3611  StandardAlg->Print();
3612  };
3613  if (AlgType==8) {
3614  // B_ack W_ard algorithm
3615  EdbShowAlg_BW* StandardAlg = new EdbShowAlg_BW();
3616  eShowAlgArray->Add(StandardAlg);
3617  StandardAlg->SetParameters(par);
3618  StandardAlg->Print();
3619  };
3620  if (AlgType==10) {
3621  // G_amma S_earch algorithm
3622  EdbShowAlg_GS* StandardAlg = new EdbShowAlg_GS();
3623  eShowAlgArray->Add(StandardAlg);
3624  StandardAlg->SetParameters(par);
3625  StandardAlg->Print();
3626  };
3627 
3628  cout << "================== AFTER ADDING there is eShowAlgArray->GetEntries() = " << eShowAlgArray->GetEntries() << endl;
3629 
3630  SetShowAlgArrayN(eShowAlgArray->GetEntries());
3631  ++eShowAlgArraySingleN[AlgType];
3632 
3633  cout << "GetShowAlgArrayN()"<< GetShowAlgArrayN()<< endl;
3634 
3635  if (gEDBDEBUGLEVEL>2) {
3636  for (Int_t i=0; i<8; ++i) cout << "EdbShowRec::AddAlg eShowAlgArraySingleN("<<i<<" =eShowAlgArraySingleN["<<i<<"]"<< endl;
3637  }
3638 
3639  Log(2,"EdbShowRec::AddAlg","EdbShowRec::AddAlg...done.");
3640  return;
3641 }
Definition: EdbShowAlg.h:301
Definition: EdbShowAlg.h:223
Definition: EdbShowAlg_GS.h:38
Definition: EdbShowAlg.h:252
Definition: EdbShowAlg.h:278
Definition: EdbShowAlg.h:197
void Print()
Definition: EdbShowAlg.cxx:338
void SetParameters(Float_t *par)
Definition: EdbShowAlg.cxx:79
void Create_eShowAlgArray()
Definition: EdbShowRec.cxx:1719
Int_t GetShowAlgArrayN() const
Definition: EdbShowRec.h:483
Int_t eShowAlgArraySingleN[10]
Definition: EdbShowRec.h:69

◆ AddEdbPVRec()

void EdbShowRec::AddEdbPVRec ( EdbPVRec Ali)
5334 {
5335  Log(2,"EdbShowRec::AddEdbPVRec( EdbPVRec* Ali )","WARNING More than ONE EdbPVRec is NOT supported! Do nothing.");
5336  return;
5337 }

◆ AddInBT()

void EdbShowRec::AddInBT ( EdbSegP segment)
5341 {
5342  // cout << " AddInBT(EdbSegP* seg): Add Segment (" << seg << ") to eInBTArray:" <<endl;
5343  if (NULL==eInBTArray) {
5344  cout << " AddRecoShowerArray(): NULL==eInBTArray. Create it first!" <<endl;
5345  eInBTArray=new TObjArray();
5346  SetInBTArrayN(0);
5347  }
5348  // Now add it:
5349  eInBTArray->Add(seg);
5350  ++eInBTArrayN;
5351  return;
5352 }
Int_t eInBTArrayN
Definition: EdbShowRec.h:63
#define NULL
Definition: nidaqmx.h:84

◆ AddInBTArray() [1/4]

void EdbShowRec::AddInBTArray ( EdbPattern pattern)
5363 {
5364  // Loop over all segments of the pattern, and add its segments
5365  Log(2,"EdbShowRec::AddInBTArray( EdbPattern* pattern )","Add pattern (ID=%d)", pattern->ID());
5366 
5367  cout << " pattern->ID() = " << pattern->ID() << " pattern->Z() = " << pattern->Z() << endl;
5368  // check if pattern is not NULL object
5369  if (NULL == pattern) {
5370  Log(2,"EdbShowRec::AddInBTArray( EdbPattern* pattern )","WARNING! Requested pattern is NULL object. Dont add. Return.");
5371  return;
5372  }
5373 
5374 // cout << "Loop over all segments of the pattern, and add its segments" << endl;
5375  Int_t patN = pattern->N();
5376 
5377 // patN=1;
5378 // cout << "DEBUG DEBUG DEBUG Add only first segment!" << endl;
5379 
5380  for (Int_t i=0; i<patN; ++i) {
5381  EdbSegP* seg = pattern->GetSegment(i);
5382  // And if not every seg is whished to be added: check for
5383  if (gRandom->Uniform()>eInBTArrayFraction) continue;
5384  AddInBT(seg);
5385  }
5386 
5387  //cout << " AddInBTArray(): After adding, we have now " << GetInBTArrayN() << " entries." << endl;
5388  Log(2,"EdbShowRec::AddInBTArray( EdbPattern* pattern )","AddInBTArray()...done.");
5389  return;
5390 }
int ID() const
Definition: EdbPattern.h:328
Definition: EdbSegP.h:18
Float_t Z() const
Definition: EdbPattern.h:87
Int_t N() const
Definition: EdbPattern.h:89
EdbSegP * GetSegment(int i) const
Definition: EdbPattern.h:66
Double_t eInBTArrayFraction
Definition: EdbShowRec.h:184
void AddInBT(EdbSegP *segment)
Definition: EdbShowRec.cxx:5340

◆ AddInBTArray() [2/4]

void EdbShowRec::AddInBTArray ( EdbPVRec volume)
5394 {
5395  // Loop over all patterns of the volume, and add its segments
5396  Log(2,"EdbShowRec::AddInBTArray( EdbPVRec* volume )","Add all patterns of the volume...");
5397 
5398  // check if volume is not NULL object
5399  if (NULL == volume) {
5400  Log(2,"EdbShowRec::AddInBTArray( EdbPVRec* volume )","WARNING! Requested volume is NULL object. Dont add. Return.");
5401  return;
5402  }
5403 
5404  Int_t volumeN = volume->Npatterns();
5405  for (Int_t i=0; i<volumeN; ++i) {
5406  EdbPattern* pat = volume->GetPattern(i);
5407  AddInBTArray(pat);
5408  }
5409  Log(2,"EdbShowRec::AddInBTArray( EdbPVRec* volume )","After adding all patterns, we have now total InBTs:", GetInBTArrayN() );
5410  Log(2,"EdbShowRec::AddInBTArray( EdbPVRec* volume )","Add all patterns of the volume...done.");
5411  return;
5412 }
Definition: EdbPattern.h:280
EdbPattern * GetPattern(int id) const
Definition: EdbPattern.cxx:1887
void AddInBTArray(TObjArray *InBTArray)
Definition: EdbShowRec.cxx:5416
Int_t GetInBTArrayN() const
Definition: EdbShowRec.h:480

◆ AddInBTArray() [3/4]

void EdbShowRec::AddInBTArray ( EdbSegP segment)
5356 {
5357  AddInBT( seg );
5358  return;
5359 }

◆ AddInBTArray() [4/4]

void EdbShowRec::AddInBTArray ( TObjArray *  InBTArray)
5417 {
5418  Log(2,"EdbShowRec::AddInBTArray( TObjArray* InBTArray )","AddInBTArray()...");
5419 
5420  if (NULL==eInBTArray) {
5421  cout << " AddRecoShowerArray(): NULL==eInBTArray. Create it first!" <<endl;
5422  eInBTArray=new TObjArray();
5423  SetInBTArrayN(0);
5424  }
5425 
5426  // check if volume is not NULL object
5427  if (NULL == InBTArray) {
5428  Log(2,"EdbShowRec::AddInBTArray( TObjArray* InBTArray )","WARNING! Requested TObjArray is NULL object. Dont add. Return.");
5429  return;
5430  }
5431 
5432 
5433  // Now add it:
5434  // There is NO check yet if the InBTArray has segments in it, or if they are from the type "EdbSegP"
5435  // To be done a check....
5436  for (Int_t i=0; i<InBTArray->GetEntries(); ++i) {
5437  EdbSegP* seg=(EdbSegP*)InBTArray->At(i);
5438  // Here it needs to check if that object is really a EdbSegP object...
5439  // And if not every seg is whished to be added: check for
5440  if (gRandom->Uniform()>eInBTArrayFraction) continue;
5441  eInBTArray->Add(seg);
5442  }
5443  SetInBTArrayN(eInBTArray->GetEntries());
5444  cout << " AddInBTArray(): After adding, we have now " << GetInBTArrayN() << " entries." << endl;
5445  eInBTArray->Print();
5446  Log(2,"EdbShowRec::AddInBTArray( TObjArray* InBTArray )","AddInBTArray()...done");
5447  return;
5448 }

◆ AddRecoShowerArray()

void EdbShowRec::AddRecoShowerArray ( TObjArray *  RecoShowerArray)
5473  {
5474  cout << " AddRecoShowerArray(): Add RecoShower Array to eRecoShowerarray:" <<endl;
5475  if (NULL==eRecoShowerArray) {
5476  cout << " AddRecoShowerArray(): NULL==eRecoShowerArray. Create it forst!" <<endl;
5477  eRecoShowerArray=new TObjArray();
5479  }
5480  // Now add it:
5481  // There is NO check yet if the RecoShowerArray has showers in it!
5482  // To be done a check....
5483  for (Int_t i=0; i<RecoShowerArray->GetEntries(); ++i) {
5484  EdbShowerP* shower=(EdbShowerP*)RecoShowerArray->At(i);
5485  // Here it needs to check if that object is really a EdbShowerP object...
5486  eRecoShowerArray->Add(shower);
5487  }
5488  SetRecoShowerArrayN(eRecoShowerArray->GetEntries());
5489  cout << " AddRecoShowerArray(): After adding, we have now " << GetRecoShowerArrayN() << "entries." << endl;
5490  eRecoShowerArray->Print();
5491  return;
5492 }
TObjArray * RecoShowerArray
Definition: Shower_E_FromShowerRoot.C:12
Int_t GetRecoShowerArrayN() const
Definition: EdbShowRec.h:486
Definition: EdbShowerP.h:28

◆ AddShowAlgArray()

void EdbShowRec::AddShowAlgArray ( TObjArray *  ShowAlgArray)
5452  {
5453  cout << " AddShowAlgArray(): Add ShowAlgArray Array to eShowAlgArray:" <<endl;
5454  if (NULL==eShowAlgArray) {
5455  cout << " AddRecoShowerArray(): NULL==eRecoShowerArray. Create it forst!" <<endl;
5456  eShowAlgArray=new TObjArray();
5457  SetShowAlgArrayN(0);
5458  }
5459  // Now add it:
5460  // There is NO check yet if the ShowAlgArray has algs in it!
5461  // To be done a check....
5462  for (Int_t i=0; i<ShowAlgArray->GetEntries(); ++i) {
5463  EdbShowAlg* alg=(EdbShowAlg*)ShowAlgArray->At(i);
5464  // Here it needs to check if that object is really a EdbShowAlg object...
5465  eShowAlgArray->Add(alg);
5466  }
5467  SetShowAlgArrayN(eShowAlgArray->GetEntries());
5468  cout << " AddShowAlgArray(): After adding, we have now " << GetShowAlgArrayN() << " entries." << endl;
5469  eShowAlgArray->Print();
5470  return;
5471 }
Definition: EdbShowAlg.h:40

◆ BuildParametrizations()

void EdbShowRec::BuildParametrizations ( )
private
3760 {
3761  Log(2,"EdbShowRec::BuildParametrizations()","BuildParametrizations");
3762 
3763  if (eRecoShowerArrayN==0) {
3764  cout << "EdbShowRec::BuildParametrizations WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
3765  return;
3766  }
3767 
3768  EdbShowerP* show=0;
3769  int maxParametrizationType=6;
3770  Bool_t doMakePara=kFALSE;
3771 
3772  Log(2,"EdbShowRec::BuildParametrizations()","Will build the following parametrizations:");
3773  for ( int j=0; j<maxParametrizationType; j++ ) {
3774  if (eParaTypes[j]==1) {
3775  doMakePara=kTRUE;
3776  cout << "Shower parametrization j = " << eParaTypes[j] << " name: " << eParaNames[j].Data() << endl;
3777  }
3778  }
3779 
3780  if (doMakePara==kFALSE) {
3781  Log(2,"EdbShowRec::BuildParametrizations()","No parametrization set to be done!");
3782  Log(2,"EdbShowRec::BuildParametrizations()","BuildParametrizations...done.");
3783  return;
3784  }
3785 
3786  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
3787  if (gEDBDEBUGLEVEL>3) cout << "EdbShowRec::BuildParametrizations i= " << i << " of (" << eRecoShowerArrayN << ")"<< endl;
3788  show=(EdbShowerP*)eRecoShowerArray->At(i);
3789  if (gEDBDEBUGLEVEL>3) show->PrintNice();
3790  for ( int j=0; j<maxParametrizationType; j++ ) {
3791  if (eParaTypes[j]==1) show->BuildParametrisation(j);
3792  }
3793  }
3794 
3795  Log(2,"EdbShowRec::BuildParametrizations()","BuildParametrizations...done.");
3796  return;
3797 }
TString eParaNames[8]
Definition: EdbShowRec.h:129
Int_t eRecoShowerArrayN
Definition: EdbShowRec.h:74
Int_t eParaTypes[8]
Definition: EdbShowRec.h:128
void PrintNice()
Definition: EdbShowerP.cxx:2339
void BuildParametrisation(Int_t ParaNr)
Definition: EdbShowerP.cxx:1190

◆ BuildParametrizationsAll()

void EdbShowRec::BuildParametrizationsAll ( )
private
3803 {
3804  cout << "NOT YET IMPLEMENTED...."<<endl;
3805  cout << "use .... EdbShowRec::BuildParametrizations() instead ...."<<endl;
3806  return;
3807 }

◆ BuildParametrizationsMCInfo()

void EdbShowRec::BuildParametrizationsMCInfo ( TString  MCInfoFilename,
Int_t  type 
)
5010  {
5011 
5012  Log(2,"EdbShowRec::BuildParametrizationsMCInfo()","BuildParametrizationsMCInfo()");
5013  cout << "BuildParametrizationsMCInfo::MCInfoFilename = " << MCInfoFilename << endl;
5014  cout << "BuildParametrizationsMCInfo::type = " << type << endl;
5015 
5016  // First Check if showers are stored, otherwise it makes no sense to give
5017  // them the event monte carlo information:
5018  if (eRecoShowerArrayN==0) {
5019  cout << "BuildParametrizationsMCInfo::eRecoShowerArrayN = " << eRecoShowerArrayN << ". So BuildParametrizationsMCInfo() for showers makes no sense. Return."<< endl;
5020  return;
5021  }
5022 
5023  if (type==0) BuildParametrizationsMCInfo_PGun( MCInfoFilename);
5024  if (type==1) BuildParametrizationsMCInfo_Event( MCInfoFilename);
5025 
5026  return;
5027 }
void BuildParametrizationsMCInfo_Event(TString MCInfoFilename)
Definition: EdbShowRec.cxx:5134
void BuildParametrizationsMCInfo_PGun(TString MCInfoFilename)
Definition: EdbShowRec.cxx:5031
Int_t type
Definition: testBGReduction_By_ANN.C:15

◆ BuildParametrizationsMCInfo_Event()

void EdbShowRec::BuildParametrizationsMCInfo_Event ( TString  MCInfoFilename)
5134  {
5135 
5136  Log(2,"EdbShowRec::BuildParametrizationsMCInfo_Event()","BuildParametrizationsMCInfo_Event()");
5137  Log(2,"EdbShowRec::BuildParametrizationsMCInfo_Event()","BuildParametrizationsMCInfo_Event()....NOT YET IMPLEMENTED.");
5138 
5139  return;
5140 }

◆ BuildParametrizationsMCInfo_PGun()

void EdbShowRec::BuildParametrizationsMCInfo_PGun ( TString  MCInfoFilename)

PGunTree still in memory... toDO: delete after Tree written to file, make Private variable? .... ????

5031  {
5032 
5033  Log(2,"EdbShowRec::BuildParametrizationsMCInfo_PGun()","BuildParametrizationsMCInfo_PGun()");
5034 
5035  //Declare Tree Variables
5036  Int_t MCEvt, PDGId;
5037  Float_t energy, tantheta,dirx,diry,dirz,vtxposx,vtxposy,vtxposz;
5038  Float_t TX,TY,Y,X,Z;
5039 
5040  // Check File Existence:
5041  // FileExists(TString&) doesnt work yet...
5042  /* if (!FileExists(MCInfoFilename)) {
5043  cout << "BuildParametrizationsMCInfo_PGun: FileExists(MCInfoFilename)=0: File doesnt seem to exist!"<<endl;
5044  return;
5045  }*/
5046 
5047  // Read Tree with File:
5048  TTree* PGunTree = new TTree();
5049  PGunTree->ReadFile(MCInfoFilename,"MCEvt/I:energy/F:tantheta/F:dirx/F:diry/F:dirz/F:vtxposx/F:vtxposy/F:vtxposz/F:TX/F:TY/F:X/F:Y/F:Z/F:PDGId/I");
5050  PGunTree->SetBranchAddress("MCEvt",&MCEvt);
5051  PGunTree->SetBranchAddress("PDGId",&PDGId);
5052  PGunTree->SetBranchAddress("energy",&energy);
5053  PGunTree->SetBranchAddress("tantheta",&tantheta);
5054  PGunTree->SetBranchAddress("dirx",&dirx);
5055  PGunTree->SetBranchAddress("diry",&diry);
5056  PGunTree->SetBranchAddress("dirz",&dirz);
5057  PGunTree->SetBranchAddress("vtxposx",&vtxposx);
5058  PGunTree->SetBranchAddress("vtxposy",&vtxposy);
5059  PGunTree->SetBranchAddress("vtxposz",&vtxposz);
5060  PGunTree->SetBranchAddress("TX",&TX);
5061  PGunTree->SetBranchAddress("TY",&TY);
5062  PGunTree->SetBranchAddress("X",&X);
5063  PGunTree->SetBranchAddress("Z",&Z);
5064  PGunTree->SetBranchAddress("Y",&Y);
5065  if (gEDBDEBUGLEVEL>2) PGunTree->Print();
5066 
5067 // PGunTree->Show(0);
5068 // cout << "PGunTree->GetEntries(); " << PGunTree->GetEntries() << endl;
5069 
5070  // 69999 // why this number???
5071  Int_t PGunTreeEntry_MCEvt_Correspondance[69999]; // PGunTreeEntry_MCEvt_Correspondance[0]=TreeEntry(0)->MC()
5072  for (Int_t i=0; i<PGunTree->GetEntries(); ++i) {
5073  PGunTree->GetEntry(i);
5074  PGunTreeEntry_MCEvt_Correspondance[MCEvt]=i;
5075  }
5076 
5077  if (gEDBDEBUGLEVEL<3) {
5078  cout << "VERY IMPORTANT:" << endl;
5079  cout << "To have a 1:1 correspondance we have to store the MC para for EACH shower MCEvt number." << endl;
5080  cout << "If for example three showers are there which have the same MCEvtNumber but MCInfo is written" << endl;
5081  cout << "only once, then there will be a shift and a MISMATCHING OCCURS and all the data will be useless!" << endl;
5082  }
5083 
5084  if (eRecoShowerArrayN<1) {
5085  cout << "EdbShowRec::BuildParametrizationsMCInfo_PGun(): NO SHOWERS IN eRecoShowerArray!! return." << endl;
5086  return;
5087  }
5088 
5089 
5090  // If showers are stored, get them and fill the values according to PGunTree MCEvent number:
5091  for (Int_t i=0; i<eRecoShowerArrayN; ++i) {
5092  EdbShowerP* shower = (EdbShowerP*) eRecoShowerArray->At(i);
5093  // Get right corresponding Treeentry:
5094  int nMCEvt=shower->MCEvt();
5095  //cout << " // Get right corresponding Treeentry: nMCEvt=shower->MCEvt(); " << nMCEvt<< endl;
5096  //cout << " // Get right corresponding Treeentry: PGunTreeEntry_MCEvt_Correspondance[nMCEvt] " << PGunTreeEntry_MCEvt_Correspondance[nMCEvt] << endl;
5097  PGunTree->GetEntry(PGunTreeEntry_MCEvt_Correspondance[nMCEvt]);
5098  // Show it:
5099  if (gEDBDEBUGLEVEL>3) PGunTree->Show(PGunTreeEntry_MCEvt_Correspondance[nMCEvt]);
5100  // Get Parametrisation:
5101  EdbShowerP::MCInfo_PGun fMCInfo_PGun = shower->GetMCInfo_PGun();
5102  // Set Values:
5103  fMCInfo_PGun.MCEvt=nMCEvt;
5104  fMCInfo_PGun.PDGId=PDGId; // not Set up to now...one has to set it manually....///tODO
5105  fMCInfo_PGun.energy=energy;
5106  fMCInfo_PGun.tantheta=tantheta;
5107  fMCInfo_PGun.dirx=dirx;
5108  fMCInfo_PGun.diry=diry;
5109  fMCInfo_PGun.dirz=dirz;
5110  fMCInfo_PGun.vtxposx=vtxposx;
5111  fMCInfo_PGun.vtxposy=vtxposy;
5112  fMCInfo_PGun.vtxposz=vtxposz;
5113  fMCInfo_PGun.TX=TX;
5114  fMCInfo_PGun.TY=TY;
5115  fMCInfo_PGun.X=X;
5116  fMCInfo_PGun.Y=Y;
5117  fMCInfo_PGun.Z=Z;
5118  shower->SetMCInfo_PGun(fMCInfo_PGun);
5119 
5120  // Finally, tell the shower that MCInfo_PGun was done.
5121  shower->SetMCInfoIsDone(0,kTRUE);
5122 
5123  if (gEDBDEBUGLEVEL>3) shower->PrintMCInfo_PGun();
5124  }
5125 
5126 
5128 
5129  return;
5130 }
Int_t MCEvt() const
Definition: EdbSegP.h:142
void SetMCInfo_PGun(MCInfo_PGun fMCInfo_PGun)
Definition: EdbShowerP.h:605
void PrintMCInfo_PGun()
Definition: EdbShowerP.cxx:2623
MCInfo_PGun GetMCInfo_PGun() const
Definition: EdbShowerP.h:590
void SetMCInfoIsDone(Int_t nr, Bool_t IsDone)
Definition: EdbShowerP.h:597
struct @8 Z
Double_t X
Definition: tlg2pattern.C:77
Double_t Y
Definition: tlg2pattern.C:77
Double_t TY
Definition: tlg2pattern.C:79
Double_t TX
Definition: tlg2pattern.C:79
Definition: EdbShowerP.h:269
Float_t vtxposy
Definition: EdbShowerP.h:283
Float_t Y
Definition: EdbShowerP.h:287
Int_t MCEvt
Definition: EdbShowerP.h:275
Float_t vtxposz
Definition: EdbShowerP.h:284
Float_t Z
Definition: EdbShowerP.h:289
Int_t PDGId
Definition: EdbShowerP.h:276
Float_t X
Definition: EdbShowerP.h:288
Float_t vtxposx
Definition: EdbShowerP.h:282
Float_t TX
Definition: EdbShowerP.h:285
Float_t tantheta
Definition: EdbShowerP.h:278
Float_t diry
Definition: EdbShowerP.h:280
Float_t dirz
Definition: EdbShowerP.h:281
Float_t TY
Definition: EdbShowerP.h:286
Float_t energy
Definition: EdbShowerP.h:277
Float_t dirx
Definition: EdbShowerP.h:279

◆ Check_eInBTArray()

void EdbShowRec::Check_eInBTArray ( )

— TEMPORARY PUBLIC FUNCTIONS.... LATER THESE SHOULD PUT INTO PRIVATE.... — TEMPORARY PUBLIC FUNCTIONS.... NOW ONLY FOR DEBUGGING PURPOSES....

1094 {
1095  Log(2,"EdbShowRec::Check_eInBTArray()","Check the Initiator Basetrack array");
1096  Log(2,"EdbShowRec::Check_eInBTArray()","Check if and wheter to set the Array if InBTs");
1097  Log(2,"EdbShowRec::Check_eInBTArray()","The order is in the way:");
1098  Log(2,"EdbShowRec::Check_eInBTArray()"," a) if eAli has eTracks, take eTracks.");
1099  Log(2,"EdbShowRec::Check_eInBTArray()"," b) if a linked_tracks.root file is existing, take tracks from there-");
1100  Log(2,"EdbShowRec::Check_eInBTArray()"," c) take all BT from eAli from [firstplate..middleplate]");
1101  Log(2,"EdbShowRec::Check_eInBTArray()"," d) from a (manually) written root file containing a TObjArray of EdbSegP segments (InBT)");
1102  Log(2,"EdbShowRec::Check_eInBTArray()"," e) take N randomly selected BTs from eAli from [firstplate..middleplate]");
1103 
1104  // Check if and wheter to set the Array if InBTs.
1105  // The order is in the way (if the corresponding stuff is there:
1106  // (of course the settings in default.par will still be present):
1107  // a) if eAli has eTracks, take eTracks.
1108  // b) if a linked_tracks.root file is existing, take tracks from there-
1109  // c) take all BT from eAli from [firstplate..middleplate]
1110  // d) from a (manually) written root file containing a TObjArray of EdbSegP segments (InBT)
1111  // e) e) take N randomly selected BTs from eAli from [firstplate..middleplate]
1112  if (!eAli) {
1113  Log(2,"EdbShowRec::Check_eInBTArray","No eAli created yet. For now: return;");
1114  return;
1115  }
1116 
1117  if (!eInBTArray) {
1118  Log(2,"EdbShowRec::Check_eInBTArray","No eInBTArray created yet. Create it.");
1120  Log(2,"EdbShowRec::Check_eInBTArray","No eInBTArray created yet. Create it....done.");
1121  }
1122 
1123  if (!eInBTTree) {
1124  Log(2,"EdbShowRec::Check_eInBTArray","No eInBTTree created yet. Create it.");
1125  Create_eInBTTree();
1126  Log(2,"EdbShowRec::Check_eInBTArray","No eInBTTree created yet. Create it...done");
1127  }
1128 
1129  // -------------------------------------------------
1130  // TO BE PRECISE, THE FOLLOWING CODE IS __NOT__ PART OF A CHECK FUNTION,
1131  // SINCE IT DOES ALSO FILLING AT ONCE.
1132  // SO FOR FURTHER PURPOSES, IT SHOULD BE TAKEN OUT.... (???)
1133  // AN BE PLACED IN A SEPERATE FUNCTION ....
1134  // -------------------------------------------------
1135 
1140 
1141  /*
1142 
1143  // Case a:
1144  cout << "EdbShowRec::Check_eInBTArray Case a: if eAli has eTracks, take eTracks." << endl;
1145  Fill_eInBTArray_ByRecoLinkTracks_eAli();
1146  if (eInBTArrayN!=0) return;
1147  cout << "EdbShowRec::Check_eInBTArray Case a: Fill_eInBTArray_ByRecoLinkTracks_eAli() was NOT successful. Go on with method b. " << endl;
1148 
1149  // Case b:
1150  cout << "EdbShowRec::Check_eInBTArray Case b: " << endl;
1151  Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks();
1152  if (eInBTArrayN!=0) return;
1153  cout << "EdbShowRec::Check_eInBTArray Case b: Fill_eInBTArray_ByRecoLinkTracks_eAli() was NOT successful. Go on with method c. " << endl;
1154 
1155  // Case c:
1156  cout << "EdbShowRec::Check_eInBTArray Case c: " << endl;
1157  Fill_eInBTArray_ByBaseTracksOf_eAli();
1158  if (eInBTArrayN!=0) return;
1159  cout << "EdbShowRec::Check_eInBTArray Case c: Fill_eInBTArray_ByRecoLinkTracks_eAli() was NOT successful. Go on with method c." << endl;
1160 
1161  // Case d:
1162  cout << "EdbShowRec::Check_eInBTArray Case d: " << endl;
1163  Fill_eInBTArray_ByBaseTracksOf_RootFile();
1164  if (eInBTArrayN!=0) return;
1165  cout << "EdbShowRec::Check_eInBTArray Case d: Fill_eInBTArray_ByBaseTracksOf_RootFile() was NOT successful. Stop here." << endl;
1166 
1167  */
1168 
1169  Log(2,"EdbShowRec::Check_eInBTArray()","Check the Initiator Basetrack array...done.");
1170  return;
1171 }
TTree * eInBTTree
root-style text cuts
Definition: EdbShowRec.h:181
Bool_t Check_Fill_eInBTArray_ByBaseTracksOf_RootFile()
Definition: EdbShowRec.cxx:1204
Bool_t Check_Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks()
Definition: EdbShowRec.cxx:1196
Bool_t Check_eInBTArray_ByRecoLinkTracks_eAli()
Definition: EdbShowRec.cxx:1175
Bool_t Check_Fill_eInBTArray_ByBaseTracksOf_eAli()
Definition: EdbShowRec.cxx:1200
void Create_eInBTTree()
Definition: EdbShowRec.cxx:1212
void Create_eInBTArray()
Definition: EdbShowRec.cxx:1071

◆ Check_eInBTArray_ByRecoLinkTracks_eAli()

Bool_t EdbShowRec::Check_eInBTArray_ByRecoLinkTracks_eAli ( )
1176 {
1177  // Check if eAli has already fitted tracks.
1178  // Make tracks using standard track fitting/propagation routines.
1179  Log(2,"EdbShowRec::Check_eInBTArray_ByRecoLinkTracks_eAli()","Do tracks in the eAli object exist...");
1180  if (eAli->eTracks==NULL) {
1181  Log(2,"EdbShowRec::Check_eInBTArray_ByRecoLinkTracks_eAli()","Do tracks in the eAli object exist...No.");
1182  return kFALSE;
1183  }
1184  Log(2,"EdbShowRec::Check_eInBTArray_ByRecoLinkTracks_eAli()","Do tracks in the eAli object exist...Yes.");
1185  Log(2,"EdbShowRec::Check_eInBTArray_ByRecoLinkTracks_eAli()","Do tracks in the eAli object exist...done.");
1186  return kTRUE;
1187 }
TObjArray * eTracks
Definition: EdbPVRec.h:161

◆ Check_Fill_eInBTArray_ByBaseTracksOf_eAli()

Bool_t EdbShowRec::Check_Fill_eInBTArray_ByBaseTracksOf_eAli ( )
1200  {
1201  cout << "TO BE IMPLEMENTED HERE..." << endl;
1202  return kFALSE;
1203 }

◆ Check_Fill_eInBTArray_ByBaseTracksOf_RootFile()

Bool_t EdbShowRec::Check_Fill_eInBTArray_ByBaseTracksOf_RootFile ( )
1204  {
1205  cout << "TO BE IMPLEMENTED HERE..." << endl;
1206  return kFALSE;
1207 }

◆ Check_Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks()

Bool_t EdbShowRec::Check_Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks ( )
1196  {
1197  cout << "TO BE IMPLEMENTED HERE..." << endl;
1198  return kFALSE;
1199 }

◆ CheckFilePresence()

void EdbShowRec::CheckFilePresence ( )
494 {
495  // Check if relevant files are present in current directory:
496  // file for linked_tracks, lnk.def, EdbPVR volume.
497  Log(2,"EdbShowRec::CheckFilePresence()","Check if relevant files are present in current directory");
498 
499  Bool_t eFilename_LinkedTracks_Exists;
500  Bool_t eFilename_LnkDef_Exists;
501  Bool_t eFilename_EdbPVRecObject_Exists;
502 
503  eFilename_LinkedTracks_Exists=FileExists(std::string(eFilename_LinkedTracks));
504  eFilename_LnkDef_Exists=FileExists(std::string(eFilename_LnkDef));
505  eFilename_EdbPVRecObject_Exists=FileExists(std::string(eFilename_EdbPVRecObject));
506 
507  if (!FileExists(std::string(eFilename_LinkedTracks))) Log(2,"EdbShowRec::CheckFilePresence()","WARNING: File eFilename_LinkedTracks does not exist ");
508  if (!FileExists(std::string(eFilename_LnkDef))) Log(2,"EdbShowRec::CheckFilePresence()","ERROR: File eFilename_LnkDef does not exist ");
509  if (!FileExists(std::string(eFilename_EdbPVRecObject))) Log(2,"EdbShowRec::CheckFilePresence()","WARNING: File eFilename_EdbPVRecObject does not exist ");
510 
511  Log(2,"EdbShowRec::CheckFilePresence()","No action taken. TO BE IMPLEMENTED THAT IN CASE FILES ARE NOT PRESENT, that PROGRAM IS STOPPED");
512 
513  Log(2,"EdbShowRec::CheckFilePresence()","Check if relevant files are present in current directory...done.");
514  return;
515 }
bool FileExists(string strFilename)
Definition: EdbShowRec.cxx:3938
TString eFilename_LnkDef
Definition: EdbShowRec.h:135
TString eFilename_LinkedTracks
Definition: EdbShowRec.h:136
TString eFilename_EdbPVRecObject
Definition: EdbShowRec.h:137

◆ CheckPlateValues()

void EdbShowRec::CheckPlateValues ( )
private
3663  {
3664 
3665  Log(2,"EdbShowRec::CheckPlateValues()","CheckPlateValues()");
3666 
3667  // Restore from default values to logical ones:
3672 
3673  // eAli->Print();
3674  /*
3675  cout << "eFirstPlate= " << eFirstPlate << endl;
3676  cout << "eProposedFirstPlate= " << eProposedFirstPlate << endl;
3677  cout << "eFirstPlate_eAliPID= " << eFirstPlate_eAliPID << endl;
3678  cout<<endl;
3679  cout << "eLastPlate= " << eLastPlate << endl;
3680  cout << "eProposedLastPlate= " << eProposedLastPlate << endl;
3681  cout << "eLastPlate_eAliPID= " << eLastPlate_eAliPID << endl;
3682  cout<<endl;
3683  cout << "eMiddlePlate= " << eMiddlePlate << endl;
3684  cout << "eProposedMiddlePlate= " << eProposedMiddlePlate << endl;
3685  cout << "eMiddlePlate_eAliPID= " << eMiddlePlate_eAliPID << endl;
3686  cout<<endl;
3687  cout << "eAliNpat= " << eAliNpat << endl;
3688  */
3689 
3690  if (eProposedFirstPlate<1 || eProposedFirstPlate>eAliNpat-2 || eProposedFirstPlate==eFirstPlate) {
3691  // Do nothing!
3692  Log(2,"EdbShowRec::CheckPlateValues()","Do nothing for eProposedFirstPlate.");
3693  }
3694  else {
3696  Log(2,"EdbShowRec::CheckPlateValues","SetFirstPlate() = %d", eProposedFirstPlate);
3697  }
3698 
3699  if (eProposedMiddlePlate<eFirstPlate || eProposedMiddlePlate>eAliNpat-2 || eProposedMiddlePlate==eMiddlePlate) {
3700  // Do nothing!
3701  Log(2,"EdbShowRec::CheckPlateValues()","Do nothing for eProposedMiddlePlate.");
3702  }
3703  else {
3705  Log(2,"EdbShowRec::CheckPlateValues","SetMiddlePlate() = %d", eProposedMiddlePlate);
3706  }
3707 
3708  if (eProposedLastPlate<=2 || eProposedLastPlate>=eAliNpat || eProposedLastPlate==eLastPlate ) {
3709  // Do nothing!
3710  Log(2,"EdbShowRec::CheckPlateValues()","Do nothing for eProposedLastPlate.");
3711  }
3712  else {
3714  Log(2,"EdbShowRec::CheckPlateValues","SetLastPlate() = %d", eProposedLastPlate);
3715  }
3716 
3718  // Do nothing!
3719  Log(2,"EdbShowRec::CheckPlateValues()","Do nothing for eProposedNumberPlate.");
3720  }
3721  else {
3723  Log(2,"EdbShowRec::CheckPlateValues","SetNumberPlate() = %d", eProposedNumberPlate);
3724  }
3725 
3730 
3731  Log(2,"EdbShowRec::CheckPlateValues()","eFirstPlate = %02d ",eFirstPlate);
3732  Log(2,"EdbShowRec::CheckPlateValues()","eFirstPlate_eAliPID = %02d ",eFirstPlate_eAliPID);
3733  Log(2,"EdbShowRec::CheckPlateValues()","eLastPlate = %02d ",eLastPlate);
3734  Log(2,"EdbShowRec::CheckPlateValues()","eLastPlate_eAliPID = %02d ",eLastPlate_eAliPID);
3735  Log(2,"EdbShowRec::CheckPlateValues()","eMiddlePlate = %02d ",eMiddlePlate);
3736  Log(2,"EdbShowRec::CheckPlateValues()","eMiddlePlate_eAliPID = %02d ",eMiddlePlate_eAliPID);
3737  Log(2,"EdbShowRec::CheckPlateValues()","eNumberPlate = %02d ",eNumberPlate);
3738  Log(2,"EdbShowRec::CheckPlateValues()","eNumberPlate_eAliPID = %02d ",eNumberPlate_eAliPID);
3739 
3740  Log(2,"EdbShowRec::CheckPlateValues()","CheckPlateValues()...done.");
3741  return;
3742 }
Int_t eFirstPlate_eAliPID
Definition: EdbShowRec.h:95
void SetLastPlate(Int_t LastPlate)
Definition: EdbShowRec.h:401
Int_t eAliStreamTypeStep
Definition: EdbShowRec.h:116
Int_t eLastPlate_eAliPID
Definition: EdbShowRec.h:96
Int_t eProposedFirstPlate
Definition: EdbShowRec.h:103
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 eProposedNumberPlate
Definition: EdbShowRec.h:106
Int_t eNumberPlate
Definition: EdbShowRec.h:91
void SetFirstPlate(Int_t FirstPlate)
Definition: EdbShowRec.h:398
Int_t eNumberPlate_eAliPID
Definition: EdbShowRec.h:98
void SetNumberPlate_eAliPID(Int_t plate, Int_t StreamTypeStep)
Definition: EdbShowRec.cxx:3851
Int_t eMiddlePlate_eAliPID
Definition: EdbShowRec.h:97
void SetMiddlePlate_eAliPID(Int_t plate, Int_t StreamTypeStep)
Definition: EdbShowRec.cxx:3824
Int_t eProposedLastPlate
Definition: EdbShowRec.h:104
void SetLastPlate_eAliPID(Int_t plate, Int_t StreamTypeStep)
Definition: EdbShowRec.cxx:3837
Int_t eMiddlePlate
Definition: EdbShowRec.h:90
void SetMiddlePlate(Int_t MiddlePlate)
Definition: EdbShowRec.h:404
void SetFirstPlate_eAliPID(Int_t FP, Int_t StreamTypeStep)
Definition: EdbShowRec.cxx:3811
Int_t eLastPlate
Definition: EdbShowRec.h:89

◆ ClassDef()

EdbShowRec::ClassDef ( EdbShowRec  ,
 
)

◆ Create_eInBTArray()

void EdbShowRec::Create_eInBTArray ( )
private
1072 {
1073  Log(2,"EdbShowRec::Create_eInBTArray()","Create the Initiator Basetrack array");
1074 
1075  if (eInBTArray) {
1076  cout << "EdbShowRec::Create_eInBTArray eInBTArray already there. Just Clear it." << endl;
1077  eInBTArray->Clear();
1078  }
1079  else {
1080  eInBTArray = new TObjArray(eInBTArrayMaxSize);
1081  cout << "EdbShowRec::Create_eInBTArray New eInBTArray created." << endl;
1082  }
1083 
1084  eInBTArrayLoaded=kTRUE;
1085 
1086  Log(2,"EdbShowRec::Create_eInBTArray()","Create the Initiator Basetrack array...done");
1087  return;
1088 }

◆ Create_eInBTTree()

void EdbShowRec::Create_eInBTTree ( )
private
1213 {
1214  Log(2,"EdbShowRec::Create_eInBTArray()","Create the Initiator Basetrack tree...done");
1215 
1216  if (eInBTTree) {
1217  delete eInBTTree;
1218  eInBTTree=0;
1219  Log(2,"EdbShowRec::Create_eInBTArray()","Deletion of the odl Initiator Basetrack tree done.");
1220  }
1221  EdbSegP* seg=0;
1222 
1223  // For now we have to create a dummy root file before creating the TTree,
1224  // otherwise the "error" message:
1225 // // Error in <TTree::Fill>: Failed filling branch:eInBTTree.s, nbytes=-1, entry=69960
1226 // // This error is symptomatic of a Tree created as a memory-resident Tree
1227 // // Instead of doing:
1228 // // TTree *T = new TTree(...)
1229 // // TFile *f = new TFile(...)
1230 // // you should do:
1231 // // TFile *f = new TFile(...)
1232 // // TTree *T = new TTree(...)
1233  //
1234  // will apear many times
1235 
1236  TFile* dummyFile = new TFile("dummyFile.root","RECREATE");
1237  if (!eInBTTree) {
1238  eInBTTree = new TTree("eInBTTree","eInBTTree");
1239  cout << "EdbShowRec::Create_eInBTTree() Constructor done"<<endl;
1240  eInBTTree->Branch("s","EdbSegP",&seg,32000,99);
1241  cout << "EdbShowRec::Create_eInBTTree() Branch done"<<endl;
1242  }
1243 
1244  Log(2,"EdbShowRec::Create_eInBTArray()","Create the Initiator Basetrack tree...done");
1245  return;
1246 }

◆ Create_eShowAlgArray()

void EdbShowRec::Create_eShowAlgArray ( )
private
1720 {
1721  Log(2,"EdbShowRec::SetPlateNumberValues()","Create_eShowAlgArray");
1722  if (eShowAlgArray) {
1723  cout << "EdbShowRec::Create_eShowAlgArray() eShowAlgArray already there. Just Clear it." << endl;
1724  eShowAlgArray->Clear();
1725  }
1726  else {
1727  eShowAlgArray = new TObjArray(eShowAlgArrayMaxSize);
1728  cout << "EdbShowRec::Create_eShowAlgArray() New eShowAlgArray created." << endl;
1729  }
1730 
1731  eShowAlgArrayLoaded=kTRUE;
1732  Log(2,"EdbShowRec::SetPlateNumberValues()","Create_eShowAlgArray...done.");
1733  return;
1734 }

◆ Cut_eInBTTree_To_InBTArray()

void EdbShowRec::Cut_eInBTTree_To_InBTArray ( )
private
1551 {
1552  Log(2,"EdbShowRec::Cut_eInBTTree_To_InBTArray()","EdbShowRec::Cut_eInBTTree_To_InBTArray.");
1553 
1554  cout << "EdbShowRec::Cut_eInBTTree_To_InBTArray() NEED TO EXPLAIN HERE...WHAT DOES THIS FUNCTION DO ???" << endl;
1555 
1556  EdbSegP* segment=0;
1557  TBranch*b_s=0; // !!!
1558  b_s = eInBTTree->GetBranch("s"); // !!!
1559  b_s->SetAddress( &segment);
1560 
1561  // These lines apply the cut in the eInBTTree and fill then the eInBTArray:
1562  // This may be posible to put in an extra routine since all Fillxxx function will
1563  // have to have this included... todo...
1564  int nseg = 0;
1565  TCut *cut = eInBTCuts[0];
1566  TEventList *lst =0;
1567  if (cut) eInBTTree->Draw(">>lst", *cut );
1568  else eInBTTree->Draw(">>lst", "" );
1569  lst = (TEventList*)(gDirectory->GetList()->FindObject("lst"));
1570  //lst->Dump();
1571  int nlst =lst->GetN();
1572 
1573  int entr=0;
1574  for (Int_t i=0; i<nlst; ++i ) {
1575  entr = lst->GetEntry(i);
1576 
1577  // CounterOutPut
1578  if (gEDBDEBUGLEVEL==2) if ((i%100)==0) cout << nlst <<" InBT without cuts in total. Already passed cut:"<<Form("%4d",i)<< "\r\r\r\r"<<flush;
1579 
1580  b_s->GetEntry(entr); // !!!
1581  // segment->PrintNice();
1582  // segment has passed cuts, so add it now.
1583  // CLONE SEGMENT otherwise adding doesnt WORK!
1584  eInBTArray->Add((EdbSegP*)segment->Clone());
1585  nseg++;
1586  }
1587 
1588  // Update Entry numbers.
1589  SetInBTArrayN(nseg);
1590 
1592 
1593  Log(2,"EdbShowRec::Cut_eInBTTree_To_InBTArray()","EdbShowRec::Cut_eInBTTree_To_InBTArray. InBT N=%d", eInBTArrayN );
1594  Log(2,"EdbShowRec::Cut_eInBTTree_To_InBTArray()","EdbShowRec::Cut_eInBTTree_To_InBTArray...done.");
1595  return;
1596 }
void Print_InBTArray()
Definition: EdbShowRec.cxx:1959

◆ Execute()

void EdbShowRec::Execute ( )
private
1847 {
1848  Log(2,"EdbShowRec::Execute()","Execute ... NOTHING YET HERE");
1849  // Here the algorithm(s) are doing the reconstruction
1850  // of showers on the eAli object.
1851  // Later after reconstruction other things like gamma-reconstruction
1852  // can be done also here.
1853  Log(2,"EdbShowRec::Execute()","Execute ... NOTHING YET HERE...done.");
1854  return;
1855 }

◆ ExtendParametrisation_ExtraInfo()

void EdbShowRec::ExtendParametrisation_ExtraInfo ( )
5145 {
5146  Log(2,"EdbShowRec::ExtendParametrisation_ExtraInfo()","ExtendParametrisation_ExtraInfo()");
5147 
5148  if (eRecoShowerArrayN<1) return;
5149 
5150  EdbVertex* vtx= new EdbVertex();
5151  vtx->SetXYZ(0,0,0);
5152 
5153  // If showers are stored, get them and fill the values:
5154  for (Int_t i=0; i<eRecoShowerArrayN; ++i) {
5155 // for (Int_t i=0; i<3; ++i) {
5156  EdbShowerP* shower = (EdbShowerP*) eRecoShowerArray->At(i);
5157  EdbSegP* seg =shower->GetSegmentFirst();
5158 
5159  if (shower->GetMCInfoIsDone(0) == kTRUE ) {
5160  cout << "shower->SetMCInfoIsDone() == kTRUE" << endl;
5161  }
5162  if (shower->GetMCInfoIsDone(0) == kFALSE ) {
5163  cout << "shower->SetMCInfoIsDone() == kFALSE" << endl;
5164  return;
5165  }
5166 
5167  // Only in case the MCInfoIsDone we can continue and calculate the IP:
5168  EdbShowerP::MCInfo_PGun fMCInfo_PGun;
5169  fMCInfo_PGun=shower->GetMCInfo_PGun();
5170 
5171  Float_t Y=fMCInfo_PGun.Y;
5172  Float_t X=fMCInfo_PGun.X;
5173  Float_t Z=fMCInfo_PGun.Z;
5174 
5175  cout << "X,Y,Z" << X << " " <<Y << " " << Z << endl;
5176  seg->PrintNice();
5177 
5178  vtx->SetXYZ(X,Y,Z);
5179  cout << " EdbEDAUtil::CalcIP(EdbSegP* s, EdbVertex* v) " << endl;
5180  cout << EdbEDAUtil::CalcIP(seg,vtx) << endl;
5181 
5182  shower->SetParaVariable(EdbEDAUtil::CalcIP(seg,vtx),4,0);
5183  shower->SetParaVariable(TMath::Abs(seg->Z()-vtx->Z()),5,0);
5185  }
5186  return;
5187 }
Float_t Z() const
Definition: EdbSegP.h:150
void PrintNice() const
Definition: EdbSegP.cxx:418
void PrintParametrisation_ExtraInfo()
Definition: EdbShowerP.cxx:2606
void SetParaVariable(Float_t fParVar, Int_t ParaVariable, Int_t ParaNr)
Definition: EdbShowerP.cxx:2310
Bool_t GetMCInfoIsDone(Int_t nr) const
Definition: EdbShowerP.h:584
EdbSegP * GetSegmentFirst() const
Definition: EdbShowerP.h:429
Definition: EdbVertex.h:68
void SetXYZ(float x, float y, float z)
Definition: EdbVertex.h:157
Float_t Z() const
Definition: EdbVertex.h:132
double CalcIP(EdbSegP *s, double x, double y, double z)
Definition: EdbEDAUtil.C:85

◆ FileExists()

bool EdbShowRec::FileExists ( string  strFilename)

This code does not compile anymore with gcc version 4.3.5 (Ubuntu 4.3.5-3ubuntu1) Therefore I skipped it.

3938  {
3939 
3940  std::ifstream LogFile(strFilename.c_str());
3941  if (!LogFile) {
3942  std::cout << "File not found." << std::endl;
3943  return 0;
3944  }
3945  // Code for this function copied verbatim from
3946  // http://www.techbytes.ca/techbyte103.html
3950  return 1;
3951 }

◆ Fill_eInBTArray()

void EdbShowRec::Fill_eInBTArray ( Int_t  FilType)
private
1251 {
1252  Log(2,"EdbShowRec::Fill_eInBTArray()","Fill the Initiator Basetrack Array. Using FillType= %d",FillType);
1253 
1254  switch (FillType)
1255  {
1256  case -1 :
1257  // should never happen:
1258  Log(2,"EdbShowRec::Fill_eInBTArray()","Nothing done by default!");
1259  break;
1260  case 0 :
1262  break;
1263  case 1 :
1265  break;
1266  case 2 :
1268  break;
1269  case 3 :
1271  break;
1272  default :
1274  break;
1275  }
1276 
1277  cout <<
1278 
1279  Log(2,"EdbShowRec::Fill_eInBTArray()","Fill the Initiator Basetrack Array...done.");
1280  return;
1281 }
void Fill_eInBTArray_ByRecoLinkTracks_eAli()
Definition: EdbShowRec.cxx:1285
void Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks()
Definition: EdbShowRec.cxx:1332
void Fill_eInBTArray_ByBaseTracksOf_eAli()
Definition: EdbShowRec.cxx:1426
void Fill_eInBTArray_ByBaseTracksOf_RootFile()
Definition: EdbShowRec.cxx:1498

◆ Fill_eInBTArray_ByBaseTracksOf_eAli()

void EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli ( )
private
1427 {
1428  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli.");
1429 
1430  int count=0;
1431  Bool_t StillToLoop=kTRUE;
1432  Int_t nr=eMiddlePlate_eAliPID;
1433 
1434  if (!eInBTTree) {
1435  cout << "EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli() eInBTTree not yet created...Return." << endl;
1436  return;
1437  }
1438 
1439  EdbSegP* segment=0;
1440  TBranch*b_s=0; // !!!
1441  b_s = eInBTTree->GetBranch("s"); // !!!
1442  b_s->SetAddress( &segment);
1443 
1444  while (StillToLoop) {
1445 
1446  if (gEDBDEBUGLEVEL>3) {
1447  cout <<"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli() nr= " << nr << endl;
1448  cout <<"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli() eAli->GetPattern(nr)->Z()= " << eAli->GetPattern(nr)->Z() << endl;
1449  cout <<"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli() eAli->GetPattern(nr)->GetN()= " << eAli->GetPattern(nr)->GetN() << endl;
1450  }
1451 
1452  for (Int_t n=0; n<eAli->GetPattern(nr)->GetN(); ++n) {
1453 
1454  if (count > eInBTArrayMaxSize-1) continue; // maximumSize of TObjArray: eInBTArray
1455  segment=eAli->GetPattern(nr)->GetSegment(n);
1456 
1457  // Incremently ordered cuts..
1458  // To be implemented via TCut method just like in default.par.....
1459  // This is done in further down.
1460  // Now we fill completely the eInBTTree first. On this tree we can implement the
1461  // TCuts then.
1462  eInBTTree->Fill();
1463  ++count;
1464  }
1465 
1466  // Reduce/Increas nr:
1467  nr=nr+eAliStreamTypeStep;
1468  //Check if still to loop:
1469  if (eAliStreamType=="DOWNSTREAM" && nr<eFirstPlate_eAliPID) StillToLoop=kFALSE;
1470  if (eAliStreamType=="UPSTREAM" && nr>eFirstPlate_eAliPID) StillToLoop=kFALSE;
1471  }
1472 
1473  // Update Entry numbers.
1474  SetInBTArrayN(eInBTTree->GetEntries());
1475 
1476  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli. Before TCut: InBT N=%d", eInBTArrayN );
1477 
1478  // Now do the cut function from all read BTs to those which pass the TCut string given in default.par file.
1480 
1481 
1482  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli() Printing InBTs" << endl;
1483  EdbSegP* testseg=0;
1484  for (Int_t i=0; i<eInBTArrayN; ++i ) {
1485  if (gEDBDEBUGLEVEL>2) {
1486  testseg=(EdbSegP*)eInBTArray->At(i);
1487  testseg->PrintNice();
1488  }
1489  }
1490 
1491  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli. After TCut: InBT N=%d", eInBTArrayN );
1492  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli...done.");
1493  return;
1494 }
Int_t GetN() const
Definition: EdbPattern.h:65
TString eAliStreamType
Definition: EdbShowRec.h:115
void Cut_eInBTTree_To_InBTArray()
Definition: EdbShowRec.cxx:1550

◆ Fill_eInBTArray_ByBaseTracksOf_RootFile()

void EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_RootFile ( )
private
1499 {
1500  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_RootFile()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_RootFile.");
1501  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_RootFile()","Special Method to read manually selected Initiator BaseTracks.");
1502  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_RootFile()","Read root file <<InBT.root>>");
1503 
1504 
1505  int count=0;
1506  Bool_t StillToLoop=kTRUE;
1507  Int_t nr=eMiddlePlate_eAliPID;
1508 
1509  if (!eInBTTree) {
1510  cout << "EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_RootFile() eInBTTree not yet created...Return." << endl;
1511  return;
1512  }
1513 
1514  TFile* file = new TFile("InBT.root");
1515  TObjArray* InBTArray = (TObjArray* )file->Get("TObjArray");
1516  for (Int_t i=0; i<InBTArray->GetEntries(); ++i) {
1517  EdbSegP* s = (EdbSegP*)InBTArray->At(i);
1518  s->PrintNice();
1519  }
1520 
1521  // Update Entry numbers.
1522  SetInBTArray(InBTArray);
1523  SetInBTArrayN(InBTArray->GetEntries());
1524 
1525  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli. Before TCut: InBT N=%d", eInBTArrayN );
1526 
1527  // Now do the cut function from all read BTs to those which pass the TCut string given in default.par file.
1528  // Cut_eInBTTree_To_InBTArray();
1529 
1530 
1531 
1532 
1533  if (gEDBDEBUGLEVEL>1) cout << "EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli() Printing InBTs" << endl;
1534  EdbSegP* testseg=0;
1535  for (Int_t i=0; i<eInBTArrayN; ++i ) {
1536  if (gEDBDEBUGLEVEL>2) {
1537  testseg=(EdbSegP*)eInBTArray->At(i);
1538  testseg->PrintNice();
1539  }
1540  }
1541 
1542  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli. After TCut: InBT N=%d", eInBTArrayN );
1543  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli()","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli...done.");
1544  return;
1545 }
void SetInBTArray(EdbPVRec *Ali)
Definition: EdbShowRec.h:343
EdbSegP * s
Definition: tlg2pattern.C:32

◆ Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks()

void EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks ( )
private

--------------— tODO


TO BE CHECKED ..!!!!

1333 {
1334  Log(2,"EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks()","EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks...");
1335 
1336  if (!eInBTTree) {
1337  cout << "EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks() eInBTTree not yet created...Return." << endl;
1338  return;
1339  }
1340 
1342  // Check if file eFilename_LinkedTracks exits and if it has tracks inside....
1344  cout << "EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks() TODO::CHECK IF " << eFilename_LinkedTracks <<" exists and if it has tracks inside!!!!" << endl;
1346 
1347  EdbSegP* segment=0;
1348  TBranch* b_s=0; // !!!
1349  b_s = eInBTTree->GetBranch("s"); // !!!
1350  b_s->SetAddress( &segment);
1351 
1352  EdbSegP* s2=0;
1353  EdbTrackP* t=0;
1354 
1355  TFile* fil = new TFile(eFilename_LinkedTracks);
1356  TTree* tr= (TTree*)fil->Get("tracks");
1357  TClonesArray *seg= new TClonesArray("EdbSegP",60);
1358  int nentr = int(tr->GetEntries());
1359 
1360  // check if tracks has entries: if so then ok, otherwise return directly:
1361  if (nentr>0) {
1362  cout << "EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks() tracks file has " << nentr << " entries total" << endl;
1363  }
1364  else {
1365  cout << "EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks() tracks file has NO entries...Return." << endl;
1366  return;
1367  }
1368 
1369  int nseg,n0,npl;
1370  tr->SetBranchAddress("t.", &t );
1371  tr->SetBranchAddress("s", &seg );
1372  tr->SetBranchAddress("nseg", &nseg );
1373  tr->SetBranchAddress("n0", &n0 );
1374  tr->SetBranchAddress("npl", &npl );
1375 
1376  for (Int_t i=0; i<nentr; ++i ) {
1377  tr->GetEntry(i);
1378  // Take only Basetracks from tracks which pass 3 or more plates:
1379  // WHY 3 plates? This would exclude all initiator tracks with two consecutive segments anyway...???
1381  if (npl<3) continue;
1382  // Take first BT of the tracks:
1383  s2=(EdbSegP*) seg->At(0);
1384 
1385  // Check via PID if this segment is within the desired range:
1386  if (s2->PID()>TMath::Max(eFirstPlate_eAliPID,eMiddlePlate_eAliPID)||s2->PID()<TMath::Min(eFirstPlate_eAliPID,eMiddlePlate_eAliPID)) continue;
1387 
1388  segment=(EdbSegP*)s2->Clone();
1389 
1390  // Incremently ordered cuts..
1391  // To be implemented via TCut method just like in default.par.....
1392  // This is done in further down.
1393  // Now we fill completely the eInBTTree first. On this tree we can implement the
1394  // TCuts then.
1395  eInBTTree->Fill();
1396  }
1397  delete tr;
1398  delete fil;
1399 
1400  // Update Entry numbers.
1401  SetInBTArrayN(eInBTTree->GetEntries());
1402 
1403  Log(2,"EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli","EdbShowRec::Fill_eInBTArray_ByBaseTracksOf_eAli. Before TCut: InBT N=%d", eInBTArrayN );
1404 
1405  // Now do the cut function from all read BTs to those which pass the TCut string given in default.par file.
1407 
1408  if (gEDBDEBUGLEVEL>2) {
1409  cout << "EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks Printing InBTs" << endl;
1410  EdbSegP* testseg=0;
1411  for (Int_t i=0; i<eInBTArrayN; ++i ) {
1412  testseg=(EdbSegP*)eInBTArray->At(i);
1413  testseg->PrintNice();
1414  }
1415  }
1416 
1417  Log(2,"EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks()","EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks. After TCut: InBT N=%d", eInBTArrayN );
1418  Log(2,"EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks()","EdbShowRec::Fill_eInBTArray_ByLinkTracks_eFilename_LinkedTracks...done.");
1419  return;
1420 }
TTree * tr
Definition: Shower_E_FromShowerRoot.C:5
TTree * t
Definition: check_shower.C:4
Int_t PID() const
Definition: EdbSegP.h:145
Definition: EdbPattern.h:118
EdbSegP * s2
Definition: tlg2pattern.C:31

◆ Fill_eInBTArray_ByRecoLinkTracks_eAli()

void EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli ( )
private
1286 {
1287  // Check if eAli has already fitted tracks.
1288  // Make tracks using standard track fitting/propagation routines.
1289  Log(2,"EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli()","Fill Initiator Basetrack Array from the stored Tracks.");
1290 
1291  // Object with the stored tracks...
1292  TObjArray* trackArray = eAli->eTracks;
1293 
1294  // this should not happen, the check for Filled Tracks should be done in the routine
1295  // one level up. This is
1296  if (trackArray==NULL) {
1297  Log(2,"EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli()","Attention! No Entries in the TrackArray!");
1298  Log(2,"EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli()","Dont Fill InBTracks! Return!");
1299  return;
1300  }
1301 
1302  Int_t AliTracksN = trackArray->GetEntries();
1303  Log(2,"EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli()","Initiator Basetrack Array: N=%d stored Tracks.",AliTracksN);
1304 
1305  /*
1306  // To have the "cut" features available, we still have to pass the source array via the eInBTTree
1307  // into the InBTArray. Not done yet, will maybe in time ...
1308  cout << "EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli() Transferrring them into the eInBTTree now ..." << endl;
1309  cout << "EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli() Transferrring them into the eInBTTree now NOT IMPLEMENTED YET...)" << endl;
1310  */
1311 // OR DONT PASS THEM OVER AND FILL THE ARRAY DIRECTLY ???
1312 // SEEMS MUCH MORE EASIER AT THE MOMENT !!!
1313 
1314  // Attention: eTracks is an array of Tracks, but the InBT array has to be filled with segments, i.e.
1315  // the first segment (EdbSegP) of a track (EdbTrackP). Therefore some conversion is necessary:
1316  EdbTrackP* track;
1317  TObjArray* segmentArray = new TObjArray();
1318  for (Int_t i=0; i<AliTracksN; ++i) {
1319  track= (EdbTrackP*) trackArray->At(i);
1320  EdbSegP* segment = track->GetSegmentFirst();
1321  segmentArray->Add(segment);
1322  }
1323  SetInBTArray( segmentArray );
1324 
1325  Log(2,"EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli()","Initiator Basetrack Array: GetInBTArrayN()=%d filled tracks.",GetInBTArrayN());
1326  Log(2,"EdbShowRec::Fill_eInBTArray_ByRecoLinkTracks_eAli()","Fill Initiator Basetrack Array from the stored Tracks...done.");
1327  return;
1328 }
Definition: bitview.h:14

◆ Fill_eShowAlgArray()

void EdbShowRec::Fill_eShowAlgArray ( )
private
1739 {
1740  Log(2,"EdbShowRec::Fill_eShowAlgArray()","Fill_eShowAlgArray");
1741 
1742  if (!eShowAlgArray) return;
1743 
1744  //EdbShowAlg_CA* StandardAlg = new EdbShowAlg_CA();
1745  EdbShowAlg_OI* StandardAlg = new EdbShowAlg_OI();
1746 
1747  eShowAlgArray->Add(StandardAlg);
1748  SetShowAlgArrayN(eShowAlgArray->GetEntries());
1749 
1750  StandardAlg->SetUseAliSub(eUseAliSub);
1751 
1752  eActualAlg=StandardAlg;
1754 
1755  Log(2,"EdbShowRec::Fill_eShowAlgArray()","Fill_eShowAlgArray...done.");
1756  return;
1757 }
void SetUseAliSub(Bool_t UseAliSub)
Definition: EdbShowAlg.h:147
Bool_t eUseAliSub
Definition: EdbShowRec.h:189
EdbShowAlg * eActualAlg
Definition: EdbShowRec.h:123
Int_t eActualAlgParameterset[10]
Definition: EdbShowRec.h:124

◆ Finalize()

void EdbShowRec::Finalize ( )
private
1861 {
1862  Log(2,"EdbShowRec::Finalize()","Execute ... NOTHING YET HERE");
1863  Log(2,"EdbShowRec::Finalize()","Execute ... NOTHING YET HERE...done.");
1864  return;
1865 }

◆ GetDoParaType()

Int_t EdbShowRec::GetDoParaType ( Int_t  type) const
inline
524  {
525  return eParaTypes[type];
526  }

◆ GetEdbPVRec()

EdbPVRec* EdbShowRec::GetEdbPVRec ( ) const
inline
460  {
461  return eAli;
462  }

◆ GetEdbPVRecLoaded()

Bool_t EdbShowRec::GetEdbPVRecLoaded ( ) const
inline
463  {
464  return eAliLoaded;
465  }

◆ GetFirstPlate()

Int_t EdbShowRec::GetFirstPlate ( ) const
inline
492  {
493  return eFirstPlate;
494  }

◆ GetInBTArray()

TObjArray* EdbShowRec::GetInBTArray ( ) const
inline
466  {
467  return eInBTArray;
468  }

◆ GetInBTArrayN()

Int_t EdbShowRec::GetInBTArrayN ( ) const
inline
480  {
481  return eInBTArrayN;
482  }

◆ GetLastPlate()

Int_t EdbShowRec::GetLastPlate ( ) const
inline
495  {
496  return eLastPlate;
497  }

◆ GetMiddlePlate()

Int_t EdbShowRec::GetMiddlePlate ( ) const
inline
498  {
499  return eMiddlePlate;
500  }

◆ GetNumberPlate()

Int_t EdbShowRec::GetNumberPlate ( ) const
inline
501  {
502  return eNumberPlate;
503  }

◆ GetProposedFirstPlate()

Int_t EdbShowRec::GetProposedFirstPlate ( ) const
inline
505  {
506  return eProposedFirstPlate;
507  }

◆ GetProposedLastPlate()

Int_t EdbShowRec::GetProposedLastPlate ( ) const
inline
508  {
509  return eProposedLastPlate;
510  }

◆ GetProposedMiddlePlate()

Int_t EdbShowRec::GetProposedMiddlePlate ( ) const
inline
511  {
512  return eProposedMiddlePlate;
513  }

◆ GetProposedNumberPlate()

Int_t EdbShowRec::GetProposedNumberPlate ( ) const
inline
514  {
515  return eProposedNumberPlate;
516  }

◆ GetRecoShowerArray()

TObjArray* EdbShowRec::GetRecoShowerArray ( ) const
inline
472  {
473  return eRecoShowerArray;
474  }

◆ GetRecoShowerArrayN()

Int_t EdbShowRec::GetRecoShowerArrayN ( ) const
inline
486  {
487  return eRecoShowerArrayN;
488  }

◆ GetShowAlgArray()

TObjArray* EdbShowRec::GetShowAlgArray ( ) const
inline
469  {
470  return eShowAlgArray;
471  }

◆ GetShowAlgArrayN()

Int_t EdbShowRec::GetShowAlgArrayN ( ) const
inline
483  {
484  return eShowAlgArrayN;
485  }
Int_t eShowAlgArrayN
Definition: EdbShowRec.h:68

◆ GetShower()

EdbShowerP* EdbShowRec::GetShower ( Int_t  i) const
inline
475  {
476  return (EdbShowerP*)eRecoShowerArray->At(i);
477  }

◆ GetShowName()

TString EdbShowRec::GetShowName ( ) const
inline
518  {
519  return eName_Out_shower;
520  }
TString eName_Out_shower
Definition: EdbShowRec.h:159

◆ GetTreebranchName()

TString EdbShowRec::GetTreebranchName ( ) const
inline
521  {
522  return eName_Out_treebranch;
523  }
TString eName_Out_treebranch
Definition: EdbShowRec.h:160

◆ Help()

void EdbShowRec::Help ( )
5499 {
5500  cout << "---------------------------------------------------------" <<
5501  endl;
5502  cout << "EdbShowRec::Help()" << endl << endl;
5503  cout << " What is this?" << endl;
5504  cout << " MAIN object of libShowRec." << endl;
5505  cout << " Manages (hopefully) all stuff that is related to showers." << endl;
5506  cout << endl;
5507  cout << " What can we do with this?" << endl;
5508  cout << " Primary purpose: Shower:" << endl;
5509  cout << " ....Reconstruction" << endl;
5510  cout << " ....Identification" << endl;
5511  cout << " ....Energy" << endl;
5512  cout << " ....Electron/Photon/Pi0 reconstruction" << endl;
5513  cout << endl;
5514  cout << " Technical details, information about the class:" << endl;
5515  cout << " ...." << endl;
5516  cout << " Assuming your data is in an EdbPVRec object (gAli) , then do:" << endl;
5517  cout << " EdbShowRec* showrec = new EdbShowRec(gAli); " << endl;
5518  cout << " ...." << endl;
5519  cout << " And see what happens." << endl;
5520  cout << " You can also write specific parameters /and/or cuts in the default.par" << endl;
5521  cout << " (Note that every par value has to have the prefix SHOW_ )." << endl;
5522  cout << " ...." << endl;
5523  cout << endl;
5524  cout << "---------------------------------------------------------" <<
5525  endl;
5526  return;
5527 }

◆ Init()

void EdbShowRec::Init ( void  )
private
420 {
421  // Default Init() Function: Setting Pointers, Variables and so on:
422 
423  Log(2,"EdbShowRec::Init()","Default Init function");
424 
425  eFilename_LinkedTracks ="linked_tracks.root";
426  eFilename_LnkDef ="lnk_all.def";
427  eFilename_EdbPVRecObject ="gAli.root";
428  eFilename_Out_shower ="ShowerReco.root";
429  eFilename_Out_treebranch ="ShowerTreebranch.root";
430 
431 
436 
437 
438  eUseNr=0;
439  eUse_LT=kTRUE;
440  eUse_AliBT=kFALSE;
441  eUse_AliLT=kFALSE;
442  eUse_PVREC=kFALSE;
443 
445 
446  eActualAlg=0;
447  for (int k=0; k<10; k++) {
449  }
450 
455 
456 
457  Log(2,"EdbShowRec::Init()","Default Init function...done.");
458  return;
459 }
TFile * eFile_Out_shower
Definition: EdbShowRec.h:150
TString eFilename_Out_treebranch
Definition: EdbShowRec.h:147
Bool_t eWriteFileShower
Definition: EdbShowRec.h:148
Bool_t eWriteFileTreebranch
Definition: EdbShowRec.h:149
TFile * eFile_Out_treebranch
Definition: EdbShowRec.h:151
TString eFilename_Out_shower
Definition: EdbShowRec.h:146

◆ Initialize()

void EdbShowRec::Initialize ( )
private
1834 {
1835  Log(2,"EdbShowRec::Initialize()","Initialize ... NOTHING YET HERE");
1836 
1837  // Here is gonna set up all neccessary variables which are needed
1838  // to run the algorithm later on the eAli object.
1839 
1840  Log(2,"EdbShowRec::Initialize()","Initialize ... NOTHING YET HERE...done.");
1841  return;
1842 }

◆ Print()

void EdbShowRec::Print ( )
1870 {
1871  Log(2,"EdbShowRec::Print()","Print important stuff...");
1872  for (Int_t i=0; i<100; ++i) cout << "-";
1873  cout << endl;
1874  cout << "-";
1875  cout << endl;
1876  cout << "EdbShowRec::Print()" << endl;
1877  cout << "-";
1878  cout << endl;
1879  for (Int_t i=0; i<100; ++i) cout << "-";
1880  cout << endl;
1881  cout << "EdbShowRec::Print() --- GENERAL SETTINGS: ---" << endl;
1882  cout << "EdbShowRec::Print() --- eDoReconstruction = " << eDoReconstruction << endl;
1883  cout << "EdbShowRec::Print() --- eDoParametrization = " << eDoParametrization << endl;
1884  cout << "EdbShowRec::Print() --- eDoId = " << eDoId << endl;
1885  cout << "EdbShowRec::Print() --- eDoEnergy = " << eDoEnergy << endl;
1886  cout << "EdbShowRec::Print() --- eDoVtxAttach = " << eDoVtxAttach << endl;
1887  cout << "-";
1888  cout << endl;
1889  cout << "EdbShowRec::Print() --- SETTINGS: Input data:" << endl;
1890  cout << "EdbShowRec::Print() --- " << setw(20) << "File EdbDataProc Filename:" << eFilename_LnkDef << endl;
1891  cout << "EdbShowRec::Print() --- " << setw(20) << "File Tracks Filename:" << eFilename_LinkedTracks << endl;
1892  cout << "EdbShowRec::Print() --- " << setw(20) << "File EdbPVRec Filename:" << eFilename_EdbPVRecObject << endl;
1893  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Input data type:" << eUseNr << endl;
1894  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Input data type eUse_LT:" << eUse_LT << endl;
1895  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Input data type eUse_PVREC:" << eUse_PVREC << endl;
1896  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Input data type eUse_AliBT :" << eUse_AliBT << endl;
1897  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Input data type eUse_AliLT:" << eUse_AliLT << endl;
1898  cout << "-";
1899  cout << endl;
1900  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object NPatterns:" << eAliNpat << endl;
1901  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object First PID:" << eFirstPlate_eAliPID << endl;
1902  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object Middle PID:" << eMiddlePlate_eAliPID << endl;
1903  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object Last PID:" << eLastPlate_eAliPID << endl;
1904  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object FirstPlate:" << eFirstPlate << endl;
1905  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object MiddlePlate:" << eMiddlePlate << endl;
1906  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object LastPlate:" << eLastPlate << endl;
1907  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object NumberPlate:" << eNumberPlate << endl;
1908  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object Max Z:" << eAliZMax << endl;
1909  cout << "EdbShowRec::Print() --- " << setw(20) << "EdbPVRec Object Min Z:" << eAliZMin << endl;
1910  cout << "-";
1911  cout << endl;
1912  cout << "EdbShowRec::Print() --- " << setw(20) << "Initiator Basetracks: Cut:" << eInBTCuts[0] << endl;
1913  cout << "EdbShowRec::Print() --- " << setw(20) << "Initiator Basetracks: N:" << eInBTArrayN << endl;
1914  cout << "-";
1915  cout << endl;
1916  cout << "EdbShowRec::Print() --- SETTINGS: Output data:" << endl;
1917  cout << "EdbShowRec::Print() --- " << setw(20) << "File containing EdbShowerP Array Write:" << eWriteFileShower << endl;
1918  cout << "EdbShowRec::Print() --- " << setw(20) << "File containing EdbShowerP Array:" << eFilename_Out_shower << endl;
1919  cout << "EdbShowRec::Print() --- " << setw(20) << "File containing treebranch tree Write :" << eWriteFileTreebranch << endl;
1920  cout << "EdbShowRec::Print() --- " << setw(20) << "File containing treebranch tree:" << eFilename_Out_treebranch << endl;
1921  cout << "-";
1922  cout << endl;
1923  cout << "EdbShowRec::Print() --- SETTINGS: Reconstruction:" << endl;
1924  cout << "EdbShowRec::Print() --- " << setw(20) << "Reconstruction Use gAliSub:" << eUseAliSub << endl;
1925  cout << "EdbShowRec::Print() --- " << setw(20) << "Reconstruction Algs: N:" << eShowAlgArrayN << endl;
1926  for (Int_t i=0; i<eShowAlgArrayN; ++i) {
1927  cout << "EdbShowRec::Print() --- " << setw(20) << "Reconstruction Algs: ";
1928  EdbShowAlg* RecoAlg = (EdbShowAlg*) eShowAlgArray->At(i);
1929  RecoAlg->PrintParametersShort();
1930  }
1931  cout << "-";
1932  cout << endl;
1933 
1934  cout << "EdbShowRec::Print() --- SETTINGS: Id:" << endl;
1935  cout << "-";
1936  cout << endl;
1937 
1938  cout << "EdbShowRec::Print() --- SETTINGS: Parametrisation:" << endl;
1939  for (Int_t i=0; i<6; ++i) {
1940  cout << "EdbShowRec::Print() --- " << setw(20) << "Parametrisation Do " << eParaNames[i] <<": "<< eParaTypes[i] << endl;
1941  }
1942  cout << "-";
1943  cout << endl;
1944  cout << "EdbShowRec::Print() --- SETTINGS: Energy:" << endl;
1945  cout << "-";
1946  cout << endl;
1947  cout << "-";
1948  cout << endl;
1949  cout << "EdbShowRec::Print()....done." << endl;
1950  for (Int_t i=0; i<100; ++i) cout << "-";
1951  cout << endl;
1952  Log(2,"EdbShowRec::Print()","Print important stuff...done.");
1953  return;
1954 }
void PrintParametersShort()
Definition: EdbShowAlg.cxx:366
Int_t eDoParametrization
Definition: EdbShowRec.h:52
Int_t eDoReconstruction
Definition: EdbShowRec.h:51
Int_t eDoVtxAttach
Definition: EdbShowRec.h:55
Float_t eAliZMin
Definition: EdbShowRec.h:110
Int_t eDoEnergy
Definition: EdbShowRec.h:54
Int_t eDoId
Definition: EdbShowRec.h:53
Float_t eAliZMax
Definition: EdbShowRec.h:109

◆ Print_InBTArray()

void EdbShowRec::Print_InBTArray ( )
1960 {
1961  Log(2,"EdbShowRec::Print_InBTArray()","Print the information on the Initiator Basetrack array");
1962  if (!eInBTArray) return;
1963  Log(2,"EdbShowRec::Print_InBTArray()","N=%d",eInBTArrayN);
1964  EdbSegP* s=0;
1965  for (Int_t i=0; i<eInBTArrayN; ++i) {
1966  s=(EdbSegP*) eInBTArray->At(i);
1967  s->PrintNice();
1968  }
1969  Log(2,"EdbShowRec::Print_InBTArray()","Print the information on the Initiator Basetrack array...done.");
1970  return;
1971 }

◆ Print_InBTCut()

void EdbShowRec::Print_InBTCut ( Int_t  layer = 0)
2339 {
2340  Log(2,"EdbShowRec::Print_InBTCut","EdbShowRec::Print_InBTCut");
2341  if (!eInBTCuts[layer]) return;
2342  eInBTCuts[layer]->Print();
2343  Log(2,"EdbShowRec::Print_InBTCut","EdbShowRec::Print_InBTCut...done.");
2344  return;
2345 }

◆ Print_UseInBTType()

void EdbShowRec::Print_UseInBTType ( )
2306 {
2307  Log(2,"EdbShowRec::PrintUse_InBTType","EdbShowRec::PrintUse_InBTType");
2308  // Use no type to fill InBT Array at all(!) (i.e. reconstruct 0 showers).
2309  if (gEDBDEBUGLEVEL>2) {
2310  cout << "EdbShowRec::PrintUse_InBTType eUse_LT= " << eUse_LT<< endl;
2311  cout << "EdbShowRec::PrintUse_InBTType eUse_PVREC= " << eUse_PVREC<< endl;
2312  cout << "EdbShowRec::PrintUse_InBTType eUse_AliBT= " << eUse_AliBT<< endl;
2313  cout << "EdbShowRec::PrintUse_InBTType eUse_AliLT= " << eUse_AliLT<< endl;
2314  cout << "EdbShowRec::PrintUse_InBTType eUse_ROOTInBT= " << eUse_ROOTInBT<< endl;
2315  cout << "EdbShowRec::PrintUse_InBTType eUseNr= " << eUseNr<< endl;
2316  }
2317  Log(2,"EdbShowRec::PrintUse_InBTType","EdbShowRec::PrintUse_InBTType...done.");
2318  return;
2319 }
Bool_t eUse_ROOTInBT
Definition: EdbShowRec.h:175

◆ PrintAll()

void EdbShowRec::PrintAll ( )
3753 {
3754  return;
3755 }

◆ PrintMore()

void EdbShowRec::PrintMore ( )
3746  {
3747  return;
3748 }

◆ PrintParametrisation()

void EdbShowRec::PrintParametrisation ( Int_t  ParaNr)
5311 {
5312  Log(2,"EdbShowRec::PrintParametrisation()","PrintParametrisation().");
5314  cout << "EdbShowRec::PrintParametrisation WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
5315  return;
5316  }
5317  for (Int_t i=0; i<eRecoShowerArrayN; ++i) {
5318  EdbShowerP* shower=(EdbShowerP*)eRecoShowerArray->At(i);
5319  if (shower->GetParametrisationIsDone(ParaNr)==kFALSE) continue;
5320  shower->PrintParametrisation(ParaNr);
5321  }
5322  Log(2,"EdbShowRec::PrintParametrisation()","PrintParametrisation()...done.");
5323  return;
5324 }
void PrintParametrisation(Int_t ParaNr=0)
Definition: EdbShowerP.cxx:2376
Bool_t GetParametrisationIsDone(Int_t nr) const
Definition: EdbShowerP.h:546

◆ PrintRecoShowerArray()

void EdbShowRec::PrintRecoShowerArray ( Int_t  entry = -1)
3502 {
3503  Log(2,"EdbShowRec::PrintRecoShowerArray","Printing entry %d from the reco shower array",entry);
3504 
3505  if (entry<0) {
3506  Log(2,"EdbShowRec::PrintRecoShowerArray","Print full array.",entry);
3507  }
3508  if (entry>= GetRecoShowerArrayN()) {
3509  Log(2,"EdbShowRec::PrintRecoShowerArray","Requested entry %d is greater than entries in the array. Print full array.",entry);
3510  entry=-1;
3511  }
3512 
3513  EdbShowerP* show=0;
3514  for (Int_t i=0; i<GetRecoShowerArrayN(); ++i) {
3515  if (entry!=i && entry>=0) continue;
3516  show=(EdbShowerP*)eRecoShowerArray->At(i);
3517  show->PrintNice();
3518  show->PrintSegments();
3519  }
3520 
3521  Log(2,"EdbShowRec::PrintRecoShowerArray","EdbShowRec::PrintRecoShowerArray...done.");
3522  return;
3523 }
TLegendEntry * entry
Definition: Canv_SYSTEMATICS_ALLCOMBINED__RMSEnergy__vs__Energy__ELECTRON.C:130
void PrintSegments()
Definition: EdbShowerP.cxx:2367

◆ PrintRecoShowerArrayFast()

void EdbShowRec::PrintRecoShowerArrayFast ( Int_t  entry = -1)
3476 {
3477  Log(2,"EdbShowRec::PrintRecoShowerArrayFast","Printing overview for all entries from the reco shower array");
3478 
3479  if (entry<0) {
3480  Log(2,"EdbShowRec::PrintRecoShowerArray","Print full array.",entry);
3481  }
3482  if (entry>= GetRecoShowerArrayN()) {
3483  Log(2,"EdbShowRec::PrintRecoShowerArray","Requested entry %d is greater than entries in the array. Print full array.",entry);
3484  entry=-1;
3485  }
3486 
3487  EdbShowerP* show=0;
3488  for (Int_t i=0; i<GetRecoShowerArrayN(); ++i) {
3489  if (entry!=i && entry>=0) continue;
3490  show=(EdbShowerP*)eRecoShowerArray->At(i);
3491  show->PrintBasics();
3492  }
3493 
3494  Log(2,"EdbShowRec::PrintRecoShowerArrayFast","EdbShowRec::PrintRecoShowerArrayFast...done.");
3495  return;
3496 }
void PrintBasics()
Definition: EdbShowerP.cxx:2360

◆ ReadShowRecPar()

int EdbShowRec::ReadShowRecPar ( const char *  file = "default.par")

Main class instance step settings: These settings are still to include in the Initialize(),Execute(),Finalize() Function Troika

These settings are still to include in the Initialize(),Execute(),Finalize() Function Troika

Main settings preparating the reconstruction object input data:

Main settings preparating the reconstruction object output data:

INDICATION The latest string here to be written is in developement status. all others above should work....

THE PARASETS STILL NEED CONFIRMATION if THE NUMBERS_ for labelling are correctly filled!!!

Main settings preparating the reconstruction algorithm settings:

1979 {
1980  // read parameters from par-file
1981  // return: 0 if ok
1982  // -1 if file access failed
1983  char buf[256];
1984  char key[256];
1985  char name[256];
1986 
1987  FILE *fp = fopen(file,"r");
1988  if (!fp) {
1989  Log(1,"EdbShowRec::ReadShowRecPar","ERROR open file: %s", file);
1990  return -1;
1991  }
1992  else Log(2,"EdbShowRec::ReadShowRecPar","Read shower parameters from file: %s", file );
1993 
1994  Int_t id;
1995  Int_t int_eUse;
1996  int dospec;
1997  TString tmpString;
1998  char tmpchar[256];
1999 
2000  while (fgets(buf, sizeof(buf), fp)) {
2001  for (Int_t i = 0; i < (Int_t)strlen(buf); ++i)
2002  if (buf[i]=='#') {
2003  buf[i]='\0'; // cut out comments starting from #
2004  break;
2005  }
2006 
2007  if ( sscanf(buf,"%s",key)!=1 ) continue;
2008 
2009  if ( !strcmp(key,"INCLUDE") )
2010  {
2011  sscanf(buf+strlen(key),"%s",name);
2013  }
2014 
2015 
2018  else if ( !strcmp(key,"SHOW_DO_RECONSTRUCTION") )
2019  {
2020  sscanf(buf+strlen(key),"%d",&dospec);
2021  cout << "EdbShowRec::ReadShowRecPar SHOW_DO_RECONSTRUCTION = " << dospec << endl;
2022  if (dospec==0 || dospec==1) SetDoReconstruction(dospec);
2023  }
2024  else if ( !strcmp(key,"SHOW_DO_PARAMETRISATION") )
2025  {
2026  sscanf(buf+strlen(key),"%d",&dospec);
2027  cout << "EdbShowRec::ReadShowRecPar SHOW_DO_PARAMETRISATION = " << dospec << endl;
2028  if (dospec==0 || dospec==1) SetDoParametrisation(dospec);
2029  }
2030  else if ( !strcmp(key,"SHOW_DO_ID") )
2031  {
2032  sscanf(buf+strlen(key),"%d",&dospec);
2033  cout << "EdbShowRec::ReadShowRecPar SHOW_DO_ID = " << dospec << endl;
2034  if (dospec==0 || dospec==1) SetDoId(dospec);
2035  }
2036  else if ( !strcmp(key,"SHOW_DO_ENERGY") )
2037  {
2038  sscanf(buf+strlen(key),"%d",&dospec);
2039  cout << "EdbShowRec::ReadShowRecPar SHOW_DO_ENERGY = " << dospec << endl;
2040  if (dospec==0 || dospec==1) SetDoEnergy(dospec);
2041  }
2042  else if ( !strcmp(key,"SHOW_DO_VERTEXATTACH") )
2043  {
2044  sscanf(buf+strlen(key),"%d",&dospec);
2045  cout << "EdbShowRec::ReadShowRecPar SHOW_DO_VERTEXATTACH = " << dospec << endl;
2046  if (dospec==0 || dospec==1) SetDoVtxAttach(dospec);
2047  }
2048 
2050 
2052  else if ( !strcmp(key,"SHOW_USE_LT") )
2053  {
2054  sscanf(buf+strlen(key),"%d",&int_eUse);
2056  if (int_eUse==1) {
2057  eUse_LT=kTRUE;
2058  eUse_PVREC=kFALSE;
2059  eUse_AliBT=kFALSE;
2060  eUse_AliLT=kFALSE;
2061  eUse_ROOTInBT=kFALSE;
2062  eUseNr=0;
2063  }
2064  else {
2065  eUse_LT=kFALSE;
2066  }
2067  cout << "eUse_LT now " << eUse_LT << endl;
2068  }
2069 
2070  else if ( !strcmp(key,"SHOW_USE_ALIBT") )
2071  {
2072  sscanf(buf+strlen(key),"%d",&int_eUse);
2074  if (int_eUse==1) {
2075  eUse_LT=kFALSE;
2076  eUse_PVREC=kFALSE;
2077  eUse_AliBT=kTRUE;
2078  eUse_AliLT=kFALSE;
2079  eUse_ROOTInBT=kFALSE;
2080  eUseNr=2;
2081  }
2082  else {
2083  eUse_AliBT=kFALSE;
2084  }
2085  cout << "eUse_AliBT now " << eUse_AliBT << endl;
2086  }
2087 
2088 
2089  else if ( !strcmp(key,"SHOW_USE_ROOTInBT") )
2090  {
2091  sscanf(buf+strlen(key),"%d",&int_eUse);
2093  if (int_eUse==1) {
2094  eUse_LT=kFALSE;
2095  eUse_PVREC=kFALSE;
2096  eUse_AliBT=kFALSE;
2097  eUse_AliLT=kTRUE;
2098  eUse_ROOTInBT=kFALSE;
2099  eUseNr=3;
2100  }
2101  else {
2102  eUse_AliLT=kFALSE;
2103  }
2104  cout << "eUse_AliLT now " << eUse_AliLT << endl;
2105  }
2106 
2107 
2108  else if ( !strcmp(key,"SHOW_USE_PVREC") )
2109  {
2110  sscanf(buf+strlen(key),"%d",&int_eUse);
2112  if (int_eUse==1) {
2113  eUse_LT=kFALSE;
2114  eUse_PVREC=kTRUE;
2115  eUse_AliBT=kFALSE;
2116  eUse_AliLT=kFALSE;
2117  eUse_ROOTInBT=kFALSE;
2118  eUseNr=1;
2119  }
2120  else {
2121  eUse_PVREC=kFALSE;
2122  }
2123  cout << "eUse_PVREC now " << eUse_PVREC << endl;
2124  }
2125 
2126  else if ( !strcmp(key,"SHOW_INBTCUT") )
2127  {
2128  char rcut[256];
2129  sscanf(buf+strlen(key),"%d %s",&id, rcut );
2130  cout << "SHOW_INBTCUT = " << rcut << endl;
2131  TCut cut(rcut);
2132  Add_INBTCut(id,cut);
2133  }
2134 
2135 
2137  else if ( !strcmp(key,"SHOW_WRITE_TREEBRANCH") )
2138  {
2139  sscanf(buf+strlen(key),"%d",&dospec);
2140  Bool_t dospec_bool=(Bool_t)dospec;
2141  cout << "EdbShowRec::ReadShowRecPar SHOW_WRITE_TREEBRANCH = " << dospec_bool << endl;
2142  SetWriteFileTreebranch(dospec_bool);
2143  }
2144  else if ( !strcmp(key,"SHOW_WRITE_SHOWERS") )
2145  {
2146  sscanf(buf+strlen(key),"%d",&dospec);
2147  Bool_t dospec_bool=(Bool_t)dospec;
2148  cout << "EdbShowRec::ReadShowRecPar SHOW_WRITE_SHOWERS = " << dospec_bool << endl;
2149  SetWriteFileShower(dospec_bool);
2150  }
2151 
2152  else if ( !strcmp(key,"SHOW_FILE_TREEBRANCH") )
2153  {
2154  sscanf(buf+strlen(key),"%s",tmpchar);
2155  tmpString=TString(tmpchar);
2156  SetTreebranchFileName(tmpString);
2157  cout << "SHOW_FILE_TREEBRANCH = " << tmpString << endl;
2158  }
2159 
2160  else if ( !strcmp(key,"SHOW_FILE_SHOWERS") )
2161  {
2162  sscanf(buf+strlen(key),"%s",tmpchar);
2163  tmpString=TString(tmpchar);
2164  SetShowFileName(tmpString);
2165  cout << "SHOW_FILE_SHOWERS = " << tmpString << endl;
2166  }
2167 
2168  else if ( !strcmp(key,"SHOW_USE_SIMPLEFILENAME") )
2169  {
2170  Int_t filetype, dofiletype;
2171  sscanf(buf+strlen(key),"%d %d",&filetype, &dofiletype);
2172  cout << "EdbShowRec::ReadShowRecPar filetype = " << filetype << endl;
2173  cout << "EdbShowRec::ReadShowRecPar dofiletype = " << dofiletype << endl;
2174  SetSimpleFileName(filetype, dofiletype);
2175  }
2176 
2177  else if ( !strcmp(key,"SHOW_FIRSTPLATE") )
2178  {
2179  int ProposedFirstPlate;
2180  sscanf(buf+strlen(key),"%d",&ProposedFirstPlate);
2181  cout << "EdbShowRec::ReadShowRecPar ProposedFirstPlate = " << ProposedFirstPlate << endl;
2182  eProposedFirstPlate=ProposedFirstPlate;
2183  }
2184  else if ( !strcmp(key,"SHOW_LASTPLATE") )
2185  {
2186  int ProposedLastPlate;
2187  sscanf(buf+strlen(key),"%d",&ProposedLastPlate);
2188  cout << "EdbShowRec::ReadShowRecPar ProposedLastPlate = " << ProposedLastPlate << endl;
2189  eProposedLastPlate=ProposedLastPlate;
2190  }
2191  else if ( !strcmp(key,"SHOW_MIDDLEPLATE") )
2192  {
2193  int ProposedMiddlePlate;
2194  sscanf(buf+strlen(key),"%d",&ProposedMiddlePlate);
2195  cout << "EdbShowRec::ReadShowRecPar ProposedMiddlePlate = " << ProposedMiddlePlate << endl;
2196  eProposedMiddlePlate=ProposedMiddlePlate;
2197  }
2198  else if ( !strcmp(key,"SHOW_NUMBERPLATE") )
2199  {
2200  int ProposedNumberPlate;
2201  sscanf(buf+strlen(key),"%d",&ProposedNumberPlate);
2202  cout << "EdbShowRec::ReadShowRecPar ProposedNumberPlate = " << ProposedNumberPlate << endl;
2203  eProposedNumberPlate=ProposedNumberPlate;
2204  }
2205 
2208 
2210 
2212  else if ( !strcmp(key,"SHOW_ADDPARASET") )
2213  {
2214  float par[10];
2215  for (Int_t i=0; i<10; ++i) {
2216  par[i]=-9999.0;
2217  }
2218  int type;
2219  int n=sscanf(buf+strlen(key),"%d %f %f %f %f %f",&type, &par[0], &par[1], &par[2], &par[3], &par[4] );
2220  cout << "n= " << n << endl;
2221  if (n==5) {
2222  AddAlg(type,par);
2223  }
2224  else {
2225  cout << "EdbShowRec::ReadShowRecPar WRONG FORMAT of SHOW_ADDPARASET. 4 Parameters at least!" << endl;
2226  }
2227  }
2228 
2229 
2230  else if ( !strcmp(key,"SHOW_SETPARASET") )
2231  {
2232  float par[10];
2233  for (Int_t i=0; i<10; ++i) {
2234  par[i]=-9999.0;
2235  }
2236  int type;
2237  int n=sscanf(buf+strlen(key),"%d %f %f %f %f %f",&type, &par[0], &par[1], &par[2], &par[3], &par[4] );
2238  cout << "n= " << n << endl;
2239  if (n==5) {
2241  AddAlg(type,par);
2242  }
2243  else {
2244  cout << "EdbShowRec::ReadShowRecPar WRONG FORMAT of SHOW_ADDPARASET. Need 4 Parameters at least!" << endl;
2245  }
2246  }
2247 
2248  else if ( !strcmp(key,"SHOW_DO_PARA") )
2249  {
2250  sscanf(buf+strlen(key),"%d",&dospec);
2251  cout << "EdbShowRec::ReadShowRecPar SHOW_DO_PARA = " << dospec << endl;
2252  SetDoParaType(dospec);
2253  }
2254 
2255  else if ( !strcmp(key,"SHOW_DO_PARA_NAME") )
2256  {
2257  sscanf(buf+strlen(key),"%s",tmpchar);
2258  tmpString=TString(tmpchar);
2259  cout << "EdbShowRec::ReadShowRecPar SHOW_DO_PARA_NAME = " << tmpString << endl;
2260  SetDoParaType(tmpString);
2261  }
2262 
2263  else if ( !strcmp(key,"SHOW_ALG_USE_ALISUB") )
2264  {
2265  sscanf(buf+strlen(key),"%d",&dospec);
2266  cout << "EdbShowRec::ReadShowRecPar SHOW_ALG_USE_ALISUB = " << dospec << endl;
2267  SetUseAliSub(dospec);
2268  }
2269 
2270 
2271  }
2272  fclose(fp);
2273 
2274 
2276  if (gEDBDEBUGLEVEL>2) Print_InBTCut(0);
2277 
2278  // Update of Plate Number values is now here necessary:
2279  SetPlateNumberValues(); // Set Before to have proper eAli_Plate values filled.
2280  CheckPlateValues();
2281 
2282 
2283  Log(2,"EdbShowRec::ReadShowRecPar","Read shower parameters...done.");
2284  return 0;
2285 }
int ReadShowRecPar(const char *file)
Definition: EdbShowRec.cxx:1978
void SetSimpleFileName(Int_t type, Int_t dotype)
Definition: EdbShowRec.cxx:3859
void SetTreebranchFileName(TString Filename_Out_treebranch)
Definition: EdbShowRec.h:432
void SetUseAliSub(Int_t type)
Definition: EdbShowRec.cxx:3916
void Print_UseInBTType()
Definition: EdbShowRec.cxx:2305
void Add_INBTCut(Int_t layer, TCut &cut)
Definition: EdbShowRec.cxx:2323
void SetWriteFileShower(Int_t WriteFileShower)
Definition: EdbShowRec.h:419
void Print_InBTCut(Int_t layer)
Definition: EdbShowRec.cxx:2338
void SetDoParaType(Int_t type)
Definition: EdbShowRec.cxx:3877
void ResetUse_InBTType()
Definition: EdbShowRec.cxx:2289
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 SetShowFileName(TString Filename_Out_shower)
Definition: EdbShowRec.h:426
void SetWriteFileTreebranch(Int_t WriteFileTreebranch)
Definition: EdbShowRec.h:429
void AddAlg(Int_t AlgType, Float_t *par)
Definition: EdbShowRec.cxx:3556
void ResetShowAlgArray()
Definition: EdbShowRec.cxx:3646
void SetDoEnergy(Int_t dospec)
Definition: EdbShowRec.h:327
void SetDoVtxAttach(Int_t dospec)
Definition: EdbShowRec.h:330
fclose(pFile)
const char * name
Definition: merge_Energy_SytematicSources_Electron.C:24
UInt_t id
Definition: tlg2pattern.C:118

◆ Reconstruct()

void EdbShowRec::Reconstruct ( )
930 {
931  Log(2,"EdbShowRec::Reconstruct()","Default reconstruction using only one shower algorithm (default: OI) with default values.");
932 
933  // Check on different things to have:
934  Int_t isThere=0;
935  if (eAli) isThere = 1;
936  Log(2,"EdbShowRec::Reconstruct()","Check if eAli is there: %d", isThere);
937  isThere=0;
938  if (eInBTArray) isThere = 1;
939  Log(2,"EdbShowRec::Reconstruct()","Check if eInBTArray is there: %d", isThere);
940  isThere=0;
941  if (eShowAlgArray) isThere = 1;
942  Log(2,"EdbShowRec::Reconstruct()","Check if eShowAlgArray is there: %d", isThere);
943 
944  // CHECK IF WE DO HAVE TO DO IT AGAIN, WHEN IT WAS ALREADY CHECKED IN THE
945  // CONSTRUCTOR OF EdbShowRec ...
946  // To set eAli plate numbers right:
948 
949 
950  //-------------------------------------------------------------------
951  // Part Filling the Initiator BaseTracks:
953  // If __NO__ eInBTArray: create manually: three options:
954  // 0) (eUseNr==0) getting the BaseTracks out of eAli. If they are not stored, goto next
955  // 1) (eUseNr==1) getting the BaseTracks out of tracks out of eFilename_LinkedTracks if they are stored
956  // 2) (eUseNr==2) use only (but all) Basetracks within [eFirstPlate,eMiddlePlate]
957  // 3) (eUseNr==3) from a (manually) written root file containing a TObjArray of EdbSegP segments (InBT)
958  // Default is 0)
959 
960  // If it is not filled, then fill it now...
962 
963  // Create the Initiator Basetrack Tree... Whats the difference to Create_eInBTArray?
964  // Maybe Cutstrings that can be written in the default.par file ....
965  if (!eInBTTree) Create_eInBTTree();
966 
967  // return;
968 
969  //-------------------------------------------------------------------
970  // Part Filling the Shower RecoAlg Array: first create the array:
972 
973  // If no eShowAlgArray: create manually one using the
974  // ConeAdvanced Algorithm as standard algorithm.
976 
977  Log(2,"EdbShowRec::Reconstruct()","eShowAlgArray =%d",eShowAlgArray);
978  Log(2,"EdbShowRec::Reconstruct()","eShowAlgArrayN =%d",eShowAlgArrayN);
979 
980 
981  // Get Reconstruction Algorithm Object from the TObjArray storage:
982  Log(2,"EdbShowRec::Reconstruct()","Get ShowAlg from TObjArray storage");
983 
984  // CAN IT ALSO BE DONE WITH A CAST TO THE PARENT CLASS ???
985  // Seems so:
986  // EdbShowAlg* RecoAlg = (EdbShowAlg*) eShowAlgArray->At(0);
987  // But I rather check it correctly, just to be safe....
988  EdbShowAlg_OI* RecoAlg = (EdbShowAlg_OI*) eShowAlgArray->At(0);
989  eActualAlg=RecoAlg;
990 
991 
992  // Hand over the important objects to the RecoAlg itsself.
993  // eAli (the volume)
994  RecoAlg->SetEdbPVRec(eAli);
995  // eAli numbers
997  // InBTArray, now correctly filled.
998  RecoAlg->SetInBTArray(eInBTArray);
999  // RecoShowerArray, to be filled by the algorithm:
1001  //-------------------------------------------------------------------
1002 
1003  // Print relevant information for the algorithm:
1004  RecoAlg->Print();
1005 
1006 
1007  //-------------------------------------------------------------------
1008  // Main Reconstruction Part for the algorithm:
1009  //
1010  //
1011  RecoAlg->Execute();
1012  //
1013  //
1014  //-------------------------------------------------------------------
1015 
1016 
1017  // Get RecoShowerArray from Reco Alg back!
1018  // This has to be done, because EdbShowAlg and EdbShowRec class have
1019  // each a RecoShowerArray on their own. (It is by construction so...).
1020  // The storage for the arrays is therefore the same.
1021  // (Calls automatically SetRecoShowerArrayN)
1023 
1024  Log(2,"EdbShowRec::Reconstruct()", "RecoAlg->Execute() finished. Reconstructed %d showers.", eRecoShowerArrayN);
1026 
1027 
1028  // Parametrize Showers now, according to the set parametrizations:
1029  Log(2,"EdbShowRec::Reconstruct()", "Parametrize Showers now, according to the set parametrizations");
1030  SetDoParaType(1);
1032 
1033 
1034  // Set the names correctly when having more than one alg or parameterset.
1035  Log(2,"EdbShowRec::Reconstruct()", "Set Output names correctly");
1036  SetOutNames();
1037 
1038 
1039  // Convert Array of EdbShowerP objects into old treebranch file format
1040  // (backward compability)
1041  Log(2,"EdbShowRec::Reconstruct()", "Convert Array of EdbShowerP objects into old treebranch file format");
1043 
1044 
1045  // Write Shower in the new EdbShowerP format file
1046  Log(2,"EdbShowRec::Reconstruct()", "Write Shower in the new EdbShowerP format file");
1048 
1049 
1050 
1051  Log(2,"EdbShowRec::Reconstruct()","Default reconstruction function...done.");
1052  return;
1053 }
void Execute()
Definition: EdbShowAlg.cxx:1216
void SetEdbPVRecPIDNumbers(Int_t FirstPlate_eAliPID, Int_t LastPlate_eAliPID, Int_t MiddlePlate_eAliPID, Int_t NumberPlate_eAliPID)
Definition: EdbShowAlg.h:108
void SetRecoShowerArray(TObjArray *RecoShowerArray)
Definition: EdbShowAlg.h:114
void SetInBTArray(TObjArray *InBTArray)
Definition: EdbShowAlg.h:104
void SetEdbPVRec(EdbPVRec *Ali)
Definition: EdbShowAlg.h:100
TObjArray * GetRecoShowerArray() const
Definition: EdbShowAlg.h:139
void PrintRecoShowerArray(Int_t entry=-1)
Definition: EdbShowRec.cxx:3501
void RecoShowerArray_To_Treebranch()
Definition: EdbShowRec.cxx:2889
void Write_RecoShowerArray(TObjArray *RecoShowerArray)
Write Reconstructed Showers to File:
Definition: EdbShowRec.cxx:1763
void Fill_eInBTArray(Int_t FilType)
Definition: EdbShowRec.cxx:1250
void SetOutNames()
Definition: EdbShowRec.cxx:3528
void Fill_eShowAlgArray()
Definition: EdbShowRec.cxx:1738
void BuildParametrizations()
Definition: EdbShowRec.cxx:3759
Bool_t IsPlateValuesLabel
Definition: EdbShowRec.h:119
void SetRecoShowerArray(TObjArray *RecoShowerArray)
Definition: EdbShowRec.h:381

◆ ReconstructTEST()

void EdbShowRec::ReconstructTEST ( )
635 {
636  // Was part of reconstruct() before ... not used at the moment
637  /*
638 
640  // NEW ALG:
641  // CLEAN SHowerArray before !!!
642  // ?????????????
643 
644  cout <<" NEW ALG: CLEAN SHowerArray before !!!" << endl;
645  eRecoShowerArray->Clear();
646  cout <<" NEW ALG: CLEAN SHowerArray before !!!" << endl;
648 
649  // delete RecoAlg;
650  EdbShowAlg_SA* NewRecoAlg = new EdbShowAlg_SA();
651 
652  //StandardAlg->Print();
653 
654  cout << "-----------PRINT done" << endl;
655  //eShowAlgArray->Print();
656  cout << "eShowAlgArray->GetEntries() " <<eShowAlgArray->GetEntries() << endl;
657  cout << "-----------PRINT done2" << endl;
658  eShowAlgArray->Add(NewRecoAlg);
659  cout << "eShowAlgArray->GetEntries() " <<eShowAlgArray->GetEntries() << endl;
660 
661  SetShowAlgArrayN(eShowAlgArray->GetEntries());
662 
663  eActualAlg=NewRecoAlg;
664  eActualAlgParameterset[4]=1;
665 
666  // eAli
667  NewRecoAlg->SetEdbPVRec(eAli);
668  // eAli numbers
669  NewRecoAlg->SetEdbPVRecPIDNumbers( eFirstPlate_eAliPID, eLastPlate_eAliPID, eMiddlePlate_eAliPID, eNumberPlate_eAliPID);
670  // InBTArray, now correctly filled.
671  NewRecoAlg->SetInBTArray( eInBTArray );
672  // RecoShowerArray, to be filled by the algorithm:
673  NewRecoAlg->SetRecoShowerArray( eRecoShowerArray);
674 
675  NewRecoAlg->Print();
676 
677  //
678  NewRecoAlg->Execute();
679  //
680  //-------------------------------------------------------------------
681 
682 
683  // Sets the names correctly when having more than one alg or parameterset.
684  SetOutNames();
685 
686  RecoShowerArray_To_Treebranch();
687  return;
688 
689 
690 
691  Log(2,"EdbShowRec::Reconstruct()","Default reconstruction function...done.");
692  return;
693  * */
694  return;
695 }

◆ ReconstructTEST_CA()

void EdbShowRec::ReconstructTEST_CA ( )
701 {
702  Log(2,"EdbShowRec::ReconstructTEST_CA()","Default reconstruction function CA Algorithm");
703 
705  if (!eInBTTree) Create_eInBTTree();
707 
708  cout << "eShowAlgArrayN = " << eShowAlgArrayN << endl;
709  cout << "eShowAlgArray = " << eShowAlgArray << endl;
710 
711  if (!eShowAlgArray) {
714  }
715 
716  // --------------------- Main Print Function -----------------------
717  Print();
718  // --------------------- Main Print Function -----------------------
719 
720  // Casting to the parent object is done to have general properties behaviour.
721  // But the Execute() function still calls the function of the inherited class:
722  // Example: EdbShowAlg_CA -> Execute_CA
723 
724  for (int k=0; k<eShowAlgArrayN; k++) {
725  EdbShowAlg* RecoAlg = (EdbShowAlg*) eShowAlgArray->At(k);
726 
727  eActualAlg=RecoAlg;
729 
730  RecoAlg->SetEdbPVRec(eAli);
732  RecoAlg->SetInBTArray( eInBTArray );
734 
735  if (gEDBDEBUGLEVEL>2) RecoAlg->Print();
736 
737  cout<<"-------------------------------------- EXECUTE -----------------------------------"<<endl;
738  RecoAlg->Execute();
739  cout<<"-------------------------------------- EXECUTE done. --------------------------"<<endl;
740 
741 
742  // Important to update the local variable eRecoShowerArrayN
743  // since the instance of EdbShowAlg has its own variable filled.
744  // If this is not done, we may have crashes because eRecoShowerArrayN is not filled!
746 
747  // Parametriye Showers now, according to the set Parametrizations:
749 
750  SetOutNames();
752 
753  } // ShowerRecoAlg Loop.
754 
755  Log(2,"EdbShowRec::ReconstructTEST_CA()","Default reconstruction function CA Algorithm...done.");
756  return;
757 }
Int_t GetAlgValue() const
Definition: EdbShowAlg.h:130
Int_t GetRecoShowerArrayN() const
Definition: EdbShowAlg.h:136
virtual void Execute()
Definition: EdbShowAlg.cxx:323

◆ ReconstructTEST_N3()

void EdbShowRec::ReconstructTEST_N3 ( )
880 {
881 
882  Log(2,"EdbShowRec::ReconstructTEST_N3()","Default reconstruction function N3 Algorithm");
883 
885  if (!eInBTTree) Create_eInBTTree();
887 
888  if (!eShowAlgArray) {
891  }
892  // --------------------- Main Print Function -----------------------
893  Print();
894  // --------------------- Main Print Function -----------------------
895 
896  Bool_t TrainANN=kTRUE;
897 
898  EdbShowAlg_N3* StandardAlg = new EdbShowAlg_N3(TrainANN); // no empty constructor in this class...
899  eShowAlgArray->Add(StandardAlg);
900  SetShowAlgArrayN(eShowAlgArray->GetEntries());
901 
902  eActualAlg=StandardAlg;
904 
909 
910  eActualAlg=StandardAlg;
911  eActualAlg->Print();
912 
913  cout<<"-------------------------------------- EXECUTE -----------------------------------"<<endl;
914  eActualAlg->Execute();
915  cout<<"-------------------------------------- EXECUTE done. --------------------------"<<endl;
916 
917  Log(2,"EdbShowRec::ReconstructTEST_N3()","Default reconstruction function N3 Algorithm...done.");
918  return;
919 }
Definition: EdbShowAlg_NN.h:142

◆ ReconstructTEST_NN()

void EdbShowRec::ReconstructTEST_NN ( )
831 {
832 
833  Log(2,"EdbShowRec::ReconstructTEST_NN()","Default reconstruction function NN Algorithm");
834 
836  if (!eInBTTree) Create_eInBTTree();
838 
839  if (!eShowAlgArray) {
842  }
843  // --------------------- Main Print Function -----------------------
844  Print();
845  // --------------------- Main Print Function -----------------------
846 
847  EdbShowAlg_NN* StandardAlg = new EdbShowAlg_NN();
848  eShowAlgArray->Add(StandardAlg);
849  SetShowAlgArrayN(eShowAlgArray->GetEntries());
850 
851  eActualAlg=StandardAlg;
853 
858 
859  eActualAlg=StandardAlg;
861 
862  eActualAlg->Print();
863 
864  cout<<"-------------------------------------- EXECUTE -----------------------------------"<<endl;
865  eActualAlg->Execute();
866  cout<<"-------------------------------------- EXECUTE done. --------------------------"<<endl;
867 
868  Log(2,"EdbShowRec::ReconstructTEST_NN()","Default reconstruction function NN Algorithm...done.");
869  return;
870 }
Definition: EdbShowAlg_NN.h:42

◆ ReconstructTEST_OI()

void EdbShowRec::ReconstructTEST_OI ( )
766 {
767  Log(2,"EdbShowRec::ReconstructTEST_OI()","Default reconstruction function OI Algorithm");
768 
770  if (!eInBTTree) Create_eInBTTree();
771 
773 
774  // test
776 
777  if (!eShowAlgArray) {
780  }
781  // --------------------- Main Print Function -----------------------
782  Print();
783  // --------------------- Main Print Function -----------------------
784 
785  EdbShowAlg_OI* StandardAlg = new EdbShowAlg_OI();
786  eShowAlgArray->Add(StandardAlg);
787  SetShowAlgArrayN(eShowAlgArray->GetEntries());
788 
789  eActualAlg=StandardAlg;
791 
796 
797  eActualAlg=StandardAlg;
799 
800  eActualAlg->Print();
802 
803  cout<<"-------------------------------------- EXECUTE -----------------------------------"<<endl;
804  eActualAlg->Execute();
805  cout<<"-------------------------------------- EXECUTE done. --------------------------"<<endl;
806 
807 
808  // Important to update the local variable eRecoShowerArrayN
809  // since the instance of EdbShowAlg has its own variable filled.
810  // If this is not done, we may have crashes because eRecoShowerArrayN is not filled!
812 
813  // Parametriye Showers now, according to the set Parametrizations:
815 
816  SetOutNames();
818 
819  Log(2,"EdbShowRec::ReconstructTEST_OI()","Default reconstruction function OI Algorithm...done.");
820  return;
821 }
void PrintMore()
Definition: EdbShowAlg.cxx:376

◆ ReconstructTESTSHORT()

void EdbShowRec::ReconstructTESTSHORT ( )
523 {
524  return;
525 }

◆ ReconstructTESTSTANDARD()

void EdbShowRec::ReconstructTESTSTANDARD ( )

ealisub is deleted.. see adressing issues in transform!!!

STILL TO DO

533 {
534  // Standard reco function using ...
535  cout << endl << endl;
536  ReadShowRecPar("default.par");
537  // this->SetPlateNumberValues();
538  // not necessary now anymore since the ePropoaseNumberPlates are now incorporated
539  // in ReadShowRecPar and CheckPlates()
541  if (!eInBTTree) Create_eInBTTree();
543  cout << "eShowAlgArrayN = " << eShowAlgArrayN << endl;
544  cout << "eShowAlgArray = " << eShowAlgArray << endl;
545  if (!eShowAlgArray) {
548  }
549 
550  cout << "DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG " << endl;
551  eUseAliSub=kTRUE;
552  cout << "EdbShowRec::SetUseAliSub eUseAliSub " << eUseAliSub << endl;
553 
554  cout << "DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG " << endl;
555  eUseAliSub=kFALSE;
556  cout << "EdbShowRec::SetUseAliSub eUseAliSub " << eUseAliSub << endl;
557 
558  // --------------------- Main Print Function -----------------------
559  Print();
560  // --------------------- Main Print Function -----------------------
561 
562  cout << eFirstPlate_eAliPID << endl;
563  cout << eLastPlate_eAliPID << endl;
564  cout << eMiddlePlate_eAliPID << endl;
565  cout << eNumberPlate_eAliPID << endl;
566 
567 // return;
568  // Casting to the parent object is done to have general properties behaviour.
569  // But the Execute() function still calls the function of the inherited class:
570  // Example: EdbShowAlg_CA -> Execute_CA
571 
572  for (int k=0; k<eShowAlgArrayN; k++) {
573 
575 
576  EdbShowAlg* RecoAlg = (EdbShowAlg*) eShowAlgArray->At(k);
577 
578  eActualAlg=RecoAlg;
580 
581  Int_t ActualAlgParametersetNr=eActualAlgParameterset[eActualAlg->GetAlgValue()];
582  RecoAlg->SetActualAlgParameterset(ActualAlgParametersetNr);
583 
584  RecoAlg->SetEdbPVRec(eAli);
585  RecoAlg->SetUseAliSub(eUseAliSub);
587 
588  RecoAlg->SetInBTArray( eInBTArray );
590 
591  if (gEDBDEBUGLEVEL>2) eInBTArray->Print();
592  if (gEDBDEBUGLEVEL>2) RecoAlg->Print();
593  RecoAlg->PrintMore();
594 
595  cout<<"-------------------------------------- EXECUTE RecoAlg->At(" << k << ")-----------------------------------"<<endl;
596  RecoAlg->Execute();
597  cout<<"-------------------------------------- EXECUTE done. --------------------------"<<endl;
598 
599  // Important to update the local variable eRecoShowerArrayN
600  // since the instance of EdbShowAlg has its own variable filled.
601  // If this is not done, we may have crashes because eRecoShowerArrayN is not filled!
603 
604  // Parametriye Showers now, according to the set Parametrizations:
606 
607  // Set OutNames like "treebranch_CA_1", "treebranch_OI_1,", ....
608  SetOutNames();
609 
610 
611  // Shortly Print Showers
612  // EdbShowerP* sh_a=(EdbShowerP*)eRecoShowerArray->At(0); sh_a->PrintSegments();
613  // sh_a->Finalize();
614  // EdbShowerP* sh_b=(EdbShowerP*)eRecoShowerArray->At(eRecoShowerArrayN-1); sh_b->PrintSegments();
615 
616  // Convert the shower array (objects of EdbShowerP) into the "treebranch" style.
618 
619  cout << endl << endl;
620  } // ShowerRecoAlg Loop.
621 
623  // EdbShowAlgE* ENERGYMODULE = new EdbShowAlgE(eRecoShowerArray);
624  // ENERGYMODULE->Create_MLP();
625  // ENERGYMODULE->Create_MLPTree();
626  // ENERGYMODULE->TEST();
627  return;
628 }
void SetActualAlgParameterset(Int_t ActualAlgParametersetNr)
Definition: EdbShowAlg.h:126
void ResetRecoShowerArray()
Definition: EdbShowRec.cxx:464

◆ RecoShowerArray_To_Treebranch()

void EdbShowRec::RecoShowerArray_To_Treebranch ( )

--— IMPORTANT:: these areopen cut values for best combifinding of pair BT deltaR/Theta values --— IMPORTANT:: then you do NOT necessarily get back your values which you put in durign --— IMPORTANT:: your shower reconstruction cone ( deltaR/Theta cutvalues could be NO cutvalues --— IMPORTANT:: for some reconstruction algorithms for example, but we wanna have these values anyway. In Any Case: Frederics Cut looks only for best min_shower_deltar so we do also.

2890 {
2891  Log(2,"EdbShowRec::RecoShowerArray_To_Treebranch","Convert the RecoShowerArray into <<treebranch>> style tree entries (backward compability).");
2892  Log(2,"EdbShowRec::RecoShowerArray_To_Treebranch","Reminder: a shower may have maxium of 5000 segments. - Limitation, my be discarded later, when necessary.");
2893 
2894  // Declaring ObjArray which are needed. Use out of private member variables of this class.
2895  TObjArray* showarray =eRecoShowerArray;
2896  Int_t showarrayN=eRecoShowerArrayN;
2897  EdbShowerP* show=0;
2898 
2899  // VARIABLES: shower_ "treebranch" reconstruction
2903  Float_t shower_xb[5000];
2904  Float_t shower_yb[5000];
2905  Float_t shower_zb[5000];
2906  Float_t shower_txb[5000];
2907  Float_t shower_tyb[5000];
2908  Float_t shower_deltarb[5000];
2909  Float_t shower_deltathetab[5000];
2910  Float_t shower_deltaxb[5000];
2911  Float_t shower_deltayb[5000];
2912  Int_t shower_nfilmb[5000];
2913  Float_t shower_chi2btkb[5000];
2914  Int_t shower_ntrace1simub[5000]; // MCEvt
2915  Int_t shower_ntrace2simub[5000]; // s->W()
2916  Float_t shower_ntrace3simub[5000]; // s->P()
2917  Int_t shower_ntrace4simub[5000]; // s->Flag()
2918  Float_t shower_tagprimary[5000];
2919  Int_t shower_idb[5000];
2920  Int_t shower_plateb[5000];
2921  Float_t shower_deltasigmathetab[58];
2922  Int_t shower_numberofilms;
2923  Float_t shower_purb; // purity of shower
2924  Int_t shower_numberofholes;
2926 
2927 
2928  // Creating the file at this position, that the eShowerTree
2929  // will be connected to this file (otherwise flushing issues...)
2931  eFile_Out_treebranch->cd();
2932 
2933  // Now create the tree. The tree is not made persistent, since at the end
2934  // of this routine, it will be destructed anyway.
2935 
2936  TString treename=GetTreebranchName();
2937  TTree* eShowerTree = new TTree(treename,treename);
2938 
2939  // Is the basket size of the branches relevant? I dont know ...
2940  // To be safe, I chose a "Basket Size" bigger than the
2941  // actual "Total Size", i.e. Compression = 1.00
2942  eShowerTree->Branch("number_eventb",&shower_number_eventb,"number_eventb/I");
2943  eShowerTree->Branch("sizeb",&shower_sizeb,"sizeb/I");
2944  eShowerTree->Branch("sizeb15",&shower_sizeb15,"sizeb15/I");
2945  eShowerTree->Branch("sizeb20",&shower_sizeb20,"sizeb20/I");
2946  eShowerTree->Branch("sizeb30",&shower_sizeb30,"sizeb30/I");
2947  eShowerTree->Branch("isizeb",&shower_isizeb,"isizeb/I");
2948  eShowerTree->Branch("xb",shower_xb,"xb[sizeb]/F",256000);
2949  eShowerTree->Branch("yb",shower_yb,"yb[sizeb]/F",256000);
2950  eShowerTree->Branch("zb",shower_zb,"zb[sizeb]/F",256000);
2951  eShowerTree->Branch("txb",shower_txb,"txb[sizeb]/F",256000);
2952  eShowerTree->Branch("tyb",shower_tyb,"tyb[sizeb]/F",256000);
2953  eShowerTree->Branch("nfilmb",shower_nfilmb,"nfilmb[sizeb]/I",256000);
2954  eShowerTree->Branch("ntrace1simub",shower_ntrace1simub,"ntrace1simu[sizeb]/I",256000); // s.eMCEvt
2955  eShowerTree->Branch("ntrace2simub",shower_ntrace2simub,"ntrace2simu[sizeb]/I",256000); // s.eW
2956  eShowerTree->Branch("ntrace3simub",shower_ntrace3simub,"ntrace3simu[sizeb]/F",256000); // s.eP
2957  eShowerTree->Branch("ntrace4simub",shower_ntrace4simub,"ntrace4simu[sizeb]/I",256000); // s.eFlag
2958  eShowerTree->Branch("chi2btkb",shower_chi2btkb,"chi2btkb[sizeb]/F",256000);
2959  eShowerTree->Branch("deltarb",shower_deltarb,"deltarb[sizeb]/F",256000);
2960  eShowerTree->Branch("deltathetab",shower_deltathetab,"deltathetab[sizeb]/F",256000);
2961  eShowerTree->Branch("deltaxb",shower_deltaxb,"deltaxb[sizeb]/F",256000);
2962  eShowerTree->Branch("deltayb",shower_deltayb,"deltayb[sizeb]/F",256000);
2963  eShowerTree->Branch("tagprimary",shower_tagprimary,"tagprimary[sizeb]/F",256000);
2964  eShowerTree->Branch("energy_shot_particle",&shower_energy_shot_particle,"energy_shot_particle/F");
2965  eShowerTree->Branch("E_MC",&shower_energy_shot_particle,"E_MC/F");
2966  eShowerTree->Branch("showerID",&shower_showerID,"showerID/I");
2967  eShowerTree->Branch("idb",shower_idb,"idb/I");
2968  eShowerTree->Branch("plateb",shower_plateb,"plateb[sizeb]/I",256000);
2969  eShowerTree->Branch("deltasigmathetab",shower_deltasigmathetab,"deltasigmathetab[59]/F",256000);
2970  eShowerTree->Branch("lenghtfilmb",&shower_numberofilms,"lenghtfilmb/I");
2971  eShowerTree->Branch("purb",&shower_purb,"purb/F"); // shower purity
2972  eShowerTree->Branch("nholesb",&shower_numberofholes,"nholesb/I"); // #of (single) empty plates
2973  eShowerTree->Branch("nholesmaxb",&shower_numberofholesconseq,"nholesmaxb/I"); // #of (consecutive) empty plates
2974 
2975  EdbSegP* seg;
2976  EdbSegP* Inseg;
2977  Int_t diff_pid;
2978  Float_t min_shower_deltathetab=99999;
2979  Float_t min_shower_deltar=99999;
2980  Float_t test_shower_deltathetab=99999;
2981  Float_t test_shower_deltar=99999;
2982  Float_t test_shower_deltax,test_shower_deltay;
2983  Int_t max_diff_pid=0;
2984  Float_t extrapol_x,extrapol_y, extrapo_diffz;
2985 
2986  Log(2,"EdbShowRec::RecoShowerArray_To_Treebranch","showarray->GetEntries() = %d", showarrayN);
2987 
2988 
2989  for (int i_shower=0; i_shower<showarrayN; i_shower++) {
2990  // START OVER LOOP of ONE SHOWER:
2991  show=(EdbShowerP*)showarray->At(i_shower);
2992 
2993  if (i_shower%100==0) Log(2,"EdbShowRec::RecoShowerArray_To_Treebranch","Converting shower %05d with %03d basetracks.", i_shower,show->N());
2994  // cout << " EdbShowRec::RecoShowerArray_To_Treebranch Address of shower: " << show << endl;
2995  //cout << " EdbShowRec::RecoShowerArray_To_Treebranch UpdateX() of shower: " << endl;
2996  //show->UpdateX();
2997 
2998  // Initialize arrays...
2999  min_shower_deltathetab=99999;
3000  min_shower_deltar=99999;
3001  test_shower_deltathetab=99999;
3002  test_shower_deltar=99999;
3003  test_shower_deltax=0;
3004  test_shower_deltay=0;
3005  max_diff_pid=0;
3006  extrapol_x=0;
3007  extrapol_y=0;
3008  extrapo_diffz=0;
3009  shower_sizeb15=0;
3010  shower_sizeb20=0;
3011  shower_sizeb30=0;
3012  shower_sizeb=0;
3017  for (int ii=0; ii<5000; ii++) {
3018  shower_xb[ii]=0;
3019  shower_yb[ii]=0;
3020  shower_zb[ii]=0;
3021  shower_txb[ii]=0;
3022  shower_tyb[ii]=0;
3023  shower_nfilmb[ii]=0;
3024  shower_tagprimary[ii]=0;
3025  shower_ntrace1simub[ii]=0;
3026  shower_ntrace2simub[ii]=0;
3027  shower_ntrace3simub[ii]=0;
3028  shower_ntrace3simub[ii]=0;
3029  shower_deltaxb[ii]=0;
3030  shower_deltayb[ii]=0;
3031  shower_chi2btkb[ii]=0;
3032  shower_idb[ii]=0;
3033  shower_plateb[ii]=0;
3034  }
3035  for (Int_t i=1; i<59; ++i) {
3037  }
3038 
3039  Log(3,"EdbShowRec::RecoShowerArray_To_Treebranch","Arrays reseted");
3040 
3041 
3042  // Part to calculate the TransfereedVariables....
3043  shower_sizeb=show->N();
3044  shower_numberofholes=show->N0();
3046 
3047  Inseg=(EdbSegP*)show->GetSegment(0);
3048  shower_energy_shot_particle=Inseg->P();
3049  shower_purb=show->GetPurity();
3050 
3051  if (gEDBDEBUGLEVEL>3) cout << "--- --- ---------------------"<<endl;
3052 
3053  //-------------------------------------
3054  for (int ii=0; ii<shower_sizeb; ii++) {
3055  if (ii>=5000) {
3056  cout << "WARNING: shower_sizeb ( " << shower_sizeb<< ") greater than SHOWERARRAY. Set sizeb to 4999 and Stop filling!."<<endl;
3057  shower_sizeb=4999;
3058  break;
3059  }
3060  seg=(EdbSegP*)show->GetSegment(ii);
3061  if (gEDBDEBUGLEVEL>3) {
3062  cout << "====== --- DOING segment " << ii << endl;
3063  seg->PrintNice();
3064  }
3065 
3066  //-------------------------------------
3067  shower_xb[ii]=seg->X();
3068  shower_yb[ii]=seg->Y();
3069  shower_txb[ii]=seg->TX();
3070  shower_tyb[ii]=seg->TY();
3071  shower_zb[ii]=seg->Z();
3072  shower_chi2btkb[ii]=seg->Chi2();
3073  shower_deltathetab[ii]=0.5;
3074  shower_deltarb[ii]=200;
3075  shower_tagprimary[ii]=0;
3076  if (ii==0) shower_tagprimary[ii]=1;
3077  shower_isizeb=1; // always 1, not needed anymore
3078  if (seg->MCEvt()>0) shower_number_eventb=seg->MCEvt();
3079  shower_ntrace1simub[ii]=0;
3080  if (seg->MCEvt()>0) shower_ntrace1simub[ii]=seg->MCEvt();
3081  shower_ntrace2simub[ii]=seg->W();
3082  shower_ntrace3simub[ii]=seg->P();
3083  shower_ntrace4simub[ii]=seg->Flag();
3084  shower_idb[ii]=seg->ID();
3085  shower_plateb[ii]=seg->PID();
3086  //-------------------------------------
3087  // PUT HERE: deltarb,deltarb, nflimb, sizeb15......
3088  diff_pid=TMath::Abs( Inseg->PID()-seg->PID() )+1;
3089  // (does this work for up/downsream listing??)
3090  // (yes, since InBT->PID is also changed.)
3091 
3092  // InBT:
3093  if (ii==0) {
3094  shower_deltathetab[0]=0.5;
3095  shower_deltarb[0]=200;
3096  shower_nfilmb[0]=1;
3097  }
3098  // All other BTs:
3099  if (ii>0) {
3100  // its correct like this, since this is the way it is done in
3101  // the official FJ-Algorithm:
3102  shower_nfilmb[ii]=diff_pid;
3103  if (gEDBDEBUGLEVEL>3) cout << "--- ---Inseg->PID() seg->PID() ii diif_pid shower_nfilmb[ii] " << Inseg->PID()<< " " << seg->PID() << " " << ii<< " " << diff_pid<<" "<< shower_nfilmb[ii]<<" " << endl;
3104 
3105  if (diff_pid >= 15 ) shower_sizeb15++;
3106  if (diff_pid >= 20 ) shower_sizeb20++;
3107  if (diff_pid >= 30 ) shower_sizeb30++;
3108 
3109  // PUT HERE: calculation routine for shower_deltasigmathetab
3110  // see referenc in thesis of Luillo Esposito, page 109.
3111  shower_deltasigmathetab[diff_pid]=shower_deltasigmathetab[diff_pid]+(TMath::Power(shower_txb[ii]-shower_txb[0],2)+TMath::Power(shower_tyb[ii]-shower_tyb[0],2));
3112 
3113  // PUT HERE: calculation routine for shower_deltathetab, shower_deltarb
3114  // Exrapolate the BT [ii] to the position [jj] and then calc the
3115  // position and slope differences for the best matching next segment.
3116  // For the backward extrapolation of the shower_deltathetab and shower_deltarb
3117  // calulation for BaseTrack(ii), Basetrack(jj)->Z() hast to be smaller.
3118  min_shower_deltathetab=9999; // Reset
3119  min_shower_deltar=9999; // Reset
3120  for (int jj=0; jj<shower_sizeb; jj++) {
3121 
3122  if (ii==jj) continue;
3123  // since we do not know if BTs are ordered by their Z positions:
3124  // and cannot cut directly on the number in the shower entry:
3125  // if (shower_zb[ii]<shower_zb[jj]) cout << "WARNING :: shower_zb[ii]<shower_zb[jj] : shower_zb[ii]= " << shower_zb[ii] << " shower_zb[jj] = " << shower_zb[jj] << " THIS LEADS TO CONTINUE THE LOOP!!!"<< endl;
3126  if (shower_zb[ii]<shower_zb[jj]) continue; // ok, since we calculate deltarb and deltathetab backwards (in Z)
3127 
3128  extrapo_diffz=shower_zb[ii]-shower_zb[jj];
3129  //if (TMath::Abs(extrapo_diffz)>4*1300+1.0) continue; // max 4 plates backpropagation // change to an average delat z of 1350.
3130  if (TMath::Abs(extrapo_diffz)>4*1350+1.0) continue; // max 4 plates backpropagation
3131 // if (TMath::Abs(extrapo_diffz)>7*1300+1.0) continue; // max 7 plates backpropagation
3132 // if (TMath::Abs(extrapo_diffz)>9*1300+1.0) continue; // max 9 plates backpropagation
3133  if (TMath::Abs(extrapo_diffz)<1.0) continue; // remove same positions.
3134 
3135  extrapol_x=shower_xb[ii]-shower_txb[ii]*extrapo_diffz; // minus, because its ii after jj.
3136  extrapol_y=shower_yb[ii]-shower_tyb[ii]*extrapo_diffz; // minus, because its ii after jj.
3137 
3138  // Delta radius we need to extrapolate.
3139  test_shower_deltax=extrapol_x;//shower_txb[ii]*(shower_zb[ii]-shower_zb[jj])+shower_xb[ii];
3140  test_shower_deltay=extrapol_y;//shower_tyb[ii]*(shower_zb[ii]-shower_zb[jj])+shower_yb[ii];
3141  test_shower_deltax=test_shower_deltax-shower_xb[jj];
3142  test_shower_deltay=test_shower_deltay-shower_yb[jj];
3143  test_shower_deltar=TMath::Sqrt(test_shower_deltax*test_shower_deltax+test_shower_deltay*test_shower_deltay);
3144 
3145  // Delta theta we do not need to extrapolate. (old version...)
3146  //test_shower_deltathetab=TMath::Sqrt(shower_txb[ii]*shower_txb[ii]+shower_tyb[ii]*shower_tyb[ii]);
3147  //test_shower_deltathetab=test_shower_deltathetab-TMath::Sqrt(shower_txb[jj]*shower_txb[jj]+shower_tyb[jj]*shower_tyb[jj]);
3148  //test_shower_deltathetab=TMath::Abs(test_shower_deltathetab);
3149  //----
3150  // As before in ShowRec this way of calculation is not equivalent as calculating
3151  // DeltaTheta domponentwise:
3152  // Code from libShower:
3153  // delta = sqrt((SX0-a->GetTXb(l2))*(SX0-a->GetTXb(l2))+((SY0-a->GetTYb(l2))*(SY0-a->GetTYb(l2))));
3154  test_shower_deltathetab=TMath::Sqrt(TMath::Power(shower_txb[ii]-shower_txb[jj],2)+TMath::Power(shower_tyb[ii]-shower_tyb[jj],2));
3155 
3156  if (gEDBDEBUGLEVEL>3) cout << "RecoShowerArray_To_Treebranch--- ---ii = " << ii << " jj= " << jj << " test_shower_deltar = "<< test_shower_deltar << " test_shower_deltathetab = "<< test_shower_deltathetab << endl;
3157 
3158  // Check if both dr,dt match parameter criteria and then just take these values.....
3159  // Maybe a change is necessary because it is not exactly the same as in the off. algorithm.
3160  // Make these values equal to the one in the "official algorithm"..... 150microns and 100mrad.
3161 // if (test_shower_deltar<150 && test_shower_deltathetab<0.15 ) {
3162 
3163  //cout << "DEBUG DEBUG DEBUG CHANGED THE (test_shower_deltar<150 && test_shower_deltathetab<0.15 ) FOR TES TING !! " << endl;
3164  //cout << "DEBUG DEBUG DEBUG SET THEM BACK AS SOON AS YOURE DONE TES TING!!! " << endl;
3165  if (test_shower_deltar<1000 && test_shower_deltathetab<2.0 ) { // open cut values for best combifinding
3172  if (test_shower_deltar<min_shower_deltar) {
3173  min_shower_deltathetab=test_shower_deltathetab;
3174  min_shower_deltar=test_shower_deltar;
3175  shower_deltathetab[ii]=min_shower_deltathetab;
3176  shower_deltarb[ii]=min_shower_deltar;
3177  }
3178  } // if (test_shower_deltar<1000 && test_shower_deltathetab<2.0 )
3179 
3180  } //for (int jj=0;jj<shower_sizeb;jj++)
3181  } // if (ii>0)
3182 
3183  //-------------------------------------
3184  } // for (int ii=0;ii<shower_sizeb;ii++
3185  //-------------------------------------
3186 
3187  //-------------------------------------
3188  for (Int_t i=1; i<59; ++i) {
3190  }
3191  shower_numberofilms=shower_nfilmb[shower_sizeb-1]; // there we assume (this is correct always?) when
3192  // the last shower BT is in the last film...
3193 
3194  // DEBUG test :
3195  if (shower_numberofilms!=show->Npl()) cout << "ERROR ERROR shower_numberofilms!=show->Npl()" << endl;
3196 
3197 
3198  if (gEDBDEBUGLEVEL>3) cout << " EdbShowRec::RecoShowerArray_To_Treebranch Loop done. Before ..Fill().. now."<<endl;
3199 
3200  // Fill Tree:
3201  eShowerTree->Fill();
3202 
3203  // DEBUG
3204  if (gEDBDEBUGLEVEL>2) eShowerTree->Show(eShowerTree->GetEntries()-1);
3205 
3206  } // end of for (int i_shower=0; i_shower<showarray->GetEntries(); i_shower++)
3207 
3208  Log(2,"EdbShowRec::RecoShowerArray_To_Treebranch","Loop over showerArray finished.");
3209 
3210 
3211 
3212 
3213  /*
3214  // Directly write the file here. No special function is made for this:
3215  // this specific function makes only sense when used here in this specific
3216  // context:
3217  // Write this treebranch to the specified file, use UPDATE option to store all in case there are more treebranches
3218  // dirty solution, but for now it may work (encapsulated in if statements)..
3219  // Update: OR IT MAY NOT WORK .....
3220 
3221  ERROR MESSAGE: OCTOBER: 9th 2017
3222  Attaching file ShowerTreebranch.root as _file0...
3223  root [1] treebranch->Show(0)
3224  Error in <TBasket::Streamer>: The value of fNbytes is incorrect (-1091633152) ; trying to recover by setting it to zero
3225  Error in <TBranch::GetBasket>: File: ShowerTreebranch.root at byte:262144, branch:number_eventb, entry:0, badread=1, nerrors=1, basketnumber=0
3226  Error in <TTree::Show()>: Cannot read entry 0 (I/O error)
3227  maybe size of tbranch is wrong ??? t byte:262144,
3228 
3229  // POSSIBLE ? solutiuon:
3230  https://root-forum.cern.ch/t/read-ttree-from-tfile-fill-it-again-and-save-to-new-tfile/17899
3231  OR:
3232  pcanal@fnal.govNo presence information
3233  > it could be that part of the tree gets "improperly" written because ROOT gets
3234  > confused when to write to the file. By cd-ing before creating the tree,
3235  > the "confusion" is resolved somehow.
3236  Yes, this is the right solution. Beyond a certain size, it starts flushing
3237  the basket to the file the TTree is attached to. Without the explicit cd
3238  the TTree gets associated to which ever file was the current file at the
3239  time.
3240  Cheers,
3241  Philippe.
3242  */
3243 
3244  /*
3245  cout << "eShowerTree has entries : " << eShowerTree->GetEntries() << endl;
3246  cout << "eShowerTree->GetCurrentFile()" << endl;
3247  cout << eShowerTree->GetCurrentFile() << endl;
3248  cout << "eShowerTree->GetCurrentFile()->GetName()" << endl;
3249  cout << eShowerTree->GetCurrentFile()->GetName() << endl;
3250  cout << "-------------------------------------------------------------------_" << endl;
3251  */
3252 
3253  eShowerTree->Dump();
3254 
3255 
3256  if (eWriteFileTreebranch==kTRUE) {
3257  eFile_Out_treebranch->Print();
3258  if (gEDBDEBUGLEVEL>2) eShowerTree->Print();
3259  eFile_Out_treebranch->cd();
3260  // Why the option "kWriteDelete"? I had had a reason for this, but I dont know anymore ...
3261  eShowerTree->Write("",TObject::kWriteDelete);
3262  cout << "DONE: --------------------------------- eShowerTree->Write("",TObject::kWriteDelete); ----------------------------------_" << endl;
3263  // Strange, when I close the file directly here, it crashes ....
3264  // Probably, because the Tree is still connected to the file ....
3265  // eFile_Out_treebranch->Close();
3266  }
3267 
3268  /*
3269  cout << "eShowerTree has entries : " << eShowerTree->GetEntries() << endl;
3270  cout << "eFile_Out_treebranch ->ls() : " << endl;
3271  eFile_Out_treebranch ->ls() ;
3272  cout << "eFile_Out_treebranch->IsOpen()? : " << eFile_Out_treebranch->IsOpen() << endl;
3273  cout << "eShowerTree is object at memory: " << eShowerTree << endl;
3274  cout << "eFile_Out_treebranch is object at memory: " << eFile_Out_treebranch << endl;
3275  */
3276 
3277  delete eShowerTree;
3278  eShowerTree=0;
3279 
3280  eFile_Out_treebranch->Close();
3281  //cout << "eFile_Out_treebranch->IsOpen()? : " << eFile_Out_treebranch->IsOpen() << endl;
3282 
3283  delete eFile_Out_treebranch;
3285 
3286  Log(2,"EdbShowRec::RecoShowerArray_To_Treebranch","RecoShowerArray_To_Treebranch...done.");
3287  return;
3288 }
Int_t shower_nfilmb[5000]
Definition: ShowRec.h:382
Float_t shower_yb[5000]
Definition: ShowRec.h:374
Int_t shower_showerID
Definition: ShowRec.h:370
Int_t shower_numberofholesconseq
Definition: ShowRec.h:404
Float_t shower_ntrace3simub[5000]
Definition: ShowRec.h:387
Float_t shower_deltaxb[5000]
Definition: ShowRec.h:380
Int_t shower_sizeb20
Definition: ShowRec.h:371
Float_t shower_purb
Definition: ShowRec.h:394
Float_t shower_tyb[5000]
Definition: ShowRec.h:377
Int_t shower_numberofholes
Definition: ShowRec.h:405
Float_t shower_deltathetab[5000]
Definition: ShowRec.h:379
Int_t shower_numberofilms
Definition: ShowRec.h:393
Int_t shower_ntrace2simub[5000]
Definition: ShowRec.h:386
Float_t shower_energy_shot_particle
Definition: ShowRec.h:372
Int_t shower_idb[5000]
Definition: ShowRec.h:390
Int_t shower_number_eventb
Definition: ShowRec.h:370
Int_t shower_sizeb15
Definition: ShowRec.h:371
Float_t shower_deltasigmathetab[58]
Definition: ShowRec.h:392
Float_t shower_tagprimary[5000]
Definition: ShowRec.h:389
Int_t shower_isizeb
Definition: ShowRec.h:370
Float_t shower_deltayb[5000]
Definition: ShowRec.h:381
Int_t shower_sizeb30
Definition: ShowRec.h:371
Int_t shower_ntrace4simub[5000]
Definition: ShowRec.h:388
Int_t shower_sizeb
Definition: ShowRec.h:370
Float_t shower_chi2btkb[5000]
Definition: ShowRec.h:384
Float_t shower_zb[5000]
Definition: ShowRec.h:375
Float_t shower_deltarb[5000]
Definition: ShowRec.h:378
Float_t shower_xb[5000]
Definition: ShowRec.h:373
Float_t shower_txb[5000]
Definition: ShowRec.h:376
Int_t shower_plateb[5000]
Definition: ShowRec.h:391
Int_t shower_ntrace1simub[5000]
Definition: ShowRec.h:385
Float_t TX() const
Definition: EdbSegP.h:172
Int_t ID() const
Definition: EdbSegP.h:144
Float_t X() const
Definition: EdbSegP.h:170
Float_t Chi2() const
Definition: EdbSegP.h:154
Float_t P() const
Definition: EdbSegP.h:149
Float_t Y() const
Definition: EdbSegP.h:171
Float_t W() const
Definition: EdbSegP.h:148
Float_t TY() const
Definition: EdbSegP.h:173
Int_t Flag() const
Definition: EdbSegP.h:146
TString GetTreebranchName() const
Definition: EdbShowRec.h:521
Int_t N() const
Definition: EdbShowerP.h:412
Int_t N0() const
Definition: EdbShowerP.h:400
EdbSegP * GetSegment(int i) const
Definition: EdbShowerP.h:435
Int_t N00() const
Definition: EdbShowerP.h:421
Int_t Npl() const
Definition: EdbShowerP.h:409
Float_t GetPurity() const
Definition: EdbShowerP.h:532

◆ Reset()

void EdbShowRec::Reset ( )
1806 {
1807  Log(2,"EdbShowRec::Reset()","Delete all internal objects and set them to NULL pointer.");
1808 
1809  cout << "EdbShowRec::Reset() Delete eAli." << endl;
1810  if (eAli) {
1811  eAli->Clear();
1812  delete eAli;
1813  eAli=0;
1814  }
1815  cout << "EdbShowRec::Reset() Delete eInBTArray." << endl;
1816  if (eInBTArray) {
1817  eInBTArray->Clear();
1818  delete eInBTArray;
1819  eInBTArray=0;
1820  }
1821  cout << "EdbShowRec::Reset() Delete eShowAlgArray." << endl;
1822  if (eShowAlgArray) {
1823  eShowAlgArray->Clear();
1824  delete eShowAlgArray;
1825  eShowAlgArray=0;
1826  }
1827  Log(2,"EdbShowRec::Reset()","Delete all internal objects and set them to NULL pointer...done.");
1828  return;
1829 }

◆ ResetInBTArray()

void EdbShowRec::ResetInBTArray ( )
480 {
481  Log(2,"EdbShowRec::ResetInBTArray()","Clear eInBTArray");
482  // Clear eInBTArray:
483  if (!eInBTArray) return;
484  eInBTArray->Clear();
485  SetInBTArrayN(eInBTArray->GetEntries());
486  Log(2,"EdbShowRec::ResetInBTArray()","Clear eInBTArray...done.");
487  return;
488 }

◆ ResetINBTArray()

void EdbShowRec::ResetINBTArray ( )
inline
339  {
340  eInBTArray->Clear();
341  eInBTArrayN=0;
342  }

◆ ResetRecoShowerArray()

void EdbShowRec::ResetRecoShowerArray ( )
465 {
466  Log(2,"EdbShowRec::ResetRecoShowerArray()","Clear RecoShowerArray");
467  // Clear RecoShowerArray:
468  if (!eRecoShowerArray) return;
469  eRecoShowerArray->Clear();
470  SetRecoShowerArrayN(eRecoShowerArray->GetEntries());
471  Log(2,"EdbShowRec::ResetRecoShowerArray()","Clear RecoShowerArray...done.");
472  return;
473 }

◆ ResetShowAlgArray()

void EdbShowRec::ResetShowAlgArray ( )
private
3647 {
3648  Log(2,"EdbShowRec::ResetShowAlgArray","EdbShowRec::ResetShowAlgArray");
3649  if (!eShowAlgArray) {
3651  }
3652 
3653  eShowAlgArray->Clear();
3654  SetShowAlgArrayN(eShowAlgArray->GetEntries());
3655  for (Int_t i=0; i<10; ++i) eShowAlgArraySingleN[i]=0;
3656 
3657  Log(2,"EdbShowRec::ResetShowAlgArray","EdbShowRec::ResetShowAlgArray...done.");
3658 }

◆ ResetUse_InBTType()

void EdbShowRec::ResetUse_InBTType ( )
private
2290 {
2291  Log(2,"EdbShowRec::ResetUse_InBTType()","ResetUse_InBTType");
2292  // Use no type to fill InBT Array at all(!) (i.e. reconstruct 0 showers).
2293  eUse_LT=kFALSE;
2294  eUse_PVREC=kFALSE;
2295  eUse_AliBT=kFALSE;
2296  eUse_AliLT=kFALSE;
2297  eUse_ROOTInBT=kFALSE;
2298  eUseNr=-1;
2299  Log(2,"EdbShowRec::ResetUse_InBTType()","ResetUse_InBTType...done.");
2300  return;
2301 }

◆ Set0()

void EdbShowRec::Set0 ( )
private
359 {
360  Log(2,"EdbShowRec::Set0()","Default reset function");
361  // Default reset function
364  eDoId=0;
365  eDoEnergy=0;
366  eDoVtxAttach=0;
367 
368  eAli=0;
369  eAliNpat=0;
370  eAliLoaded=kFALSE;
371 
373 
374  eUseAliSub=0;
375 
376  eAliZMax=0;
377  eAliZMin=0;
378 
383  IsPlateValuesLabel=kFALSE;
384 
385  eInBTArray=0;
386  eInBTArrayN=0;
387  eInBTArrayLoaded=kFALSE;
388  eInBTArrayMaxSize=999999;
389 
390  eShowAlgArray=0;
391  eShowAlgArrayN=0;
392  eShowAlgArrayLoaded=kFALSE;
394 
397 
399 
400 
401  for (Int_t i=0; i<3; ++i) eInBTCuts[i]=0;
402  for (Int_t i=0; i<7; ++i) eParaTypes[i]=0;
403 
404  eParaNames[0]="FJ";
405  eParaNames[1]="LT";
406  eParaNames[2]="YC";
407  eParaNames[3]="JC";
408  eParaNames[4]="XX";
409  eParaNames[5]="YY";
410  eParaNames[6]="PP";
411  eInBTTree=0;
412 
413  Log(2,"EdbShowRec::Set0()","Default reset function...done.");
414  return;
415 }

◆ SetDoEnergy()

void EdbShowRec::SetDoEnergy ( Int_t  dospec)
inline
327  {
328  eDoEnergy = dospec;
329  }

◆ SetDoId()

void EdbShowRec::SetDoId ( Int_t  dospec)
inline
324  {
325  eDoId = dospec;
326  }

◆ SetDoParametrisation()

void EdbShowRec::SetDoParametrisation ( Int_t  dospec)
inline
321  {
322  eDoParametrization = dospec;
323  }

◆ SetDoParaType() [1/2]

void EdbShowRec::SetDoParaType ( Int_t  type)
3878 {
3879  Log(2,"EdbShowRec::SetDoParaType()","SetDoParaType");
3880  // Set internal array values for which parametrisation shall be calculated:
3881  //type = 0: FJ
3882  //type = 1: LT
3883  //type = 2: YC
3884  //type = 3: JC
3885  //type = 4: XX
3886  //type = 5: YY
3887  //type = 6: PP // to be implemented ??? !!!!!! ???
3888  //type = 7: AS // to be implemented ??? !!!!!! ???
3889  //type = 8: SE // to be implemented ??? !!!!!! ???
3890 
3891  int maxParametrizationType=6; // max parametrizations available
3892  if (type>=0 && type<maxParametrizationType) eParaTypes[type]=1;
3893  Log(2,"EdbShowRec::SetDoParaType()","SetDoParaType...done.");
3894  return;
3895 }

◆ SetDoParaType() [2/2]

void EdbShowRec::SetDoParaType ( TString  typestring)
3901 {
3902  if (typestring=="FJ") SetDoParaType(0);
3903  if (typestring=="LT") SetDoParaType(1);
3904  if (typestring=="YC") SetDoParaType(2);
3905  if (typestring=="JC") SetDoParaType(3);
3906  if (typestring=="XX") SetDoParaType(4);
3907  if (typestring=="YY") SetDoParaType(5);
3908  if (typestring=="PP") SetDoParaType(6); // To be implemented ???
3909  if (typestring=="AS") SetDoParaType(7); // To be implemented ???
3910  if (typestring=="SE") SetDoParaType(8); // To be implemented ???
3911  return;
3912 }

◆ SetDoReconstruction()

void EdbShowRec::SetDoReconstruction ( Int_t  dospec)
inline
318  {
319  eDoReconstruction = dospec;
320  }

◆ SetDoVtxAttach()

void EdbShowRec::SetDoVtxAttach ( Int_t  dospec)
inline
330  {
331  eDoVtxAttach = dospec;
332  }

◆ SetEdbPVRec()

void EdbShowRec::SetEdbPVRec ( EdbPVRec Ali)
inline
335  {
336  eAli = Ali;
338  }

◆ SetFirstPlate()

void EdbShowRec::SetFirstPlate ( Int_t  FirstPlate)
inline
398  {
399  eFirstPlate = FirstPlate;
400  }

◆ SetFirstPlate_eAliPID()

void EdbShowRec::SetFirstPlate_eAliPID ( Int_t  FP,
Int_t  StreamTypeStep 
)
3812 {
3813  if (StreamTypeStep==1) {
3815  }
3816  if (StreamTypeStep==-1) {
3817  eFirstPlate_eAliPID = FP-1;
3818  }
3819  return;
3820 }

◆ SetInBTArray() [1/5]

void EdbShowRec::SetInBTArray ( EdbPattern pattern)
inline
347  {
348  ResetINBTArray();
349  AddInBTArray(pattern);
350  }
void ResetINBTArray()
Definition: EdbShowRec.h:339

◆ SetInBTArray() [2/5]

void EdbShowRec::SetInBTArray ( EdbPVRec Ali)
inline
343  {
344  ResetINBTArray();
345  AddInBTArray(Ali);
346  }

◆ SetInBTArray() [3/5]

void EdbShowRec::SetInBTArray ( EdbSegP seg)
inline
356  {
357  ResetINBTArray();
358  AddInBT(seg);
359  }

◆ SetInBTArray() [4/5]

void EdbShowRec::SetInBTArray ( EdbTrackP track)
inline
351  {
352  cout << " TO BE IMPLEMENTED !!! 13. 09. 2017 !!! Set InBTArray from a EdbTrackP object " << endl;
353  ResetINBTArray();
355  }

◆ SetInBTArray() [5/5]

void EdbShowRec::SetInBTArray ( TObjArray *  InBTArray)
inline
360  {
361  eInBTArray = InBTArray;
362  eInBTArrayN=eInBTArray->GetEntries();
363  }

◆ SetInBTArrayFraction()

void EdbShowRec::SetInBTArrayFraction ( Double_t  InBTArrayFraction)
inline
364  {
365  if (InBTArrayFraction>1) {
366  cout << "WARNUNG ..... InBTArrayFraction > 1. Set to 1." << endl;
368  }
369  else {
370  eInBTArrayFraction=InBTArrayFraction;
371  }
372  }

◆ SetInBTArrayN()

void EdbShowRec::SetInBTArrayN ( Int_t  InBTArrayN)
inline
385  {
386  eInBTArrayN = InBTArrayN;
387  }

◆ SetInBTUseNr()

void EdbShowRec::SetInBTUseNr ( Int_t  UseNr)
inline
374  {
375  eUseNr = UseNr;
376  }

◆ SetLastPlate()

void EdbShowRec::SetLastPlate ( Int_t  LastPlate)
inline
401  {
402  eLastPlate = LastPlate;
403  }

◆ SetLastPlate_eAliPID()

void EdbShowRec::SetLastPlate_eAliPID ( Int_t  plate,
Int_t  StreamTypeStep 
)
3838 {
3839  if (StreamTypeStep==1) {
3840  eLastPlate_eAliPID = eAliNpat-Plate;
3841  }
3842  if (StreamTypeStep==-1) {
3843  eLastPlate_eAliPID = Plate-1;
3844  }
3845  return;
3846 }

◆ SetMiddlePlate()

void EdbShowRec::SetMiddlePlate ( Int_t  MiddlePlate)
inline
404  {
405  eMiddlePlate = MiddlePlate;
406  }

◆ SetMiddlePlate_eAliPID()

void EdbShowRec::SetMiddlePlate_eAliPID ( Int_t  plate,
Int_t  StreamTypeStep 
)
3825 {
3826  if (StreamTypeStep==1) {
3828  }
3829  if (StreamTypeStep==-1) {
3830  eMiddlePlate_eAliPID = Plate-1;
3831  }
3832  return;
3833 }

◆ SetNumberPlate()

void EdbShowRec::SetNumberPlate ( Int_t  NumberPlate)
inline
407  {
408  eNumberPlate = NumberPlate;
409  }

◆ SetNumberPlate_eAliPID()

void EdbShowRec::SetNumberPlate_eAliPID ( Int_t  plate,
Int_t  StreamTypeStep 
)
3852 {
3854  return;
3855 }

◆ SetOutNames()

void EdbShowRec::SetOutNames ( )
private
3529 {
3530  Log(2,"EdbShowRec::SetOutNames","EdbShowRec::SetOutNames");
3531 
3532  int AlgParasetNr=eActualAlg->GetAlgValue();
3533  TString AlgName=eActualAlg->GetAlgName();
3534 
3535  // Check if more than one alg/paraset is present:
3536  if (GetShowAlgArrayN()==1) {
3537  SetShowName("shower");
3538  SetTreebranchName("treebranch");
3539  }
3540  else {
3541  SetShowName(TString(Form("shower_%s_%d", (const char*)eActualAlg->GetAlgName(),eActualAlgParameterset[AlgParasetNr])));
3542  SetTreebranchName(TString(Form("treebranch_%s_%d", (const char*)eActualAlg->GetAlgName(),eActualAlgParameterset[AlgParasetNr])));
3543  }
3544  cout << "EdbShowRec::SetOutNames() "<< GetShowName() << endl;
3545  cout << "EdbShowRec::SetOutNames() "<< GetTreebranchName() << endl;
3546 
3547  Log(2,"EdbShowRec::SetOutNames","EdbShowRec::SetOutNames...done.");
3548  return;
3549 }
TString GetAlgName() const
Definition: EdbShowAlg.h:133
void SetTreebranchName(TString Name_Out_treebranch)
Definition: EdbShowRec.h:422
TString GetShowName() const
Definition: EdbShowRec.h:518
void SetShowName(TString Name_Out_shower)
Definition: EdbShowRec.h:416

◆ SetPlateNumberValues()

void EdbShowRec::SetPlateNumberValues ( )
private
1602 {
1603  Log(2,"EdbShowRec::SetPlateNumberValues()","SetPlateNumberValues");
1604 
1605  // Possibly there are four (!!) combinations. But dont know yet. todo...
1606 
1607  // The most seen labelling up to now (in data) is this:
1608  // EdbPatternsVolume with 28 patterns
1609  // id= 0 pid= 0 x:y:z = 0.000 0.000 -35395.020 n= 1326
1610  // id= 1 pid= 1 x:y:z = 0.000 0.000 -34085.070 n= 1322
1611  // ...
1612  // id= 26 pid= 26 x:y:z = 0.000 0.000 -1342.368 n= 3588
1613  // id= 27 pid= 27 x:y:z = 0.000 0.000 0.000 n= 3788
1614  // This means: highest (absolut) Z value is gets PID = npat-1 , whereas lowest Z value is PID = 0,
1615  //
1616  // In other words:
1617  // eFirstPlate = 1 <=> eFirstPlate_eAliPID = 0
1618  // eLastPlate = npat <=> eLastPlate_eAliPID = npat-1
1619 
1620  // So we try ko keep this scheme (also in simulation);
1621 
1622  cout << "EdbShowRec::SetPlateNumberValues() eAliNpat = " << eAliNpat << endl;
1623 
1624  EdbSegP* seg0;
1625  EdbSegP* segNPATm1;
1626 
1627  // Maybe this is not safe: when Pattern(0) or Pattern(eAliNpat-1) has no segments this pointer
1628  // will create a wrong assignment and crash. Better use PID of the Pattern itsself.
1629  // Changed here.
1630  Int_t PID0=eAli->GetPattern(0)->PID();
1631  Int_t PIDNPATM1=eAli->GetPattern(eAliNpat-1)->PID();
1632 
1633  Float_t Z_PatternID_0 = eAli->GetPattern(0)->Z();
1634  Float_t Z_PatternID_NPATm1 = eAli->GetPattern(eAliNpat-1)->Z();
1635 
1636  if (eAli->GetPattern(0)->N()>0) {
1637  seg0=(EdbSegP*)eAli->GetPattern(0)->At(0);
1638  cout << "EdbShowRec::SetPlateNumberValues() seg0->PID()= " << seg0->PID() << endl;
1639  }
1640 
1641  if (eAli->GetPattern(eAliNpat-1)->N()>0) {
1642  segNPATm1=(EdbSegP*)eAli->GetPattern(eAliNpat-1)->At(0);
1643  cout << "EdbShowRec::SetPlateNumberValues() segNPATm1->PID() = " << segNPATm1->PID() << endl;
1644  }
1645 
1646  cout << "EdbShowRec::SetPlateNumberValues() Z_PatternID_NPATm1 = " << Z_PatternID_NPATm1 << endl;
1647  cout << "EdbShowRec::SetPlateNumberValues() Z_PatternID_0 = " << Z_PatternID_0 << endl;
1648 
1649  cout << "EdbShowRec::SetPlateNumberValues() PID0 = " << PID0 << endl;
1650  cout << "EdbShowRec::SetPlateNumberValues() PIDNPATM1 = " << PIDNPATM1 << endl;
1651 
1652 
1653  // Usually if nothing else is given, then (and only then!)
1654  // eFirstPlate is the first plate (from beam view== peam hits this plate first)
1655  // eLastPlate is the last plate (from beam view== peam hits this plate first)
1656  // eMiddlePlate is 3 plates before last plate (from beam view== peam hits this plate first)
1657  // eNumberPlate is number of plates of eAli object.
1658  eFirstPlate=1;
1662 
1663 
1664  if (Z_PatternID_NPATm1<Z_PatternID_0) {
1665  cout << "EdbShowRec::SetPlateNumberValues() case: FP is at lowest Z, and has PID(0).....UPSTREAM...."<<endl;
1666 
1667  eAliZMaxPID=PID0;
1668  eAliZMinPID=PIDNPATM1;
1669  eAliZMax=Z_PatternID_0;
1670  eAliZMin=Z_PatternID_NPATm1;
1671 
1672  eFirstPlate_eAliPID=PIDNPATM1;
1673  eLastPlate_eAliPID=PID0;
1675  eMiddlePlate_eAliPID=PID0+3;
1676 
1677  eAliStreamType="UPSTREAM";
1678  eAliStreamTypeStep=+1;
1679  }
1680 
1681  if (Z_PatternID_NPATm1>Z_PatternID_0) {
1682  cout << "EdbShowRec::SetPlateNumberValues() case: FP is at highest Z, and has PID(0).....DOWNSTREAM...."<<endl;
1683 
1684  eAliZMaxPID=PIDNPATM1;
1685  eAliZMinPID=PID0;
1686  eAliZMax=Z_PatternID_NPATm1;
1687  eAliZMin=Z_PatternID_0;
1688 
1689  eFirstPlate_eAliPID=PIDNPATM1;
1690  eLastPlate_eAliPID=PID0;
1692  eMiddlePlate_eAliPID=PIDNPATM1-3;
1693 
1694  eAliStreamType="DOWNSTREAM";
1695  eAliStreamTypeStep=-1;
1696  }
1697 
1698  if (Z_PatternID_NPATm1==Z_PatternID_0) {
1699  cout << "EdbShowRec::SetPlateNumberValues() Strange case: Z_PatternID_NPATm1==Z_PatternID_0 should NEVER happen...????"<<endl;
1700  return;
1701  }
1702 
1703  Log(2,"EdbShowRec::SetPlateNumberValues()","eAliZMaxPID = %02d", eAliZMaxPID);
1704  Log(2,"EdbShowRec::SetPlateNumberValues()","eFirstPlate_eAliPID = %02d", eFirstPlate_eAliPID);
1705  Log(2,"EdbShowRec::SetPlateNumberValues()","eLastPlate_eAliPID = %02d", eLastPlate_eAliPID);
1706  Log(2,"EdbShowRec::SetPlateNumberValues()","eMiddlePlate_eAliPID = %02d", eMiddlePlate_eAliPID);
1707  Log(2,"EdbShowRec::SetPlateNumberValues()","eNumberPlate_eAliPID = %02d", eNumberPlate_eAliPID);
1708  Log(2,"EdbShowRec::SetPlateNumberValues()","eAliStreamTypeStep = %02d", eAliStreamTypeStep);
1709 
1710  IsPlateValuesLabel=kTRUE;
1711 
1712  Log(2,"EdbShowRec::SetPlateNumberValues()","SetPlateNumberValues...done.");
1713  return;
1714 }
int PID() const
Definition: EdbPattern.h:329
EdbPoint * At(int i) const
Definition: EdbPattern.h:90
Int_t eAliZMinPID
Definition: EdbShowRec.h:112
Int_t eAliZMaxPID
Definition: EdbShowRec.h:111

◆ SetRecoShowerArray()

void EdbShowRec::SetRecoShowerArray ( TObjArray *  RecoShowerArray)
inline
381  {
383  eRecoShowerArrayN=eRecoShowerArray->GetEntries();
384  }

◆ SetRecoShowerArrayN()

void EdbShowRec::SetRecoShowerArrayN ( Int_t  RecoShowerArrayN)
inline
391  {
392  eRecoShowerArrayN = RecoShowerArrayN;
393  }

◆ SetShowAlgArray()

void EdbShowRec::SetShowAlgArray ( TObjArray *  ShowAlgArray)
inline
377  {
378  eShowAlgArray = ShowAlgArray;
379  eShowAlgArrayN=eShowAlgArray->GetEntries();
380  }

◆ SetShowAlgArrayN()

void EdbShowRec::SetShowAlgArrayN ( Int_t  ShowAlgArrayN)
inline
388  {
389  eShowAlgArrayN = ShowAlgArrayN;
390  }

◆ SetShowFileName()

void EdbShowRec::SetShowFileName ( TString  Filename_Out_shower)
inline
426  {
427  eFilename_Out_shower = Filename_Out_shower;
428  }

◆ SetShowName()

void EdbShowRec::SetShowName ( TString  Name_Out_shower)
inline
416  {
417  eName_Out_shower = Name_Out_shower;
418  }

◆ SetSimpleFileName()

void EdbShowRec::SetSimpleFileName ( Int_t  type,
Int_t  dotype 
)
3860 {
3861  Log(2,"EdbShowRec::SetSimpleFileName()","SetSimpleFileName");
3862  //type = 0: treebranch
3863  //type = 1: showers
3864  if (type==0) if (dotype==1) eFilename_Out_treebranch="treebranch.root";
3865  if (type==1) if (dotype==1) eFilename_Out_shower="Showers.root";
3866  // "Showers.root" was chosen not to conflict with the output file
3867  // of the old libShower library, which gave "Shower.root" as output.
3868 
3869  cout << "EdbShowRec::SetSimpleFileName() eFilename_Out_treebranch= " << eFilename_Out_treebranch << " eFilename_Out_shower = " << eFilename_Out_shower << endl;
3870  Log(2,"EdbShowRec::SetSimpleFileName()","SetSimpleFileName...done.");
3871  return;
3872 }

◆ SetTreebranchFileName()

void EdbShowRec::SetTreebranchFileName ( TString  Filename_Out_treebranch)
inline
432  {
433  eFilename_Out_treebranch = Filename_Out_treebranch;
434  }

◆ SetTreebranchName()

void EdbShowRec::SetTreebranchName ( TString  Name_Out_treebranch)
inline
422  {
423  eName_Out_treebranch = Name_Out_treebranch;
424  }

◆ SetUseAliSub()

void EdbShowRec::SetUseAliSub ( Int_t  type)
3917 {
3918  if (type==0) eUseAliSub=kFALSE;
3919  if (type==1) eUseAliSub=kTRUE;
3920  cout << "EdbShowRec::SetUseAliSub eUseAliSub = " << type << " set to " << eUseAliSub << endl;
3921  cout << "EdbShowRec::SetUseAliSub WARNING! The use of the eAliSub volume is only recommended "<<endl;
3922  cout << "EdbShowRec::SetUseAliSub for _FEW_ Initiator Basetracks, since the usage of eAliSub volume "<<endl;
3923  cout << "EdbShowRec::SetUseAliSub is not memory safe. "<<endl;
3924  cout << "SEE THE COMMMENT IN THE CODE OF THE FUNCTIOn " << endl;
3925  cout << "void EdbShowAlg::Transform_eAli(EdbSegP* InitiatorBT, Float_t ExtractSize=1500) " << endl;
3926  cout << "FOR THE REASON............ TO BE FIXED " << endl;
3927  cout << "For the moment, we will just set back to use full volume in reco:" << endl;
3928 
3929  // for the moment, we will just set back to use full volume in reco:
3930  eUseAliSub=kFALSE;
3931  cout << "EdbShowRec::SetUseAliSub eUseAliSub = " << type << " set to " << eUseAliSub << endl;
3932  return;
3933 }

◆ SetWriteFileShower()

void EdbShowRec::SetWriteFileShower ( Int_t  WriteFileShower)
inline
419  {
420  eWriteFileShower = WriteFileShower;
421  }

◆ SetWriteFileTreebranch()

void EdbShowRec::SetWriteFileTreebranch ( Int_t  WriteFileTreebranch)
inline
429  {
430  eWriteFileTreebranch = WriteFileTreebranch;
431  }

◆ Treebranch_To_RecoShowerArray()

void EdbShowRec::Treebranch_To_RecoShowerArray ( TObjArray *  showarr,
TTree *  treebranch 
)
3294 {
3295  Log(2,"EdbShowRec::Treebranch_To_RecoShowerArray","EdbShowRec::Treebranch_To_RecoShowerArray");
3296 
3297  // Declaring ObjArray which are needed. Use out of private member variables of this class.
3298  TObjArray* showarray;
3299  showarray=showarr;
3300  cout << "showarray given over:" << showarr << endl;
3301  TTree* eShowerTree = treebranch;
3302 
3303  EdbShowerP* show=0;
3304  EdbSegP* showseg=0;
3305 
3306  //- VARIABLES: shower_ "treebranch" reconstruction
3310  Float_t shower_xb[5000];
3311  Float_t shower_yb[5000];
3312  Float_t shower_zb[5000];
3313  Float_t shower_txb[5000];
3314  Float_t shower_tyb[5000];
3315  Float_t shower_deltarb[5000];
3316  Float_t shower_deltathetab[5000];
3317  Float_t shower_deltaxb[5000];
3318  Float_t shower_deltayb[5000];
3319  Int_t shower_nfilmb[5000];
3320  Float_t shower_chi2btkb[5000];
3321  Int_t shower_ntrace1simub[5000]; // MCEvt
3322  Int_t shower_ntrace2simub[5000]; // s->W()
3323  Float_t shower_ntrace3simub[5000]; // s->P()
3324  Int_t shower_ntrace4simub[5000]; // s->Flag()
3325  Float_t shower_tagprimary[5000];
3326  Int_t shower_idb[5000];
3327  Int_t shower_plateb[5000];
3328  Float_t shower_deltasigmathetab[58];
3329  Int_t shower_numberofilms;
3330  Float_t shower_purb; // purity of shower
3331 
3332 
3333  // Set Addresses of treebranch tree:
3334  eShowerTree->SetBranchAddress("number_eventb",&shower_number_eventb);
3335  eShowerTree->SetBranchAddress("sizeb",&shower_sizeb);
3336  eShowerTree->SetBranchAddress("sizeb15",&shower_sizeb15);
3337  eShowerTree->SetBranchAddress("sizeb20",&shower_sizeb20);
3338  eShowerTree->SetBranchAddress("sizeb30",&shower_sizeb30);
3339  eShowerTree->SetBranchAddress("isizeb",&shower_isizeb);
3340  eShowerTree->SetBranchAddress("xb",shower_xb);
3341  eShowerTree->SetBranchAddress("yb",shower_yb);
3342  eShowerTree->SetBranchAddress("zb",shower_zb);
3343  eShowerTree->SetBranchAddress("txb",shower_txb);
3344  eShowerTree->SetBranchAddress("tyb",shower_tyb);
3345  eShowerTree->SetBranchAddress("nfilmb",shower_nfilmb);
3346  eShowerTree->SetBranchAddress("ntrace1simub",shower_ntrace1simub); // s.eMCEvt
3347  eShowerTree->SetBranchAddress("ntrace2simub",shower_ntrace2simub); // s.eW
3348  eShowerTree->SetBranchAddress("ntrace3simub",shower_ntrace3simub); // s.eP
3349  eShowerTree->SetBranchAddress("ntrace4simub",shower_ntrace4simub); // s.eFlag
3350  eShowerTree->SetBranchAddress("chi2btkb",shower_chi2btkb);
3351  eShowerTree->SetBranchAddress("deltarb",shower_deltarb);
3352  eShowerTree->SetBranchAddress("deltathetab",shower_deltathetab);
3353  eShowerTree->SetBranchAddress("deltaxb",shower_deltaxb);
3354  eShowerTree->SetBranchAddress("deltayb",shower_deltayb);
3355  eShowerTree->SetBranchAddress("tagprimary",shower_tagprimary);
3356  eShowerTree->SetBranchAddress("energy_shot_particle",&shower_energy_shot_particle);
3357  eShowerTree->SetBranchAddress("E_MC",&shower_energy_shot_particle);
3358  eShowerTree->SetBranchAddress("showerID",&shower_showerID);
3359  eShowerTree->SetBranchAddress("idb",shower_idb);
3360  eShowerTree->SetBranchAddress("plateb",shower_plateb);
3361  eShowerTree->SetBranchAddress("deltasigmathetab",shower_deltasigmathetab);
3362  eShowerTree->SetBranchAddress("lenghtfilmb",&shower_numberofilms);
3363  eShowerTree->SetBranchAddress("purityb",&shower_purb); // shower purity
3364 
3365 
3366  Int_t nent=eShowerTree->GetEntries();
3367  cout << "nent = " << nent << endl;
3368 
3369  Int_t nenttotalcount=0;
3370  cout << "nenttotalcount = " << nenttotalcount << endl;
3371 
3372  Bool_t QUICK_READ=kFALSE;
3373 // QUICK_READ=kTRUE; cout << "QUICK_READ=kTRUE; "<< endl;
3374  if (QUICK_READ) nent=1; // read only first shower... (mainly for debug purposes).
3375 
3376  // Loop over Tree Entries (==different showers):
3377  for (Int_t i=0; i<nent; ++i) {
3378  eShowerTree->GetEntry(i);
3379  //cout << "i = " << i << endl;
3380  //cout << "shower_tagprimary[0] = " << shower_tagprimary[0] << endl;
3381  if (gEDBDEBUGLEVEL>3) eShowerTree->Show(i);
3382 
3383 
3384  // Since we do not take showers with below 1segment
3385  if (shower_sizeb<=1) continue;
3386 
3387  show = new EdbShowerP(shower_sizeb);
3388 
3389  // For Frederics algorithm, shower_number_eventb gives NOT -999 as for a BG track,
3390  // but "0". So we need to distinguish also for "0" cases:
3392  if (shower_number_eventb==0) show ->SetMC(-999,999);
3393 
3394  // To Have unique profile histograms in the memory:
3395  // show = new EdbShowerP(0,eRecoShowerArrayN,shower_sizeb);
3396 
3397  //cout << "------------------- shower_tagprimary[0] shower_tagprimary[shower_sizeb-1] " << shower_tagprimary[0] << " " << shower_tagprimary[shower_sizeb-1] << endl;
3398 
3399  // Loop over shower Entries (==different basetracks):
3400  for (int j=0; j<shower_sizeb; ++j) {
3401 
3402  // Keep Notice of the order!!!
3403  // shower_tagprimary has to be added first!!
3404  // temporary solution: if that is not the case as below, no segment will be added....
3405  // ...
3406  if (shower_tagprimary[0]!=1) continue;
3407 
3408  // int id, float x, float y, float tx, float ty, float w = 0, int flag = 0
3409  showseg = new EdbSegP(j,shower_xb[j],shower_yb[j],shower_txb[j],shower_tyb[j],shower_ntrace2simub[j],0);
3410 
3411  showseg->SetZ(shower_zb[j]);
3412  showseg->SetChi2(shower_chi2btkb[j]);
3413  showseg->SetP(shower_ntrace3simub[j]);
3414  showseg->SetFlag(shower_ntrace4simub[j]);
3416  // For Frederics algorithm, ntrace1simub gives NOT -999 as for a BG track,
3417  // but "0". So we need to distinguish also for "0" cases:
3418  if (shower_ntrace1simub[j]==0) showseg->SetMC(-999,-999);
3419 
3420  showseg->SetPID(shower_plateb[j]);
3421  // in real data plateb is 57 for emulsion 57...(sim may be different, depending on orfeo...)
3422  showseg->SetID(shower_idb[j]);
3423  showseg->SetProb(1);
3424 
3425  //showseg->Print();
3426 
3427  show->AddSegment(showseg);
3428  } // Loop over shower Entries (==different basetracks):
3429 
3430 
3431  // This ID should be unique!
3432  // (Means every shower has one different!)
3433  show->SetID(nenttotalcount);
3434  nenttotalcount++;
3435 
3436  show->Update();
3437  //cout << "EdbShowRec::Treebranch_To_RecoShowerArray show->PrintNice(); ... done." << endl;
3438 
3439  // Add Shower Object to Shower Reco Array.
3440  // Not, if its empty,
3441  // Not, if its containing only one BT:
3442  if (show->N()>1) {
3443  showarray->Add(show);
3445  //cout << "EdbShowRec::Treebranch_To_RecoShowerArray showarray->Add(show) ... done." << endl;
3446  }
3447 
3448  if (gEDBDEBUGLEVEL>3) show->PrintBasics();
3449 
3450  }// Loop over Tree Entries (==different showers):
3451 
3452 
3453 
3454  eShowerTree->Show(0);
3455  eShowerTree->Show(nent-1);
3456 
3457  cout << "EdbShowRec::Treebranch_To_RecoShowerArray Loop over Tree Entries (==different showers) done." << endl;
3458  cout << "EdbShowRec::Treebranch_To_RecoShowerArray showarray->N()" << showarray->GetEntries() <<endl;
3459  SetRecoShowerArrayN(showarray->GetEntries());
3460 
3461 
3462  Log(2,"EdbShowRec::Treebranch_To_RecoShowerArray","EdbShowRec::Do now Write_RecoShowerArray....");
3463  Write_RecoShowerArray(showarray);
3464 
3465  Log(2,"EdbShowRec::Treebranch_To_RecoShowerArray","EdbShowRec::Treebranch_To_RecoShowerArray...done.");
3466  return;
3467 }
void SetPID(int pid)
Definition: EdbSegP.h:126
void SetProb(float prob)
Definition: EdbSegP.h:131
void SetID(int id)
Definition: EdbSegP.h:125
void SetZ(float z)
Definition: EdbSegP.h:122
void SetChi2(float chi2)
Definition: EdbSegP.h:132
void SetP(float p)
Definition: EdbSegP.h:130
void SetMC(int mEvt, int mTrack)
Definition: EdbSegP.h:138
void SetFlag(int flag)
Definition: EdbSegP.h:127
void AddSegment(EdbSegP *s)
Definition: EdbShowerP.cxx:299
void Update()
Definition: EdbShowerP.cxx:975

◆ TxtToRecoShowerArray() [1/2]

void EdbShowRec::TxtToRecoShowerArray ( )
2353 {
2354  Log(2,"EdbShowRec::TxtToRecoShowerArray","EdbShowRec::TxtToRecoShowerArray");
2355 
2356  cout << "EdbShowRec::TxtToRecoShowerArray Reading a txt file with a list of segments"<<endl;
2357  cout << "EdbShowRec::TxtToRecoShowerArray There are different ways of reading segment list:"<<endl;
2358  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2359  cout << "EdbShowRec::TxtToRecoShowerArray 0) Simple Style:"<<endl;
2360  cout << "EdbShowRec::TxtToRecoShowerArray 0) X Y Z TX TY"<<endl;
2361  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2362  cout << "EdbShowRec::TxtToRecoShowerArray 1) EdaStyle:"<<endl;
2363  cout << "EdbShowRec::TxtToRecoShowerArray 1) ID PL PH X Y TX TY 0 :"<<endl;
2364  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2365  cout << "EdbShowRec::TxtToRecoShowerArray 2) __Official__ (18.05.2010) Feedback Style:"<<endl;
2366  cout << "EdbShowRec::TxtToRecoShowerArray 2) // VID X Y Z 1ry charm tau Ndw Nup OutOfBrick :"<<endl;
2367  cout << "EdbShowRec::TxtToRecoShowerArray 2) // tid v1 v2 x y z tx ty ip1 ip2 p pmin pmax mn pa sb dk of ps n RmaxT RmaxL rmsT rmsL pl1 pl2 res:"<<endl;
2368  cout << "EdbShowRec::TxtToRecoShowerArray 2) // ipl x y z tx ty type irec ngrains:"<<endl;
2369  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2370  cout << "EdbShowRec::TxtToRecoShowerArray 3) NagoyaTxtStyle:"<<endl;
2371  cout << "EdbShowRec::TxtToRecoShowerArray 3) PL (NG-order) TX TY X Y Z ID W (NG-style)"<<endl;
2372  cout << endl;
2373 
2374  Log(2,"EdbShowRec::TxtToRecoShowerArray","EdbShowRec::TxtToRecoShowerArray...done.");
2375 }

◆ TxtToRecoShowerArray() [2/2]

void EdbShowRec::TxtToRecoShowerArray ( TString  TxtFileName,
Int_t  TxtFileType 
)
2381 {
2382  Log(2,"EdbShowRec::TxtToRecoShowerArray","EdbShowRec::TxtToRecoShowerArray");
2383 
2384  cout << "EdbShowRec::TxtToRecoShowerArray Reading a txt file with a list of segments"<<endl;
2385  cout << "EdbShowRec::TxtToRecoShowerArray There are different ways of reading segment list:"<<endl;
2386  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2387  cout << "EdbShowRec::TxtToRecoShowerArray 0) Simple Style:"<<endl;
2388  cout << "EdbShowRec::TxtToRecoShowerArray 0) X Y Z TX TY"<<endl;
2389  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2390  cout << "EdbShowRec::TxtToRecoShowerArray 1) EdaStyle:"<<endl;
2391  cout << "EdbShowRec::TxtToRecoShowerArray 1) ID PL PH X Y TX TY 0 :"<<endl;
2392  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2393  cout << "EdbShowRec::TxtToRecoShowerArray 2) __Official__ (18.05.2010) Feedback Style:"<<endl;
2394  cout << "EdbShowRec::TxtToRecoShowerArray 2) // VID X Y Z 1ry charm tau Ndw Nup OutOfBrick :"<<endl;
2395  cout << "EdbShowRec::TxtToRecoShowerArray 2) // tid v1 v2 x y z tx ty ip1 ip2 p pmin pmax mn pa sb dk of ps n RmaxT RmaxL rmsT rmsL pl1 pl2 res:"<<endl;
2396  cout << "EdbShowRec::TxtToRecoShowerArray 2) // ipl x y z tx ty type irec ngrains:"<<endl;
2397  cout << "EdbShowRec::TxtToRecoShowerArray"<<endl;
2398  cout << "EdbShowRec::TxtToRecoShowerArray 3) NagoyaTxtStyle:"<<endl;
2399  cout << "EdbShowRec::TxtToRecoShowerArray 3) PL (NG-order) TX TY X Y Z ID W (NG-style)"<<endl;
2400  cout << endl;
2401  cout << "EdbShowRec::TxtToRecoShowerArray TxtFileType = "<< TxtFileType << endl;
2402 
2403  switch (TxtFileType)
2404  {
2405  case 0:
2406  cout << "READ 0) Simple Style." << endl;
2407  TxtToRecoShowerArray_SimpleList(TxtFileName);
2408  break;
2409 
2410  case 1:
2411  cout << "READ 1) EdaStyle." << endl;
2412  TxtToRecoShowerArray_EDAList(TxtFileName);
2413  break;
2414 
2415  case 2:
2416  cout << "READ 2) __Official__ (18.05.2010) Feedback Style." << endl;
2417  TxtToRecoShowerArray_FeedBack(TxtFileName);
2418  break;
2419 
2420  case 3:
2421  cout << "READ 3) NagoyaTxtStyle." << endl;
2423  break;
2424 
2425  default:
2426  cout << "DO NOTHING!" << endl;
2427  }
2428  Log(2,"EdbShowRec::TxtToRecoShowerArray","EdbShowRec::TxtToRecoShowerArray...done.");
2429 }
void TxtToRecoShowerArray_FeedBack(TString TxtFileName)
Definition: EdbShowRec.cxx:2434
void TxtToRecoShowerArray_SimpleListNagoya(TString TxtFileName)
Definition: EdbShowRec.cxx:2790
void TxtToRecoShowerArray_SimpleList(TString TxtFileName)
Definition: EdbShowRec.cxx:2578
void TxtToRecoShowerArray_EDAList(TString TxtFileName)
Definition: EdbShowRec.cxx:2667

◆ TxtToRecoShowerArray_EDAList()

void EdbShowRec::TxtToRecoShowerArray_EDAList ( TString  TxtFileName)
2668 {
2669  // Copied the skeleton from Ariga-San code from EdbEDAIO class,
2670  // and took out some unnnecessary stuff...
2671  // Read simple list file format (originally sent by Napoli People.).
2672 
2673  Log(2,"EdbShowRec::TxtToRecoShowerArray_EDAList","EdbShowRec::TxtToRecoShowerArray_EDAList");
2674 
2675 
2676  cout << "// Copied the skeleton from Ariga-San code from EdbEDAIO class,"<<endl;
2677  cout << "// and took out some unnnecessary stuff..."<<endl;
2678  cout << "// Read EDA list file format."<<endl;
2679 
2680  TObjArray* array=new TObjArray();
2681  EdbShowerP* shower= new EdbShowerP();
2682 
2683  int segID=0;
2684  int shID=0;
2685 
2686  const char* filename=TxtFileName.Data();//"shower_test.txt";
2687  if (NULL==filename) return;
2688  FILE *fp = fopen(filename,"r");
2689  if (fp==NULL) {
2690  Log(2,"EdbShowRec::TxtToRecoShowerArray_EDAList","EdbShowRec::File open error.");
2691  return;
2692  }
2693  char buf[256];
2694  while (fgets(buf,sizeof(buf),fp)) {
2695  TString line=buf;
2696  printf("%s", line.Data());
2697 
2698  // Remove comments
2699  line.ReplaceAll("\t"," ");
2700  int iposcmt = line.Index("//");
2701  if (iposcmt!=kNPOS) line.Remove(iposcmt, line.Length()-iposcmt);
2702 
2703  // Check number of columns.
2704  TObjArray *tokens = line.Tokenize(" ");
2705  int ntokens = tokens->GetEntries();
2706  delete tokens;
2707  printf("tokens %d \n",ntokens);
2708  if (ntokens==0) continue;
2709 
2710  else if ( ntokens == 8 || ntokens == 9 ) {
2711  // Segments list in the EDA format:
2712  // 999 47 18 91391.7 38782.4 -0.0201 -0.0603 0 DUMMY
2713  // ID PL PH X Y TX TY 0 DUMMY
2714  float x,y,z,ax,ay;
2715  int id,pl,w,dummy;
2716  if (ntokens == 8) sscanf(line.Data(),"%d %d %d %f %f %f %f %d", &id, &pl, &w, &x, &y, &ax, &ay, &dummy); // for ntokens == 8
2717  if (ntokens == 9) sscanf(line.Data(),"%d %d %d %f %f %f %f %d %d", &id, &pl, &w, &x, &y, &ax, &ay, &dummy, &dummy); // for ntokens == 9
2718  EdbSegP *s = new EdbSegP(id,x,y,ax,ay,0,0);
2719  // s->SetZ(z); // no z info in this kind of format.
2720  // z in eda format:
2721  // pl57 == z=0
2722  // pl1 == z=-72800
2723  z=0+(pl-57)*1300;
2724  s->SetZ(z);
2725  s->SetPID(pl);
2726  s->SetPlate(pl);
2727  s->SetW(w);
2728  s->SetChi2(0.0001); // Artificially
2729  s->SetErrors();
2730  //s->PrintNice();
2731  shower->AddSegment(s);
2732  ++segID;
2733  }
2734 
2735  else if ( ntokens == 11 ) {
2736  // Segments list in the EDA format:
2737  // 200 22 200 50 93345.2 39320.9 -47700.9 -0.0474 0.0100 0.00 0
2738  // ID PL ID PH X Y Z TX TY Chi2 DUMMY
2739  float x,y,z,ax,ay;
2740  int id,pl,w,dummy;
2741  sscanf(line.Data(),"%d %d %d %d %f %f %f %f %f %d %d", &id, &pl, &id, &w, &x, &y, &z, &ax, &ay, &dummy, &dummy); // for ntokens == 11
2742  EdbSegP *s = new EdbSegP(id,x,y,ax,ay,0,0);
2743  // s->SetZ(z); // no z info in this kind of format.
2744  // Here (ntokens == 11) z info is written
2745  // z in eda format:
2746  // pl57 == z=0
2747  // pl1 == z=-72800
2748  // z=0+(pl-57)*1300;
2749  s->SetZ(z);
2750  s->SetPID(pl);
2751  s->SetPlate(pl);
2752  s->SetW(w);
2753  s->SetChi2(0.0001); // Artificially
2754  s->SetErrors();
2755  //s->PrintNice();
2756  shower->AddSegment(s);
2757  ++segID;
2758  }
2759 
2760  else {
2761  // Add new shower in case the file has any line that doesnt match....
2762  // (yes, very simple statement).
2763  // First put old shower into array:
2764  //shower->PrintNice();
2765  array->Add(shower);
2766  // Then create new shower.
2767  ++shID;
2768  EdbShowerP* shower= new EdbShowerP();
2769  shower->SetID(shID);
2770  }
2771  // Next Line.
2772  }
2773  fclose(fp);
2774 
2775  // Add last shower
2776  //shower->PrintNice();
2777  array->Add(shower);
2778 
2779  cout << "EdbShowRec::TxtToRecoShowerArray_EDAList array->GetEntries() " << array->GetEntries() << endl;
2780 
2781  // Hand over array to the eRecoShowerArray:
2782  // (eRecoShowerArrayN is automatically adapted in SetRecoShowerArray().)
2783  SetRecoShowerArray(array);
2784 
2785  Log(2,"EdbShowRec::TxtToRecoShowerArray_EDAList","EdbShowRec::TxtToRecoShowerArray_EDAList...done");
2786 }
void SetErrors()
Definition: EdbSegP.h:89
void SetW(float w)
Definition: EdbSegP.h:129
void SetPlate(int plateid)
Definition: EdbSegP.h:139
string filename
Definition: emthickness.cpp:34
Int_t dummy
Definition: merge_Energy_SytematicSources_Electron.C:7
void w(int rid=2, int nviews=2)
Definition: test.C:27

◆ TxtToRecoShowerArray_FeedBack()

void EdbShowRec::TxtToRecoShowerArray_FeedBack ( TString  TxtFileName)
2435 {
2436  Log(2,"EdbShowRec::TxtToRecoShowerArray_FeedBack","TxtToRecoShowerArray_FeedBack");
2437  Log(2,"EdbShowRec::TxtToRecoShowerArray_FeedBack","TxtToRecoShowerArray_FeedBack...done");
2438  // Copied the skeleton from Ariga-San code from EdbEDAIO class,
2439  // and took out some unnnecessary stuff...
2440  // Read feedback file format (ver 2009 Oct).
2441  // For the showers read only track-segment list...
2442 
2443  cout << "// Copied the skeleton from Ariga-San code from EdbEDIO class,"<<endl;
2444  cout << "// and took out some unnnecessary stuff..."<<endl;
2445  cout << "// Read feedback file format (ver 2009 Oct)."<<endl;
2446  cout << "// For the showers read only track-segment list..."<<endl;
2447 
2448  const char *filename = TxtFileName.Data();
2449 
2450  Log(2,"EdbShowRec::TxtToRecoShowerArray_FeedBack","File to be opened = %s",filename);
2451 // filename = "ds.feedback";
2452 
2453  if (NULL==filename) {
2454  Log(2,"EdbShowRec::TxtToRecoShowerArray_FeedBack","EdbShowRec::File open error. Filename wrong. Return.");
2455  return;
2456  }
2457 
2458  FILE *fp = fopen(filename,"rt");
2459  if (fp==NULL) {
2460  Log(2,"EdbShowRec::TxtToRecoShowerArray_FeedBack","EdbShowRec::File open error. File not there (?). Return.");
2461  return;
2462  }
2463 
2464 
2465 
2466  EdbPVRec *pvr = new EdbPVRec;
2467  EdbScanCond cond;
2468  EdbTrackP *t=0;
2469 
2470  char buf[256];
2471 
2472  while (fgets(buf,sizeof(buf),fp)) {
2473  TString line=buf;
2474  //printf("%s", line.Data());
2475 
2476  // track comment = ""
2477  if (line.Contains("track comment")) {
2478  int istart = line.Index("\"");
2479  int iend = line.Index("\"",1,istart+1, TString::kExact);
2480  if (istart!=kNPOS && iend!=kNPOS && istart+1!=iend) {
2481  char buf[256];
2482  strncpy(buf, line.Data()+istart+1, iend-istart-1);
2483  buf[iend-istart-1]='\0';
2484  //tx->AddText(buf);
2485  }
2486  }
2487 
2488  if (line.Contains("Area information :")) {
2489  continue; // this we dont need here.
2490  }
2491  if (line.Contains(Form("area"))) {
2492  continue; // this we dont need here.
2493  }
2494 
2495  // Remove comments
2496  line.ReplaceAll("\t"," ");
2497  int iposcmt = line.Index("//");
2498  if (iposcmt!=kNPOS) line.Remove(iposcmt, line.Length()-iposcmt);
2499 
2500  // Check number of columns.
2501  TObjArray *tokens = line.Tokenize(" ");
2502  int ntokens = tokens->GetEntries();
2503  delete tokens;
2504  printf("tokens %d \n",ntokens);
2505 
2506  if (ntokens==0) continue;
2507 
2508  else if ( ntokens == 10 ) {
2509  // Vertices
2510  float x,y,z;
2511  int id,isprimary,istau, ischarm;
2512  sscanf(line.Data(),"%d %f %f %f %d %d %d", &id, &x, &y, &z, &isprimary, &ischarm, &istau);
2513  EdbVertex *v = new EdbVertex();
2514  v->SetXYZ(x,y,z);
2515  v->SetID(id);
2516  // Add Vertex to pvr object.
2517  pvr->AddVertex(v);
2518  printf("Vertex %d %f %f %f\n",v->ID(), v->X(), v->Y(), v->Z());
2519  }
2520 
2521  else if ( ntokens == 27 ) {
2522  // Tracks
2523  float x,y,z,ax,ay, ip_upvtx, ip_downvtx, p,pmin,pmax;
2524  int id_track, id_upvtx, id_downvtx, manual, particle_id, scanback, darkness;
2525  int OutOfBrick, LastPlate, nseg, iplRmax1, iplRmax2, result;
2526  float RmaxT, RmaxL, rmst, rmsl;
2527 
2528  int n,nn;
2529  sscanf(line.Data(), "%d %d %d %f %f %f %f %f %f%n", &id_track, &id_upvtx, &id_downvtx, &x, &y, &z, &ax, &ay, &ip_upvtx, &nn);
2530  sscanf(line.Data()+(n=nn), "%f %f %f %f %d %d %d %d %d%n", &ip_downvtx, &p,&pmin,&pmax, &manual, &particle_id, &scanback, &darkness, &OutOfBrick, &nn);
2531  sscanf(line.Data()+(n+=nn), "%d %d %f %f %f %f %d %d %d", &LastPlate, &nseg, &RmaxT, &RmaxL, &rmst, &rmsl, &iplRmax1, &iplRmax2, &result);
2532 
2533  // Create Track. "t" is defined out of main loop.
2534  t = new EdbTrackP;
2535  t->Set(id_track, x, y, ax, ay, 0, 0);
2536  t->SetZ(z);
2537  t->SetTrack(id_track);
2538  t->SetErrors();
2539  // Add Track to pvr object.
2540  pvr->AddTrack(t);
2541  }
2542 
2543  else if ( ntokens == 9 ) {
2544  // Segments
2545  int ipl, type, irec, ph;
2546  float x,y,z,ax,ay;
2547  sscanf(line.Data(),"%d %f %f %f %f %f %d %d %d", &ipl, &x, &y, &z, &ax, &ay, &type, &irec, &ph);
2548 // 552 1 -1 10206.1 70129.5 -38891.2 -0.0610 0.1518 7.76 -1.0 1.54 1.09 2.7 0 0 0 0
2549  EdbSegP *s = new EdbSegP(t->ID(),x,y,ax,ay,0,0);
2550  s->SetZ(z);
2551  s->SetPID(ipl);
2552  s->SetPlate(ipl);
2553  s->SetW(ph);
2554  s->SetTrack(t->ID());
2555  //s->SetSide(type);
2556  s->SetErrors();
2557 
2558  t->AddSegment(s);
2559  pvr->AddSegment(*s);
2560  }
2561  }
2562 
2563  for (Int_t i=0; i<pvr->Npatterns(); ++i) pvr->GetPattern(i)->SetPID(i);
2564  for (Int_t i=0; i<pvr->Npatterns(); ++i) pvr->GetPattern(i)->SetSegmentsPID();
2565 
2566  printf("\nEdbPVRec summary. %d vertices, %d tracks.\n", pvr->Nvtx(), pvr->Ntracks());
2567  pvr->Print();
2568 
2569  fclose(fp);
2570 
2571 
2572  Log(2,"EdbShowRec::TxtToRecoShowerArray_FeedBack","EdbShowRec::TxtToRecoShowerArray_FeedBack...done.");
2573  return;
2574 }
Definition: EdbPVRec.h:148
Int_t Ntracks() const
Definition: EdbPVRec.h:203
void AddVertex(EdbVertex *vtx)
Definition: EdbPVRec.h:251
Int_t Nvtx() const
Definition: EdbPVRec.h:255
EdbSegP * AddSegment(EdbSegP &s)
Definition: EdbPVRec.cxx:2921
void AddTrack(EdbTrackP *track)
Definition: EdbPVRec.h:246
void SetSegmentsPID()
Definition: EdbPattern.cxx:1548
void SetPID(int pid)
Definition: EdbPattern.h:319
void Print() const
Definition: EdbPattern.cxx:1853
Definition: EdbScanCond.h:10
void SetTrack(int trid)
Definition: EdbSegP.h:128
Int_t ID() const
Definition: EdbVertex.h:126
Float_t X() const
Definition: EdbVertex.h:130
void SetID(int ID=0)
Definition: EdbVertex.h:156
Float_t Y() const
Definition: EdbVertex.h:131
p
Definition: testBGReduction_AllMethods.C:8

◆ TxtToRecoShowerArray_SimpleList()

void EdbShowRec::TxtToRecoShowerArray_SimpleList ( TString  TxtFileName)
2579 {
2580  Log(2,"EdbShowRec::TxtToRecoShowerArray_SimpleList","EdbShowRec::TxtToRecoShowerArray_SimpleList");
2581  // Copied the skeleton from Ariga-San code from EdbEDAIO class,
2582  // and took out some unnnecessary stuff...
2583  // Read simple list file format (originally sent by Napoli People.).
2584 
2585  cout << "// Copied the skeleton from Ariga-San code from EdbEDAIO class,"<<endl;
2586  cout << "// and took out some unnnecessary stuff..."<<endl;
2587  cout << "// Read simple lsit file format (originally sent by Napoli People.)."<<endl;
2588 
2589  TObjArray* array=new TObjArray();
2590  EdbShowerP* shower= new EdbShowerP();
2591 
2592  int segID=0;
2593  int shID=0;
2594 
2595  const char* filename=TxtFileName.Data();//"shower_test.txt";
2596  if (NULL==filename) return;
2597  FILE *fp = fopen(filename,"r");
2598  if (fp==NULL) {
2599  Log(2,"EdbShowRec::TxtToRecoShowerArray_SimpleList","EdbShowRec::File open error.");
2600  return;
2601  }
2602  char buf[256];
2603  while (fgets(buf,sizeof(buf),fp)) {
2604  TString line=buf;
2605  printf("%s", line.Data());
2606 
2607  // Remove comments
2608  line.ReplaceAll("\t"," ");
2609  int iposcmt = line.Index("//");
2610  if (iposcmt!=kNPOS) line.Remove(iposcmt, line.Length()-iposcmt);
2611 
2612  // Check number of columns.
2613  TObjArray *tokens = line.Tokenize(" ");
2614  int ntokens = tokens->GetEntries();
2615  delete tokens;
2616  printf("tokens %d \n",ntokens);
2617  if (ntokens==0) continue;
2618 
2619  else if ( ntokens == 5 ) {
2620  // Segments list in the format:
2621  // 91460.5 40155.50 36646.02 -0.0618 0.0214
2622  // X Y Z TX TY
2623  float x,y,z,ax,ay;
2624  sscanf(line.Data(),"%f %f %f %f %f", &x, &y, &z, &ax, &ay);
2625  EdbSegP *s = new EdbSegP(segID,x,y,ax,ay,0,0);
2626  s->SetZ(z);
2627  s->SetPID(abs(z)/1300);
2628  s->SetPlate(abs(z)/1300);
2629  s->SetW(50); // Artificially
2630  s->SetChi2(0.0001); // Artificially
2631  s->SetErrors();
2632  s->PrintNice();
2633  shower->AddSegment(s);
2634  ++segID;
2635  }
2636 
2637  else {
2638  // Add new shower in case the file has any line that doesnt match....
2639  // (yes, very simple statement).
2640  // First put old shower into array:
2641  //shower->PrintNice();
2642  array->Add(shower);
2643  // Then create new shower.
2644  ++shID;
2645  EdbShowerP* shower= new EdbShowerP();
2646  shower->SetID(shID);
2647  }
2648  // Next Line.
2649  }
2650  fclose(fp);
2651 
2652  // Add last shower
2653  //shower->PrintNice();
2654  array->Add(shower);
2655 
2656  cout << "EdbShowRec::TxtToRecoShowerArray_SimpleList array->GetEntries() " << array->GetEntries() << endl;
2657 
2658  // Hand over array to the eRecoShowerArray:
2659  // (eRecoShowerArrayN is automatically adapted in SetRecoShowerArray().)
2660  SetRecoShowerArray(array);
2661 
2662  Log(2,"EdbShowRec::TxtToRecoShowerArray_SimpleList","EdbShowRec::TxtToRecoShowerArray_SimpleList...done");
2663 }

◆ TxtToRecoShowerArray_SimpleListNagoya()

void EdbShowRec::TxtToRecoShowerArray_SimpleListNagoya ( TString  TxtFileName)
2791 {
2792 
2793  // Copied the skeleton from Ariga-San code from EdbEDAIO class,
2794  // and took out some unnnecessary stuff...
2795  // Read simple list file format (originally sent by Napoli People.).
2796  Log(2,"EdbShowRec::TxtToRecoShowerArray_SimpleListNagoya","EdbShowRec::TxtToRecoShowerArray_SimpleListNagoya");
2797 
2798 
2799  cout << "// Copied the skeleton from Ariga-San code from EdbEDAIO class,"<<endl;
2800  cout << "// and took out some unnnecessary stuff..."<<endl;
2801  cout << "// Read simple lsit file format (originally sent by Nagoya People.)."<<endl;
2802 
2803  TObjArray* array=new TObjArray();
2804  EdbShowerP* shower= new EdbShowerP();
2805 
2806  int segID=0;
2807  int shID=0;
2808 
2809  const char* filename=TxtFileName.Data();//"shower_test.txt";
2810  if (NULL==filename) return;
2811  FILE *fp = fopen(filename,"r");
2812  if (fp==NULL) {
2813  Log(2,"EdbShowRec::TxtToRecoShowerArray_SimpleListNagoya","EdbShowRec::File open error.");
2814  return;
2815  }
2816  char buf[256];
2817  while (fgets(buf,sizeof(buf),fp)) {
2818  TString line=buf;
2819  printf("%s", line.Data());
2820 
2821  // Remove comments
2822  line.ReplaceAll("\t"," ");
2823  int iposcmt = line.Index("//");
2824  if (iposcmt!=kNPOS) line.Remove(iposcmt, line.Length()-iposcmt);
2825 
2826  // Check number of columns.
2827  TObjArray *tokens = line.Tokenize(" ");
2828  int ntokens = tokens->GetEntries();
2829  delete tokens;
2830  printf("tokens %d \n",ntokens);
2831  if (ntokens==0) continue;
2832 
2833  else if ( ntokens == 8 ) {
2834  // Segments list in the format:
2835 // $1 : plate (Nagoya plate#)
2836 // $2 : ax (ax,ay,x,y,z)
2837 // $3 : ay
2838 // $4 : x
2839 // $5 : y
2840 // $6 : z
2841 // $7 : BaseTrackID (scan data)
2842 // $8 : PH (scan data)
2843  // 15 -0.0537 0.0313 91575.5 38876.6 54339 5337769 240059
2844  float x,y,z,ax,ay;
2845  int id,pid,w;
2846  sscanf(line.Data(),"%d %f %f %f %f %f %d %d", &pid, &ax, &ay, &x, &y, &z, &id,&w);
2847  EdbSegP *s = new EdbSegP(id,x,y,ax,ay,0,0);
2848  s->SetZ(z);
2849  s->SetPID(58-pid); // nagoya pid is labelled reversely!
2850  s->SetPlate(58-pid); // nagoya pid is labelled reversely!
2851  s->SetW(int(w/10000));
2852  s->SetChi2(0.0001); // Artificially
2853  s->SetErrors();
2854  //s->PrintNice();
2855  shower->AddSegment(s);
2856  ++segID;
2857  }
2858 
2859  else {
2860  // Add new shower in case the file has any line that doesnt match....
2861  // (yes, very simple statement).
2862  // First put old shower into array:
2863  //shower->PrintNice();
2864  array->Add(shower);
2865  // Then create new shower.
2866  ++shID;
2867  EdbShowerP* shower= new EdbShowerP();
2868  shower->SetID(shID);
2869  }
2870  // Next Line.
2871  }
2872  fclose(fp);
2873 
2874  // Add last shower
2875  //shower->PrintNice();
2876  array->Add(shower);
2877 
2878  cout << "EdbShowRec::TxtToRecoShowerArray_SimpleListNagoya array->GetEntries() " << array->GetEntries() << endl;
2879 
2880  // Hand over array to the eRecoShowerArray:
2881  // (eRecoShowerArrayN is automatically adapted in SetRecoShowerArray().)
2882  SetRecoShowerArray(array);
2883 
2884  Log(2,"EdbShowRec::TxtToRecoShowerArray_SimpleListNagoya","EdbShowRec::TxtToRecoShowerArray_SimpleListNagoya...done");
2885 }
int pid[1000]
Definition: m2track.cpp:13

◆ Update()

void EdbShowRec::Update ( )
inline
532  {
533  cout << "EdbShowRec::Update ONLY showers!"<< endl;
534  for (int i=0; i<GetRecoShowerArrayN(); ++i) GetShower(i)->Update();
535  }
EdbShowerP * GetShower(Int_t i) const
Definition: EdbShowRec.h:475

◆ UpdateX()

void EdbShowRec::UpdateX ( )
inline
536  {
537  cout << "EdbShowRec::Update all showers and build their parametrisations!"<< endl;
538  for (int i=0; i<GetRecoShowerArrayN(); ++i) GetShower(i)->UpdateX();
539  }
void UpdateX()
Definition: EdbShowerP.cxx:1000

◆ Write_RecoShowerArray()

void EdbShowRec::Write_RecoShowerArray ( TObjArray *  RecoShowerArray)
private

Write Reconstructed Showers to File:

1764 {
1765 
1766  Log(2,"EdbShowRec::Write_RecoShowerArray()","Write the array of reconstructed showers to a TTree");
1767  if (!eWriteFileShower) {
1768  Log(2,"EdbShowRec::Write_RecoShowerArray()","WARNING: eWriteFileShower = %d. Will not write. Return.", eWriteFileShower );
1769  return;
1770  }
1771 
1772  TFile* file= new TFile(eFilename_Out_shower,"RECREATE");
1773  TTree* tree= new TTree("treeArrayEdbShowerP","treeArrayEdbShowerP");
1774 
1775  EdbShowerP* shower=0;
1776  tree->Branch("shower","EdbShowerP",&shower,128000);
1777 
1778  int nbyte;
1779  for (int itr=0; itr<RecoShowerArray->GetEntries(); itr++) {
1780  Log(3,"EdbShowRec::Write_RecoShowerArray()","Doing entry %d.", itr );
1781  shower=(EdbShowerP*)RecoShowerArray->At(itr);
1782  //shower->PrintNice();
1783  Log(3,"EdbShowRec::Write_RecoShowerArray()","Do tree->Fill.");
1784  nbyte=tree->Fill();
1785  }
1786 
1787  Log(2,"EdbShowRec::Write_RecoShowerArray()","tree->Fill loop done.");
1788 
1789  tree->Print();
1790  cout << " tree->GetEntries() " << tree->GetEntries() << endl;
1791  tree->Write();
1792  cout << " tree->Write() done." << endl;
1793  file->Close();
1794  cout << " file->Close() done." << endl;
1795 
1796  delete file;
1797  file=0;
1798 
1799  Log(2,"EdbShowRec::Write_RecoShowerArray()","Write the array of reconstructed showers to a TTree...done.");
1800  return;
1801 }

◆ WriteParametrisation_AS()

void EdbShowRec::WriteParametrisation_AS ( )

void WriteParametrisation_PP(); //6

4682  {
4683 
4684  Log(2,"EdbShowRec::WriteParametrisation_AS()","WriteParametrisation_AS()");
4685 
4687  cout << "EdbShowRec::WriteParametrisation_AS WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4688  return;
4689  }
4690 
4691  Log(2,"EdbShowRec::WriteParametrisation_AS()","Writing Tree in eFilename_Out_treebranch = ");
4692  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4693  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4694 
4695  if (!eFile_Out_treebranch) {
4696  Log(2,"EdbShowRec::WriteParametrisation_AS()","Creating new eFile_Out_treebranch.");
4697  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4698  }
4699  else {
4700  Log(2,"EdbShowRec::WriteParametrisation_AS()","Open existing eFile_Out_treebranch.");
4701  cout << "EdbShowRec::WriteParametrisation_AS() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4702  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4703  }
4704 
4705  // Go into file (if necessary)
4706  eFile_Out_treebranch->cd();
4707 
4708  TString targettreename="Para_AS";
4709 
4710 
4711  Int_t nseg;
4712  Double_t edIP[50];
4713  Double_t edMin[50];
4714  Double_t edRLong[50];
4715  Double_t edRTrans[50];
4716  Double_t edeltarb[50];
4717  Double_t edeltathetab[50];
4718 
4719  TTree* treevar=0;
4720  if (!treevar) treevar = new TTree(targettreename,targettreename);
4721  treevar->Branch("nseg",&nseg,"nseg/I");
4722  treevar->Branch("edIP",edIP,"edIP[50]/D");
4723  treevar->Branch("edMin",edMin,"edMin[50]/D");
4724  treevar->Branch("edRLong",edRLong,"edRLong[50]/D");
4725  treevar->Branch("edRTrans",edRTrans,"edRTrans[50]/D");
4726  treevar->Branch("edeltarb",edeltarb,"edeltarb[50]/D");
4727  treevar->Branch("edeltathetab",edeltathetab,"edeltathetab[50]/D");
4728 
4729  EdbShowerP* show=0;
4730  EdbShowerP::Para_AS para_AS;
4731 
4732  // Check for first shower if desired parametrisation was already done:
4733  show=(EdbShowerP*)eRecoShowerArray->At(0);
4734  Bool_t ToDoPara= show->GetParametrisationIsDone(7); // AS==7
4735  cout << "EdbShowRec::WriteParametrisation_AS() show->GetParametrisationIsDone(7): " << ToDoPara << endl;
4736  if (!ToDoPara) {
4737  cout << "EdbShowRec::WriteParametrisation_AS() Start Building BuildParametrisation(7);" << endl;
4738  }
4739 
4740 // return;
4741 //
4742  Int_t statuscounter=eRecoShowerArrayN/10;
4743 
4744  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4745  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4746 
4747  show=(EdbShowerP*)eRecoShowerArray->At(i);
4748  //if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(7) << endl;
4749 
4750  // Do parametrisation if necessary:
4751  if (!ToDoPara) {
4752  show->BuildParametrisation(7);
4753  //cout << "show->GetParametrisationIsDone(7) = " << show->GetParametrisationIsDone(7) << endl;
4754  }
4755 
4756  // Print it:
4757  if (gEDBDEBUGLEVEL>3) show->PrintParametrisation_AS();
4758 
4759  // Get it:
4760  para_AS=show->GetPara_AS();
4761 
4762  //Fill tree with values from parametrisation:
4763  nseg=para_AS.nseg;
4764  for (int j=0; j<50; j++) {
4765  edIP[j]=para_AS.edIP[j];
4766  edMin[j]=para_AS.edMin[j];
4767  edRLong[j]=para_AS.edRLong[j];
4768  edRTrans[j]=para_AS.edRTrans[j];
4769  edeltarb[j]=para_AS.edeltarb[j];
4770  edeltathetab[j]=para_AS.edeltathetab[j];
4771  }
4772 
4773  treevar->Fill();
4774  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4775  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4776 
4777 
4778  if (gEDBDEBUGLEVEL>3) {
4779  treevar->Print();
4780  }
4781 
4782  Log(2,"EdbShowRec::WriteParametrisation_AS()","Writing tree for para_AS parametrisation into file...");
4783 // treevar->Write();
4784  treevar->Write("",TObject::kWriteDelete);
4785  Log(2,"EdbShowRec::WriteParametrisation_AS()","Writing tree for para_AS parametrisation into file...done.");
4786 
4787  Log(2,"EdbShowRec::WriteParametrisation_AS()","Delete treevar...");
4788  delete treevar;
4789  treevar=0;
4790  Log(2,"EdbShowRec::WriteParametrisation_AS()","Delete treevar...done.");
4791 
4792 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4793  Log(2,"EdbShowRec::WriteParametrisation_AS()","WriteParametrisation_AS()...done.");
4794  return;
4795 }
Para_AS GetPara_AS() const
Definition: EdbShowerP.h:572
void PrintParametrisation_AS()
Definition: EdbShowerP.cxx:2577
Definition: EdbShowerP.h:235
Double_t edeltarb[50]
Definition: EdbShowerP.h:243
Int_t nseg
Definition: EdbShowerP.h:238
Double_t edeltathetab[50]
Definition: EdbShowerP.h:244
Double_t edIP[50]
Definition: EdbShowerP.h:239
Double_t edMin[50]
Definition: EdbShowerP.h:240
Double_t edRTrans[50]
Definition: EdbShowerP.h:242
Double_t edRLong[50]
Definition: EdbShowerP.h:241

◆ WriteParametrisation_ExtraInfo()

void EdbShowRec::WriteParametrisation_ExtraInfo ( )
4903  {
4904 
4905  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","WriteParametrisation_ExtraInfo()");
4906 
4908  cout << "EdbShowRec::WriteParametrisation_ExtraInfo WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4909  return;
4910  }
4911 
4912  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","Writing Tree in eFilename_Out_treebranch = ");
4913  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4914  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4915 
4916  if (!eFile_Out_treebranch) {
4917  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","Creating new eFile_Out_treebranch.");
4918  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4919  }
4920  else {
4921  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","Open existing eFile_Out_treebranch.");
4922  cout << "EdbShowRec::WriteParametrisation_ExtraInfo() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4923  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4924  }
4925 
4926 // Go into file (if necessary)
4927  eFile_Out_treebranch->cd();
4928 
4929  TString targettreename="Para_ExtraInfo";
4930  Float_t InBT_E; // InBT->P()
4931  Float_t InBT_Flag; // InBT->Flag()
4932  Float_t InPairBT_E; // In0BT->P()+In1BT->P() if sum of Flag() ==0 (photon=electron+positron); else identical to InBT_E
4933  Int_t ShowerLength; // npl() of the shower.
4934  Float_t InBT_IPToVtx; // IP from InBT to generic vertex. Commonly used: Vertex of G4 position vertex.
4935  Float_t InBT_DeltaZToVtx; // DeltaZ from InBT to generic vertex. Commonly used: Vertex of G4 position vertex.
4936 
4937 
4938  TTree* treevar=0;
4939  if (!treevar) treevar = new TTree(targettreename,targettreename);
4940  treevar->Branch("InBT_E",&InBT_E,"InBT_E/F");
4941  treevar->Branch("InBT_Flag",&InBT_Flag,"InBT_Flag/F");
4942  treevar->Branch("InPairBT_E",&InPairBT_E,"InPairBT_E/F");
4943  treevar->Branch("ShowerLength",&ShowerLength,"ShowerLength/I");
4944  treevar->Branch("InBT_IPToVtx",&InBT_IPToVtx,"InBT_IPToVtx/F");
4945  treevar->Branch("InBT_DeltaZToVtx",&InBT_DeltaZToVtx,"InBT_DeltaZToVtx/F");
4946 
4947  EdbShowerP* show=0;
4948  EdbShowerP::Para_ExtraInfo para_ExtraInfo;
4949 
4950  // Check for first shower if desired parametrisation was already done:
4951  show=(EdbShowerP*)eRecoShowerArray->At(0);
4952  Bool_t ToDoPara= kFALSE;
4953  Int_t statuscounter=eRecoShowerArrayN/10;
4954 
4955  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4956  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4957 
4958  show=(EdbShowerP*)eRecoShowerArray->At(i);
4959  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). GetExtraInfoIsDone IsDone?"<< show->GetExtraInfoIsDone(0) << endl;
4960 
4961  // Do parametrisation if necessary:
4962  if (!ToDoPara) show->BuildParametrisation_ExtraInfo();
4963 
4964  // Print it:
4966 
4967  // Get it:
4968  para_ExtraInfo=show->GetPara_ExtraInfo();
4969 
4970 
4971  InBT_E=para_ExtraInfo.InBT_E;
4972  InBT_Flag=para_ExtraInfo.InBT_Flag;
4973  ShowerLength=para_ExtraInfo.ShowerLength;
4974 
4975  InBT_IPToVtx=para_ExtraInfo.InBT_IPToVtx;
4976  InBT_DeltaZToVtx=para_ExtraInfo.InBT_DeltaZToVtx;
4977 
4978  treevar->Fill();
4979  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4980  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4981 
4982 
4983  if (gEDBDEBUGLEVEL>3) {
4984  treevar->Print();
4985  }
4986 
4987  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","Writing tree for para_ExtraInfo parametrisation into file...");
4988 // treevar->Write();
4989  treevar->Write("",TObject::kWriteDelete);
4990  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","Writing tree for para_ExtraInfo parametrisation into file...done.");
4991 
4992  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","Delete treevar...");
4993  delete treevar;
4994  treevar=0;
4995  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","Delete treevar...done.");
4996 
4997 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4998  Log(2,"EdbShowRec::WriteParametrisation_ExtraInfo()","WriteParametrisation_ExtraInfo()...done.");
4999  return;
5000 }
Bool_t GetExtraInfoIsDone(Int_t nr) const
Definition: EdbShowerP.h:587
void BuildParametrisation_ExtraInfo()
Definition: EdbShowerP.cxx:2217
Para_ExtraInfo GetPara_ExtraInfo() const
Definition: EdbShowerP.h:578
Definition: EdbShowerP.h:257
Float_t InBT_Flag
Definition: EdbShowerP.h:261
Float_t InBT_DeltaZToVtx
Definition: EdbShowerP.h:265
Float_t InBT_IPToVtx
Definition: EdbShowerP.h:264
Int_t ShowerLength
Definition: EdbShowerP.h:263
Float_t InBT_E
Definition: EdbShowerP.h:260

◆ WriteParametrisation_FJ()

void EdbShowRec::WriteParametrisation_FJ ( )
3956  {
3957 
3958  Log(2,"EdbShowRec::WriteParametrisation_FJ()","WriteParametrisation_FJ()");
3959 
3961  cout << "EdbShowRec::WriteParametrisation_FJ WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
3962  return;
3963  }
3964 
3965  // Steps for creating the file:
3966  // Because in root we have error messagens "Failed filling branch" we have to:
3967  // First step into the file and then create the Tree:
3968 
3969  Log(2,"EdbShowRec::WriteParametrisation_FJ()","Writing Tree in eFilename_Out_treebranch = ");
3970  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
3971  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
3972 
3973  if (!eFile_Out_treebranch) {
3974  Log(2,"EdbShowRec::WriteParametrisation_FJ()","Creating new eFile_Out_treebranch.");
3975  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
3976  }
3977  else {
3978  Log(2,"EdbShowRec::WriteParametrisation_FJ()","Open existing eFile_Out_treebranch.");
3979  cout << "EdbShowRec::WriteParametrisation_FJ() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
3980  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
3981  }
3982 
3983  // Go into file (if necessary)
3984  eFile_Out_treebranch->cd();
3985 
3986  TString targettreename="Para_FJ";
3987  Float_t ShowerAxisAngle;
3988  Float_t BT_deltaR_mean,BT_deltaR_rms,BT_deltaT_mean,BT_deltaT_rms;
3989  Int_t nseg;
3990  Int_t longprofile[57];
3991 
3992  TTree* treevar=0;
3993  if (!treevar) treevar = new TTree(targettreename,targettreename);
3994  treevar->Branch("ShowerAxisAngle",&ShowerAxisAngle,"ShowerAxisAngle/F");
3995  treevar->Branch("nseg",&nseg,"nseg/I");
3996  treevar->Branch("BT_deltaR_mean",&BT_deltaR_mean,"BT_deltaR_mean/F");
3997  treevar->Branch("BT_deltaR_rms",&BT_deltaR_rms,"BT_deltaR_rms/F");
3998  treevar->Branch("BT_deltaT_mean",&BT_deltaT_mean,"BT_deltaT_mean/F");
3999  treevar->Branch("BT_deltaT_rms",&BT_deltaT_rms,"BT_deltaT_rms/F");
4000  treevar->Branch("longprofile",longprofile,"longprofile[57]/I");
4001 
4002  EdbShowerP* show=0;
4003  EdbShowerP::Para_FJ para_FJ; // IMPORTANT HINWEIS !!! this was original version,
4004  // but the EdbShowerP Object cannot be stored in a root file (crahses somehow..)
4005  // we try to put the parametrisation into a seperate class and see if this works ....
4006  // ... Solved now: Error was not due to struct problem, but to an empty, uninitialized
4007  // pointer (eReco_ID_Array)
4008 
4009  // Check for first shower if desired parametrisation was already done:
4010  show=(EdbShowerP*)eRecoShowerArray->At(0);
4011  Bool_t ToDoPara= show->GetParametrisationIsDone(0); // FJ==0
4012  cout << "EdbShowRec::WriteParametrisation_FJ() show->GetParametrisationIsDone(0): " << ToDoPara << endl;
4013  if (!ToDoPara) {
4014  cout << "EdbShowRec::WriteParametrisation_FJ() Start Building BuildParametrisation(0);" << endl;
4015  }
4016 
4017  Int_t statuscounter=eRecoShowerArrayN/10;
4018 
4019  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4020  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4021 
4022  // Get Shower:
4023  show=(EdbShowerP*)eRecoShowerArray->At(i);
4024 // show->GetSegment(0)->PrintNice();
4025 // gEDBDEBUGLEVEL=3;
4026  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(0) << endl;
4027 
4028  // Do parametrisation if necessary:
4029  if (!ToDoPara) show->BuildParametrisation(0);
4030 
4031  // Print it:
4032  if (gEDBDEBUGLEVEL>3) show->PrintParametrisation_FJ();
4033 
4034  // Get it:
4035  para_FJ=show->GetPara_FJ();
4036 
4037 
4038  //Fill tree with values from parametrisation:
4039  ShowerAxisAngle=para_FJ.ShowerAxisAngle;
4040  nseg=para_FJ.nseg;
4041  BT_deltaR_mean=para_FJ.BT_deltaR_mean;
4042  BT_deltaR_rms=para_FJ.BT_deltaR_rms;
4043  BT_deltaT_mean=para_FJ.BT_deltaT_mean;
4044  BT_deltaT_rms=para_FJ.BT_deltaT_rms;
4045  for (int k=0; k<57; k++) longprofile[k]=(Int_t)para_FJ.longprofile[k];
4046 
4047  treevar->Fill();
4048  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4049  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4050 
4051 
4052  if (gEDBDEBUGLEVEL>3) {
4053  treevar->Print();
4054  }
4055  //------------------------------------------------------------------
4056 
4057  Log(2,"EdbShowRec::WriteParametrisation_FJ()","Writing tree for para_FJ parametrisation into file...");
4058  treevar->Write("",TObject::kWriteDelete);
4059  Log(2,"EdbShowRec::WriteParametrisation_FJ()","Writing tree for para_FJ parametrisation into file...done.");
4060 
4061  Log(2,"EdbShowRec::WriteParametrisation_FJ()","Delete treevar...");
4062  delete treevar;
4063  treevar=0;
4064  Log(2,"EdbShowRec::WriteParametrisation_FJ()","Delete treevar...done.");
4065 
4066 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4067  Log(2,"EdbShowRec::WriteParametrisation_FJ()","WriteParametrisation_FJ()...done.");
4068  return;
4069 }
void PrintParametrisation_FJ()
Definition: EdbShowerP.cxx:2392
Para_FJ GetPara_FJ() const
Definition: EdbShowerP.h:551
Definition: EdbShowerP.h:143
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:150
Int_t nseg
Definition: EdbShowerP.h:146
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:148
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:147
Int_t longprofile[57]
Definition: EdbShowerP.h:151
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:145
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:149

◆ WriteParametrisation_JC()

void EdbShowRec::WriteParametrisation_JC ( )
4186  {
4187 
4188  Log(2,"EdbShowRec::WriteParametrisation_JC()","WriteParametrisation_JC()");
4189 
4191  cout << "EdbShowRec::WriteParametrisation_JC WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4192  return;
4193  }
4194 
4195  // Steps for creating the file:
4196  // Because in root we have error messagens "Failed filling branch" we have to:
4197  // First step into the file and then create the Tree:
4198  Log(2,"EdbShowRec::WriteParametrisation_JC()","Writing Tree in eFilename_Out_treebranch = ");
4199  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4200  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4201 
4202  if (!eFile_Out_treebranch) {
4203  Log(2,"EdbShowRec::WriteParametrisation_JC()","Creating new eFile_Out_treebranch.");
4204  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4205  }
4206  else {
4207  Log(2,"EdbShowRec::WriteParametrisation_JC()","Open existing eFile_Out_treebranch.");
4208  cout << "EdbShowRec::WriteParametrisation_JC() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4209  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4210  }
4211 
4212  // Go into file (if necessary)
4213  eFile_Out_treebranch->cd();
4214 
4215  TString targettreename="Para_JC";
4216 
4217  // Variables part from Para_YC:
4218  Float_t ShowerAxisAngle,C1,a1,alpha,nmax;
4219  Int_t nseg;
4220  TTree* treevar=0;
4221  if (!treevar) treevar = new TTree(targettreename,targettreename);
4222  // Branches part from Para_YC:
4223  treevar->Branch("ShowerAxisAngle",&ShowerAxisAngle,"ShowerAxisAngle/F");
4224  treevar->Branch("C1",&C1,"C1/F");
4225  treevar->Branch("a1",&a1,"a1/F");
4226  treevar->Branch("alpha",&alpha,"alpha/F");
4227  treevar->Branch("nmax",&nmax,"nmax/F");
4228  treevar->Branch("nseg",&nseg,"nseg/I");
4229 
4230  // Variables part from Para_FJ:
4231  Float_t BT_deltaR_mean,BT_deltaR_rms,BT_deltaT_mean,BT_deltaT_rms;
4232  Int_t longprofile[57];
4233  // Branches part from Para_FJ:
4234  treevar->Branch("BT_deltaR_mean",&BT_deltaR_mean,"BT_deltaR_mean/F");
4235  treevar->Branch("BT_deltaR_rms",&BT_deltaR_rms,"BT_deltaR_rms/F");
4236  treevar->Branch("BT_deltaT_mean",&BT_deltaT_mean,"BT_deltaT_mean/F");
4237  treevar->Branch("BT_deltaT_rms",&BT_deltaT_rms,"BT_deltaT_rms/F");
4238  treevar->Branch("longprofile",longprofile,"longprofile[57]/I");
4239 
4240  EdbShowerP* show=0;
4241  EdbShowerP::Para_JC para_JC;
4242 
4243  // Check for first shower if desired parametrisation was already done:
4244  show=(EdbShowerP*)eRecoShowerArray->At(0);
4245  Bool_t ToDoPara= show->GetParametrisationIsDone(3); // JC==3
4246  cout << "EdbShowRec::WriteParametrisation_JC() show->GetParametrisationIsDone(3): " << ToDoPara << endl;
4247  if (!ToDoPara) {
4248  cout << "EdbShowRec::WriteParametrisation_JC() Start Building BuildParametrisation(3);" << endl;
4249  }
4250 
4251  Int_t statuscounter=eRecoShowerArrayN/10;
4252 
4253  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4254  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4255 
4256  show=(EdbShowerP*)eRecoShowerArray->At(i);
4257  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(3) << endl;
4258 
4259  // Do parametrisation if necessary:
4260  // BuildParametrisation(3) (JC) automatically invokes BuildParametrisation(FJ) and BuildParametrisation(YC)
4261  if (!ToDoPara) show->BuildParametrisation(3);
4262 
4263  // Print Parametrisation:
4264  if (gEDBDEBUGLEVEL>3) show->PrintParametrisation_JC();
4265 
4266  // Get it:
4267  para_JC=show->GetPara_JC();
4268 
4269  // Fill tree with values from parametrisation:
4270  ShowerAxisAngle=para_JC.ShowerAxisAngle;
4271  // YC-Part:
4272  C1=para_JC.C1;
4273  a1=para_JC.a1;
4274  alpha=para_JC.alpha;
4275  nmax=para_JC.nmax;
4276  nseg=para_JC.nseg;
4277  // FJ-Part:
4278  BT_deltaR_mean=para_JC.BT_deltaR_mean;
4279  BT_deltaR_rms=para_JC.BT_deltaR_rms;
4280  BT_deltaT_mean=para_JC.BT_deltaT_mean;
4281  BT_deltaT_rms=para_JC.BT_deltaT_rms;
4282  for (int k=0; k<57; k++) longprofile[k]=(Int_t)para_JC.longprofile[k];
4283 
4284  treevar->Fill();
4285  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4286  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4287 
4288 
4289  if (gEDBDEBUGLEVEL>3) {
4290  treevar->Print();
4291  }
4292 
4293 
4294  Log(2,"EdbShowRec::WriteParametrisation_JC()","Writing tree for para_JC parametrisation into file...");
4295 // treevar->Write();
4296  treevar->Write("",TObject::kWriteDelete);
4297  Log(2,"EdbShowRec::WriteParametrisation_JC()","Writing tree for para_JC parametrisation into file...done.");
4298 
4299  Log(2,"EdbShowRec::WriteParametrisation_JC()","Delete treevar...");
4300  delete treevar;
4301  treevar=0;
4302  Log(2,"EdbShowRec::WriteParametrisation_JC()","Delete treevar...done.");
4303 
4304 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4305  Log(2,"EdbShowRec::WriteParametrisation_JC()","WriteParametrisation_JC()...done.");
4306  return;
4307 }
void PrintParametrisation_JC()
Definition: EdbShowerP.cxx:2479
Para_JC GetPara_JC() const
Definition: EdbShowerP.h:560
Definition: EdbShowerP.h:180
Int_t nseg
Definition: EdbShowerP.h:184
Float_t nmax
Definition: EdbShowerP.h:188
Float_t alpha
Definition: EdbShowerP.h:187
Float_t C1
Definition: EdbShowerP.h:185
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:194
Int_t longprofile[57]
Definition: EdbShowerP.h:196
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:195
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:193
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:183
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:192
Float_t a1
Definition: EdbShowerP.h:186

◆ WriteParametrisation_LT()

void EdbShowRec::WriteParametrisation_LT ( )
4312  {
4313 
4314  Log(2,"EdbShowRec::WriteParametrisation_LT()","WriteParametrisation_LT()");
4315 
4317  cout << "EdbShowRec::WriteParametrisation_LT WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4318  return;
4319  }
4320 
4321  Log(2,"EdbShowRec::WriteParametrisation_LT()","Writing Tree in eFilename_Out_treebranch = ");
4322  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4323  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4324 
4325  if (!eFile_Out_treebranch) {
4326  Log(2,"EdbShowRec::WriteParametrisation_LT()","Creating new eFile_Out_treebranch.");
4327  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4328  }
4329  else {
4330  Log(2,"EdbShowRec::WriteParametrisation_LT()","Open existing eFile_Out_treebranch.");
4331  cout << "EdbShowRec::WriteParametrisation_LT() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4332  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4333  }
4334 
4335  // Go into file (if necessary)
4336  eFile_Out_treebranch->cd();
4337 
4338  TString targettreename="Para_LT";
4339 
4340  Float_t ShowerAxisAngle;
4341  Float_t BT_deltaR_mean,BT_deltaR_rms,BT_deltaT_mean,BT_deltaT_rms;
4342  Int_t nseg;
4343  Int_t longprofile[57];
4344  Int_t transprofile[8];
4345 
4346  TTree* treevar=0;
4347  if (!treevar) treevar = new TTree(targettreename,targettreename);
4348  treevar->Branch("ShowerAxisAngle",&ShowerAxisAngle,"ShowerAxisAngle/F");
4349  treevar->Branch("nseg",&nseg,"nseg/I");
4350  treevar->Branch("BT_deltaR_mean",&BT_deltaR_mean,"BT_deltaR_mean/F");
4351  treevar->Branch("BT_deltaR_rms",&BT_deltaR_rms,"BT_deltaR_rms/F");
4352  treevar->Branch("BT_deltaT_mean",&BT_deltaT_mean,"BT_deltaT_mean/F");
4353  treevar->Branch("BT_deltaT_rms",&BT_deltaT_rms,"BT_deltaT_rms/F");
4354  treevar->Branch("longprofile",longprofile,"longprofile[57]/I");
4355  treevar->Branch("transprofile",transprofile,"transprofile[8]/I");
4356 
4357  EdbShowerP* show=0;
4358  EdbShowerP::Para_LT para_LT;
4359 
4360  // Check for first shower if desired parametrisation was already done:
4361  show=(EdbShowerP*)eRecoShowerArray->At(0);
4362  Bool_t ToDoPara= show->GetParametrisationIsDone(1); // LT==1
4363  cout << "EdbShowRec::WriteParametrisation_LT() show->GetParametrisationIsDone(1): " << ToDoPara << endl;
4364  if (!ToDoPara) {
4365  cout << "EdbShowRec::WriteParametrisation_LT() Start Building BuildParametrisation(1);" << endl;
4366  }
4367 
4368  Int_t statuscounter=eRecoShowerArrayN/10;
4369 
4370  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4371  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4372 
4373  show=(EdbShowerP*)eRecoShowerArray->At(i);
4374  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(1) << endl;
4375 
4376  // Do parametrisation if necessary:
4377  if (!ToDoPara) show->BuildParametrisation(1);
4378 
4379  // Print it:
4380  if (gEDBDEBUGLEVEL>3) show->PrintParametrisation_LT();
4381 
4382  // Get it:
4383  para_LT=show->GetPara_LT();
4384 
4385  //Fill tree with values from parametrisation:
4386  ShowerAxisAngle=para_LT.ShowerAxisAngle;
4387  nseg=para_LT.nseg;
4388  BT_deltaR_mean=para_LT.BT_deltaR_mean;
4389  BT_deltaR_rms=para_LT.BT_deltaR_rms;
4390  BT_deltaT_mean=para_LT.BT_deltaT_mean;
4391  BT_deltaT_rms=para_LT.BT_deltaT_rms;
4392  for (int k=0; k<57; k++ ) longprofile[k]=(Int_t)para_LT.longprofile[k];
4393  for (int k=0; k<8; k++ ) transprofile[k]=(Int_t)para_LT.transprofile[k];
4394 
4395 
4396  treevar->Fill();
4397  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4398  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4399 
4400  if (gEDBDEBUGLEVEL>3) {
4401  treevar->Print();
4402  }
4403 
4404 
4405  Log(2,"EdbShowRec::WriteParametrisation_LT()","Writing tree for para_LT parametrisation into file...");
4406 // treevar->Write();
4407  treevar->Write("",TObject::kWriteDelete);
4408  Log(2,"EdbShowRec::WriteParametrisation_LT()","Writing tree for para_LT parametrisation into file...done.");
4409 
4410  Log(2,"EdbShowRec::WriteParametrisation_LT()","Delete treevar...");
4411  delete treevar;
4412  treevar=0;
4413  Log(2,"EdbShowRec::WriteParametrisation_LT()","Delete treevar...done.");
4414 
4415 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4416  Log(2,"EdbShowRec::WriteParametrisation_LT()","WriteParametrisation_LT()...done.");
4417  return;
4418 }
void PrintParametrisation_LT()
Definition: EdbShowerP.cxx:2419
Para_LT GetPara_LT() const
Definition: EdbShowerP.h:554
Definition: EdbShowerP.h:155
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:161
Int_t longprofile[57]
Definition: EdbShowerP.h:165
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:160
Int_t nseg
Definition: EdbShowerP.h:159
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:158
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:163
Int_t transprofile[8]
Definition: EdbShowerP.h:164
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:162

◆ WriteParametrisation_MCInfo_PGun()

void EdbShowRec::WriteParametrisation_MCInfo_PGun ( )

Check for first shower if desired parametrisation was already done: do it before at beginning of function!!!

5195 {
5196  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","WriteParametrisation_MCInfo_PGun()");
5197 
5199  cout << "EdbShowRec::WriteParametrisation_MCInfo_PGun WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
5200  return;
5201  }
5202 
5204 
5205  TString targettreename="MCInfo_PGun";
5206 
5207  //Declare Tree Variables
5208  Int_t MCEvt, PDGId;
5209  Float_t energy, tantheta,dirx,diry,dirz,vtxposx,vtxposy,vtxposz;
5210  Float_t TX,TY,Y,X,Z;
5211 
5212 
5213  TTree* treevar=0;
5214  cout << "After creating the TTree* treevar=0; pointer: treevar= " << treevar << endl;
5215  if (!treevar) {
5216  cout << "Creating new Tree with NameTitle: " << targettreename << endl;
5217  treevar = new TTree(targettreename,targettreename);
5218  }
5219  treevar->Branch("MCEvt",&MCEvt,"MCEvt/I");
5220  treevar->Branch("PDGId",&PDGId,"PDGId/I");
5221  treevar->Branch("energy",&energy,"energy/F");
5222  treevar->Branch("tantheta",&tantheta,"tantheta/F");
5223  treevar->Branch("dirx",&dirx,"dirx/F");
5224  treevar->Branch("diry",&diry,"diry/F");
5225  treevar->Branch("dirz",&dirz,"dirz/F");
5226  treevar->Branch("vtxposx",&vtxposx,"vtxposx/F");
5227  treevar->Branch("vtxposy",&vtxposy,"vtxposy/F");
5228  treevar->Branch("vtxposz",&vtxposz,"vtxposz/F");
5229  treevar->Branch("TX",&TX,"TX/F");
5230  treevar->Branch("TY",&TY,"TY/F");
5231  treevar->Branch("X",&X,"X/F");
5232  treevar->Branch("Y",&Y,"Y/F");
5233  treevar->Branch("Z",&Z,"Z/F");
5234 
5235  EdbShowerP* show=0;
5236  EdbShowerP::MCInfo_PGun fMCInfo_PGun;
5237 
5238  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
5239 
5240  show=(EdbShowerP*)eRecoShowerArray->At(i);
5241  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << ")." << endl;
5242 
5243  // Get it:
5244  fMCInfo_PGun=show->GetMCInfo_PGun();
5245 
5246  //Fill tree with values from parametrisation:
5247  MCEvt=fMCInfo_PGun.MCEvt;
5248  PDGId=fMCInfo_PGun.PDGId;
5249  energy=fMCInfo_PGun.energy;
5250  tantheta=fMCInfo_PGun.tantheta;
5251  dirx=fMCInfo_PGun.dirx;
5252  diry=fMCInfo_PGun.diry;
5253  dirz=fMCInfo_PGun.dirz;
5254  vtxposx=fMCInfo_PGun.vtxposx;
5255  vtxposy=fMCInfo_PGun.vtxposy;
5256  vtxposz=fMCInfo_PGun.vtxposz;
5257  X=fMCInfo_PGun.X;
5258  Y=fMCInfo_PGun.Y;
5259  Z=fMCInfo_PGun.Z;
5260  TX=fMCInfo_PGun.TX;
5261  TY=fMCInfo_PGun.TY;
5262 
5263  treevar->Fill();
5264  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
5265 
5266 
5267  if (gEDBDEBUGLEVEL>3) {
5268  treevar->Print();
5269  }
5270  treevar->Show(treevar->GetEntries()-1);
5271 
5272  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","Writing Tree in eFilename_Out_treebranch = ");
5273  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
5274  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
5275 
5276  if (!eFile_Out_treebranch) {
5277  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","Creating new eFile_Out_treebranch.");
5278  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
5279  }
5280  else {
5281  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","Open existing eFile_Out_treebranch.");
5282  cout << "EdbShowRec::WriteParametrisation_MCInfo_PGun() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
5283  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
5284  }
5285 
5286  // Go into file (if necessary)
5287  eFile_Out_treebranch->cd();
5288 
5289  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","Writing tree for MCInfo_PGun parametrisation into file...");
5290 // treevar->Write();
5291  treevar->Write("",TObject::kWriteDelete);
5292  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","Writing tree for MCInfo_PGun parametrisation into file...done.");
5293 
5294  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","Delete treevar...");
5295  delete treevar;
5296  treevar=0;
5297  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","Delete treevar...done.");
5298 
5299 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
5300  Log(2,"EdbShowRec::WriteParametrisation_MCInfo_PGun()","WriteParametrisation_MCInfo_PGun()...done.");
5301  return;
5302 }

◆ WriteParametrisation_SE()

void EdbShowRec::WriteParametrisation_SE ( )
4802  {
4803 
4804  Log(2,"EdbShowRec::WriteParametrisation_SE()","WriteParametrisation_SE()");
4805 
4807  cout << "EdbShowRec::WriteParametrisation_SE WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4808  return;
4809  }
4810 
4811  Log(2,"EdbShowRec::WriteParametrisation_SE()","Writing Tree in eFilename_Out_treebranch = ");
4812  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4813  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4814 
4815  if (!eFile_Out_treebranch) {
4816  Log(2,"EdbShowRec::WriteParametrisation_SE()","Creating new eFile_Out_treebranch.");
4817  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4818  }
4819  else {
4820  Log(2,"EdbShowRec::WriteParametrisation_SE()","Open existing eFile_Out_treebranch.");
4821  cout << "EdbShowRec::WriteParametrisation_SE() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4822  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4823  }
4824 
4825  // Go into file (if necessary)
4826  eFile_Out_treebranch->cd();
4827 
4828  TString targettreename="Para_SE";
4829 
4830  Int_t nseg,npl;
4831  Float_t ShowerAxisAngle,efficiencyAtShowerAxisAngle;
4832 
4833  TTree* treevar=0;
4834  if (!treevar) treevar = new TTree(targettreename,targettreename);
4835  treevar->Branch("ShowerAxisAngle",&ShowerAxisAngle,"ShowerAxisAngle/F");
4836  treevar->Branch("nseg",&nseg,"nseg/I");
4837  treevar->Branch("npl",&npl,"npl/I");
4838  treevar->Branch("efficiencyAtShowerAxisAngle",&efficiencyAtShowerAxisAngle,"efficiencyAtShowerAxisAngle/F");
4839 
4840  EdbShowerP* show=0;
4841  EdbShowerP::Para_SE para_SE;
4842 
4843  // Check for first shower if desired parametrisation was already done:
4844  show=(EdbShowerP*)eRecoShowerArray->At(0);
4845  Bool_t ToDoPara= show->GetParametrisationIsDone(8); // SE==8
4846  cout << "EdbShowRec::WriteParametrisation_SE() show->GetParametrisationIsDone(8): " << ToDoPara << endl;
4847  if (!ToDoPara) {
4848  cout << "EdbShowRec::WriteParametrisation_SE() Start Building BuildParametrisation(8);" << endl;
4849  }
4850 
4851  Int_t statuscounter=eRecoShowerArrayN/10;
4852 
4853  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4854  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4855 
4856  show=(EdbShowerP*)eRecoShowerArray->At(i);
4857  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(8) << endl;
4858 
4859  // Do parametrisation if necessary:
4860  if (!ToDoPara) show->BuildParametrisation(8);
4861 
4862  // Print it:
4863  if (gEDBDEBUGLEVEL>3) show->PrintParametrisation_SE();
4864 
4865  // Get it:
4866  para_SE=show->GetPara_SE();
4867 
4868  //Fill tree with values from parametrisation:
4869  ShowerAxisAngle=para_SE.ShowerAxisAngle;
4870  efficiencyAtShowerAxisAngle=para_SE.efficiencyAtShowerAxisAngle;
4871  nseg=para_SE.nseg;
4872  npl=para_SE.npl;
4873 
4874  treevar->Fill();
4875  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4876  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4877 
4878 
4879  if (gEDBDEBUGLEVEL>3) {
4880  treevar->Print();
4881  }
4882 
4883  Log(2,"EdbShowRec::WriteParametrisation_SE()","Writing tree for para_SE parametrisation into file...");
4884 // treevar->Write();
4885  treevar->Write("",TObject::kWriteDelete);
4886  Log(2,"EdbShowRec::WriteParametrisation_SE()","Writing tree for para_SE parametrisation into file...done.");
4887 
4888  Log(2,"EdbShowRec::WriteParametrisation_SE()","Delete treevar...");
4889  delete treevar;
4890  treevar=0;
4891  Log(2,"EdbShowRec::WriteParametrisation_SE()","Delete treevar...done.");
4892 
4893 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4894  Log(2,"EdbShowRec::WriteParametrisation_SE()","WriteParametrisation_SE()...done.");
4895  return;
4896 }
void PrintParametrisation_SE()
Definition: EdbShowerP.cxx:2593
Para_SE GetPara_SE() const
Definition: EdbShowerP.h:575
Definition: EdbShowerP.h:248
Int_t nseg
Definition: EdbShowerP.h:251
Float_t efficiencyAtShowerAxisAngle
Definition: EdbShowerP.h:253
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:250
Int_t npl
Definition: EdbShowerP.h:252

◆ WriteParametrisation_XX()

void EdbShowRec::WriteParametrisation_XX ( )
4428  {
4429 
4430  Log(2,"EdbShowRec::WriteParametrisation_XX()","WriteParametrisation_XX()");
4431 
4433  cout << "EdbShowRec::WriteParametrisation_XX WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4434  return;
4435  }
4436 
4437  Log(2,"EdbShowRec::WriteParametrisation_XX()","Writing Tree in eFilename_Out_treebranch = ");
4438  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4439  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4440 
4441  if (!eFile_Out_treebranch) {
4442  Log(2,"EdbShowRec::WriteParametrisation_XX()","Creating new eFile_Out_treebranch.");
4443  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4444  }
4445  else {
4446  Log(2,"EdbShowRec::WriteParametrisation_XX()","Open existing eFile_Out_treebranch.");
4447  cout << "EdbShowRec::WriteParametrisation_XX() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4448  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4449  }
4450 
4451  // Go into file (if necessary)
4452  eFile_Out_treebranch->cd();
4453 
4454  TString targettreename="Para_XX";
4455 
4456  Int_t nseg;
4457  Float_t ShowerAxisAngle;
4458  Float_t Mean_ProfileLongitudinal,RMS_ProfileLongitudinal,Max_ProfileLongitudinal;
4459  Float_t Mean_ProfileTransversal,RMS_ProfileTransversal,Max_ProfileTransversal;
4460  Float_t Last_ProfileLongitudinal, Last_ProfileTransversal;
4461 
4462  TTree* treevar=0;
4463  if (!treevar) treevar = new TTree(targettreename,targettreename);
4464  treevar->Branch("ShowerAxisAngle",&ShowerAxisAngle,"ShowerAxisAngle/F");
4465  treevar->Branch("nseg",&nseg,"nseg/I");
4466  treevar->Branch("Mean_ProfileLongitudinal",&Mean_ProfileLongitudinal,"Mean_ProfileLongitudinal/F");
4467  treevar->Branch("RMS_ProfileLongitudinal",&RMS_ProfileLongitudinal,"RMS_ProfileLongitudinal/F");
4468  treevar->Branch("Max_ProfileLongitudinal",&Max_ProfileLongitudinal,"Max_ProfileLongitudinal/F");
4469  treevar->Branch("Last_ProfileLongitudinal",&Last_ProfileLongitudinal,"Last_ProfileLongitudinal/F");
4470  treevar->Branch("Mean_ProfileTransversal",&Mean_ProfileTransversal,"Mean_ProfileTransversal/F");
4471  treevar->Branch("RMS_ProfileTransversal",&RMS_ProfileTransversal,"RMS_ProfileTransversal/F");
4472  treevar->Branch("Max_ProfileTransversal",&Max_ProfileTransversal,"Max_ProfileTransversal/F");
4473  treevar->Branch("Last_ProfileTransversal",&Last_ProfileTransversal,"Last_ProfileTransversal/F");
4474 
4475  EdbShowerP* show=0;
4476  EdbShowerP::Para_XX para_XX;
4477 
4478  // Check for first shower if desired parametrisation was already done:
4479  show=(EdbShowerP*)eRecoShowerArray->At(0);
4480  Bool_t ToDoPara= show->GetParametrisationIsDone(4); // XX==4
4481  cout << "EdbShowRec::WriteParametrisation_XX() show->GetParametrisationIsDone(4): " << ToDoPara << endl;
4482  if (!ToDoPara) {
4483  cout << "EdbShowRec::WriteParametrisation_XX() Start Building BuildParametrisation(4);" << endl;
4484  }
4485 
4486  Int_t statuscounter=eRecoShowerArrayN/10;
4487 
4488  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4489  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4490 
4491  show=(EdbShowerP*)eRecoShowerArray->At(i);
4492  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(4) << endl;
4493 
4494  // Do parametrisation if necessary:
4495  if (!ToDoPara) show->BuildParametrisation(4);
4496 
4497  // Print it:
4498  if (gEDBDEBUGLEVEL>3) show->PrintParametrisation_XX();
4499 
4500  // Get it:
4501  para_XX=show->GetPara_XX();
4502 
4503  //Fill tree with values from parametrisation:
4504  ShowerAxisAngle=para_XX.ShowerAxisAngle;
4505  nseg=para_XX.nseg;
4506  Mean_ProfileLongitudinal=para_XX.Mean_ProfileLongitudinal;
4507  RMS_ProfileLongitudinal=para_XX.RMS_ProfileLongitudinal;
4508  Max_ProfileLongitudinal=para_XX.Max_ProfileLongitudinal;
4509  Last_ProfileLongitudinal=para_XX.Last_ProfileLongitudinal;
4510  Mean_ProfileTransversal=para_XX.Mean_ProfileTransversal;
4511  RMS_ProfileTransversal=para_XX.RMS_ProfileTransversal;
4512  Max_ProfileTransversal=para_XX.Max_ProfileTransversal;
4513  Last_ProfileTransversal=para_XX.Last_ProfileTransversal;
4514 
4515  treevar->Fill();
4516  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4517  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4518 
4519 
4520  if (gEDBDEBUGLEVEL>3) {
4521  treevar->Print();
4522  }
4523 
4524  Log(2,"EdbShowRec::WriteParametrisation_XX()","Writing tree for para_XX parametrisation into file...");
4525 // treevar->Write();
4526  treevar->Write("",TObject::kWriteDelete);
4527  Log(2,"EdbShowRec::WriteParametrisation_XX()","Writing tree for para_XX parametrisation into file...done.");
4528 
4529  Log(2,"EdbShowRec::WriteParametrisation_XX()","Delete treevar...");
4530  delete treevar;
4531  treevar=0;
4532  Log(2,"EdbShowRec::WriteParametrisation_XX()","Delete treevar...done.");
4533 
4534 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4535  Log(2,"EdbShowRec::WriteParametrisation_XX()","WriteParametrisation_XX()...done.");
4536  return;
4537 }
Para_XX GetPara_XX() const
Definition: EdbShowerP.h:563
void PrintParametrisation_XX()
Definition: EdbShowerP.cxx:2513
Definition: EdbShowerP.h:200
Float_t Max_ProfileLongitudinal
Definition: EdbShowerP.h:206
Float_t Last_ProfileTransversal
Definition: EdbShowerP.h:211
Int_t nseg
Definition: EdbShowerP.h:203
Float_t Last_ProfileLongitudinal
Definition: EdbShowerP.h:210
Float_t Max_ProfileTransversal
Definition: EdbShowerP.h:209
Float_t RMS_ProfileLongitudinal
Definition: EdbShowerP.h:205
Float_t Mean_ProfileLongitudinal
Definition: EdbShowerP.h:204
Float_t RMS_ProfileTransversal
Definition: EdbShowerP.h:208
Float_t Mean_ProfileTransversal
Definition: EdbShowerP.h:207
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:202

◆ WriteParametrisation_YC()

void EdbShowRec::WriteParametrisation_YC ( )
4077  {
4078 
4079  Log(2,"EdbShowRec::WriteParametrisation_YC()","WriteParametrisation_YC()");
4080 
4082  cout << "EdbShowRec::WriteParametrisation_YC WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4083  return;
4084  }
4085 
4086  // Steps for creating the file:
4087  // Because in root we have error messagens "Failed filling branch" we have to:
4088  // First stepp into the file and then create the Tree:
4089  Log(2,"EdbShowRec::WriteParametrisation_YC()","Writing Tree in eFilename_Out_treebranch = ");
4090  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4091  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4092 
4093  if (!eFile_Out_treebranch) {
4094  Log(2,"EdbShowRec::WriteParametrisation_YC()","Creating new eFile_Out_treebranch.");
4095  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4096  }
4097  else {
4098  Log(2,"EdbShowRec::WriteParametrisation_YC()","Open existing eFile_Out_treebranch.");
4099  cout << "EdbShowRec::WriteParametrisation_YC() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4100  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4101  }
4102 
4103  // Go into file (if necessary)
4104  eFile_Out_treebranch->cd();
4105 
4106  TString targettreename="Para_YC";
4107  Float_t ShowerAxisAngle,C1,a1,alpha,nmax;
4108  Int_t nseg;
4109  TTree* treevar=0;
4110  if (!treevar) treevar = new TTree(targettreename,targettreename);
4111  treevar->Branch("ShowerAxisAngle",&ShowerAxisAngle,"ShowerAxisAngle/F");
4112  treevar->Branch("C1",&C1,"C1/F");
4113  treevar->Branch("a1",&a1,"a1/F");
4114  treevar->Branch("alpha",&alpha,"alpha/F");
4115  treevar->Branch("nmax",&nmax,"nmax/F");
4116  treevar->Branch("nseg",&nseg,"nseg/I");
4117 
4118  EdbShowerP* show=0;
4119  EdbShowerP::Para_YC para_YC;
4120 
4121  // Check for first shower if desired parametrisation was already done:
4122  show=(EdbShowerP*)eRecoShowerArray->At(0);
4123  Bool_t ToDoPara= show->GetParametrisationIsDone(2); // YC==2
4124  cout << "EdbShowRec::WriteParametrisation_YC() show->GetParametrisationIsDone(2): " << ToDoPara << endl;
4125  if (!ToDoPara) {
4126  cout << "EdbShowRec::WriteParametrisation_YC() Start Building BuildParametrisation(2);" << endl;
4127  }
4128 
4129  Int_t statuscounter=eRecoShowerArrayN/10;
4130 
4131  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4132  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4133 
4134  show=(EdbShowerP*)eRecoShowerArray->At(i);
4135  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(2) << endl;
4136 
4137  // Do parametrisation if necessary:
4138  if (!ToDoPara) show->BuildParametrisation(2);
4139 
4140  // Print Parametrisation:
4141  if (gEDBDEBUGLEVEL>3) show->PrintParametrisation_YC();
4142 
4143  // Get it:
4144  para_YC=show->GetPara_YC();
4145 
4146  //Fill tree with values from parametrisation:
4147  ShowerAxisAngle=para_YC.ShowerAxisAngle;
4148  C1=para_YC.C1;
4149  a1=para_YC.a1;
4150  alpha=para_YC.alpha;
4151  nmax=para_YC.nmax;
4152  nseg=para_YC.nseg;
4153 
4154  treevar->Fill();
4155  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4156  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4157 
4158 
4159  if (gEDBDEBUGLEVEL>3) {
4160  treevar->Print();
4161  }
4162 
4163 
4164  Log(2,"EdbShowRec::WriteParametrisation_YC()","Writing tree for para_YC parametrisation into file...");
4165 // treevar->Write();
4166  treevar->Write("",TObject::kWriteDelete);
4167  Log(2,"EdbShowRec::WriteParametrisation_YC()","Writing tree for para_YC parametrisation into file...done.");
4168 
4169  Log(2,"EdbShowRec::WriteParametrisation_YC()","Delete treevar...");
4170  delete treevar;
4171  treevar=0;
4172  Log(2,"EdbShowRec::WriteParametrisation_YC()","Delete treevar...done.");
4173 
4174 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4175  Log(2,"EdbShowRec::WriteParametrisation_YC()","WriteParametrisation_YC()...done.");
4176  return;
4177 }
Para_YC GetPara_YC() const
Definition: EdbShowerP.h:557
void PrintParametrisation_YC()
Definition: EdbShowerP.cxx:2457
Definition: EdbShowerP.h:169
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:171
Float_t C1
Definition: EdbShowerP.h:173
Float_t alpha
Definition: EdbShowerP.h:175
Int_t nseg
Definition: EdbShowerP.h:172
Float_t a1
Definition: EdbShowerP.h:174
Float_t nmax
Definition: EdbShowerP.h:176

◆ WriteParametrisation_YY()

void EdbShowRec::WriteParametrisation_YY ( )

DEBUG ----------------------------------------------------------------------------—

DEBUG NOT FINISHED YET !!!!

=================

=================

4546  {
4547 
4548  Log(2,"EdbShowRec::WriteParametrisation_YY()","WriteParametrisation_YY()");
4549 
4551  cout << "DEBUG =================== DEBUG =============== DEBUG ================="<<endl;
4554 
4556  cout << "EdbShowRec::WriteParametrisation_YY WARNING :: eRecoShowerArrayN = 0. Return!" << endl;
4557  return;
4558  }
4559 
4560  Log(2,"EdbShowRec::WriteParametrisation_YY()","Writing Tree in eFilename_Out_treebranch = ");
4561  cout << "eFile_Out_treebranch = " << eFile_Out_treebranch << endl;
4562  cout << "eFilename_Out_treebranch = " << eFilename_Out_treebranch << endl;
4563 
4564  if (!eFile_Out_treebranch) {
4565  Log(2,"EdbShowRec::WriteParametrisation_YY()","Creating new eFile_Out_treebranch.");
4566  eFile_Out_treebranch= new TFile(eFilename_Out_treebranch,"UPDATE");
4567  }
4568  else {
4569  Log(2,"EdbShowRec::WriteParametrisation_YY()","Open existing eFile_Out_treebranch.");
4570  cout << "EdbShowRec::WriteParametrisation_YY() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4571  if (!eFile_Out_treebranch->IsOpen()) eFile_Out_treebranch->Open(eFilename_Out_treebranch,"UPDATE");
4572  }
4573 
4574  // Go into file (if necessary)
4575  eFile_Out_treebranch->cd();
4576 
4577  TString targettreename="Para_YY";
4578 
4579  // Variables used for YY parametrisation
4580  Float_t ShowerAxisAngle;
4581  Int_t nseg;
4582  Int_t ProfileLongitudinalBincontent[57];
4583  Int_t ProfileTransversalBincontent[8];
4584 
4585 
4586  TTree* treevar=0;
4587  cout << "After creating the TTree* treevar=0; pointer: treevar= " << treevar << endl;
4588  if (!treevar) {
4589  cout << "Creating new Tree with NameTitle: " << targettreename << endl;
4590  treevar = new TTree(targettreename,targettreename);
4591  }
4592  treevar->Branch("ShowerAxisAngle",&ShowerAxisAngle,"ShowerAxisAngle/F");
4593  treevar->Branch("nseg",&nseg,"nseg/I");
4594  treevar->Branch("ProfileLongitudinalBincontent",ProfileLongitudinalBincontent,"ProfileLongitudinalBincontent[57]/I");
4595  treevar->Branch("ProfileTransversalBincontent",ProfileTransversalBincontent,"ProfileTransversalBincontent[8]/I");
4596 
4598 // cout << " IRGENDAWS IST HIER FALSCH MIT BEM BRACH FILLING !!! SEEMS TO BE SOLVED SINCE ARRAY FILLING WAS WRONG! "<< endl;
4600 
4601 
4602  // temporary method to store MC information...
4603  // we probably try to extent it to an own structure:
4604  // See method and structure: BuildParametrizationsMCInfo
4605 
4606  EdbShowerP* show=0;
4607  EdbShowerP::Para_YY para_YY;
4608 
4609  // Check for first shower if desired parametrisation was already done:
4610  show=(EdbShowerP*)eRecoShowerArray->At(0);
4611  Bool_t ToDoPara= show->GetParametrisationIsDone(5); // YY==5
4612  //cout << "EdbShowRec::WriteParametrisation_YY() show->GetParametrisationIsDone(5): " << ToDoPara << endl;
4613  if (!ToDoPara) {
4614  //cout << "EdbShowRec::WriteParametrisation_YY() Start Building BuildParametrisation(5);" << endl;
4615  }
4616 
4617  Int_t statuscounter=eRecoShowerArrayN/10;
4618 
4619  for (Int_t i=0; i<eRecoShowerArrayN; ++i ) {
4620  if (i%statuscounter==0) cout << "EdbShowRec::WriteParametrizations 10% more done." << endl;
4621 
4622  show=(EdbShowerP*)eRecoShowerArray->At(i);
4623  if (gEDBDEBUGLEVEL>2) cout << "EdbShowRec::WriteParametrizations i= " << i << " of (" << eRecoShowerArrayN << "). BuildParametrization IsDone?"<< show->GetParametrisationIsDone(5) << endl;
4624 
4625  // Do parametrisation if necessary:
4626  if (!ToDoPara) {
4627  show->BuildParametrisation(5);
4628  }
4629 
4630  // Print it:
4631  if (gEDBDEBUGLEVEL>2) show->PrintParametrisation_YY();
4632 
4633  // Get it:
4634  para_YY=show->GetPara_YY();
4635 
4636 
4637  //Fill tree with values from parametrisation:
4638  ShowerAxisAngle=para_YY.ShowerAxisAngle;
4639  nseg=para_YY.nseg;
4640  for (int k=0; k<57; k++) ProfileLongitudinalBincontent[k]=para_YY.ProfileLongitudinalBincontent[k];
4641  for (int k=0; k<8; k++) ProfileTransversalBincontent[k]=para_YY.ProfileTransversalBincontent[k];
4642 
4643  treevar->Fill();
4644  if (gEDBDEBUGLEVEL>3) treevar->Show(treevar->GetEntries()-1);
4645 
4646  } //for(Int_t i=0; i<eRecoShowerArrayN; ++i )
4647 
4648 
4649  if (gEDBDEBUGLEVEL>3) {
4650  treevar->Print();
4651  }
4652 
4653 
4654 
4655  Log(2,"EdbShowRec::WriteParametrisation_YY()","Writing tree for para_YY parametrisation into file...");
4656 // treevar->Write();
4657  treevar->Write("",TObject::kWriteDelete);
4658  Log(2,"EdbShowRec::WriteParametrisation_YY()","Writing tree for para_YY parametrisation into file...done.");
4659 
4660  Log(2,"EdbShowRec::WriteParametrisation_YY()","Delete treevar...");
4661  delete treevar;
4662  treevar=0;
4663  Log(2,"EdbShowRec::WriteParametrisation_YY()","Delete treevar...done.");
4664 
4665 // eFile_Out_treebranch->Close(); // gives crash... dont know why, some tree has to be still connected...
4666 
4667 // cout << "EdbShowRec::WriteParametrisation_YY() Is File eFile_Out_treebranch already open? :" << eFile_Out_treebranch->IsOpen() << endl;
4668 
4669  Log(2,"EdbShowRec::WriteParametrisation_YY()","WriteParametrisation_YY()...done.");
4670  return;
4671 }
for(int i=0;i< nentries;i++)
Definition: check_shower.C:42
Para_YY GetPara_YY() const
Definition: EdbShowerP.h:566
void PrintParametrisation_YY()
Definition: EdbShowerP.cxx:2533
Definition: EdbShowerP.h:215
Int_t ProfileLongitudinalBincontent[57]
Definition: EdbShowerP.h:219
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:217
Int_t ProfileTransversalBincontent[8]
Definition: EdbShowerP.h:220
Int_t nseg
Definition: EdbShowerP.h:218

◆ WriteRecoShowerArray()

void EdbShowRec::WriteRecoShowerArray ( TObjArray *  RecoShowerArray)

◆ WriteRecoShowerArrayWithoutTTree()

void EdbShowRec::WriteRecoShowerArrayWithoutTTree ( TObjArray *  RecoShowerArray)

NOT WORKING YET:::: still segmentation faults..../// solved, but I dont know why.... still crashing ... Test without writing the TTree:

Member Data Documentation

◆ eActualAlg

EdbShowAlg* EdbShowRec::eActualAlg
private

◆ eActualAlgParameterset

Int_t EdbShowRec::eActualAlgParameterset[10]
private

◆ eAli

EdbPVRec* EdbShowRec::eAli
private

◆ eAliLoaded

Bool_t EdbShowRec::eAliLoaded
private

◆ eAliNpat

Int_t EdbShowRec::eAliNpat
private

◆ eAliStreamType

TString EdbShowRec::eAliStreamType
private

◆ eAliStreamTypeStep

Int_t EdbShowRec::eAliStreamTypeStep
private

◆ eAliZMax

Float_t EdbShowRec::eAliZMax
private

◆ eAliZMaxPID

Int_t EdbShowRec::eAliZMaxPID
private

◆ eAliZMin

Float_t EdbShowRec::eAliZMin
private

◆ eAliZMinPID

Int_t EdbShowRec::eAliZMinPID
private

◆ eDoEnergy

Int_t EdbShowRec::eDoEnergy
private

◆ eDoId

Int_t EdbShowRec::eDoId
private

◆ eDoParametrization

Int_t EdbShowRec::eDoParametrization
private

◆ eDoReconstruction

Int_t EdbShowRec::eDoReconstruction
private

◆ eDoVtxAttach

Int_t EdbShowRec::eDoVtxAttach
private

◆ eFile_In_shower

TFile* EdbShowRec::eFile_In_shower
private

◆ eFile_In_treebranch

TFile* EdbShowRec::eFile_In_treebranch
private

◆ eFile_Out_shower

TFile* EdbShowRec::eFile_Out_shower
private

◆ eFile_Out_treebranch

TFile* EdbShowRec::eFile_Out_treebranch
private

◆ eFilename_EdbPVRecObject

TString EdbShowRec::eFilename_EdbPVRecObject
private

◆ eFilename_In_shower

TString EdbShowRec::eFilename_In_shower
private

◆ eFilename_In_treebranch

TString EdbShowRec::eFilename_In_treebranch
private

◆ eFilename_LinkedTracks

TString EdbShowRec::eFilename_LinkedTracks
private

◆ eFilename_LnkDef

TString EdbShowRec::eFilename_LnkDef
private

◆ eFilename_Out_shower

TString EdbShowRec::eFilename_Out_shower
private

◆ eFilename_Out_treebranch

TString EdbShowRec::eFilename_Out_treebranch
private

◆ eFirstPlate

Int_t EdbShowRec::eFirstPlate
private

◆ eFirstPlate_eAliPID

Int_t EdbShowRec::eFirstPlate_eAliPID
private

◆ eInBTArray

TObjArray* EdbShowRec::eInBTArray
private

◆ eInBTArrayFraction

Double_t EdbShowRec::eInBTArrayFraction
private

◆ eInBTArrayLoaded

Bool_t EdbShowRec::eInBTArrayLoaded
private

◆ eInBTArrayMaxSize

Int_t EdbShowRec::eInBTArrayMaxSize
private

◆ eInBTArrayN

Int_t EdbShowRec::eInBTArrayN
private

◆ eInBTCuts

TCut* EdbShowRec::eInBTCuts[3]
private

◆ eInBTTree

TTree* EdbShowRec::eInBTTree
private

root-style text cuts

◆ eLastPlate

Int_t EdbShowRec::eLastPlate
private

◆ eLastPlate_eAliPID

Int_t EdbShowRec::eLastPlate_eAliPID
private

◆ eMiddlePlate

Int_t EdbShowRec::eMiddlePlate
private

◆ eMiddlePlate_eAliPID

Int_t EdbShowRec::eMiddlePlate_eAliPID
private

◆ eName_Out_shower

TString EdbShowRec::eName_Out_shower
private

◆ eName_Out_treebranch

TString EdbShowRec::eName_Out_treebranch
private

◆ eNumberPlate

Int_t EdbShowRec::eNumberPlate
private

◆ eNumberPlate_eAliPID

Int_t EdbShowRec::eNumberPlate_eAliPID
private

◆ eParaNames

TString EdbShowRec::eParaNames[8]
private

◆ eParaTypes

Int_t EdbShowRec::eParaTypes[8]
private

◆ eProposedFirstPlate

Int_t EdbShowRec::eProposedFirstPlate
private

◆ eProposedLastPlate

Int_t EdbShowRec::eProposedLastPlate
private

◆ eProposedMiddlePlate

Int_t EdbShowRec::eProposedMiddlePlate
private

◆ eProposedNumberPlate

Int_t EdbShowRec::eProposedNumberPlate
private

◆ eReadFileShower

Bool_t EdbShowRec::eReadFileShower
private

◆ eReadFileTreebranch

Bool_t EdbShowRec::eReadFileTreebranch
private

◆ eRecoShowerArray

TObjArray* EdbShowRec::eRecoShowerArray
private

◆ eRecoShowerArrayN

Int_t EdbShowRec::eRecoShowerArrayN
private

◆ eRecoShowerTreetreebranch

TTree* EdbShowRec::eRecoShowerTreetreebranch
private

◆ eShowAlgArray

TObjArray* EdbShowRec::eShowAlgArray
private

◆ eShowAlgArrayLoaded

Bool_t EdbShowRec::eShowAlgArrayLoaded
private

◆ eShowAlgArrayMaxSize

Int_t EdbShowRec::eShowAlgArrayMaxSize
private

◆ eShowAlgArrayN

Int_t EdbShowRec::eShowAlgArrayN
private

◆ eShowAlgArraySingleN

Int_t EdbShowRec::eShowAlgArraySingleN[10]
private

◆ eUse_AliBT

Bool_t EdbShowRec::eUse_AliBT
private

◆ eUse_AliLT

Bool_t EdbShowRec::eUse_AliLT
private

◆ eUse_InBTelse

Bool_t EdbShowRec::eUse_InBTelse
private

◆ eUse_LT

Bool_t EdbShowRec::eUse_LT
private

◆ eUse_PVREC

Bool_t EdbShowRec::eUse_PVREC
private

◆ eUse_ROOTInBT

Bool_t EdbShowRec::eUse_ROOTInBT
private

◆ eUseAliSub

Bool_t EdbShowRec::eUseAliSub
private

◆ eUseNr

Int_t EdbShowRec::eUseNr
private

◆ eWriteFileShower

Bool_t EdbShowRec::eWriteFileShower
private

◆ eWriteFileTreebranch

Bool_t EdbShowRec::eWriteFileTreebranch
private

◆ IsPlateValuesLabel

Bool_t EdbShowRec::IsPlateValuesLabel
private

The documentation for this class was generated from the following files: