/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/geometry/DiracBoard.cpp

Go to the documentation of this file.
00001 /* @version $Revision: 1328 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2011-10-03 17:04:17 +0200 (Mon, 03 Oct 2011) $ */
00002 
00003 #include "geometry/DiracBoard.hh"
00004 #include "geometry/DiracChip.hh"
00005 
00006 #include <iostream>
00007 #include "tools/Log.hh"
00008 
00009 using namespace std;
00010 
00011 //--------------------------//
00012 // not used -- see init()
00013 static int HRChipMap(const int chNum) {
00014   int div = chNum / 6, mod = chNum % 6;
00015   return ( (((div & 1) == 0) ? mod : (6 - mod)) + (div * 6) + 1);
00016 } // HRChipMap
00017 
00018 //--------------- Constructor -------------//
00019 DiracBoard::DiracBoard(const Chamber& aChamber, const i32 aCol, const i32 aRow, const ui32 nbColumns, const ui32 nbRows,const i32 aId)
00020       : Board(aChamber, aCol, aRow, nbColumns, nbRows, aId)
00021 {
00022   //FILE_LOG(logDEBUG) << "---DiracBoard constructor id" << id << endl;
00023 //  init();
00024   //FILE_LOG(logDEBUG) << *this << endl;
00025 }
00026 
00027 //--------------- Destructor -------------//
00028 
00029 DiracBoard::~DiracBoard()
00030 {
00031   //FILE_LOG(logDEBUG) << "---DiracBoard destructor" << endl;
00032 }
00033 
00034 //--------------------------//
00035 /*
00036     implantation of the chips (1 chip = 8*8 channels)
00037     1 "square meter" chamber :
00038                                    <--96cm-->
00039                   +-------------------------+-------------------------+
00040             +-----+ 0     <-- 6 chips -->^  |                         |
00041             |     |                      |  |                         |
00042             | DIF | 1 board = 24 chips   4 chips                      |
00043             |     |                      |  |                         |
00044             +-----+                      v23|                       48|
00045                   +-------------------------+-------------------------+
00046             +-----+ 0     <-- 6 chips -->^  |                         |
00047             |     |                      |  |                         |
00048             | DIF | 1 board = 24 chips   4  |                         |
00049             |     |                      |  |                         |
00050             +-----+                      v23|                       48|
00051                   +-------------------------+-------------------------+
00052             +-----+ 0     <-- 6 chips -->^  |                         |
00053             |     |                      |  |                         |
00054             | DIF | 1 board = 24 chips   4  |                         |
00055             |     |                      |  |                         |
00056             +-----+                      v23|                       48|
00057                   +-------------------------+-------------------------+
00058 
00059 */
00060 void DiracBoard::init()
00061 {
00062   //FILE_LOG(logDEBUG) << "---DiracBoard " << nbColumns << "cols, " << nbRows << " rows" << endl;
00063   for (int lrow = 0; lrow < nbRows; ++lrow) {
00064     for (int lcol = 0; lcol < nbColumns; ++lcol) {
00065       i32 chipNum = lcol + nbColumns * lrow;
00066       int mapCol = ((lrow & 1) == 0) ? lcol : (nbColumns - 1 - lcol);
00067       Chip *chip = new DiracChip(*this, mapCol, lrow, 8, 8, chipNum, 0);
00068       chips.insert(make_pair(chipNum, chip));
00069     }
00070   }
00071 }

Generated on Mon Jan 7 13:15:22 2013 for MicromegasFramework by  doxygen 1.4.7