1594{
1595 cout << "EdbShowAlg_RC::Execute()" << endl;
1596 cout << "EdbShowAlg_RC::Execute DOING MAIN SHOWER RECONSTRUCTION HERE" << endl;
1597
1601
1602 Bool_t StillToLoop=kTRUE;
1603 Int_t ActualPID;
1604 Int_t newActualPID;
1605 Int_t STEP=-1;
1606 Int_t NLoopedPattern=0;
1608 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_SA::Execute--- STEP for patternloop direction = " << STEP << endl;
1609
1610
1611 if (
gEDBDEBUGLEVEL>2) cout <<
"EdbShowAlg_RC::Execute Loop over InBTs:" << endl;
1612
1613
1614
1615
1616
1618
1619
1620 if (
gEDBDEBUGLEVEL==2)
if ((i%100)==0) cout <<
eInBTArrayN <<
" InBT in total, still to do:"<<Form(
"%4d",i)<<
"\r\r\r\r"<<flush;
1621
1622
1623
1624
1625
1626
1627
1629
1630
1633 Float_t
X0=InBT->
X();
1634 Float_t Y0=InBT->
Y();
1635
1636
1637
1638
1639 RecoShower -> AddSegment(InBT);
1640 if (
gEDBDEBUGLEVEL>4) cout <<
"Segment (InBT) " << Segment <<
" was added to RecoShower." << endl;
1641
1642
1645
1646
1647
1648
1649
1650 ActualPID= InBT->
PID() ;
1651 newActualPID= InBT->
PID() ;
1652
1653 while (StillToLoop) {
1654 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_RC::Execute--- --- Doing patterloop " << ActualPID <<
" for patterns Z position=" <<
eAli_Sub->
GetPattern(ActualPID)->
Z() << endl;
1655
1656 for (Int_t btloop_cnt=0; btloop_cnt<
eAli_Sub->
GetPattern(ActualPID)->GetN(); ++btloop_cnt) {
1657
1660
1661
1662
1663 if (Segment->
MCEvt() > 0 )
if ( Segment->
MCEvt()!=InBT->
MCEvt() )
continue;
1664 if ( Abs(Segment->
X()-
X0) > 7000 )
continue;
1665 if ( Abs(Segment->
Y()-Y0) > 7000 )
continue;
1668
1669
1670
1671
1672
1673
1674 if (Segment->
X()==InBT->
X()&&Segment->
Y()==InBT->
Y()) {
1675 ;
1676 }
1677 else {
1678 RecoShower -> AddSegment(Segment);
1679 }
1680 if (
gEDBDEBUGLEVEL>4) cout <<
"Segment " << Segment <<
" was added at &Segment : " << &Segment << endl;
1681
1682 }
1683
1684 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_RC::Execute--- --- ActualPID= " << newActualPID <<
" done. Reconstructed shower has up to now: " << RecoShower->
N() <<
" Segments." << endl;
1685
1686
1687 newActualPID=ActualPID+STEP;
1688 ++NLoopedPattern;
1689
1690 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_RC::Execute--- --- newActualPID= " << newActualPID << endl;
1691 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_RC::Execute--- --- NLoopedPattern= " << NLoopedPattern << endl;
1693 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_RC::Execute--- --- StillToLoop= " << StillToLoop << endl;
1694
1695
1696 if (STEP==1) {
1698 if (newActualPID>
eLastPlate_eAliPID) cout <<
"EdbShowAlg_RC::Execute--- ---Stop Loop since: newActualPID>eLastPlate_eAliPID"<<endl;
1699 }
1700
1701 if (STEP==-1) {
1703 if (newActualPID<eLastPlate_eAliPID && gEDBDEBUGLEVEL>3) cout << "EdbShowAlg_RC::Execute--- ---Stop Loop since: newActualPID<eLastPlate_eAliPID"<<endl;
1704 }
1705
1708
1709 ActualPID=newActualPID;
1710 }
1711
1712
1714
1718
1719
1720
1721
1722
1723
1724
1725
1727 if (RecoShower->
N()>1) {
1729 }
1730 else {
1731
1732
1733 Log(3,
"EdbShowAlg_RC::Execute()",
"InBT # %d RecoShower->N()<=1: Dont add shower to RecoShowerArray. Delete this shower for memory safing.");
1734 delete RecoShower;
1736 }
1737
1738
1739
1740 StillToLoop=kTRUE;
1741 NLoopedPattern=0;
1742 }
1743
1744
1745
1747
1748 cout <<
"EdbShowAlg_RC::eRecoShowerArray() Entries: " <<
eRecoShowerArray->GetEntries() << endl;
1749 cout << "EdbShowAlg_RC::Execute()...done." << endl;
1750 return;
1751}
bool Log(int level, const char *location, const char *fmt,...)
Definition: EdbLog.cxx:75
brick X0
Definition: RecDispMC.C:112
void Print() const
Definition: EdbPattern.cxx:1693
EdbPattern * GetPattern(int id) const
Definition: EdbPattern.cxx:1721
Float_t X() const
Definition: EdbSegP.h:173
Float_t Y() const
Definition: EdbSegP.h:174
void PrintNice() const
Definition: EdbSegP.cxx:392
Int_t PID() const
Definition: EdbSegP.h:148
Int_t MCEvt() const
Definition: EdbSegP.h:145
Float_t Z() const
Definition: EdbPattern.h:84
EdbSegP * GetSegment(int i) const
Definition: EdbPattern.h:66
Bool_t FindPrecedingBTs(EdbSegP *s, EdbSegP *InBT, EdbPVRec *gAli, EdbShowerP *shower)
Definition: EdbShowAlg.cxx:1772
Bool_t GetConeOrTubeDistanceToBTOfShowerArray(EdbSegP *sa, EdbSegP *InBT, EdbShowerP *shower, Double_t CylinderRadius, Double_t ConeAngle)
Definition: EdbShowAlg.cxx:1829
void Transform_eAli(EdbSegP *InitiatorBT, Float_t ExtractSize)
Definition: EdbShowAlg.cxx:107
void AddRecoShowerArray(EdbShowerP *shower)
Definition: EdbShowAlg.h:120
void SetRecoShowerArrayN(Int_t RecoShowerArrayN)
Definition: EdbShowAlg.h:117
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
EdbPVRec * eAli_Sub
Definition: EdbShowAlg.h:74
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
gEDBDEBUGLEVEL
Definition: energy.C:7
#define NULL
Definition: nidaqmx.h:84