CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
TestTrack Class Reference

#include <TestTrack.h>

+ Inheritance diagram for TestTrack:

Public Member Functions

 TestTrack (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~TestTrack ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
void reset ()
 
void reset_hit ()
 
void reset_cluster_1d ()
 
void reset_cluster_2d ()
 
void reset_map ()
 
void reset_track ()
 

Detailed Description

Definition at line 30 of file TestTrack.h.

Constructor & Destructor Documentation

◆ TestTrack()

TestTrack::TestTrack ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 47 of file TestTrack.cxx.

47 :
48 Algorithm(name,pSvcLocator){
49
50 declareProperty("selGoodDigi",m_selGoodDigi=1);
51 declareProperty("minDigiTime",m_minDigiTime=-8875);
52 declareProperty("maxDigiTime",m_maxDigiTime=-8562);
53 declareProperty("minQDigi",myQMin=0.0);
54 declareProperty("LUTfile", lutfile = "/bes3fs/cgemCosmic/data/CGEM_cosmic_look_up_table_from_17_to_17.root");
55 declareProperty("align_flag", align_flag = false);
56 declareProperty("OutputFileName", OutputFileName="track.root");
57
58}

◆ ~TestTrack()

TestTrack::~TestTrack ( )

Definition at line 60 of file TestTrack.cxx.

60 {
61 // delete m_SvcCgem;
62 // delete f;
63 // delete Tdigi;
64 // delete anode;
65 // delete tree;
66 // delete output;
67 delete lutreader;
68}

Member Function Documentation

◆ execute()

StatusCode TestTrack::execute ( )

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;

Definition at line 506 of file TestTrack.cxx.

506 {
507 bool print_debug = false;
508
509 //cout<<"TestTrack EXE Begin"<<endl;
510 MsgStream log(msgSvc(), name());
511
512 // if(event%1000==0) cout << "--------->TestTrack::execute " << event << endl;
513 reset();
514 //cout<<"Reset done"<<endl;
515
516 //interface to event data service
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 //retrieve CGEM hits from TDS
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 // cout << "total hit " << nhit << endl;
528
529 // loop on hits
530 int ihit=0;
531 //cout<<"Pre loop"<<endl;
532
533 CgemDigiCol::iterator iDigiCol;
534 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++)
535 {
536 //cout<<"Loop digi ihit: "<<ihit<<endl;
537 const Identifier ident = (*iDigiCol)->identify();
538 int strip = CgemID::strip(ident);
539 int layer = CgemID::layer(ident);
540 int sheet = CgemID::sheet(ident);
541 int view = 1;
542 bool is_xstrip = CgemID::is_xstrip(ident);
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;
551 hit_t[ihit] = time;
552 hit_q[ihit] = charge;
553
554 anode = m_SvcCgem->getReadoutPlane(layer, sheet);
555 if(view == 1) hit_length[ihit] = anode->getVStripLength(strip);
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 //µTPC debug
573 if(print_debug) cout<<"Id: "<<ihit<<" layer: "<<layer<<" sheet: "<<sheet<<" view: "<<view<<" strip: "<<strip<<endl;
574 const double drift_gap = 5;
575 CgemGeoReadoutPlane* readoutPlane = m_SvcCgem->getReadoutPlane(layer,sheet);
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);
581 bool striptype = CgemID::is_xstrip((*iDigiCol)->identify());
582 int flagxv;
583 if(striptype == true) flagxv = 0;
584 else flagxv = 1;
585 double pos=9999.;
586 if(flagxv==0) pos=readoutPlane->getPhiFromXID(strip);
587 if(flagxv==1) pos=readoutPlane->getCentralVFromVID(strip);
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 // cout << "HIT " << ihit << " strip " << strip << " layer " << layer << " sheet " << sheet << " view " << view << endl;
596 // map strips to hits (maybe more hits for the same strip)
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 //cout<<"End loop digi"<<endl;
614
615 // -------------------------------------------------------------------
616 //retrieve CGEM clusters from TDS
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 //cout << "total cluster " << nclu << endl;
622 if(nclu > MAXNOFCLUSTERS) {
623 std::cout << "nclu " << nclu << std::endl;
624 nclu = MAXNOFCLUSTERS; // CHECK HACK
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 //cout<<"Pre loop cluster"<<endl;
645
646 RecCgemClusterCol::iterator iClusterCol;
647 for(iClusterCol=aClusterCol->begin(); iClusterCol!=aClusterCol->end(); iClusterCol++)
648 {
649
650 //cout<<"Loop Clus iclust: "<<ncluster<<endl;
651 if(ncluster==MAXNOFCLUSTERS) break;
652
653 int flag = (*iClusterCol)->getflag(); // 0=x 1=v 2=xv
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; // CHECK HACK FOR NOW
674 }
675
676 // anode mid gap radius
677 anode = m_SvcCgem->getReadoutPlane(layerid, sheetid);
678 double anode_mid_gap = anode->getMidRAtGap();
679
680 // beginning and ending flags
681 // if 2D cluster --> they are the x & v 1D clusters
682 // if 1D cluster --> they are the first and last contigous strips
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 // ------------------------------------------------------------------- 1D cluster
689 // positions CC & uTPC
690 if(flag==0 || flag == 1) {
691 cluster_1d_ID[ncluster] = (int) clusterid;
692 // time & charge
693 cluster_1d_t[ncluster] = 0; // CHECK
694 cluster_1d_tmean[ncluster] = 0;
695 cluster_1d_tqmax[ncluster] = 0;
696 cluster_1d_q[ncluster] = edep;
697 // layer/sheet/view
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 // from strip1 to strip2
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 //cout<<"\t pre hit"<<endl;
717
718 // get the hits
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 cout << "1D_CLUSTER index " << clusterid << " or " << ncluster
723 << " layer " << layerid << " sheet " << sheetid
724 << " view " << cluster_1d_view[ncluster] << endl;
725 cout << " from " << flagB << " to " << flagE << endl;
726 cout << "hits: ";
727 **/
728
729 for(int istrip = 0; istrip < size; istrip++) {
730
731 //cout<<"\t istrip: "<<istrip<<endl;
732 //cout<<"\t stripid: "<<flagB + istrip<<endl;
733
734 int stripid = flagB + istrip;
735 //cout<<"\t it2 pre : "<<&it2<<endl;
736 it2 = read_map_strip_to_hit->find(stripid);
737 //cout<<"\t it2 post : "<<&it2<<endl;
738 //cout<<"\t it2 first: "<<it2->first<<endl;
739 if(it2->first!=stripid){
740 //cout<<"\t SKIP HIT"<<endl;
741 continue;
742 }
743 //cout<<"\t it2 second: "<<&it2->second<<endl;
744 //cout<<"\t it2 second size: "<<it2->second.size()<<endl;
745 if(it2->second.size()!=1){
746 //cout<<"\t WRONG SIZE"<<endl;
747 continue;
748 }
749 //cout<<"\t it2 second: "<<it2->second.at(0)<<endl;
750 std::vector< int > hitlist = it2->second;
751 //cout<<"\t empty: "<<hitlist.empty()<<endl;
752 if(hitlist.empty()){
753 //cout<<"\t EMPTY HIT"<<endl;
754 continue;
755 }
756 int size_hitlist = hitlist.size();
757 cluster_1d_hitindex[ncluster][istrip] = hitlist[size_hitlist-1]; // take only the first hit CHECK THIS HAS TO BE CHANGED!
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();
772 int strip = CgemID::strip(ident);
773 int layer = CgemID::layer(ident);
774 int sheet = CgemID::sheet(ident);
775 int view = 1;
776 bool is_xstrip = CgemID::is_xstrip(ident);
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 //Faster hit time
789 int idhit = cluster_1d_hitindex[ncluster][istrip];
790 if(hit_t[idhit]<min_hit_time) min_hit_time = hit_t[idhit];
791 //Mean hit time
792 hit_mean_time += hit_t[idhit];
793 //Qmax hit time
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();
819 int strip = CgemID::strip(ident);
820 int layer = CgemID::layer(ident);
821 int sheet = CgemID::sheet(ident);
822 int view = 1;
823 bool is_xstrip = CgemID::is_xstrip(ident);
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 //uTPC debug - calibration
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 //first round
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 //second round
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 //first rotation
884 p1_tpc_corr += 0.0005;
885 //second rotation
886 p1_tpc_corr += 0.0005;
887 //third rotation
888 p1_tpc_corr += 0.0005;
889 //forth rotation
890 p1_tpc_corr += 0.0005;
891 //fifth rotation
892 p1_tpc_corr += 0.0005;
893 //sixth rotation
894 p1_tpc_corr += 0.0010;
895 //seventh rotation
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 //cout<<"-----------"<<endl;
912 //cout<<"size: "<<size<<" \t p0: "<<p0_tpc_corr<<" \t p1: "<<p1_tpc_corr<<" \t s0: "<<shift0_tpc_corr<<endl;
913
914 //cout<<"--------"<<endl;
915 //cout<<"param: "<<cluster_1d_inter_tpc[ncluster]<<" "<<cluster_1d_slope_tpc[ncluster]<<endl;
916 //cout<<"Size: "<<size<<endl;
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 //correction
927 float deltaX_corr = 0;
928 // ↗
929 if(cluster_1d_slope_tpc[ncluster]>0){
930 //if(cluster_1d_slope_tpc[ncluster]<0){
931
932 if(istrip==0) deltaX_corr -= p0_tpc_corr - shift0_tpc_corr;
933 else{
934 //deltaX_corr -= p0_tpc_corr + istrip * p1_tpc_corr;
935 }
936 }
937 // ↖
938 else{
939 if(istrip==size-1) deltaX_corr += p0_tpc_corr - shift0_tpc_corr;
940 else{
941 //deltaX_corr += p0_tpc_corr + (size-1-istrip) * p1_tpc_corr;
942 }
943 }
944 //cout<<"slope: "<<cluster_1d_slope_tpc[ncluster]<<" cc: "<<cluster_1d_phi_cc[ncluster]<<" x: "<<hit_x_tpc[idhit]<<" z: "<<hit_z_tpc[idhit]<<" dX: "<<deltaX_corr<<endl;
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 for(int istrip = 0; istrip < size; istrip++) {
959 //Get the strip ID
960 int idhit = cluster_1d_hitindex[ncluster][istrip];
961 cout<<cluster_1d_hitindex[ncluster][istrip]<<" ";
962 if(idhit!=-1){
963 //Find the strip
964 CgemDigiCol::iterator iDigiCol;
965 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++){
966 const Identifier ident = (*iDigiCol)->identify();
967 int strip = CgemID::strip(ident);
968 int layer = CgemID::layer(ident);
969 int sheet = CgemID::sheet(ident);
970 int view = 1;
971 bool is_xstrip = CgemID::is_xstrip(ident);
972 if(is_xstrip == true) view = 0;
973 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]){
974 //do something
975 cout<<"("<<layer<<", "<<sheet<<", "<<view<<", "<<strip<<")";
976 }
977 }
978 }
979 else{
980 //do something else
981 cout<<"()";
982 }
983 }
984 cout<<endl;
985 */
986
987
988
989 // -----------------
990 ncluster_1d++;
991 }
992 // ----------
993 else if(flag==2 || flag==3) { // ------------------------------------- 2D - xv view
994 cluster_2d_ID[ncluster] = clusterid;
995 // time & charge
996 cluster_2d_t[ncluster] = 0; // CHECK
997 cluster_2d_tmean[ncluster] = 0;
998 cluster_2d_tqmax[ncluster] = 0;
999 cluster_2d_q[ncluster] = edep;
1000 // layer/sheet/view
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 // composing 2D_clusters
1013 cluster_2d_idx[ncluster] = flagB;
1014 cluster_2d_idv[ncluster] = flagE;
1015
1016 //Faster cluster time
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 //Mean time
1020 cluster_2d_tmean[ncluster] = 0.5*cluster_1d_tmean[flagB]+0.5*cluster_1d_tmean[flagE];
1021 //Max Q time
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 /** cout << "2D_CLUSTER index " << clusterid << " or " << ncluster
1026 << " layer " << layerid << " sheet " << sheetid
1027 << " view " << cluster_2d_view[ncluster] << endl;
1028 cout << " idx " << flagB << " idv " << flagE << endl;
1029 **/
1030
1031 if(flag==2) { // HACK THIS
1032 // find the highest charge cluster
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 // cluster counters
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 //cout<<"End Loop Clus"<<endl;
1104
1105 // std::cout << "highest charge cluster " << tmp_cluster_L1_S1 << " " << tmp_cluster_L2_S1 << " " << tmp_cluster_L2_S2 << std::endl;
1106 // std::cout << "charge " << tmp_charge_L1_S1 << " " << tmp_charge_L2_S1 << " " << tmp_charge_L2_S2 << std::endl;
1107
1108 // set the highest charge 2D - cluster
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 //retrieve CGEM tracks from TDS
1116 SmartDataPtr<RecMdcTrackCol> aTrackCol(m_evtSvc,"/Event/Recon/RecMdcTrackCol");
1117 if(!aTrackCol) {
1118 //cout<<"Could not retrieve CGEM track collection"<<endl;
1119 }
1120 else {
1121 //cout << "total track " << aTrackCol->size() << endl;
1122
1123 //cout<<"Pre Loop track"<<endl;
1124
1125 RecMdcTrackCol::iterator iTrackCol;
1126 for(iTrackCol=aTrackCol->begin(); iTrackCol!=aTrackCol->end(); iTrackCol++)
1127 {
1128 //cout<<"Loop track"<<endl;
1129
1130 RecMdcTrack *track = *iTrackCol;
1131 /*
1132 cout << "track id " << track->trackId() << endl;
1133 cout << "dr " << track->helix(0) << endl;
1134 cout << "phi0 " << track->helix(1) << endl;
1135 cout << "dz " << track->helix(3) << endl;
1136 cout << "tanL " << track->helix(4) << endl;
1137 */
1138 if(track->trackId() != 0) continue;
1139
1140 track_chi2 = track->chi2();
1141 //cout << "chi2 " << track_chi2 << endl;
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
1147 ClusterRefVec vecclusters = track->getVecClusters();
1148 track_nfitpoint = vecclusters.size(); // nof 2D clusters, NOTE! track->getNcluster() gives you the number of 1D clusters
1149
1150 // is the plane under test?
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++) {
1155 RecCgemCluster *tcluster = vecclusters.at(iclus);
1156 double phi = tcluster->getrecphi();
1157 double z = tcluster->getRecZ();
1158 track_clusterid[iclus] = tcluster->getclusterid();
1159
1160 track_layerid[iclus] = tcluster->getlayerid();
1161 track_sheetid[iclus] = tcluster->getsheetid();
1162 if(phi > 0) track_sheetid[iclus] = 1;
1163
1164 /*
1165 cout << "iclus " << iclus << " track_clusterid " << track_clusterid[iclus] << " phi " << phi
1166 << " layer " << track_layerid[iclus] << " sheet " << track_sheetid[iclus] << endl;
1167 */
1168 istestplane[track_layerid[iclus]][track_sheetid[iclus]] = false;
1169 }
1170
1171 for(int ilay=0; ilay<MAXNOFLAYER; ilay++) {
1172 for(int ishe=0; ishe<MAXNOFSHEET; ishe++) {
1173 /*
1174 cout << "situazione ilay " << ilay << " ishe " << ishe << " istestplane " << istestplane[ilay][ishe] << endl;
1175 */
1176 if(istestplane[ilay][ishe] == true) {
1177 track_test_layerid = ilay;
1178 track_test_sheetid = ishe;
1179 }
1180 }
1181 }
1182
1183 //cout << "UNDER TEST layer " << track_test_layerid << " sheet " << track_test_sheetid << endl;
1184
1185 // intersections - poca and intersections are computed in the aligned frame
1186 double xP; double yP; double zP;
1187 ComputePOCA(xP, yP, zP);
1188
1189 // L1
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); //1->up 2->down
1196
1197 ang_xy_L1 = angCR_xy_L1;
1198 ang_yz_L1 = angCR_yz_L1;
1199
1200 // L2
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); //3->up 4->down
1207
1208 ang_xy_L2 = angCR_xy_L2;
1209 ang_yz_L2 = angCR_yz_L2;
1210
1211 //L3
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); //5->up 6->down
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 // output
1225 // poca
1226 track_xpoca_glo = xP; track_ypoca_glo = yP; track_zpoca_glo = zP;
1227 // intersections
1228 // L1
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 // L2
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 //L3
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 //cout<<"Loop track End"<<endl;
1241
1242 tree->Fill();
1243
1244 event++;
1245 //cout<<"TestTrack EXE End"<<endl;
1246 return StatusCode::SUCCESS;
1247}
const double drift_gap
Double_t time
**********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
Definition KarLud.h:35
SmartRefVector< RecCgemCluster > ClusterRefVec
Definition RecMdcTrack.h:28
IMessageSvc * msgSvc()
#define MAXNOFSHEET
Definition TestTrack.h:28
#define MAXNOFCLUSTERS
Definition TestTrack.h:24
#define MAXNOFLAYER
Definition TestTrack.h:27
double getVStripLength(int V_ID) const
double getCentralVFromVID(int V_ID) const
double getPhiFromXID(int X_ID) const
static int strip(const Identifier &id)
Definition CgemID.cxx:83
static int sheet(const Identifier &id)
Definition CgemID.cxx:77
static int layer(const Identifier &id)
Definition CgemID.cxx:71
static bool is_xstrip(const Identifier &id)
Definition CgemID.cxx:64
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
Definition DstMdcTrack.h:66
const int trackId() const
Definition DstMdcTrack.h:52
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
Definition RecMdcTrack.h:70
void reset()

◆ finalize()

StatusCode TestTrack::finalize ( )

Definition at line 1249 of file TestTrack.cxx.

1249 {
1250 MsgStream log(msgSvc(),name());
1251 log << MSG::INFO << "TestTrack finalize()" << endreq;
1252 output->Write();
1253 output->Close();
1254 return StatusCode::SUCCESS;
1255}

◆ initialize()

StatusCode TestTrack::initialize ( )

Definition at line 459 of file TestTrack.cxx.

459 {
460 //cout<<"TestTrack INIT Begin"<<endl;
461 MsgStream log(msgSvc(), name());
462 log << MSG::INFO << "TestTrack initialize()" << endreq;
463
464
465 // CgemGeomSvc
466 StatusCode sc;
467 sc = service("CgemGeomSvc", m_SvcCgem);
468 if(sc != StatusCode::SUCCESS) {
469 log << MSG::ERROR << "can not use CgemGeomSvc" << endreq;
470 return StatusCode::FAILURE;
471 }
472
473 anode = m_SvcCgem->getReadoutPlane(0, 0);
474 anode_mid_gap_L1 = anode->getMidRAtGap();
475 anode = m_SvcCgem->getReadoutPlane(1, 0);
476 anode_mid_gap_L2 = anode->getMidRAtGap();
477 anode = m_SvcCgem->getReadoutPlane(2, 0);
478 anode_mid_gap_L3 = anode->getMidRAtGap();
479
480 midplane = m_SvcCgem->getMidDriftPtr();
481 alignment = m_SvcCgem->getAlignPtr() ;
482
483 // LUT
484 lutreader = new CgemLUTReader(lutfile);
485 lutreader->ReadLUT();
486
487 output = new TFile((TString)OutputFileName, "RECREATE");
488 tree = new TTree("tree","hit, cluster and track info tree");
489 DefineHitTree();
490 DefineClusterTree();
491 DefineTrackTree();
492
493 // --- get CgemCalibFunSvc ---
494 sc = service ("CgemCalibFunSvc", myCgemCalibSvc);
495 if ( sc.isFailure() ){
496 cout<< name() << "Could not load MdcCalibFunSvc!" << endl;
497 return sc;
498 }
499
500 event=0;
501 //cout<<"TestTrack INIT End"<<endl;
502 return StatusCode::SUCCESS;
503
504}
virtual CgemGeoAlign * getAlignPtr() const =0
virtual CgemMidDriftPlane * getMidDriftPtr() const =0

◆ reset()

void TestTrack::reset ( )

Definition at line 234 of file TestTrack.cxx.

234 {
235 reset_map();
238 reset_hit();
239 reset_track();
240}
void reset_cluster_2d()
void reset_cluster_1d()
void reset_map()
void reset_track()
void reset_hit()

Referenced by execute().

◆ reset_cluster_1d()

void TestTrack::reset_cluster_1d ( )

Definition at line 271 of file TestTrack.cxx.

271 {
272
273 ncluster_1d = 0;
274 ncluster_1d_L1_S1_x = 0;
275 ncluster_1d_L2_S1_x = 0;
276 ncluster_1d_L2_S2_x = 0;
277 ncluster_1d_L3_S1_x = 0;
278 ncluster_1d_L3_S2_x = 0;
279 ncluster_1d_L1_S1_v = 0;
280 ncluster_1d_L2_S1_v = 0;
281 ncluster_1d_L2_S2_v = 0;
282 ncluster_1d_L3_S1_v = 0;
283 ncluster_1d_L3_S2_v = 0;
284
285 for(int iclu = 0; iclu < MAXNOFCLUSTERS; iclu++)
286 {
287 cluster_1d_ID[iclu] = -1;
288 cluster_1d_t[iclu] = 0.;
289 cluster_1d_tmean[iclu] = 0.;
290 cluster_1d_tqmax[iclu] = 0.;
291 cluster_1d_q[iclu] = 0.;
292 cluster_1d_r[iclu] = 0.;
293 cluster_1d_v[iclu] = 0.;
294 cluster_1d_phi[iclu] = 0.;
295 cluster_1d_v_cc[iclu] = 0.;
296 cluster_1d_phi_cc[iclu] = 0.;
297 cluster_1d_v_tpc[iclu] = 0.;
298 cluster_1d_phi_tpc[iclu] = 0.;
299 cluster_1d_slope_tpc[iclu] = 0.;
300 cluster_1d_inter_tpc[iclu] = 0.;
301 cluster_1d_layerid[iclu] = -1;
302 cluster_1d_sheetid[iclu] = -1;
303 cluster_1d_view[iclu] = -1;
304 cluster_1d_size[iclu] = -1;
305 cluster_1d_strip1[iclu] = -1;
306 cluster_1d_strip2[iclu] = -1;
307 for(int ihit = 0; ihit < MAXNOFHITS; ihit++) cluster_1d_hitindex[iclu][ihit] = -1;
308 }
309}
#define MAXNOFHITS
Definition TestTrack.h:25

Referenced by reset().

◆ reset_cluster_2d()

void TestTrack::reset_cluster_2d ( )

Definition at line 311 of file TestTrack.cxx.

311 {
312
313 ncluster_2d = 0;
314 ncluster_2d_L1_S1 = 0;
315 ncluster_2d_L2_S1 = 0;
316 ncluster_2d_L2_S2 = 0;
317 ncluster_2d_L3_S1 = 0;
318 ncluster_2d_L3_S2 = 0;
319
320 for(int iclu = 0; iclu < MAXNOFCLUSTERS; iclu++)
321 {
322 cluster_2d_ID[iclu] = -1;
323 cluster_2d_t[iclu] = 0.;
324 cluster_2d_tmean[iclu] = 0.;
325 cluster_2d_tqmax[iclu] = 0.;
326 cluster_2d_q[iclu] = 0.;
327 cluster_2d_r[iclu] = 0.;
328 cluster_2d_z[iclu] = 0.;
329 cluster_2d_phi[iclu] = 0.;
330 cluster_2d_z_cc[iclu] = 0.;
331 cluster_2d_phi_cc[iclu] = 0.;
332 cluster_2d_z_tpc[iclu] = 0.;
333 cluster_2d_phi_tpc[iclu] = 0.;
334 cluster_2d_layerid[iclu] = -1;
335 cluster_2d_sheetid[iclu] = -1;
336 cluster_2d_view[iclu] = -1;
337 cluster_2d_idx[iclu] = -1;
338 cluster_2d_idv[iclu] = -1;
339 cluster_2d_highest[iclu] = -1;
340 }
341}

Referenced by reset().

◆ reset_hit()

void TestTrack::reset_hit ( )

Definition at line 242 of file TestTrack.cxx.

242 {
243 // event = 0;
244 nhit = 0;
245
246 for(int ihit = 0; ihit < MAXNOFHITS; ihit++) {
247 hit_strip[ihit] = -1;
248 hit_view[ihit] = -1;
249 hit_layer[ihit] = -1;
250 hit_sheet[ihit] = -1;
251 hit_length[ihit] = -1;
252 hit_channel[ihit] = -1;
253 hit_roc[ihit] = -1;
254 hit_feb[ihit] = -1;
255 hit_tiger[ihit] = -1;
256 hit_chip[ihit] = -1;
257 hit_t[ihit] = 0;
258 hit_q[ihit] = 0;
259 hit_x_tpc[ihit] = 0;
260 hit_z_tpc[ihit] = 0;
261 hit_ex_tpc[ihit] = 0;
262 hit_ez_tpc[ihit] = 0;
263 hit_deltax_tpc[ihit] = 0;
264 hit_deltaz_tpc[ihit] = 0;
265 hit_order[ihit] = -1;
266 hit_quality[ihit] = 0;
267 hit_selgooddigi[ihit] = 0;
268 }
269}

Referenced by reset().

◆ reset_map()

void TestTrack::reset_map ( )

Definition at line 343 of file TestTrack.cxx.

343 {
344 map_L1_S1_stripx_to_hit.clear();
345 map_L2_S1_stripx_to_hit.clear();
346 map_L2_S2_stripx_to_hit.clear();
347 map_L3_S1_stripx_to_hit.clear();
348 map_L3_S2_stripx_to_hit.clear();
349 map_L1_S1_stripv_to_hit.clear();
350 map_L2_S1_stripv_to_hit.clear();
351 map_L2_S2_stripv_to_hit.clear();
352 map_L3_S1_stripv_to_hit.clear();
353 map_L3_S2_stripv_to_hit.clear();
354}

Referenced by reset().

◆ reset_track()

void TestTrack::reset_track ( )

Definition at line 356 of file TestTrack.cxx.

356 {
357
358 // parameters
359 track_dr = -9999;
360 track_phi0 = -9999;
361 track_dz = -9999;
362 track_tanL = -9999;
363 track_chi2 = 9999;
364
365 // clusters
366 track_nfitpoint = 0;
367 for(int iclus=0; iclus < MAXNOFFITPOINT; iclus++) {
368 track_clusterid[iclus] = -1;
369 track_layerid[iclus] = -1;
370 track_sheetid[iclus] = -1;
371 }
372
373 // planes under test
374 track_test_layerid = -1;
375 track_test_sheetid = -1;
376
377 // poca
378 track_xpoca_glo = -9999;
379 track_ypoca_glo = -9999;
380 track_zpoca_glo = -9999;
381
382 // intersections
383 // L1
384 track_x1top_glo = -9999;
385 track_y1top_glo = -9999;
386 track_z1top_glo = -9999;
387 track_x1bot_glo = -9999;
388 track_y1bot_glo = -9999;
389 track_z1bot_glo = -9999;
390 // L2
391 track_x2top_glo = -9999;
392 track_y2top_glo = -9999;
393 track_z2top_glo = -9999;
394 track_x2bot_glo = -9999;
395 track_y2bot_glo = -9999;
396 track_z2bot_glo = -9999;
397 // L3
398 track_x3top_glo = -9999;
399 track_y3top_glo = -9999;
400 track_z3top_glo = -9999;
401 track_x3bot_glo = -9999;
402 track_y3bot_glo = -9999;
403 track_z3bot_glo = -9999;
404
405}
#define MAXNOFFITPOINT
Definition TestTrack.h:26

Referenced by reset().


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