# Presentation: 107529

## Muon Coincidence Filter

- E. Gregores, M. Souza, S.F.N.

**	****	****  ****	****  ****	****     ****PDT (drift tube) ****	****        **
**	****	****WAMUS (central) :                                       ****A (A********)**
**	****	****	****	****     ****CMSC (scintillator)  ****B**
**Muon Detector****:  ****	****	****	****  ****	****          ****C (****Cosmic Cap)**
**	****	****	****                    ****MDT (drift tube)**
**	****	****FAMUS (forward) : **
**	****	****	****	****      ****FMSC (scintillator)**
- 	8 octants in the transversal plane
- 	3, 4 or 5 barrels along the z-axis
- 	The B and C layer central counters have two PMT’s
- Purpose : pass events with coincidence between A and C layers

## // Run the muon unpacker and check if there are at least 2 hits

**int nHit =_muoUnpack->getMuoHitCollection()->getMSCHits().size();          **
**if (nHit < 2)return _retval = L3Return::error ;**
- // Gets the collection of muon hits.
**const MSCHitCollection& mscCollection = _muoUnpack->**
**      ****getMuoHitCollection()->getMSCHits();**
- // Checks channel ID for hits at layer C PMT's
**muoindex = muoIndexTrans.getMuoIndex(_modID, _chanIdC1[0]);**
**nHit = mscCollection.getNHits(muoIndex);**
**if(nHit == 0) haveHit = false;**
- // Require at least one hit at A layer.
**if(haveHit){**
**   ****for(i = 0; i < _nchanA1 && !_gotCoinc; i++){**
**      ****muoIndex = muoIndexTrans.getMuoIndex(_modID, _chanIdA1[i]);**
**      ****nHit = mscCollection.getNHits(muoIndex);**
**      ****if(nHit != 0) _gotCoinc = true;**
**	****      ****}**
**           ****}**
**         **

## We construct the RCP file to list the relevant channel ID:

**15    14,13   12,11   10,9,8     7       6,5,4,3,2,1,0**
**Type  Region  Layer   Octant   Sub-Oct       PMT #**
- Drift        Central       A, B, C          0, ... , 7
- Scint       N or S
- After transforming to decimal we have for the A &C-layer of $51:
**int channelIdC2 =   (37164)**
**int channelIdA  = (            33024 33025 33026 33027 33028 33029**
**       ****33030 33031 33032 33033 33034 33035 33036 33037 33038**
**       ****33040 33041 33042 33043 33044 33045 33046 33047 33048 33049**
**       ****33050 33051 33052 33053 33054       33056 33057 33058 33059**
**       ****33060 33061 33062 33063 33064 33065 33066 33067 33068 33069**
**       ****33070**
**                   ****33152 33153 33154 33155 33156 33157 33158 33159**
**       ****33160 33161 33162 33163 33164 33165 33166 33167 33168 33169**
**       ****33170 33171 33172 33173 33174 33175 33176 33177 33178 33179**
**       ****33180 33181 33182 33183 33184 33185 33186 33187 33188 33189**
**       ****33190 33191 33192 33193 33194 33195 33196 33197 33198)**

## On line test of the coincidence filter:

- C Layer:        37148 = 1001.0001.0001.1100 = 911C
-                         37164 = 1001.0001.0010.1100 = 912C
-                         37260 = 1001.0001.1000.1100 = 918C
- A Layer:        33024 = 1000.0001.0000.0000 = 8100
-                          33198 = 1000.0001.1010.1110 = 81AE
- We examined 11 events in the raw data:
**. . .**
**00000c40  00340051 0068f108 00001800 000a0003  .4.Q.h..........**
**00000c50  22050000 0000a09c a000a01c 911828c2  ".............(.**
**00000c60  ****911c****2312 911e1217 91252422 912919d2  ..#......%$".)..**
**00000c70  23040000 0000a1c4 a0a0a08c 91821be7  #...............**
**00000c80  91831637 91862187 918718c7 02000000  ...7..!.........**
**00000c90  0000a170 a05ca054 03010000 0000a000  ...p.\.T........**
**00000ca0  a09ca220 ****818e****1b59 00000065 7a5f003b  .......Y...ez_.;**
**00000cb0  3333cccc 4444bbbb 5555aaaa 66669999  33..DD..UU..ff..**
**00000cc0  77778888 88887777 00000000 70c16759  ww....ww....p.gY**
**. . .**

## 0

**0**

**1**

**2**

**3**

**4**

**5**

**6**

**7**

**West**

**East**

**C Layer**

**A Layer**

## Future improvements

- Try to control the channels in coincidence in the tool parameters instead of in RCP file;
- Create a more general definition of the regions where to search for coincidence. This should allow to look for coincidence between any two Octant/Layer segment;
- 3)  Implement the method **getTime()** and **getTimeError() **[Hedin/Fortner]** **to access the first and second time in the **MSCHits **of both PMT’s in the C layer.