WARNING ... Somehow the calculation of "STEP" is not correct, when having data ordered patterns, it might go the wrong direction. Better use GetPatternNext(..,+1) to be sure to get the next pattern with increasing Z positions. To be checked: does it work also on Simulated ORFEO data? To be checked: does it work also on the testbeam data?
1218 Log(2,
"EdbShowAlg_OI::Execute()",
"DOING MAIN SHOWER RECONSTRUCTION HERE");
1224 Bool_t StillToLoop=kTRUE;
1228 Int_t NLoopedPattern=0;
1230 Int_t newZ_next_ascending_Z=0;
1231 Int_t newPID_next_ascending_Z=0;
1244 if (
gEDBDEBUGLEVEL>2) cout <<
"EdbShowAlg_OI::Execute--- STEP for patternloop direction = " << STEP << endl;
1248 if (
gEDBDEBUGLEVEL>2) cout <<
"EdbShowAlg_OI::Execute Loop over InBTs:" << endl;
1257 if (
gEDBDEBUGLEVEL==2)
if ((i%100)==0) cout <<
eInBTArrayN <<
" Initiator Basetracks (InBT) in total, still to do: " << Form(
"%06d",i) <<
"\r\r\r\r\r\r" << flush;
1270 Float_t
X0=InBT->
X();
1271 Float_t
Y0=InBT->
Y();
1276 RecoShower -> AddSegment(InBT);
1277 if (
gEDBDEBUGLEVEL>4) cout <<
"Segment (InBT) " << Segment <<
" was added to RecoShower." << endl;
1287 ActualPID= InBT->
PID() ;
1288 newActualPID= InBT->
PID() ;
1290 while (StillToLoop) {
1291 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_OI::Execute--- --- Doing patterloop " << ActualPID <<
" for patterns Z position=" <<
eAli_Sub->
GetPattern(ActualPID)->
Z() << endl;
1293 for (Int_t btloop_cnt=0; btloop_cnt<
eAli_Sub->
GetPattern(ActualPID)->GetN(); ++btloop_cnt) {
1299 if ( Segment->
MCEvt() > 0 )
if ( Segment->
MCEvt()!=InBT->
MCEvt() )
continue;
1300 if ( Abs(Segment->
X()-
X0) > 7000 )
continue;
1301 if ( Abs(Segment->
Y()-
Y0) > 7000 )
continue;
1313 if ( Segment->
Compare(InBT) == 0) {
1321 RecoShower -> AddSegment(Segment);
1323 if (
gEDBDEBUGLEVEL>4) cout <<
"Segment " << Segment <<
" was added at &Segment : " << &Segment << endl;
1328 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_OI::Execute--- --- ActualPID= " << ActualPID <<
" at Z= " <<
eAli_Sub->
GetPattern(ActualPID)->
Z() <<
" done. Reconstructed shower has up to now: " << RecoShower->
N() <<
" Segments." << endl;
1338 if (
NULL == newPat_next_ascending_Z ) {
1340 cout <<
"newPat_next_ascending_Z is NULL pointer ! So it is nonexisting! (possibly last plate); " << endl;
1341 cout <<
"EdbShowAlg_OI::Execute--- ---Stop Loop since: newPat_next_ascending_Z is NULL pointer "<<endl;
1346 newZ_next_ascending_Z = newPat_next_ascending_Z->
Z();
1347 newPID_next_ascending_Z = newPat_next_ascending_Z->
PID();
1357 newActualPID=newPID_next_ascending_Z;
1361 cout <<
"EdbShowAlg_OI::Execute--- --- newActualPID= " << newActualPID << endl;
1362 cout <<
"EdbShowAlg_OI::Execute--- --- newActualZ= " <<
eAli_Sub->
GetPattern(newActualPID)->
Z() << endl;
1363 cout <<
"EdbShowAlg_OI::Execute--- --- NLoopedPattern= " << NLoopedPattern << endl;
1364 cout <<
"EdbShowAlg_OI::Execute--- --- eNumberPlate_eAliPID= " <<
eNumberPlate_eAliPID << endl;
1365 cout <<
"EdbShowAlg_OI::Execute--- --- StillToLoop= " << StillToLoop << endl;
1366 cout <<
"EdbShowAlg_OI::Execute--- --- We have to decide, if to loop on for the next pattern... (out of the " <<
eAli_Sub->
Npatterns() <<
" patterns)." << endl;
1385 { StillToLoop=kFALSE;
1397 ActualPID=newActualPID;
1419 if (RecoShower->
N()>1) {
1425 Log(3,
"EdbShowAlg_OI::Execute()",
"InBT # %d RecoShower->N()<=1: Dont add shower to RecoShowerArray. Delete this shower for memory safing.");
1448 cout <<
"================================================================================="<<endl;
1450 cout <<
"================================================================================="<<endl;
1456 Log(2,
"EdbShowAlg_OI::Execute()",
"DOING MAIN SHOWER RECONSTRUCTION HERE...done.");
Definition: EdbPattern.h:280
int PID() const
Definition: EdbPattern.h:329
Int_t Npatterns() const
Definition: EdbPattern.h:380
void Print() const
Definition: EdbPattern.cxx:1853
EdbPattern * GetPattern(int id) const
Definition: EdbPattern.cxx:1887
EdbPattern * GetPatternNext(float z, int dir) const
Definition: EdbPattern.cxx:2023
Float_t X() const
Definition: EdbSegP.h:170
Int_t Compare(const TObject *obj) const
Definition: EdbSegP.cxx:446
Float_t Y() const
Definition: EdbSegP.h:171
void PrintNice() const
Definition: EdbSegP.cxx:418
Int_t PID() const
Definition: EdbSegP.h:145
Int_t MCEvt() const
Definition: EdbSegP.h:142
Float_t Z() const
Definition: EdbPattern.h:87
EdbSegP * GetSegment(int i) const
Definition: EdbPattern.h:66
Bool_t FindPrecedingBTs(EdbSegP *s, EdbSegP *InBT, EdbPVRec *gAli, EdbShowerP *shower)
Definition: EdbShowAlg.cxx:1479
void UpdateShowerIDs()
Definition: EdbShowAlg.cxx:479
void Transform_eAli(EdbSegP *InitiatorBT, Float_t ExtractSize)
Definition: EdbShowAlg.cxx:107
void AddRecoShowerArray(EdbShowerP *shower)
Definition: EdbShowAlg.h:120
Bool_t IsInConeTube(EdbSegP *sTest, EdbSegP *sStart, Double_t CylinderRadius, Double_t ConeAngle)
Definition: EdbShowAlg.cxx:248
TObjArray * eRecoShowerArray
Definition: EdbShowAlg.h:70
Int_t eFirstPlate_eAliPID
Definition: EdbShowAlg.h:65
Int_t eLastPlate_eAliPID
Definition: EdbShowAlg.h:66
Int_t eInBTArrayN
Definition: EdbShowAlg.h:63
TObjArray * eInBTArray
Definition: EdbShowAlg.h:62
Int_t eNumberPlate_eAliPID
Definition: EdbShowAlg.h:68
Int_t eRecoShowerArrayN
Definition: EdbShowAlg.h:71
EdbPVRec * eAli_Sub
Definition: EdbShowAlg.h:74
void UpdateShowerMetaData()
Definition: EdbShowAlg.cxx:492
Int_t eActualAlgParametersetNr
Definition: EdbShowAlg.h:54
Definition: EdbShowerP.h:28
Int_t N() const
Definition: EdbShowerP.h:412
void PrintNice()
Definition: EdbShowerP.cxx:2339
void PrintSegments()
Definition: EdbShowerP.cxx:2367
void PrintBasics()
Definition: EdbShowerP.cxx:2360
void Update()
Definition: EdbShowerP.cxx:975
float X0
Definition: emthickness.cpp:69
float Y0
Definition: emthickness.cpp:70
gEDBDEBUGLEVEL
Definition: energy.C:7
#define NULL
Definition: nidaqmx.h:84