BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
MrpcTrack Class Reference

#include <MrpcTrack.h>

Public Member Functions

 MrpcTrack ()
 
 ~MrpcTrack ()
 
int trackId () const
 
int tofTrackId () const
 
int id1 () const
 
int id2 () const
 
unsigned int barrel () const
 
ExtTrackCase hitCase () const
 
double p () const
 
double path () const
 
double path1 () const
 
double path2 () const
 
double zrhit1 () const
 
double zrhit2 () const
 
double errzr1 () const
 
double errzr2 () const
 
int kal (unsigned int i) const
 
double zrhit1 (unsigned int i) const
 
double zrhit2 (unsigned int i) const
 
double errzr1 (unsigned int i) const
 
double errzr2 (unsigned int i) const
 
std::vector< TofData * > tofData1 () const
 
std::vector< TofData * > tofData2 () const
 
int size1 () const
 
int size2 () const
 
int size3 () const
 
int size4 () const
 
double theta1 () const
 
double theta2 () const
 
double phi1 () const
 
double phi2 () const
 
unsigned int quality1 () const
 
unsigned int quality2 () const
 
unsigned int quality () const
 
int tofId1 () const
 
int tofId2 () const
 
double ph11 () const
 
double ph12 () const
 
double ph21 () const
 
double ph22 () const
 
double ph1 () const
 
double ph2 () const
 
double ph () const
 
double tof11 (unsigned int i) const
 
double tof12 (unsigned int i) const
 
double tof21 (unsigned int i) const
 
double tof22 (unsigned int i) const
 
double tof1 (unsigned int i) const
 
double tof2 (unsigned int i) const
 
double tof (unsigned int i) const
 
double qch1 () const
 
double qch2 () const
 
double qch3 () const
 
double qch4 () const
 
double adc1 () const
 
double adc2 () const
 
double adc3 () const
 
double adc4 () const
 
double tdc1 () const
 
double tdc2 () const
 
double tdc3 () const
 
double tdc4 () const
 
double texpInner (unsigned int i) const
 
double texpOuter (unsigned int i) const
 
double texp (unsigned int i) const
 
double ztdc1 () const
 
double ztdc2 () const
 
double zadc1 () const
 
double zadc2 () const
 
double estime () const
 
double tdiff1 () const
 
double tdiff2 () const
 
int t0Stat () const
 
unsigned int flag () const
 
bool is_mrpc_extrapolation_good ()
 
bool isNoHit () const
 
void setQuality (int qual)
 
void setQuality1 (int qual1)
 
void setQuality2 (int qual2)
 
void setFlag (unsigned int flag)
 
void setExtTrack (RecExtTrack *extTrack, int kal[5], double t0, int t0Stat)
 
void getMultiHit (MrpcTrack *&)
 
void setTofData (TofDataMap tofDataMap, int)
 
void tofDataAnalysis (TofData *tof, unsigned int iflag)
 
void getTofData (TofData *tof, unsigned int iflag)
 
void getTofDataEast (TofData *tof, unsigned int iflag)
 
void getTofDataWest (TofData *tof, unsigned int iflag)
 
void getTofDataNohit (unsigned int iflag)
 
void match (bool forCalibration, std::vector< int > deadId, std::vector< MrpcTrack * > *&tofTrackVec)
 
void findTofDataMRPC (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag)
 
TofDatachooseTofDataMRPC (std::vector< TofData *, std::allocator< TofData * > >, double)
 
void getTofDataMRPC (TofData *, unsigned int)
 
TofDatacompareTofDataMRPC (TofData *tofData1, TofData *tofData2)
 
void findTofDataBarrel (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< MrpcTrack * > *&tofTrackVec)
 
TofDatachooseTofData (std::vector< TofData * > tofDataVec, double zrhit)
 
TofDatacompareTofData (TofData *tofData1, TofData *tofData2, double zrhit)
 
void findTofDataEndcap (std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
 
TofDatachooseTofDataEndcap (std::vector< TofData * > tofDataVec, double zr1[5])
 
TofDatacompareTofDataEndcap (TofData *tofData1, TofData *tofData2)
 
void tofDataStudy ()
 
void setCalibration ()
 
void convert2RecTofTrackCol (RecTofTrackCol *recTofTrackCol)
 
void buildRecTofTrack (RecTofTrack *track, int layerorend)
 
void setRecTofTrack (RecTofTrack *track, int layerorend)
 
void convert2RecBTofCalHitCol (int runNumber, int eventNumber, RecBTofCalHitCol *btofCalHitCol, std::string calibData)
 
void convert2RecETofCalHitCol (int runNumber, int eventNumber, RecETofCalHitCol *etofCalHitCol, std::string calibData)
 
void qualityAnalysis ()
 
int get_mrpc_stripid_neighbour (std::string, int, int)
 
int get_mrpc_partid_neighbour (std::string, int, int)
 

Detailed Description

Definition at line 22 of file MrpcTrack.h.

Constructor & Destructor Documentation

◆ MrpcTrack()

MrpcTrack::MrpcTrack ( )

Definition at line 23 of file MrpcTrack.cxx.

23 {
24 m_trackId = -1;
25 m_tofTrackId = -1;
26 m_id1 = -99;
27 m_id2 = -99;
28 m_hitCase = NoHit;
29 m_momentum = -99.0;
30 m_path = 0.0;
31 m_path1 = 0.0;
32 m_path2 = 0.0;
33 m_zrhit1 = 9999.0;
34 m_errzr1 = 9999.0;
35 m_zrhit2 = 9999.0;
36 m_errzr2 = 9999.0;
37 for( unsigned int i=0; i<5; i++ ) {
38 m_kal[i] = -1;
39 m_zr1[i] = 9999.0;
40 m_zr2[i] = 9999.0;
41 m_ezr1[i] = 9999.0;
42 m_ezr2[i] = 9999.0;
43 }
44 if( m_tofData1.size()>0 ) {
45 std::vector<TofData*>::iterator iter1 = m_tofData1.begin();
46 m_tofData1.clear();
47 }
48 if( m_tofData2.size()>0 ) {
49 std::vector<TofData*>::iterator iter2 = m_tofData2.begin();
50 m_tofData2.clear();
51 }
52 if( m_tofData3.size()>0 ) {
53 std::vector<TofData*>::iterator iter3 = m_tofData3.begin();
54 m_tofData3.clear();
55 }
56 if( m_tofData4.size()>0 ) {
57 std::vector<TofData*>::iterator iter4 = m_tofData4.begin();
58 m_tofData4.clear();
59 }
60 m_quality1 = 0;
61 m_quality2 = 0;
62 m_quality = 10;
63
64 m_tofId1 = -99;
65 m_tofId2 = -99;
66
67 m_ph11 = -999.0;
68 m_ph12 = -999.0;
69 m_ph21 = -999.0;
70 m_ph22 = -999.0;
71 m_ph1 = -999.0;
72 m_ph2 = -999.0;
73 m_ph = -999.0;
74
75 for( unsigned int i=0; i<5; i++ ) {
76 m_tof11[i] = 0.0;
77 m_tof12[i] = 0.0;
78 m_tof21[i] = 0.0;
79 m_tof22[i] = 0.0;
80 m_tof1[i] = 0.0;
81 m_tof2[i] = 0.0;
82 m_tof[i] = 0.0;
83 }
84
85 m_sigma11 = -999.0;
86 m_sigma12 = -999.0;
87 m_sigma21 = -999.0;
88 m_sigma22 = -999.0;
89 m_sigma1 = -999.0;
90 m_sigma2 = -999.0;
91 m_sigma = -999.0;
92
93 m_qch1 = -999.0;
94 m_qch2 = -999.0;
95 m_qch3 = -999.0;
96 m_qch4 = -999.0;
97 m_adc1 = -999.0;
98 m_adc2 = -999.0;
99 m_adc3 = -999.0;
100 m_adc4 = -999.0;
101 m_tdc1 = -999.0;
102 m_tdc2 = -999.0;
103 m_tdc3 = -999.0;
104 m_tdc4 = -999.0;
105
106 for( unsigned int i=0; i<5; i++ ) {
107 m_texpInner[i] = -999.0;
108 m_texpOuter[i] = -999.0;
109 m_texp[i] = -999.0;
110 }
111
112 m_ztdc1 = -999.0;
113 m_ztdc2 = -999.0;
114 m_zadc1 = -999.0;
115 m_zadc2 = -999.0;
116
117 m_estime = -999.0;
118 m_tdiff1 = -999.0;
119 m_tdiff2 = -999.0;
120
121 mrpc_extrapolation_good=false;
122
123 m_flag = 0;
124
125 return;
126}
@ NoHit
Definition: MrpcTrack.h:19

◆ ~MrpcTrack()

MrpcTrack::~MrpcTrack ( )

Definition at line 129 of file MrpcTrack.cxx.

129 {
130 if( m_tofData1.size()>0 ) {
131 std::vector<TofData*>::iterator iter1 = m_tofData1.begin();
132 m_tofData1.clear();
133 }
134 if( m_tofData2.size()>0 ) {
135 std::vector<TofData*>::iterator iter2 = m_tofData2.begin();
136 m_tofData2.clear();
137 }
138 if( m_tofData3.size()>0 ) {
139 std::vector<TofData*>::iterator iter3 = m_tofData3.begin();
140 m_tofData3.clear();
141 }
142 if( m_tofData4.size()>0 ) {
143 std::vector<TofData*>::iterator iter4 = m_tofData4.begin();
144 m_tofData4.clear();
145 }
146 return;
147}

Member Function Documentation

◆ adc1()

double MrpcTrack::adc1 ( ) const
inline

Definition at line 83 of file MrpcTrack.h.

83{ return m_adc1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ adc2()

double MrpcTrack::adc2 ( ) const
inline

Definition at line 84 of file MrpcTrack.h.

84{ return m_adc2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ adc3()

double MrpcTrack::adc3 ( ) const
inline

Definition at line 85 of file MrpcTrack.h.

85{ return m_adc3; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ adc4()

double MrpcTrack::adc4 ( ) const
inline

Definition at line 86 of file MrpcTrack.h.

86{ return m_adc4; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ barrel()

unsigned int MrpcTrack::barrel ( ) const
inline

Definition at line 31 of file MrpcTrack.h.

31{ return m_barrel; }

Referenced by convert2RecTofTrackCol(), MrpcCheckDigi::Fill_TofTrack(), match(), and setCalibration().

◆ buildRecTofTrack()

void MrpcTrack::buildRecTofTrack ( RecTofTrack track,
int  layerorend 
)

Definition at line 6862 of file MrpcTrack.cxx.

6862 {
6863
6864 track->setTofTrackID( m_tofTrackId );
6865 track->setTrackID( m_trackId );
6866
6867 // std::cout << "MrpcTrack::buildRecTofTrack m_tofTrackId= " << m_tofTrackId <<std::endl;
6868 // std::cout << "MrpcTrack::buildRecTofTrack m_trackId= " << m_trackId <<std::endl;
6869
6870 track->setErrTof( 0.0 );
6871 track->setBeta( 0.0 );
6872
6873 double sigma[6];
6874 for( int i=0; i<6; i++ ) {
6875 sigma[i] = 0.0;
6876 }
6877 track->setSigma( sigma );
6878 track->setQuality( m_quality );
6879 track->setT0( m_estime );
6880 // std::cout << "MrpcTrack buildRecTofTrack : Set m_quality | m_estime " << m_quality << " | " << m_estime << std::endl;
6881 track->setErrT0( 0.0 );
6882 track->setPhi( 9999.0 );
6883 track->setErrPhi( 9999.0 );
6884 track->setEnergy( 9999.0 );
6885 track->setErrEnergy( 9999.0 );
6886
6887 if( ( layerorend == 11 ) || ( layerorend == 12 ) || ( layerorend == 1 ) ) {
6888
6889
6890
6891
6892
6893 //Within RecTofTrack and DstTrack the partID or the identifier is not stored anymore. Only the cellID and an east or westinformation (within TofHitstatus).
6894 //In order to identfy the elements correctly we add to the new MRPC innerlayer +100 : They will have a larger number than the old Tof EC.
6895 //For the the outer layer we add +100 +474.
6896 //Hence it is possible to identify the correct readoutstrip with east/west information and unique number.
6897
6898 if( (m_hitCase ==eastendcap_1) || (m_hitCase == westendcap_1))
6899 {
6900 m_tofId1 = m_tofId1 + 100;
6901 //std::cout << "MrpcTrack Layer --- 1 : m_tofId1+100 = "<< m_tofId1 << std::endl;
6902 }
6903
6904 if( (m_hitCase ==eastendcap_2) || (m_hitCase == westendcap_2))
6905 {
6906 m_tofId1 = m_tofId1 + 100 + 474;
6907 //std::cout <<"MrpcTrack Layer --- 2 : m_tofId1+474 = "<< m_tofId1 << std::endl;
6908 }
6909
6910 track->setTofID( m_tofId1 );
6911 track->setPath( m_path1 );
6912 track->setZrHit( m_zrhit1 );
6913 track->setErrZ( m_errzr1 );
6914 track->setTexp( m_texpInner );
6915
6916 //std::cout << "MrpcTrack buildRecMrpcTrack :layerorend == 11,12,1 Set m_tofId1 = " << m_tofId1 << std::endl;
6917 //std::cout << "MrpcTrack buildRecMrpcTrack : Set m_path1 = " << m_path1 << std::endl;
6918 //std::cout << "MrpcTrack buildRecTofTrack : Set m_zrhit1 = " << m_zrhit1 << std::endl;
6919 //std::cout << "MrpcTrack buildRecTofTrack : Set m_errzr1 = " << m_errzr1 << std::endl;
6920 //std::cout << "MrpcTrack buildRecTofTrack : Set m_texpInner = " << m_texpInner << std::endl;
6921
6922 setRecTofTrack( track, layerorend );
6923 }
6924
6925 if( ( layerorend==21 ) || ( layerorend==22 ) || ( layerorend==2 ) ) {
6926 track->setTofID( m_tofId2 );
6927 track->setPath( m_path2 );
6928 track->setZrHit( m_zrhit2 );
6929 track->setErrZ( m_errzr2 );
6930 track->setTexp( m_texpOuter );
6931 //std::cout << "MrpcTrack buildRecTofTrack :layerorend == 21,22,2 Set m_tofId2 = " << m_tofId2 << std::endl;
6932 setRecTofTrack( track, layerorend );
6933 }
6934
6935 if( layerorend==0 ) {
6936 track->setTofID( m_tofId1 );
6937 track->setPath( m_path2 );
6938 track->setZrHit( m_zrhit2 );
6939 track->setErrZ( m_errzr2 );
6940 track->setTexp( m_texp );
6941
6942 //std::cout << "MrpcTrack buildRecTofTrack :layerorend == 0 Set m_tofId1 = " << m_tofId1 << std::endl;
6943 setRecTofTrack( track, layerorend );
6944 }
6945
6946 if( layerorend == 3 ) {
6947 track->setTofID( m_id1 );
6948 track->setPath( m_path1 );
6949 track->setZrHit( m_zrhit1 );
6950 track->setErrZ( m_errzr1 );
6951 track->setTexp( m_texpInner );
6952
6953 //std::cout << "MrpcTrack buildRecTofTrack :layerorend == 3 Set m_tofId1 = " << m_id1 << std::endl;
6954 }
6955
6956 return;
6957}
@ westendcap_2
Definition: MrpcTrack.h:19
@ westendcap_1
Definition: MrpcTrack.h:19
@ eastendcap_2
Definition: MrpcTrack.h:19
@ eastendcap_1
Definition: MrpcTrack.h:19
void setSigma(double sigma[6])
Definition: DstTofTrack.h:116
void setEnergy(double energy)
Definition: DstTofTrack.h:132
void setPath(double path)
Definition: DstTofTrack.h:94
void setTofTrackID(int tofTrackID)
Definition: DstTofTrack.h:89
void setQuality(int quality)
Definition: DstTofTrack.h:124
void setZrHit(double zrhit)
Definition: DstTofTrack.h:95
void setPhi(double phi)
Definition: DstTofTrack.h:130
void setErrTof(double etof)
Definition: DstTofTrack.h:98
void setErrT0(double errt0)
Definition: DstTofTrack.h:127
void setTexp(double texp[5])
Definition: DstTofTrack.h:101
void setBeta(double beta)
Definition: DstTofTrack.h:99
void setErrEnergy(double errenergy)
Definition: DstTofTrack.h:133
void setTrackID(int trackID)
Definition: DstTofTrack.h:90
void setT0(double t0)
Definition: DstTofTrack.h:126
void setErrZ(double errz)
Definition: DstTofTrack.h:129
void setErrPhi(double errphi)
Definition: DstTofTrack.h:131
void setTofID(int tofID)
Definition: DstTofTrack.h:91
void setRecTofTrack(RecTofTrack *track, int layerorend)
Definition: MrpcTrack.cxx:6960

Referenced by convert2RecTofTrackCol().

◆ chooseTofData()

TofData * MrpcTrack::chooseTofData ( std::vector< TofData * >  tofDataVec,
double  zrhit 
)

Definition at line 6001 of file MrpcTrack.cxx.

6001 {
6002 if( tofDataVec.size() == 0 ) {
6003 cout << "MrpcRec::MrpcTrack::ChooseTofData: Size of TofData Vector is Zero!" << endl;
6004 return 0;
6005 }
6006 std::vector<TofData*>::iterator igood = tofDataVec.begin();
6007 if( tofDataVec.size() > 1 ) {
6008
6009 double deltaZ = 1000.0;
6010 std::vector<TofData*>::iterator iter = tofDataVec.begin();
6011 // ZTDC compare
6012 for( ; iter != tofDataVec.end(); iter++ ) {
6013 if( ( (*iter)->quality() & 0x5 ) == 0x5 ) {
6014 if( abs( (*iter)->ztdc() - zrhit ) < deltaZ ) {
6015 deltaZ = abs( (*iter)->ztdc() - zrhit );
6016 igood = iter;
6017 }
6018 }
6019 }
6020 // ZADC compare
6021 if( deltaZ > 999.0 ) {
6022 iter = tofDataVec.begin();
6023 for( ; iter != tofDataVec.end(); iter++ ) {
6024 if( ( (*iter)->quality() & 0xa ) == 0xa ) {
6025 if( abs( (*iter)->zadc() - zrhit ) < deltaZ ) {
6026 deltaZ = abs( (*iter)->zadc() - zrhit );
6027 igood = iter;
6028 }
6029 }
6030 }
6031
6032 }
6033 // Max Q
6034 if( deltaZ > 999.0 ) {
6035 unsigned int ibad = 0xf0;
6036 iter = tofDataVec.begin();
6037 for( ; iter != tofDataVec.end(); iter++ ) {
6038 if( ( (*iter)->quality() & 0xf0 ) < ibad ) {
6039 igood = iter;
6040 ibad = ( (*iter)->quality() & 0xf0 );
6041 }
6042 else if( ( (*iter)->quality() & 0xf0 ) == ibad ) {
6043 if( ( (*iter)->adc1() + (*iter)->adc2() ) > ( (*igood)->adc1() + (*igood)->adc2() ) ) {
6044 igood = iter;
6045 ibad = ( (*iter)->quality() & 0xf0 );
6046 }
6047 }
6048 }
6049
6050 }
6051 }
6052
6053 return (*igood);
6054}
double abs(const EvtComplex &c)
Definition: EvtComplex.hh:212
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

Referenced by findTofDataBarrel().

◆ chooseTofDataEndcap()

TofData * MrpcTrack::chooseTofDataEndcap ( std::vector< TofData * >  tofDataVec,
double  zr1[5] 
)

Definition at line 6164 of file MrpcTrack.cxx.

6164 {
6165 if( tofDataVec.size() == 0 ) {
6166 cout << "MrpcRec::MrpcTrack::ChooseTofData: Size of TofData Vector is Zero!" << endl;
6167 return 0;
6168 }
6169 std::vector<TofData*>::iterator igood = tofDataVec.begin();
6170 if( tofDataVec.size() > 1 ) {
6171 bool multihit = false;
6172 std::vector<TofData*>::iterator iter = tofDataVec.begin();
6173 for( ; iter != tofDataVec.end(); iter++ ) {
6174 if( (*iter)->qtimes1()>1 ) { multihit = true; }
6175 }
6176
6177 iter = tofDataVec.begin();
6178 if( multihit ) {
6179 double tcorr = -999.0;
6180 double deltaTMin = 999.0;
6181 for( ; iter != tofDataVec.end(); iter++ ) {
6182 tcorr = tofCaliSvc->ETime( (*iter)->adc(), (*iter)->tdc()-m_estime, zr1[2], (*iter)->tofId() );
6183 for( unsigned int i=0; i<5; i++ ) {
6184 if( abs(tcorr-m_texpInner[i]) < deltaTMin ) {
6185 deltaTMin = abs(tcorr-m_texpInner[i]);
6186 igood = iter;
6187 }
6188 }
6189 }
6190 }//close if multihit
6191 else {
6192 double maxQ = 0.0;
6193 for( ; iter != tofDataVec.end(); iter++ ) {
6194 if( (*iter)->adc() > maxQ ) {
6195 maxQ = (*iter)->adc();
6196 igood = iter;
6197 }
6198 }
6199 }
6200 }//close else
6201 return (*igood);
6202}
ITofCaliSvc * tofCaliSvc
virtual const double ETime(double ADC, double TDC, double rHit, unsigned id)=0

Referenced by findTofDataEndcap().

◆ chooseTofDataMRPC()

TofData * MrpcTrack::chooseTofDataMRPC ( std::vector< TofData *, std::allocator< TofData * > >  ,
double   
)

Definition at line 5955 of file MrpcTrack.cxx.

5955 {
5956 if( tofDataVec.size() == 0 ) {
5957 cout << "MrpcRec::MrpcTrack::ChooseTofDataMRPC: Size of TofData Vector is Zero!" << endl;
5958 return 0;
5959 }
5960 std::vector<TofData*>::iterator igood = tofDataVec.begin();
5961 if( tofDataVec.size() > 1 ) {
5962 std::vector<TofData*>::iterator iter = tofDataVec.begin();
5963
5964 double maxQ = 0.0;
5965 for( ; iter != tofDataVec.end(); iter++ )
5966 {
5967 if( (*iter)->adc() > maxQ ) {
5968 maxQ = (*iter)->adc();
5969 igood = iter;
5970 }
5971 }
5972 }
5973
5974 return (*igood);
5975}

Referenced by findTofDataMRPC().

◆ compareTofData()

TofData * MrpcTrack::compareTofData ( TofData tofData1,
TofData tofData2,
double  zrhit 
)

Definition at line 6061 of file MrpcTrack.cxx.

6061 {
6062 TofData* tof = tofData1;
6063 // ZTDC compare
6064 if( abs(tofData1->ztdc() - zrhit ) > abs(tofData2->ztdc() - zrhit ) ) {
6065 // SingleEnd/NoT/NoQ compare
6066 if( ( tofData1->quality() & 0xf0 ) >= ( tofData1->quality() & 0xf0 ) ) {
6067 // QDC compare
6068 //if( ( tofData1->adc1() + tofData1->adc2() ) < ( tofData2->adc1() + tofData2->adc2() ) ) {
6069 tof = tofData2;
6070 //}
6071 }
6072 // }
6073 }
6074
6075 return tof;
6076}
std::vector< TofData * > tofData1() const
Definition: MrpcTrack.h:46
double tof(unsigned int i) const
Definition: MrpcTrack.h:77
std::vector< TofData * > tofData2() const
Definition: MrpcTrack.h:47

Referenced by findTofDataBarrel().

◆ compareTofDataEndcap()

TofData * MrpcTrack::compareTofDataEndcap ( TofData tofData1,
TofData tofData2 
)

Definition at line 6208 of file MrpcTrack.cxx.

6208 {
6209 TofData* tof = tofData1;
6210 if( tof->adc() < tofData2->adc() ) {
6211 tof = tofData2;
6212 }
6213 return tof;
6214}

Referenced by findTofDataEndcap().

◆ compareTofDataMRPC()

TofData * MrpcTrack::compareTofDataMRPC ( TofData tofData1,
TofData tofData2 
)

Definition at line 5984 of file MrpcTrack.cxx.

5984 {
5985 TofData* tof = tofData1;
5986 mrpc_extrapolation_good=true; //TofData1 contains the correct extrapolated tracks!
5987 if( tof->adc() < tofData2->adc() ) {
5988 tof = tofData2;
5989 mrpc_extrapolation_good=false;
5990 }
5991 return tof;
5992}

Referenced by findTofDataMRPC().

◆ convert2RecBTofCalHitCol()

void MrpcTrack::convert2RecBTofCalHitCol ( int  runNumber,
int  eventNumber,
RecBTofCalHitCol btofCalHitCol,
std::string  calibData 
)

Definition at line 7052 of file MrpcTrack.cxx.

7052 {
7053
7054 if( ( m_quality1 & 0x800 ) == 0x800 ) {
7055
7056 RecBTofCalHit* ahit = new RecBTofCalHit;
7057 ahit->setRun( runNumber );
7058 ahit->setEvent( eventNumber );
7059 ahit->setMod( m_tofId1 );
7060 ahit->setQual( m_hitCase );
7061
7062 for( int i=0; i<5; i++ ) {
7063 ahit->setTpred( i, m_texpInner[i] );
7064 }
7065 if( calibData == "Dimu" ) {
7066 ahit->setTpred( m_texpInner[1] );
7067 ahit->setZHit( m_zr1[1] );
7068 ahit->setdZHit( m_ezr1[1] );
7069 }
7070 else {
7071 ahit->setTpred( m_texpInner[0] );
7072 ahit->setZHit( m_zr1[0] );
7073 ahit->setdZHit( m_ezr1[0] );
7074 }
7075
7076 ahit->setTdc1( m_tdc1-m_estime );
7077 ahit->setTdc2( m_tdc2-m_estime );
7078 ahit->setAdc1( m_adc1 );
7079 ahit->setAdc2( m_adc2 );
7080 // ahit->setZHit( m_zrhit1 );
7081 // ahit->setdZHit( m_errzr1 );
7082 ahit->setDeltaPhi( m_estime );
7083 ahit->setsinTheta( m_theta1 );
7084 ahit->setP( m_momentum );
7085 ahit->setQ( m_ph1 );
7086 ahit->setPath( m_path1 );
7087
7088 btofCalHitCol->push_back( ahit );
7089
7090 if( ( m_quality2 & 0x800 ) == 0x800 ) {
7091
7092 RecBTofCalHit* bhit = new RecBTofCalHit;
7093 bhit->setRun( runNumber );
7094 bhit->setEvent( eventNumber );
7095 bhit->setMod( m_tofId2 );
7096 bhit->setQual( m_hitCase );
7097
7098 for( int i=0; i<5; i++ ) {
7099 bhit->setTpred( i, m_texpOuter[i] );
7100 }
7101 if( calibData == "Dimu" ) {
7102 bhit->setTpred( m_texpOuter[1] );
7103 bhit->setZHit( m_zr2[1] );
7104 bhit->setdZHit( m_ezr2[1] );
7105 }
7106 else {
7107 bhit->setTpred( m_texpOuter[0] );
7108 bhit->setZHit( m_zr2[0] );
7109 bhit->setdZHit( m_ezr2[0] );
7110 }
7111
7112 bhit->setTdc1( m_tdc3-m_estime );
7113 bhit->setTdc2( m_tdc4-m_estime );
7114 bhit->setAdc1( m_adc3 );
7115 bhit->setAdc2( m_adc4 );
7116 // bhit->setZHit( m_zrhit2 );
7117 // bhit->setdZHit( m_errzr2 );
7118 bhit->setDeltaPhi( m_estime );
7119 bhit->setsinTheta( m_theta2 );
7120 bhit->setP( m_momentum );
7121 bhit->setQ( m_ph2 );
7122 bhit->setPath( m_path2 );
7123
7124 ahit->setnext(bhit);
7125
7126 btofCalHitCol->push_back( bhit );
7127
7128 }
7129 }
7130
7131 return;
7132}
void setsinTheta(double sint)
Definition: RecBTofCalHit.h:66
void setnext(RecBTofCalHit *n)
Definition: RecBTofCalHit.h:89
void setTdc2(double tdc2)
Definition: RecBTofCalHit.h:60
void setRun(int run)
Definition: RecBTofCalHit.h:54
void setP(double p)
Definition: RecBTofCalHit.h:67
void setQ(double q)
Definition: RecBTofCalHit.h:68
void setdZHit(double dzHit)
Definition: RecBTofCalHit.h:64
void setPath(double l)
Definition: RecBTofCalHit.h:69
void setAdc2(double adc2)
Definition: RecBTofCalHit.h:62
void setTdc1(double tdc1)
Definition: RecBTofCalHit.h:59
void setMod(int imod)
Definition: RecBTofCalHit.h:56
void setZHit(double zHit)
Definition: RecBTofCalHit.h:63
void setQual(int qual)
Definition: RecBTofCalHit.h:57
void setDeltaPhi(double deltaPhi)
Definition: RecBTofCalHit.h:65
void setEvent(int event)
Definition: RecBTofCalHit.h:55
void setTpred(int idx, double t)
Definition: RecBTofCalHit.h:49
void setAdc1(double adc1)
Definition: RecBTofCalHit.h:61

◆ convert2RecETofCalHitCol()

void MrpcTrack::convert2RecETofCalHitCol ( int  runNumber,
int  eventNumber,
RecETofCalHitCol etofCalHitCol,
std::string  calibData 
)

Definition at line 7135 of file MrpcTrack.cxx.

7135 {
7136
7137 if( ( m_quality1 & 0x800 ) != 0x800 ) return;
7138
7139 RecETofCalHit* chit = new RecETofCalHit;
7140 chit->setRun( runNumber );
7141 chit->setEvent( eventNumber );
7142 chit->setMod( m_tofId1 );
7143 chit->setQual( m_hitCase );
7144
7145 for( int i=0; i<5; i++ ) {
7146 chit->setTpred( i, m_texpInner[i] );
7147 }
7148 if( calibData == "Dimu" ) {
7149 chit->setTpred( m_texpInner[1] );
7150 chit->setRHit( m_zr1[1] );
7151 chit->setdRHit( m_ezr1[1] );
7152 }
7153 else {
7154 chit->setTpred( m_texpInner[0] );
7155 chit->setRHit( m_zr1[0] );
7156 chit->setdRHit( m_ezr1[0] );
7157 }
7158
7159 chit->setTdc( m_tdc1-m_estime );
7160 chit->setAdc( m_adc1 );
7161 // chit->setRHit( m_zrhit1 );
7162 // chit->setdRHit( m_errzr1 );
7163 chit->setDeltaPhi( m_estime );
7164 chit->setcosTheta( m_theta1 );
7165 chit->setQ( m_ph1 );
7166 chit->setP( m_momentum );
7167 chit->setPath( m_path1 );
7168
7169 etofCalHitCol->push_back( chit );
7170
7171 return;
7172}
void setEvent(int event)
Definition: RecETofCalHit.h:52
void setdRHit(double drHit)
Definition: RecETofCalHit.h:59
void setDeltaPhi(double deltaPhi)
Definition: RecETofCalHit.h:60
void setTdc(double tdc)
Definition: RecETofCalHit.h:56
void setRHit(double rHit)
Definition: RecETofCalHit.h:58
void setRun(int run)
Definition: RecETofCalHit.h:51
void setPath(double l)
Definition: RecETofCalHit.h:64
void setMod(int imod)
Definition: RecETofCalHit.h:53
void setP(double p)
Definition: RecETofCalHit.h:62
void setAdc(double adc)
Definition: RecETofCalHit.h:57
void setcosTheta(double cost)
Definition: RecETofCalHit.h:61
void setQ(double q)
Definition: RecETofCalHit.h:63
void setQual(int qual)
Definition: RecETofCalHit.h:54
void setTpred(int idx, double t)
Definition: RecETofCalHit.h:46

◆ convert2RecTofTrackCol()

void MrpcTrack::convert2RecTofTrackCol ( RecTofTrackCol recTofTrackCol)

Definition at line 6642 of file MrpcTrack.cxx.

6642 {
6643
6644 bool barrel = ( ( m_hitCase == InnerLayer ) || ( m_hitCase == OuterLayer ) || ( m_hitCase == DoubleLayer ) );
6645
6646 bool innerEast = ( ( m_quality1 & 0xc ) == 0xc );
6647 bool innerWest = ( ( m_quality1 & 0x3 ) == 0x3 );
6648 bool outerEast = ( ( m_quality2 & 0xc ) == 0xc );
6649 bool outerWest = ( ( m_quality2 & 0x3 ) == 0x3 );
6650
6651 if( barrel ) {
6652
6653 if( innerEast ) {
6654 RecTofTrack* atrack11 = new RecTofTrack;
6655 buildRecTofTrack( atrack11, 11 ); // innerlayer east readout
6656 TofHitStatus* hitStatus11 = new TofHitStatus;
6657 if( innerWest ) {
6658 hitStatus11->setBarrelReadout( 1, true ); // innerlayer east readout
6659 }
6660 else {
6661 if( m_hitCase == InnerLayer ) {
6662 hitStatus11->setBarrelCluster( 11 ); // innerlayer east cluster
6663 }
6664 else if( m_hitCase == DoubleLayer ) {
6665 if( outerEast && outerWest ) {
6666 hitStatus11->setBarrelCounter( 11 ); // innerlayer east counter
6667 }
6668 else {
6669 hitStatus11->setBarrelCluster( 11 ); // innerlayer east cluster
6670 }
6671 }
6672 else {
6673 cout << "MrpcRec::MrpcTrack:convert2RecTofTrackCol: 11- Impossible!" << endl;
6674 }
6675 }
6676 atrack11->setStatus( hitStatus11->value() );
6677 delete hitStatus11;
6678 recTofTrackCol->push_back( atrack11 );
6679 } //close innerEast
6680
6681 if( innerWest ) {
6682 RecTofTrack* atrack12 = new RecTofTrack;
6683 buildRecTofTrack( atrack12, 12 ); // innerlayer west readout
6684 TofHitStatus* hitStatus12 = new TofHitStatus;
6685 if( innerEast ) {
6686 hitStatus12->setBarrelReadout( 1, false ); // innerlayer west
6687 }
6688 else {
6689 if( m_hitCase == InnerLayer ) {
6690 hitStatus12->setBarrelCluster( 12 ); // innerlayer west cluster
6691 }
6692 else if( m_hitCase == DoubleLayer ) {
6693 if( outerEast && outerWest ) {
6694 hitStatus12->setBarrelCounter( 12 ); // innerlayer west counter
6695 }
6696 else {
6697 hitStatus12->setBarrelCluster( 12 ); // innerlayer west cluster
6698 }
6699 }
6700 else {
6701 cout << "MrpcRec::MrpcTrack:convert2RecTofTrackCol: 12- Impossible!" << endl;
6702 }
6703 }
6704 atrack12->setStatus( hitStatus12->value() );
6705 delete hitStatus12;
6706 recTofTrackCol->push_back( atrack12 );
6707 } //close innerWest
6708
6709 if( innerEast && innerWest ) {
6710 RecTofTrack* atrack1 = new RecTofTrack;
6711 buildRecTofTrack( atrack1, 1 ); // innerlayer counter
6712 TofHitStatus* hitStatus1 = new TofHitStatus;
6713 if( m_hitCase == InnerLayer ) {
6714 hitStatus1->setBarrelCluster( 1 ); // innerlayer cluster and counter
6715 }
6716 else if( m_hitCase == DoubleLayer ) {
6717 if( outerEast && outerWest ) {
6718 hitStatus1->setBarrelCounter( 1 ); // innerlayer counter
6719 }
6720 else {
6721 hitStatus1->setBarrelCluster( 1 ); // innerlayer cluster and counter
6722 }
6723 }
6724 else {
6725 cout << "MrpcRec::TofTrack:convert2RecTofTrackCol: 1- Impossible!" << endl;
6726 }
6727 atrack1->setStatus( hitStatus1->value() );
6728 delete hitStatus1;
6729 recTofTrackCol->push_back( atrack1 );
6730 }//close innerEast && innerWest
6731
6732 if( outerEast ) {
6733 RecTofTrack* atrack21 = new RecTofTrack;
6734 buildRecTofTrack( atrack21, 21 ); // outerlayer east readout
6735 TofHitStatus* hitStatus21 = new TofHitStatus;
6736 if( outerWest ) {
6737 hitStatus21->setBarrelReadout( 2, true ); // outerlayer east readout
6738 }
6739 else {
6740 if( m_hitCase == OuterLayer ) {
6741 hitStatus21->setBarrelCluster( 21 ); // outerlayer east cluster
6742 }
6743 else if( m_hitCase == DoubleLayer ) {
6744 if( innerEast || innerWest ) {
6745 hitStatus21->setBarrelCounter( 21 ); // outerlayer east counter
6746 }
6747 // else {
6748 // hitStatus21->setBarrelCluster( 21 ); // outerlayer east cluster
6749 // }
6750 }
6751 else {
6752 cout << "MrpcRec::MrpcTrack:convert2RecTofTrackCol: 21- Impossible!" << endl;
6753 }
6754 }
6755 atrack21->setStatus( hitStatus21->value() );
6756 delete hitStatus21;
6757 recTofTrackCol->push_back( atrack21 );
6758 }//close outerEast
6759
6760 if( outerWest ) {
6761 RecTofTrack* atrack22 = new RecTofTrack;
6762 buildRecTofTrack( atrack22, 22 ); // outerlayer west readout
6763 TofHitStatus* hitStatus22 = new TofHitStatus;
6764 if( outerEast ) {
6765 hitStatus22->setBarrelReadout( 2, false ); // outerlayer west readout
6766 }
6767 else {
6768 if( m_hitCase == OuterLayer ) {
6769 hitStatus22->setBarrelCluster( 22 ); // outerlayer west cluster
6770 }
6771 else if( m_hitCase == DoubleLayer ) {
6772 if( innerEast || innerWest ) {
6773 hitStatus22->setBarrelCounter( 22 ); // outerlayer west counter
6774 }
6775 // else {
6776 // hitStatus22->setBarrelCluster( 22 ); // outerlayer west cluster
6777 // }
6778 }
6779 else {
6780 cout << "MrpcRec::MrpcTrack:convert2RecTofTrackCol: 22- Impossible!" << endl;
6781 }
6782 }
6783 atrack22->setStatus( hitStatus22->value() );
6784 delete hitStatus22;
6785 recTofTrackCol->push_back( atrack22 );
6786 }//close oterWest
6787
6788 if( outerEast && outerWest ) {
6789 RecTofTrack* atrack2 = new RecTofTrack;
6790 buildRecTofTrack( atrack2, 2 ); // outerlayer counter
6791 TofHitStatus* hitStatus2 = new TofHitStatus;
6792 if( m_hitCase == OuterLayer ) {
6793 hitStatus2->setBarrelCluster( 2 ); // outerlayer cluster and counter
6794 }
6795 else if( m_hitCase == DoubleLayer ) {
6796 if( innerEast && innerWest ) {
6797 hitStatus2->setBarrelCounter( 2 ); // outerlayer counter
6798 }
6799 else {
6800 hitStatus2->setBarrelCluster( 2 ); // outerlayer cluster and counter
6801 }
6802 }
6803 else {
6804 cout << "MrpcRec::MrpcTrack:convert2RecTofTrackCol: 2- Impossible!" << endl;
6805 }
6806 atrack2->setStatus( hitStatus2->value() );
6807 delete hitStatus2;
6808 recTofTrackCol->push_back( atrack2 );
6809 } //close outerEast && outerWest
6810
6811 if( innerEast && innerWest && outerEast && outerWest ) {
6812 RecTofTrack* atrack = new RecTofTrack;
6813 buildRecTofTrack( atrack, 0 ); // doublelayer cluster
6814 TofHitStatus* hitStatus = new TofHitStatus;
6815 hitStatus->setBarrelCluster( 3 ); // doublelayer cluster
6816 atrack->setStatus( hitStatus->value() );
6817 delete hitStatus;
6818 recTofTrackCol->push_back( atrack );
6819 } //close innerEast && innerWest && outerEast && outerWest
6820
6821 } //close if(barrel)
6822
6823 if( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) || (m_hitCase ==eastendcap_1) || (m_hitCase ==eastendcap_2) || (m_hitCase ==westendcap_1) || (m_hitCase ==westendcap_2)) {
6824
6825 RecTofTrack* atrack = new RecTofTrack;
6826 buildRecTofTrack( atrack, 11 ); // eastendcap counter
6827
6828 TofHitStatus* hitStatus = new TofHitStatus;
6829 // std::cout << "MrpcTrack convert2RecTofTrackCol hitStatus->value() after initialize= " << hitStatus->value() << std::endl;
6830
6831 if( m_hitCase == EastEndcap ||(m_hitCase ==eastendcap_1) || (m_hitCase ==eastendcap_2) ) {
6832 hitStatus->setEndcapCluster( true ); // east endcap cluster counter readout
6833 }
6834 else if( (m_hitCase == WestEndcap) || (m_hitCase ==westendcap_1) || (m_hitCase ==westendcap_2) ) {
6835 hitStatus->setEndcapCluster( false ); // west endcap cluster counter readout
6836 }
6837 else {
6838 cout << "MrpcRec::MrpcTrack:convert2RecTofTrackCol: endcap- Impossible!" << endl;
6839 }
6840 // std::cout << "MrpcTrack convert2RecTofTrackCol hitStatus->value() = " << hitStatus->value() << std::endl;
6841 atrack->setStatus( hitStatus->value() );//Set m_status within DstTofTrack.h
6842
6843 delete hitStatus;
6844 recTofTrackCol->push_back( atrack );
6845 }
6846
6847 if( m_hitCase == NoHit ) {
6848 RecTofTrack* atrack = new RecTofTrack;
6849 buildRecTofTrack( atrack, 3 ); // no hit
6850 TofHitStatus* hitStatus = new TofHitStatus;
6851 hitStatus->setNoHit(); // no hit
6852 atrack->setStatus( hitStatus->value() );
6853 delete hitStatus;
6854 recTofTrackCol->push_back( atrack );
6855 }
6856
6857 return;
6858}
@ WestEndcap
Definition: MrpcTrack.h:19
@ OuterLayer
Definition: MrpcTrack.h:19
@ InnerLayer
Definition: MrpcTrack.h:19
@ EastEndcap
Definition: MrpcTrack.h:19
@ DoubleLayer
Definition: MrpcTrack.h:19
void setStatus(unsigned int status)
Definition: DstTofTrack.h:92
void buildRecTofTrack(RecTofTrack *track, int layerorend)
Definition: MrpcTrack.cxx:6862
unsigned int barrel() const
Definition: MrpcTrack.h:31
unsigned int value() const
Definition: TofHitStatus.h:20
void setBarrelReadout(unsigned int layer, bool east)
void setEndcapCluster(bool east)
void setBarrelCounter(unsigned int layer)
void setBarrelCluster(unsigned int layer)

◆ errzr1() [1/2]

double MrpcTrack::errzr1 ( ) const
inline

Definition at line 39 of file MrpcTrack.h.

39{ return m_errzr1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ errzr1() [2/2]

double MrpcTrack::errzr1 ( unsigned int  i) const
inline

Definition at line 44 of file MrpcTrack.h.

44{ return m_ezr1[i]; }

◆ errzr2() [1/2]

double MrpcTrack::errzr2 ( ) const
inline

Definition at line 40 of file MrpcTrack.h.

40{ return m_errzr2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ errzr2() [2/2]

double MrpcTrack::errzr2 ( unsigned int  i) const
inline

Definition at line 45 of file MrpcTrack.h.

45{ return m_ezr2[i]; }

◆ estime()

double MrpcTrack::estime ( ) const
inline

Definition at line 101 of file MrpcTrack.h.

101{ return m_estime; }

◆ findTofDataBarrel()

void MrpcTrack::findTofDataBarrel ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
double  zrhit,
unsigned int  iflag,
std::vector< MrpcTrack * > *&  tofTrackVec 
)

Definition at line 5696 of file MrpcTrack.cxx.

5696 {
5697
5698 unsigned int qual = 0xf;
5699 TofData* tof = 0;
5700 if( tofDataVec2.size() == 0 ) {
5701 if( tofDataVec1.size() == 0 ) {
5702 qual = 0;
5703 }
5704 else if( tofDataVec1.size() == 1 ) {
5705 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
5706 tof = (*iter1);
5707 qual = 0x1;
5708 }
5709 else if( tofDataVec1.size() > 1 ) {
5710 tof= chooseTofData( tofDataVec1, zrhit );
5711 qual = 0x2;
5712 }
5713 else {
5714 cout << "MrpcRec::MrpcTrack::findTofDataBarrel: 1- Impossible!" << endl;
5715 }
5716 }
5717 else if( ( tofDataVec2.size() == 1 ) ) {
5718 if( tofDataVec1.size() == 0 ) {
5719 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
5720 tof = (*iter2);
5721 qual = 0x4;
5722 }
5723 else if( tofDataVec1.size() == 1 ) {
5724 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
5725 if( ((*iter1)->quality()&0x1ff)==0x01f && abs((*iter1)->ztdc()-zrhit)<ztdc_Cut ) {
5726 tof = (*iter1);
5727 }
5728 else {
5729 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
5730 tof = compareTofData( (*iter1), (*iter2), zrhit );
5731 }
5732 qual = 0x5;
5733 }
5734 else if( tofDataVec1.size() > 1 ) {
5735 TofData* tofData1 = chooseTofData( tofDataVec1, zrhit );
5736 if( (tofData1->quality()&0x1ff)==0x01f && abs(tofData1->ztdc()-zrhit)<ztdc_Cut ) {
5737 tof = tofData1;
5738 }
5739 else {
5740 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
5741 tof = compareTofData( tofData1, (*iter2), zrhit );
5742 }
5743 qual = 0x6;
5744 }
5745 else {
5746 cout << "MrpcRec::MrpcTrack::findTofDataBarrel: 2- Impossible!" << endl;
5747 }
5748 }
5749 else if( ( tofDataVec2.size() > 1 ) ) {
5750 if( tofDataVec1.size() == 0 ) {
5751 tof = chooseTofData( tofDataVec2, zrhit );
5752 qual = 0x8;
5753 }
5754 else if( tofDataVec1.size() == 1 ) {
5755 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
5756 if( ((*iter1)->quality()&0x1ff)==0x01f && abs((*iter1)->ztdc()-zrhit)<ztdc_Cut ) {
5757 tof = (*iter1);
5758 }
5759 else {
5760 TofData* tofData2 = chooseTofData( tofDataVec2, zrhit );
5761 tof = compareTofData( (*iter1), tofData2, zrhit );
5762 }
5763 qual = 0x9;
5764 }
5765 else if( tofDataVec1.size() > 1 ) {
5766 TofData* tofData1 = chooseTofData( tofDataVec1, zrhit );
5767 if( (tofData1->quality()&0x1ff)==0x01f && abs(tofData1->ztdc()-zrhit)<ztdc_Cut ) {
5768 tof = tofData1;
5769 }
5770 else {
5771 TofData* tofData2 = chooseTofData( tofDataVec2, zrhit );
5772 tof = compareTofData( tofData1, tofData2, zrhit );
5773 }
5774 qual = 0xa;
5775 }
5776 else {
5777 cout << "MrpcRec::MrpcTrack::findTofDataBarrel: 3- Impossible!" << endl;
5778 }
5779 }
5780
5781 if( qual != 0 ) {
5782 if( !(tof->used()) ) {
5783 getTofData( tof, iflag );
5784 }
5785 else {
5786 bool z1=false, z2=false;
5787 bool zc1=false, zc2=false;
5788 MrpcTrack* track=0;
5789 if( iflag==1 ) {
5790 z1 = ( abs( m_zrhit1 - tof->ztdc() ) < ztdc_Cut );
5791 zc1 = ( m_zrhit1 > tof->ztdc() );
5792 std::vector<MrpcTrack*>::iterator iter = tofTrackVec->begin();
5793 for( ; iter!=tofTrackVec->end(); iter++ ) {
5794 if( tof->tofId()==(*iter)->tofId1() ) {
5795 track = (*iter);
5796 z2 = ( abs( (*iter)->zrhit1() - tof->ztdc() ) < ztdc_Cut );
5797 zc2 = ( (*iter)->zrhit1() > tof->ztdc() );
5798 }
5799 }
5800 }
5801 else if( iflag==2 ) {
5802 z1 = ( abs( m_zrhit2 - tof->ztdc() ) < ztdc_Cut );
5803 zc1 = ( m_zrhit2 > tof->ztdc() );
5804 std::vector<MrpcTrack*>::iterator iter = tofTrackVec->begin();
5805 for( ; iter!=tofTrackVec->end(); iter++ ) {
5806 if( tof->tofId()==(*iter)->tofId2() ) {
5807 track = (*iter);
5808 z2 = ( abs( (*iter)->zrhit2() - tof->ztdc() ) < ztdc_Cut );
5809 zc2 = ( (*iter)->zrhit2() > tof->ztdc() );
5810 }
5811 }
5812 }
5813
5814 if( ( z1 && z2 )||( (!z1) && (!z2) ) ) {
5815 if( zc1 && !zc2 ) {
5816 getTofDataEast( tof, iflag );
5817 track->getTofDataWest( tof, iflag );
5818 }
5819 else if( !zc1 && zc2 ) {
5820 getTofDataWest( tof, iflag );
5821 track->getTofDataEast( tof, iflag );
5822 }
5823 }
5824 else if( z1 && !z2 ) {
5825 getTofData( tof, iflag );
5826 track->getTofDataNohit( iflag );
5827 cout << iflag << " " << track->quality1() << " " << track->quality2() << endl;
5828 }
5829 else if( !z1 && z2 ) {
5830 qual = 0;
5831 }
5832 }
5833 }
5834
5835 if( qual == 0 ) {
5836 if( ( iflag == 1 ) || ( iflag == 3 ) ) {
5837 m_quality1 = ( m_quality1 | 0x300 );
5838 }
5839 else if( iflag == 2 ) {
5840 m_quality2 = ( m_quality2 | 0x300 );
5841 }
5842 else {
5843 cout << "MrpcRec::MrpcTrack::findTofDataBarrel: the 1- IFLAG is Out of Range!" << endl;
5844 }
5845 }
5846 else {
5847 qual = ( qual << 12 );
5848 if( ( iflag == 1 ) || ( iflag == 3 ) ) {
5849 m_quality1 = ( m_quality1 | qual );
5850 }
5851 else if( iflag == 2 ) {
5852 m_quality2 = ( m_quality2 | qual );
5853 }
5854 else {
5855 cout << "MrpcRec::MrpcTrack::findTofDataBarrel: the 2- IFLAG is Out of Range!" << endl;
5856 }
5857 }
5858
5859 return;
5860}
const double ztdc_Cut
Definition: MrpcTrack.h:12
TofData * chooseTofData(std::vector< TofData * > tofDataVec, double zrhit)
Definition: MrpcTrack.cxx:6001
void getTofData(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:6220
void getTofDataEast(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:6307
void getTofDataWest(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:6356
unsigned int quality2() const
Definition: MrpcTrack.h:57
void getTofDataNohit(unsigned int iflag)
Definition: MrpcTrack.cxx:6405
TofData * compareTofData(TofData *tofData1, TofData *tofData2, double zrhit)
Definition: MrpcTrack.cxx:6061
unsigned int quality1() const
Definition: MrpcTrack.h:56

Referenced by match().

◆ findTofDataEndcap()

void MrpcTrack::findTofDataEndcap ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
double  zr1[5] 
)

Definition at line 6083 of file MrpcTrack.cxx.

6083 {
6084
6085 unsigned int iflag = 3;
6086 unsigned int qual = 0xf;
6087
6088 if( tofDataVec2.size() == 0 ) {
6089 if( tofDataVec1.size() == 0 ) {
6090 qual = 0;
6091 }
6092 else if( tofDataVec1.size() == 1 ) {
6093 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
6094 getTofData( (*iter1), iflag );
6095 qual = 0x1;
6096 }
6097 else if( tofDataVec1.size() > 1 ) {
6098 getTofData( chooseTofDataEndcap( tofDataVec1, zr1 ), iflag );
6099 qual = 0x2;
6100 }
6101 else {
6102 cout << "MrpcRec::MrpcTrack::findTofDataEndcap: 1- Impossible!" << endl;
6103 }
6104 }
6105 else if( ( tofDataVec2.size() == 1 ) ) {
6106 if( tofDataVec1.size() == 0 ) {
6107 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
6108 getTofData( (*iter2), iflag );
6109 qual = 0x4;
6110 }
6111 else if( tofDataVec1.size() == 1 ) {
6112 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
6113 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
6114 getTofData( compareTofDataEndcap( (*iter1), (*iter2) ), iflag );
6115 qual = 0x5;
6116 }
6117 else if( tofDataVec1.size() > 1 ) {
6118 TofData* tofData1 = chooseTofDataEndcap( tofDataVec1, zr1 );
6119 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
6120 getTofData( compareTofDataEndcap( tofData1, (*iter2) ), iflag );
6121 qual = 0x6;
6122 }
6123 else {
6124 cout << "MrpcRec::MrpcTrack::findTofDataBarrel: 2- Impossible!" << endl;
6125 }
6126 }
6127 else if( ( tofDataVec2.size() > 1 ) ) {
6128 if( tofDataVec1.size() == 0 ) {
6129 getTofData( chooseTofDataEndcap( tofDataVec2, zr1 ), iflag );
6130 qual = 0x8;
6131 }
6132 else if( tofDataVec1.size() == 1 ) {
6133 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
6134 TofData* tofData2 = chooseTofDataEndcap( tofDataVec2, zr1 );
6135 getTofData( compareTofDataEndcap( (*iter1), tofData2 ), iflag );
6136 qual = 0x9;
6137 }
6138 else if( tofDataVec1.size() > 1 ) {
6139 TofData* tofData1 = chooseTofDataEndcap( tofDataVec1, zr1 );
6140 TofData* tofData2 = chooseTofDataEndcap( tofDataVec2, zr1 );
6142 qual = 0xa;
6143 }
6144 else {
6145 cout << "MrpcRec::MrpcTrack::findTofDataBarrel: 3- Impossible!" << endl;
6146 }
6147 }
6148
6149 if( qual == 0 ) {
6150 m_quality1 = ( m_quality1 | 0x300 );
6151 }
6152 else {
6153 qual = ( qual << 12 );
6154 m_quality1 = ( m_quality1 | qual );
6155 }
6156
6157 return;
6158}
TofData * compareTofDataEndcap(TofData *tofData1, TofData *tofData2)
Definition: MrpcTrack.cxx:6208
TofData * chooseTofDataEndcap(std::vector< TofData * > tofDataVec, double zr1[5])
Definition: MrpcTrack.cxx:6164

Referenced by match().

◆ findTofDataMRPC()

void MrpcTrack::findTofDataMRPC ( std::vector< TofData * >  tofDataVec1,
std::vector< TofData * >  tofDataVec2,
double  zrhit,
unsigned int  iflag 
)

Definition at line 5864 of file MrpcTrack.cxx.

5865{
5866
5867 unsigned int qual = 0xf;
5868 if( tofDataVec2.size() == 0 ) {
5869 if( tofDataVec1.size() == 0 ) {
5870 qual = 0;
5871 }
5872 else if( tofDataVec1.size() == 1 ) {
5873 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
5874 getTofDataMRPC( (*iter1), iflag );
5875 qual = 0x1;
5876 mrpc_extrapolation_good=true;//There is no neighbour cell. The extrapolation of the MRPC track was fine!
5877 }
5878 else if( tofDataVec1.size() > 1 ) {
5879 getTofDataMRPC( chooseTofDataMRPC( tofDataVec1, zrhit ), iflag );
5880 qual = 0x2;
5881 mrpc_extrapolation_good=true;//There is no neighbour cell. The extrapolation of the MRPC track was fine!
5882 }
5883 else {
5884 cout << "MrpcRec::MrpcTrack::findTofData: 1- Impossible!" << endl;
5885 }
5886 }
5887 else if( ( tofDataVec2.size() == 1 ) ) {
5888 if( tofDataVec1.size() == 0 ) {
5889 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
5890 getTofDataMRPC( (*iter2), iflag );
5891 qual = 0x4;
5892 }
5893 else if( tofDataVec1.size() == 1 ) {
5894 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
5895 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
5896 getTofDataMRPC( compareTofDataMRPC( (*iter1), (*iter2)), iflag );
5897 qual = 0x5;
5898 }
5899 else if( tofDataVec1.size() > 1 ) {
5900 TofData* tofData1 = chooseTofDataMRPC( tofDataVec1, zrhit );
5901 std::vector<TofData*>::iterator iter2 = tofDataVec2.begin();
5902 getTofDataMRPC( compareTofDataMRPC( tofData1, (*iter2)), iflag );
5903 qual = 0x6;
5904 }
5905 else {
5906 cout << "MrpcRec::MrpcTrack::findTofData: 2- Impossible!" << endl;
5907 }
5908 }
5909 else if( ( tofDataVec2.size() > 1 ) ) {
5910 if( tofDataVec1.size() == 0 ) {
5911 getTofDataMRPC( chooseTofDataMRPC( tofDataVec2, zrhit ), iflag );
5912 qual = 0x8;
5913 }
5914 else if( tofDataVec1.size() == 1 ) {
5915 std::vector<TofData*>::iterator iter1 = tofDataVec1.begin();
5916 TofData* tofData2 = chooseTofDataMRPC( tofDataVec2, zrhit );
5917 getTofDataMRPC( compareTofDataMRPC( (*iter1), tofData2), iflag );
5918 qual = 0x9;
5919 }
5920 else if( tofDataVec1.size() > 1 ) {
5921 TofData* tofData1 = chooseTofDataMRPC( tofDataVec1, zrhit );
5922 TofData* tofData2 = chooseTofDataMRPC( tofDataVec2, zrhit );
5924 qual = 0xa;
5925 }
5926 else {
5927 cout << "MrpcRec::MrpcTrack::findTofData: 3- Impossible!" << endl;
5928 }
5929 }
5930
5931 if( qual == 0 ) {
5932 if( iflag == 3 ) {
5933 m_quality1 = 0x300;
5934 }
5935 else {
5936 cout << "MrpcRec::MrpcTrack::findTofData: the 1- IFLAG is Out of Range!" << endl;
5937 }
5938 }
5939 else {
5940 qual = ( qual << 12 );
5941 if( ( iflag == 3 ) ) {
5942 m_quality1 = ( m_quality1 | qual );
5943 }
5944 else {
5945 cout << "MrpcRec::MrpcTrack::findTofData: the 2- IFLAG is Out of Range!" << endl;
5946 }
5947 }
5948
5949 return;
5950}
TofData * chooseTofDataMRPC(std::vector< TofData *, std::allocator< TofData * > >, double)
Definition: MrpcTrack.cxx:5955
void getTofDataMRPC(TofData *, unsigned int)
Definition: MrpcTrack.cxx:6277
TofData * compareTofDataMRPC(TofData *tofData1, TofData *tofData2)
Definition: MrpcTrack.cxx:5984

Referenced by match().

◆ flag()

unsigned int MrpcTrack::flag ( ) const
inline

Definition at line 107 of file MrpcTrack.h.

107{ return m_flag; }

Referenced by setFlag().

◆ get_mrpc_partid_neighbour()

int MrpcTrack::get_mrpc_partid_neighbour ( std::string  ,
int  ,
int   
)

Definition at line 7287 of file MrpcTrack.cxx.

7288{
7289
7290
7291
7293
7294 int returnvalue=0;
7295
7296 if(which=="l")
7297 {
7298 if(strip%2==0) returnvalue = layer;
7299 else
7300 {
7301 if(layer==3) returnvalue = 4;
7302 if(layer==4) returnvalue = 3;
7303 if(layer==5) returnvalue = 6;
7304 if(layer==6) returnvalue = 5;
7305 }
7306 }
7307
7308 if(which=="r")
7309 {
7310 if(strip%2!=0) returnvalue = layer;
7311 else
7312 {
7313 if(layer==3) returnvalue = 4;
7314 if(layer==4) returnvalue = 3;
7315 if(layer==5) returnvalue = 6;
7316 if(layer==6) returnvalue = 5;
7317 }
7318 }
7319
7320 if(which=="u")returnvalue = layer;
7321 if(which=="b")returnvalue = layer;
7322
7323
7324
7325 return returnvalue;
7326
7327
7328}
static G4int Get_stripnumber_from_unique_identifier(G4int unique_identifier_f)

Referenced by setTofData().

◆ get_mrpc_stripid_neighbour()

int MrpcTrack::get_mrpc_stripid_neighbour ( std::string  ,
int  ,
int   
)

Definition at line 7184 of file MrpcTrack.cxx.

7185{
7188
7189 int neighbourstrip=0;
7190 int neighbourmodule=0;
7191
7192 int returnvalue=0;
7193
7194 if(strip==0) return 0; //Falls vorher schon strip 1,2 oder 23,24 gibt die Funtion 0 zurück, diese vlt. nochmalige Eingabe wird hier abgefangen und wieder eine 0 zureuckgegebn!
7195
7196
7197 if(which=="l")
7198 {
7199 if(strip%2==0) //gerade Stripnummer
7200 {
7201 neighbourstrip=strip-1; //linke Nachbar ist dann immer -1
7202 if(layer==3 || layer== 6)
7203 {neighbourmodule=module;}//Nachbarmodul ist selbes Modul
7204 else
7205 {neighbourmodule=module;}//Nachbarmodul ist selbes Modul
7206 }
7207 else //ungerade stripnummer
7208 {
7209 neighbourstrip=strip+1;
7210
7211 if(layer==3 || layer== 5)
7212 {
7213 neighbourmodule=module; //In diesem Fall sind die Nachbarschaftsmodule immer gleich
7214 }
7215 else
7216 {
7217 neighbourmodule=module+1;
7218 if(neighbourmodule==19){neighbourmodule=1;}
7219 }
7220
7221 }
7222
7223 returnvalue= BesTofDigitizerEcV4::Produce_unique_identifier(neighbourmodule, neighbourstrip);
7224 } //close if which==l
7225
7226 else if(which=="r")
7227 {
7228 if(strip%2==0) //gerade Stripnummer
7229 {
7230 neighbourstrip=strip-1; //rechte Nachbar ist dann immer -1
7231
7232 if(layer==4 || layer== 6)
7233 {neighbourmodule=module;}//In diesem Fall ist das rechte Nachbarmodul immer die gleiche modulnummer
7234 else
7235 {neighbourmodule=module-1;
7236 if(neighbourmodule==0){neighbourmodule=18;}
7237 }
7238 }
7239 else //ungerade stripnummer
7240 {
7241 neighbourstrip=strip+1;
7242 if(layer==3 || layer== 6)
7243 {neighbourmodule=module;}//Nachbarmodul ist selbes Modul
7244 else
7245 {neighbourmodule=module;} //Nachbarmodul ist selbes Modul
7246
7247 }
7248
7249 returnvalue=BesTofDigitizerEcV4::Produce_unique_identifier(neighbourmodule, neighbourstrip);//geaendert: neighbourmodule=module in dieser und unter Funktionen entfernt..
7250 } //close if which==r
7251
7252
7253 else if(which=="u")
7254 {
7255 if(strip==23 || strip==24) {neighbourmodule=0; neighbourstrip=0;}
7256 else
7257 {
7258 neighbourstrip=strip+2;
7259 neighbourmodule=module;
7260 }
7261
7262 returnvalue= BesTofDigitizerEcV4::Produce_unique_identifier(neighbourmodule, neighbourstrip);
7263 } //close if which==u
7264
7265 else if(which=="b")
7266 {
7267 if(strip==1 || strip==2) {neighbourmodule=0; neighbourstrip=0;}
7268 else
7269 {
7270 neighbourstrip=strip-2;
7271 neighbourmodule=module;
7272 }
7273
7274 returnvalue=BesTofDigitizerEcV4::Produce_unique_identifier(neighbourmodule, neighbourstrip);
7275 } //close if which==b
7276
7277
7278 return returnvalue;
7279}
static G4int Produce_unique_identifier(G4int module_mrpc_f, G4int readoutstripnumber_f)
static G4int Get_module_mrpc_from_unique_identifier(G4int unique_identifier_f)

Referenced by setTofData().

◆ getMultiHit()

void MrpcTrack::getMultiHit ( MrpcTrack *&  track)

Definition at line 344 of file MrpcTrack.cxx.

344 {
345 if( m_hitCase == InnerLayer || m_hitCase == OuterLayer || m_hitCase == DoubleLayer ) {
346
347 if( ( m_hitCase==InnerLayer || m_hitCase==DoubleLayer ) && ( track->hitCase()==InnerLayer || track->hitCase()==DoubleLayer ) ) {
348 if( ( abs(m_id1-track->id1())<=1 ) || ( m_id1==0 && track->id1()==87 ) || ( m_id1==87 && track->id1()==0 ) ) {
349 track->setQuality1( ( track->quality1() | 0x400 ) );
350 m_quality1 = ( m_quality1 | 0x400 );
351 }
352 }
353
354 if( ( m_hitCase==OuterLayer || m_hitCase==DoubleLayer ) && ( track->hitCase()==OuterLayer || track->hitCase()==DoubleLayer ) ) {
355 if( ( abs(m_id2-track->id2())<=1 ) || ( m_id2==88 && track->id2()==175 ) || ( m_id2==175 && track->id2()==88 ) ) {
356 track->setQuality2( ( track->quality2() | 0x400 ) );
357 m_quality2 = ( m_quality2 | 0x400 );
358 }
359 }
360
361 }
362 else if( m_hitCase == EastEndcap ) {
363 if( track->hitCase()==EastEndcap ) {
364 if( ( abs(m_id1-track->id1())<=1 ) || ( m_id1==0 && track->id1()==47 ) || ( m_id1==47 && track->id1()==0 ) ) {
365 track->setQuality1( ( track->quality1() | 0x400 ) );
366 m_quality1 = ( m_quality1 | 0x400 );
367 }
368 }
369 }
370 else if( m_hitCase == WestEndcap ) {
371 if( track->hitCase()==WestEndcap ) {
372 if( ( abs(m_id1-track->id1())<=1 ) || ( m_id1==48 && track->id1()==95 ) || ( m_id1==95 && track->id1()==48 ) ) {
373 track->setQuality1( ( track->quality1() | 0x400 ) );
374 m_quality1 = ( m_quality1 | 0x400 );
375 }
376 }
377 }
378 else if( m_hitCase == westendcap_1 || m_hitCase == westendcap_2 || m_hitCase == eastendcap_1 || m_hitCase == eastendcap_2)
379 {
380 //We do not consider the multihits yet.(This feature was not implemented in 6.5.5) (It seems also not to affect the colected endcap data!)
381 //How to do it:
382 // Search within the (direct) neighborhood for hits
383
384 }
385
386 return;
387}
ExtTrackCase hitCase() const
Definition: MrpcTrack.h:32
int id2() const
Definition: MrpcTrack.h:30
void setQuality1(int qual1)
Definition: MrpcTrack.h:115
int id1() const
Definition: MrpcTrack.h:29
void setQuality2(int qual2)
Definition: MrpcTrack.h:116

Referenced by MrpcRec::execute().

◆ getTofData()

void MrpcTrack::getTofData ( TofData tof,
unsigned int  iflag 
)

Definition at line 6220 of file MrpcTrack.cxx.

6220 {
6221
6222 if( iflag == 1 ) {
6223 m_tofId1 = tof->tofId();
6224 m_qch1 = tof->adcChannelEast();
6225 m_adc1 = tof->adc1();
6226 m_tdc1 = tof->tdc1();
6227 m_qch2 = tof->adcChannelWest();
6228 m_adc2 = tof->adc2();
6229 m_tdc2 = tof->tdc2();
6230 m_ztdc1 = tof->ztdc();
6231 m_zadc1 = tof->zadc();
6232 m_quality1 = ( m_quality1 | ( 0x1f & tof->quality() ) );
6233 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit1 ) > ztdc_Cut ) ) ) {
6234 m_quality1 = ( m_quality1 | 0x100 );
6235 }
6236 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit1 ) > zadc_Cut ) ) ) {
6237 m_quality1 = ( m_quality1 | 0x200 );
6238 }
6239 }
6240 else if( iflag == 2 ) {
6241 m_tofId2 = tof->tofId();
6242 m_qch3 = tof->adcChannelEast();
6243 m_adc3 = tof->adc1();
6244 m_tdc3 = tof->tdc1();
6245 m_qch4 = tof->adcChannelWest();
6246 m_adc4 = tof->adc2();
6247 m_tdc4 = tof->tdc2();
6248 m_ztdc2 = tof->ztdc();
6249 m_zadc2 = tof->zadc();
6250 m_quality2 = ( m_quality2 | ( 0x1f & tof->quality() ) );
6251 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit2 ) > ztdc_Cut ) ) ) {
6252 m_quality2 = ( m_quality2 | 0x100 );
6253 }
6254 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit2 ) > zadc_Cut ) ) ) {
6255 m_quality2 = ( m_quality2 | 0x200 );
6256 }
6257 }
6258 else if( iflag == 3 ) {
6259 m_tofId1 = tof->tofId();
6260 m_qch1 = tof->adcChannel();
6261 m_adc1 = tof->adc();
6262 m_tdc1 = tof->tdc();
6263 m_quality1 = ( m_quality1 | ( 0x1f & tof->quality() ) );
6264 m_quality1 = ( m_quality1 | 0x300 );
6265 }
6266 else {
6267 cout << "MrpcRec::MrpcTrack::getTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
6268 }
6269 tof->setUsed();
6270 return;
6271}
const double zadc_Cut
Definition: MrpcTrack.h:15

Referenced by findTofDataBarrel(), and findTofDataEndcap().

◆ getTofDataEast()

void MrpcTrack::getTofDataEast ( TofData tof,
unsigned int  iflag 
)

Definition at line 6307 of file MrpcTrack.cxx.

6307 {
6308
6309 if( iflag == 1 ) {
6310 m_tofId1 = tof->tofId();
6311 m_qch1 = tof->adcChannelEast();
6312 m_adc1 = tof->adc1();
6313 m_tdc1 = tof->tdc1();
6314 m_qch2 = -999.0;
6315 m_adc2 = -999.0;
6316 m_tdc2 = -999.0;
6317 m_ztdc1 = tof->ztdc();
6318 m_zadc1 = tof->zadc();
6319 m_quality1 = ( ( m_quality1 & 0xfffffff0 ) | ( 0x1c & tof->quality() ) );
6320 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit1 ) > ztdc_Cut ) ) ) {
6321 m_quality1 = ( m_quality1 | 0x100 );
6322 }
6323 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit1 ) > zadc_Cut ) ) ) {
6324 m_quality1 = ( m_quality1 | 0x200 );
6325 }
6326 }
6327 else if( iflag == 2 ) {
6328 m_tofId2 = tof->tofId();
6329 m_qch3 = tof->adcChannelEast();
6330 m_adc3 = tof->adc1();
6331 m_tdc3 = tof->tdc1();
6332 m_qch4 = -999.0;
6333 m_adc4 = -999.0;
6334 m_tdc4 = -999.0;
6335 m_ztdc2 = tof->ztdc();
6336 m_zadc2 = tof->zadc();
6337 m_quality2 = ( ( m_quality2 & 0xfffffff0 ) | ( 0x1c & tof->quality() ) );
6338 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit2 ) > ztdc_Cut ) ) ) {
6339 m_quality2 = ( m_quality2 | 0x100 );
6340 }
6341 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit2 ) > zadc_Cut ) ) ) {
6342 m_quality2 = ( m_quality2 | 0x200 );
6343 }
6344 }
6345 else {
6346 cout << "MrpcRec::MrpcTrack::getTofDataEast: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
6347 }
6348 tof->setUsed();
6349 return;
6350}

Referenced by findTofDataBarrel().

◆ getTofDataMRPC()

void MrpcTrack::getTofDataMRPC ( TofData tof,
unsigned int  iflag 
)

Definition at line 6277 of file MrpcTrack.cxx.

6277 {
6278
6279if( iflag == 3 ) {
6280 m_tofId1 = tof->tofId();
6281 m_adc1 = tof->adc();
6282 m_tdc1 = tof->tdc();
6283 m_quality1 = tof->quality();
6284 m_quality1 = ( m_quality1 | 0x300 );
6285 /*
6286 std::cout << "MrpcTrack ::getTofdata() EC begin" << std::endl;
6287 std::cout << " m_tofId1 = "<< m_tofId1 << std::endl;
6288 std::cout << " m_identify "<< tof->identify() << std::endl;
6289 std::cout << " m_adc1 = "<< m_adc1 << std::endl;
6290 std::cout << " m_tdc1 = "<< m_tdc1 << std::endl;
6291 std::cout << " m_quality = "<< m_quality1 << std::endl;
6292 std::cout << "MrpcTrack ::getTofdata() EC end "<< std::endl;
6293 */
6294 }
6295 else {
6296 cout << "MrpcRec::MrpcTrack::setTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
6297 }
6298 tof->setUsed();
6299 return;
6300}

Referenced by findTofDataMRPC().

◆ getTofDataNohit()

void MrpcTrack::getTofDataNohit ( unsigned int  iflag)

Definition at line 6405 of file MrpcTrack.cxx.

6405 {
6406
6407 if( iflag == 1 ) {
6408 m_tofId1 = -99;
6409 m_qch1 = -999.0;
6410 m_adc1 = -999.0;
6411 m_tdc1 = -999.0;
6412 m_qch2 = -999.0;
6413 m_adc2 = -999.0;
6414 m_tdc2 = -999.0;
6415 m_ztdc1 = -999.0;
6416 m_zadc1 = -999.0;
6417 m_quality1 = ( m_quality1 & 0x700 );
6418 if( m_hitCase == InnerLayer ) { m_hitCase = NoHit; }
6419 else if( m_hitCase == DoubleLayer ) { m_hitCase = OuterLayer; }
6420 }
6421 else if( iflag == 2 ) {
6422 m_tofId2 = -99;
6423 m_qch3 = -999.0;
6424 m_adc3 = -999.0;
6425 m_tdc3 = -999.0;
6426 m_qch4 = -999.0;
6427 m_adc4 = -999.0;
6428 m_tdc4 = -999.0;
6429 m_ztdc2 = -999.0;
6430 m_zadc2 = -999.0;
6431 m_quality2 = ( m_quality2 & 0x700 );
6432 if( m_hitCase == OuterLayer ) { m_hitCase = NoHit; }
6433 else if( m_hitCase == DoubleLayer ) { m_hitCase = InnerLayer; }
6434 }
6435 else {
6436 cout << "MrpcRec::MrpcTrack::getTofData: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
6437 }
6438
6439 return;
6440}

Referenced by findTofDataBarrel().

◆ getTofDataWest()

void MrpcTrack::getTofDataWest ( TofData tof,
unsigned int  iflag 
)

Definition at line 6356 of file MrpcTrack.cxx.

6356 {
6357
6358 if( iflag == 1 ) {
6359 m_tofId1 = tof->tofId();
6360 m_qch1 = -999.0;
6361 m_adc1 = -999.0;
6362 m_tdc1 = -999.0;
6363 m_qch2 = tof->adcChannelWest();
6364 m_adc2 = tof->adc2();
6365 m_tdc2 = tof->tdc2();
6366 m_ztdc1 = tof->ztdc();
6367 m_zadc1 = tof->zadc();
6368 m_quality1 = ( ( m_quality1 & 0xfffffff0 ) | ( 0x13 & tof->quality() ) );
6369 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit1 ) > ztdc_Cut ) ) ) {
6370 m_quality1 = ( m_quality1 | 0x100 );
6371 }
6372 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit1 ) > zadc_Cut ) ) ) {
6373 m_quality1 = ( m_quality1 | 0x200 );
6374 }
6375 }
6376 else if( iflag == 2 ) {
6377 m_tofId2 = tof->tofId();
6378 m_qch3 = -999.0;
6379 m_adc3 = -999.0;
6380 m_tdc3 = -999.0;
6381 m_qch4 = tof->adcChannelWest();
6382 m_adc4 = tof->adc2();
6383 m_tdc4 = tof->tdc2();
6384 m_ztdc2 = tof->ztdc();
6385 m_zadc2 = tof->zadc();
6386 m_quality2 = ( ( m_quality2 & 0xfffffff0 ) | ( 0x13 & tof->quality() ) );
6387 if( ( ( tof->quality() & 0x5 ) != 0x5 ) || ( ( ( tof->quality() & 0x5 ) == 0x5 ) && ( abs( tof->ztdc() - m_zrhit2 ) > ztdc_Cut ) ) ) {
6388 m_quality2 = ( m_quality2 | 0x100 );
6389 }
6390 if( ( ( tof->quality() & 0xa ) != 0xa ) || ( ( ( tof->quality() & 0xa ) == 0xa ) && ( abs( tof->zadc() - m_zrhit2 ) > zadc_Cut ) ) ) {
6391 m_quality2 = ( m_quality2 | 0x200 );
6392 }
6393 }
6394 else {
6395 cout << "MrpcRec::MrpcTrack::getTofDataWest: Flag which sign the Barrel/Endcap or Inner/Outer is wrong! Please check it!" << endl;
6396 }
6397 tof->setUsed();
6398 return;
6399}

Referenced by findTofDataBarrel().

◆ hitCase()

ExtTrackCase MrpcTrack::hitCase ( ) const
inline

◆ id1()

int MrpcTrack::id1 ( ) const
inline

Definition at line 29 of file MrpcTrack.h.

29{ return m_id1; }

Referenced by MrpcCheckDigi::Fill_TofTrack(), and getMultiHit().

◆ id2()

int MrpcTrack::id2 ( ) const
inline

Definition at line 30 of file MrpcTrack.h.

30{ return m_id2; }

Referenced by MrpcCheckDigi::Fill_TofTrack(), and getMultiHit().

◆ is_mrpc_extrapolation_good()

bool MrpcTrack::is_mrpc_extrapolation_good ( )
inline

Definition at line 109 of file MrpcTrack.h.

109{return mrpc_extrapolation_good;}

Referenced by MrpcCount::setTrack3().

◆ isNoHit()

bool MrpcTrack::isNoHit ( ) const
inline

Definition at line 113 of file MrpcTrack.h.

113{ return m_hitCase==NoHit; }

◆ kal()

int MrpcTrack::kal ( unsigned int  i) const
inline

Definition at line 41 of file MrpcTrack.h.

41{ return m_kal[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack(), and setExtTrack().

◆ match()

void MrpcTrack::match ( bool  forCalibration,
std::vector< int >  deadId,
std::vector< MrpcTrack * > *&  tofTrackVec 
)

Definition at line 5575 of file MrpcTrack.cxx.

5575 {
5576
5577 if( m_hitCase == NoHit ) return;
5578
5579 if( m_hitCase == InnerLayer ) {
5580 findTofDataBarrel( m_tofData1, m_tofData2, m_zrhit1, 1, tofTrackVec );
5581 if( ( m_quality1 & 0x10 ) == 0 ) { m_hitCase = NoHit; }
5582 }
5583 else if( m_hitCase == OuterLayer ) {
5584 findTofDataBarrel( m_tofData3, m_tofData4, m_zrhit2, 2, tofTrackVec );
5585 if( ( m_quality2 & 0x10 ) == 0 ) { m_hitCase = NoHit; }
5586 }
5587 else if( m_hitCase == DoubleLayer ) {
5588 findTofDataBarrel( m_tofData1, m_tofData2, m_zrhit1, 1, tofTrackVec );
5589 if( ( m_quality1 & 0x10 ) == 0 ) { m_hitCase = OuterLayer; }
5590 findTofDataBarrel( m_tofData3, m_tofData4, m_zrhit2, 2, tofTrackVec );
5591 if( ( m_quality2 & 0x10 ) == 0 ) {
5592 if( m_hitCase == DoubleLayer ) {
5593 m_hitCase = InnerLayer;
5594 }
5595 else if( m_hitCase == OuterLayer ) {
5596 m_hitCase = NoHit;
5597 }
5598 else {
5599 cout << "MrpcRec::MrpcTrack::match: 2- Impossible!" << endl;
5600 }
5601 }
5602 }
5603 else if( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) ) {
5604 findTofDataEndcap( m_tofData1, m_tofData2, m_zr1 );
5605 }
5606 else if((m_hitCase==westendcap_1) || (m_hitCase==westendcap_2) || (m_hitCase==eastendcap_2) || (m_hitCase==eastendcap_1))
5607 {
5608 //std::cout << "MrpcTrack match(): New mrpc Endcap. m_zrhit1 = " << m_zrhit1 << std::endl;
5609 findTofDataMRPC( m_tofData1, m_tofData2, m_zrhit1, 3 );
5610 }
5611 else {
5612 cout << "MrpcRec::MrpcTrack::match: 1- Impossible!" << endl;
5613 }
5614
5615 if( forCalibration ) {
5616 // set Data Sample for Calibration, double layer, only one hit for counter, T and Q.
5617 if( m_hitCase == DoubleLayer ) {
5618 if( ( ( m_quality1 & 0xf ) == 0xf ) && ( ( m_quality2 & 0xf ) == 0xf ) ) {
5619 m_quality1 = ( m_quality1 | 0x800 ); // Calibration Sample
5620 m_quality2 = ( m_quality2 | 0x800 ); // Calibration Sample
5621 }
5622 else {
5623 std::vector<int>::iterator iter = deadId.begin();
5624 for( ; iter != deadId.end(); iter++ ) {
5625 Identifier iden = Identifier(*iter);
5626 int barrel = TofID::barrel_ec(iden);
5627 int layer = TofID::layer(iden);
5628 int tofId = TofID::phi_module(iden);
5629 int east = TofID::end(iden);
5630 if( barrel == 1 ) {
5631 if( layer==0 ) {
5632 if( m_tofId1 == tofId ) {
5633 if( ( m_quality2 & 0xf ) == 0xf ) {
5634 if( ( ( east == 0 ) && ( ( m_quality1 & 0xf ) == 0x3 ) ) || ( ( east == 1 ) && ( ( m_quality1 & 0xf ) == 0xc ) ) ) {
5635 m_quality1 = ( m_quality1 | 0x800 );
5636 m_quality2 = ( m_quality2 | 0x800 );
5637
5638 }
5639 }
5640 }
5641 }
5642 else if( layer == 1 ) {
5643 if( m_tofId2 == (tofId+88) ) {
5644 if( ( m_quality1 & 0xf ) == 0xf ) {
5645 if( ( ( east == 0 ) && ( ( m_quality2 & 0xf ) == 0x3 ) ) || ( ( east == 1 ) && ( ( m_quality2 & 0xf ) == 0xc ) ) ) {
5646 m_quality1 = ( m_quality1 | 0x800 );
5647 m_quality2 = ( m_quality2 | 0x800 );
5648 }
5649 }
5650 }
5651 }
5652 }
5653 }
5654 }
5655 }
5656 // set Data Sample for Calibration, only one hit for counter, T and Q.
5657 else if( m_hitCase == InnerLayer ) {
5658 if( ( m_quality1 & 0xf ) == 0xf ) {
5659 m_quality1 = ( m_quality1 | 0x800 ); // Calibration Sample
5660 }
5661 else {
5662 std::vector<int>::iterator iter = deadId.begin();
5663 for( ; iter != deadId.end(); iter++ ) {
5664 Identifier iden = Identifier(*iter);
5665 int barrel = TofID::barrel_ec(iden);
5666 int layer = TofID::layer(iden);
5667 int tofId = TofID::phi_module(iden);
5668 int east = TofID::end(iden);
5669 if( barrel == 1 ) {
5670 if( layer==0 ) {
5671 if( m_tofId1 == tofId ) {
5672 if( ( ( east == 0 ) && ( ( m_quality1 & 0xf ) == 0x3 ) ) || ( ( east == 1 ) && ( ( m_quality1 & 0xf ) == 0xc ) ) ) {
5673 m_quality1 = ( m_quality1 | 0x800 );
5674 }
5675 }
5676 }
5677 }
5678 }
5679 }
5680 }
5681
5682 // set Data Sample for Calibration, only one hit for counter, T and Q.
5683 if( ( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) ) && ( ( m_quality1 & 0xf ) == 0xc ) ) {
5684 m_quality1 = ( m_quality1 | 0x800 ); // Calibration Sample
5685 }
5686 }
5687
5688 return;
5689}
void findTofDataMRPC(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag)
Definition: MrpcTrack.cxx:5864
void findTofDataBarrel(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zrhit, unsigned int iflag, std::vector< MrpcTrack * > *&tofTrackVec)
Definition: MrpcTrack.cxx:5696
void findTofDataEndcap(std::vector< TofData * > tofDataVec1, std::vector< TofData * > tofDataVec2, double zr1[5])
Definition: MrpcTrack.cxx:6083
static int end(const Identifier &id)
Definition: TofID.cxx:129
static int phi_module(const Identifier &id)
Definition: TofID.cxx:117
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: TofID.cxx:95
static int layer(const Identifier &id)
Definition: TofID.cxx:109

◆ p()

double MrpcTrack::p ( ) const
inline

Definition at line 33 of file MrpcTrack.h.

33{ return m_momentum; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ path()

double MrpcTrack::path ( ) const
inline

Definition at line 34 of file MrpcTrack.h.

34{ return m_path; }

◆ path1()

double MrpcTrack::path1 ( ) const
inline

Definition at line 35 of file MrpcTrack.h.

35{ return m_path1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ path2()

double MrpcTrack::path2 ( ) const
inline

Definition at line 36 of file MrpcTrack.h.

36{ return m_path2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ph()

double MrpcTrack::ph ( ) const
inline

Definition at line 69 of file MrpcTrack.h.

69{ return m_ph; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ph1()

double MrpcTrack::ph1 ( ) const
inline

Definition at line 67 of file MrpcTrack.h.

67{ return m_ph1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ph11()

double MrpcTrack::ph11 ( ) const
inline

Definition at line 63 of file MrpcTrack.h.

63{ return m_ph11; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ph12()

double MrpcTrack::ph12 ( ) const
inline

Definition at line 64 of file MrpcTrack.h.

64{ return m_ph12; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ph2()

double MrpcTrack::ph2 ( ) const
inline

Definition at line 68 of file MrpcTrack.h.

68{ return m_ph2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ph21()

double MrpcTrack::ph21 ( ) const
inline

Definition at line 65 of file MrpcTrack.h.

65{ return m_ph21; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ph22()

double MrpcTrack::ph22 ( ) const
inline

Definition at line 66 of file MrpcTrack.h.

66{ return m_ph22; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ phi1()

double MrpcTrack::phi1 ( ) const
inline

Definition at line 54 of file MrpcTrack.h.

54{ return m_phi1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ phi2()

double MrpcTrack::phi2 ( ) const
inline

Definition at line 55 of file MrpcTrack.h.

55{ return m_phi2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ qch1()

double MrpcTrack::qch1 ( ) const
inline

Definition at line 79 of file MrpcTrack.h.

79{ return m_qch1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ qch2()

double MrpcTrack::qch2 ( ) const
inline

Definition at line 80 of file MrpcTrack.h.

80{ return m_qch2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ qch3()

double MrpcTrack::qch3 ( ) const
inline

Definition at line 81 of file MrpcTrack.h.

81{ return m_qch3; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ qch4()

double MrpcTrack::qch4 ( ) const
inline

Definition at line 82 of file MrpcTrack.h.

82{ return m_qch4; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ quality()

unsigned int MrpcTrack::quality ( ) const
inline

Definition at line 58 of file MrpcTrack.h.

58{ return m_quality; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ quality1()

unsigned int MrpcTrack::quality1 ( ) const
inline

Definition at line 56 of file MrpcTrack.h.

56{ return m_quality1; }

Referenced by MrpcCheckDigi::Fill_TofTrack(), findTofDataBarrel(), and getMultiHit().

◆ quality2()

unsigned int MrpcTrack::quality2 ( ) const
inline

Definition at line 57 of file MrpcTrack.h.

57{ return m_quality2; }

Referenced by MrpcCheckDigi::Fill_TofTrack(), findTofDataBarrel(), and getMultiHit().

◆ qualityAnalysis()

void MrpcTrack::qualityAnalysis ( )

◆ setCalibration()

void MrpcTrack::setCalibration ( )

Definition at line 6448 of file MrpcTrack.cxx.

6448 {
6449
6450 bool barrel = ( ( m_hitCase == InnerLayer ) || ( m_hitCase == OuterLayer ) || ( m_hitCase == DoubleLayer ) );
6451 bool endcap = ( ( m_hitCase == EastEndcap ) || ( m_hitCase == WestEndcap ) );
6452 bool newmrpcendcap = ((m_hitCase == westendcap_1) || (m_hitCase == westendcap_2) || (m_hitCase == eastendcap_1) || (m_hitCase == eastendcap_2));
6453
6454 bool innerEast = ( ( m_quality1 & 0xc ) == 0xc );
6455 bool innerWest = ( ( m_quality1 & 0x3 ) == 0x3 );
6456 bool outerEast = ( ( m_quality2 & 0xc ) == 0xc );
6457 bool outerWest = ( ( m_quality2 & 0x3 ) == 0x3 );
6458 bool innerLayer = ( ( m_quality1 & 0xf ) == 0xf );
6459 bool outerLayer = ( ( m_quality2 & 0xf ) == 0xf );
6460
6461 bool endcapData = ( ( m_quality1 & 0xc ) == 0xc );
6462 bool newmrpcendcapData = ( ( m_quality1 & 0xc ) == 0xc );
6463
6464 if( m_hitCase == DoubleLayer ) {
6465 for( unsigned int i=0; i<5; i++ ) {
6466 m_texp[i] = tofCaliSvc->BTimeCluster( m_texpInner[i], m_texpOuter[i], m_zr1[i], m_zr2[i], m_tofId1, m_tofId2 );
6467 }
6468 m_path = tofCaliSvc->BTimeCluster( m_path1, m_path2, m_zrhit1, m_zrhit2, m_tofId1, m_tofId2 );
6469 }
6470
6471 if( barrel ) {
6472 if( innerEast ) {
6473 for( unsigned int i=0; i<5; i++ ) {
6474 m_tof11[i] = tofCaliSvc->BTime1( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1,m_estime );
6475 }
6476 m_sigma11 = tofCaliSvc->BSigma1( m_zrhit1, m_tofId1 );
6477 m_ph11 = m_adc1;
6478 }
6479
6480 if( innerWest ) {
6481 for( unsigned int i=0; i<5; i++ ) {
6482 m_tof12[i] = tofCaliSvc->BTime2( m_adc2, m_tdc2-m_estime, m_zr1[i], m_tofId1,m_estime );
6483 }
6484 m_sigma12 = tofCaliSvc->BSigma2( m_zrhit1, m_tofId1 );
6485 m_ph12 = m_adc2;
6486 }
6487
6488 if( innerLayer ) {
6489 for( unsigned int i=0; i<5; i++ ) {
6490 m_tof1[i] = tofCaliSvc->BTimeCounter( m_tof11[i], m_tof12[i], m_zr1[i], m_tofId1 );
6491 }
6492 m_sigma1 = tofCaliSvc->BSigmaCounter( m_zrhit1, m_tofId1 );
6493 m_ph1 = tofCaliSvc->BPulseHeight( m_adc1, m_adc2, m_zrhit1, m_theta1, m_tofId1 );
6494 /*
6495 if( m_hitCase == InnerLayer ) {
6496 for( unsigned int i=0; i<5; i++ ) {
6497 m_tof[i] = m_tof1[i];
6498 }
6499 m_sigma = m_sigma1;
6500 }
6501 */
6502 }
6503
6504 if( outerEast ) {
6505 for( unsigned int i=0; i<5; i++ ) {
6506 m_tof21[i] = tofCaliSvc->BTime1( m_adc3, m_tdc3-m_estime, m_zr2[i], m_tofId2,m_estime );
6507 }
6508 m_sigma21 = tofCaliSvc->BSigma1( m_zrhit2, m_tofId2 );
6509 m_ph21 = m_adc3;
6510 }
6511
6512 if( outerWest ) {
6513 for( unsigned int i=0; i<5; i++ ) {
6514 m_tof22[i] = tofCaliSvc->BTime2( m_adc4, m_tdc4-m_estime, m_zr2[i], m_tofId2,m_estime );
6515 }
6516 m_sigma22 = tofCaliSvc->BSigma2( m_zrhit2, m_tofId2 );
6517 m_ph22 = m_adc4;
6518 }
6519
6520 if( outerLayer ) {
6521 for( unsigned int i=0; i<5; i++ ) {
6522 m_tof2[i] = tofCaliSvc->BTimeCounter( m_tof21[i], m_tof22[i], m_zr2[i], m_tofId2 );
6523 }
6524 m_sigma2 = tofCaliSvc->BSigmaCounter( m_zrhit2, m_tofId2 );
6525 m_ph2 = tofCaliSvc->BPulseHeight( m_adc3, m_adc4, m_zrhit2, m_theta2, m_tofId2 );
6526 /*
6527 if( m_hitCase == OuterLayer ) {
6528 for( unsigned int i=0; i<5; i++ ) {
6529 m_tof[i] = m_tof2[i];
6530 }
6531 m_sigma = m_sigma2;
6532 }
6533 */
6534 }
6535
6536 if( innerLayer && outerLayer ) {
6537 for( unsigned int i=0; i<5; i++ ) {
6538 m_tof[i] = tofCaliSvc->BTimeCluster( m_tof1[i], m_tof2[i], m_zr1[i], m_zr2[i], m_tofId1, m_tofId2 );
6539 }
6540 m_sigma = tofCaliSvc->BSigmaCluster( m_zrhit1, m_zrhit2, m_tofId1, m_tofId2 );
6541 m_ph = tofCaliSvc->BTimeCluster( m_ph1, m_ph2, m_zrhit1, m_zrhit2, m_tofId1, m_tofId2 );
6542 }
6543 }
6544
6545 if( endcap ) {
6546 if( endcapData ) {
6547 for( unsigned int i=0; i<5; i++ ) {
6548 m_tof11[i] = tofCaliSvc->ETime( m_adc1, m_tdc1-m_estime, m_zr1[i], m_tofId1 );
6549 }
6550 m_sigma11 = tofCaliSvc->ESigma( m_zrhit1, m_tofId1 );
6551 m_ph11 = tofCaliSvc->EPulseHeight( m_adc1, m_zrhit1, m_theta1, m_tofId1 );
6552 m_quality = 1;
6553 if( (m_quality1&0xa000)!=0 ) { m_quality = 4; }
6554 }
6555 }
6556 if( newmrpcendcap ) {
6557 if( newmrpcendcapData ) {
6558 //std::cout << "MrpcTrack setCalibration(): Set the values for the new endcap!" << std::endl;
6559 for( unsigned int i=0; i<5; i++ ) {
6560
6561
6562 //Calculate the transitiontime for the signal!
6563 double my_partID=0;
6564 if(m_hitCase==eastendcap_2) my_partID=3;
6565 if(m_hitCase==eastendcap_1) my_partID=4;
6566 if(m_hitCase==westendcap_1) my_partID=5;
6567 if(m_hitCase==westendcap_2) my_partID=6;
6569 double my_transtime = BesTofDigitizerEcV4::Calculate_strip_transition_time_cont( m_zrhit1*cos(m_phi1)*10., m_zrhit1*sin(m_phi1)*10., my_partID,my_module);
6570 double strip_transition_time=0;
6571
6572 if(mrpc_extrapolation_good && my_transtime!=0)
6573 {
6574 strip_transition_time=my_transtime;
6575 }
6576 else
6577 {
6579 }
6580
6581 m_tof11[i] = m_tdc1-m_estime-strip_transition_time;;
6582 //std::cout << "MrpcTrack :: m_tdc1 = "<< m_tdc1 <<std::endl;
6583 //std::cout << " m_tdc1-m_estime = "<< m_tdc1-m_estime <<std::endl;
6584 //std::cout << " m_zr1[" << i << "] = " << m_zr1[i] << std::endl;
6585 //std::cout << " m_tof11[" << i << "] = " << m_tof11[i] << std::endl;
6586 }
6587 m_sigma11 = 0.08; //#Correct this value
6588 m_ph11 = m_adc1;
6589
6590 m_quality = 1;
6591 if( (m_quality1&0xa000)!=0 ) { m_quality = 4; }
6592 //std::cout<<" m_sigma11 = " << m_sigma11 <<std::endl;
6593 //std::cout<<" m_ph11 = " << m_ph11 <<std::endl;
6594 //std::cout << "MrpcTrack setCalibration(): The values for the new endcap have been set!" << std::endl;
6595 }
6596 }
6597
6598 // set Quality of Barrel TOF
6599 if( barrel ) {
6600
6601 // double layer
6602 if( innerLayer && outerLayer ) {
6603 m_quality = 1;
6604 }
6605 else {
6606 // single layer
6607 if( innerLayer || outerLayer ) {
6608 m_quality = 2;
6609 }
6610 else {
6611 // single-end of one layer
6612 if( innerEast || innerWest || outerEast || outerWest ) {
6613 m_quality = 3;
6614 }
6615 }
6616 }
6617
6618 // multi-hit
6619 if( ( (m_quality1&0xa000)!=0 ) || ( (m_quality2&0xa000)!=0 ) ) {
6620 m_quality = m_quality + 3;
6621 }
6622
6623 // ztdc and extrapolated zhit is not matched
6624 if( ( (m_quality1&0x100)==0x100 ) || ( (m_quality2&0x100)==0x100 ) ) {
6625 if( ( m_quality == 1 ) || ( m_quality == 4 ) ) { m_quality = 7; }
6626 else if( ( m_quality == 2 ) || ( m_quality == 5 ) ) { m_quality = 8; }
6627 else if( ( m_quality == 3 ) || ( m_quality == 6 ) ) { m_quality = 9; }
6628 else {
6629 cout << "MrpcRec::MrpcTrack::setCalibration: Impossible!" << endl;
6630 }
6631 }
6632
6633 }
6634
6635 return;
6636}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
static G4double Average_transition_time(G4int my_module)
static G4double Calculate_strip_transition_time_cont(G4double x_mm, G4double y_mm, G4int partId_f, G4int module_mrpc_f)
virtual const double BSigmaCounter(double zHit, unsigned id)=0
virtual const double BSigma2(double zHit, unsigned id)=0
virtual const double BTimeCluster(double tlayer1, double tlayer2, double z1, double z2, unsigned id1, unsigned int id2)=0
virtual const double EPulseHeight(double ADC, double rHit, double cost, unsigned int id)=0
virtual const double BTime2(double ADC, double TDC, double zHit, unsigned id, double t0)=0
virtual const double BTime1(double ADC, double TDC, double zHit, unsigned id, double t0)=0
virtual const double BTimeCounter(double tleft, double tright, double z, unsigned id)=0
virtual const double BSigmaCluster(double zHit1, double zHit2, unsigned id1, unsigned id2)=0
virtual const double BPulseHeight(double ADC1, double ADC2, double zHit, double sint, unsigned int id)=0
virtual const double BSigma1(double zHit, unsigned id)=0
virtual const double ESigma(double rHit, unsigned id)=0

◆ setExtTrack()

void MrpcTrack::setExtTrack ( RecExtTrack extTrack,
int  kal[5],
double  t0,
int  t0Stat 
)

Definition at line 155 of file MrpcTrack.cxx.

155 {
156
157 m_estime = t0;
158 m_t0Stat = t0Stat;
159
160 int tofId1 = extTrack->tof1VolumeNumber();
161 int tofId2 = extTrack->tof2VolumeNumber();
162
163 G4String tof1volumename = extTrack->tof1VolumeName();
164 G4String tof2volumename = extTrack->tof2VolumeName();
165
166
167 m_barrel = 7;
168 if(tof1volumename == "logical_sensitive_detector_east_1")
169 {
170 m_id1 = tofId1;
171
172 if(m_id1%25==0)
173 {
174 m_barrel = 7;
175 m_hitCase = NoHit;
176 }
177 else
178 {
179 m_barrel = 4;
180 m_hitCase = eastendcap_1;
181 }
182
183 //std::cout << "MrpcTrack m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
184
185 }
186 else if(tof1volumename == "logical_sensitive_detector_east_2")
187 {
188 m_id1 = tofId1;
189
190 if(m_id1%25==0)
191 {
192 m_barrel = 7;
193 m_hitCase = NoHit;
194 }
195 else
196 {
197 m_barrel = 3;
198 m_hitCase = eastendcap_2;
199 }
200 //std::cout << "MrpcTrack m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
201 }
202 else if(tof1volumename == "logical_sensitive_detector_west_1")
203 {
204 m_id1 = tofId1;
205
206 if(m_id1%25==0)
207 {
208 m_barrel = 7;
209 m_hitCase = NoHit;
210 }
211 else
212 {
213 m_barrel =5 ;
214 m_hitCase = westendcap_1;
215 }
216 //std::cout << "MrpcTrack m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
217 }
218 else if(tof1volumename == "logical_sensitive_detector_west_2")
219 {
220 m_id1 = tofId1;
221 if(m_id1%25==0)
222 {
223 m_barrel = 7;
224 m_hitCase = NoHit;
225 }
226 else
227 {
228 m_barrel =6 ;
229 m_hitCase = westendcap_2;
230 }
231 //std::cout << "MrpcTrack m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
232 }
233 else if( tofId1>=0 && tofId1<=87 && ( tof1volumename.contains("ScinBr") || tof1volumename.contains("ScinEc") || tof2volumename.contains("ScinBr") || tof2volumename.contains("ScinEc") ))
234 {
235 m_id1 = tofId1;
236 m_barrel = 1;
237 m_hitCase = InnerLayer;
238 //std::cout << "MrpcTrack 0<i<87 m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
239 }
240 else if( tofId1>=176 && tofId1<=223 && ( tof1volumename.contains("ScinBr") || tof1volumename.contains("ScinEc") || tof2volumename.contains("ScinBr") || tof2volumename.contains("ScinEc" ) ))
241 {
242 m_id1 = tofId1 - 176 + 48;
243 m_barrel = 2;
244 m_hitCase = WestEndcap;
245
246 //std::cout << "MrpcTrack setExTrck 176<i<223 m_barrel | m_id5B1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
247 }
248 else if( tofId1>=224 && tofId1<=271 && ( tof1volumename.contains("ScinBr") || tof1volumename.contains("ScinEc") || tof2volumename.contains("ScinBr") || tof2volumename.contains("ScinEc") )) {
249 m_id1 = tofId1 - 176 - 48;
250 m_barrel = 0;
251 m_hitCase = EastEndcap;
252 //std::cout << "MrpcTrack setExTrck 224<i<271 m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
253 }
254 else {
255 m_barrel = 7;
256 m_hitCase = NoHit;
257 //std::cout << "MrpcTrack nohit m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
258 }
259
260
261 if( tofId2>=88 && tofId2<=175 && ( tof1volumename.contains("ScinBr") || tof1volumename.contains("ScinEc") || tof2volumename.contains("ScinBr") || tof2volumename.contains("ScinEc") )) {
262 m_id2 = tofId2;
263 m_barrel = 1;
264 if( m_hitCase == InnerLayer ) {
265 m_hitCase = DoubleLayer;
266 }
267 else if( m_hitCase==NoHit ) {
268 m_hitCase = OuterLayer;
269 }
270 //std::cout << "MrpcTrack 88<i<175 m_barrel | m_id1 | m_hitCase " << m_barrel << " | " << m_id1 << " | " << m_hitCase << std::endl;
271 }
272
273
274 m_trackId = extTrack->trackId();
275
276 m_momentum = extTrack->tof1Momentum().r();
277 if( m_hitCase == InnerLayer || m_hitCase == DoubleLayer ) {
278 for( unsigned int i=0; i<5; i++ ) {
279 m_texpInner[i] = extTrack->tof1(i);
280 // std::cout << "MrpcTrack setExtTrack - BR: m_texpInner[" << i<< "] " << m_texpInner[i] << std::endl;
281 }
282 m_path1 = extTrack->tof1Path();
283 m_zrhit1 = extTrack->tof1Position().z();
284 // std::cout << "MrpcTrack setExtTrack - BR: m_zrhit1 extTrack->tof1Position().rho() " << m_zrhit1 << std::endl;
285 m_errzr1 = extTrack->tof1PosSigmaAlongZ();
286 m_theta1 = extTrack->tof1Momentum().rho()/extTrack->tof1Momentum().r();
287 m_phi1 = extTrack->tof1Position().phi();
288 for( unsigned int i=0; i<5; i++ ) {
289 m_zr1[i] = extTrack->tof1Position(i).z();
290 m_ezr1[i] = extTrack->tof1PosSigmaAlongZ(i);
291 //std::cout << "MrpcTrack setExtTrack - BR: m_zr1["<<i<< "] extTrack->tof1Position(i).rho() " << m_zr1 << std::endl;
292 }
293 }
294 else if( m_hitCase == EastEndcap || m_hitCase == WestEndcap || m_hitCase == eastendcap_1 || m_hitCase == eastendcap_2 || m_hitCase == westendcap_1 || m_hitCase == westendcap_2){
295 for( unsigned int i=0; i<5; i++ ) {
296 m_texpInner[i] = extTrack->tof1(i);
297 //std::cout << "MrpcTrack setExtTrack - EC: m_texpInner[" << i<< "] " << m_texpInner[i] << std::endl;
298
299 }
300 m_path1 = extTrack->tof1Path();
301 m_zrhit1 = extTrack->tof1Position().rho();
302 //std::cout << "MrpcTrack setExtTrack - EC: m_zrhit1 extTrack->tof1Position().rho() " << m_zrhit1 << std::endl;
303 m_errzr1 = sqrt( extTrack->tof1PosSigmaAlongX()*extTrack->tof1PosSigmaAlongX() + extTrack->tof1PosSigmaAlongY()*extTrack->tof1PosSigmaAlongY() );
304 m_theta1 = extTrack->tof1Momentum().z()/extTrack->tof1Momentum().r();
305 m_phi1 = extTrack->tof1Position().phi();
306 for( unsigned int i=0; i<5; i++ ) {
307 m_zr1[i] = extTrack->tof1Position(i).rho();
308 m_ezr1[i] = sqrt( extTrack->tof1PosSigmaAlongX(i)*extTrack->tof1PosSigmaAlongX(i) + extTrack->tof1PosSigmaAlongY(i)*extTrack->tof1PosSigmaAlongY(i) );
309
310 //std::cout << "MrpcTrack setExtTrack - EC: m_zr1["<<i<< "] extTrack->tof1Position(i).rho() " << m_zr1 << std::endl;
311 }
312 }
313
314 if( m_hitCase == OuterLayer || m_hitCase == DoubleLayer ) {
315 for( unsigned int i=0; i<5; i++ ) {
316 m_texpOuter[i] = extTrack->tof2(i);
317 }
318 m_path2 = extTrack->tof2Path();
319 m_zrhit2 = extTrack->tof2Position().z();
320 m_errzr2 = extTrack->tof2PosSigmaAlongZ();
321 m_theta2 = extTrack->tof2Momentum().rho()/extTrack->tof2Momentum().r();
322 m_phi2 = extTrack->tof2Position().phi();
323 for( unsigned int i=0; i<5; i++ ) {
324 m_zr2[i] = extTrack->tof2Position(i).z();
325 m_ezr2[i] = extTrack->tof2PosSigmaAlongZ(i);
326 }
327 }
328
329 if( m_hitCase == NoHit ) { m_quality = 11; }
330
331 for( unsigned int i=0; i<5; i++ ) {
332 m_kal[i] = kal[i];
333 }
334
335 return;
336
337}
const double tof1Path() const
Definition: DstExtTrack.h:68
const Hep3Vector tof1Position() const
Definition: DstExtTrack.h:58
const string tof1VolumeName() const
Definition: DstExtTrack.h:62
const int tof1VolumeNumber() const
Definition: DstExtTrack.h:64
const double tof1() const
Definition: DstExtTrack.h:66
const Hep3Vector tof2Momentum() const
Definition: DstExtTrack.h:96
const Hep3Vector tof1Momentum() const
Definition: DstExtTrack.h:60
const double tof2() const
Definition: DstExtTrack.h:102
const double tof2PosSigmaAlongZ() const
Definition: DstExtTrack.h:106
const double tof1PosSigmaAlongX() const
Definition: DstExtTrack.h:74
const double tof2Path() const
Definition: DstExtTrack.h:104
const string tof2VolumeName() const
Definition: DstExtTrack.h:98
const int trackId() const
Definition: DstExtTrack.h:43
const double tof1PosSigmaAlongY() const
Definition: DstExtTrack.h:76
const double tof1PosSigmaAlongZ() const
Definition: DstExtTrack.h:70
const int tof2VolumeNumber() const
Definition: DstExtTrack.h:100
const Hep3Vector tof2Position() const
Definition: DstExtTrack.h:94
int t0Stat() const
Definition: MrpcTrack.h:105
int kal(unsigned int i) const
Definition: MrpcTrack.h:41
int tofId2() const
Definition: MrpcTrack.h:61
int tofId1() const
Definition: MrpcTrack.h:60

Referenced by MrpcRec::execute().

◆ setFlag()

void MrpcTrack::setFlag ( unsigned int  flag)
inline

Definition at line 117 of file MrpcTrack.h.

117{ m_flag = flag; }
unsigned int flag() const
Definition: MrpcTrack.h:107

◆ setQuality()

void MrpcTrack::setQuality ( int  qual)
inline

Definition at line 114 of file MrpcTrack.h.

114{ m_quality = qual; }

◆ setQuality1()

void MrpcTrack::setQuality1 ( int  qual1)
inline

Definition at line 115 of file MrpcTrack.h.

115{ m_quality1 = qual1; }

Referenced by getMultiHit().

◆ setQuality2()

void MrpcTrack::setQuality2 ( int  qual2)
inline

Definition at line 116 of file MrpcTrack.h.

116{ m_quality2 = qual2; }

Referenced by getMultiHit().

◆ setRecTofTrack()

void MrpcTrack::setRecTofTrack ( RecTofTrack track,
int  layerorend 
)

Definition at line 6960 of file MrpcTrack.cxx.

6960 {
6961
6962 double toffset[6];
6963 for( unsigned int i=0; i<6; i++ ) {
6964 toffset[i] = 0.0;
6965 }
6966
6967 if( layerorend == 0 ) { // cluster or double layer hit
6968 track->setPh( m_ph );
6969 track->setTof( m_tof[0] );
6970 track->setSigmaElectron( m_sigma );
6971 for( unsigned int i=0; i<5; i++ ) {
6972 toffset[i] = m_tof[0] - m_tof[i];
6973 }
6974 track->setToffset( toffset );
6975 track->setBeta( m_path/m_tof[0]/30.0 );
6976 }
6977 else if( layerorend == 1 ) { // inner layer
6978 track->setPh( m_ph1 );
6979 track->setTof( m_tof1[0] );
6980 track->setSigmaElectron( m_sigma1 );
6981 for( unsigned int i=0; i<5; i++ ) {
6982 toffset[i] = m_tof1[0] - m_tof1[i];
6983 }
6984 track->setToffset( toffset );
6985 track->setBeta( m_path1/m_tof1[0]/30.0 );
6986 }
6987 else if( layerorend == 2 ) { // outer layer
6988 track->setPh( m_ph2 );
6989 track->setTof( m_tof2[0] );
6990 track->setSigmaElectron( m_sigma2 );
6991 for( unsigned int i=0; i<5; i++ ) {
6992 toffset[i] = m_tof2[0] - m_tof2[i];
6993 }
6994 track->setToffset( toffset );
6995 track->setBeta( m_path2/m_tof2[0]/30.0 );
6996 }
6997 else if( layerorend == 11 ) { // inner layer east end readout
6998 track->setPh( m_ph11 );
6999 track->setTof( m_tof11[0] );
7000 track->setSigmaElectron( m_sigma11 );
7001
7002 //std::cout << "MrpcTrack setRecTofTrack : Set m_ph11 = " << m_ph11 << std::endl;
7003 //std::cout << "MrpcTrack setRecTofTrack : Set m_tof11[0] = " << m_tof11[0] << std::endl;
7004 //std::cout << "MrpcTrack setRecTofTrack : Set m_sigma11 = " << m_sigma11 << std::endl;
7005
7006
7007 for( unsigned int i=0; i<5; i++ ) {
7008 toffset[i] = m_tof11[0] - m_tof11[i];
7009 }
7010 track->setToffset( toffset );
7011 track->setBeta( m_path1/m_tof11[0]/30.0 );
7012 //std::cout << "MrpcTrack setRecTofTrack : Set Beta = " <<m_path1/m_tof11[0]/30.0 << std::endl;
7013
7014 }
7015 else if( layerorend == 12 ) { // inner layer west end readout
7016 track->setPh( m_ph12 );
7017 track->setTof( m_tof12[0] );
7018 track->setSigmaElectron( m_sigma12 );
7019 for( unsigned int i=0; i<5; i++ ) {
7020 toffset[i] = m_tof12[0] - m_tof12[i];
7021 }
7022 track->setToffset( toffset );
7023 track->setBeta( m_path1/m_tof12[0]/30.0 );
7024 }
7025 else if( layerorend == 21 ) { // outer layer east end readout
7026 track->setPh( m_ph21 );
7027 track->setTof( m_tof21[0] );
7028 track->setSigmaElectron( m_sigma21 );
7029 for( unsigned int i=0; i<5; i++ ) {
7030 toffset[i] = m_tof21[0] - m_tof21[i];
7031 }
7032 track->setToffset( toffset );
7033 track->setBeta( m_path2/m_tof21[0]/30.0 );
7034 }
7035 else if( layerorend == 22 ) { // outer layer west end readout
7036 track->setPh( m_ph22 );
7037 track->setTof( m_tof22[0] );
7038 track->setSigmaElectron( m_sigma22 );
7039 for( unsigned int i=0; i<5; i++ ) {
7040 toffset[i] = m_tof22[0] - m_tof22[i];
7041 }
7042 track->setToffset( toffset );
7043 track->setBeta( m_path2/m_tof22[0]/30.0 );
7044 }
7045 else{
7046 cout << "MrpcRec MrpcTrack::SetRecTofTrack layerorend = " << layerorend << endl;
7047 }
7048 return;
7049}
void setToffset(double toffset[6])
Definition: DstTofTrack.h:108
void setPh(double ph)
Definition: DstTofTrack.h:96
void setTof(double tof)
Definition: DstTofTrack.h:97
void setSigmaElectron(double se)
Definition: DstTofTrack.h:117

Referenced by buildRecTofTrack().

◆ setTofData()

void MrpcTrack::setTofData ( TofDataMap  tofDataMap,
int  neighborhood 
)

IF 5 part

Definition at line 395 of file MrpcTrack.cxx.

395 {
396
397 if( m_hitCase == NoHit ) return;
398
399 unsigned int identify0 = 0x0000c000;
400 unsigned int identify1 = 0x0000c000;
401 unsigned int identify2 = 0x0000c000;
402 unsigned int count0 = 0;
403 unsigned int count1 = 0;
404 unsigned int count2 = 0;
405
406
407 unsigned int identify_it=0x0000c000;
408 unsigned int identify_u =0x0000c000; // upper strip
409 unsigned int identify_b =0x0000c000; // strip below
410 unsigned int identify_l =0x0000c000; // strip left
411 unsigned int identify_lu=0x0000c000; // strip left upper
412 unsigned int identify_lb=0x0000c000; // strip left below
413 unsigned int identify_r =0x0000c000; // strip right
414 unsigned int identify_ru=0x0000c000; // strip right upper
415 unsigned int identify_rb=0x0000c000; // strip right below
416 //weitere Nachbarschicht
417 unsigned int identify_luu =0x0000c000; // strip left up up
418 unsigned int identify_lbb =0x0000c000;
419 unsigned int identify_ruu =0x0000c000;
420 unsigned int identify_rbb =0x0000c000;
421 unsigned int identify_uu =0x0000c000;
422 unsigned int identify_bb =0x0000c000;
423 //weitere Nachbarschicht
424 unsigned int identify_luuu =0x0000c000; // strip left up up up
425 unsigned int identify_lbbb =0x0000c000;
426 unsigned int identify_ruuu =0x0000c000;
427 unsigned int identify_rbbb =0x0000c000;
428 unsigned int identify_uuu =0x0000c000;
429 unsigned int identify_bbb =0x0000c000;
430
431 //weitere Nachbarschicht nach links und rechts
432 unsigned int identify_luuul =0x0000c000; // strip left up up up left
433 unsigned int identify_lbbbl =0x0000c000;
434 unsigned int identify_ruuur =0x0000c000;
435 unsigned int identify_rbbbr =0x0000c000;
436 unsigned int identify_luul =0x0000c000;
437 unsigned int identify_lbbl =0x0000c000;
438 unsigned int identify_ruur =0x0000c000;
439 unsigned int identify_rbbr =0x0000c000;
440 unsigned int identify_ll =0x0000c000;
441 unsigned int identify_lul=0x0000c000;
442 unsigned int identify_lbl=0x0000c000;
443 unsigned int identify_rr =0x0000c000;
444 unsigned int identify_rur=0x0000c000;
445 unsigned int identify_rbr=0x0000c000;
446
447
448
449 unsigned int count_it =0;
450 unsigned int count_u =0; // upper strip
451 unsigned int count_b =0; // strip below
452 unsigned int count_l =0; // strip left
453 unsigned int count_lu =0; // strip left upper
454 unsigned int count_lb =0; // strip left below
455 unsigned int count_r =0; // strip right
456 unsigned int count_ru =0; // strip right upper
457 unsigned int count_rb =0; // strip right below
458
459 //weitere Nachbarschicht (if=2)
460 unsigned int count_luu =0;
461 unsigned int count_lbb =0;
462 unsigned int count_ruu =0;
463 unsigned int count_rbb =0;
464 unsigned int count_uu =0;
465 unsigned int count_bb =0;
466
467 //weitere Nachbarschicht (if=3)
468 unsigned int count_luuu =0;
469 unsigned int count_lbbb =0;
470 unsigned int count_ruuu =0;
471 unsigned int count_rbbb =0;
472 unsigned int count_uuu =0;
473 unsigned int count_bbb =0;
474
475 //erweitere weitere Nachbarschicht nach links und rechts um eine weitere (if=4)
476 unsigned int count_luuul =0;
477 unsigned int count_lbbbl =0;
478 unsigned int count_ruuur =0;
479 unsigned int count_rbbbr =0;
480 unsigned int count_luul =0;
481 unsigned int count_lbbl =0;
482 unsigned int count_ruur =0;
483 unsigned int count_rbbr =0;
484 unsigned int count_ll =0;
485 unsigned int count_lul =0;
486 unsigned int count_lbl =0;
487 unsigned int count_rr =0;
488 unsigned int count_rur =0;
489 unsigned int count_rbr =0;
490
491
492 //The neighboorhood are all upper and lower strips at the left and at the right side (if=5)
493 // ^^^
494 // - - -
495 // - - -
496 // - - -
497 // - - -
498 // vvv
499
500
501 unsigned int identify_if5_it=0x0000c000;
502 unsigned int identify_if5_m1=0x0000c000;
503 unsigned int identify_if5_m2=0x0000c000;
504 unsigned int identify_if5_m3=0x0000c000;
505 unsigned int identify_if5_m4=0x0000c000;
506 unsigned int identify_if5_m5=0x0000c000;
507 unsigned int identify_if5_m6=0x0000c000;
508 unsigned int identify_if5_m7=0x0000c000;
509 unsigned int identify_if5_m8=0x0000c000;
510 unsigned int identify_if5_m9=0x0000c000;
511 unsigned int identify_if5_m10=0x0000c000;
512 unsigned int identify_if5_m11=0x0000c000;
513 unsigned int identify_if5_m12=0x0000c000;
514 unsigned int identify_if5_l1=0x0000c000;
515 unsigned int identify_if5_l2=0x0000c000;
516 unsigned int identify_if5_l3=0x0000c000;
517 unsigned int identify_if5_l4=0x0000c000;
518 unsigned int identify_if5_l5=0x0000c000;
519 unsigned int identify_if5_l6=0x0000c000;
520 unsigned int identify_if5_l7=0x0000c000;
521 unsigned int identify_if5_l8=0x0000c000;
522 unsigned int identify_if5_l9=0x0000c000;
523 unsigned int identify_if5_l10=0x0000c000;
524 unsigned int identify_if5_l11=0x0000c000;
525 unsigned int identify_if5_l12=0x0000c000;
526 unsigned int identify_if5_r1=0x0000c000;
527 unsigned int identify_if5_r2=0x0000c000;
528 unsigned int identify_if5_r3=0x0000c000;
529 unsigned int identify_if5_r4=0x0000c000;
530 unsigned int identify_if5_r5=0x0000c000;
531 unsigned int identify_if5_r6=0x0000c000;
532 unsigned int identify_if5_r7=0x0000c000;
533 unsigned int identify_if5_r8=0x0000c000;
534 unsigned int identify_if5_r9=0x0000c000;
535 unsigned int identify_if5_r10=0x0000c000;
536 unsigned int identify_if5_r11=0x0000c000;
537 unsigned int identify_if5_r12=0x0000c000;
538 unsigned int count_if5_m1=0;
539 unsigned int count_if5_m2=0;
540 unsigned int count_if5_m3=0;
541 unsigned int count_if5_m4=0;
542 unsigned int count_if5_m5=0;
543 unsigned int count_if5_m6=0;
544 unsigned int count_if5_m7=0;
545 unsigned int count_if5_m8=0;
546 unsigned int count_if5_m9=0;
547 unsigned int count_if5_m10=0;
548 unsigned int count_if5_m11=0;
549 unsigned int count_if5_m12=0;
550 unsigned int count_if5_l1=0;
551 unsigned int count_if5_l2=0;
552 unsigned int count_if5_l3=0;
553 unsigned int count_if5_l4=0;
554 unsigned int count_if5_l5=0;
555 unsigned int count_if5_l6=0;
556 unsigned int count_if5_l7=0;
557 unsigned int count_if5_l8=0;
558 unsigned int count_if5_l9=0;
559 unsigned int count_if5_l10=0;
560 unsigned int count_if5_l11=0;
561 unsigned int count_if5_l12=0;
562 unsigned int count_if5_r1=0;
563 unsigned int count_if5_r2=0;
564 unsigned int count_if5_r3=0;
565 unsigned int count_if5_r4=0;
566 unsigned int count_if5_r5=0;
567 unsigned int count_if5_r6=0;
568 unsigned int count_if5_r7=0;
569 unsigned int count_if5_r8=0;
570 unsigned int count_if5_r9=0;
571 unsigned int count_if5_r10=0;
572 unsigned int count_if5_r11=0;
573 unsigned int count_if5_r12=0;
574
575 //The neighboorhood are all upper and lower strips at the left and at the right side and as well the left and right side of these (if=6)
576 // ^^^
577 // - - - - -
578 // - - - - -
579 // - - - - -
580 // - - - - -
581 // vvv
582
583
584 unsigned int identify_if6_it=0x0000c000;
585 unsigned int identify_if6_m1=0x0000c000;
586 unsigned int identify_if6_m2=0x0000c000;
587 unsigned int identify_if6_m3=0x0000c000;
588 unsigned int identify_if6_m4=0x0000c000;
589 unsigned int identify_if6_m5=0x0000c000;
590 unsigned int identify_if6_m6=0x0000c000;
591 unsigned int identify_if6_m7=0x0000c000;
592 unsigned int identify_if6_m8=0x0000c000;
593 unsigned int identify_if6_m9=0x0000c000;
594 unsigned int identify_if6_m10=0x0000c000;
595 unsigned int identify_if6_m11=0x0000c000;
596 unsigned int identify_if6_m12=0x0000c000;
597 unsigned int identify_if6_l1=0x0000c000;
598 unsigned int identify_if6_l2=0x0000c000;
599 unsigned int identify_if6_l3=0x0000c000;
600 unsigned int identify_if6_l4=0x0000c000;
601 unsigned int identify_if6_l5=0x0000c000;
602 unsigned int identify_if6_l6=0x0000c000;
603 unsigned int identify_if6_l7=0x0000c000;
604 unsigned int identify_if6_l8=0x0000c000;
605 unsigned int identify_if6_l9=0x0000c000;
606 unsigned int identify_if6_l10=0x0000c000;
607 unsigned int identify_if6_l11=0x0000c000;
608 unsigned int identify_if6_l12=0x0000c000;
609 unsigned int identify_if6_r1=0x0000c000;
610 unsigned int identify_if6_r2=0x0000c000;
611 unsigned int identify_if6_r3=0x0000c000;
612 unsigned int identify_if6_r4=0x0000c000;
613 unsigned int identify_if6_r5=0x0000c000;
614 unsigned int identify_if6_r6=0x0000c000;
615 unsigned int identify_if6_r7=0x0000c000;
616 unsigned int identify_if6_r8=0x0000c000;
617 unsigned int identify_if6_r9=0x0000c000;
618 unsigned int identify_if6_r10=0x0000c000;
619 unsigned int identify_if6_r11=0x0000c000;
620 unsigned int identify_if6_r12=0x0000c000;
621 unsigned int identify_if6_ll1=0x0000c000;
622 unsigned int identify_if6_ll2=0x0000c000;
623 unsigned int identify_if6_ll3=0x0000c000;
624 unsigned int identify_if6_ll4=0x0000c000;
625 unsigned int identify_if6_ll5=0x0000c000;
626 unsigned int identify_if6_ll6=0x0000c000;
627 unsigned int identify_if6_ll7=0x0000c000;
628 unsigned int identify_if6_ll8=0x0000c000;
629 unsigned int identify_if6_ll9=0x0000c000;
630 unsigned int identify_if6_ll10=0x0000c000;
631 unsigned int identify_if6_ll11=0x0000c000;
632 unsigned int identify_if6_ll12=0x0000c000;
633 unsigned int identify_if6_rr1=0x0000c000;
634 unsigned int identify_if6_rr2=0x0000c000;
635 unsigned int identify_if6_rr3=0x0000c000;
636 unsigned int identify_if6_rr4=0x0000c000;
637 unsigned int identify_if6_rr5=0x0000c000;
638 unsigned int identify_if6_rr6=0x0000c000;
639 unsigned int identify_if6_rr7=0x0000c000;
640 unsigned int identify_if6_rr8=0x0000c000;
641 unsigned int identify_if6_rr9=0x0000c000;
642 unsigned int identify_if6_rr10=0x0000c000;
643 unsigned int identify_if6_rr11=0x0000c000;
644 unsigned int identify_if6_rr12=0x0000c000;
645 unsigned int count_if6_m1=0;
646 unsigned int count_if6_m2=0;
647 unsigned int count_if6_m3=0;
648 unsigned int count_if6_m4=0;
649 unsigned int count_if6_m5=0;
650 unsigned int count_if6_m6=0;
651 unsigned int count_if6_m7=0;
652 unsigned int count_if6_m8=0;
653 unsigned int count_if6_m9=0;
654 unsigned int count_if6_m10=0;
655 unsigned int count_if6_m11=0;
656 unsigned int count_if6_m12=0;
657 unsigned int count_if6_l1=0;
658 unsigned int count_if6_l2=0;
659 unsigned int count_if6_l3=0;
660 unsigned int count_if6_l4=0;
661 unsigned int count_if6_l5=0;
662 unsigned int count_if6_l6=0;
663 unsigned int count_if6_l7=0;
664 unsigned int count_if6_l8=0;
665 unsigned int count_if6_l9=0;
666 unsigned int count_if6_l10=0;
667 unsigned int count_if6_l11=0;
668 unsigned int count_if6_l12=0;
669 unsigned int count_if6_r1=0;
670 unsigned int count_if6_r2=0;
671 unsigned int count_if6_r3=0;
672 unsigned int count_if6_r4=0;
673 unsigned int count_if6_r5=0;
674 unsigned int count_if6_r6=0;
675 unsigned int count_if6_r7=0;
676 unsigned int count_if6_r8=0;
677 unsigned int count_if6_r9=0;
678 unsigned int count_if6_r10=0;
679 unsigned int count_if6_r11=0;
680 unsigned int count_if6_r12=0;
681 unsigned int count_if6_ll1=0;
682 unsigned int count_if6_ll2=0;
683 unsigned int count_if6_ll3=0;
684 unsigned int count_if6_ll4=0;
685 unsigned int count_if6_ll5=0;
686 unsigned int count_if6_ll6=0;
687 unsigned int count_if6_ll7=0;
688 unsigned int count_if6_ll8=0;
689 unsigned int count_if6_ll9=0;
690 unsigned int count_if6_ll10=0;
691 unsigned int count_if6_ll11=0;
692 unsigned int count_if6_ll12=0;
693 unsigned int count_if6_rr1=0;
694 unsigned int count_if6_rr2=0;
695 unsigned int count_if6_rr3=0;
696 unsigned int count_if6_rr4=0;
697 unsigned int count_if6_rr5=0;
698 unsigned int count_if6_rr6=0;
699 unsigned int count_if6_rr7=0;
700 unsigned int count_if6_rr8=0;
701 unsigned int count_if6_rr9=0;
702 unsigned int count_if6_rr10=0;
703 unsigned int count_if6_rr11=0;
704 unsigned int count_if6_rr12=0;
705
706 if((m_hitCase==eastendcap_1) && (m_id1 > 25))
707 {
708 int tofid_it = m_id1; //This is my stripidentifier
709 identify_it = TofID::getIntID_mrpc(4,tofid_it); //Get the whole identifier for the MRPC cell
710 count_it = tofDataMap.count( identify_it );
711
712 //Get ID and part ID from neighbours
713 int tofid_l = get_mrpc_stripid_neighbour("l",tofid_it,4);
714 int partid_l = get_mrpc_partid_neighbour("l",tofid_it,4);
715 int tofid_r = get_mrpc_stripid_neighbour("r",tofid_it,4);
716 int partid_r = get_mrpc_partid_neighbour("r",tofid_it,4);
717 int tofid_u = get_mrpc_stripid_neighbour("u",tofid_it,4);
718 int partid_u = get_mrpc_partid_neighbour("u",tofid_it,4);
719 int tofid_b = get_mrpc_stripid_neighbour("b",tofid_it,4);
720 int partid_b = get_mrpc_partid_neighbour("b",tofid_it,4);
721 //Now from neighbours where we need two operation
722 int tofid_lu = get_mrpc_stripid_neighbour("u",tofid_l,partid_l);
723 int partid_lu = get_mrpc_partid_neighbour("u",tofid_l,partid_l);
724 int tofid_lb = get_mrpc_stripid_neighbour("b",tofid_l,partid_l);
725 int partid_lb = get_mrpc_partid_neighbour("b",tofid_l,partid_l);
726 int tofid_ru = get_mrpc_stripid_neighbour("u",tofid_r,partid_r);
727 int partid_ru = get_mrpc_partid_neighbour("u",tofid_r,partid_r);
728 int tofid_rb = get_mrpc_stripid_neighbour("b",tofid_r,partid_r);
729 int partid_rb = get_mrpc_partid_neighbour("b",tofid_r,partid_r);
730
731 // Now one additional neighbourlayer up and down but not left and right
732 int tofid_luu = get_mrpc_stripid_neighbour("u",tofid_lu,partid_lu);
733 int partid_luu = get_mrpc_partid_neighbour("u",tofid_lu,partid_lu);
734 int tofid_lbb = get_mrpc_stripid_neighbour("b",tofid_lb,partid_lb);
735 int partid_lbb = get_mrpc_partid_neighbour("b",tofid_lb,partid_lb);
736 int tofid_ruu = get_mrpc_stripid_neighbour("u",tofid_ru,partid_ru);
737 int partid_ruu = get_mrpc_partid_neighbour("u",tofid_ru,partid_ru);
738 int tofid_rbb = get_mrpc_stripid_neighbour("b",tofid_rb,partid_rb);
739 int partid_rbb = get_mrpc_partid_neighbour("b",tofid_rb,partid_rb);
740 int tofid_uu = get_mrpc_stripid_neighbour("u",tofid_u,partid_u);
741 int partid_uu = get_mrpc_partid_neighbour("u",tofid_u,partid_u);
742 int tofid_bb = get_mrpc_stripid_neighbour("b",tofid_b,partid_b);
743 int partid_bb = get_mrpc_partid_neighbour("b",tofid_b,partid_b);
744
745 // And again an layer up and down!
746 int tofid_luuu = get_mrpc_stripid_neighbour("u",tofid_luu,partid_luu);
747 int partid_luuu = get_mrpc_partid_neighbour("u",tofid_luu,partid_luu);
748 int tofid_lbbb = get_mrpc_stripid_neighbour("b",tofid_lbb,partid_lbb);
749 int partid_lbbb = get_mrpc_partid_neighbour("b",tofid_lbb,partid_lbb);
750 int tofid_ruuu = get_mrpc_stripid_neighbour("u",tofid_ruu,partid_ruu);
751 int partid_ruuu = get_mrpc_partid_neighbour("u",tofid_ruu,partid_ruu);
752 int tofid_rbbb = get_mrpc_stripid_neighbour("b",tofid_rbb,partid_rbb);
753 int partid_rbbb = get_mrpc_partid_neighbour("b",tofid_rbb,partid_rbb);
754 int tofid_uuu = get_mrpc_stripid_neighbour("u",tofid_uu,partid_uu);
755 int partid_uuu = get_mrpc_partid_neighbour("u",tofid_uu,partid_uu);
756 int tofid_bbb = get_mrpc_stripid_neighbour("b",tofid_bb,partid_bb);
757 int partid_bbb = get_mrpc_partid_neighbour("b",tofid_bb,partid_bb);
758
759
760
761
762 //And again an layer to the left and to the right
763 int tofid_luuul = get_mrpc_stripid_neighbour("l",tofid_luuu,partid_luuu);
764 int partid_luuul = get_mrpc_partid_neighbour("l",tofid_luuu,partid_luuu);
765 int tofid_lbbbl = get_mrpc_stripid_neighbour("l",tofid_lbbb,partid_lbbb);
766 int partid_lbbbl = get_mrpc_partid_neighbour("l",tofid_lbbb,partid_lbbb);
767 int tofid_ruuur = get_mrpc_stripid_neighbour("r",tofid_ruuu,partid_ruuu);
768 int partid_ruuur = get_mrpc_partid_neighbour("r",tofid_ruuu,partid_ruuu);
769 int tofid_rbbbr = get_mrpc_stripid_neighbour("r",tofid_rbbb,partid_rbbb);
770 int partid_rbbbr = get_mrpc_partid_neighbour("r",tofid_rbbb,partid_rbbb);
771 int tofid_luul = get_mrpc_stripid_neighbour("l",tofid_luu,partid_luu);
772 int partid_luul = get_mrpc_partid_neighbour("l",tofid_luu,partid_luu);
773 int tofid_lbbl = get_mrpc_stripid_neighbour("l",tofid_lbb,partid_lbb);
774 int partid_lbbl = get_mrpc_partid_neighbour("l",tofid_lbb,partid_lbb);
775 int tofid_ruur = get_mrpc_stripid_neighbour("r",tofid_ruu,partid_ruu);
776 int partid_ruur = get_mrpc_partid_neighbour("r",tofid_ruu,partid_ruu);
777 int tofid_rbbr = get_mrpc_stripid_neighbour("r",tofid_rbb,partid_rbb);
778 int partid_rbbr = get_mrpc_partid_neighbour("r",tofid_rbb,partid_rbb);
779 int tofid_lul = get_mrpc_stripid_neighbour("l",tofid_lu,partid_lu);
780 int partid_lul = get_mrpc_partid_neighbour("l",tofid_lu,partid_lu);
781 int tofid_lbl = get_mrpc_stripid_neighbour("l",tofid_lb,partid_lb);
782 int partid_lbl = get_mrpc_partid_neighbour("l",tofid_lb,partid_lb);
783 int tofid_rur = get_mrpc_stripid_neighbour("r",tofid_ru,partid_ru);
784 int partid_rur = get_mrpc_partid_neighbour("r",tofid_ru,partid_ru);
785 int tofid_rbr = get_mrpc_stripid_neighbour("r",tofid_rb,partid_rb);
786 int partid_rbr = get_mrpc_partid_neighbour("r",tofid_rb,partid_rb);
787 int tofid_ll = get_mrpc_stripid_neighbour("l",tofid_l,partid_l);
788 int partid_ll = get_mrpc_partid_neighbour("l",tofid_l,partid_l);
789 int tofid_rr = get_mrpc_stripid_neighbour("r",tofid_r,partid_r);
790 int partid_rr = get_mrpc_partid_neighbour("r",tofid_r,partid_r);
791
792
793
794
795 //Get the identifier and search the datamap for those identifier
796 if( (neighborhood==1) || (neighborhood==2) || (neighborhood==3) || (neighborhood==4) )
797 {
798 identify_l = TofID::getIntID_mrpc(partid_l,tofid_l);
799 count_l = tofDataMap.count(identify_l );
800 identify_r = TofID::getIntID_mrpc(partid_r,tofid_r);
801 count_r = tofDataMap.count(identify_r);
802 identify_u = TofID::getIntID_mrpc(partid_u,tofid_u);
803 count_u = tofDataMap.count(identify_u);
804 identify_b = TofID::getIntID_mrpc(partid_b,tofid_b);
805 count_b = tofDataMap.count(identify_b);
806 identify_lu = TofID::getIntID_mrpc(partid_lu,tofid_lu);
807 count_lu = tofDataMap.count(identify_lu);
808 identify_lb = TofID::getIntID_mrpc(partid_lb,tofid_lb);
809 count_lb = tofDataMap.count(identify_lb);
810 identify_ru = TofID::getIntID_mrpc(partid_ru,tofid_ru);
811 count_ru = tofDataMap.count(identify_ru);
812 identify_rb = TofID::getIntID_mrpc(partid_rb,tofid_rb);
813 count_rb = tofDataMap.count(identify_rb);
814 }
815
816
817 if( (neighborhood==2) || (neighborhood==3) || (neighborhood==4) )
818 {
819 //std::cout << "Neighborhood is 2or 3 or 4" << std::endl;
820
821 identify_luu = TofID::getIntID_mrpc(partid_luu,tofid_luu);
822 count_luu = tofDataMap.count(identify_luu );
823 identify_ruu = TofID::getIntID_mrpc(partid_ruu,tofid_ruu);
824 count_ruu = tofDataMap.count(identify_ruu);
825 identify_uu = TofID::getIntID_mrpc(partid_uu,tofid_uu);
826 count_uu = tofDataMap.count(identify_uu);
827 identify_bb = TofID::getIntID_mrpc(partid_bb,tofid_bb);
828 count_bb = tofDataMap.count(identify_bb);
829 identify_lbb = TofID::getIntID_mrpc(partid_lbb,tofid_lbb);
830 count_lbb = tofDataMap.count(identify_lbb);
831 identify_rbb = TofID::getIntID_mrpc(partid_rbb,tofid_rbb);
832 count_rbb = tofDataMap.count(identify_rbb);
833
834 }
835
836 if((neighborhood==3) || (neighborhood==4))
837 {
838
839 //std::cout << "Neighborhood is 3 or 4" << std::endl;
840 identify_luuu = TofID::getIntID_mrpc(partid_luuu,tofid_luuu);
841 count_luuu = tofDataMap.count(identify_luuu );
842 identify_ruuu = TofID::getIntID_mrpc(partid_ruuu,tofid_ruuu);
843 count_ruuu = tofDataMap.count(identify_ruuu);
844 identify_uuu = TofID::getIntID_mrpc(partid_uuu,tofid_uuu);
845 count_uuu = tofDataMap.count(identify_uuu);
846 identify_bbb = TofID::getIntID_mrpc(partid_bbb,tofid_bbb);
847 count_bbb = tofDataMap.count(identify_bbb);
848 identify_lbbb = TofID::getIntID_mrpc(partid_lbbb,tofid_lbbb);
849 count_lbbb = tofDataMap.count(identify_lbbb);
850 identify_rbbb = TofID::getIntID_mrpc(partid_rbbb,tofid_rbbb);
851 count_rbbb = tofDataMap.count(identify_rbbb);
852
853 }
854
855
856 if((neighborhood==4))
857 {
858
859 identify_luuul = TofID::getIntID_mrpc(partid_luuul,tofid_luuul);
860 count_luuul = tofDataMap.count(identify_luuul );
861 identify_ruuur = TofID::getIntID_mrpc(partid_ruuur,tofid_ruuur);
862 count_ruuur = tofDataMap.count(identify_ruuur);
863 identify_lbbbl = TofID::getIntID_mrpc(partid_lbbbl,tofid_lbbbl);
864 count_lbbbl = tofDataMap.count(identify_lbbbl);
865 identify_rbbbr = TofID::getIntID_mrpc(partid_rbbbr,tofid_rbbbr);
866 count_rbbbr = tofDataMap.count(identify_rbbbr);
867
868 identify_luul = TofID::getIntID_mrpc(partid_luul,tofid_luul);
869 count_luul = tofDataMap.count(identify_luul );
870 identify_ruur = TofID::getIntID_mrpc(partid_ruur,tofid_ruur);
871 count_ruur = tofDataMap.count(identify_ruur);
872 identify_lbbl = TofID::getIntID_mrpc(partid_lbbl,tofid_lbbl);
873 count_lbbl = tofDataMap.count(identify_lbbl);
874 identify_rbbr = TofID::getIntID_mrpc(partid_rbbr,tofid_rbbr);
875 count_rbbr = tofDataMap.count(identify_rbbr);
876
877 identify_ll = TofID::getIntID_mrpc(partid_ll,tofid_ll);
878 count_ll = tofDataMap.count(identify_ll );
879 identify_rr = TofID::getIntID_mrpc(partid_rr,tofid_rr);
880 count_rr = tofDataMap.count(identify_rr);
881 identify_lul = TofID::getIntID_mrpc(partid_lul,tofid_lul);
882 count_lul = tofDataMap.count(identify_lul);
883 identify_lbl = TofID::getIntID_mrpc(partid_lbl,tofid_lbl);
884 count_lbl = tofDataMap.count(identify_lbl);
885 identify_rur = TofID::getIntID_mrpc(partid_rur,tofid_rur);
886 count_rur = tofDataMap.count(identify_rur);
887 identify_rbr = TofID::getIntID_mrpc(partid_rbr,tofid_rbr);
888 count_rbr = tofDataMap.count(identify_rbr);
889 }
890
891
892
893 //if=5
894 if((neighborhood==5))
895 {
896
899
900 if((strip_number_if5)%2==0)
901 {
902 identify_if5_it=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
903
904 identify_if5_m1=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2));
905 identify_if5_m2=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4));
906 identify_if5_m3=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6));
907 identify_if5_m4=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8));
908 identify_if5_m5=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10));
909 identify_if5_m6=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12));
910 identify_if5_m7=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14));
911 identify_if5_m8=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16));
912 identify_if5_m9=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18));
913 identify_if5_m10=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20));
914 identify_if5_m11=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22));
915 identify_if5_m12=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24));
916 count_if5_m1=tofDataMap.count(identify_if5_m1);
917 count_if5_m2=tofDataMap.count(identify_if5_m2);
918 count_if5_m3=tofDataMap.count(identify_if5_m3);
919 count_if5_m4=tofDataMap.count(identify_if5_m4);
920 count_if5_m5=tofDataMap.count(identify_if5_m5);
921 count_if5_m6=tofDataMap.count(identify_if5_m6);
922 count_if5_m7=tofDataMap.count(identify_if5_m7);
923 count_if5_m8=tofDataMap.count(identify_if5_m8);
924 count_if5_m9=tofDataMap.count(identify_if5_m9);
925 count_if5_m10=tofDataMap.count(identify_if5_m10);
926 count_if5_m11=tofDataMap.count(identify_if5_m11);
927 count_if5_m12=tofDataMap.count(identify_if5_m12);
928
929 int help1 =BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2);
930 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,4), get_mrpc_stripid_neighbour("l",help1,4));
931 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4);
932 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,4), get_mrpc_stripid_neighbour("l",help2,4));
933 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6);
934 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,4), get_mrpc_stripid_neighbour("l",help3,4));
935 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8);
936 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,4), get_mrpc_stripid_neighbour("l",help4,4));
937 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10);
938 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,4), get_mrpc_stripid_neighbour("l",help5,4));
939 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12);
940 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,4), get_mrpc_stripid_neighbour("l",help6,4));
941 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14);
942 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,4), get_mrpc_stripid_neighbour("l",help7,4));
943 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16);
944 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,4), get_mrpc_stripid_neighbour("l",help8,4));
945 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18);
946 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,4), get_mrpc_stripid_neighbour("l",help9,4));
947 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20);
948 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,4), get_mrpc_stripid_neighbour("l",help10,4));
949 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22);
950 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,4), get_mrpc_stripid_neighbour("l",help11,4));
951 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24);
952 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,4), get_mrpc_stripid_neighbour("l",help12,4));
953
954 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,4), get_mrpc_stripid_neighbour("r",help1,4));
955 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,4), get_mrpc_stripid_neighbour("r",help2,4));
956 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,4), get_mrpc_stripid_neighbour("r",help3,4));
957 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,4), get_mrpc_stripid_neighbour("r",help4,4));
958 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,4), get_mrpc_stripid_neighbour("r",help5,4));
959 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,4), get_mrpc_stripid_neighbour("r",help6,4));
960 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,4), get_mrpc_stripid_neighbour("r",help7,4));
961 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,4), get_mrpc_stripid_neighbour("r",help8,4));
962 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,4), get_mrpc_stripid_neighbour("r",help9,4));
963 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,4), get_mrpc_stripid_neighbour("r",help10,4));
964 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,4), get_mrpc_stripid_neighbour("r",help11,4));
965 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,4), get_mrpc_stripid_neighbour("r",help12,4));
966
967
968 count_if5_l1=tofDataMap.count(identify_if5_l1);
969 count_if5_l2=tofDataMap.count(identify_if5_l2);
970 count_if5_l3=tofDataMap.count(identify_if5_l3);
971 count_if5_l4=tofDataMap.count(identify_if5_l4);
972 count_if5_l5=tofDataMap.count(identify_if5_l5);
973 count_if5_l6=tofDataMap.count(identify_if5_l6);
974 count_if5_l7=tofDataMap.count(identify_if5_l7);
975 count_if5_l8=tofDataMap.count(identify_if5_l8);
976 count_if5_l9=tofDataMap.count(identify_if5_l9);
977 count_if5_l10=tofDataMap.count(identify_if5_l10);
978 count_if5_l11=tofDataMap.count(identify_if5_l11);
979 count_if5_l12=tofDataMap.count(identify_if5_l12);
980 count_if5_r1=tofDataMap.count(identify_if5_r1);
981 count_if5_r2=tofDataMap.count(identify_if5_r2);
982 count_if5_r3=tofDataMap.count(identify_if5_r3);
983 count_if5_r4=tofDataMap.count(identify_if5_r4);
984 count_if5_r5=tofDataMap.count(identify_if5_r5);
985 count_if5_r6=tofDataMap.count(identify_if5_r6);
986 count_if5_r7=tofDataMap.count(identify_if5_r7);
987 count_if5_r8=tofDataMap.count(identify_if5_r8);
988 count_if5_r9=tofDataMap.count(identify_if5_r9);
989 count_if5_r10=tofDataMap.count(identify_if5_r10);
990 count_if5_r11=tofDataMap.count(identify_if5_r11);
991 count_if5_r12=tofDataMap.count(identify_if5_r12);
992 /*
993 cout << "Partid = 4"<< endl;
994 cout << "it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5)<<endl;
995 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2) << endl;
996 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4) << endl;
997 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6) << endl;
998 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8) << endl;
999 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10) << endl;
1000 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12) << endl;
1001 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14) << endl;
1002 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16) << endl;
1003 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18) << endl;
1004 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20) << endl;
1005 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22) << endl;
1006 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24) << endl;
1007 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help1,4) << endl;
1008 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help2,4) << endl;
1009 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help3,4) << endl;
1010 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help4,4) << endl;
1011 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help5,4) << endl;
1012 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help6,4) << endl;
1013 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help7,4) << endl;
1014 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help8,4) << endl;
1015 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help9,4) << endl;
1016 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help10,4) << endl;
1017 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help11,4) << endl;
1018 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help12,4) << endl;
1019 cout << "row le " <<get_mrpc_stripid_neighbour("l",help1,4) << endl;
1020 cout << "row le " <<get_mrpc_stripid_neighbour("l",help2,4) << endl;
1021 cout << "row le " <<get_mrpc_stripid_neighbour("l",help3,4) << endl;
1022 cout << "row le " <<get_mrpc_stripid_neighbour("l",help4,4) << endl;
1023 cout << "row le " <<get_mrpc_stripid_neighbour("l",help5,4) << endl;
1024 cout << "row le " <<get_mrpc_stripid_neighbour("l",help6,4) << endl;
1025 cout << "row le " <<get_mrpc_stripid_neighbour("l",help7,4) << endl;
1026 cout << "row le " <<get_mrpc_stripid_neighbour("l",help8,4) << endl;
1027 cout << "row le " <<get_mrpc_stripid_neighbour("l",help9,4) << endl;
1028 cout << "row le " <<get_mrpc_stripid_neighbour("l",help10,4) << endl;
1029 cout << "row le " <<get_mrpc_stripid_neighbour("l",help11,4) << endl;
1030 cout << "row le " <<get_mrpc_stripid_neighbour("l",help12,4) << endl << endl;
1031 */
1032
1033
1034 }//close if stripnumber
1035 else
1036 {
1037 identify_if5_it=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
1038 identify_if5_m1=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1));
1039 identify_if5_m2=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3));
1040 identify_if5_m3=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5));
1041 identify_if5_m4=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7));
1042 identify_if5_m5=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9));
1043 identify_if5_m6=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11));
1044 identify_if5_m7=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13));
1045 identify_if5_m8=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15));
1046 identify_if5_m9=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17));
1047 identify_if5_m10=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19));
1048 identify_if5_m11=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21));
1049 identify_if5_m12=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23));
1050 count_if5_m1=tofDataMap.count(identify_if5_m1);
1051 count_if5_m2=tofDataMap.count(identify_if5_m2);
1052 count_if5_m3=tofDataMap.count(identify_if5_m3);
1053 count_if5_m4=tofDataMap.count(identify_if5_m4);
1054 count_if5_m5=tofDataMap.count(identify_if5_m5);
1055 count_if5_m6=tofDataMap.count(identify_if5_m6);
1056 count_if5_m7=tofDataMap.count(identify_if5_m7);
1057 count_if5_m8=tofDataMap.count(identify_if5_m8);
1058 count_if5_m9=tofDataMap.count(identify_if5_m9);
1059 count_if5_m10=tofDataMap.count(identify_if5_m10);
1060 count_if5_m11=tofDataMap.count(identify_if5_m11);
1061 count_if5_m12=tofDataMap.count(identify_if5_m12);
1062
1063 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1);
1064 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,4), get_mrpc_stripid_neighbour("l",help1,4));
1065 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3);
1066 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,4), get_mrpc_stripid_neighbour("l",help2,4));
1067 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5);
1068 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,4), get_mrpc_stripid_neighbour("l",help3,4));
1069 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7);
1070 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,4), get_mrpc_stripid_neighbour("l",help4,4));
1071 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9);
1072 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,4), get_mrpc_stripid_neighbour("l",help5,4));
1073 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11);
1074 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,4), get_mrpc_stripid_neighbour("l",help6,4));
1075 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13);
1076 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,4), get_mrpc_stripid_neighbour("l",help7,4));
1077 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15);
1078 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,4), get_mrpc_stripid_neighbour("l",help8,4));
1079 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17);
1080 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,4), get_mrpc_stripid_neighbour("l",help9,4));
1081 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19);
1082 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,4), get_mrpc_stripid_neighbour("l",help10,4));
1083 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21);
1084 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,4), get_mrpc_stripid_neighbour("l",help11,4));
1085 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23);
1086 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,4), get_mrpc_stripid_neighbour("l",help12,4));
1087
1088
1089
1090 /*
1091 cout << "Partid = 4"<< endl;
1092 cout << "it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5)<<endl;
1093 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1) << endl;
1094 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3) << endl;
1095 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5) << endl;
1096 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7) << endl;
1097 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9) << endl;
1098 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11) << endl;
1099 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13) << endl;
1100 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15) << endl;
1101 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17) << endl;
1102 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19) << endl;
1103 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21) << endl;
1104 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23) << endl;
1105 cout << "row ri " << get_mrpc_stripid_neighbour("r",help1,4) << endl;
1106 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help2,4) << endl;
1107 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help3,4) << endl;
1108 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help4,4) << endl;
1109 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help5,4) << endl;
1110 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help6,4) << endl;
1111 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help7,4) << endl;
1112 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help8,4) << endl;
1113 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help9,4) << endl;
1114 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help10,4) << endl;
1115 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help11,4) << endl;
1116 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help12,4) << endl;
1117 cout << "row le " <<get_mrpc_stripid_neighbour("l",help1,4) << endl;
1118 cout << "row le " <<get_mrpc_stripid_neighbour("l",help2,4) << endl;
1119 cout << "row le " <<get_mrpc_stripid_neighbour("l",help3,4) << endl;
1120 cout << "row le " <<get_mrpc_stripid_neighbour("l",help4,4) << endl;
1121 cout << "row le " <<get_mrpc_stripid_neighbour("l",help5,4) << endl;
1122 cout << "row le " <<get_mrpc_stripid_neighbour("l",help6,4) << endl;
1123 cout << "row le " <<get_mrpc_stripid_neighbour("l",help7,4) << endl;
1124 cout << "row le " <<get_mrpc_stripid_neighbour("l",help8,4) << endl;
1125 cout << "row le " <<get_mrpc_stripid_neighbour("l",help9,4) << endl;
1126 cout << "row le " <<get_mrpc_stripid_neighbour("l",help10,4) << endl;
1127 cout << "row le " <<get_mrpc_stripid_neighbour("l",help11,4) << endl;
1128 cout << "row le " <<get_mrpc_stripid_neighbour("l",help12,4) << endl << endl;
1129 */
1130
1131
1132
1133
1134 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,4), get_mrpc_stripid_neighbour("r",help1,4));
1135 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,4), get_mrpc_stripid_neighbour("r",help2,4));
1136 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,4), get_mrpc_stripid_neighbour("r",help3,4));
1137 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,4), get_mrpc_stripid_neighbour("r",help4,4));
1138 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,4), get_mrpc_stripid_neighbour("r",help5,4));
1139 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,4), get_mrpc_stripid_neighbour("r",help6,4));
1140 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,4), get_mrpc_stripid_neighbour("r",help7,4));
1141 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,4), get_mrpc_stripid_neighbour("r",help8,4));
1142 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,4), get_mrpc_stripid_neighbour("r",help9,4));
1143 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,4), get_mrpc_stripid_neighbour("r",help10,4));
1144 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,4), get_mrpc_stripid_neighbour("r",help11,4));
1145 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,4), get_mrpc_stripid_neighbour("r",help12,4));
1146
1147
1148 count_if5_l1=tofDataMap.count(identify_if5_l1);
1149 count_if5_l2=tofDataMap.count(identify_if5_l2);
1150 count_if5_l3=tofDataMap.count(identify_if5_l3);
1151 count_if5_l4=tofDataMap.count(identify_if5_l4);
1152 count_if5_l5=tofDataMap.count(identify_if5_l5);
1153 count_if5_l6=tofDataMap.count(identify_if5_l6);
1154 count_if5_l7=tofDataMap.count(identify_if5_l7);
1155 count_if5_l8=tofDataMap.count(identify_if5_l8);
1156 count_if5_l9=tofDataMap.count(identify_if5_l9);
1157 count_if5_l10=tofDataMap.count(identify_if5_l10);
1158 count_if5_l11=tofDataMap.count(identify_if5_l11);
1159 count_if5_l12=tofDataMap.count(identify_if5_l12);
1160 count_if5_r1=tofDataMap.count(identify_if5_r1);
1161 count_if5_r2=tofDataMap.count(identify_if5_r2);
1162 count_if5_r3=tofDataMap.count(identify_if5_r3);
1163 count_if5_r4=tofDataMap.count(identify_if5_r4);
1164 count_if5_r5=tofDataMap.count(identify_if5_r5);
1165 count_if5_r6=tofDataMap.count(identify_if5_r6);
1166 count_if5_r7=tofDataMap.count(identify_if5_r7);
1167 count_if5_r8=tofDataMap.count(identify_if5_r8);
1168 count_if5_r9=tofDataMap.count(identify_if5_r9);
1169 count_if5_r10=tofDataMap.count(identify_if5_r10);
1170 count_if5_r11=tofDataMap.count(identify_if5_r11);
1171 count_if5_r12=tofDataMap.count(identify_if5_r12);
1172
1173
1174 }//close else
1175
1176}//close if neighboorhood=5
1177
1178
1179
1180
1181 if((neighborhood==6))
1182 {
1183
1184
1185
1186 int strip_number_if6 = BesTofDigitizerEcV4::Get_stripnumber_from_unique_identifier(tofid_it);
1187 int module_number_if6= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(tofid_it);
1188
1189 if((strip_number_if6)%2==0)
1190 {
1191 identify_if6_it=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
1192
1193 identify_if6_m1=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2));
1194 identify_if6_m2=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4));
1195 identify_if6_m3=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6));
1196 identify_if6_m4=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8));
1197 identify_if6_m5=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10));
1198 identify_if6_m6=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12));
1199 identify_if6_m7=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14));
1200 identify_if6_m8=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16));
1201 identify_if6_m9=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18));
1202 identify_if6_m10=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20));
1203 identify_if6_m11=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22));
1204 identify_if6_m12=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24));
1205
1206
1207
1208 count_if6_m1=tofDataMap.count(identify_if6_m1);
1209 count_if6_m2=tofDataMap.count(identify_if6_m2);
1210 count_if6_m3=tofDataMap.count(identify_if6_m3);
1211 count_if6_m4=tofDataMap.count(identify_if6_m4);
1212 count_if6_m5=tofDataMap.count(identify_if6_m5);
1213 count_if6_m6=tofDataMap.count(identify_if6_m6);
1214 count_if6_m7=tofDataMap.count(identify_if6_m7);
1215 count_if6_m8=tofDataMap.count(identify_if6_m8);
1216 count_if6_m9=tofDataMap.count(identify_if6_m9);
1217 count_if6_m10=tofDataMap.count(identify_if6_m10);
1218 count_if6_m11=tofDataMap.count(identify_if6_m11);
1219 count_if6_m12=tofDataMap.count(identify_if6_m12);
1220
1221 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2);
1222 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4);
1223 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6);
1224 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8);
1225 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10);
1226 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12);
1227 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14);
1228 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16);
1229 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18);
1230 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20);
1231 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22);
1232 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24);
1233
1234 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,4), get_mrpc_stripid_neighbour("l",help1,4));
1235 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,4), get_mrpc_stripid_neighbour("l",help2,4));
1236 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,4), get_mrpc_stripid_neighbour("l",help3,4));
1237 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,4), get_mrpc_stripid_neighbour("l",help4,4));
1238 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,4), get_mrpc_stripid_neighbour("l",help5,4));
1239 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,4), get_mrpc_stripid_neighbour("l",help6,4));
1240 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,4), get_mrpc_stripid_neighbour("l",help7,4));
1241 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,4), get_mrpc_stripid_neighbour("l",help8,4));
1242 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,4), get_mrpc_stripid_neighbour("l",help9,4));
1243 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,4), get_mrpc_stripid_neighbour("l",help10,4));
1244 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,4), get_mrpc_stripid_neighbour("l",help11,4));
1245 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,4), get_mrpc_stripid_neighbour("l",help12,4));
1246
1247 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,4), get_mrpc_stripid_neighbour("r",help1,4));
1248 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,4), get_mrpc_stripid_neighbour("r",help2,4));
1249 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,4), get_mrpc_stripid_neighbour("r",help3,4));
1250 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,4), get_mrpc_stripid_neighbour("r",help4,4));
1251 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,4), get_mrpc_stripid_neighbour("r",help5,4));
1252 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,4), get_mrpc_stripid_neighbour("r",help6,4));
1253 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,4), get_mrpc_stripid_neighbour("r",help7,4));
1254 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,4), get_mrpc_stripid_neighbour("r",help8,4));
1255 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,4), get_mrpc_stripid_neighbour("r",help9,4));
1256 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,4), get_mrpc_stripid_neighbour("r",help10,4));
1257 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,4), get_mrpc_stripid_neighbour("r",help11,4));
1258 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,4), get_mrpc_stripid_neighbour("r",help12,4));
1259
1260
1261 count_if6_l1=tofDataMap.count(identify_if6_l1);
1262 count_if6_l2=tofDataMap.count(identify_if6_l2);
1263 count_if6_l3=tofDataMap.count(identify_if6_l3);
1264 count_if6_l4=tofDataMap.count(identify_if6_l4);
1265 count_if6_l5=tofDataMap.count(identify_if6_l5);
1266 count_if6_l6=tofDataMap.count(identify_if6_l6);
1267 count_if6_l7=tofDataMap.count(identify_if6_l7);
1268 count_if6_l8=tofDataMap.count(identify_if6_l8);
1269 count_if6_l9=tofDataMap.count(identify_if6_l9);
1270 count_if6_l10=tofDataMap.count(identify_if6_l10);
1271 count_if6_l11=tofDataMap.count(identify_if6_l11);
1272 count_if6_l12=tofDataMap.count(identify_if6_l12);
1273 count_if6_r1=tofDataMap.count(identify_if6_r1);
1274 count_if6_r2=tofDataMap.count(identify_if6_r2);
1275 count_if6_r3=tofDataMap.count(identify_if6_r3);
1276 count_if6_r4=tofDataMap.count(identify_if6_r4);
1277 count_if6_r5=tofDataMap.count(identify_if6_r5);
1278 count_if6_r6=tofDataMap.count(identify_if6_r6);
1279 count_if6_r7=tofDataMap.count(identify_if6_r7);
1280 count_if6_r8=tofDataMap.count(identify_if6_r8);
1281 count_if6_r9=tofDataMap.count(identify_if6_r9);
1282 count_if6_r10=tofDataMap.count(identify_if6_r10);
1283 count_if6_r11=tofDataMap.count(identify_if6_r11);
1284 count_if6_r12=tofDataMap.count(identify_if6_r12);
1285
1286//Now go again one to the left and one to the right!
1287
1288
1289 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,4));//Get the module number!!! from the left module.
1290 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,4);
1291
1292
1293
1294 //We are here within the "even stripid slope": I.e the left and right neighbor are odd in stripid. Hence, use odd number for help13-help36
1295 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,1);
1296 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,3);
1297 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,5);
1298 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,7);
1299 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,9);
1300 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,11);
1301 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,13);
1302 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,15);
1303 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,17);
1304 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,19);
1305 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,21);
1306 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,23);
1307
1308 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
1309 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
1310 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
1311 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
1312 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
1313 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
1314 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
1315 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
1316 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
1317 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
1318 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
1319 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
1320
1321 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,4));//Get the module number!!! from the left module.
1322 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,4);
1323
1324 //We are here within the "even stripid slope": I.e the left and right neighbor are odd. Hence, use odd number for help13-help36
1325 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,1);
1326 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,3);
1327 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,5);
1328 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,7);
1329 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,9);
1330 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,11);
1331 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,13);
1332 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,15);
1333 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,17);
1334 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,19);
1335 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,21);
1336 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,23);
1337
1338 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
1339 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
1340 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
1341 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
1342 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
1343 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
1344 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
1345 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
1346 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
1347 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
1348 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
1349 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
1350
1351
1352 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
1353 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
1354 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
1355 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
1356 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
1357 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
1358 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
1359 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
1360 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
1361 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
1362 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
1363 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
1364 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
1365 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
1366 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
1367 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
1368 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
1369 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
1370 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
1371 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
1372 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
1373 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
1374 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
1375 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
1376 /*
1377 cout << "Partid = 4"<< endl;
1378 cout << "it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6)<<endl;
1379 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2) << endl;
1380 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4) << endl;
1381 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6) << endl;
1382 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8) << endl;
1383 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10) << endl;
1384 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12) << endl;
1385 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14) << endl;
1386 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16) << endl;
1387 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18) << endl;
1388 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20) << endl;
1389 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22) << endl;
1390 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24) << endl;
1391 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help1,4) << endl;
1392 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help2,4) << endl;
1393 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help3,4) << endl;
1394 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help4,4) << endl;
1395 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help5,4) << endl;
1396 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help6,4) << endl;
1397 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help7,4) << endl;
1398 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help8,4) << endl;
1399 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help9,4) << endl;
1400 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help10,4) << endl;
1401 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help11,4) << endl;
1402 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help12,4) << endl;
1403 cout << "row le " <<get_mrpc_stripid_neighbour("l",help1,4) << endl;
1404 cout << "row le " <<get_mrpc_stripid_neighbour("l",help2,4) << endl;
1405 cout << "row le " <<get_mrpc_stripid_neighbour("l",help3,4) << endl;
1406 cout << "row le " <<get_mrpc_stripid_neighbour("l",help4,4) << endl;
1407 cout << "row le " <<get_mrpc_stripid_neighbour("l",help5,4) << endl;
1408 cout << "row le " <<get_mrpc_stripid_neighbour("l",help6,4) << endl;
1409 cout << "row le " <<get_mrpc_stripid_neighbour("l",help7,4) << endl;
1410 cout << "row le " <<get_mrpc_stripid_neighbour("l",help8,4) << endl;
1411 cout << "row le " <<get_mrpc_stripid_neighbour("l",help9,4) << endl;
1412 cout << "row le " <<get_mrpc_stripid_neighbour("l",help10,4) << endl;
1413 cout << "row le " <<get_mrpc_stripid_neighbour("l",help11,4) << endl;
1414 cout << "row le " <<get_mrpc_stripid_neighbour("l",help12,4) << endl ;
1415 cout << "row riri " << get_mrpc_stripid_neighbour("r",help25,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help25,part_id_if6_r) << endl;
1416 cout << "row riri " << get_mrpc_stripid_neighbour("r",help26,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help26,part_id_if6_r)<<endl;
1417 cout << "row riri " << get_mrpc_stripid_neighbour("r",help27,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help27,part_id_if6_r)<<endl;
1418 cout << "row riri " << get_mrpc_stripid_neighbour("r",help28,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help28,part_id_if6_r)<<endl;
1419 cout << "row riri " << get_mrpc_stripid_neighbour("r",help29,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help29,part_id_if6_r)<<endl;
1420 cout << "row riri " << get_mrpc_stripid_neighbour("r",help30,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help30,part_id_if6_r)<<endl;
1421 cout << "row riri " << get_mrpc_stripid_neighbour("r",help31,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help31,part_id_if6_r)<<endl;
1422 cout << "row riri " << get_mrpc_stripid_neighbour("r",help32,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help32,part_id_if6_r)<<endl;
1423 cout << "row riri " << get_mrpc_stripid_neighbour("r",help33,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help33,part_id_if6_r)<<endl;
1424 cout << "row riri " << get_mrpc_stripid_neighbour("r",help34,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help34,part_id_if6_r)<<endl;
1425 cout << "row riri " << get_mrpc_stripid_neighbour("r",help35,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help35,part_id_if6_r)<<endl;
1426 cout << "row riri " << get_mrpc_stripid_neighbour("r",help36,part_id_if6_r)<<" " <<get_mrpc_partid_neighbour("r",help36,part_id_if6_r)<<endl;
1427 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help13,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help13,part_id_if6_l) << endl;
1428 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help14,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help14,part_id_if6_l) << endl;
1429 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help15,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help15,part_id_if6_l) << endl;
1430 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help16,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help16,part_id_if6_l) << endl;
1431 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help17,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help17,part_id_if6_l) << endl;
1432 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help18,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help18,part_id_if6_l) << endl;
1433 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help19,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help19,part_id_if6_l) << endl;
1434 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help20,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help20,part_id_if6_l) << endl;
1435 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help21,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help21,part_id_if6_l) << endl;
1436 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help22,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help22,part_id_if6_l) << endl;
1437 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help23,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help23,part_id_if6_l) << endl;
1438 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help24,part_id_if6_l)<<" " <<get_mrpc_partid_neighbour("l",help24,part_id_if6_l) << endl;
1439 cout << "l help13 "<< help13 << endl;
1440 cout << "l help14 "<< help14 << endl;
1441 cout << "l help15 "<< help15<< endl;
1442 cout << "l help16 "<< help16<< endl;
1443 cout << "l help17 "<< help17<< endl;
1444 cout << "l help18 "<< help18<< endl;
1445 cout << "l help19 "<< help19<< endl;
1446 cout << "l help20 "<< help20<< endl;
1447 cout << "l help21 "<< help21<< endl;
1448 cout << "l help22 "<< help22<< endl;
1449 cout << "l help23 "<< help23<< endl;
1450 cout << "l help24 "<< help24<< endl;
1451 cout << "r help25 "<< help25<< endl;
1452 cout << "r help26 "<< help26<< endl;
1453 cout << "r help27 "<< help27<< endl;
1454 cout << "r help28 "<< help28<< endl;
1455 cout << "r help29 "<< help29<< endl;
1456 cout << "r help30 "<< help30<< endl;
1457 cout << "r help31 "<< help31<< endl;
1458 cout << "r help32 "<< help32<< endl;
1459 cout << "r help33 "<< help33<< endl;
1460 cout << "r help34 "<< help34<< endl;
1461 cout << "r help35 "<< help35<< endl;
1462 cout << "r help36 "<< help36<< endl;
1463 */
1464
1465
1466
1467
1468
1469
1470 }//close if stripnumber
1471 else
1472 {
1473 identify_if6_it=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
1474 identify_if6_m1=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1));
1475 identify_if6_m2=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3));
1476 identify_if6_m3=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5));
1477 identify_if6_m4=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7));
1478 identify_if6_m5=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9));
1479 identify_if6_m6=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11));
1480 identify_if6_m7=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13));
1481 identify_if6_m8=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15));
1482 identify_if6_m9=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17));
1483 identify_if6_m10=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19));
1484 identify_if6_m11=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21));
1485 identify_if6_m12=TofID::getIntID_mrpc(4, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23));
1486 count_if6_m1=tofDataMap.count(identify_if6_m1);
1487 count_if6_m2=tofDataMap.count(identify_if6_m2);
1488 count_if6_m3=tofDataMap.count(identify_if6_m3);
1489 count_if6_m4=tofDataMap.count(identify_if6_m4);
1490 count_if6_m5=tofDataMap.count(identify_if6_m5);
1491 count_if6_m6=tofDataMap.count(identify_if6_m6);
1492 count_if6_m7=tofDataMap.count(identify_if6_m7);
1493 count_if6_m8=tofDataMap.count(identify_if6_m8);
1494 count_if6_m9=tofDataMap.count(identify_if6_m9);
1495 count_if6_m10=tofDataMap.count(identify_if6_m10);
1496 count_if6_m11=tofDataMap.count(identify_if6_m11);
1497 count_if6_m12=tofDataMap.count(identify_if6_m12);
1498
1499
1500 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1);
1501 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3);
1502 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5);
1503 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7);
1504 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9);
1505 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11);
1506 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13);
1507 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15);
1508 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17);
1509 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19);
1510 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21);
1511 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23);
1512
1513
1514 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,4), get_mrpc_stripid_neighbour("l",help1,4));
1515 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,4), get_mrpc_stripid_neighbour("l",help2,4));
1516 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,4), get_mrpc_stripid_neighbour("l",help3,4));
1517 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,4), get_mrpc_stripid_neighbour("l",help4,4));
1518 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,4), get_mrpc_stripid_neighbour("l",help5,4));
1519 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,4), get_mrpc_stripid_neighbour("l",help6,4));
1520 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,4), get_mrpc_stripid_neighbour("l",help7,4));
1521 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,4), get_mrpc_stripid_neighbour("l",help8,4));
1522 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,4), get_mrpc_stripid_neighbour("l",help9,4));
1523 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,4), get_mrpc_stripid_neighbour("l",help10,4));
1524 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,4), get_mrpc_stripid_neighbour("l",help11,4));
1525 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,4), get_mrpc_stripid_neighbour("l",help12,4));
1526
1527 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,4), get_mrpc_stripid_neighbour("r",help1,4));
1528 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,4), get_mrpc_stripid_neighbour("r",help2,4));
1529 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,4), get_mrpc_stripid_neighbour("r",help3,4));
1530 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,4), get_mrpc_stripid_neighbour("r",help4,4));
1531 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,4), get_mrpc_stripid_neighbour("r",help5,4));
1532 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,4), get_mrpc_stripid_neighbour("r",help6,4));
1533 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,4), get_mrpc_stripid_neighbour("r",help7,4));
1534 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,4), get_mrpc_stripid_neighbour("r",help8,4));
1535 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,4), get_mrpc_stripid_neighbour("r",help9,4));
1536 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,4), get_mrpc_stripid_neighbour("r",help10,4));
1537 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,4), get_mrpc_stripid_neighbour("r",help11,4));
1538 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,4), get_mrpc_stripid_neighbour("r",help12,4));
1539
1540 count_if6_l1=tofDataMap.count(identify_if6_l1);
1541 count_if6_l2=tofDataMap.count(identify_if6_l2);
1542 count_if6_l3=tofDataMap.count(identify_if6_l3);
1543 count_if6_l4=tofDataMap.count(identify_if6_l4);
1544 count_if6_l5=tofDataMap.count(identify_if6_l5);
1545 count_if6_l6=tofDataMap.count(identify_if6_l6);
1546 count_if6_l7=tofDataMap.count(identify_if6_l7);
1547 count_if6_l8=tofDataMap.count(identify_if6_l8);
1548 count_if6_l9=tofDataMap.count(identify_if6_l9);
1549 count_if6_l10=tofDataMap.count(identify_if6_l10);
1550 count_if6_l11=tofDataMap.count(identify_if6_l11);
1551 count_if6_l12=tofDataMap.count(identify_if6_l12);
1552 count_if6_r1=tofDataMap.count(identify_if6_r1);
1553 count_if6_r2=tofDataMap.count(identify_if6_r2);
1554 count_if6_r3=tofDataMap.count(identify_if6_r3);
1555 count_if6_r4=tofDataMap.count(identify_if6_r4);
1556 count_if6_r5=tofDataMap.count(identify_if6_r5);
1557 count_if6_r6=tofDataMap.count(identify_if6_r6);
1558 count_if6_r7=tofDataMap.count(identify_if6_r7);
1559 count_if6_r8=tofDataMap.count(identify_if6_r8);
1560 count_if6_r9=tofDataMap.count(identify_if6_r9);
1561 count_if6_r10=tofDataMap.count(identify_if6_r10);
1562 count_if6_r11=tofDataMap.count(identify_if6_r11);
1563 count_if6_r12=tofDataMap.count(identify_if6_r12);
1564
1565
1566
1567
1568
1569//Now go again one to the left and one to the right!
1570
1571
1572 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,4));//Get the module number!!! from the left module.
1573 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,4);
1574
1575 //We are here within the "odd stripid slope": I.e the left and right neighbor are even. Hence, use even number for help13-help36
1576 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,2);
1577 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,4);
1578 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,6);
1579 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,8);
1580 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,10);
1581 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,12);
1582 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,14);
1583 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,16);
1584 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,18);
1585 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,20);
1586 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,22);
1587 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,24);
1588
1589 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
1590 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
1591 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
1592 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
1593 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
1594 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
1595 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
1596 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
1597 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
1598 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
1599 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
1600 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
1601
1602 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,4));//Get the module number!!! from the left module.
1603 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,4);
1604
1605 //We are here within the "odd stripid slope": I.e the left and right neighbor are even. Hence, use even number for help13-help36
1606 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,2);
1607 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,4);
1608 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,6);
1609 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,8);
1610 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,10);
1611 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,12);
1612 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,14);
1613 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,16);
1614 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,18);
1615 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,20);
1616 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,22);
1617 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,24);
1618
1619 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
1620 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
1621 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
1622 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
1623 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
1624 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
1625 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
1626 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
1627 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
1628 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
1629 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
1630 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
1631
1632 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
1633 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
1634 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
1635 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
1636 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
1637 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
1638 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
1639 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
1640 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
1641 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
1642 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
1643 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
1644 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
1645 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
1646 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
1647 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
1648 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
1649 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
1650 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
1651 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
1652 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
1653 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
1654 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
1655 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
1656
1657
1658
1659 /*
1660 cout << "Partid = 4"<< endl;
1661 cout << "it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6)<<endl;
1662 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1) << endl;
1663 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3) << endl;
1664 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5) << endl;
1665 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7) << endl;
1666 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9) << endl;
1667 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11) << endl;
1668 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13) << endl;
1669 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15) << endl;
1670 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17) << endl;
1671 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19) << endl;
1672 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21) << endl;
1673 cout << "row it " <<BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23) << endl;
1674 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help1,4) << endl;
1675 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help2,4) << endl;
1676 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help3,4) << endl;
1677 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help4,4) << endl;
1678 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help5,4) << endl;
1679 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help6,4) << endl;
1680 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help7,4) << endl;
1681 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help8,4) << endl;
1682 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help9,4) << endl;
1683 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help10,4) << endl;
1684 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help11,4) << endl;
1685 cout << "row ri " <<get_mrpc_stripid_neighbour("r",help12,4) << endl;
1686 cout << "row le " <<get_mrpc_stripid_neighbour("l",help1,4) << endl;
1687 cout << "row le " <<get_mrpc_stripid_neighbour("l",help2,4) << endl;
1688 cout << "row le " <<get_mrpc_stripid_neighbour("l",help3,4) << endl;
1689 cout << "row le " <<get_mrpc_stripid_neighbour("l",help4,4) << endl;
1690 cout << "row le " <<get_mrpc_stripid_neighbour("l",help5,4) << endl;
1691 cout << "row le " <<get_mrpc_stripid_neighbour("l",help6,4) << endl;
1692 cout << "row le " <<get_mrpc_stripid_neighbour("l",help7,4) << endl;
1693 cout << "row le " <<get_mrpc_stripid_neighbour("l",help8,4) << endl;
1694 cout << "row le " <<get_mrpc_stripid_neighbour("l",help9,4) << endl;
1695 cout << "row le " <<get_mrpc_stripid_neighbour("l",help10,4) << endl;
1696 cout << "row le " <<get_mrpc_stripid_neighbour("l",help11,4) << endl;
1697 cout << "row le " <<get_mrpc_stripid_neighbour("l",help12,4) << endl ;
1698 cout << "row riri " << get_mrpc_stripid_neighbour("r",help25,part_id_if6_r)<<endl;
1699 cout << "row riri " << get_mrpc_stripid_neighbour("r",help26,part_id_if6_r)<<endl;
1700 cout << "row riri " << get_mrpc_stripid_neighbour("r",help27,part_id_if6_r)<<endl;
1701 cout << "row riri " << get_mrpc_stripid_neighbour("r",help28,part_id_if6_r)<<endl;
1702 cout << "row riri " << get_mrpc_stripid_neighbour("r",help29,part_id_if6_r)<<endl;
1703 cout << "row riri " << get_mrpc_stripid_neighbour("r",help30,part_id_if6_r)<<endl;
1704 cout << "row riri " << get_mrpc_stripid_neighbour("r",help31,part_id_if6_r)<<endl;
1705 cout << "row riri " << get_mrpc_stripid_neighbour("r",help32,part_id_if6_r)<<endl;
1706 cout << "row riri " << get_mrpc_stripid_neighbour("r",help33,part_id_if6_r)<<endl;
1707 cout << "row riri " << get_mrpc_stripid_neighbour("r",help34,part_id_if6_r)<<endl;
1708 cout << "row riri " << get_mrpc_stripid_neighbour("r",help35,part_id_if6_r)<<endl;
1709 cout << "row riri " << get_mrpc_stripid_neighbour("r",help36,part_id_if6_r)<<endl;
1710 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help13,part_id_if6_l) << endl;
1711 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help14,part_id_if6_l) << endl;
1712 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help15,part_id_if6_l) << endl;
1713 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help16,part_id_if6_l) << endl;
1714 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help17,part_id_if6_l) << endl;
1715 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help18,part_id_if6_l) << endl;
1716 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help19,part_id_if6_l) << endl;
1717 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help20,part_id_if6_l) << endl;
1718 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help21,part_id_if6_l) << endl;
1719 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help22,part_id_if6_l) << endl;
1720 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help23,part_id_if6_l) << endl;
1721 cout << "row lele "<< get_mrpc_stripid_neighbour("l",help24,part_id_if6_l) << endl;
1722 */
1723
1724
1725 }//close else
1726 }//close if neighboorhood=6
1727
1728
1729
1730
1731
1732
1733 /*std::cout << "MrpcTrack setTofData - partid_it | tofid_it " << "4" << " | " << tofid_it << std::endl;
1734 std::cout << "MrpcTrack setTofData - partid_u | tofid_u " << partid_u << " | " << tofid_u <<std::endl;
1735 std::cout << "MrpcTrack setTofData - partid_b | tofid_b " << partid_b << " | " << tofid_b <<std::endl;
1736 std::cout << "MrpcTrack setTofData - partid_l | tofid_l " << partid_l << " | " << tofid_l <<std::endl;
1737 std::cout << "MrpcTrack setTofData - partid_r | tofid_r " << partid_r << " | " << tofid_r <<std::endl;
1738 std::cout << "MrpcTrack setTofData - partid_lu | tofid_lu " << partid_lu << " | " << tofid_lu <<std::endl;
1739 std::cout << "MrpcTrack setTofData - partid_lb | tofid_lb " << partid_lb << " | " << tofid_lb <<std::endl;
1740 std::cout << "MrpcTrack setTofData - partid_ru | tofid_ru " << partid_ru << " | " << tofid_ru <<std::endl;
1741 std::cout << "MrpcTrack setTofData - partid_rb | tofid_rb " << partid_rb << " | " << tofid_rb <<std::endl;
1742
1743std::cout << "MrpcTrack setTofData - partid_uu | tofid_uu " << partid_uu << " | " << tofid_uu <<std::endl;
1744std::cout << "MrpcTrack setTofData - partid_bb | tofid_bb " << partid_bb << " | " << tofid_bb <<std::endl;
1745std::cout << "MrpcTrack setTofData - partid_rbb | tofid_rbb " << partid_rbb << " | " << tofid_rbb <<std::endl;
1746std::cout << "MrpcTrack setTofData - partid_ruu | tofid_ruu " << partid_ruu << " | " << tofid_ruu <<std::endl;
1747std::cout << "MrpcTrack setTofData - partid_lbb | tofid_lbb " << partid_lbb << " | " << tofid_lbb <<std::endl;
1748std::cout << "MrpcTrack setTofData - partid_luu | tofid_luu " << partid_luu << " | " << tofid_luu <<std::endl;
1749std::cout << "MrpcTrack setTofData - partid_uuu | tofid_uuu " << partid_uuu << " | " << tofid_uuu <<std::endl;
1750std::cout << "MrpcTrack setTofData - partid_bbb | tofid_bbb " << partid_bbb << " | " << tofid_bbb <<std::endl;
1751std::cout << "MrpcTrack setTofData - partid_rbbb | tofid_rbbb " << partid_rbbb << " | " << tofid_rbbb <<std::endl;
1752std::cout << "MrpcTrack setTofData - partid_ruuu | tofid_ruuu " << partid_ruuu << " | " << tofid_ruuu <<std::endl;
1753std::cout << "MrpcTrack setTofData - partid_luuu | tofid_luuu " << partid_luuu << " | " << tofid_luuu <<std::endl;
1754std::cout << "MrpcTrack setTofData - partid_lbbb | tofid_lbbb " << partid_lbbb << " | " << tofid_lbbb <<std::endl;
1755 */
1756
1757
1758
1759 }//close if (m_hitCase)
1760
1761
1762
1763
1764 if((m_hitCase==eastendcap_2) && (m_id1 > 25))
1765 {
1766
1767 int tofid_it = m_id1; //This is my stripidentifier
1768 identify_it = TofID::getIntID_mrpc(3,tofid_it); //Get the whole identifier for the MRPC cell
1769 count_it = tofDataMap.count( identify_it );
1770
1771 //Get ID and part ID from neighbours
1772 int tofid_l = get_mrpc_stripid_neighbour("l",tofid_it,3);
1773 int partid_l = get_mrpc_partid_neighbour("l",tofid_it,3);
1774 int tofid_r = get_mrpc_stripid_neighbour("r",tofid_it,3);
1775 int partid_r = get_mrpc_partid_neighbour("r",tofid_it,3);
1776 int tofid_u = get_mrpc_stripid_neighbour("u",tofid_it,3);
1777 int partid_u = get_mrpc_partid_neighbour("u",tofid_it,3);
1778 int tofid_b = get_mrpc_stripid_neighbour("b",tofid_it,3);
1779 int partid_b = get_mrpc_partid_neighbour("b",tofid_it,3);
1780 //Now from neighbours where we need two operation
1781 int tofid_lu = get_mrpc_stripid_neighbour("u",tofid_l,partid_l);
1782 int partid_lu = get_mrpc_partid_neighbour("u",tofid_l,partid_l);
1783 int tofid_lb = get_mrpc_stripid_neighbour("b",tofid_l,partid_l);
1784 int partid_lb = get_mrpc_partid_neighbour("b",tofid_l,partid_l);
1785 int tofid_ru = get_mrpc_stripid_neighbour("u",tofid_r,partid_r);
1786 int partid_ru = get_mrpc_partid_neighbour("u",tofid_r,partid_r);
1787 int tofid_rb = get_mrpc_stripid_neighbour("b",tofid_r,partid_r);
1788 int partid_rb = get_mrpc_partid_neighbour("b",tofid_r,partid_r);
1789
1790
1791 // Now one additional neighbourlayer up and down but not left and right
1792 int tofid_luu = get_mrpc_stripid_neighbour("u",tofid_lu,partid_lu);
1793 int partid_luu = get_mrpc_partid_neighbour("u",tofid_lu,partid_lu);
1794 int tofid_lbb = get_mrpc_stripid_neighbour("b",tofid_lb,partid_lb);
1795 int partid_lbb = get_mrpc_partid_neighbour("b",tofid_lb,partid_lb);
1796 int tofid_ruu = get_mrpc_stripid_neighbour("u",tofid_ru,partid_ru);
1797 int partid_ruu = get_mrpc_partid_neighbour("u",tofid_ru,partid_ru);
1798 int tofid_rbb = get_mrpc_stripid_neighbour("b",tofid_rb,partid_rb);
1799 int partid_rbb = get_mrpc_partid_neighbour("b",tofid_rb,partid_rb);
1800 int tofid_uu = get_mrpc_stripid_neighbour("u",tofid_u,partid_u);
1801 int partid_uu = get_mrpc_partid_neighbour("u",tofid_u,partid_u);
1802 int tofid_bb = get_mrpc_stripid_neighbour("b",tofid_b,partid_b);
1803 int partid_bb = get_mrpc_partid_neighbour("b",tofid_b,partid_b);
1804
1805 // And again an layer up and down!
1806 int tofid_luuu = get_mrpc_stripid_neighbour("u",tofid_luu,partid_luu);
1807 int partid_luuu = get_mrpc_partid_neighbour("u",tofid_luu,partid_luu);
1808 int tofid_lbbb = get_mrpc_stripid_neighbour("b",tofid_lbb,partid_lbb);
1809 int partid_lbbb = get_mrpc_partid_neighbour("b",tofid_lbb,partid_lbb);
1810 int tofid_ruuu = get_mrpc_stripid_neighbour("u",tofid_ruu,partid_ruu);
1811 int partid_ruuu = get_mrpc_partid_neighbour("u",tofid_ruu,partid_ruu);
1812 int tofid_rbbb = get_mrpc_stripid_neighbour("b",tofid_rbb,partid_rbb);
1813 int partid_rbbb = get_mrpc_partid_neighbour("b",tofid_rbb,partid_rbb);
1814 int tofid_uuu = get_mrpc_stripid_neighbour("u",tofid_uu,partid_uu);
1815 int partid_uuu = get_mrpc_partid_neighbour("u",tofid_uu,partid_uu);
1816 int tofid_bbb = get_mrpc_stripid_neighbour("b",tofid_bb,partid_bb);
1817 int partid_bbb = get_mrpc_partid_neighbour("b",tofid_bb,partid_bb);
1818
1819
1820 //And again an layer to the left and to the right
1821 int tofid_luuul = get_mrpc_stripid_neighbour("l",tofid_luuu,partid_luuu);
1822 int partid_luuul = get_mrpc_partid_neighbour("l",tofid_luuu,partid_luuu);
1823 int tofid_lbbbl = get_mrpc_stripid_neighbour("l",tofid_lbbb,partid_lbbb);
1824 int partid_lbbbl = get_mrpc_partid_neighbour("l",tofid_lbbb,partid_lbbb);
1825 int tofid_ruuur = get_mrpc_stripid_neighbour("r",tofid_ruuu,partid_ruuu);
1826 int partid_ruuur = get_mrpc_partid_neighbour("r",tofid_ruuu,partid_ruuu);
1827 int tofid_rbbbr = get_mrpc_stripid_neighbour("r",tofid_rbbb,partid_rbbb);
1828 int partid_rbbbr = get_mrpc_partid_neighbour("r",tofid_rbbb,partid_rbbb);
1829 int tofid_luul = get_mrpc_stripid_neighbour("l",tofid_luu,partid_luu);
1830 int partid_luul = get_mrpc_partid_neighbour("l",tofid_luu,partid_luu);
1831 int tofid_lbbl = get_mrpc_stripid_neighbour("l",tofid_lbb,partid_lbb);
1832 int partid_lbbl = get_mrpc_partid_neighbour("l",tofid_lbb,partid_lbb);
1833 int tofid_ruur = get_mrpc_stripid_neighbour("r",tofid_ruu,partid_ruu);
1834 int partid_ruur = get_mrpc_partid_neighbour("r",tofid_ruu,partid_ruu);
1835 int tofid_rbbr = get_mrpc_stripid_neighbour("r",tofid_rbb,partid_rbb);
1836 int partid_rbbr = get_mrpc_partid_neighbour("r",tofid_rbb,partid_rbb);
1837 int tofid_lul = get_mrpc_stripid_neighbour("l",tofid_lu,partid_lu);
1838 int partid_lul = get_mrpc_partid_neighbour("l",tofid_lu,partid_lu);
1839 int tofid_lbl = get_mrpc_stripid_neighbour("l",tofid_lb,partid_lb);
1840 int partid_lbl = get_mrpc_partid_neighbour("l",tofid_lb,partid_lb);
1841 int tofid_rur = get_mrpc_stripid_neighbour("r",tofid_ru,partid_ru);
1842 int partid_rur = get_mrpc_partid_neighbour("r",tofid_ru,partid_ru);
1843 int tofid_rbr = get_mrpc_stripid_neighbour("r",tofid_rb,partid_rb);
1844 int partid_rbr = get_mrpc_partid_neighbour("r",tofid_rb,partid_rb);
1845 int tofid_ll = get_mrpc_stripid_neighbour("l",tofid_l,partid_l);
1846 int partid_ll = get_mrpc_partid_neighbour("l",tofid_l,partid_l);
1847 int tofid_rr = get_mrpc_stripid_neighbour("r",tofid_r,partid_r);
1848 int partid_rr = get_mrpc_partid_neighbour("r",tofid_r,partid_r);
1849
1850
1851
1852 //Get the identifier and search the datamap for those identifier
1853
1854 if( (neighborhood==1) || (neighborhood==2) || (neighborhood==3) || (neighborhood==4) )
1855 {
1856 identify_l = TofID::getIntID_mrpc(partid_l,tofid_l);
1857 count_l = tofDataMap.count(identify_l );
1858 identify_r = TofID::getIntID_mrpc(partid_r,tofid_r);
1859 count_r = tofDataMap.count(identify_r);
1860 identify_u = TofID::getIntID_mrpc(partid_u,tofid_u);
1861 count_u = tofDataMap.count(identify_u);
1862 identify_b = TofID::getIntID_mrpc(partid_b,tofid_b);
1863 count_b = tofDataMap.count(identify_b);
1864 identify_lu = TofID::getIntID_mrpc(partid_lu,tofid_lu);
1865 count_lu = tofDataMap.count(identify_lu);
1866 identify_lb = TofID::getIntID_mrpc(partid_lb,tofid_lb);
1867 count_lb = tofDataMap.count(identify_lb);
1868 identify_ru = TofID::getIntID_mrpc(partid_ru,tofid_ru);
1869 count_ru = tofDataMap.count(identify_ru);
1870 identify_rb = TofID::getIntID_mrpc(partid_rb,tofid_rb);
1871 count_rb = tofDataMap.count(identify_rb);
1872 }
1873
1874
1875
1876 if((neighborhood==2) || (neighborhood==3)|| (neighborhood==4))
1877 {
1878 identify_luu = TofID::getIntID_mrpc(partid_luu,tofid_luu);
1879 count_luu = tofDataMap.count(identify_luu );
1880 identify_ruu = TofID::getIntID_mrpc(partid_ruu,tofid_ruu);
1881 count_ruu = tofDataMap.count(identify_ruu);
1882 identify_uu = TofID::getIntID_mrpc(partid_uu,tofid_uu);
1883 count_uu = tofDataMap.count(identify_uu);
1884 identify_bb = TofID::getIntID_mrpc(partid_bb,tofid_bb);
1885 count_bb = tofDataMap.count(identify_bb);
1886 identify_lbb = TofID::getIntID_mrpc(partid_lbb,tofid_lbb);
1887 count_lbb = tofDataMap.count(identify_lbb);
1888 identify_rbb = TofID::getIntID_mrpc(partid_rbb,tofid_rbb);
1889 count_rbb = tofDataMap.count(identify_rbb);
1890
1891 }
1892
1893
1894
1895 if((neighborhood==3)|| (neighborhood==4))
1896 {
1897 identify_luuu = TofID::getIntID_mrpc(partid_luuu,tofid_luuu);
1898 count_luuu = tofDataMap.count(identify_luuu );
1899 identify_ruuu = TofID::getIntID_mrpc(partid_ruuu,tofid_ruuu);
1900 count_ruuu = tofDataMap.count(identify_ruuu);
1901 identify_uuu = TofID::getIntID_mrpc(partid_uuu,tofid_uuu);
1902 count_uuu = tofDataMap.count(identify_uuu);
1903 identify_bbb = TofID::getIntID_mrpc(partid_bbb,tofid_bbb);
1904 count_bbb = tofDataMap.count(identify_bbb);
1905 identify_lbbb = TofID::getIntID_mrpc(partid_lbbb,tofid_lbbb);
1906 count_lbbb = tofDataMap.count(identify_lbbb);
1907 identify_rbbb = TofID::getIntID_mrpc(partid_rbbb,tofid_rbbb);
1908 count_rbbb = tofDataMap.count(identify_rbbb);
1909
1910 }
1911
1912
1913 if((neighborhood==4))
1914 {
1915 identify_luuul = TofID::getIntID_mrpc(partid_luuul,tofid_luuul);
1916 count_luuul = tofDataMap.count(identify_luuul );
1917 identify_ruuur = TofID::getIntID_mrpc(partid_ruuur,tofid_ruuur);
1918 count_ruuur = tofDataMap.count(identify_ruuur);
1919 identify_lbbbl = TofID::getIntID_mrpc(partid_lbbbl,tofid_lbbbl);
1920 count_lbbbl = tofDataMap.count(identify_lbbbl);
1921 identify_rbbbr = TofID::getIntID_mrpc(partid_rbbbr,tofid_rbbbr);
1922 count_rbbbr = tofDataMap.count(identify_rbbbr);
1923
1924 identify_luul = TofID::getIntID_mrpc(partid_luul,tofid_luul);
1925 count_luul = tofDataMap.count(identify_luul );
1926 identify_ruur = TofID::getIntID_mrpc(partid_ruur,tofid_ruur);
1927 count_ruur = tofDataMap.count(identify_ruur);
1928 identify_lbbl = TofID::getIntID_mrpc(partid_lbbl,tofid_lbbl);
1929 count_lbbl = tofDataMap.count(identify_lbbl);
1930 identify_rbbr = TofID::getIntID_mrpc(partid_rbbr,tofid_rbbr);
1931 count_rbbr = tofDataMap.count(identify_rbbr);
1932
1933 identify_ll = TofID::getIntID_mrpc(partid_ll,tofid_ll);
1934 count_ll = tofDataMap.count(identify_ll );
1935 identify_rr = TofID::getIntID_mrpc(partid_rr,tofid_rr);
1936 count_rr = tofDataMap.count(identify_rr);
1937 identify_lul = TofID::getIntID_mrpc(partid_lul,tofid_lul);
1938 count_lul = tofDataMap.count(identify_lul);
1939 identify_lbl = TofID::getIntID_mrpc(partid_lbl,tofid_lbl);
1940 count_lbl = tofDataMap.count(identify_lbl);
1941 identify_rur = TofID::getIntID_mrpc(partid_rur,tofid_rur);
1942 count_rur = tofDataMap.count(identify_rur);
1943 identify_rbr = TofID::getIntID_mrpc(partid_rbr,tofid_rbr);
1944 count_rbr = tofDataMap.count(identify_rbr);
1945 }
1946
1947
1948
1949 //if=5
1950 if((neighborhood==5))
1951 {
1952 int strip_number_if5 = BesTofDigitizerEcV4::Get_stripnumber_from_unique_identifier(tofid_it);
1953 int module_number_if5= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(tofid_it);
1954
1955 if((strip_number_if5)%2==0)
1956 {
1957 identify_if5_it=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
1958 identify_if5_m1=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2));
1959 identify_if5_m2=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4));
1960 identify_if5_m3=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6));
1961 identify_if5_m4=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8));
1962 identify_if5_m5=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10));
1963 identify_if5_m6=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12));
1964 identify_if5_m7=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14));
1965 identify_if5_m8=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16));
1966 identify_if5_m9=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18));
1967 identify_if5_m10=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20));
1968 identify_if5_m11=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22));
1969 identify_if5_m12=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24));
1970 count_if5_m1=tofDataMap.count(identify_if5_m1);
1971 count_if5_m2=tofDataMap.count(identify_if5_m2);
1972 count_if5_m3=tofDataMap.count(identify_if5_m3);
1973 count_if5_m4=tofDataMap.count(identify_if5_m4);
1974 count_if5_m5=tofDataMap.count(identify_if5_m5);
1975 count_if5_m6=tofDataMap.count(identify_if5_m6);
1976 count_if5_m7=tofDataMap.count(identify_if5_m7);
1977 count_if5_m8=tofDataMap.count(identify_if5_m8);
1978 count_if5_m9=tofDataMap.count(identify_if5_m9);
1979 count_if5_m10=tofDataMap.count(identify_if5_m10);
1980 count_if5_m11=tofDataMap.count(identify_if5_m11);
1981 count_if5_m12=tofDataMap.count(identify_if5_m12);
1982
1983 int help1 =BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2);
1984 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,3), get_mrpc_stripid_neighbour("l",help1,3));
1985 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4);
1986 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,3), get_mrpc_stripid_neighbour("l",help2,3));
1987 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6);
1988 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,3), get_mrpc_stripid_neighbour("l",help3,3));
1989 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8);
1990 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,3), get_mrpc_stripid_neighbour("l",help4,3));
1991 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10);
1992 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,3), get_mrpc_stripid_neighbour("l",help5,3));
1993 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12);
1994 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,3), get_mrpc_stripid_neighbour("l",help6,3));
1995 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14);
1996 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,3), get_mrpc_stripid_neighbour("l",help7,3));
1997 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16);
1998 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,3), get_mrpc_stripid_neighbour("l",help8,3));
1999 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18);
2000 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,3), get_mrpc_stripid_neighbour("l",help9,3));
2001 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20);
2002 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,3), get_mrpc_stripid_neighbour("l",help10,3));
2003 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22);
2004 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,3), get_mrpc_stripid_neighbour("l",help11,3));
2005 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24);
2006 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,3), get_mrpc_stripid_neighbour("l",help12,3));
2007
2008
2009
2010 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,3), get_mrpc_stripid_neighbour("r",help1,3));
2011 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,3), get_mrpc_stripid_neighbour("r",help2,3));
2012 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,3), get_mrpc_stripid_neighbour("r",help3,3));
2013 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,3), get_mrpc_stripid_neighbour("r",help4,3));
2014 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,3), get_mrpc_stripid_neighbour("r",help5,3));
2015 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,3), get_mrpc_stripid_neighbour("r",help6,3));
2016 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,3), get_mrpc_stripid_neighbour("r",help7,3));
2017 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,3), get_mrpc_stripid_neighbour("r",help8,3));
2018 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,3), get_mrpc_stripid_neighbour("r",help9,3));
2019 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,3), get_mrpc_stripid_neighbour("r",help10,3));
2020 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,3), get_mrpc_stripid_neighbour("r",help11,3));
2021 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,3), get_mrpc_stripid_neighbour("r",help12,3));
2022
2023
2024
2025 count_if5_l1=tofDataMap.count(identify_if5_l1);
2026 count_if5_l2=tofDataMap.count(identify_if5_l2);
2027 count_if5_l3=tofDataMap.count(identify_if5_l3);
2028 count_if5_l4=tofDataMap.count(identify_if5_l4);
2029 count_if5_l5=tofDataMap.count(identify_if5_l5);
2030 count_if5_l6=tofDataMap.count(identify_if5_l6);
2031 count_if5_l7=tofDataMap.count(identify_if5_l7);
2032 count_if5_l8=tofDataMap.count(identify_if5_l8);
2033 count_if5_l9=tofDataMap.count(identify_if5_l9);
2034 count_if5_l10=tofDataMap.count(identify_if5_l10);
2035 count_if5_l11=tofDataMap.count(identify_if5_l11);
2036 count_if5_l12=tofDataMap.count(identify_if5_l12);
2037 count_if5_r1=tofDataMap.count(identify_if5_r1);
2038 count_if5_r2=tofDataMap.count(identify_if5_r2);
2039 count_if5_r3=tofDataMap.count(identify_if5_r3);
2040 count_if5_r4=tofDataMap.count(identify_if5_r4);
2041 count_if5_r5=tofDataMap.count(identify_if5_r5);
2042 count_if5_r6=tofDataMap.count(identify_if5_r6);
2043 count_if5_r7=tofDataMap.count(identify_if5_r7);
2044 count_if5_r8=tofDataMap.count(identify_if5_r8);
2045 count_if5_r9=tofDataMap.count(identify_if5_r9);
2046 count_if5_r10=tofDataMap.count(identify_if5_r10);
2047 count_if5_r11=tofDataMap.count(identify_if5_r11);
2048 count_if5_r12=tofDataMap.count(identify_if5_r12);
2049
2050
2051 }//close if stripnumber
2052 else
2053 {
2054 identify_if5_it=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
2055 identify_if5_m1=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1));
2056 identify_if5_m2=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3));
2057 identify_if5_m3=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5));
2058 identify_if5_m4=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7));
2059 identify_if5_m5=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9));
2060 identify_if5_m6=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11));
2061 identify_if5_m7=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13));
2062 identify_if5_m8=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15));
2063 identify_if5_m9=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17));
2064 identify_if5_m10=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19));
2065 identify_if5_m11=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21));
2066 identify_if5_m12=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23));
2067 count_if5_m1=tofDataMap.count(identify_if5_m1);
2068 count_if5_m2=tofDataMap.count(identify_if5_m2);
2069 count_if5_m3=tofDataMap.count(identify_if5_m3);
2070 count_if5_m4=tofDataMap.count(identify_if5_m4);
2071 count_if5_m5=tofDataMap.count(identify_if5_m5);
2072 count_if5_m6=tofDataMap.count(identify_if5_m6);
2073 count_if5_m7=tofDataMap.count(identify_if5_m7);
2074 count_if5_m8=tofDataMap.count(identify_if5_m8);
2075 count_if5_m9=tofDataMap.count(identify_if5_m9);
2076 count_if5_m10=tofDataMap.count(identify_if5_m10);
2077 count_if5_m11=tofDataMap.count(identify_if5_m11);
2078 count_if5_m12=tofDataMap.count(identify_if5_m12);
2079
2080 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1);
2081 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,3), get_mrpc_stripid_neighbour("l",help1,3));
2082 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3);
2083 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,3), get_mrpc_stripid_neighbour("l",help2,3));
2084 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5);
2085 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,3), get_mrpc_stripid_neighbour("l",help3,3));
2086 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7);
2087 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,3), get_mrpc_stripid_neighbour("l",help4,3));
2088 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9);
2089 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,3), get_mrpc_stripid_neighbour("l",help5,3));
2090 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11);
2091 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,3), get_mrpc_stripid_neighbour("l",help6,3));
2092 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13);
2093 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,3), get_mrpc_stripid_neighbour("l",help7,3));
2094 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15);
2095 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,3), get_mrpc_stripid_neighbour("l",help8,3));
2096 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17);
2097 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,3), get_mrpc_stripid_neighbour("l",help9,3));
2098 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19);
2099 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,3), get_mrpc_stripid_neighbour("l",help10,3));
2100 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21);
2101 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,3), get_mrpc_stripid_neighbour("l",help11,3));
2102 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23);
2103 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,3), get_mrpc_stripid_neighbour("l",help12,3));
2104
2105
2106
2107 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,3), get_mrpc_stripid_neighbour("r",help1,3));
2108 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,3), get_mrpc_stripid_neighbour("r",help2,3));
2109 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,3), get_mrpc_stripid_neighbour("r",help3,3));
2110 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,3), get_mrpc_stripid_neighbour("r",help4,3));
2111 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,3), get_mrpc_stripid_neighbour("r",help5,3));
2112 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,3), get_mrpc_stripid_neighbour("r",help6,3));
2113 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,3), get_mrpc_stripid_neighbour("r",help7,3));
2114 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,3), get_mrpc_stripid_neighbour("r",help8,3));
2115 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,3), get_mrpc_stripid_neighbour("r",help9,3));
2116 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,3), get_mrpc_stripid_neighbour("r",help10,3));
2117 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,3), get_mrpc_stripid_neighbour("r",help11,3));
2118 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,3), get_mrpc_stripid_neighbour("r",help12,3));
2119
2120
2121 count_if5_l1=tofDataMap.count(identify_if5_l1);
2122 count_if5_l2=tofDataMap.count(identify_if5_l2);
2123 count_if5_l3=tofDataMap.count(identify_if5_l3);
2124 count_if5_l4=tofDataMap.count(identify_if5_l4);
2125 count_if5_l5=tofDataMap.count(identify_if5_l5);
2126 count_if5_l6=tofDataMap.count(identify_if5_l6);
2127 count_if5_l7=tofDataMap.count(identify_if5_l7);
2128 count_if5_l8=tofDataMap.count(identify_if5_l8);
2129 count_if5_l9=tofDataMap.count(identify_if5_l9);
2130 count_if5_l10=tofDataMap.count(identify_if5_l10);
2131 count_if5_l11=tofDataMap.count(identify_if5_l11);
2132 count_if5_l12=tofDataMap.count(identify_if5_l12);
2133 count_if5_r1=tofDataMap.count(identify_if5_r1);
2134 count_if5_r2=tofDataMap.count(identify_if5_r2);
2135 count_if5_r3=tofDataMap.count(identify_if5_r3);
2136 count_if5_r4=tofDataMap.count(identify_if5_r4);
2137 count_if5_r5=tofDataMap.count(identify_if5_r5);
2138 count_if5_r6=tofDataMap.count(identify_if5_r6);
2139 count_if5_r7=tofDataMap.count(identify_if5_r7);
2140 count_if5_r8=tofDataMap.count(identify_if5_r8);
2141 count_if5_r9=tofDataMap.count(identify_if5_r9);
2142 count_if5_r10=tofDataMap.count(identify_if5_r10);
2143 count_if5_r11=tofDataMap.count(identify_if5_r11);
2144 count_if5_r12=tofDataMap.count(identify_if5_r12);
2145
2146
2147 }//close else
2148
2149 }//close if neighboorhood=5
2150
2151
2152 if((neighborhood==6))
2153 {
2154
2155 int strip_number_if6 = BesTofDigitizerEcV4::Get_stripnumber_from_unique_identifier(tofid_it);
2156 int module_number_if6= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(tofid_it);
2157
2158 if((strip_number_if6)%2==0)
2159 {
2160 identify_if6_it=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
2161
2162 identify_if6_m1=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2));
2163 identify_if6_m2=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4));
2164 identify_if6_m3=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6));
2165 identify_if6_m4=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8));
2166 identify_if6_m5=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10));
2167 identify_if6_m6=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12));
2168 identify_if6_m7=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14));
2169 identify_if6_m8=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16));
2170 identify_if6_m9=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18));
2171 identify_if6_m10=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20));
2172 identify_if6_m11=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22));
2173 identify_if6_m12=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24));
2174
2175
2176 count_if6_m1=tofDataMap.count(identify_if6_m1);
2177 count_if6_m2=tofDataMap.count(identify_if6_m2);
2178 count_if6_m3=tofDataMap.count(identify_if6_m3);
2179 count_if6_m4=tofDataMap.count(identify_if6_m4);
2180 count_if6_m5=tofDataMap.count(identify_if6_m5);
2181 count_if6_m6=tofDataMap.count(identify_if6_m6);
2182 count_if6_m7=tofDataMap.count(identify_if6_m7);
2183 count_if6_m8=tofDataMap.count(identify_if6_m8);
2184 count_if6_m9=tofDataMap.count(identify_if6_m9);
2185 count_if6_m10=tofDataMap.count(identify_if6_m10);
2186 count_if6_m11=tofDataMap.count(identify_if6_m11);
2187 count_if6_m12=tofDataMap.count(identify_if6_m12);
2188
2189 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2);
2190 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4);
2191 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6);
2192 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8);
2193 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10);
2194 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12);
2195 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14);
2196 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16);
2197 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18);
2198 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20);
2199 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22);
2200 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24);
2201
2202 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,3), get_mrpc_stripid_neighbour("l",help1,3));
2203 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,3), get_mrpc_stripid_neighbour("l",help2,3));
2204 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,3), get_mrpc_stripid_neighbour("l",help3,3));
2205 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,3), get_mrpc_stripid_neighbour("l",help4,3));
2206 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,3), get_mrpc_stripid_neighbour("l",help5,3));
2207 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,3), get_mrpc_stripid_neighbour("l",help6,3));
2208 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,3), get_mrpc_stripid_neighbour("l",help7,3));
2209 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,3), get_mrpc_stripid_neighbour("l",help8,3));
2210 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,3), get_mrpc_stripid_neighbour("l",help9,3));
2211 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,3), get_mrpc_stripid_neighbour("l",help10,3));
2212 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,3), get_mrpc_stripid_neighbour("l",help11,3));
2213 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,3), get_mrpc_stripid_neighbour("l",help12,3));
2214
2215 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,3), get_mrpc_stripid_neighbour("r",help1,3));
2216 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,3), get_mrpc_stripid_neighbour("r",help2,3));
2217 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,3), get_mrpc_stripid_neighbour("r",help3,3));
2218 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,3), get_mrpc_stripid_neighbour("r",help4,3));
2219 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,3), get_mrpc_stripid_neighbour("r",help5,3));
2220 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,3), get_mrpc_stripid_neighbour("r",help6,3));
2221 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,3), get_mrpc_stripid_neighbour("r",help7,3));
2222 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,3), get_mrpc_stripid_neighbour("r",help8,3));
2223 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,3), get_mrpc_stripid_neighbour("r",help9,3));
2224 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,3), get_mrpc_stripid_neighbour("r",help10,3));
2225 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,3), get_mrpc_stripid_neighbour("r",help11,3));
2226 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,3), get_mrpc_stripid_neighbour("r",help12,3));
2227
2228
2229 count_if6_l1=tofDataMap.count(identify_if6_l1);
2230 count_if6_l2=tofDataMap.count(identify_if6_l2);
2231 count_if6_l3=tofDataMap.count(identify_if6_l3);
2232 count_if6_l4=tofDataMap.count(identify_if6_l4);
2233 count_if6_l5=tofDataMap.count(identify_if6_l5);
2234 count_if6_l6=tofDataMap.count(identify_if6_l6);
2235 count_if6_l7=tofDataMap.count(identify_if6_l7);
2236 count_if6_l8=tofDataMap.count(identify_if6_l8);
2237 count_if6_l9=tofDataMap.count(identify_if6_l9);
2238 count_if6_l10=tofDataMap.count(identify_if6_l10);
2239 count_if6_l11=tofDataMap.count(identify_if6_l11);
2240 count_if6_l12=tofDataMap.count(identify_if6_l12);
2241 count_if6_r1=tofDataMap.count(identify_if6_r1);
2242 count_if6_r2=tofDataMap.count(identify_if6_r2);
2243 count_if6_r3=tofDataMap.count(identify_if6_r3);
2244 count_if6_r4=tofDataMap.count(identify_if6_r4);
2245 count_if6_r5=tofDataMap.count(identify_if6_r5);
2246 count_if6_r6=tofDataMap.count(identify_if6_r6);
2247 count_if6_r7=tofDataMap.count(identify_if6_r7);
2248 count_if6_r8=tofDataMap.count(identify_if6_r8);
2249 count_if6_r9=tofDataMap.count(identify_if6_r9);
2250 count_if6_r10=tofDataMap.count(identify_if6_r10);
2251 count_if6_r11=tofDataMap.count(identify_if6_r11);
2252 count_if6_r12=tofDataMap.count(identify_if6_r12);
2253
2254//Now go again one to the left and one to the right!
2255
2256
2257 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,3));//Get the module number!!! from the left module.
2258 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,3);
2259
2260 //We are here within the "even stripid slope": I.e the left and right neighbor are odd. Hence, use odd number for help13-help36
2261 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,1);
2262 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,3);
2263 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,5);
2264 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,7);
2265 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,9);
2266 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,11);
2267 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,13);
2268 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,15);
2269 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,17);
2270 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,19);
2271 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,21);
2272 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,23);
2273
2274 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
2275 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
2276 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
2277 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
2278 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
2279 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
2280 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
2281 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
2282 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
2283 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
2284 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
2285 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
2286
2287 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,3));//Get the module number!!! from the left module.
2288 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,3);
2289
2290 //We are here within the "even stripid slope": I.e the left and right neighbor are odd. Hence, use odd number for help13-help36
2291 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,1);
2292 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,3);
2293 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,5);
2294 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,7);
2295 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,9);
2296 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,11);
2297 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,13);
2298 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,15);
2299 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,17);
2300 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,19);
2301 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,21);
2302 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,23);
2303
2304 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
2305 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
2306 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
2307 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
2308 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
2309 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
2310 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
2311 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
2312 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
2313 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
2314 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
2315 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
2316
2317
2318 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
2319 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
2320 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
2321 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
2322 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
2323 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
2324 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
2325 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
2326 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
2327 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
2328 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
2329 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
2330 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
2331 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
2332 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
2333 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
2334 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
2335 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
2336 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
2337 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
2338 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
2339 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
2340 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
2341 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
2342
2343
2344
2345
2346 }//close if stripnumber
2347 else
2348 {
2349 identify_if6_it=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
2350 identify_if6_m1=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1));
2351 identify_if6_m2=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3));
2352 identify_if6_m3=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5));
2353 identify_if6_m4=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7));
2354 identify_if6_m5=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9));
2355 identify_if6_m6=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11));
2356 identify_if6_m7=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13));
2357 identify_if6_m8=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15));
2358 identify_if6_m9=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17));
2359 identify_if6_m10=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19));
2360 identify_if6_m11=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21));
2361 identify_if6_m12=TofID::getIntID_mrpc(3, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23));
2362 count_if6_m1=tofDataMap.count(identify_if6_m1);
2363 count_if6_m2=tofDataMap.count(identify_if6_m2);
2364 count_if6_m3=tofDataMap.count(identify_if6_m3);
2365 count_if6_m4=tofDataMap.count(identify_if6_m4);
2366 count_if6_m5=tofDataMap.count(identify_if6_m5);
2367 count_if6_m6=tofDataMap.count(identify_if6_m6);
2368 count_if6_m7=tofDataMap.count(identify_if6_m7);
2369 count_if6_m8=tofDataMap.count(identify_if6_m8);
2370 count_if6_m9=tofDataMap.count(identify_if6_m9);
2371 count_if6_m10=tofDataMap.count(identify_if6_m10);
2372 count_if6_m11=tofDataMap.count(identify_if6_m11);
2373 count_if6_m12=tofDataMap.count(identify_if6_m12);
2374
2375
2376 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1);
2377 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3);
2378 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5);
2379 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7);
2380 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9);
2381 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11);
2382 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13);
2383 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15);
2384 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17);
2385 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19);
2386 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21);
2387 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23);
2388
2389
2390 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,3), get_mrpc_stripid_neighbour("l",help1,3));
2391 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,3), get_mrpc_stripid_neighbour("l",help2,3));
2392 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,3), get_mrpc_stripid_neighbour("l",help3,3));
2393 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,3), get_mrpc_stripid_neighbour("l",help4,3));
2394 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,3), get_mrpc_stripid_neighbour("l",help5,3));
2395 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,3), get_mrpc_stripid_neighbour("l",help6,3));
2396 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,3), get_mrpc_stripid_neighbour("l",help7,3));
2397 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,3), get_mrpc_stripid_neighbour("l",help8,3));
2398 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,3), get_mrpc_stripid_neighbour("l",help9,3));
2399 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,3), get_mrpc_stripid_neighbour("l",help10,3));
2400 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,3), get_mrpc_stripid_neighbour("l",help11,3));
2401 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,3), get_mrpc_stripid_neighbour("l",help12,3));
2402
2403 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,3), get_mrpc_stripid_neighbour("r",help1,3));
2404 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,3), get_mrpc_stripid_neighbour("r",help2,3));
2405 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,3), get_mrpc_stripid_neighbour("r",help3,3));
2406 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,3), get_mrpc_stripid_neighbour("r",help4,3));
2407 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,3), get_mrpc_stripid_neighbour("r",help5,3));
2408 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,3), get_mrpc_stripid_neighbour("r",help6,3));
2409 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,3), get_mrpc_stripid_neighbour("r",help7,3));
2410 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,3), get_mrpc_stripid_neighbour("r",help8,3));
2411 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,3), get_mrpc_stripid_neighbour("r",help9,3));
2412 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,3), get_mrpc_stripid_neighbour("r",help10,3));
2413 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,3), get_mrpc_stripid_neighbour("r",help11,3));
2414 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,3), get_mrpc_stripid_neighbour("r",help12,3));
2415
2416 count_if6_l1=tofDataMap.count(identify_if6_l1);
2417 count_if6_l2=tofDataMap.count(identify_if6_l2);
2418 count_if6_l3=tofDataMap.count(identify_if6_l3);
2419 count_if6_l4=tofDataMap.count(identify_if6_l4);
2420 count_if6_l5=tofDataMap.count(identify_if6_l5);
2421 count_if6_l6=tofDataMap.count(identify_if6_l6);
2422 count_if6_l7=tofDataMap.count(identify_if6_l7);
2423 count_if6_l8=tofDataMap.count(identify_if6_l8);
2424 count_if6_l9=tofDataMap.count(identify_if6_l9);
2425 count_if6_l10=tofDataMap.count(identify_if6_l10);
2426 count_if6_l11=tofDataMap.count(identify_if6_l11);
2427 count_if6_l12=tofDataMap.count(identify_if6_l12);
2428 count_if6_r1=tofDataMap.count(identify_if6_r1);
2429 count_if6_r2=tofDataMap.count(identify_if6_r2);
2430 count_if6_r3=tofDataMap.count(identify_if6_r3);
2431 count_if6_r4=tofDataMap.count(identify_if6_r4);
2432 count_if6_r5=tofDataMap.count(identify_if6_r5);
2433 count_if6_r6=tofDataMap.count(identify_if6_r6);
2434 count_if6_r7=tofDataMap.count(identify_if6_r7);
2435 count_if6_r8=tofDataMap.count(identify_if6_r8);
2436 count_if6_r9=tofDataMap.count(identify_if6_r9);
2437 count_if6_r10=tofDataMap.count(identify_if6_r10);
2438 count_if6_r11=tofDataMap.count(identify_if6_r11);
2439 count_if6_r12=tofDataMap.count(identify_if6_r12);
2440
2441
2442
2443
2444
2445//Now go again one to the left and one to the right!
2446
2447
2448 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,3));//Get the module number!!! from the left module.
2449 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,3);
2450
2451 //We are here within the "odd stripid slope": I.e the left and right neighbor are even in stripid. Hence, use even number for help13-help36
2452 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,2);
2453 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,4);
2454 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,6);
2455 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,8);
2456 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,10);
2457 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,12);
2458 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,14);
2459 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,16);
2460 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,18);
2461 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,20);
2462 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,22);
2463 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,24);
2464
2465 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
2466 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
2467 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
2468 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
2469 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
2470 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
2471 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
2472 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
2473 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
2474 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
2475 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
2476 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
2477
2478 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,4));//Get the module number!!! from the left module.
2479 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,4);
2480
2481 //We are here within the "odd stripid slope": I.e the left and right neighbor are even in stripid. Hence, use even number for help13-help36
2482 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,2);
2483 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,4);
2484 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,6);
2485 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,8);
2486 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,10);
2487 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,12);
2488 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,14);
2489 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,16);
2490 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,18);
2491 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,20);
2492 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,22);
2493 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,24);
2494
2495 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
2496 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
2497 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
2498 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
2499 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
2500 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
2501 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
2502 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
2503 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
2504 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
2505 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
2506 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
2507
2508 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
2509 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
2510 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
2511 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
2512 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
2513 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
2514 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
2515 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
2516 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
2517 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
2518 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
2519 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
2520 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
2521 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
2522 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
2523 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
2524 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
2525 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
2526 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
2527 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
2528 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
2529 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
2530 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
2531 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
2532
2533
2534
2535 }//close else
2536 }//close if neighboorhood=6
2537
2538
2539
2540 /*std::cout << "MrpcTrack setTofData - partid_it | tofid_it " << "3" << " | " << tofid_it << std::endl;
2541 std::cout << "MrpcTrack setTofData - partid_u | tofid_u " << partid_u << " | " << tofid_u <<std::endl;
2542 std::cout << "MrpcTrack setTofData - partid_b | tofid_b " << partid_b << " | " << tofid_b <<std::endl;
2543 std::cout << "MrpcTrack setTofData - partid_l | tofid_l " << partid_l << " | " << tofid_l <<std::endl;
2544 std::cout << "MrpcTrack setTofData - partid_r | tofid_r " << partid_r << " | " << tofid_r <<std::endl;
2545 std::cout << "MrpcTrack setTofData - partid_lu | tofid_lu " << partid_lu << " | " << tofid_lu <<std::endl;
2546 std::cout << "MrpcTrack setTofData - partid_lb | tofid_lb " << partid_lb << " | " << tofid_lb <<std::endl;
2547 std::cout << "MrpcTrack setTofData - partid_ru | tofid_ru " << partid_ru << " | " << tofid_ru <<std::endl;
2548 std::cout << "MrpcTrack setTofData - partid_rb | tofid_rb " << partid_rb << " | " << tofid_rb <<std::endl;
2549
2550
2551
2552std::cout << "MrpcTrack setTofData - partid_uu | tofid_uu " << partid_uu << " | " << tofid_uu <<std::endl;
2553std::cout << "MrpcTrack setTofData - partid_bb | tofid_bb " << partid_bb << " | " << tofid_bb <<std::endl;
2554std::cout << "MrpcTrack setTofData - partid_rbb | tofid_rbb " << partid_rbb << " | " << tofid_rbb <<std::endl;
2555std::cout << "MrpcTrack setTofData - partid_ruu | tofid_ruu " << partid_ruu << " | " << tofid_ruu <<std::endl;
2556std::cout << "MrpcTrack setTofData - partid_lbb | tofid_lbb " << partid_lbb << " | " << tofid_lbb <<std::endl;
2557std::cout << "MrpcTrack setTofData - partid_luu | tofid_luu " << partid_luu << " | " << tofid_luu <<std::endl;
2558std::cout << "MrpcTrack setTofData - partid_uuu | tofid_uuu " << partid_uuu << " | " << tofid_uuu <<std::endl;
2559std::cout << "MrpcTrack setTofData - partid_bbb | tofid_bbb " << partid_bbb << " | " << tofid_bbb <<std::endl;
2560std::cout << "MrpcTrack setTofData - partid_rbbb | tofid_rbbb " << partid_rbbb << " | " << tofid_rbbb <<std::endl;
2561std::cout << "MrpcTrack setTofData - partid_ruuu | tofid_ruuu " << partid_ruuu << " | " << tofid_ruuu <<std::endl;
2562std::cout << "MrpcTrack setTofData - partid_luuu | tofid_luuu " << partid_luuu << " | " << tofid_luuu <<std::endl;
2563std::cout << "MrpcTrack setTofData - partid_lbbb | tofid_lbbb " << partid_lbbb << " | " << tofid_lbbb <<std::endl;
2564 */
2565
2566 }//close if (m_hitCase)
2567
2568 if((m_hitCase==westendcap_1) && (m_id1 > 25))
2569 {
2570 int tofid_it = m_id1; //This is my stripidentifier
2571 identify_it = TofID::getIntID_mrpc(5,tofid_it); //Get the whole identifier for the MRPC cell
2572 count_it = tofDataMap.count( identify_it );
2573
2574 //Get ID and part ID from neighbours
2575 int tofid_l = get_mrpc_stripid_neighbour("l",tofid_it,5);
2576 int partid_l = get_mrpc_partid_neighbour("l",tofid_it,5);
2577 int tofid_r = get_mrpc_stripid_neighbour("r",tofid_it,5);
2578 int partid_r = get_mrpc_partid_neighbour("r",tofid_it,5);
2579 int tofid_u = get_mrpc_stripid_neighbour("u",tofid_it,5);
2580 int partid_u = get_mrpc_partid_neighbour("u",tofid_it,5);
2581 int tofid_b = get_mrpc_stripid_neighbour("b",tofid_it,5);
2582 int partid_b = get_mrpc_partid_neighbour("b",tofid_it,5);
2583 //Now from next neighbours where we need two operation
2584 int tofid_lu = get_mrpc_stripid_neighbour("u",tofid_l,partid_l);
2585 int partid_lu = get_mrpc_partid_neighbour("u",tofid_l,partid_l);
2586 int tofid_lb = get_mrpc_stripid_neighbour("b",tofid_l,partid_l);
2587 int partid_lb = get_mrpc_partid_neighbour("b",tofid_l,partid_l);
2588 int tofid_ru = get_mrpc_stripid_neighbour("u",tofid_r,partid_r);
2589 int partid_ru = get_mrpc_partid_neighbour("u",tofid_r,partid_r);
2590 int tofid_rb = get_mrpc_stripid_neighbour("b",tofid_r,partid_r);
2591 int partid_rb = get_mrpc_partid_neighbour("b",tofid_r,partid_r);
2592
2593 // Now one additional neighbourlayer up and down but not left and right
2594 int tofid_luu = get_mrpc_stripid_neighbour("u",tofid_lu,partid_lu);
2595 int partid_luu = get_mrpc_partid_neighbour("u",tofid_lu,partid_lu);
2596 int tofid_lbb = get_mrpc_stripid_neighbour("b",tofid_lb,partid_lb);
2597 int partid_lbb = get_mrpc_partid_neighbour("b",tofid_lb,partid_lb);
2598 int tofid_ruu = get_mrpc_stripid_neighbour("u",tofid_ru,partid_ru);
2599 int partid_ruu = get_mrpc_partid_neighbour("u",tofid_ru,partid_ru);
2600 int tofid_rbb = get_mrpc_stripid_neighbour("b",tofid_rb,partid_rb);
2601 int partid_rbb = get_mrpc_partid_neighbour("b",tofid_rb,partid_rb);
2602 int tofid_uu = get_mrpc_stripid_neighbour("u",tofid_u,partid_u);
2603 int partid_uu = get_mrpc_partid_neighbour("u",tofid_u,partid_u);
2604 int tofid_bb = get_mrpc_stripid_neighbour("b",tofid_b,partid_b);
2605 int partid_bb = get_mrpc_partid_neighbour("b",tofid_b,partid_b);
2606
2607
2608 // And again an layer up and down!
2609 int tofid_luuu = get_mrpc_stripid_neighbour("u",tofid_luu,partid_luu);
2610 int partid_luuu = get_mrpc_partid_neighbour("u",tofid_luu,partid_luu);
2611 int tofid_lbbb = get_mrpc_stripid_neighbour("b",tofid_lbb,partid_lbb);
2612 int partid_lbbb = get_mrpc_partid_neighbour("b",tofid_lbb,partid_lbb);
2613 int tofid_ruuu = get_mrpc_stripid_neighbour("u",tofid_ruu,partid_ruu);
2614 int partid_ruuu = get_mrpc_partid_neighbour("u",tofid_ruu,partid_ruu);
2615 int tofid_rbbb = get_mrpc_stripid_neighbour("b",tofid_rbb,partid_rbb);
2616 int partid_rbbb = get_mrpc_partid_neighbour("b",tofid_rbb,partid_rbb);
2617 int tofid_uuu = get_mrpc_stripid_neighbour("u",tofid_uu,partid_uu);
2618 int partid_uuu = get_mrpc_partid_neighbour("u",tofid_uu,partid_uu);
2619 int tofid_bbb = get_mrpc_stripid_neighbour("b",tofid_bb,partid_bb);
2620 int partid_bbb = get_mrpc_partid_neighbour("b",tofid_bb,partid_bb);
2621
2622
2623 //And again an layer to the left and to the right
2624 int tofid_luuul = get_mrpc_stripid_neighbour("l",tofid_luuu,partid_luuu);
2625 int partid_luuul = get_mrpc_partid_neighbour("l",tofid_luuu,partid_luuu);
2626 int tofid_lbbbl = get_mrpc_stripid_neighbour("l",tofid_lbbb,partid_lbbb);
2627 int partid_lbbbl = get_mrpc_partid_neighbour("l",tofid_lbbb,partid_lbbb);
2628 int tofid_ruuur = get_mrpc_stripid_neighbour("r",tofid_ruuu,partid_ruuu);
2629 int partid_ruuur = get_mrpc_partid_neighbour("r",tofid_ruuu,partid_ruuu);
2630 int tofid_rbbbr = get_mrpc_stripid_neighbour("r",tofid_rbbb,partid_rbbb);
2631 int partid_rbbbr = get_mrpc_partid_neighbour("r",tofid_rbbb,partid_rbbb);
2632 int tofid_luul = get_mrpc_stripid_neighbour("l",tofid_luu,partid_luu);
2633 int partid_luul = get_mrpc_partid_neighbour("l",tofid_luu,partid_luu);
2634 int tofid_lbbl = get_mrpc_stripid_neighbour("l",tofid_lbb,partid_lbb);
2635 int partid_lbbl = get_mrpc_partid_neighbour("l",tofid_lbb,partid_lbb);
2636 int tofid_ruur = get_mrpc_stripid_neighbour("r",tofid_ruu,partid_ruu);
2637 int partid_ruur = get_mrpc_partid_neighbour("r",tofid_ruu,partid_ruu);
2638 int tofid_rbbr = get_mrpc_stripid_neighbour("r",tofid_rbb,partid_rbb);
2639 int partid_rbbr = get_mrpc_partid_neighbour("r",tofid_rbb,partid_rbb);
2640 int tofid_lul = get_mrpc_stripid_neighbour("l",tofid_lu,partid_lu);
2641 int partid_lul = get_mrpc_partid_neighbour("l",tofid_lu,partid_lu);
2642 int tofid_lbl = get_mrpc_stripid_neighbour("l",tofid_lb,partid_lb);
2643 int partid_lbl = get_mrpc_partid_neighbour("l",tofid_lb,partid_lb);
2644 int tofid_rur = get_mrpc_stripid_neighbour("r",tofid_ru,partid_ru);
2645 int partid_rur = get_mrpc_partid_neighbour("r",tofid_ru,partid_ru);
2646 int tofid_rbr = get_mrpc_stripid_neighbour("r",tofid_rb,partid_rb);
2647 int partid_rbr = get_mrpc_partid_neighbour("r",tofid_rb,partid_rb);
2648 int tofid_ll = get_mrpc_stripid_neighbour("l",tofid_l,partid_l);
2649 int partid_ll = get_mrpc_partid_neighbour("l",tofid_l,partid_l);
2650 int tofid_rr = get_mrpc_stripid_neighbour("r",tofid_r,partid_r);
2651 int partid_rr = get_mrpc_partid_neighbour("r",tofid_r,partid_r);
2652
2653
2654
2655 //Get the identifier and search the datamap for those identifier
2656 if( (neighborhood==1) || (neighborhood==2) || (neighborhood==3) || (neighborhood==4) )
2657 {
2658 identify_l = TofID::getIntID_mrpc(partid_l,tofid_l);
2659 count_l = tofDataMap.count(identify_l );
2660 identify_r = TofID::getIntID_mrpc(partid_r,tofid_r);
2661 count_r = tofDataMap.count(identify_r);
2662 identify_u = TofID::getIntID_mrpc(partid_u,tofid_u);
2663 count_u = tofDataMap.count(identify_u);
2664 identify_b = TofID::getIntID_mrpc(partid_b,tofid_b);
2665 count_b = tofDataMap.count(identify_b);
2666 identify_lu = TofID::getIntID_mrpc(partid_lu,tofid_lu);
2667 count_lu = tofDataMap.count(identify_lu);
2668 identify_lb = TofID::getIntID_mrpc(partid_lb,tofid_lb);
2669 count_lb = tofDataMap.count(identify_lb);
2670 identify_ru = TofID::getIntID_mrpc(partid_ru,tofid_ru);
2671 count_ru = tofDataMap.count(identify_ru);
2672 identify_rb = TofID::getIntID_mrpc(partid_rb,tofid_rb);
2673 count_rb = tofDataMap.count(identify_rb);
2674 }
2675
2676 if((neighborhood==2) || (neighborhood==3)|| (neighborhood==4))
2677 {
2678 identify_luu = TofID::getIntID_mrpc(partid_luu,tofid_luu);
2679 count_luu = tofDataMap.count(identify_luu );
2680 identify_ruu = TofID::getIntID_mrpc(partid_ruu,tofid_ruu);
2681 count_ruu = tofDataMap.count(identify_ruu);
2682 identify_uu = TofID::getIntID_mrpc(partid_uu,tofid_uu);
2683 count_uu = tofDataMap.count(identify_uu);
2684 identify_bb = TofID::getIntID_mrpc(partid_bb,tofid_bb);
2685 count_bb = tofDataMap.count(identify_bb);
2686 identify_lbb = TofID::getIntID_mrpc(partid_lbb,tofid_lbb);
2687 count_lbb = tofDataMap.count(identify_lbb);
2688 identify_rbb = TofID::getIntID_mrpc(partid_rbb,tofid_rbb);
2689 count_rbb = tofDataMap.count(identify_rbb);
2690
2691 }
2692
2693 if((neighborhood==3)|| (neighborhood==4))
2694 {
2695 identify_luuu = TofID::getIntID_mrpc(partid_luuu,tofid_luuu);
2696 count_luuu = tofDataMap.count(identify_luuu );
2697 identify_ruuu = TofID::getIntID_mrpc(partid_ruuu,tofid_ruuu);
2698 count_ruuu = tofDataMap.count(identify_ruuu);
2699 identify_uuu = TofID::getIntID_mrpc(partid_uuu,tofid_uuu);
2700 count_uuu = tofDataMap.count(identify_uuu);
2701 identify_bbb = TofID::getIntID_mrpc(partid_bbb,tofid_bbb);
2702 count_bbb = tofDataMap.count(identify_bbb);
2703 identify_lbbb = TofID::getIntID_mrpc(partid_lbbb,tofid_lbbb);
2704 count_lbbb = tofDataMap.count(identify_lbbb);
2705 identify_rbbb = TofID::getIntID_mrpc(partid_rbbb,tofid_rbbb);
2706 count_rbbb = tofDataMap.count(identify_rbbb);
2707
2708 }
2709
2710
2711 if((neighborhood==4))
2712 {
2713 identify_luuul = TofID::getIntID_mrpc(partid_luuul,tofid_luuul);
2714 count_luuul = tofDataMap.count(identify_luuul );
2715 identify_ruuur = TofID::getIntID_mrpc(partid_ruuur,tofid_ruuur);
2716 count_ruuur = tofDataMap.count(identify_ruuur);
2717 identify_lbbbl = TofID::getIntID_mrpc(partid_lbbbl,tofid_lbbbl);
2718 count_lbbbl = tofDataMap.count(identify_lbbbl);
2719 identify_rbbbr = TofID::getIntID_mrpc(partid_rbbbr,tofid_rbbbr);
2720 count_rbbbr = tofDataMap.count(identify_rbbbr);
2721
2722 identify_luul = TofID::getIntID_mrpc(partid_luul,tofid_luul);
2723 count_luul = tofDataMap.count(identify_luul );
2724 identify_ruur = TofID::getIntID_mrpc(partid_ruur,tofid_ruur);
2725 count_ruur = tofDataMap.count(identify_ruur);
2726 identify_lbbl = TofID::getIntID_mrpc(partid_lbbl,tofid_lbbl);
2727 count_lbbl = tofDataMap.count(identify_lbbl);
2728 identify_rbbr = TofID::getIntID_mrpc(partid_rbbr,tofid_rbbr);
2729 count_rbbr = tofDataMap.count(identify_rbbr);
2730
2731 identify_ll = TofID::getIntID_mrpc(partid_ll,tofid_ll);
2732 count_ll = tofDataMap.count(identify_ll );
2733 identify_rr = TofID::getIntID_mrpc(partid_rr,tofid_rr);
2734 count_rr = tofDataMap.count(identify_rr);
2735 identify_lul = TofID::getIntID_mrpc(partid_lul,tofid_lul);
2736 count_lul = tofDataMap.count(identify_lul);
2737 identify_lbl = TofID::getIntID_mrpc(partid_lbl,tofid_lbl);
2738 count_lbl = tofDataMap.count(identify_lbl);
2739 identify_rur = TofID::getIntID_mrpc(partid_rur,tofid_rur);
2740 count_rur = tofDataMap.count(identify_rur);
2741 identify_rbr = TofID::getIntID_mrpc(partid_rbr,tofid_rbr);
2742 count_rbr = tofDataMap.count(identify_rbr);
2743 }
2744
2745
2746
2747
2748 //if=5
2749 if((neighborhood==5))
2750 {
2751 int strip_number_if5 = BesTofDigitizerEcV4::Get_stripnumber_from_unique_identifier(tofid_it);
2752 int module_number_if5= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(tofid_it);
2753
2754 if((strip_number_if5)%2==0)
2755 {
2756
2757 identify_if5_it=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
2758 identify_if5_m1=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2));
2759 identify_if5_m2=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4));
2760 identify_if5_m3=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6));
2761 identify_if5_m4=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8));
2762 identify_if5_m5=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10));
2763 identify_if5_m6=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12));
2764 identify_if5_m7=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14));
2765 identify_if5_m8=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16));
2766 identify_if5_m9=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18));
2767 identify_if5_m10=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20));
2768 identify_if5_m11=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22));
2769 identify_if5_m12=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24));
2770 count_if5_m1=tofDataMap.count(identify_if5_m1);
2771 count_if5_m2=tofDataMap.count(identify_if5_m2);
2772 count_if5_m3=tofDataMap.count(identify_if5_m3);
2773 count_if5_m4=tofDataMap.count(identify_if5_m4);
2774 count_if5_m5=tofDataMap.count(identify_if5_m5);
2775 count_if5_m6=tofDataMap.count(identify_if5_m6);
2776 count_if5_m7=tofDataMap.count(identify_if5_m7);
2777 count_if5_m8=tofDataMap.count(identify_if5_m8);
2778 count_if5_m9=tofDataMap.count(identify_if5_m9);
2779 count_if5_m10=tofDataMap.count(identify_if5_m10);
2780 count_if5_m11=tofDataMap.count(identify_if5_m11);
2781 count_if5_m12=tofDataMap.count(identify_if5_m12);
2782
2783 int help1 =BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2);
2784 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,5), get_mrpc_stripid_neighbour("l",help1,5));
2785 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4);
2786 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,5), get_mrpc_stripid_neighbour("l",help2,5));
2787 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6);
2788 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,5), get_mrpc_stripid_neighbour("l",help3,5));
2789 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8);
2790 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,5), get_mrpc_stripid_neighbour("l",help4,5));
2791 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10);
2792 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,5), get_mrpc_stripid_neighbour("l",help5,5));
2793 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12);
2794 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,5), get_mrpc_stripid_neighbour("l",help6,5));
2795 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14);
2796 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,5), get_mrpc_stripid_neighbour("l",help7,5));
2797 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16);
2798 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,5), get_mrpc_stripid_neighbour("l",help8,5));
2799 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18);
2800 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,5), get_mrpc_stripid_neighbour("l",help9,5));
2801 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20);
2802 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,5), get_mrpc_stripid_neighbour("l",help10,5));
2803 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22);
2804 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,5), get_mrpc_stripid_neighbour("l",help11,5));
2805 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24);
2806 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,5), get_mrpc_stripid_neighbour("l",help12,5));
2807
2808
2809
2810 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,5), get_mrpc_stripid_neighbour("r",help1,5));
2811 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,5), get_mrpc_stripid_neighbour("r",help2,5));
2812 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,5), get_mrpc_stripid_neighbour("r",help3,5));
2813 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,5), get_mrpc_stripid_neighbour("r",help4,5));
2814 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,5), get_mrpc_stripid_neighbour("r",help5,5));
2815 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,5), get_mrpc_stripid_neighbour("r",help6,5));
2816 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,5), get_mrpc_stripid_neighbour("r",help7,5));
2817 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,5), get_mrpc_stripid_neighbour("r",help8,5));
2818 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,5), get_mrpc_stripid_neighbour("r",help9,5));
2819 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,5), get_mrpc_stripid_neighbour("r",help10,5));
2820 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,5), get_mrpc_stripid_neighbour("r",help11,5));
2821 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,5), get_mrpc_stripid_neighbour("r",help12,5));
2822
2823
2824 count_if5_l1=tofDataMap.count(identify_if5_l1);
2825 count_if5_l2=tofDataMap.count(identify_if5_l2);
2826 count_if5_l3=tofDataMap.count(identify_if5_l3);
2827 count_if5_l4=tofDataMap.count(identify_if5_l4);
2828 count_if5_l5=tofDataMap.count(identify_if5_l5);
2829 count_if5_l6=tofDataMap.count(identify_if5_l6);
2830 count_if5_l7=tofDataMap.count(identify_if5_l7);
2831 count_if5_l8=tofDataMap.count(identify_if5_l8);
2832 count_if5_l9=tofDataMap.count(identify_if5_l9);
2833 count_if5_l10=tofDataMap.count(identify_if5_l10);
2834 count_if5_l11=tofDataMap.count(identify_if5_l11);
2835 count_if5_l12=tofDataMap.count(identify_if5_l12);
2836 count_if5_r1=tofDataMap.count(identify_if5_r1);
2837 count_if5_r2=tofDataMap.count(identify_if5_r2);
2838 count_if5_r3=tofDataMap.count(identify_if5_r3);
2839 count_if5_r4=tofDataMap.count(identify_if5_r4);
2840 count_if5_r5=tofDataMap.count(identify_if5_r5);
2841 count_if5_r6=tofDataMap.count(identify_if5_r6);
2842 count_if5_r7=tofDataMap.count(identify_if5_r7);
2843 count_if5_r8=tofDataMap.count(identify_if5_r8);
2844 count_if5_r9=tofDataMap.count(identify_if5_r9);
2845 count_if5_r10=tofDataMap.count(identify_if5_r10);
2846 count_if5_r11=tofDataMap.count(identify_if5_r11);
2847 count_if5_r12=tofDataMap.count(identify_if5_r12);
2848
2849 }//close if stripnumber
2850 else
2851 {
2852 identify_if5_it=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
2853 identify_if5_m1=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1));
2854 identify_if5_m2=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3));
2855 identify_if5_m3=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5));
2856 identify_if5_m4=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7));
2857 identify_if5_m5=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9));
2858 identify_if5_m6=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11));
2859 identify_if5_m7=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13));
2860 identify_if5_m8=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15));
2861 identify_if5_m9=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17));
2862 identify_if5_m10=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19));
2863 identify_if5_m11=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21));
2864 identify_if5_m12=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23));
2865 count_if5_m1=tofDataMap.count(identify_if5_m1);
2866 count_if5_m2=tofDataMap.count(identify_if5_m2);
2867 count_if5_m3=tofDataMap.count(identify_if5_m3);
2868 count_if5_m4=tofDataMap.count(identify_if5_m4);
2869 count_if5_m5=tofDataMap.count(identify_if5_m5);
2870 count_if5_m6=tofDataMap.count(identify_if5_m6);
2871 count_if5_m7=tofDataMap.count(identify_if5_m7);
2872 count_if5_m8=tofDataMap.count(identify_if5_m8);
2873 count_if5_m9=tofDataMap.count(identify_if5_m9);
2874 count_if5_m10=tofDataMap.count(identify_if5_m10);
2875 count_if5_m11=tofDataMap.count(identify_if5_m11);
2876 count_if5_m12=tofDataMap.count(identify_if5_m12);
2877
2878 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1);
2879 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,5), get_mrpc_stripid_neighbour("l",help1,5));
2880 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3);
2881 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,5), get_mrpc_stripid_neighbour("l",help2,5));
2882 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5);
2883 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,5), get_mrpc_stripid_neighbour("l",help3,5));
2884 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7);
2885 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,5), get_mrpc_stripid_neighbour("l",help4,5));
2886 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9);
2887 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,5), get_mrpc_stripid_neighbour("l",help5,5));
2888 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11);
2889 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,5), get_mrpc_stripid_neighbour("l",help6,5));
2890 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13);
2891 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,5), get_mrpc_stripid_neighbour("l",help7,5));
2892 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15);
2893 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,5), get_mrpc_stripid_neighbour("l",help8,5));
2894 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17);
2895 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,5), get_mrpc_stripid_neighbour("l",help9,5));
2896 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19);
2897 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,5), get_mrpc_stripid_neighbour("l",help10,5));
2898 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21);
2899 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,5), get_mrpc_stripid_neighbour("l",help11,5));
2900 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23);
2901 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,5), get_mrpc_stripid_neighbour("l",help12,5));
2902
2903
2904
2905 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,5), get_mrpc_stripid_neighbour("r",help1,5));
2906 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,5), get_mrpc_stripid_neighbour("r",help2,5));
2907 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,5), get_mrpc_stripid_neighbour("r",help3,5));
2908 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,5), get_mrpc_stripid_neighbour("r",help4,5));
2909 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,5), get_mrpc_stripid_neighbour("r",help5,5));
2910 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,5), get_mrpc_stripid_neighbour("r",help6,5));
2911 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,5), get_mrpc_stripid_neighbour("r",help7,5));
2912 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,5), get_mrpc_stripid_neighbour("r",help8,5));
2913 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,5), get_mrpc_stripid_neighbour("r",help9,5));
2914 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,5), get_mrpc_stripid_neighbour("r",help10,5));
2915 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,5), get_mrpc_stripid_neighbour("r",help11,5));
2916 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,5), get_mrpc_stripid_neighbour("r",help12,5));
2917
2918
2919 count_if5_l1=tofDataMap.count(identify_if5_l1);
2920 count_if5_l2=tofDataMap.count(identify_if5_l2);
2921 count_if5_l3=tofDataMap.count(identify_if5_l3);
2922 count_if5_l4=tofDataMap.count(identify_if5_l4);
2923 count_if5_l5=tofDataMap.count(identify_if5_l5);
2924 count_if5_l6=tofDataMap.count(identify_if5_l6);
2925 count_if5_l7=tofDataMap.count(identify_if5_l7);
2926 count_if5_l8=tofDataMap.count(identify_if5_l8);
2927 count_if5_l9=tofDataMap.count(identify_if5_l9);
2928 count_if5_l10=tofDataMap.count(identify_if5_l10);
2929 count_if5_l11=tofDataMap.count(identify_if5_l11);
2930 count_if5_l12=tofDataMap.count(identify_if5_l12);
2931 count_if5_r1=tofDataMap.count(identify_if5_r1);
2932 count_if5_r2=tofDataMap.count(identify_if5_r2);
2933 count_if5_r3=tofDataMap.count(identify_if5_r3);
2934 count_if5_r4=tofDataMap.count(identify_if5_r4);
2935 count_if5_r5=tofDataMap.count(identify_if5_r5);
2936 count_if5_r6=tofDataMap.count(identify_if5_r6);
2937 count_if5_r7=tofDataMap.count(identify_if5_r7);
2938 count_if5_r8=tofDataMap.count(identify_if5_r8);
2939 count_if5_r9=tofDataMap.count(identify_if5_r9);
2940 count_if5_r10=tofDataMap.count(identify_if5_r10);
2941 count_if5_r11=tofDataMap.count(identify_if5_r11);
2942 count_if5_r12=tofDataMap.count(identify_if5_r12);
2943
2944 }//close else
2945
2946 }//close if neighboorhood=5
2947
2948
2949
2950 if((neighborhood==6))
2951 {
2952
2953 int strip_number_if6 = BesTofDigitizerEcV4::Get_stripnumber_from_unique_identifier(tofid_it);
2954 int module_number_if6= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(tofid_it);
2955
2956 if((strip_number_if6)%2==0)
2957 {
2958 identify_if6_it=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
2959
2960 identify_if6_m1=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2));
2961 identify_if6_m2=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4));
2962 identify_if6_m3=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6));
2963 identify_if6_m4=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8));
2964 identify_if6_m5=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10));
2965 identify_if6_m6=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12));
2966 identify_if6_m7=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14));
2967 identify_if6_m8=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16));
2968 identify_if6_m9=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18));
2969 identify_if6_m10=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20));
2970 identify_if6_m11=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22));
2971 identify_if6_m12=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24));
2972
2973
2974 count_if6_m1=tofDataMap.count(identify_if6_m1);
2975 count_if6_m2=tofDataMap.count(identify_if6_m2);
2976 count_if6_m3=tofDataMap.count(identify_if6_m3);
2977 count_if6_m4=tofDataMap.count(identify_if6_m4);
2978 count_if6_m5=tofDataMap.count(identify_if6_m5);
2979 count_if6_m6=tofDataMap.count(identify_if6_m6);
2980 count_if6_m7=tofDataMap.count(identify_if6_m7);
2981 count_if6_m8=tofDataMap.count(identify_if6_m8);
2982 count_if6_m9=tofDataMap.count(identify_if6_m9);
2983 count_if6_m10=tofDataMap.count(identify_if6_m10);
2984 count_if6_m11=tofDataMap.count(identify_if6_m11);
2985 count_if6_m12=tofDataMap.count(identify_if6_m12);
2986
2987 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2);
2988 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4);
2989 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6);
2990 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8);
2991 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10);
2992 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12);
2993 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14);
2994 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16);
2995 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18);
2996 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20);
2997 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22);
2998 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24);
2999
3000 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,5), get_mrpc_stripid_neighbour("l",help1,5));
3001 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,5), get_mrpc_stripid_neighbour("l",help2,5));
3002 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,5), get_mrpc_stripid_neighbour("l",help3,5));
3003 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,5), get_mrpc_stripid_neighbour("l",help4,5));
3004 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,5), get_mrpc_stripid_neighbour("l",help5,5));
3005 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,5), get_mrpc_stripid_neighbour("l",help6,5));
3006 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,5), get_mrpc_stripid_neighbour("l",help7,5));
3007 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,5), get_mrpc_stripid_neighbour("l",help8,5));
3008 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,5), get_mrpc_stripid_neighbour("l",help9,5));
3009 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,5), get_mrpc_stripid_neighbour("l",help10,5));
3010 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,5), get_mrpc_stripid_neighbour("l",help11,5));
3011 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,5), get_mrpc_stripid_neighbour("l",help12,5));
3012
3013 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,5), get_mrpc_stripid_neighbour("r",help1,5));
3014 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,5), get_mrpc_stripid_neighbour("r",help2,5));
3015 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,5), get_mrpc_stripid_neighbour("r",help3,5));
3016 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,5), get_mrpc_stripid_neighbour("r",help4,5));
3017 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,5), get_mrpc_stripid_neighbour("r",help5,5));
3018 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,5), get_mrpc_stripid_neighbour("r",help6,5));
3019 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,5), get_mrpc_stripid_neighbour("r",help7,5));
3020 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,5), get_mrpc_stripid_neighbour("r",help8,5));
3021 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,5), get_mrpc_stripid_neighbour("r",help9,5));
3022 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,5), get_mrpc_stripid_neighbour("r",help10,5));
3023 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,5), get_mrpc_stripid_neighbour("r",help11,5));
3024 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,5), get_mrpc_stripid_neighbour("r",help12,5));
3025
3026
3027 count_if6_l1=tofDataMap.count(identify_if6_l1);
3028 count_if6_l2=tofDataMap.count(identify_if6_l2);
3029 count_if6_l3=tofDataMap.count(identify_if6_l3);
3030 count_if6_l4=tofDataMap.count(identify_if6_l4);
3031 count_if6_l5=tofDataMap.count(identify_if6_l5);
3032 count_if6_l6=tofDataMap.count(identify_if6_l6);
3033 count_if6_l7=tofDataMap.count(identify_if6_l7);
3034 count_if6_l8=tofDataMap.count(identify_if6_l8);
3035 count_if6_l9=tofDataMap.count(identify_if6_l9);
3036 count_if6_l10=tofDataMap.count(identify_if6_l10);
3037 count_if6_l11=tofDataMap.count(identify_if6_l11);
3038 count_if6_l12=tofDataMap.count(identify_if6_l12);
3039 count_if6_r1=tofDataMap.count(identify_if6_r1);
3040 count_if6_r2=tofDataMap.count(identify_if6_r2);
3041 count_if6_r3=tofDataMap.count(identify_if6_r3);
3042 count_if6_r4=tofDataMap.count(identify_if6_r4);
3043 count_if6_r5=tofDataMap.count(identify_if6_r5);
3044 count_if6_r6=tofDataMap.count(identify_if6_r6);
3045 count_if6_r7=tofDataMap.count(identify_if6_r7);
3046 count_if6_r8=tofDataMap.count(identify_if6_r8);
3047 count_if6_r9=tofDataMap.count(identify_if6_r9);
3048 count_if6_r10=tofDataMap.count(identify_if6_r10);
3049 count_if6_r11=tofDataMap.count(identify_if6_r11);
3050 count_if6_r12=tofDataMap.count(identify_if6_r12);
3051
3052//Now go again one to the left and one to the right!
3053
3054
3055 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,5));//Get the module number!!! from the left module.
3056 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,5);
3057
3058 //We are here within the "even stripid slope": I.e the left and right neighbor are odd in stripid. Hence, use odd number for help13-help36
3059 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,1);
3060 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,3);
3061 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,4);
3062 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,7);
3063 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,9);
3064 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,11);
3065 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,13);
3066 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,15);
3067 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,17);
3068 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,19);
3069 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,21);
3070 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,23);
3071
3072 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
3073 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
3074 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
3075 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
3076 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
3077 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
3078 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
3079 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
3080 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
3081 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
3082 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
3083 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
3084
3085 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,5));//Get the module number!!! from the left module.
3086 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,5);
3087
3088 //We are here within the "even stripid slope": I.e the left and right neighbor are odd in stripid. Hence, use odd number for help13-help36
3089 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,1);
3090 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,3);
3091 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,5);
3092 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,7);
3093 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,9);
3094 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,11);
3095 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,13);
3096 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,15);
3097 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,17);
3098 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,19);
3099 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,21);
3100 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,23);
3101
3102 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
3103 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
3104 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
3105 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
3106 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
3107 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
3108 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
3109 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
3110 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
3111 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
3112 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
3113 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
3114
3115
3116 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
3117 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
3118 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
3119 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
3120 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
3121 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
3122 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
3123 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
3124 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
3125 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
3126 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
3127 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
3128 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
3129 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
3130 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
3131 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
3132 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
3133 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
3134 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
3135 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
3136 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
3137 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
3138 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
3139 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
3140
3141
3142
3143
3144 }//close if stripnumber
3145 else
3146 {
3147 identify_if6_it=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
3148 identify_if6_m1=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1));
3149 identify_if6_m2=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3));
3150 identify_if6_m3=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5));
3151 identify_if6_m4=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7));
3152 identify_if6_m5=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9));
3153 identify_if6_m6=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11));
3154 identify_if6_m7=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13));
3155 identify_if6_m8=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15));
3156 identify_if6_m9=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17));
3157 identify_if6_m10=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19));
3158 identify_if6_m11=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21));
3159 identify_if6_m12=TofID::getIntID_mrpc(5, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23));
3160 count_if6_m1=tofDataMap.count(identify_if6_m1);
3161 count_if6_m2=tofDataMap.count(identify_if6_m2);
3162 count_if6_m3=tofDataMap.count(identify_if6_m3);
3163 count_if6_m4=tofDataMap.count(identify_if6_m4);
3164 count_if6_m5=tofDataMap.count(identify_if6_m5);
3165 count_if6_m6=tofDataMap.count(identify_if6_m6);
3166 count_if6_m7=tofDataMap.count(identify_if6_m7);
3167 count_if6_m8=tofDataMap.count(identify_if6_m8);
3168 count_if6_m9=tofDataMap.count(identify_if6_m9);
3169 count_if6_m10=tofDataMap.count(identify_if6_m10);
3170 count_if6_m11=tofDataMap.count(identify_if6_m11);
3171 count_if6_m12=tofDataMap.count(identify_if6_m12);
3172
3173
3174 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1);
3175 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3);
3176 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5);
3177 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7);
3178 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9);
3179 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11);
3180 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13);
3181 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15);
3182 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17);
3183 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19);
3184 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21);
3185 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23);
3186
3187
3188 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,5), get_mrpc_stripid_neighbour("l",help1,5));
3189 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,5), get_mrpc_stripid_neighbour("l",help2,5));
3190 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,5), get_mrpc_stripid_neighbour("l",help3,5));
3191 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,5), get_mrpc_stripid_neighbour("l",help4,5));
3192 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,5), get_mrpc_stripid_neighbour("l",help5,5));
3193 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,5), get_mrpc_stripid_neighbour("l",help6,5));
3194 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,5), get_mrpc_stripid_neighbour("l",help7,5));
3195 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,5), get_mrpc_stripid_neighbour("l",help8,5));
3196 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,5), get_mrpc_stripid_neighbour("l",help9,5));
3197 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,5), get_mrpc_stripid_neighbour("l",help10,5));
3198 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,5), get_mrpc_stripid_neighbour("l",help11,5));
3199 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,5), get_mrpc_stripid_neighbour("l",help12,5));
3200
3201 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,5), get_mrpc_stripid_neighbour("r",help1,5));
3202 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,5), get_mrpc_stripid_neighbour("r",help2,5));
3203 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,5), get_mrpc_stripid_neighbour("r",help3,5));
3204 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,5), get_mrpc_stripid_neighbour("r",help4,5));
3205 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,5), get_mrpc_stripid_neighbour("r",help5,5));
3206 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,5), get_mrpc_stripid_neighbour("r",help6,5));
3207 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,5), get_mrpc_stripid_neighbour("r",help7,5));
3208 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,5), get_mrpc_stripid_neighbour("r",help8,5));
3209 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,5), get_mrpc_stripid_neighbour("r",help9,5));
3210 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,5), get_mrpc_stripid_neighbour("r",help10,5));
3211 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,5), get_mrpc_stripid_neighbour("r",help11,5));
3212 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,5), get_mrpc_stripid_neighbour("r",help12,5));
3213
3214 count_if6_l1=tofDataMap.count(identify_if6_l1);
3215 count_if6_l2=tofDataMap.count(identify_if6_l2);
3216 count_if6_l3=tofDataMap.count(identify_if6_l3);
3217 count_if6_l4=tofDataMap.count(identify_if6_l4);
3218 count_if6_l5=tofDataMap.count(identify_if6_l5);
3219 count_if6_l6=tofDataMap.count(identify_if6_l6);
3220 count_if6_l7=tofDataMap.count(identify_if6_l7);
3221 count_if6_l8=tofDataMap.count(identify_if6_l8);
3222 count_if6_l9=tofDataMap.count(identify_if6_l9);
3223 count_if6_l10=tofDataMap.count(identify_if6_l10);
3224 count_if6_l11=tofDataMap.count(identify_if6_l11);
3225 count_if6_l12=tofDataMap.count(identify_if6_l12);
3226 count_if6_r1=tofDataMap.count(identify_if6_r1);
3227 count_if6_r2=tofDataMap.count(identify_if6_r2);
3228 count_if6_r3=tofDataMap.count(identify_if6_r3);
3229 count_if6_r4=tofDataMap.count(identify_if6_r4);
3230 count_if6_r5=tofDataMap.count(identify_if6_r5);
3231 count_if6_r6=tofDataMap.count(identify_if6_r6);
3232 count_if6_r7=tofDataMap.count(identify_if6_r7);
3233 count_if6_r8=tofDataMap.count(identify_if6_r8);
3234 count_if6_r9=tofDataMap.count(identify_if6_r9);
3235 count_if6_r10=tofDataMap.count(identify_if6_r10);
3236 count_if6_r11=tofDataMap.count(identify_if6_r11);
3237 count_if6_r12=tofDataMap.count(identify_if6_r12);
3238
3239
3240
3241
3242
3243//Now go again one to the left and one to the right!
3244
3245
3246 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,5));//Get the module number!!! from the left module.
3247 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,5);
3248 //We are here within the "odd stripid slope": I.e the left and right neighbor are even in stripid. Hence, use even number for help13-help36
3249 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,2);
3250 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,4);
3251 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,6);
3252 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,8);
3253 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,10);
3254 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,12);
3255 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,14);
3256 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,16);
3257 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,18);
3258 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,20);
3259 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,22);
3260 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,24);
3261
3262 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
3263 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
3264 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
3265 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
3266 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
3267 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
3268 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
3269 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
3270 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
3271 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
3272 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
3273 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
3274
3275 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,5));//Get the module number!!! from the left module.
3276 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,5);
3277 //We are here within the "odd stripid slope": I.e the left and right neighbor are even in stripid. Hence, use even number for help13-help36
3278 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,2);
3279 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,4);
3280 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,6);
3281 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,8);
3282 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,10);
3283 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,12);
3284 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,14);
3285 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,16);
3286 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,18);
3287 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,20);
3288 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,22);
3289 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,24);
3290
3291 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
3292 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
3293 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
3294 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
3295 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
3296 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
3297 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
3298 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
3299 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
3300 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
3301 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
3302 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
3303
3304 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
3305 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
3306 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
3307 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
3308 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
3309 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
3310 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
3311 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
3312 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
3313 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
3314 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
3315 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
3316 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
3317 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
3318 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
3319 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
3320 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
3321 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
3322 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
3323 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
3324 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
3325 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
3326 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
3327 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
3328
3329
3330
3331 }//close else
3332 }//close if neighboorhood=6
3333
3334
3335
3336 /*std::cout << "MrpcTrack setTofData - partid_it | tofid_it " << "5" << " | " << tofid_it << std::endl;
3337 std::cout << "MrpcTrack setTofData - partid_u | tofid_u " << partid_u << " | " << tofid_u <<std::endl;
3338 std::cout << "MrpcTrack setTofData - partid_b | tofid_b " << partid_b << " | " << tofid_b <<std::endl;
3339 std::cout << "MrpcTrack setTofData - partid_l | tofid_l " << partid_l << " | " << tofid_l <<std::endl;
3340 std::cout << "MrpcTrack setTofData - partid_r | tofid_r " << partid_r << " | " << tofid_r <<std::endl;
3341 std::cout << "MrpcTrack setTofData - partid_lu | tofid_lu " << partid_lu << " | " << tofid_lu <<std::endl;
3342 std::cout << "MrpcTrack setTofData - partid_lb | tofid_lb " << partid_lb << " | " << tofid_lb <<std::endl;
3343 std::cout << "MrpcTrack setTofData - partid_ru | tofid_ru " << partid_ru << " | " << tofid_ru <<std::endl;
3344 std::cout << "MrpcTrack setTofData - partid_rb | tofid_rb " << partid_rb << " | " << tofid_rb <<std::endl;
3345
3346
3347std::cout << "MrpcTrack setTofData - partid_uu | tofid_uu " << partid_uu << " | " << tofid_uu <<std::endl;
3348std::cout << "MrpcTrack setTofData - partid_bb | tofid_bb " << partid_bb << " | " << tofid_bb <<std::endl;
3349std::cout << "MrpcTrack setTofData - partid_rbb | tofid_rbb " << partid_rbb << " | " << tofid_rbb <<std::endl;
3350std::cout << "MrpcTrack setTofData - partid_ruu | tofid_ruu " << partid_ruu << " | " << tofid_ruu <<std::endl;
3351std::cout << "MrpcTrack setTofData - partid_lbb | tofid_lbb " << partid_lbb << " | " << tofid_lbb <<std::endl;
3352std::cout << "MrpcTrack setTofData - partid_luu | tofid_luu " << partid_luu << " | " << tofid_luu <<std::endl;
3353std::cout << "MrpcTrack setTofData - partid_uuu | tofid_uuu " << partid_uuu << " | " << tofid_uuu <<std::endl;
3354std::cout << "MrpcTrack setTofData - partid_bbb | tofid_bbb " << partid_bbb << " | " << tofid_bbb <<std::endl;
3355std::cout << "MrpcTrack setTofData - partid_rbbb | tofid_rbbb " << partid_rbbb << " | " << tofid_rbbb <<std::endl;
3356std::cout << "MrpcTrack setTofData - partid_ruuu | tofid_ruuu " << partid_ruuu << " | " << tofid_ruuu <<std::endl;
3357std::cout << "MrpcTrack setTofData - partid_luuu | tofid_luuu " << partid_luuu << " | " << tofid_luuu <<std::endl;
3358std::cout << "MrpcTrack setTofData - partid_lbbb | tofid_lbbb " << partid_lbbb << " | " << tofid_lbbb <<std::endl;
3359 */
3360
3361 }//close if (m_hitCase)
3362
3363 if((m_hitCase==westendcap_2) && (m_id1 > 25))
3364 {
3365
3366 int tofid_it = m_id1; //This is my stripidentifier
3367 identify_it = TofID::getIntID_mrpc(6,tofid_it); //Get the whole identifier for the MRPC cell
3368 count_it = tofDataMap.count( identify_it );
3369
3370 //Get ID and part ID from neighbours
3371 int tofid_l = get_mrpc_stripid_neighbour("l",tofid_it,6);
3372 int partid_l = get_mrpc_partid_neighbour("l",tofid_it,6);
3373 int tofid_r = get_mrpc_stripid_neighbour("r",tofid_it,6);
3374 int partid_r = get_mrpc_partid_neighbour("r",tofid_it,6);
3375 int tofid_u = get_mrpc_stripid_neighbour("u",tofid_it,6);
3376 int partid_u = get_mrpc_partid_neighbour("u",tofid_it,6);
3377 int tofid_b = get_mrpc_stripid_neighbour("b",tofid_it,6);
3378 int partid_b = get_mrpc_partid_neighbour("b",tofid_it,6);
3379 //Now from neighbours where we need two operation
3380 int tofid_lu = get_mrpc_stripid_neighbour("u",tofid_l,partid_l);
3381 int partid_lu = get_mrpc_partid_neighbour("u",tofid_l,partid_l);
3382 int tofid_lb = get_mrpc_stripid_neighbour("b",tofid_l,partid_l);
3383 int partid_lb = get_mrpc_partid_neighbour("b",tofid_l,partid_l);
3384 int tofid_ru = get_mrpc_stripid_neighbour("u",tofid_r,partid_r);
3385 int partid_ru = get_mrpc_partid_neighbour("u",tofid_r,partid_r);
3386 int tofid_rb = get_mrpc_stripid_neighbour("b",tofid_r,partid_r);
3387 int partid_rb = get_mrpc_partid_neighbour("b",tofid_r,partid_r);
3388
3389 // Now one additional neighbourlayer up and down but not left and right
3390 int tofid_luu = get_mrpc_stripid_neighbour("u",tofid_lu,partid_lu);
3391 int partid_luu = get_mrpc_partid_neighbour("u",tofid_lu,partid_lu);
3392 int tofid_lbb = get_mrpc_stripid_neighbour("b",tofid_lb,partid_lb);
3393 int partid_lbb = get_mrpc_partid_neighbour("b",tofid_lb,partid_lb);
3394 int tofid_ruu = get_mrpc_stripid_neighbour("u",tofid_ru,partid_ru);
3395 int partid_ruu = get_mrpc_partid_neighbour("u",tofid_ru,partid_ru);
3396 int tofid_rbb = get_mrpc_stripid_neighbour("b",tofid_rb,partid_rb);
3397 int partid_rbb = get_mrpc_partid_neighbour("b",tofid_rb,partid_rb);
3398 int tofid_uu = get_mrpc_stripid_neighbour("u",tofid_u,partid_u);
3399 int partid_uu = get_mrpc_partid_neighbour("u",tofid_u,partid_u);
3400 int tofid_bb = get_mrpc_stripid_neighbour("b",tofid_b,partid_b);
3401 int partid_bb = get_mrpc_partid_neighbour("b",tofid_b,partid_b);
3402
3403
3404 // And again an layer up and down!
3405 int tofid_luuu = get_mrpc_stripid_neighbour("u",tofid_luu,partid_luu);
3406 int partid_luuu = get_mrpc_partid_neighbour("u",tofid_luu,partid_luu);
3407 int tofid_lbbb = get_mrpc_stripid_neighbour("b",tofid_lbb,partid_lbb);
3408 int partid_lbbb = get_mrpc_partid_neighbour("b",tofid_lbb,partid_lbb);
3409 int tofid_ruuu = get_mrpc_stripid_neighbour("u",tofid_ruu,partid_ruu);
3410 int partid_ruuu = get_mrpc_partid_neighbour("u",tofid_ruu,partid_ruu);
3411 int tofid_rbbb = get_mrpc_stripid_neighbour("b",tofid_rbb,partid_rbb);
3412 int partid_rbbb = get_mrpc_partid_neighbour("b",tofid_rbb,partid_rbb);
3413 int tofid_uuu = get_mrpc_stripid_neighbour("u",tofid_uu,partid_uu);
3414 int partid_uuu = get_mrpc_partid_neighbour("u",tofid_uu,partid_uu);
3415 int tofid_bbb = get_mrpc_stripid_neighbour("b",tofid_bb,partid_bb);
3416 int partid_bbb = get_mrpc_partid_neighbour("b",tofid_bb,partid_bb);
3417
3418
3419 //And again an layer to the left and to the right
3420 int tofid_luuul = get_mrpc_stripid_neighbour("l",tofid_luuu,partid_luuu);
3421 int partid_luuul = get_mrpc_partid_neighbour("l",tofid_luuu,partid_luuu);
3422 int tofid_lbbbl = get_mrpc_stripid_neighbour("l",tofid_lbbb,partid_lbbb);
3423 int partid_lbbbl = get_mrpc_partid_neighbour("l",tofid_lbbb,partid_lbbb);
3424 int tofid_ruuur = get_mrpc_stripid_neighbour("r",tofid_ruuu,partid_ruuu);
3425 int partid_ruuur = get_mrpc_partid_neighbour("r",tofid_ruuu,partid_ruuu);
3426 int tofid_rbbbr = get_mrpc_stripid_neighbour("r",tofid_rbbb,partid_rbbb);
3427 int partid_rbbbr = get_mrpc_partid_neighbour("r",tofid_rbbb,partid_rbbb);
3428 int tofid_luul = get_mrpc_stripid_neighbour("l",tofid_luu,partid_luu);
3429 int partid_luul = get_mrpc_partid_neighbour("l",tofid_luu,partid_luu);
3430 int tofid_lbbl = get_mrpc_stripid_neighbour("l",tofid_lbb,partid_lbb);
3431 int partid_lbbl = get_mrpc_partid_neighbour("l",tofid_lbb,partid_lbb);
3432 int tofid_ruur = get_mrpc_stripid_neighbour("r",tofid_ruu,partid_ruu);
3433 int partid_ruur = get_mrpc_partid_neighbour("r",tofid_ruu,partid_ruu);
3434 int tofid_rbbr = get_mrpc_stripid_neighbour("r",tofid_rbb,partid_rbb);
3435 int partid_rbbr = get_mrpc_partid_neighbour("r",tofid_rbb,partid_rbb);
3436 int tofid_lul = get_mrpc_stripid_neighbour("l",tofid_lu,partid_lu);
3437 int partid_lul = get_mrpc_partid_neighbour("l",tofid_lu,partid_lu);
3438 int tofid_lbl = get_mrpc_stripid_neighbour("l",tofid_lb,partid_lb);
3439 int partid_lbl = get_mrpc_partid_neighbour("l",tofid_lb,partid_lb);
3440 int tofid_rur = get_mrpc_stripid_neighbour("r",tofid_ru,partid_ru);
3441 int partid_rur = get_mrpc_partid_neighbour("r",tofid_ru,partid_ru);
3442 int tofid_rbr = get_mrpc_stripid_neighbour("r",tofid_rb,partid_rb);
3443 int partid_rbr = get_mrpc_partid_neighbour("r",tofid_rb,partid_rb);
3444 int tofid_ll = get_mrpc_stripid_neighbour("l",tofid_l,partid_l);
3445 int partid_ll = get_mrpc_partid_neighbour("l",tofid_l,partid_l);
3446 int tofid_rr = get_mrpc_stripid_neighbour("r",tofid_r,partid_r);
3447 int partid_rr = get_mrpc_partid_neighbour("r",tofid_r,partid_r);
3448
3449
3450
3451 //Get the identifier and search the datamap for those identifier
3452 if( (neighborhood==1) || (neighborhood==2) || (neighborhood==3) || (neighborhood==4) )
3453 {
3454 identify_l = TofID::getIntID_mrpc(partid_l,tofid_l);
3455 count_l = tofDataMap.count(identify_l );
3456 identify_r = TofID::getIntID_mrpc(partid_r,tofid_r);
3457 count_r = tofDataMap.count(identify_r);
3458 identify_u = TofID::getIntID_mrpc(partid_u,tofid_u);
3459 count_u = tofDataMap.count(identify_u);
3460 identify_b = TofID::getIntID_mrpc(partid_b,tofid_b);
3461 count_b = tofDataMap.count(identify_b);
3462 identify_lu = TofID::getIntID_mrpc(partid_lu,tofid_lu);
3463 count_lu = tofDataMap.count(identify_lu);
3464 identify_lb = TofID::getIntID_mrpc(partid_lb,tofid_lb);
3465 count_lb = tofDataMap.count(identify_lb);
3466 identify_ru = TofID::getIntID_mrpc(partid_ru,tofid_ru);
3467 count_ru = tofDataMap.count(identify_ru);
3468 identify_rb = TofID::getIntID_mrpc(partid_rb,tofid_rb);
3469 count_rb = tofDataMap.count(identify_rb);
3470 }
3471
3472 if((neighborhood==2) || (neighborhood==3)|| (neighborhood==4))
3473 {
3474 identify_luu = TofID::getIntID_mrpc(partid_luu,tofid_luu);
3475 count_luu = tofDataMap.count(identify_luu );
3476 identify_ruu = TofID::getIntID_mrpc(partid_ruu,tofid_ruu);
3477 count_ruu = tofDataMap.count(identify_ruu);
3478 identify_uu = TofID::getIntID_mrpc(partid_uu,tofid_uu);
3479 count_uu = tofDataMap.count(identify_uu);
3480 identify_bb = TofID::getIntID_mrpc(partid_bb,tofid_bb);
3481 count_bb = tofDataMap.count(identify_bb);
3482 identify_lbb = TofID::getIntID_mrpc(partid_lbb,tofid_lbb);
3483 count_lbb = tofDataMap.count(identify_lbb);
3484 identify_rbb = TofID::getIntID_mrpc(partid_rbb,tofid_rbb);
3485 count_rbb = tofDataMap.count(identify_rbb);
3486
3487 }
3488
3489
3490 if((neighborhood==3)|| (neighborhood==4))
3491 {
3492 identify_luuu = TofID::getIntID_mrpc(partid_luuu,tofid_luuu);
3493 count_luuu = tofDataMap.count(identify_luuu );
3494 identify_ruuu = TofID::getIntID_mrpc(partid_ruuu,tofid_ruuu);
3495 count_ruuu = tofDataMap.count(identify_ruuu);
3496 identify_uuu = TofID::getIntID_mrpc(partid_uuu,tofid_uuu);
3497 count_uuu = tofDataMap.count(identify_uuu);
3498 identify_bbb = TofID::getIntID_mrpc(partid_bbb,tofid_bbb);
3499 count_bbb = tofDataMap.count(identify_bbb);
3500 identify_lbbb = TofID::getIntID_mrpc(partid_lbbb,tofid_lbbb);
3501 count_lbbb = tofDataMap.count(identify_lbbb);
3502 identify_rbbb = TofID::getIntID_mrpc(partid_rbbb,tofid_rbbb);
3503 count_rbbb = tofDataMap.count(identify_rbbb);
3504
3505 }
3506
3507
3508 if((neighborhood==4))
3509 {
3510 identify_luuul = TofID::getIntID_mrpc(partid_luuul,tofid_luuul);
3511 count_luuul = tofDataMap.count(identify_luuul );
3512 identify_ruuur = TofID::getIntID_mrpc(partid_ruuur,tofid_ruuur);
3513 count_ruuur = tofDataMap.count(identify_ruuur);
3514 identify_lbbbl = TofID::getIntID_mrpc(partid_lbbbl,tofid_lbbbl);
3515 count_lbbbl = tofDataMap.count(identify_lbbbl);
3516 identify_rbbbr = TofID::getIntID_mrpc(partid_rbbbr,tofid_rbbbr);
3517 count_rbbbr = tofDataMap.count(identify_rbbbr);
3518
3519 identify_luul = TofID::getIntID_mrpc(partid_luul,tofid_luul);
3520 count_luul = tofDataMap.count(identify_luul );
3521 identify_ruur = TofID::getIntID_mrpc(partid_ruur,tofid_ruur);
3522 count_ruur = tofDataMap.count(identify_ruur);
3523 identify_lbbl = TofID::getIntID_mrpc(partid_lbbl,tofid_lbbl);
3524 count_lbbl = tofDataMap.count(identify_lbbl);
3525 identify_rbbr = TofID::getIntID_mrpc(partid_rbbr,tofid_rbbr);
3526 count_rbbr = tofDataMap.count(identify_rbbr);
3527
3528 identify_ll = TofID::getIntID_mrpc(partid_ll,tofid_ll);
3529 count_ll = tofDataMap.count(identify_ll );
3530 identify_rr = TofID::getIntID_mrpc(partid_rr,tofid_rr);
3531 count_rr = tofDataMap.count(identify_rr);
3532 identify_lul = TofID::getIntID_mrpc(partid_lul,tofid_lul);
3533 count_lul = tofDataMap.count(identify_lul);
3534 identify_lbl = TofID::getIntID_mrpc(partid_lbl,tofid_lbl);
3535 count_lbl = tofDataMap.count(identify_lbl);
3536 identify_rur = TofID::getIntID_mrpc(partid_rur,tofid_rur);
3537 count_rur = tofDataMap.count(identify_rur);
3538 identify_rbr = TofID::getIntID_mrpc(partid_rbr,tofid_rbr);
3539 count_rbr = tofDataMap.count(identify_rbr);
3540 }
3541
3542
3543
3544
3545 //if=5
3546 if((neighborhood==5))
3547 {
3548 int strip_number_if5 = BesTofDigitizerEcV4::Get_stripnumber_from_unique_identifier(tofid_it);
3549 int module_number_if5= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(tofid_it);
3550
3551 if((strip_number_if5)%2==0)
3552 {
3553 identify_if5_it=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
3554 identify_if5_m1=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2));
3555 identify_if5_m2=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4));
3556 identify_if5_m3=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6));
3557 identify_if5_m4=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8));
3558 identify_if5_m5=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10));
3559 identify_if5_m6=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12));
3560 identify_if5_m7=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14));
3561 identify_if5_m8=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16));
3562 identify_if5_m9=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18));
3563 identify_if5_m10=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20));
3564 identify_if5_m11=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22));
3565 identify_if5_m12=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24));
3566 count_if5_m1=tofDataMap.count(identify_if5_m1);
3567 count_if5_m2=tofDataMap.count(identify_if5_m2);
3568 count_if5_m3=tofDataMap.count(identify_if5_m3);
3569 count_if5_m4=tofDataMap.count(identify_if5_m4);
3570 count_if5_m5=tofDataMap.count(identify_if5_m5);
3571 count_if5_m6=tofDataMap.count(identify_if5_m6);
3572 count_if5_m7=tofDataMap.count(identify_if5_m7);
3573 count_if5_m8=tofDataMap.count(identify_if5_m8);
3574 count_if5_m9=tofDataMap.count(identify_if5_m9);
3575 count_if5_m10=tofDataMap.count(identify_if5_m10);
3576 count_if5_m11=tofDataMap.count(identify_if5_m11);
3577 count_if5_m12=tofDataMap.count(identify_if5_m12);
3578
3579 int help1 =BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,2);
3580 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,6), get_mrpc_stripid_neighbour("l",help1,6));
3581 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,4);
3582 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,6), get_mrpc_stripid_neighbour("l",help2,6));
3583 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,6);
3584 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,6), get_mrpc_stripid_neighbour("l",help3,6));
3585 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,8);
3586 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,6), get_mrpc_stripid_neighbour("l",help4,6));
3587 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,10);
3588 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,6), get_mrpc_stripid_neighbour("l",help5,6));
3589 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,12);
3590 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,6), get_mrpc_stripid_neighbour("l",help6,6));
3591 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,14);
3592 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,6), get_mrpc_stripid_neighbour("l",help7,6));
3593 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,16);
3594 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,6), get_mrpc_stripid_neighbour("l",help8,6));
3595 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,18);
3596 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,6), get_mrpc_stripid_neighbour("l",help9,6));
3597 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,20);
3598 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,6), get_mrpc_stripid_neighbour("l",help10,6));
3599 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,22);
3600 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,6), get_mrpc_stripid_neighbour("l",help11,6));
3601 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,24);
3602 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,6), get_mrpc_stripid_neighbour("l",help12,6));
3603
3604
3605
3606 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,6), get_mrpc_stripid_neighbour("r",help1,6));
3607 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,6), get_mrpc_stripid_neighbour("r",help2,6));
3608 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,6), get_mrpc_stripid_neighbour("r",help3,6));
3609 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,6), get_mrpc_stripid_neighbour("r",help4,6));
3610 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,6), get_mrpc_stripid_neighbour("r",help5,6));
3611 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,6), get_mrpc_stripid_neighbour("r",help6,6));
3612 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,6), get_mrpc_stripid_neighbour("r",help7,6));
3613 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,6), get_mrpc_stripid_neighbour("r",help8,6));
3614 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,6), get_mrpc_stripid_neighbour("r",help9,6));
3615 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,6), get_mrpc_stripid_neighbour("r",help10,6));
3616 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,6), get_mrpc_stripid_neighbour("r",help11,6));
3617 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,6), get_mrpc_stripid_neighbour("r",help12,6));
3618
3619
3620 count_if5_l1=tofDataMap.count(identify_if5_l1);
3621 count_if5_l2=tofDataMap.count(identify_if5_l2);
3622 count_if5_l3=tofDataMap.count(identify_if5_l3);
3623 count_if5_l4=tofDataMap.count(identify_if5_l4);
3624 count_if5_l5=tofDataMap.count(identify_if5_l5);
3625 count_if5_l6=tofDataMap.count(identify_if5_l6);
3626 count_if5_l7=tofDataMap.count(identify_if5_l7);
3627 count_if5_l8=tofDataMap.count(identify_if5_l8);
3628 count_if5_l9=tofDataMap.count(identify_if5_l9);
3629 count_if5_l10=tofDataMap.count(identify_if5_l10);
3630 count_if5_l11=tofDataMap.count(identify_if5_l11);
3631 count_if5_l12=tofDataMap.count(identify_if5_l12);
3632 count_if5_r1=tofDataMap.count(identify_if5_r1);
3633 count_if5_r2=tofDataMap.count(identify_if5_r2);
3634 count_if5_r3=tofDataMap.count(identify_if5_r3);
3635 count_if5_r4=tofDataMap.count(identify_if5_r4);
3636 count_if5_r5=tofDataMap.count(identify_if5_r5);
3637 count_if5_r6=tofDataMap.count(identify_if5_r6);
3638 count_if5_r7=tofDataMap.count(identify_if5_r7);
3639 count_if5_r8=tofDataMap.count(identify_if5_r8);
3640 count_if5_r9=tofDataMap.count(identify_if5_r9);
3641 count_if5_r10=tofDataMap.count(identify_if5_r10);
3642 count_if5_r11=tofDataMap.count(identify_if5_r11);
3643 count_if5_r12=tofDataMap.count(identify_if5_r12);
3644
3645
3646 }//close if stripnumber
3647 else
3648 {
3649 identify_if5_it=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,strip_number_if5));
3650 identify_if5_m1=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1));
3651 identify_if5_m2=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3));
3652 identify_if5_m3=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5));
3653 identify_if5_m4=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7));
3654 identify_if5_m5=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9));
3655 identify_if5_m6=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11));
3656 identify_if5_m7=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13));
3657 identify_if5_m8=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15));
3658 identify_if5_m9=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17));
3659 identify_if5_m10=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19));
3660 identify_if5_m11=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21));
3661 identify_if5_m12=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23));
3662 count_if5_m1=tofDataMap.count(identify_if5_m1);
3663 count_if5_m2=tofDataMap.count(identify_if5_m2);
3664 count_if5_m3=tofDataMap.count(identify_if5_m3);
3665 count_if5_m4=tofDataMap.count(identify_if5_m4);
3666 count_if5_m5=tofDataMap.count(identify_if5_m5);
3667 count_if5_m6=tofDataMap.count(identify_if5_m6);
3668 count_if5_m7=tofDataMap.count(identify_if5_m7);
3669 count_if5_m8=tofDataMap.count(identify_if5_m8);
3670 count_if5_m9=tofDataMap.count(identify_if5_m9);
3671 count_if5_m10=tofDataMap.count(identify_if5_m10);
3672 count_if5_m11=tofDataMap.count(identify_if5_m11);
3673 count_if5_m12=tofDataMap.count(identify_if5_m12);
3674
3675 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,1);
3676 identify_if5_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,6), get_mrpc_stripid_neighbour("l",help1,6));
3677 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,3);
3678 identify_if5_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,6), get_mrpc_stripid_neighbour("l",help2,6));
3679 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,5);
3680 identify_if5_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,6), get_mrpc_stripid_neighbour("l",help3,6));
3681 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,7);
3682 identify_if5_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,6), get_mrpc_stripid_neighbour("l",help4,6));
3683 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,9);
3684 identify_if5_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,6), get_mrpc_stripid_neighbour("l",help5,6));
3685 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,11);
3686 identify_if5_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,6), get_mrpc_stripid_neighbour("l",help6,6));
3687 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,13);
3688 identify_if5_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,6), get_mrpc_stripid_neighbour("l",help7,6));
3689 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,15);
3690 identify_if5_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,6), get_mrpc_stripid_neighbour("l",help8,6));
3691 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,17);
3692 identify_if5_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,6), get_mrpc_stripid_neighbour("l",help9,6));
3693 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,19);
3694 identify_if5_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,6), get_mrpc_stripid_neighbour("l",help10,6));
3695 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,21);
3696 identify_if5_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,6), get_mrpc_stripid_neighbour("l",help11,6));
3697 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if5,23);
3698 identify_if5_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,6), get_mrpc_stripid_neighbour("l",help12,6));
3699
3700
3701
3702 identify_if5_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,6), get_mrpc_stripid_neighbour("r",help1,6));
3703 identify_if5_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,6), get_mrpc_stripid_neighbour("r",help2,6));
3704 identify_if5_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,6), get_mrpc_stripid_neighbour("r",help3,6));
3705 identify_if5_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,6), get_mrpc_stripid_neighbour("r",help4,6));
3706 identify_if5_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,6), get_mrpc_stripid_neighbour("r",help5,6));
3707 identify_if5_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,6), get_mrpc_stripid_neighbour("r",help6,6));
3708 identify_if5_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,6), get_mrpc_stripid_neighbour("r",help7,6));
3709 identify_if5_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,6), get_mrpc_stripid_neighbour("r",help8,6));
3710 identify_if5_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,6), get_mrpc_stripid_neighbour("r",help9,6));
3711 identify_if5_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,6), get_mrpc_stripid_neighbour("r",help10,6));
3712 identify_if5_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,6), get_mrpc_stripid_neighbour("r",help11,6));
3713 identify_if5_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,6), get_mrpc_stripid_neighbour("r",help12,6));
3714
3715
3716 count_if5_l1=tofDataMap.count(identify_if5_l1);
3717 count_if5_l2=tofDataMap.count(identify_if5_l2);
3718 count_if5_l3=tofDataMap.count(identify_if5_l3);
3719 count_if5_l4=tofDataMap.count(identify_if5_l4);
3720 count_if5_l5=tofDataMap.count(identify_if5_l5);
3721 count_if5_l6=tofDataMap.count(identify_if5_l6);
3722 count_if5_l7=tofDataMap.count(identify_if5_l7);
3723 count_if5_l8=tofDataMap.count(identify_if5_l8);
3724 count_if5_l9=tofDataMap.count(identify_if5_l9);
3725 count_if5_l10=tofDataMap.count(identify_if5_l10);
3726 count_if5_l11=tofDataMap.count(identify_if5_l11);
3727 count_if5_l12=tofDataMap.count(identify_if5_l12);
3728 count_if5_r1=tofDataMap.count(identify_if5_r1);
3729 count_if5_r2=tofDataMap.count(identify_if5_r2);
3730 count_if5_r3=tofDataMap.count(identify_if5_r3);
3731 count_if5_r4=tofDataMap.count(identify_if5_r4);
3732 count_if5_r5=tofDataMap.count(identify_if5_r5);
3733 count_if5_r6=tofDataMap.count(identify_if5_r6);
3734 count_if5_r7=tofDataMap.count(identify_if5_r7);
3735 count_if5_r8=tofDataMap.count(identify_if5_r8);
3736 count_if5_r9=tofDataMap.count(identify_if5_r9);
3737 count_if5_r10=tofDataMap.count(identify_if5_r10);
3738 count_if5_r11=tofDataMap.count(identify_if5_r11);
3739 count_if5_r12=tofDataMap.count(identify_if5_r12);
3740
3741
3742 }//close else
3743
3744 }//close if neighboorhood=5
3745
3746
3747
3748
3749
3750 if((neighborhood==6))
3751 {
3752
3753 int strip_number_if6 = BesTofDigitizerEcV4::Get_stripnumber_from_unique_identifier(tofid_it);
3754 int module_number_if6= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(tofid_it);
3755
3756 if((strip_number_if6)%2==0)
3757 {
3758 identify_if6_it=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
3759
3760 identify_if6_m1=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2));
3761 identify_if6_m2=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4));
3762 identify_if6_m3=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6));
3763 identify_if6_m4=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8));
3764 identify_if6_m5=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10));
3765 identify_if6_m6=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12));
3766 identify_if6_m7=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14));
3767 identify_if6_m8=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16));
3768 identify_if6_m9=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18));
3769 identify_if6_m10=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20));
3770 identify_if6_m11=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22));
3771 identify_if6_m12=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24));
3772
3773
3774 count_if6_m1=tofDataMap.count(identify_if6_m1);
3775 count_if6_m2=tofDataMap.count(identify_if6_m2);
3776 count_if6_m3=tofDataMap.count(identify_if6_m3);
3777 count_if6_m4=tofDataMap.count(identify_if6_m4);
3778 count_if6_m5=tofDataMap.count(identify_if6_m5);
3779 count_if6_m6=tofDataMap.count(identify_if6_m6);
3780 count_if6_m7=tofDataMap.count(identify_if6_m7);
3781 count_if6_m8=tofDataMap.count(identify_if6_m8);
3782 count_if6_m9=tofDataMap.count(identify_if6_m9);
3783 count_if6_m10=tofDataMap.count(identify_if6_m10);
3784 count_if6_m11=tofDataMap.count(identify_if6_m11);
3785 count_if6_m12=tofDataMap.count(identify_if6_m12);
3786
3787 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,2);
3788 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,4);
3789 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,6);
3790 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,8);
3791 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,10);
3792 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,12);
3793 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,14);
3794 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,16);
3795 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,18);
3796 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,20);
3797 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,22);
3798 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,24);
3799
3800 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,6), get_mrpc_stripid_neighbour("l",help1,6));
3801 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,6), get_mrpc_stripid_neighbour("l",help2,6));
3802 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,6), get_mrpc_stripid_neighbour("l",help3,6));
3803 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,6), get_mrpc_stripid_neighbour("l",help4,6));
3804 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,6), get_mrpc_stripid_neighbour("l",help5,6));
3805 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,6), get_mrpc_stripid_neighbour("l",help6,6));
3806 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,6), get_mrpc_stripid_neighbour("l",help7,6));
3807 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,6), get_mrpc_stripid_neighbour("l",help8,6));
3808 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,6), get_mrpc_stripid_neighbour("l",help9,6));
3809 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,6), get_mrpc_stripid_neighbour("l",help10,6));
3810 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,6), get_mrpc_stripid_neighbour("l",help11,6));
3811 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,6), get_mrpc_stripid_neighbour("l",help12,6));
3812
3813 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,6), get_mrpc_stripid_neighbour("r",help1,6));
3814 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,6), get_mrpc_stripid_neighbour("r",help2,6));
3815 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,6), get_mrpc_stripid_neighbour("r",help3,6));
3816 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,6), get_mrpc_stripid_neighbour("r",help4,6));
3817 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,6), get_mrpc_stripid_neighbour("r",help5,6));
3818 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,6), get_mrpc_stripid_neighbour("r",help6,6));
3819 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,6), get_mrpc_stripid_neighbour("r",help7,6));
3820 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,6), get_mrpc_stripid_neighbour("r",help8,6));
3821 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,6), get_mrpc_stripid_neighbour("r",help9,6));
3822 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,6), get_mrpc_stripid_neighbour("r",help10,6));
3823 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,6), get_mrpc_stripid_neighbour("r",help11,6));
3824 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,6), get_mrpc_stripid_neighbour("r",help12,6));
3825
3826
3827 count_if6_l1=tofDataMap.count(identify_if6_l1);
3828 count_if6_l2=tofDataMap.count(identify_if6_l2);
3829 count_if6_l3=tofDataMap.count(identify_if6_l3);
3830 count_if6_l4=tofDataMap.count(identify_if6_l4);
3831 count_if6_l5=tofDataMap.count(identify_if6_l5);
3832 count_if6_l6=tofDataMap.count(identify_if6_l6);
3833 count_if6_l7=tofDataMap.count(identify_if6_l7);
3834 count_if6_l8=tofDataMap.count(identify_if6_l8);
3835 count_if6_l9=tofDataMap.count(identify_if6_l9);
3836 count_if6_l10=tofDataMap.count(identify_if6_l10);
3837 count_if6_l11=tofDataMap.count(identify_if6_l11);
3838 count_if6_l12=tofDataMap.count(identify_if6_l12);
3839 count_if6_r1=tofDataMap.count(identify_if6_r1);
3840 count_if6_r2=tofDataMap.count(identify_if6_r2);
3841 count_if6_r3=tofDataMap.count(identify_if6_r3);
3842 count_if6_r4=tofDataMap.count(identify_if6_r4);
3843 count_if6_r5=tofDataMap.count(identify_if6_r5);
3844 count_if6_r6=tofDataMap.count(identify_if6_r6);
3845 count_if6_r7=tofDataMap.count(identify_if6_r7);
3846 count_if6_r8=tofDataMap.count(identify_if6_r8);
3847 count_if6_r9=tofDataMap.count(identify_if6_r9);
3848 count_if6_r10=tofDataMap.count(identify_if6_r10);
3849 count_if6_r11=tofDataMap.count(identify_if6_r11);
3850 count_if6_r12=tofDataMap.count(identify_if6_r12);
3851
3852//Now go again one to the left and one to the right!
3853
3854
3855 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,6));//Get the module number!!! from the left module.
3856 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,6);
3857 //We are here within the "even stripid slope": I.e the left and right neighbor are odd in stripid. Hence, use odd number for help13-help36
3858 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,1);
3859 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,3);
3860 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,5);
3861 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,7);
3862 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,9);
3863 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,11);
3864 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,13);
3865 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,15);
3866 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,17);
3867 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,19);
3868 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,21);
3869 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,23);
3870
3871 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
3872 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
3873 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
3874 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
3875 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
3876 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
3877 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
3878 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
3879 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
3880 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
3881 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
3882 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
3883
3884 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,6));//Get the module number!!! from the left module.
3885 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,6);
3886 //We are here within the "even stripid slope": I.e the left and right neighbor are odd in stripid. Hence, use odd number for help13-help36
3887 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,1);
3888 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,3);
3889 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,5);
3890 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,7);
3891 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,9);
3892 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,11);
3893 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,13);
3894 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,15);
3895 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,17);
3896 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,19);
3897 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,21);
3898 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,23);
3899
3900 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
3901 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
3902 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
3903 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
3904 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
3905 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
3906 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
3907 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
3908 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
3909 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
3910 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
3911 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
3912
3913
3914 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
3915 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
3916 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
3917 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
3918 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
3919 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
3920 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
3921 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
3922 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
3923 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
3924 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
3925 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
3926 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
3927 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
3928 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
3929 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
3930 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
3931 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
3932 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
3933 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
3934 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
3935 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
3936 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
3937 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
3938
3939
3940
3941
3942 }//close if stripnumber
3943 else
3944 {
3945 identify_if6_it=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,strip_number_if6));
3946 identify_if6_m1=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1));
3947 identify_if6_m2=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3));
3948 identify_if6_m3=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5));
3949 identify_if6_m4=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7));
3950 identify_if6_m5=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9));
3951 identify_if6_m6=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11));
3952 identify_if6_m7=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13));
3953 identify_if6_m8=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15));
3954 identify_if6_m9=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17));
3955 identify_if6_m10=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19));
3956 identify_if6_m11=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21));
3957 identify_if6_m12=TofID::getIntID_mrpc(6, BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23));
3958 count_if6_m1=tofDataMap.count(identify_if6_m1);
3959 count_if6_m2=tofDataMap.count(identify_if6_m2);
3960 count_if6_m3=tofDataMap.count(identify_if6_m3);
3961 count_if6_m4=tofDataMap.count(identify_if6_m4);
3962 count_if6_m5=tofDataMap.count(identify_if6_m5);
3963 count_if6_m6=tofDataMap.count(identify_if6_m6);
3964 count_if6_m7=tofDataMap.count(identify_if6_m7);
3965 count_if6_m8=tofDataMap.count(identify_if6_m8);
3966 count_if6_m9=tofDataMap.count(identify_if6_m9);
3967 count_if6_m10=tofDataMap.count(identify_if6_m10);
3968 count_if6_m11=tofDataMap.count(identify_if6_m11);
3969 count_if6_m12=tofDataMap.count(identify_if6_m12);
3970
3971
3972 int help1 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,1);
3973 int help2 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,3);
3974 int help3 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,5);
3975 int help4 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,7);
3976 int help5 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,9);
3977 int help6 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,11);
3978 int help7 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,13);
3979 int help8 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,15);
3980 int help9 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,17);
3981 int help10 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,19);
3982 int help11 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,21);
3983 int help12 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6,23);
3984
3985
3986 identify_if6_l1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help1,6), get_mrpc_stripid_neighbour("l",help1,6));
3987 identify_if6_l2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help2,6), get_mrpc_stripid_neighbour("l",help2,6));
3988 identify_if6_l3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help3,6), get_mrpc_stripid_neighbour("l",help3,6));
3989 identify_if6_l4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help4,6), get_mrpc_stripid_neighbour("l",help4,6));
3990 identify_if6_l5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help5,6), get_mrpc_stripid_neighbour("l",help5,6));
3991 identify_if6_l6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help6,6), get_mrpc_stripid_neighbour("l",help6,6));
3992 identify_if6_l7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help7,6), get_mrpc_stripid_neighbour("l",help7,6));
3993 identify_if6_l8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help8,6), get_mrpc_stripid_neighbour("l",help8,6));
3994 identify_if6_l9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help9,6), get_mrpc_stripid_neighbour("l",help9,6));
3995 identify_if6_l10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help10,6), get_mrpc_stripid_neighbour("l",help10,6));
3996 identify_if6_l11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help11,6), get_mrpc_stripid_neighbour("l",help11,6));
3997 identify_if6_l12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help12,6), get_mrpc_stripid_neighbour("l",help12,6));
3998
3999 identify_if6_r1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help1,6), get_mrpc_stripid_neighbour("r",help1,6));
4000 identify_if6_r2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help2,6), get_mrpc_stripid_neighbour("r",help2,6));
4001 identify_if6_r3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help3,6), get_mrpc_stripid_neighbour("r",help3,6));
4002 identify_if6_r4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help4,6), get_mrpc_stripid_neighbour("r",help4,6));
4003 identify_if6_r5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help5,6), get_mrpc_stripid_neighbour("r",help5,6));
4004 identify_if6_r6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help6,6), get_mrpc_stripid_neighbour("r",help6,6));
4005 identify_if6_r7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help7,6), get_mrpc_stripid_neighbour("r",help7,6));
4006 identify_if6_r8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help8,6), get_mrpc_stripid_neighbour("r",help8,6));
4007 identify_if6_r9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help9,6), get_mrpc_stripid_neighbour("r",help9,6));
4008 identify_if6_r10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help10,6), get_mrpc_stripid_neighbour("r",help10,6));
4009 identify_if6_r11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help11,6), get_mrpc_stripid_neighbour("r",help11,6));
4010 identify_if6_r12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help12,6), get_mrpc_stripid_neighbour("r",help12,6));
4011
4012 count_if6_l1=tofDataMap.count(identify_if6_l1);
4013 count_if6_l2=tofDataMap.count(identify_if6_l2);
4014 count_if6_l3=tofDataMap.count(identify_if6_l3);
4015 count_if6_l4=tofDataMap.count(identify_if6_l4);
4016 count_if6_l5=tofDataMap.count(identify_if6_l5);
4017 count_if6_l6=tofDataMap.count(identify_if6_l6);
4018 count_if6_l7=tofDataMap.count(identify_if6_l7);
4019 count_if6_l8=tofDataMap.count(identify_if6_l8);
4020 count_if6_l9=tofDataMap.count(identify_if6_l9);
4021 count_if6_l10=tofDataMap.count(identify_if6_l10);
4022 count_if6_l11=tofDataMap.count(identify_if6_l11);
4023 count_if6_l12=tofDataMap.count(identify_if6_l12);
4024 count_if6_r1=tofDataMap.count(identify_if6_r1);
4025 count_if6_r2=tofDataMap.count(identify_if6_r2);
4026 count_if6_r3=tofDataMap.count(identify_if6_r3);
4027 count_if6_r4=tofDataMap.count(identify_if6_r4);
4028 count_if6_r5=tofDataMap.count(identify_if6_r5);
4029 count_if6_r6=tofDataMap.count(identify_if6_r6);
4030 count_if6_r7=tofDataMap.count(identify_if6_r7);
4031 count_if6_r8=tofDataMap.count(identify_if6_r8);
4032 count_if6_r9=tofDataMap.count(identify_if6_r9);
4033 count_if6_r10=tofDataMap.count(identify_if6_r10);
4034 count_if6_r11=tofDataMap.count(identify_if6_r11);
4035 count_if6_r12=tofDataMap.count(identify_if6_r12);
4036
4037
4038
4039
4040
4041//Now go again one to the left and one to the right!
4042
4043
4044 int module_number_if6_l= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("l",help1,6));//Get the module number!!! from the left module.
4045 int part_id_if6_l = get_mrpc_partid_neighbour("l",help1,6);
4046 //We are here within the "odd stripid slope": I.e the left and right neighbor are even in stripid. Hence, use even number for help13-help36
4047 int help13 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,2);
4048 int help14 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,4);
4049 int help15 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,6);
4050 int help16 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,8);
4051 int help17 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,10);
4052 int help18 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,12);
4053 int help19 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,14);
4054 int help20 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,16);
4055 int help21 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,18);
4056 int help22 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,20);
4057 int help23 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,22);
4058 int help24 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_l,24);
4059
4060 identify_if6_ll1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help13,part_id_if6_l), get_mrpc_stripid_neighbour("l",help13,part_id_if6_l));
4061 identify_if6_ll2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help14,part_id_if6_l), get_mrpc_stripid_neighbour("l",help14,part_id_if6_l));
4062 identify_if6_ll3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help15,part_id_if6_l), get_mrpc_stripid_neighbour("l",help15,part_id_if6_l));
4063 identify_if6_ll4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help16,part_id_if6_l), get_mrpc_stripid_neighbour("l",help16,part_id_if6_l));
4064 identify_if6_ll5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help17,part_id_if6_l), get_mrpc_stripid_neighbour("l",help17,part_id_if6_l));
4065 identify_if6_ll6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help18,part_id_if6_l), get_mrpc_stripid_neighbour("l",help18,part_id_if6_l));
4066 identify_if6_ll7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help19,part_id_if6_l), get_mrpc_stripid_neighbour("l",help19,part_id_if6_l));
4067 identify_if6_ll8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help20,part_id_if6_l), get_mrpc_stripid_neighbour("l",help20,part_id_if6_l));
4068 identify_if6_ll9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help21,part_id_if6_l), get_mrpc_stripid_neighbour("l",help21,part_id_if6_l));
4069 identify_if6_ll10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help22,part_id_if6_l), get_mrpc_stripid_neighbour("l",help22,part_id_if6_l));
4070 identify_if6_ll11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help23,part_id_if6_l), get_mrpc_stripid_neighbour("l",help23,part_id_if6_l));
4071 identify_if6_ll12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("l",help24,part_id_if6_l), get_mrpc_stripid_neighbour("l",help24,part_id_if6_l));
4072
4073 int module_number_if6_r= BesTofDigitizerEcV4::Get_module_mrpc_from_unique_identifier(get_mrpc_stripid_neighbour("r",help1,6));//Get the module number!!! from the left module.
4074 int part_id_if6_r = get_mrpc_partid_neighbour("r",help1,6);
4075 //We are here within the "odd stripid slope": I.e the left and right neighbor are even in stripid. Hence, use even number for help13-help36
4076 int help25 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,2);
4077 int help26 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,4);
4078 int help27 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,6);
4079 int help28 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,8);
4080 int help29 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,10);
4081 int help30 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,12);
4082 int help31 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,14);
4083 int help32 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,16);
4084 int help33 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,18);
4085 int help34 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,20);
4086 int help35 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,22);
4087 int help36 = BesTofDigitizerEcV4::Produce_unique_identifier(module_number_if6_r,24);
4088
4089 identify_if6_rr1=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help25,part_id_if6_r), get_mrpc_stripid_neighbour("r",help25,part_id_if6_r));
4090 identify_if6_rr2=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help26,part_id_if6_r), get_mrpc_stripid_neighbour("r",help26,part_id_if6_r));
4091 identify_if6_rr3=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help27,part_id_if6_r), get_mrpc_stripid_neighbour("r",help27,part_id_if6_r));
4092 identify_if6_rr4=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help28,part_id_if6_r), get_mrpc_stripid_neighbour("r",help28,part_id_if6_r));
4093 identify_if6_rr5=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help29,part_id_if6_r), get_mrpc_stripid_neighbour("r",help29,part_id_if6_r));
4094 identify_if6_rr6=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help30,part_id_if6_r), get_mrpc_stripid_neighbour("r",help30,part_id_if6_r));
4095 identify_if6_rr7=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help31,part_id_if6_r), get_mrpc_stripid_neighbour("r",help31,part_id_if6_r));
4096 identify_if6_rr8=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help32,part_id_if6_r), get_mrpc_stripid_neighbour("r",help32,part_id_if6_r));
4097 identify_if6_rr9=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help33,part_id_if6_r), get_mrpc_stripid_neighbour("r",help33,part_id_if6_r));
4098 identify_if6_rr10=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help34,part_id_if6_r), get_mrpc_stripid_neighbour("r",help34,part_id_if6_r));
4099 identify_if6_rr11=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help35,part_id_if6_r), get_mrpc_stripid_neighbour("r",help35,part_id_if6_r));
4100 identify_if6_rr12=TofID::getIntID_mrpc(get_mrpc_partid_neighbour("r",help36,part_id_if6_r), get_mrpc_stripid_neighbour("r",help36,part_id_if6_r));
4101
4102 count_if6_ll1=tofDataMap.count(identify_if6_ll1);
4103 count_if6_ll2=tofDataMap.count(identify_if6_ll2);
4104 count_if6_ll3=tofDataMap.count(identify_if6_ll3);
4105 count_if6_ll4=tofDataMap.count(identify_if6_ll4);
4106 count_if6_ll5=tofDataMap.count(identify_if6_ll5);
4107 count_if6_ll6=tofDataMap.count(identify_if6_ll6);
4108 count_if6_ll7=tofDataMap.count(identify_if6_ll7);
4109 count_if6_ll8=tofDataMap.count(identify_if6_ll8);
4110 count_if6_ll9=tofDataMap.count(identify_if6_ll9);
4111 count_if6_ll10=tofDataMap.count(identify_if6_ll10);
4112 count_if6_ll11=tofDataMap.count(identify_if6_ll11);
4113 count_if6_ll12=tofDataMap.count(identify_if6_ll12);
4114 count_if6_rr1=tofDataMap.count(identify_if6_rr1);
4115 count_if6_rr2=tofDataMap.count(identify_if6_rr2);
4116 count_if6_rr3=tofDataMap.count(identify_if6_rr3);
4117 count_if6_rr4=tofDataMap.count(identify_if6_rr4);
4118 count_if6_rr5=tofDataMap.count(identify_if6_rr5);
4119 count_if6_rr6=tofDataMap.count(identify_if6_rr6);
4120 count_if6_rr7=tofDataMap.count(identify_if6_rr7);
4121 count_if6_rr8=tofDataMap.count(identify_if6_rr8);
4122 count_if6_rr9=tofDataMap.count(identify_if6_rr9);
4123 count_if6_rr10=tofDataMap.count(identify_if6_rr10);
4124 count_if6_rr11=tofDataMap.count(identify_if6_rr11);
4125 count_if6_rr12=tofDataMap.count(identify_if6_rr12);
4126
4127
4128
4129 }//close else
4130 }//close if neighboorhood=6
4131
4132
4133
4134
4135 /*
4136
4137 std::cout << "MrpcTrack setTofData - partid_it | tofid_it " << "6" << " | " << tofid_it << std::endl;
4138 std::cout << "MrpcTrack setTofData - partid_u | tofid_u " << partid_u << " | " << tofid_u <<std::endl;
4139 std::cout << "MrpcTrack setTofData - partid_b | tofid_b " << partid_b << " | " << tofid_b <<std::endl;
4140 std::cout << "MrpcTrack setTofData - partid_l | tofid_l " << partid_l << " | " << tofid_l <<std::endl;
4141 std::cout << "MrpcTrack setTofData - partid_r | tofid_r " << partid_r << " | " << tofid_r <<std::endl;
4142 std::cout << "MrpcTrack setTofData - partid_lu | tofid_lu " << partid_lu << " | " << tofid_lu <<std::endl;
4143 std::cout << "MrpcTrack setTofData - partid_lb | tofid_lb " << partid_lb << " | " << tofid_lb <<std::endl;
4144 std::cout << "MrpcTrack setTofData - partid_ru | tofid_ru " << partid_ru << " | " << tofid_ru <<std::endl;
4145 std::cout << "MrpcTrack setTofData - partid_rb | tofid_rb " << partid_rb << " | " << tofid_rb <<std::endl;
4146
4147
4148std::cout << "MrpcTrack setTofData - partid_uu | tofid_uu " << partid_uu << " | " << tofid_uu <<std::endl;
4149std::cout << "MrpcTrack setTofData - partid_bb | tofid_bb " << partid_bb << " | " << tofid_bb <<std::endl;
4150std::cout << "MrpcTrack setTofData - partid_rbb | tofid_rbb " << partid_rbb << " | " << tofid_rbb <<std::endl;
4151std::cout << "MrpcTrack setTofData - partid_ruu | tofid_ruu " << partid_ruu << " | " << tofid_ruu <<std::endl;
4152std::cout << "MrpcTrack setTofData - partid_lbb | tofid_lbb " << partid_lbb << " | " << tofid_lbb <<std::endl;
4153std::cout << "MrpcTrack setTofData - partid_luu | tofid_luu " << partid_luu << " | " << tofid_luu <<std::endl;
4154std::cout << "MrpcTrack setTofData - partid_uuu | tofid_uuu " << partid_uuu << " | " << tofid_uuu <<std::endl;
4155std::cout << "MrpcTrack setTofData - partid_bbb | tofid_bbb " << partid_bbb << " | " << tofid_bbb <<std::endl;
4156std::cout << "MrpcTrack setTofData - partid_rbbb | tofid_rbbb " << partid_rbbb << " | " << tofid_rbbb <<std::endl;
4157std::cout << "MrpcTrack setTofData - partid_ruuu | tofid_ruuu " << partid_ruuu << " | " << tofid_ruuu <<std::endl;
4158std::cout << "MrpcTrack setTofData - partid_luuu | tofid_luuu " << partid_luuu << " | " << tofid_luuu <<std::endl;
4159std::cout << "MrpcTrack setTofData - partid_lbbb | tofid_lbbb " << partid_lbbb << " | " << tofid_lbbb <<std::endl;
4160 */
4161
4162 }//close if (m_hitCase)
4163
4164
4165 if(0) //List all entries of Tofdatamap
4166 {
4167 int data_map_size = tofDataMap.size();
4168 std::cout << "MrpcTrack setTofData Number of elements in TofDataMap " << data_map_size << std::endl;
4169
4170 IterTofDataMap it=tofDataMap.begin();
4171
4172 for ( it=tofDataMap.begin() ; it != tofDataMap.end(); it++ )
4173 std::cout << "MrpcTrack setTofData TofDataMap entries id | stripnumber "<< (*it).first <<" | " << (*it).second->tofId() << std::endl;
4174 }
4175
4176
4177
4178 if(count_it >0)
4179 {
4180 //std::cout << "MrpcTrack setTofData -match count_it > 0 count_it = " << count_it << std::endl;
4181
4182 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_it );
4183 IterTofDataMap iter = range.first;
4184
4185 for( unsigned int i = 0; i < count_it; i++, iter++ ) {
4186 tofDataAnalysis( (*iter).second, 1 );
4187 }
4188 }//close if(count_it >0)
4189
4190 if(count_u >0)
4191 {
4192 //std::cout << "MrpcTrack setTofData -match count_u > 0 count_u = " << count_u << std::endl;
4193
4194 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_u );
4195 IterTofDataMap iter = range.first;
4196 for( unsigned int i = 0; i < count_u; i++, iter++ ) {
4197 tofDataAnalysis( (*iter).second, 2 );
4198 }
4199 }//close if(count_u >0)
4200 if(count_b >0)
4201 {
4202 //std::cout << "MrpcTrack setTofData -match count_b > 0 count_b = " << count_b << std::endl;
4203
4204 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_b );
4205 IterTofDataMap iter = range.first;
4206 for( unsigned int i = 0; i < count_b; i++, iter++ ) {
4207 tofDataAnalysis( (*iter).second, 2 );
4208 }
4209 }//close if(count_b >0)
4210
4211 if(count_l >0)
4212 {
4213 //std::cout << "MrpcTrack setTofData -match count_l > 0 count_l = " << count_l << std::endl;
4214
4215 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_l );
4216 IterTofDataMap iter = range.first;
4217 for( unsigned int i = 0; i < count_l; i++, iter++ ) {
4218 tofDataAnalysis( (*iter).second, 2 );
4219 }
4220 }//close if(count_l >0)
4221
4222 if(count_r >0)
4223 {
4224 //std::cout << "MrpcTrack setTofData -match count_r > 0 count_r = " << count_r << std::endl;
4225
4226 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_r );
4227 IterTofDataMap iter = range.first;
4228 for( unsigned int i = 0; i < count_r; i++, iter++ ) {
4229 tofDataAnalysis( (*iter).second, 2 );
4230 }
4231 }//close if(count_r >0)
4232 if(count_lu >0)
4233 {
4234 //std::cout << "MrpcTrack setTofData -match count_lu > 0 count_lu = " << count_lu << std::endl;
4235
4236 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lu );
4237 IterTofDataMap iter = range.first;
4238 for( unsigned int i = 0; i < count_lu; i++, iter++ ) {
4239 tofDataAnalysis( (*iter).second, 2 );
4240 }
4241 }//close if(count_lu >0)
4242
4243 if(count_ru >0)
4244 {
4245 //std::cout << "MrpcTrack setTofData -match count_ru > 0 count_ru = " << count_ru << std::endl;
4246
4247 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_ru );
4248 IterTofDataMap iter = range.first;
4249 for( unsigned int i = 0; i < count_ru; i++, iter++ ) {
4250 tofDataAnalysis( (*iter).second, 2 );
4251 }
4252 }//close if(count_ru >0)
4253
4254 if(count_lb >0)
4255 {
4256 //std::cout << "MrpcTrack setTofData -match count_lb > 0 count_lb = " << count_lb << std::endl;
4257
4258 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lb );
4259 IterTofDataMap iter = range.first;
4260 for( unsigned int i = 0; i < count_lb; i++, iter++ ) {
4261 tofDataAnalysis( (*iter).second, 2 );
4262 }
4263 }//close if(count_lb >0)
4264
4265 if(count_rb >0)
4266 {
4267 //std::cout << "MrpcTrack setTofData -match count_rb > 0 count_rb = " << count_rb << std::endl;
4268
4269 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rb );
4270 IterTofDataMap iter = range.first;
4271 for( unsigned int i = 0; i < count_rb; i++, iter++ ) {
4272 tofDataAnalysis( (*iter).second, 2 );
4273 }
4274 }//close if(count_rb >0)
4275
4276 if(count_bb >0)
4277 {
4278
4279 //std::cout << "MrpcTrack setTofData -match count_bb > 0 count_bb = " << count_bb << std::endl;
4280 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_bb );
4281 IterTofDataMap iter = range.first;
4282 for( unsigned int i = 0; i < count_bb; i++, iter++ ) {
4283 tofDataAnalysis( (*iter).second, 2 );
4284 }
4285 }//close if(count_bb >0)
4286 if(count_uu >0)
4287 {
4288 //std::cout << "MrpcTrack setTofData -match count_uu > 0 count_uu = " << count_uu << std::endl;
4289 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_uu );
4290 IterTofDataMap iter = range.first;
4291 for( unsigned int i = 0; i < count_uu; i++, iter++ ) {
4292 tofDataAnalysis( (*iter).second, 2 );
4293 }
4294 }//close if(count_uu >0)
4295
4296 if(count_lbb >0)
4297 {
4298
4299 //std::cout << "MrpcTrack setTofData -match count_lbb > 0 count_lbb = " << count_lbb << std::endl;
4300 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lbb );
4301 IterTofDataMap iter = range.first;
4302 for( unsigned int i = 0; i < count_lbb; i++, iter++ ) {
4303 tofDataAnalysis( (*iter).second, 2 );
4304 }
4305 }//close if(count_lbb >0)
4306 if(count_luu >0)
4307 {
4308 //std::cout << "MrpcTrack setTofData -match count_luu > 0 count_luu = " << count_luu << std::endl;
4309 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_luu );
4310 IterTofDataMap iter = range.first;
4311 for( unsigned int i = 0; i < count_luu; i++, iter++ ) {
4312 tofDataAnalysis( (*iter).second, 2 );
4313 }
4314 }//close if(count_luu >0)
4315 if(count_rbb >0)
4316 {
4317 //std::cout << "MrpcTrack setTofData -match count_rbb > 0 count_rbb = " << count_rbb << std::endl;
4318 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rbb );
4319 IterTofDataMap iter = range.first;
4320 for( unsigned int i = 0; i < count_rbb; i++, iter++ ) {
4321 tofDataAnalysis( (*iter).second, 2 );
4322 }
4323 }//close if(count_rbb >0)
4324
4325 if(count_ruu >0)
4326 {
4327 //std::cout << "MrpcTrack setTofData -match count_ruu > 0 count_ruu = " << count_ruu << std::endl;
4328 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_ruu );
4329 IterTofDataMap iter = range.first;
4330 for( unsigned int i = 0; i < count_ruu; i++, iter++ ) {
4331 tofDataAnalysis( (*iter).second, 2 );
4332 }
4333 }//close if(count_ruu >0)
4334 if(count_uuu >0)
4335 {
4336 //std::cout << "MrpcTrack setTofData -match count_uuu > 0 count_uuu = " << count_uuu << std::endl;
4337 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_uuu );
4338 IterTofDataMap iter = range.first;
4339 for( unsigned int i = 0; i < count_uuu; i++, iter++ ) {
4340 tofDataAnalysis( (*iter).second, 2 );
4341 }
4342 }//close if(count_uuu >0)
4343 if(count_bbb >0)
4344 {
4345 //std::cout << "MrpcTrack setTofData -match count_bbb > 0 count_bbb = " << count_bbb << std::endl;
4346 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_bbb );
4347 IterTofDataMap iter = range.first;
4348 for( unsigned int i = 0; i < count_bbb; i++, iter++ ) {
4349 tofDataAnalysis( (*iter).second, 2 );
4350 }
4351 }//close if(count_bbb >0)
4352 if(count_ruuu >0)
4353 {
4354 //std::cout << "MrpcTrack setTofData -match count_ruuu > 0 count_ruuu = " << count_ruuu << std::endl;
4355 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_ruuu );
4356 IterTofDataMap iter = range.first;
4357 for( unsigned int i = 0; i < count_ruuu; i++, iter++ ) {
4358 tofDataAnalysis( (*iter).second, 2 );
4359 }
4360 }//close if(count_ruuu >0)
4361 if(count_rbbb >0)
4362 {
4363 //std::cout << "MrpcTrack setTofData -match count_rbbb > 0 count_rbbb = " << count_rbbb << std::endl;
4364 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rbbb );
4365 IterTofDataMap iter = range.first;
4366 for( unsigned int i = 0; i < count_rbbb; i++, iter++ ) {
4367 tofDataAnalysis( (*iter).second, 2 );
4368 }
4369 }//close if(count_rbbb >0
4370 if(count_luuu >0)
4371 {
4372 //std::cout << "MrpcTrack setTofData -match count_luuu > 0 count_luuu = " << count_luuu << std::endl;
4373 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_luuu );
4374 IterTofDataMap iter = range.first;
4375 for( unsigned int i = 0; i < count_luuu; i++, iter++ ) {
4376 tofDataAnalysis( (*iter).second, 2 );
4377 }
4378 }//close if(count_luuu >0)
4379 if(count_lbbb >0)
4380 {
4381 //std::cout << "MrpcTrack setTofData -match count_lbbb > 0 count_lbbb = " << count_lbbb << std::endl;
4382 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lbbb );
4383 IterTofDataMap iter = range.first;
4384 for( unsigned int i = 0; i < count_lbbb; i++, iter++ ) {
4385 tofDataAnalysis( (*iter).second, 2 );
4386 }
4387 }//close if(count_lbbb >0
4388
4389 //if=4 Faelle
4390 if(count_lbbbl >0)
4391 {
4392 //std::cout << "MrpcTrack setTofData -match count_lbbbl > 0 count_lbbbl = " << count_lbbbl << std::endl;
4393 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lbbbl );
4394 IterTofDataMap iter = range.first;
4395 for( unsigned int i = 0; i < count_lbbbl; i++, iter++ ) {
4396 tofDataAnalysis( (*iter).second, 2 );
4397 }
4398 }//close if(count_lbbbl >0
4399 if(count_lbbl >0)
4400 {
4401 //std::cout << "MrpcTrack setTofData -match count_lbbl > 0 count_lbbl = " << count_lbbl << std::endl;
4402 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lbbl );
4403 IterTofDataMap iter = range.first;
4404 for( unsigned int i = 0; i < count_lbbl; i++, iter++ ) {
4405 tofDataAnalysis( (*iter).second, 2 );
4406 }
4407 }//close if(count_lbbl >0
4408 if(count_lbl >0)
4409 {
4410 //std::cout << "MrpcTrack setTofData -match count_lbl > 0 count_lbl = " << count_lbl << std::endl;
4411 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lbl );
4412 IterTofDataMap iter = range.first;
4413 for( unsigned int i = 0; i < count_lbl; i++, iter++ ) {
4414 tofDataAnalysis( (*iter).second, 2 );
4415 }
4416 }//close if(count_lbl >0
4417 if(count_ll >0)
4418 {
4419 //std::cout << "MrpcTrack setTofData -match count_ll > 0 count_ll = " << count_ll << std::endl;
4420 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_ll );
4421 IterTofDataMap iter = range.first;
4422 for( unsigned int i = 0; i < count_ll; i++, iter++ ) {
4423 tofDataAnalysis( (*iter).second, 2 );
4424 }
4425 }//close if(count_ll >0
4426 if(count_luuul >0)
4427 {
4428 //std::cout << "MrpcTrack setTofData -match count_luuul > 0 count_luuul = " << count_luuul << std::endl;
4429 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_luuul );
4430 IterTofDataMap iter = range.first;
4431 for( unsigned int i = 0; i < count_luuul; i++, iter++ ) {
4432 tofDataAnalysis( (*iter).second, 2 );
4433 }
4434 }//close if(count_luuul >0
4435 if(count_luul >0)
4436 {
4437 //std::cout << "MrpcTrack setTofData -match count_luul > 0 count_luul = " << count_luul << std::endl;
4438 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_luul );
4439 IterTofDataMap iter = range.first;
4440 for( unsigned int i = 0; i < count_luul; i++, iter++ ) {
4441 tofDataAnalysis( (*iter).second, 2 );
4442 }
4443 }//close if(count_luul >0
4444 if(count_lul >0)
4445 {
4446 //std::cout << "MrpcTrack setTofData -match count_lul > 0 count_lul = " << count_lul << std::endl;
4447 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_lul );
4448 IterTofDataMap iter = range.first;
4449 for( unsigned int i = 0; i < count_lul; i++, iter++ ) {
4450 tofDataAnalysis( (*iter).second, 2 );
4451 }
4452 }//close if(count_lul >0
4453
4454 if(count_rbbbr >0)
4455 {
4456 //std::cout << "MrpcTrack setTofData -match count_rbbbr> 0 count_rbbbr = " << count_rbbbr << std::endl;
4457 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rbbbr );
4458 IterTofDataMap iter = range.first;
4459 for( unsigned int i = 0; i < count_rbbbr; i++, iter++ ) {
4460 tofDataAnalysis( (*iter).second, 2 );
4461 }
4462 }//close if(count_rbbbr >0
4463 if(count_rbbr >0)
4464 {
4465 //std::cout << "MrpcTrack setTofData -match count_rbbr > 0 count_rbbr = " << count_rbbr << std::endl;
4466 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rbbr );
4467 IterTofDataMap iter = range.first;
4468 for( unsigned int i = 0; i < count_rbbr; i++, iter++ ) {
4469 tofDataAnalysis( (*iter).second, 2 );
4470 }
4471 }//close if(count_rbbr >0
4472 if(count_rbr >0)
4473 {
4474 //std::cout << "MrpcTrack setTofData -match count_rbr > 0 count_rbr= " << count_rbr<< std::endl;
4475 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rbr );
4476 IterTofDataMap iter = range.first;
4477 for( unsigned int i = 0; i < count_rbr; i++, iter++ ) {
4478 tofDataAnalysis( (*iter).second, 2 );
4479 }
4480 }//close if(count_rbr >0
4481 if(count_rr >0)
4482 {
4483 //std::cout << "MrpcTrack setTofData -match count_rr > 0 count_rr = " << count_rr << std::endl;
4484 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rr );
4485 IterTofDataMap iter = range.first;
4486 for( unsigned int i = 0; i < count_rr; i++, iter++ ) {
4487 tofDataAnalysis( (*iter).second, 2 );
4488 }
4489 }//close if(count_ll >0
4490 if(count_ruuur >0)
4491 {
4492 //std::cout << "MrpcTrack setTofData -match count_ruuur > 0 count_ruuur = " << count_ruuur << std::endl;
4493 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_ruuur );
4494 IterTofDataMap iter = range.first;
4495 for( unsigned int i = 0; i < count_ruuur; i++, iter++ ) {
4496 tofDataAnalysis( (*iter).second, 2 );
4497 }
4498 }//close if(count_ruuur >0
4499 if(count_ruur >0)
4500 {
4501 //std::cout << "MrpcTrack setTofData -match count_ruur > 0 count_ruur = " << count_ruur << std::endl;
4502 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_ruur );
4503 IterTofDataMap iter = range.first;
4504 for( unsigned int i = 0; i < count_ruur; i++, iter++ ) {
4505 tofDataAnalysis( (*iter).second, 2 );
4506 }
4507 }//close if(count_ruur >0
4508 if(count_rur >0)
4509 {
4510 //std::cout << "MrpcTrack setTofData -match count_rur > 0 count_rur = " << count_rur << std::endl;
4511 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_rur );
4512 IterTofDataMap iter = range.first;
4513 for( unsigned int i = 0; i < count_rur; i++, iter++ ) {
4514 tofDataAnalysis( (*iter).second, 2 );
4515 }
4516 }//close if(count_rur >0
4517
4518 ///IF 5 part
4519
4520 if(count_if5_m1>0)
4521 {
4522 int help=2;
4523 if(identify_if5_m1==identify_if5_it) help=1;
4524 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m1);
4525 IterTofDataMap iter = range.first;
4526 for( unsigned int i = 0; i < count_if5_m1; i++, iter++ ) {
4527 tofDataAnalysis( (*iter).second, help );
4528 }
4529 }
4530 if(count_if5_m2>0)
4531 {
4532 int help=2;
4533 if(identify_if5_m2==identify_if5_it) help=1;
4534 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m2);
4535 IterTofDataMap iter = range.first;
4536 for( unsigned int i = 0; i < count_if5_m2; i++, iter++ ) {
4537 tofDataAnalysis( (*iter).second, help );
4538 }
4539 }
4540 if(count_if5_m3>0)
4541 {
4542 int help=2;
4543 if(identify_if5_m3==identify_if5_it) help=1;
4544 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m3);
4545 IterTofDataMap iter = range.first;
4546 for( unsigned int i = 0; i < count_if5_m3; i++, iter++ ) {
4547 tofDataAnalysis( (*iter).second, help );
4548 }
4549 }
4550 if(count_if5_m4>0)
4551 {
4552 int help=2;
4553 if(identify_if5_m4==identify_if5_it) help=1;
4554 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m4);
4555 IterTofDataMap iter = range.first;
4556 for( unsigned int i = 0; i < count_if5_m4; i++, iter++ ) {
4557 tofDataAnalysis( (*iter).second, help );
4558 }
4559 }
4560 if(count_if5_m5>0)
4561 {
4562 int help=2;
4563 if(identify_if5_m5==identify_if5_it) help=1;
4564 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m5);
4565 IterTofDataMap iter = range.first;
4566 for( unsigned int i = 0; i < count_if5_m5; i++, iter++ ) {
4567 tofDataAnalysis( (*iter).second, help );
4568 }
4569 }
4570 if(count_if5_m6>0)
4571 {
4572 int help=2;
4573 if(identify_if5_m6==identify_if5_it) help=1;
4574 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m6);
4575 IterTofDataMap iter = range.first;
4576 for( unsigned int i = 0; i < count_if5_m6; i++, iter++ ) {
4577 tofDataAnalysis( (*iter).second, help );
4578 }
4579 }
4580 if(count_if5_m7>0)
4581 {
4582 int help=2;
4583 if(identify_if5_m7==identify_if5_it) help=1;
4584 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m7);
4585 IterTofDataMap iter = range.first;
4586 for( unsigned int i = 0; i < count_if5_m7; i++, iter++ ) {
4587 tofDataAnalysis( (*iter).second, help );
4588 }
4589 }
4590 if(count_if5_m8>0)
4591 {
4592 int help=2;
4593 if(identify_if5_m8==identify_if5_it) help=1;
4594 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m8);
4595 IterTofDataMap iter = range.first;
4596 for( unsigned int i = 0; i < count_if5_m8; i++, iter++ ) {
4597 tofDataAnalysis( (*iter).second, help );
4598 }
4599 }
4600 if(count_if5_m9>0)
4601 {
4602 int help=2;
4603 if(identify_if5_m9==identify_if5_it) help=1;
4604 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m9);
4605 IterTofDataMap iter = range.first;
4606 for( unsigned int i = 0; i < count_if5_m9; i++, iter++ ) {
4607 tofDataAnalysis( (*iter).second, help );
4608 }
4609 }
4610 if(count_if5_m10>0)
4611 {
4612 int help=2;
4613 if(identify_if5_m10==identify_if5_it) help=1;
4614 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m10);
4615 IterTofDataMap iter = range.first;
4616 for( unsigned int i = 0; i < count_if5_m10; i++, iter++ ) {
4617 tofDataAnalysis( (*iter).second, help );
4618 }
4619 }
4620 if(count_if5_m11>0)
4621 {
4622 int help=2;
4623 if(identify_if5_m11==identify_if5_it) help=1;
4624 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m11);
4625 IterTofDataMap iter = range.first;
4626 for( unsigned int i = 0; i < count_if5_m11; i++, iter++ ) {
4627 tofDataAnalysis( (*iter).second, help );
4628 }
4629 }
4630 if(count_if5_m12>0)
4631 {
4632 int help=2;
4633 if(identify_if5_m12==identify_if5_it) help=1;
4634 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_m12);
4635 IterTofDataMap iter = range.first;
4636 for( unsigned int i = 0; i < count_if5_m12; i++, iter++ ) {
4637 tofDataAnalysis( (*iter).second, help );
4638 }
4639 }
4640 if(count_if5_l1>0)
4641 {
4642 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l1);
4643 IterTofDataMap iter = range.first;
4644 for( unsigned int i = 0; i < count_if5_l1; i++, iter++ ) {
4645 tofDataAnalysis( (*iter).second, 2 );
4646 }
4647 }
4648 if(count_if5_l2>0)
4649 {
4650 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l2);
4651 IterTofDataMap iter = range.first;
4652 for( unsigned int i = 0; i < count_if5_l2; i++, iter++ ) {
4653 tofDataAnalysis( (*iter).second, 2 );
4654 }
4655 }
4656 if(count_if5_l3>0)
4657 {
4658 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l3);
4659 IterTofDataMap iter = range.first;
4660 for( unsigned int i = 0; i < count_if5_l3; i++, iter++ ) {
4661 tofDataAnalysis( (*iter).second, 2 );
4662 }
4663 }
4664 if(count_if5_l4>0)
4665 {
4666 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l4);
4667 IterTofDataMap iter = range.first;
4668 for( unsigned int i = 0; i < count_if5_l4; i++, iter++ ) {
4669 tofDataAnalysis( (*iter).second, 2 );
4670 }
4671 }
4672 if(count_if5_l5>0)
4673 {
4674 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l5);
4675 IterTofDataMap iter = range.first;
4676 for( unsigned int i = 0; i < count_if5_l5; i++, iter++ ) {
4677 tofDataAnalysis( (*iter).second, 2 );
4678 }
4679 }
4680 if(count_if5_l6>0)
4681 {
4682 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l6);
4683 IterTofDataMap iter = range.first;
4684 for( unsigned int i = 0; i < count_if5_l6; i++, iter++ ) {
4685 tofDataAnalysis( (*iter).second, 2 );
4686 }
4687 }
4688 if(count_if5_l7>0)
4689 {
4690 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l7);
4691 IterTofDataMap iter = range.first;
4692 for( unsigned int i = 0; i < count_if5_l7; i++, iter++ ) {
4693 tofDataAnalysis( (*iter).second, 2 );
4694 }
4695 }
4696 if(count_if5_l8>0)
4697 {
4698 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l8);
4699 IterTofDataMap iter = range.first;
4700 for( unsigned int i = 0; i < count_if5_l8; i++, iter++ ) {
4701 tofDataAnalysis( (*iter).second, 2 );
4702 }
4703 }
4704 if(count_if5_l9>0)
4705 {
4706 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l9);
4707 IterTofDataMap iter = range.first;
4708 for( unsigned int i = 0; i < count_if5_l9; i++, iter++ ) {
4709 tofDataAnalysis( (*iter).second, 2 );
4710 }
4711 }
4712 if(count_if5_l10>0)
4713 {
4714 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l10);
4715 IterTofDataMap iter = range.first;
4716 for( unsigned int i = 0; i < count_if5_l10; i++, iter++ ) {
4717 tofDataAnalysis( (*iter).second, 2 );
4718 }
4719 }
4720 if(count_if5_l11>0)
4721 {
4722 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l11);
4723 IterTofDataMap iter = range.first;
4724 for( unsigned int i = 0; i < count_if5_l11; i++, iter++ ) {
4725 tofDataAnalysis( (*iter).second, 2 );
4726 }
4727 }
4728 if(count_if5_l12>0)
4729 {
4730 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_l12);
4731 IterTofDataMap iter = range.first;
4732 for( unsigned int i = 0; i < count_if5_l12; i++, iter++ ) {
4733 tofDataAnalysis( (*iter).second, 2 );
4734 }
4735 }
4736
4737 if(count_if5_r1>0)
4738 {
4739 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r1);
4740 IterTofDataMap iter = range.first;
4741 for( unsigned int i = 0; i < count_if5_r1; i++, iter++ ) {
4742 tofDataAnalysis( (*iter).second, 2 );
4743 }
4744 }
4745 if(count_if5_r2>0)
4746 {
4747 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r2);
4748 IterTofDataMap iter = range.first;
4749 for( unsigned int i = 0; i < count_if5_r2; i++, iter++ ) {
4750 tofDataAnalysis( (*iter).second, 2 );
4751 }
4752 }
4753 if(count_if5_r3>0)
4754 {
4755 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r3);
4756 IterTofDataMap iter = range.first;
4757 for( unsigned int i = 0; i < count_if5_r3; i++, iter++ ) {
4758 tofDataAnalysis( (*iter).second, 2 );
4759 }
4760 }
4761 if(count_if5_r4>0)
4762 {
4763 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r4);
4764 IterTofDataMap iter = range.first;
4765 for( unsigned int i = 0; i < count_if5_r4; i++, iter++ ) {
4766 tofDataAnalysis( (*iter).second, 2 );
4767 }
4768 }
4769 if(count_if5_r5>0)
4770 {
4771 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r5);
4772 IterTofDataMap iter = range.first;
4773 for( unsigned int i = 0; i < count_if5_r5; i++, iter++ ) {
4774 tofDataAnalysis( (*iter).second, 2 );
4775 }
4776 }
4777 if(count_if5_r6>0)
4778 {
4779 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r6);
4780 IterTofDataMap iter = range.first;
4781 for( unsigned int i = 0; i < count_if5_r6; i++, iter++ ) {
4782 tofDataAnalysis( (*iter).second, 2 );
4783 }
4784 }
4785 if(count_if5_r7>0)
4786 {
4787 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r7);
4788 IterTofDataMap iter = range.first;
4789 for( unsigned int i = 0; i < count_if5_r7; i++, iter++ ) {
4790 tofDataAnalysis( (*iter).second, 2 );
4791 }
4792 }
4793 if(count_if5_r8>0)
4794 {
4795 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r8);
4796 IterTofDataMap iter = range.first;
4797 for( unsigned int i = 0; i < count_if5_r8; i++, iter++ ) {
4798 tofDataAnalysis( (*iter).second, 2 );
4799 }
4800 }
4801 if(count_if5_r9>0)
4802 {
4803 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r9);
4804 IterTofDataMap iter = range.first;
4805 for( unsigned int i = 0; i < count_if5_r9; i++, iter++ ) {
4806 tofDataAnalysis( (*iter).second, 2 );
4807 }
4808 }
4809 if(count_if5_r10>0)
4810 {
4811 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r10);
4812 IterTofDataMap iter = range.first;
4813 for( unsigned int i = 0; i < count_if5_r10; i++, iter++ ) {
4814 tofDataAnalysis( (*iter).second, 2 );
4815 }
4816 }
4817 if(count_if5_r11>0)
4818 {
4819 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r11);
4820 IterTofDataMap iter = range.first;
4821 for( unsigned int i = 0; i < count_if5_r11; i++, iter++ ) {
4822 tofDataAnalysis( (*iter).second, 2 );
4823 }
4824 }
4825 if(count_if5_r12>0)
4826 {
4827 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if5_r12);
4828 IterTofDataMap iter = range.first;
4829 for( unsigned int i = 0; i < count_if5_r12; i++, iter++ ) {
4830 tofDataAnalysis( (*iter).second, 2 );
4831 }
4832 }
4833 if(count_if6_m1>0)
4834 {
4835 int help=2;
4836 if(identify_if6_m1==identify_if6_it) help=1;
4837 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m1);
4838 IterTofDataMap iter = range.first;
4839 for( unsigned int i = 0; i < count_if6_m1; i++, iter++ ) {
4840 tofDataAnalysis( (*iter).second, help );
4841 }
4842 }
4843 if(count_if6_m2>0)
4844 {
4845 int help=2;
4846 if(identify_if6_m2==identify_if6_it) help=1;
4847 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m2);
4848 IterTofDataMap iter = range.first;
4849 for( unsigned int i = 0; i < count_if6_m2; i++, iter++ ) {
4850 tofDataAnalysis( (*iter).second, help );
4851 }
4852 }
4853 if(count_if6_m3>0)
4854 {
4855 int help=2;
4856 if(identify_if6_m3==identify_if6_it) help=1;
4857 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m3);
4858 IterTofDataMap iter = range.first;
4859 for( unsigned int i = 0; i < count_if6_m3; i++, iter++ ) {
4860 tofDataAnalysis( (*iter).second, help );
4861 }
4862 }
4863 if(count_if6_m4>0)
4864 {
4865 int help=2;
4866 if(identify_if6_m4==identify_if6_it) help=1;
4867 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m4);
4868 IterTofDataMap iter = range.first;
4869 for( unsigned int i = 0; i < count_if6_m4; i++, iter++ ) {
4870 tofDataAnalysis( (*iter).second, help );
4871 }
4872 }
4873 if(count_if6_m5>0)
4874 {
4875 int help=2;
4876 if(identify_if6_m5==identify_if6_it) help=1;
4877 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m5);
4878 IterTofDataMap iter = range.first;
4879 for( unsigned int i = 0; i < count_if6_m5; i++, iter++ ) {
4880 tofDataAnalysis( (*iter).second, help );
4881 }
4882 }
4883 if(count_if6_m6>0)
4884 {
4885 int help=2;
4886 if(identify_if6_m6==identify_if6_it) help=1;
4887 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m6);
4888 IterTofDataMap iter = range.first;
4889 for( unsigned int i = 0; i < count_if6_m6; i++, iter++ ) {
4890 tofDataAnalysis( (*iter).second, help );
4891 }
4892 }
4893 if(count_if6_m7>0)
4894 {
4895 int help=2;
4896 if(identify_if6_m7==identify_if6_it) help=1;
4897 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m7);
4898 IterTofDataMap iter = range.first;
4899 for( unsigned int i = 0; i < count_if6_m7; i++, iter++ ) {
4900 tofDataAnalysis( (*iter).second, help );
4901 }
4902 }
4903 if(count_if6_m8>0)
4904 {
4905 int help=2;
4906 if(identify_if6_m8==identify_if6_it) help=1;
4907 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m8);
4908 IterTofDataMap iter = range.first;
4909 for( unsigned int i = 0; i < count_if6_m8; i++, iter++ ) {
4910 tofDataAnalysis( (*iter).second, help );
4911 }
4912 }
4913 if(count_if6_m9>0)
4914 {
4915 int help=2;
4916 if(identify_if6_m9==identify_if6_it) help=1;
4917 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m9);
4918 IterTofDataMap iter = range.first;
4919 for( unsigned int i = 0; i < count_if6_m9; i++, iter++ ) {
4920 tofDataAnalysis( (*iter).second, help );
4921 }
4922 }
4923 if(count_if6_m10>0)
4924 {
4925 int help=2;
4926 if(identify_if6_m10==identify_if6_it) help=1;
4927 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m10);
4928 IterTofDataMap iter = range.first;
4929 for( unsigned int i = 0; i < count_if6_m10; i++, iter++ ) {
4930 tofDataAnalysis( (*iter).second, help );
4931 }
4932 }
4933 if(count_if6_m11>0)
4934 {
4935 int help=2;
4936 if(identify_if6_m11==identify_if6_it) help=1;
4937 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m11);
4938 IterTofDataMap iter = range.first;
4939 for( unsigned int i = 0; i < count_if6_m11; i++, iter++ ) {
4940 tofDataAnalysis( (*iter).second, help );
4941 }
4942 }
4943 if(count_if6_m12>0)
4944 {
4945 int help=2;
4946 if(identify_if6_m12==identify_if6_it) help=1;
4947 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_m12);
4948 IterTofDataMap iter = range.first;
4949 for( unsigned int i = 0; i < count_if6_m12; i++, iter++ ) {
4950 tofDataAnalysis( (*iter).second, help );
4951 }
4952 }
4953 if(count_if6_l1>0)
4954 {
4955 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l1);
4956 IterTofDataMap iter = range.first;
4957 for( unsigned int i = 0; i < count_if6_l1; i++, iter++ ) {
4958 tofDataAnalysis( (*iter).second, 2 );
4959 }
4960 }
4961 if(count_if6_l2>0)
4962 {
4963 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l2);
4964 IterTofDataMap iter = range.first;
4965 for( unsigned int i = 0; i < count_if6_l2; i++, iter++ ) {
4966 tofDataAnalysis( (*iter).second, 2 );
4967 }
4968 }
4969 if(count_if6_l3>0)
4970 {
4971 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l3);
4972 IterTofDataMap iter = range.first;
4973 for( unsigned int i = 0; i < count_if6_l3; i++, iter++ ) {
4974 tofDataAnalysis( (*iter).second, 2 );
4975 }
4976 }
4977 if(count_if6_l4>0)
4978 {
4979 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l4);
4980 IterTofDataMap iter = range.first;
4981 for( unsigned int i = 0; i < count_if6_l4; i++, iter++ ) {
4982 tofDataAnalysis( (*iter).second, 2 );
4983 }
4984 }
4985 if(count_if6_l5>0)
4986 {
4987 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l5);
4988 IterTofDataMap iter = range.first;
4989 for( unsigned int i = 0; i < count_if6_l5; i++, iter++ ) {
4990 tofDataAnalysis( (*iter).second, 2 );
4991 }
4992 }
4993 if(count_if6_l6>0)
4994 {
4995 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l6);
4996 IterTofDataMap iter = range.first;
4997 for( unsigned int i = 0; i < count_if6_l6; i++, iter++ ) {
4998 tofDataAnalysis( (*iter).second, 2 );
4999 }
5000 }
5001 if(count_if6_l7>0)
5002 {
5003 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l7);
5004 IterTofDataMap iter = range.first;
5005 for( unsigned int i = 0; i < count_if6_l7; i++, iter++ ) {
5006 tofDataAnalysis( (*iter).second, 2 );
5007 }
5008 }
5009 if(count_if6_l8>0)
5010 {
5011 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l8);
5012 IterTofDataMap iter = range.first;
5013 for( unsigned int i = 0; i < count_if6_l8; i++, iter++ ) {
5014 tofDataAnalysis( (*iter).second, 2 );
5015 }
5016 }
5017 if(count_if6_l9>0)
5018 {
5019 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l9);
5020 IterTofDataMap iter = range.first;
5021 for( unsigned int i = 0; i < count_if6_l9; i++, iter++ ) {
5022 tofDataAnalysis( (*iter).second, 2 );
5023 }
5024 }
5025 if(count_if6_l10>0)
5026 {
5027 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l10);
5028 IterTofDataMap iter = range.first;
5029 for( unsigned int i = 0; i < count_if6_l10; i++, iter++ ) {
5030 tofDataAnalysis( (*iter).second, 2 );
5031 }
5032 }
5033 if(count_if6_l11>0)
5034 {
5035 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l11);
5036 IterTofDataMap iter = range.first;
5037 for( unsigned int i = 0; i < count_if6_l11; i++, iter++ ) {
5038 tofDataAnalysis( (*iter).second, 2 );
5039 }
5040 }
5041 if(count_if6_l12>0)
5042 {
5043 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_l12);
5044 IterTofDataMap iter = range.first;
5045 for( unsigned int i = 0; i < count_if6_l12; i++, iter++ ) {
5046 tofDataAnalysis( (*iter).second, 2 );
5047 }
5048 }
5049
5050 if(count_if6_r1>0)
5051 {
5052 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r1);
5053 IterTofDataMap iter = range.first;
5054 for( unsigned int i = 0; i < count_if6_r1; i++, iter++ ) {
5055 tofDataAnalysis( (*iter).second, 2 );
5056 }
5057 }
5058 if(count_if6_r2>0)
5059 {
5060 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r2);
5061 IterTofDataMap iter = range.first;
5062 for( unsigned int i = 0; i < count_if6_r2; i++, iter++ ) {
5063 tofDataAnalysis( (*iter).second, 2 );
5064 }
5065 }
5066 if(count_if6_r3>0)
5067 {
5068 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r3);
5069 IterTofDataMap iter = range.first;
5070 for( unsigned int i = 0; i < count_if6_r3; i++, iter++ ) {
5071 tofDataAnalysis( (*iter).second, 2 );
5072 }
5073 }
5074 if(count_if6_r4>0)
5075 {
5076 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r4);
5077 IterTofDataMap iter = range.first;
5078 for( unsigned int i = 0; i < count_if6_r4; i++, iter++ ) {
5079 tofDataAnalysis( (*iter).second, 2 );
5080 }
5081 }
5082 if(count_if6_r5>0)
5083 {
5084 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r5);
5085 IterTofDataMap iter = range.first;
5086 for( unsigned int i = 0; i < count_if6_r5; i++, iter++ ) {
5087 tofDataAnalysis( (*iter).second, 2 );
5088 }
5089 }
5090 if(count_if6_r6>0)
5091 {
5092 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r6);
5093 IterTofDataMap iter = range.first;
5094 for( unsigned int i = 0; i < count_if6_r6; i++, iter++ ) {
5095 tofDataAnalysis( (*iter).second, 2 );
5096 }
5097 }
5098 if(count_if6_r7>0)
5099 {
5100 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r7);
5101 IterTofDataMap iter = range.first;
5102 for( unsigned int i = 0; i < count_if6_r7; i++, iter++ ) {
5103 tofDataAnalysis( (*iter).second, 2 );
5104 }
5105 }
5106 if(count_if6_r8>0)
5107 {
5108 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r8);
5109 IterTofDataMap iter = range.first;
5110 for( unsigned int i = 0; i < count_if6_r8; i++, iter++ ) {
5111 tofDataAnalysis( (*iter).second, 2 );
5112 }
5113 }
5114 if(count_if6_r9>0)
5115 {
5116 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r9);
5117 IterTofDataMap iter = range.first;
5118 for( unsigned int i = 0; i < count_if6_r9; i++, iter++ ) {
5119 tofDataAnalysis( (*iter).second, 2 );
5120 }
5121 }
5122 if(count_if6_r10>0)
5123 {
5124 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r10);
5125 IterTofDataMap iter = range.first;
5126 for( unsigned int i = 0; i < count_if6_r10; i++, iter++ ) {
5127 tofDataAnalysis( (*iter).second, 2 );
5128 }
5129 }
5130 if(count_if6_r11>0)
5131 {
5132 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r11);
5133 IterTofDataMap iter = range.first;
5134 for( unsigned int i = 0; i < count_if6_r11; i++, iter++ ) {
5135 tofDataAnalysis( (*iter).second, 2 );
5136 }
5137 }
5138 if(count_if6_r12>0)
5139 {
5140 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_r12);
5141 IterTofDataMap iter = range.first;
5142 for( unsigned int i = 0; i < count_if6_r12; i++, iter++ ) {
5143 tofDataAnalysis( (*iter).second, 2 );
5144 }
5145 }
5146 if(count_if6_ll1>0)
5147 {
5148 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll1);
5149 IterTofDataMap iter = range.first;
5150 for( unsigned int i = 0; i < count_if6_ll1; i++, iter++ ) {
5151 tofDataAnalysis( (*iter).second, 2 );
5152 }
5153 }
5154 if(count_if6_ll2>0)
5155 {
5156 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll2);
5157 IterTofDataMap iter = range.first;
5158 for( unsigned int i = 0; i < count_if6_ll2; i++, iter++ ) {
5159 tofDataAnalysis( (*iter).second, 2 );
5160 }
5161 }
5162 if(count_if6_ll3>0)
5163 {
5164 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll3);
5165 IterTofDataMap iter = range.first;
5166 for( unsigned int i = 0; i < count_if6_ll3; i++, iter++ ) {
5167 tofDataAnalysis( (*iter).second, 2 );
5168 }
5169 }
5170 if(count_if6_ll4>0)
5171 {
5172 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll4);
5173 IterTofDataMap iter = range.first;
5174 for( unsigned int i = 0; i < count_if6_ll4; i++, iter++ ) {
5175 tofDataAnalysis( (*iter).second, 2 );
5176 }
5177 }
5178 if(count_if6_ll5>0)
5179 {
5180 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll5);
5181 IterTofDataMap iter = range.first;
5182 for( unsigned int i = 0; i < count_if6_ll5; i++, iter++ ) {
5183 tofDataAnalysis( (*iter).second, 2 );
5184 }
5185 }
5186 if(count_if6_ll6>0)
5187 {
5188 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll6);
5189 IterTofDataMap iter = range.first;
5190 for( unsigned int i = 0; i < count_if6_ll6; i++, iter++ ) {
5191 tofDataAnalysis( (*iter).second, 2 );
5192 }
5193 }
5194 if(count_if6_ll7>0)
5195 {
5196 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll7);
5197 IterTofDataMap iter = range.first;
5198 for( unsigned int i = 0; i < count_if6_ll7; i++, iter++ ) {
5199 tofDataAnalysis( (*iter).second, 2 );
5200 }
5201 }
5202 if(count_if6_ll8>0)
5203 {
5204 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll8);
5205 IterTofDataMap iter = range.first;
5206 for( unsigned int i = 0; i < count_if6_ll8; i++, iter++ ) {
5207 tofDataAnalysis( (*iter).second, 2 );
5208 }
5209 }
5210 if(count_if6_ll9>0)
5211 {
5212 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll9);
5213 IterTofDataMap iter = range.first;
5214 for( unsigned int i = 0; i < count_if6_ll9; i++, iter++ ) {
5215 tofDataAnalysis( (*iter).second, 2 );
5216 }
5217 }
5218 if(count_if6_ll10>0)
5219 {
5220 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll10);
5221 IterTofDataMap iter = range.first;
5222 for( unsigned int i = 0; i < count_if6_ll10; i++, iter++ ) {
5223 tofDataAnalysis( (*iter).second, 2 );
5224 }
5225 }
5226 if(count_if6_ll11>0)
5227 {
5228 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll11);
5229 IterTofDataMap iter = range.first;
5230 for( unsigned int i = 0; i < count_if6_ll11; i++, iter++ ) {
5231 tofDataAnalysis( (*iter).second, 2 );
5232 }
5233 }
5234 if(count_if6_ll12>0)
5235 {
5236 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_ll12);
5237 IterTofDataMap iter = range.first;
5238 for( unsigned int i = 0; i < count_if6_ll12; i++, iter++ ) {
5239 tofDataAnalysis( (*iter).second, 2 );
5240 }
5241 }
5242
5243 if(count_if6_rr1>0)
5244 {
5245 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr1);
5246 IterTofDataMap iter = range.first;
5247 for( unsigned int i = 0; i < count_if6_rr1; i++, iter++ ) {
5248 tofDataAnalysis( (*iter).second, 2 );
5249 }
5250 }
5251 if(count_if6_rr2>0)
5252 {
5253 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr2);
5254 IterTofDataMap iter = range.first;
5255 for( unsigned int i = 0; i < count_if6_rr2; i++, iter++ ) {
5256 tofDataAnalysis( (*iter).second, 2 );
5257 }
5258 }
5259 if(count_if6_rr3>0)
5260 {
5261 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr3);
5262 IterTofDataMap iter = range.first;
5263 for( unsigned int i = 0; i < count_if6_rr3; i++, iter++ ) {
5264 tofDataAnalysis( (*iter).second, 2 );
5265 }
5266 }
5267 if(count_if6_rr4>0)
5268 {
5269 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr4);
5270 IterTofDataMap iter = range.first;
5271 for( unsigned int i = 0; i < count_if6_rr4; i++, iter++ ) {
5272 tofDataAnalysis( (*iter).second, 2 );
5273 }
5274 }
5275 if(count_if6_rr5>0)
5276 {
5277 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr5);
5278 IterTofDataMap iter = range.first;
5279 for( unsigned int i = 0; i < count_if6_rr5; i++, iter++ ) {
5280 tofDataAnalysis( (*iter).second, 2 );
5281 }
5282 }
5283 if(count_if6_rr6>0)
5284 {
5285 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr6);
5286 IterTofDataMap iter = range.first;
5287 for( unsigned int i = 0; i < count_if6_rr6; i++, iter++ ) {
5288 tofDataAnalysis( (*iter).second, 2 );
5289 }
5290 }
5291 if(count_if6_rr7>0)
5292 {
5293 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr7);
5294 IterTofDataMap iter = range.first;
5295 for( unsigned int i = 0; i < count_if6_rr7; i++, iter++ ) {
5296 tofDataAnalysis( (*iter).second, 2 );
5297 }
5298 }
5299 if(count_if6_rr8>0)
5300 {
5301 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr8);
5302 IterTofDataMap iter = range.first;
5303 for( unsigned int i = 0; i < count_if6_rr8; i++, iter++ ) {
5304 tofDataAnalysis( (*iter).second, 2 );
5305 }
5306 }
5307 if(count_if6_rr9>0)
5308 {
5309 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr9);
5310 IterTofDataMap iter = range.first;
5311 for( unsigned int i = 0; i < count_if6_rr9; i++, iter++ ) {
5312 tofDataAnalysis( (*iter).second, 2 );
5313 }
5314 }
5315 if(count_if6_rr10>0)
5316 {
5317 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr10);
5318 IterTofDataMap iter = range.first;
5319 for( unsigned int i = 0; i < count_if6_rr10; i++, iter++ ) {
5320 tofDataAnalysis( (*iter).second, 2 );
5321 }
5322 }
5323 if(count_if6_rr11>0)
5324 {
5325 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr11);
5326 IterTofDataMap iter = range.first;
5327 for( unsigned int i = 0; i < count_if6_rr11; i++, iter++ ) {
5328 tofDataAnalysis( (*iter).second, 2 );
5329 }
5330 }
5331 if(count_if6_rr12>0)
5332 {
5333 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify_if6_rr12);
5334 IterTofDataMap iter = range.first;
5335 for( unsigned int i = 0; i < count_if6_rr12; i++, iter++ ) {
5336 tofDataAnalysis( (*iter).second, 2 );
5337 }
5338 }
5339
5340
5341
5342
5343
5344 // ------------------------------------------------------------------------
5345 // --------------------Old Tof analyis, but also barrel part! -------------
5346 // ------------------------------------------------------------------------
5347 if( ( ( m_hitCase == InnerLayer ) || ( m_hitCase == DoubleLayer ) ) && ( m_id1 > -1 ) ) {
5348 int tofid0 = m_id1;
5349 identify0 = TofID::getIntID( 1, 0, tofid0, 0 );
5350 count0 = tofDataMap.count( identify0 );
5351 int tofid1 = tofid0 - 1;
5352 if( tofid1 == -1 ) { tofid1 = 87; }
5353 identify1 = TofID::getIntID( 1, 0, tofid1, 0 );
5354 count1 = tofDataMap.count( identify1 );
5355 int tofid2 = tofid0 + 1;
5356 if( tofid2 == 88 ) { tofid2 = 0; }
5357 identify2 = TofID::getIntID( 1, 0, tofid2, 0 );
5358 count2 = tofDataMap.count( identify2 );
5359
5360 }
5361
5362 if( ( m_hitCase == EastEndcap ) && ( m_id1 > -1 ) ) {
5363 int tofid0 = m_id1;
5364 identify0 = TofID::getIntID( 0, 0, tofid0, 0 );
5365 count0 = tofDataMap.count( identify0 );
5366 int tofid1 = tofid0 - 1;
5367 if( tofid1 == -1 ) { tofid1 = 47; }
5368 identify1 = TofID::getIntID( 0, 0, tofid1, 0 );
5369 count1 = tofDataMap.count( identify1 );
5370 int tofid2 = tofid0 + 1;
5371 if( tofid2 == 48 ) { tofid2 = 0; }
5372 identify2 = TofID::getIntID( 0, 0, tofid2, 0 );
5373 count2 = tofDataMap.count( identify2 );
5374
5375 //std::cout << "MrpcTrack setTofData EastEndcap c0 c1 c2 : " << count0 << " | " << count1 << " | " << count2 << std::endl;
5376 }
5377
5378 if( ( m_hitCase == WestEndcap ) && ( m_id1 > -1 ) ) {
5379 int tofid0 = m_id1 - 48;
5380 identify0 = TofID::getIntID( 2, 0, tofid0, 0 );
5381 count0 = tofDataMap.count( identify0 );
5382 int tofid1 = tofid0 - 1;
5383 if( tofid1 == -1 ) { tofid1 = 47; }
5384 identify1 = TofID::getIntID( 2, 0, tofid1, 0 );
5385 count1 = tofDataMap.count( identify1 );
5386 int tofid2 = tofid0 + 1;
5387 if( tofid2 == 48 ) { tofid2 = 0; }
5388 identify2 = TofID::getIntID( 2, 0, tofid2, 0 );
5389 count2 = tofDataMap.count( identify2 );
5390
5391 //std::cout << "MrpcTrack setTofData WsstEndcap c0 c1 c2 : " << count0 << " | "<< count1 << " | " << count2 <<std::endl;
5392 }
5393
5394 if( count0 > 0 ) {
5395 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify0 );
5396 IterTofDataMap iter = range.first;
5397 for( unsigned int i = 0; i < count0; i++, iter++ ) {
5398 tofDataAnalysis( (*iter).second, 1 );
5399 }
5400 }
5401 if( count1 > 0 ) {
5402 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify1 );
5403 IterTofDataMap iter = range.first;
5404 for( unsigned int i = 0; i < count1; i++, iter++ ) {
5405 tofDataAnalysis( (*iter).second, 2 );
5406 }
5407 }
5408 if( count2 > 0 ) {
5409 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify2 );
5410 IterTofDataMap iter = range.first;
5411 for( unsigned int i = 0; i < count2; i++, iter++ ) {
5412 tofDataAnalysis( (*iter).second, 2 );
5413 }
5414 }
5415
5416 if( ( count0 == 0 ) && ( count1 == 0 ) && ( count2 == 0 )
5417 && (count_it==0) && (count_l==0) && (count_r==0) && (count_b==0) && (count_u==0) && (count_ru==0) && (count_rb==0) && (count_lu==0) && (count_lb==0)
5418 && (count_uu==0) && (count_bb==0) && (count_ruu==0) && (count_luu==0) && (count_rbb==0) && (count_lbb==0)
5419 //Neighborhood if=3:
5420 && (count_luuu==0) && (count_lbbb==0) && (count_ruuu==0) && (count_rbbb==0) && (count_uuu==0) && (count_bbb==0)
5421 //Neighborhood if=4:
5422 && (count_luuul==0) && (count_lbbbl==0) && (count_ruuur==0) && (count_rbbbr==0) && (count_luul==0) && (count_lbbl==0) && (count_ruur==0) && (count_rbbr==0)
5423 && (count_lul==0) && (count_lbl==0) && (count_rur==0) && (count_rbr==0) && (count_ll==0) && (count_rr==0)
5424 //Neighborhood if=5
5425 && (count_if5_m1 ==0) && (count_if5_m2 ==0) && (count_if5_m3 ==0) && (count_if5_m4 ==0) && (count_if5_m5 ==0) && (count_if5_m6 ==0) && (count_if5_m7 ==0) && (count_if5_m8 ==0) && (count_if5_m9 ==0)
5426 && (count_if5_m10 ==0) && (count_if5_m11 ==0) && (count_if5_m12 ==0)
5427 && (count_if5_l1 ==0) && (count_if5_l2 ==0) && (count_if5_l3 ==0)&& (count_if5_l4 ==0) && (count_if5_l5 ==0) && (count_if5_l6 ==0) && (count_if5_l7 ==0)&& (count_if5_l8 ==0) && (count_if5_l9 ==0)
5428 && (count_if5_l10 ==0) && (count_if5_l11 ==0) && (count_if5_l12 ==0)
5429 && (count_if5_r1 ==0) && (count_if5_r2 ==0) && (count_if5_r3 ==0)&& (count_if5_r4 ==0) && (count_if5_r5 ==0) && (count_if5_r6 ==0) && (count_if5_r7 ==0)&& (count_if5_r8 ==0) && (count_if5_r9 ==0)
5430 && (count_if5_r10 ==0) && (count_if5_r11 ==0) && (count_if5_r12 ==0)
5431 //Neighborhood if=6
5432 && (count_if6_m1 ==0) && (count_if6_m2 ==0) && (count_if6_m3 ==0) && (count_if6_m4 ==0) && (count_if6_m5 ==0) && (count_if6_m6 ==0) && (count_if6_m7 ==0) && (count_if6_m8 ==0) && (count_if6_m9 ==0)
5433 && (count_if6_m10 ==0) && (count_if6_m11 ==0) && (count_if6_m12 ==0)
5434 && (count_if6_l1 ==0) && (count_if6_l2 ==0) && (count_if6_l3 ==0)&& (count_if6_l4 ==0) && (count_if6_l5 ==0) && (count_if6_l6 ==0) && (count_if6_l7 ==0)&& (count_if6_l8 ==0) && (count_if6_l9 ==0)
5435 && (count_if6_l10 ==0) && (count_if6_l11 ==0) && (count_if6_l12 ==0)
5436 && (count_if6_r1 ==0) && (count_if6_r2 ==0) && (count_if6_r3 ==0)&& (count_if6_r4 ==0) && (count_if6_r5 ==0) && (count_if6_r6 ==0) && (count_if6_r7 ==0)&& (count_if6_r8 ==0) && (count_if6_r9 ==0)
5437 && (count_if6_r10 ==0) && (count_if6_r11 ==0) && (count_if6_r12 ==0)
5438 && (count_if6_ll1 ==0) && (count_if6_ll2 ==0) && (count_if6_ll3 ==0)&& (count_if6_ll4 ==0) && (count_if6_ll5 ==0) && (count_if6_ll6 ==0) && (count_if6_ll7 ==0)&& (count_if6_ll8 ==0)
5439 && (count_if6_ll9 ==0) && (count_if6_ll10 ==0) && (count_if6_ll11 ==0) && (count_if6_ll12 ==0)
5440 && (count_if6_rr1 ==0) && (count_if6_rr2 ==0) && (count_if6_rr3 ==0)&& (count_if6_rr4 ==0) && (count_if6_rr5 ==0) && (count_if6_rr6 ==0) && (count_if6_rr7 ==0)&& (count_if6_rr8 ==0)
5441 && (count_if6_rr9 ==0) && (count_if6_rr10 ==0) && (count_if6_rr11 ==0) && (count_if6_rr12 ==0)
5442
5443 ) {
5444
5445 //std::cout << "MrpcTrack setTofData - All count variables are equal 0. m_hitCase | m_id1 " << m_hitCase << " | " << m_id1 << std::endl;
5446 if( m_hitCase != DoubleLayer ) {
5447 m_hitCase = NoHit;
5448 m_quality = 12;
5449 }
5450 else {
5451 m_hitCase = OuterLayer;
5452 }
5453 }
5454
5455 if( ( ( m_hitCase == OuterLayer ) || ( m_hitCase == DoubleLayer ) ) && ( m_id2 > 87 ) ) {
5456 int tofid0 = m_id2 - 88;
5457 identify0 = TofID::getIntID( 1, 1, tofid0, 0 );
5458 count0 = tofDataMap.count( identify0 );
5459 int tofid1 = tofid0 - 1;
5460 if( tofid1 == -1 ) { tofid1 = 87; }
5461 identify1 = TofID::getIntID( 1, 1, tofid1, 0 );
5462 count1 = tofDataMap.count( identify1 );
5463 int tofid2 = tofid0 + 1;
5464 if( tofid2 == 88 ) { tofid2 = 0; }
5465 identify2 = TofID::getIntID( 1, 1, tofid2, 0 );
5466 count2 = tofDataMap.count( identify2 );
5467
5468 if( count0 > 0 ) {
5469 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify0 );
5470 IterTofDataMap iter = range.first;
5471 for( unsigned int i = 0; i < count0; i++, iter++ ) {
5472 tofDataAnalysis( (*iter).second, 3 );
5473 }
5474 }
5475 if( count1 > 0 ) {
5476 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify1 );
5477 IterTofDataMap iter = range.first;
5478 for( unsigned int i = 0; i < count1; i++, iter++ ) {
5479 tofDataAnalysis( (*iter).second, 4 );
5480 }
5481 }
5482 if( count2 > 0 ) {
5483 pair< IterTofDataMap, IterTofDataMap > range = tofDataMap.equal_range( identify2 );
5484 IterTofDataMap iter = range.first;
5485 for( unsigned int i = 0; i < count2; i++, iter++ ) {
5486 tofDataAnalysis( (*iter).second, 4 );
5487 }
5488 }
5489
5490 if( ( count0 == 0 ) && ( count1 == 0 ) && ( count2 == 0 ) ) {
5491 if( m_hitCase != DoubleLayer ) {
5492 m_hitCase = NoHit;
5493 m_quality = 12;
5494 }
5495 else {
5496 m_hitCase = InnerLayer;
5497 }
5498 }
5499 }
5500
5501 return;
5502}
std::string help()
Definition: HelloServer.cpp:35
std::multimap< unsignedint, TofData * >::iterator IterTofDataMap
Definition: TofData.h:245
int get_mrpc_partid_neighbour(std::string, int, int)
Definition: MrpcTrack.cxx:7287
void tofDataAnalysis(TofData *tof, unsigned int iflag)
Definition: MrpcTrack.cxx:5508
int get_mrpc_stripid_neighbour(std::string, int, int)
Definition: MrpcTrack.cxx:7184
static value_type getIntID_mrpc(int partID, int scinNum)
Definition: TofID.cxx:216
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
Definition: TofID.cxx:200

◆ size1()

int MrpcTrack::size1 ( ) const
inline

Definition at line 48 of file MrpcTrack.h.

48{ return m_tofData1.size(); }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ size2()

int MrpcTrack::size2 ( ) const
inline

Definition at line 49 of file MrpcTrack.h.

49{ return m_tofData2.size(); }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ size3()

int MrpcTrack::size3 ( ) const
inline

Definition at line 50 of file MrpcTrack.h.

50{ return m_tofData3.size(); }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ size4()

int MrpcTrack::size4 ( ) const
inline

Definition at line 51 of file MrpcTrack.h.

51{ return m_tofData4.size(); }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ t0Stat()

int MrpcTrack::t0Stat ( ) const
inline

Definition at line 105 of file MrpcTrack.h.

105{ return m_t0Stat; }

Referenced by setExtTrack().

◆ tdc1()

double MrpcTrack::tdc1 ( ) const
inline

Definition at line 87 of file MrpcTrack.h.

87{ return m_tdc1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tdc2()

double MrpcTrack::tdc2 ( ) const
inline

Definition at line 88 of file MrpcTrack.h.

88{ return m_tdc2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tdc3()

double MrpcTrack::tdc3 ( ) const
inline

Definition at line 89 of file MrpcTrack.h.

89{ return m_tdc3; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tdc4()

double MrpcTrack::tdc4 ( ) const
inline

Definition at line 90 of file MrpcTrack.h.

90{ return m_tdc4; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tdiff1()

double MrpcTrack::tdiff1 ( ) const
inline

Definition at line 102 of file MrpcTrack.h.

102{ return m_tdiff1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tdiff2()

double MrpcTrack::tdiff2 ( ) const
inline

Definition at line 103 of file MrpcTrack.h.

103{ return m_tdiff2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ texp()

double MrpcTrack::texp ( unsigned int  i) const
inline

Definition at line 94 of file MrpcTrack.h.

94{ return m_texp[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ texpInner()

double MrpcTrack::texpInner ( unsigned int  i) const
inline

Definition at line 92 of file MrpcTrack.h.

92{ return m_texpInner[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ texpOuter()

double MrpcTrack::texpOuter ( unsigned int  i) const
inline

Definition at line 93 of file MrpcTrack.h.

93{ return m_texpOuter[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ theta1()

double MrpcTrack::theta1 ( ) const
inline

Definition at line 52 of file MrpcTrack.h.

52{ return m_theta1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ theta2()

double MrpcTrack::theta2 ( ) const
inline

Definition at line 53 of file MrpcTrack.h.

53{ return m_theta2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tof()

double MrpcTrack::tof ( unsigned int  i) const
inline

◆ tof1()

double MrpcTrack::tof1 ( unsigned int  i) const
inline

Definition at line 75 of file MrpcTrack.h.

75{ return m_tof1[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tof11()

double MrpcTrack::tof11 ( unsigned int  i) const
inline

Definition at line 71 of file MrpcTrack.h.

71{ return m_tof11[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tof12()

double MrpcTrack::tof12 ( unsigned int  i) const
inline

Definition at line 72 of file MrpcTrack.h.

72{ return m_tof12[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tof2()

double MrpcTrack::tof2 ( unsigned int  i) const
inline

Definition at line 76 of file MrpcTrack.h.

76{ return m_tof2[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tof21()

double MrpcTrack::tof21 ( unsigned int  i) const
inline

Definition at line 73 of file MrpcTrack.h.

73{ return m_tof21[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tof22()

double MrpcTrack::tof22 ( unsigned int  i) const
inline

Definition at line 74 of file MrpcTrack.h.

74{ return m_tof22[i]; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ tofData1()

std::vector< TofData * > MrpcTrack::tofData1 ( ) const
inline

Definition at line 46 of file MrpcTrack.h.

46{ return m_tofData1; }

Referenced by compareTofData(), compareTofDataEndcap(), compareTofDataMRPC(), findTofDataBarrel(), findTofDataEndcap(), and findTofDataMRPC().

◆ tofData2()

std::vector< TofData * > MrpcTrack::tofData2 ( ) const
inline

Definition at line 47 of file MrpcTrack.h.

47{ return m_tofData2; }

Referenced by compareTofData(), compareTofDataEndcap(), compareTofDataMRPC(), findTofDataBarrel(), findTofDataEndcap(), and findTofDataMRPC().

◆ tofDataAnalysis()

void MrpcTrack::tofDataAnalysis ( TofData tof,
unsigned int  iflag 
)

Definition at line 5508 of file MrpcTrack.cxx.

5508 {
5509
5510 unsigned int qual = tof->quality();
5511
5512 if( ( qual & 0x10 ) == 0 ) {
5513
5514 // qual = ( qual | 0x310 ); // zadc, ztdc unmatched, and track matched
5515 qual = ( qual | 0x10 ); // zadc, ztdc unmatched, and track matched
5516
5517 if( tof->barrel() ) { // Barrel, Endcap has been done
5518 if( ( tof->quality() == 0x7 ) || ( tof->quality() == 0xd ) ) {
5519 qual = ( qual | 0x20 ); // lost one Q
5520 }
5521
5522 if( ( tof->quality() == 0xb ) || ( tof->quality() == 0xe ) ) {
5523 qual = ( qual | 0x40 ); // lost one T
5524 }
5525
5526 if( ( tof->quality() == 0x3 ) || ( tof->quality() == 0xc ) ) {
5527 qual = ( qual | 0x80 ); // single end
5528 }
5529
5530 if( ( tof->quality() & 0x5 ) == 0x5 ) {
5531 double ztdc = tofCaliSvc->ZTDC( tof->tdc1(), tof->tdc2(), tof->tofId() );
5532 tof->setZTdc( ztdc );
5533 /*
5534 if( ( ( (iflag==1) || (iflag==2) ) && ( abs(ztdc-m_zrhit1)<ztdc_Cut ) ) || ( ( (iflag==3) || (iflag==4) ) && ( abs(ztdc-m_zrhit2)<ztdc_Cut ) ) ) {
5535 qual = ( qual & 0xeffffeff ); // Z_tdc un-matched.
5536 }
5537 else {
5538 qual = ( qual | 0x100 );
5539 }
5540 */
5541 }
5542
5543 if( ( tof->quality() & 0xa ) == 0xa ) {
5544 double zadc = tofCaliSvc->ZADC( tof->adc1(), tof->adc2(), tof->tofId() );
5545 tof->setZAdc( zadc );
5546 /*
5547 if( ( ( (iflag==1) || (iflag==2) ) && ( abs(zadc-m_zrhit1)<zadc_Cut ) ) || ( ( (iflag==3) || (iflag==4) ) && ( abs(zadc-m_zrhit2)<zadc_Cut ) ) ) {
5548 qual = ( qual & 0xeffffbff ); // Z_adc un-matched.
5549 }
5550 else {
5551 qual = ( qual | 0x200 );
5552 }
5553 */
5554 }
5555 }//close if barrel
5556
5557 tof->setQuality( qual );
5558 }
5559
5560 if( iflag == 1 ) m_tofData1.push_back( tof );
5561 else if( iflag == 2 ) m_tofData2.push_back( tof );
5562 else if( iflag == 3 ) m_tofData3.push_back( tof );
5563 else if( iflag == 4 ) m_tofData4.push_back( tof );
5564 else {
5565 cout << "MrpcRec::MrpcTrack::TofDataAnalylsis: the Flag should be 1-4, out of the Range!" << endl;
5566 }
5567
5568 return;
5569}
virtual const double ZTDC(double tleft, double tright, unsigned id)=0
virtual const double ZADC(double qleft, double qright, unsigned id)=0

Referenced by setTofData().

◆ tofDataStudy()

void MrpcTrack::tofDataStudy ( )

◆ tofId1()

int MrpcTrack::tofId1 ( ) const
inline

Definition at line 60 of file MrpcTrack.h.

60{ return m_tofId1; }

Referenced by MrpcCheckDigi::Fill_TofTrack(), and setExtTrack().

◆ tofId2()

int MrpcTrack::tofId2 ( ) const
inline

Definition at line 61 of file MrpcTrack.h.

61{ return m_tofId2; }

Referenced by MrpcCheckDigi::Fill_TofTrack(), and setExtTrack().

◆ tofTrackId()

int MrpcTrack::tofTrackId ( ) const
inline

Definition at line 28 of file MrpcTrack.h.

28{ return m_tofTrackId; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ trackId()

int MrpcTrack::trackId ( ) const
inline

Definition at line 27 of file MrpcTrack.h.

27{ return m_trackId; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ zadc1()

double MrpcTrack::zadc1 ( ) const
inline

Definition at line 98 of file MrpcTrack.h.

98{ return m_zadc1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ zadc2()

double MrpcTrack::zadc2 ( ) const
inline

Definition at line 99 of file MrpcTrack.h.

99{ return m_zadc2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ zrhit1() [1/2]

double MrpcTrack::zrhit1 ( ) const
inline

Definition at line 37 of file MrpcTrack.h.

37{ return m_zrhit1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ zrhit1() [2/2]

double MrpcTrack::zrhit1 ( unsigned int  i) const
inline

Definition at line 42 of file MrpcTrack.h.

42{ return m_zr1[i]; }

◆ zrhit2() [1/2]

double MrpcTrack::zrhit2 ( ) const
inline

Definition at line 38 of file MrpcTrack.h.

38{ return m_zrhit2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ zrhit2() [2/2]

double MrpcTrack::zrhit2 ( unsigned int  i) const
inline

Definition at line 43 of file MrpcTrack.h.

43{ return m_zr2[i]; }

◆ ztdc1()

double MrpcTrack::ztdc1 ( ) const
inline

Definition at line 96 of file MrpcTrack.h.

96{ return m_ztdc1; }

Referenced by MrpcCheckDigi::Fill_TofTrack().

◆ ztdc2()

double MrpcTrack::ztdc2 ( ) const
inline

Definition at line 97 of file MrpcTrack.h.

97{ return m_ztdc2; }

Referenced by MrpcCheckDigi::Fill_TofTrack().


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