835{
836 cout << "EdbShowAlg_CA::Execute()" << endl;
837 cout << "EdbShowAlg_CA::Execute DOING MAIN SHOWER RECONSTRUCTION HERE" << endl;
838
842
843 Bool_t StillToLoop=kTRUE;
844 Int_t ActualPID;
845 Int_t newActualPID;
846 Int_t STEP=-1;
847 Int_t NLoopedPattern=0;
848
850 cout << "======================================================"<<endl;
857 cout << "======================================================"<<endl;
858 }
859
861 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_CA::Execute--- STEP for patternloop direction = " << STEP << endl;
862
863
864
865
866
867
869
870
871 if (
gEDBDEBUGLEVEL==2)
if ((i%50)==0) cout <<
eInBTArrayN <<
" InBT in total, still to do:"<<Form(
"%4d",i)<<
"\r\r\r\r"<<flush;
873
874
875
876
877
878
879
880
881
882
884
885
886
889 Float_t
X0=InBT->
X();
890 Float_t Y0=InBT->
Y();
891
892
893
894
895 RecoShower -> AddSegment(InBT);
896 if (
gEDBDEBUGLEVEL>4) cout <<
"Segment (InBT) " << Segment <<
" was added to RecoShower." << endl;
897
898
899
902
905
906
907
908
909
910
911 ActualPID= InBT->
PID() ;
912 newActualPID= InBT->
PID() ;
913
914 while (StillToLoop) {
915 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_CA::Execute--- --- Doing patterloop id= " << ActualPID <<
" for pattern with Z position= " <<
eAli_Sub->
GetPattern(ActualPID)->
Z() << endl;
916
917 for (Int_t btloop_cnt=0; btloop_cnt<
eAli_Sub->
GetPattern(ActualPID)->GetN(); ++btloop_cnt) {
918
921
922
923
924 if ( Segment->
MCEvt() > 0 )
if ( Segment->
MCEvt()!=InBT->
MCEvt() )
continue;
925 if ( Abs(Segment->
X()-
X0) > 7000 )
continue;
926 if ( Abs(Segment->
Y()-Y0) > 7000 )
continue;
928
930
931
932
933
934
935 if (Segment->
X()==InBT->
X()&&Segment->
Y()==InBT->
Y()) {
936 ;
937 }
938 else {
939 RecoShower -> AddSegment(Segment);
940 }
941 if (
gEDBDEBUGLEVEL>4) cout <<
"Segment " << Segment <<
" was added at &Segment : " << &Segment << endl;
942
943
944 }
945
946 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_CA::Execute--- --- ActualPID= " << newActualPID <<
" done. Reconstructed shower has up to now: " << RecoShower->
N() <<
" Segments." << endl;
947
948
949 newActualPID=ActualPID+STEP;
950 ++NLoopedPattern;
951
952 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_CA::Execute--- --- newActualPID= " << newActualPID << endl;
953 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_CA::Execute--- --- NLoopedPattern= " << NLoopedPattern << endl;
955 if (
gEDBDEBUGLEVEL>3) cout <<
"EdbShowAlg_CA::Execute--- --- StillToLoop= " << StillToLoop << endl;
956
957
958 if (STEP==1) {
960 if (newActualPID>
eLastPlate_eAliPID) cout <<
"EdbShowAlg_CA::Execute--- ---Stop Loop since: newActualPID>eLastPlate_eAliPID"<<endl;
961 }
962
963 if (STEP==-1) {
965 if (newActualPID<eLastPlate_eAliPID && gEDBDEBUGLEVEL>3) cout << "EdbShowAlg_CA::Execute--- ---Stop Loop since: newActualPID<eLastPlate_eAliPID"<<endl;
966 }
967
970
971 ActualPID=newActualPID;
972 }
973
974
976
977
981
982
983
984
985
986
987
988
989 if (RecoShower->
N()>1) {
991 }
992 else {
993
994
995 Log(3,
"EdbShowAlg_CA::Execute()",
"InBT # %d RecoShower->N()<=1: Dont add shower to RecoShowerArray. Delete this shower for memory safing.");
996 delete RecoShower;
998 }
999
1000
1001
1002
1003
1004 StillToLoop=kTRUE;
1005 NLoopedPattern=0;
1006 }
1007
1008
1009
1011
1012
1013 cout <<
"EdbShowAlg_CA::eRecoShowerArray() Entries: " <<
eRecoShowerArray->GetEntries() << endl;
1014 cout << "EdbShowAlg_CA::Execute()...done." << endl;
1015 return;
1016}
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:1088
Bool_t GetConeTubeDistanceToInBT(EdbSegP *sa, EdbSegP *s, Double_t CylinderRadius, Double_t ConeAngle)
Definition: EdbShowAlg.cxx:1027
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
EdbPVRec * eAli
Definition: EdbShowAlg.h:59
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