cout << "1D_CLUSTER index " << clusterid << " or " << ncluster << " layer " << layerid << " sheet " << sheetid << " view " << cluster_1d_view[ncluster] << endl; cout << " from " << flagB << " to " << flagE << endl; cout << "hits: ";
cout << "2D_CLUSTER index " << clusterid << " or " << ncluster << " layer " << layerid << " sheet " << sheetid << " view " << cluster_2d_view[ncluster] << endl; cout << " idx " << flagB << " idv " << flagE << endl;
506 {
507 bool print_debug = false;
508
509
510 MsgStream log(
msgSvc(), name());
511
512
514
515
516
517 ISvcLocator* svcLocator = Gaudi::svcLocator();
518 StatusCode sc=svcLocator->service("EventDataSvc", m_evtSvc);
519 if (sc.isFailure())
520 cout<<"Could not accesss EventDataSvc!"<<endl;
521
522
523 SmartDataPtr<CgemDigiCol> aDigiCol(m_evtSvc,"/Event/Digi/CgemDigiCol");
524 if(!aDigiCol)
525 cout<<"Could not retrieve CGEM digi collection"<<endl;
526 nhit = aDigiCol->size();
527
528
529
530 int ihit=0;
531
532
533 CgemDigiCol::iterator iDigiCol;
534 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++)
535 {
536
537 const Identifier ident = (*iDigiCol)->identify();
541 int view = 1;
543 if(is_xstrip == true) view = 0;
544 double charge = (*iDigiCol)->getCharge_fc();
545 double time = (*iDigiCol)->getTime_ns();
546
547 hit_strip[ihit] = strip;
548 hit_layer[ihit] = layer;
549 hit_sheet[ihit] = sheet;
550 hit_view[ihit] = view;
552 hit_q[ihit] = charge;
553
556 else hit_length[ihit] = anode->
getLength();
557
558 int channel = lutreader->
GetChannel(layer, sheet, view, strip);
559 int roc = lutreader->
GetROC(layer, sheet, view, strip);
560 int feb = lutreader->
GetFEB(layer, sheet, view, strip);
561 int tiger = lutreader->
GetTIGER(layer, sheet, view, strip);
562 int chip = lutreader->
GetChip(layer, sheet, view, strip);
563 int quality = lutreader->
GetQuality(layer, sheet, view, strip);
564
565 hit_channel[ihit] = channel;
566 hit_roc[ihit] = roc;
567 hit_feb[ihit] = feb;
568 hit_tiger[ihit] = tiger;
569 hit_chip[ihit] = chip;
570 hit_quality[ihit] = quality;
571
572
573 if(print_debug) cout<<"Id: "<<ihit<<" layer: "<<layer<<" sheet: "<<sheet<<" view: "<<view<<" strip: "<<strip<<endl;
576 double time_rising = myCgemCalibSvc->
getTimeRising(layer, view, sheet, 0, 0, 0.);
577 double time_falling = myCgemCalibSvc->
getTimeFalling(layer, view, sheet, 0, 0, 0.);
578 double time_gap = time_falling-time_rising;
579 double drift_velocity =
drift_gap/time_gap;
580 double time_ns = get_Time(iDigiCol);
582 int flagxv;
583 if(striptype == true) flagxv = 0;
584 else flagxv = 1;
585 double pos=9999.;
588 hit_x_tpc[ihit] = pos;
589 hit_z_tpc[ihit] = time_ns*drift_velocity;
590
591
592 if(selDigi(iDigiCol, m_selGoodDigi)==true) {
593 hit_selgooddigi[ihit] = 1;
594
595
596
597 std::map<int, std::vector < int > > *map_strip_to_hit = GetStripToHitMap(layer, sheet, view);
598 std::map<int, std::vector < int > >::iterator it1 = map_strip_to_hit->find(strip);
599 if (it1 != map_strip_to_hit->end()) {
600 it1->second.push_back(ihit);
601 }
602 else {
603 std::vector< int > hitlist;
604 hitlist.push_back(ihit);
605 std::pair<int, std::vector < int> > pair(strip, hitlist);
606 map_strip_to_hit->insert(pair);
607 }
608 }
609
610 ihit++;
611 }
612
613
614
615
616
617 SmartDataPtr<RecCgemClusterCol> aClusterCol(m_evtSvc,"/Event/Recon/RecCgemClusterCol");
618 if(!aClusterCol)
619 cout<<"Could not retrieve CGEM cluster collection"<<endl;
620 int nclu = aClusterCol->size();
621
623 std::cout << "nclu " << nclu << std::endl;
625 }
626
627 int nclusterx = 0;
628 int nclusterv = 0;
629 int nclusterxv = 0;
630
631 int tmp_cluster_L1_S1 = -1;
632 int tmp_cluster_L2_S1 = -1;
633 int tmp_cluster_L2_S2 = -1;
634 int tmp_cluster_L3_S1 = -1;
635 int tmp_cluster_L3_S2 = -1;
636 double tmp_charge_L1_S1 = 0.;
637 double tmp_charge_L2_S1 = 0.;
638 double tmp_charge_L2_S2 = 0.;
639 double tmp_charge_L3_S1 = 0.;
640 double tmp_charge_L3_S2 = 0.;
641
642 ncluster = 0;
643
644
645
646 RecCgemClusterCol::iterator iClusterCol;
647 for(iClusterCol=aClusterCol->begin(); iClusterCol!=aClusterCol->end(); iClusterCol++)
648 {
649
650
652
653 int flag = (*iClusterCol)->getflag();
654 int clusterid = (*iClusterCol)->getclusterid();
655 int trkid = (*iClusterCol)->getTrkId();
656 int layerid = (*iClusterCol)->getlayerid();
657 int sheetid = (*iClusterCol)->getsheetid();
658 double edep = (*iClusterCol)->getenergydeposit();
659 double phi = (*iClusterCol)->getrecphi();
660 double v = (*iClusterCol)->getrecv();
661 double z = (*iClusterCol)->getRecZ();
662 double phi_cc = (*iClusterCol)->getrecphi_CC();
663 double v_cc = (*iClusterCol)->getrecv_CC();
664 double z_cc = (*iClusterCol)->getRecZ_CC();
665 double phi_tpc = (*iClusterCol)->getrecphi_mTPC();
666 double v_tpc = (*iClusterCol)->getrecv_mTPC();
667 double z_tpc = (*iClusterCol)->getRecZ_mTPC();
668 double slope_tpc = (*iClusterCol)->getSlope_mTPC();
669 double inter_tpc = (*iClusterCol)->getInter_mTPC();
670
671 if(sheetid == -1) {
672 ncluster++;
673 continue;
674 }
675
676
679
680
681
682
683 int flagB = (*iClusterCol)->getclusterflagb();
684 int flagE = (*iClusterCol)->getclusterflage();
685 int size_real = 0;
686 int min_strip = 9999;
687 int max_strip =-9999;
688
689
690 if(flag==0 || flag == 1) {
691 cluster_1d_ID[ncluster] = (int) clusterid;
692
693 cluster_1d_t[ncluster] = 0;
694 cluster_1d_tmean[ncluster] = 0;
695 cluster_1d_tqmax[ncluster] = 0;
696 cluster_1d_q[ncluster] = edep;
697
698 cluster_1d_layerid[ncluster] = layerid;
699 cluster_1d_sheetid[ncluster] = sheetid;
700 cluster_1d_view[ncluster] = flag;
701 cluster_1d_r[ncluster] = anode_mid_gap;
702 cluster_1d_phi[ncluster] = phi;
703 cluster_1d_phi_cc[ncluster] = phi_cc;
704 cluster_1d_phi_tpc[ncluster] = phi_tpc;
705 cluster_1d_v[ncluster] =
v;
706 cluster_1d_v_cc[ncluster] = v_cc;
707 cluster_1d_v_tpc[ncluster] = v_tpc;
708 cluster_1d_slope_tpc[ncluster] = slope_tpc;
709 cluster_1d_inter_tpc[ncluster] = inter_tpc;
710
711 cluster_1d_strip1[ncluster] = flagB;
712 cluster_1d_strip2[ncluster] = flagE;
713 int size = flagE - flagB + 1;
714 cluster_1d_size[ncluster] = size;
715
716
717
718
719 std::map<int, std::vector < int > > *read_map_strip_to_hit = GetStripToHitMap(layerid, sheetid, flag);
720 std::map<int, std::vector < int > >::iterator it2;
721
722
723
724
725
726
727
728
729 for(int istrip = 0; istrip < size; istrip++) {
730
731
732
733
734 int stripid = flagB + istrip;
735
736 it2 = read_map_strip_to_hit->find(stripid);
737
738
739 if(it2->first!=stripid){
740
741 continue;
742 }
743
744
745 if(it2->second.size()!=1){
746
747 continue;
748 }
749
750 std::vector< int > hitlist = it2->second;
751
752 if(hitlist.empty()){
753
754 continue;
755 }
756 int size_hitlist = hitlist.size();
757 cluster_1d_hitindex[ncluster][istrip] = hitlist[size_hitlist-1];
758 }
759
760 if(print_debug) cout<<"N clus: "<<ncluster<<endl;
761 if(print_debug) cout<<"size: "<<size<<endl;
762
763 float min_hit_time = 999999;
764 float hit_mean_time = 0;
765 float hit_qmax_time = 0;
766 float hit_qmax = -99999;
767
768
769 CgemDigiCol::iterator iDigiCol;
770 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++){
771 const Identifier ident = (*iDigiCol)->identify();
775 int view = 1;
777 if(is_xstrip == true) view = 0;
778 if(layer==cluster_1d_layerid[ncluster] && sheet==cluster_1d_sheetid[ncluster] && view==cluster_1d_view[ncluster] && strip>=cluster_1d_strip1[ncluster] && strip<=cluster_1d_strip2[ncluster]){
779 if(strip<min_strip) min_strip = strip;
780 if(strip>max_strip) max_strip = strip;
781 size_real++;
782 }
783 }
784 cluster_1d_size_real[ncluster]=size_real;
785 cluster_1d_size_max[ncluster]=max_strip-min_strip+1;
786
787 for(int istrip = 0; istrip < size; istrip++) {
788
789 int idhit = cluster_1d_hitindex[ncluster][istrip];
790 if(hit_t[idhit]<min_hit_time) min_hit_time = hit_t[idhit];
791
792 hit_mean_time += hit_t[idhit];
793
794 if(hit_qmax<hit_q[idhit]) {
795 hit_qmax=hit_q[idhit];
796 hit_qmax_time=hit_t[idhit];
797 }
798 }
799 hit_mean_time /= size;
800
801 cluster_1d_t[ncluster] = min_hit_time;
802 cluster_1d_tmean[ncluster] = hit_mean_time;
803 cluster_1d_tqmax[ncluster] = hit_qmax_time;
804
805 if(print_debug) cout<<"size real: "<<cluster_1d_size_real[ncluster]<<endl;
806 if(print_debug) cout<<"size max : "<<cluster_1d_size_max[ncluster]<<endl;
807
808 if(print_debug) {
809 cout<<"ID hit: ";
810 for(int istrip = 0; istrip < size; istrip++) {
811 int idhit = cluster_1d_hitindex[ncluster][istrip];
812 cout<<cluster_1d_hitindex[ncluster][istrip]<<" ";
813 }
814 cout<<endl;
815
816 cout<<"Strip in the cluster: ";
817 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++){
818 const Identifier ident = (*iDigiCol)->identify();
822 int view = 1;
824 if(is_xstrip == true) view = 0;
825 if(layer==cluster_1d_layerid[ncluster] && sheet==cluster_1d_sheetid[ncluster] && view==cluster_1d_view[ncluster] && strip>=cluster_1d_strip1[ncluster] && strip<=cluster_1d_strip2[ncluster]){
826 cout<<strip<<" ";
827 }
828 }
829
830 cout<<"Check STRIP hit-cluster: ";
831 for(int istrip = 0; istrip < size; istrip++) {
832 int idhit = cluster_1d_hitindex[ncluster][istrip];
833 cout<<hit_strip[idhit]<<" ";
834 }
835 cout<<endl;
836
837 cout<<"Check x_tpc: ";
838 for(int istrip = 0; istrip < size; istrip++) {
839 int idhit = cluster_1d_hitindex[ncluster][istrip];
840 cout<<hit_x_tpc[idhit]<<" ";
841 }
842 cout<<endl;
843
844 cout<<"Check z_tpc: ";
845 for(int istrip = 0; istrip < size; istrip++) {
846 int idhit = cluster_1d_hitindex[ncluster][istrip];
847 cout<<hit_z_tpc[idhit]<<" ";
848 }
849 cout<<endl;
850
851 TF1 *f_tpc_cluster1 = new TF1("f_tpc_cluster1","pol1");
852 f_tpc_cluster1->SetParameters(cluster_1d_inter_tpc[ncluster],cluster_1d_slope_tpc[ncluster]);
853 cout<<"Check deltaX_tpc: ";
854 for(int istrip = 0; istrip < size; istrip++) {
855 int idhit = cluster_1d_hitindex[ncluster][istrip];
856 float deltaX = hit_x_tpc[idhit]-f_tpc_cluster1->GetX(hit_z_tpc[idhit]);
857 cout<<deltaX<<" ";
858 }
859
860 cout<<"Check deltaZ_tpc: ";
861 for(int istrip = 0; istrip < size; istrip++) {
862 int idhit = cluster_1d_hitindex[ncluster][istrip];
863 float deltaZ = hit_z_tpc[idhit]-f_tpc_cluster1->Eval(hit_x_tpc[idhit]);
864 cout<<deltaZ<<" ";
865 }
866 delete f_tpc_cluster1;
867 }
868
869
870 double time_rising = myCgemCalibSvc->
getTimeRising(cluster_1d_layerid[ncluster], cluster_1d_view[ncluster], cluster_1d_sheetid[ncluster], 0, 0, 0.);
871 double time_falling = myCgemCalibSvc->
getTimeFalling(cluster_1d_layerid[ncluster], cluster_1d_view[ncluster], cluster_1d_sheetid[ncluster], 0, 0, 0.);
872 double time_gap = time_falling-time_rising;
873 double drift_velocity = 5/time_gap;
874
875
876 float p0_tpc_corr = 0.003206 + size * (-0.0006184);
877 float p1_tpc_corr = -0.000500 + size * ( 0.0001325);
878 float shift0_tpc_corr = 0.003489 + size * ( 0.0003489);
879
880 p0_tpc_corr += 0.001030 + size * (-0.0006295);
881 p1_tpc_corr += 0.000902;
882 shift0_tpc_corr += 0.001105 + size * (-0.0002084);
883
884 p1_tpc_corr += 0.0005;
885
886 p1_tpc_corr += 0.0005;
887
888 p1_tpc_corr += 0.0005;
889
890 p1_tpc_corr += 0.0005;
891
892 p1_tpc_corr += 0.0005;
893
894 p1_tpc_corr += 0.0010;
895
896 p1_tpc_corr += 0.0010;
897
898
899 if(cluster_1d_view[ncluster]!=0 || cluster_1d_inter_tpc[ncluster]== -9999 || cluster_1d_slope_tpc[ncluster]==-9999){
900 for(int istrip = 0; istrip < size; istrip++) {
901 int idhit = cluster_1d_hitindex[ncluster][istrip];
902 if(idhit==-1) continue;
903 hit_deltax_tpc[idhit] = -9999;
904 hit_deltaz_tpc[idhit] = -9999;
905 hit_ex_tpc[idhit] = -9999;
906 hit_ez_tpc[idhit] = -9999;
907 hit_order[idhit] = -9999;
908 }
909 }
910 else{
911
912
913
914
915
916
917 for(int istrip = 0; istrip < size; istrip++) {
918 int idhit = cluster_1d_hitindex[ncluster][istrip];
919 if(idhit==-1) continue;
920 float pitch = 0.66;
921 float eX = sqrt(pow(pitch/sqrt(12.),2)+pow(pitch/sqrt(12.)*cluster_1d_q[ncluster]/cluster_1d_size[ncluster]/hit_q[idhit],2));
922 float eZ = 5*drift_velocity;
923 hit_ex_tpc[idhit] = eX;
924 hit_ez_tpc[idhit] = eZ;
925 hit_order[idhit]=istrip;
926
927 float deltaX_corr = 0;
928
929 if(cluster_1d_slope_tpc[ncluster]>0){
930
931
932 if(istrip==0) deltaX_corr -= p0_tpc_corr - shift0_tpc_corr;
933 else{
934
935 }
936 }
937
938 else{
939 if(istrip==size-1) deltaX_corr += p0_tpc_corr - shift0_tpc_corr;
940 else{
941
942 }
943 }
944
945 hit_x_tpc[idhit] += deltaX_corr;
946 double x_expc = (hit_z_tpc[idhit]-cluster_1d_inter_tpc[ncluster])/cluster_1d_slope_tpc[ncluster];
947 double z_expc = cluster_1d_slope_tpc[ncluster]*hit_x_tpc[idhit]+cluster_1d_inter_tpc[ncluster];
948 float deltaX = hit_x_tpc[idhit]-x_expc;
949 float deltaZ = hit_z_tpc[idhit]-z_expc;
950 hit_deltax_tpc[idhit] = deltaX;
951 hit_deltaz_tpc[idhit] = deltaZ;
952 }
953 }
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990 ncluster_1d++;
991 }
992
993 else if(flag==2 || flag==3) {
994 cluster_2d_ID[ncluster] = clusterid;
995
996 cluster_2d_t[ncluster] = 0;
997 cluster_2d_tmean[ncluster] = 0;
998 cluster_2d_tqmax[ncluster] = 0;
999 cluster_2d_q[ncluster] = edep;
1000
1001 cluster_2d_layerid[ncluster] = layerid;
1002 cluster_2d_sheetid[ncluster] = sheetid;
1003 if(layerid==0 && phi>0) cluster_2d_sheetid[ncluster] = 1;
1004 cluster_2d_view[ncluster] = flag;
1005 cluster_2d_r[ncluster] = anode_mid_gap;
1006 cluster_2d_z[ncluster] = z;
1007 cluster_2d_z_cc[ncluster] = z_cc;
1008 cluster_2d_z_tpc[ncluster] = z_tpc;
1009 cluster_2d_phi[ncluster] = phi;
1010 cluster_2d_phi_cc[ncluster] = phi_cc;
1011 cluster_2d_phi_tpc[ncluster] = phi_tpc;
1012
1013 cluster_2d_idx[ncluster] = flagB;
1014 cluster_2d_idv[ncluster] = flagE;
1015
1016
1017 if(cluster_1d_t[flagB]<cluster_1d_t[flagE]) cluster_2d_t[ncluster]=cluster_1d_t[flagB];
1018 else cluster_2d_t[ncluster]=cluster_1d_t[flagE];
1019
1020 cluster_2d_tmean[ncluster] = 0.5*cluster_1d_tmean[flagB]+0.5*cluster_1d_tmean[flagE];
1021
1022 if(cluster_1d_q[flagB]>cluster_1d_q[flagE]) cluster_2d_tqmax[ncluster]=cluster_1d_tqmax[flagB];
1023 else cluster_2d_tqmax[ncluster]=cluster_1d_tqmax[flagE];
1024
1025
1026
1027
1028
1029
1030
1031 if(flag==2) {
1032
1033 if(layerid==0) {
1034 if(edep > tmp_charge_L1_S1) {
1035 tmp_charge_L1_S1 = edep; tmp_cluster_L1_S1 = ncluster;
1036 }
1037 }
1038 else if(layerid==1 && sheetid==0) {
1039 if(edep > tmp_charge_L2_S1){
1040 tmp_charge_L2_S1 = edep; tmp_cluster_L2_S1 = ncluster;
1041 }
1042 }
1043 else if(layerid==1 && sheetid==1) {
1044 if(edep > tmp_charge_L2_S2){
1045 tmp_charge_L2_S2 = edep; tmp_cluster_L2_S2 = ncluster;
1046 }
1047 }
1048 else if(layerid==2 && sheetid==0) {
1049 if(edep > tmp_charge_L3_S1){
1050 tmp_charge_L3_S1 = edep; tmp_cluster_L3_S1 = ncluster;
1051 }
1052 }
1053 else if(layerid==2 && sheetid==1) {
1054 if(edep > tmp_charge_L3_S2){
1055 tmp_charge_L3_S2 = edep; tmp_cluster_L3_S2 = ncluster;
1056 }
1057 }
1058 }
1059
1060 ncluster_2d++;
1061 }
1062
1063 ncluster++;
1064 if(flag == 0) {
1065 nclusterx++;
1066 if(layerid == 0) ncluster_1d_L1_S1_x++;
1067 else if(layerid == 1) {
1068 if(sheetid == 0) ncluster_1d_L2_S1_x++;
1069 else ncluster_1d_L2_S2_x++;
1070 }
1071 else if(layerid == 2) {
1072 if(sheetid == 0) ncluster_1d_L3_S1_x++;
1073 else ncluster_1d_L3_S2_x++;
1074 }
1075 }
1076 else if(flag == 1) {
1077 nclusterv++;
1078 if(layerid == 0) ncluster_1d_L1_S1_v++;
1079 else if(layerid == 1) {
1080 if(sheetid == 0) ncluster_1d_L2_S1_v++;
1081 else ncluster_1d_L2_S2_v++;
1082 }
1083 else if(layerid == 2) {
1084 if(sheetid == 0) ncluster_1d_L3_S1_v++;
1085 else ncluster_1d_L3_S2_v++;
1086 }
1087 }
1088 else if(flag == 2) {
1089 nclusterxv++;
1090 if(layerid == 0) ncluster_2d_L1_S1++;
1091 else if(layerid == 1) {
1092 if(sheetid == 0) ncluster_2d_L2_S1++;
1093 else ncluster_2d_L2_S2++;
1094 }
1095 else if(layerid == 2) {
1096 if(sheetid == 0) ncluster_2d_L3_S1++;
1097 else ncluster_2d_L3_S2++;
1098 }
1099 }
1100
1101 }
1102
1103
1104
1105
1106
1107
1108
1109 if(tmp_cluster_L1_S1!=-1) cluster_2d_highest[tmp_cluster_L1_S1]=1;
1110 if(tmp_cluster_L2_S1!=-1) cluster_2d_highest[tmp_cluster_L2_S1]=1;
1111 if(tmp_cluster_L2_S2!=-1) cluster_2d_highest[tmp_cluster_L2_S2]=1;
1112 if(tmp_cluster_L3_S1!=-1) cluster_2d_highest[tmp_cluster_L3_S1]=1;
1113 if(tmp_cluster_L3_S2!=-1) cluster_2d_highest[tmp_cluster_L3_S2]=1;
1114
1115
1116 SmartDataPtr<RecMdcTrackCol> aTrackCol(m_evtSvc,"/Event/Recon/RecMdcTrackCol");
1117 if(!aTrackCol) {
1118
1119 }
1120 else {
1121
1122
1123
1124
1125 RecMdcTrackCol::iterator iTrackCol;
1126 for(iTrackCol=aTrackCol->begin(); iTrackCol!=aTrackCol->end(); iTrackCol++)
1127 {
1128
1129
1131
1132
1133
1134
1135
1136
1137
1138 if(track->
trackId() != 0)
continue;
1139
1140 track_chi2 = track->
chi2();
1141
1142 track_dr = track->
helix(0);
1143 track_phi0 = track->
helix(1);
1144 track_dz = track->
helix(3);
1145 track_tanL = track->
helix(4);
1146
1148 track_nfitpoint = vecclusters.size();
1149
1150
1151 bool istestplane[3][2];
1152 for(
int ilay=0; ilay<
MAXNOFLAYER; ilay++)
for(
int ishe=0; ishe<
MAXNOFSHEET; ishe++) istestplane[ilay][ishe] =
true;
1153
1154 for(int iclus=0; iclus < track_nfitpoint; iclus++) {
1157 double z = tcluster->
getRecZ();
1159
1160 track_layerid[iclus] = tcluster->
getlayerid();
1161 track_sheetid[iclus] = tcluster->
getsheetid();
1162 if(phi > 0) track_sheetid[iclus] = 1;
1163
1164
1165
1166
1167
1168 istestplane[track_layerid[iclus]][track_sheetid[iclus]] = false;
1169 }
1170
1173
1174
1175
1176 if(istestplane[ilay][ishe] == true) {
1177 track_test_layerid = ilay;
1178 track_test_sheetid = ishe;
1179 }
1180 }
1181 }
1182
1183
1184
1185
1186 double xP; double yP; double zP;
1187 ComputePOCA(xP, yP, zP);
1188
1189
1190 double xP1; double yP1; double zP1; double phiP1; double vP1;
1191 double xP2; double yP2; double zP2; double phiP2; double vP2;
1192
1193 double angCR_xy_L1, angCR_yz_L1;
1194
1195 bool gotit1 = ComputeIntersection(0, xP1, yP1, zP1, phiP1, vP1, xP2, yP2, zP2, phiP2, vP2, angCR_xy_L1, angCR_yz_L1);
1196
1197 ang_xy_L1 = angCR_xy_L1;
1198 ang_yz_L1 = angCR_yz_L1;
1199
1200
1201 double xP3; double yP3; double zP3; double phiP3; double vP3;
1202 double xP4; double yP4; double zP4; double phiP4; double vP4;
1203
1204 double angCR_xy_L2, angCR_yz_L2;
1205
1206 bool gotit2 = ComputeIntersection(1, xP3, yP3, zP3, phiP3, vP3, xP4, yP4, zP4, phiP4, vP4, angCR_xy_L2, angCR_yz_L2);
1207
1208 ang_xy_L2 = angCR_xy_L2;
1209 ang_yz_L2 = angCR_yz_L2;
1210
1211
1212 double xP5; double yP5; double zP5; double phiP5; double vP5;
1213 double xP6; double yP6; double zP6; double phiP6; double vP6;
1214
1215 double angCR_xy_L3, angCR_yz_L3;
1216
1217 bool gotit3 = ComputeIntersection(2, xP5, yP5, zP5, phiP5, vP5, xP6, yP6, zP6, phiP6, vP6, angCR_xy_L3, angCR_yz_L3);
1218
1219 ang_xy_L3 = angCR_xy_L3;
1220 ang_yz_L3 = angCR_yz_L3;
1221
1222 if(gotit1==false || gotit2==false || gotit3==false) cout << "TestTrack: error in intersection calculation. Intersection on L1 " << gotit1 << ", on L2 " << gotit2 << ", on L3 " << gotit3 << endl;
1223
1224
1225
1226 track_xpoca_glo = xP; track_ypoca_glo = yP; track_zpoca_glo = zP;
1227
1228
1229 track_x1top_glo = xP1; track_y1top_glo = yP1; track_z1top_glo = zP1; track_phi1top_loc = phiP1; track_v1top_loc = vP1;
1230 track_x1bot_glo = xP2; track_y1bot_glo = yP2; track_z1bot_glo = zP2; track_phi1bot_loc = phiP2; track_v1bot_loc = vP2;
1231
1232 track_x2top_glo = xP3; track_y2top_glo = yP3; track_z2top_glo = zP3; track_phi2top_loc = phiP3; track_v2top_loc = vP3;
1233 track_x2bot_glo = xP4; track_y2bot_glo = yP4; track_z2bot_glo = zP4; track_phi2bot_loc = phiP4; track_v2bot_loc = vP4;
1234
1235 track_x3top_glo = xP5; track_y3top_glo = yP5; track_z3top_glo = zP5; track_phi3top_loc = phiP5; track_v3top_loc = vP5;
1236 track_x3bot_glo = xP6; track_y3bot_glo = yP6; track_z3bot_glo = zP6; track_phi3bot_loc = phiP6; track_v3bot_loc = vP6;
1237 }
1238 }
1239
1240
1241
1242 tree->Fill();
1243
1244 event++;
1245
1246 return StatusCode::SUCCESS;
1247}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
SmartRefVector< RecCgemCluster > ClusterRefVec
double getVStripLength(int V_ID) const
double getCentralVFromVID(int V_ID) const
double getPhiFromXID(int X_ID) const
static int strip(const Identifier &id)
static int sheet(const Identifier &id)
static int layer(const Identifier &id)
static bool is_xstrip(const Identifier &id)
int GetChip(int ilayer, int isheet, int iview, int istrip)
int GetQuality(int ilayer, int isheet, int iview, int istrip)
int GetROC(int ilayer, int isheet, int iview, int istrip)
int GetChannel(int ilayer, int isheet, int iview, int istrip)
int GetTIGER(int ilayer, int isheet, int iview, int istrip)
int GetFEB(int ilayer, int isheet, int iview, int istrip)
const double chi2() const
const int trackId() const
const HepVector helix() const
......
virtual double getTimeRising(int layer, int xvFlag, int sheet, int stripID, double Q=100., double z=0.) const =0
virtual double getTimeFalling(int layer, int xvFlag, int sheet, int stripID, double Q=100., double z=0.) const =0
virtual CgemGeoReadoutPlane * getReadoutPlane(int iLayer, int iSheet) const =0
double getRecZ(void) const
int getclusterid(void) const
int getlayerid(void) const
double getrecphi(void) const
int getsheetid(void) const
const ClusterRefVec getVecClusters() const