Commit b15112bf authored by Sanya Solodkov's avatar Sanya Solodkov Committed by Graeme Stewart
Browse files

swap pmt index for up/down PMT in E4' (TileGeoG4SD-00-04-17)

	* swap pmt index for up/down PMT in E4'
	* Tagging TileGeoG4SD-00-04-17

2014-10-17  Sergey Karpov  <Sergey.Karpov@cern.ch>

	* work with new E4' cells was added
	* Tagging TileGeoG4SD-00-04-16

2014-04-21    <solodkov@pcbec3.ihep.su>

	* more U-shape options added - 20,21,22,23
	  which correspond to 0,1,2 or 3 "zero" bins
	  at the edge of U-shape.
	  U-shape=20 should be identical to the default U-shape=1
	* Tagging TileGeoG4SD-00-04-15

	* the TileFCSmStepToTileHitVec Algorithm was moved here
	* if U-shape value is not set in TileG4SimOptions,
	* reading it from GeoModel DB (via TileDetectorTool)
parent da4478da
......@@ -40,6 +40,8 @@ public:
int TileGeoG4npmtC10(int side, int module) { return m_npmtC10[side][module]; }
// returns number of PMTs in D4 Cells
int TileGeoG4npmtD4 (int side, int module) { return m_npmtD4[side][module]; }
// returns number of PMTs in E4' Cells
int TileGeoG4npmtE5 (int side, int module) { return m_npmtE5[side][module]; }
private:
typedef std::map<std::string, TileGeoG4Cell*, std::less<std::string> > TileGeoG4CellMap;
......@@ -51,15 +53,19 @@ private:
void MakeTileGeoG4npmtC10( );
// Fill array of number of PMTs for D4 Cells
void MakeTileGeoG4npmtD4( );
// Fill array of number of PMTs for E4' Cells
void MakeTileGeoG4npmtE5( );
const TileDetDescrManager* m_theManager;
const TileID* m_tileID;
int m_npmtC10[2][64]; //array of number of PMTs for C10 Cells
int m_npmtD4[2][64]; //array of number of PMTs for D4 Cells
TileDddbManager* m_dbManager;
TileGeoG4CellMap* m_cellMap;
TileGeoG4SectionMap* m_sectionMap;
bool m_isE5;
int m_npmtC10[2][64]; //array of number of PMTs for C10 Cells
int m_npmtD4[2][64]; //array of number of PMTs for D4 Cells
int m_npmtE5[2][64]; //array of number of PMTs for E4' Cells
IMessageSvc* m_msgSvc;
MsgStream * m_log;
};
......
......@@ -21,6 +21,7 @@
#include "FadsSensitiveDetector/FadsSensitiveDetector.h"
#include "CaloIdentifier/TileID.h"
#include "CaloIdentifier/TileTBID.h"
#include <vector>
......@@ -32,7 +33,6 @@ class G4Step;
class G4HCofThisEvent;
class G4String;
class TileID;
class TileRow;
class TileGeoG4Section;
class TileGeoG4Cell;
......@@ -72,6 +72,7 @@ public:
static G4double Tile_1D_profileSym (int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //Single Lookup table is included; average of central 17 bins is normalized to 0.5
static G4double Tile_1D_profileFunc (int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //Single Lookup table is included; average of all bins is normalized to 0.5
static G4double Tile_1D_profileRescaled(int row, G4double x, G4double y, int PMT, int nDetector, int nSide);
static G4double Tile_1D_profileRescaled_zeroBins(int row, G4double x, G4double y, int PMT, int nDetector, int nSide, int nZeroBins=0);
// the default function which is used in simulation in the case Ushape=1
#define Tile_1D_profile Tile_1D_profileRescaled
......@@ -141,6 +142,9 @@ private:
/** @brief pointer to TileID helper class */
const TileID* m_tileID;
/** @brief pointer to TileTBID helper class */
const TileTBID* m_tileTBID;
/** @brief hits in different tile rows are shifted in time by this amount of ns */
double m_tilesize_deltaT;
......
......@@ -104,7 +104,7 @@ void TileGeoG4Section::ScinToCell(bool gap_crack, int rowShift)
{
if(gap_crack)
{
m_ScinToCell.push_back((samples[0])->cells[row-1]);
m_ScinToCell.push_back((samples[0])->cells[row-1]);
}
else
{
......@@ -113,22 +113,22 @@ void TileGeoG4Section::ScinToCell(bool gap_crack, int rowShift)
if (per == l_currentBoundary[row-1])
{
//Boundary reached - move to the next cell and next boundary
//Check forced by special period in ITC2
//Boundary reached - move to the next cell and next boundary
//Check forced by special period in ITC2
if(++l_indCurrentCell[row-1] < static_cast<int>((samples[l_indCurrentSample])->cells.size()))
{
l_currentBoundary[row-1] += ((samples[l_indCurrentSample])->cells[l_indCurrentCell[row-1]])->nrOfTilesInRow[l_rowShiftInSample];
}
if(++l_indCurrentCell[row-1] < static_cast<int>((samples[l_indCurrentSample])->cells.size()))
{
l_currentBoundary[row-1] += ((samples[l_indCurrentSample])->cells[l_indCurrentCell[row-1]])->nrOfTilesInRow[l_rowShiftInSample];
}
}
if(l_indCurrentCell[row-1] < static_cast<int>((samples[l_indCurrentSample])->cells.size()))
{
m_ScinToCell.push_back((samples[l_indCurrentSample])->cells[l_indCurrentCell[row-1]]);
m_ScinToCell.push_back((samples[l_indCurrentSample])->cells[l_indCurrentCell[row-1]]);
}
else
{
m_ScinToCell.push_back(0); // Caused by absence of 6-th scintillator in row 2 of ITC2
m_ScinToCell.push_back(0); // Caused by absence of 6-th scintillator in row 2 of ITC2
}
}//if(gap_crack)
}//for(row)
......@@ -164,50 +164,50 @@ void TileGeoG4Section::AddModuleToCell(bool negative)
current_sample = samples[l_nSamp];
//Iterate through all cells of the current sample
for (l_nCell = 0; l_nCell < current_sample ->cells.size(); l_nCell++)
for (l_nCell = 0; l_nCell < current_sample->cells.size(); l_nCell++)
{
current_cell = current_sample ->cells[l_nCell];
current_cell = current_sample->cells[l_nCell];
switch(current_cell->nrOfPMT)
{
case 1:
{
// We are in GAP/CRACK Cell - use Up vectors only
if(negative) {
current_cell->m_ModuleToHitDown_negative.push_back(0);
current_cell->m_nCellHit_negative.push_back(0);
{
// We are in GAP/CRACK Cell - use Up vectors only
if(negative) {
current_cell->m_ModuleToHitDown_negative.push_back(0);
current_cell->m_nCellHit_negative.push_back(0);
}
else {
current_cell->m_ModuleToHitDown.push_back(0);
current_cell->m_nCellHit.push_back(0);
}
else {
current_cell->m_ModuleToHitDown.push_back(0);
current_cell->m_nCellHit.push_back(0);
}
break;
}
break;
}
case 2:
{
// Standart cell
if(negative)
{
current_cell->m_ModuleToHitUp_negative.push_back(0);
current_cell->m_ModuleToHitDown_negative.push_back(0);
current_cell->m_nCellHit_negative.push_back(0);
}
else
{
current_cell->m_ModuleToHitUp.push_back(0);
current_cell->m_ModuleToHitDown.push_back(0);
current_cell->m_nCellHit.push_back(0);
}
break;
}
{
// Standart cell and E5(E4')
if(negative)
{
current_cell->m_ModuleToHitUp_negative.push_back(0);
current_cell->m_ModuleToHitDown_negative.push_back(0);
current_cell->m_nCellHit_negative.push_back(0);
}
else
{
current_cell->m_ModuleToHitUp.push_back(0);
current_cell->m_ModuleToHitDown.push_back(0);
current_cell->m_nCellHit.push_back(0);
}
break;
}
default:
{
// Unknown cell type
{
// Unknown cell type
(*m_log) << MSG::ERROR
<< "AddModuleToCell(): Unexpected number of PMTs in cell --> " <<current_cell->nrOfPMT
<< endreq;
return;
}
return;
}
}
}
}
......@@ -223,14 +223,11 @@ void TileGeoG4Section::PrintScinToCell(std::string section_name)
int l_nRow = nrOfScintillators;
int i = 0;
(*m_log) << MSG::DEBUG << endreq;
(*m_log) << MSG::DEBUG << "***********************************************************" << endreq;
(*m_log) << MSG::DEBUG << "* *" << endreq;
(*m_log) << MSG::DEBUG << "* Printing Scintillator-to-Cell corespondence for section *" << endreq;
(*m_log) << MSG::DEBUG << " " << section_name.c_str() << " " << endreq;
(*m_log) << MSG::DEBUG << "* *" << endreq;
(*m_log) << MSG::DEBUG << "***********************************************************" << endreq;
(*m_log) << MSG::DEBUG << " " << endreq;
(*m_log) << MSG::DEBUG;
for (size_t j=0; j<m_ScinToCell.size(); j++)
......@@ -239,15 +236,14 @@ void TileGeoG4Section::PrintScinToCell(std::string section_name)
(*m_log) << m_ScinToCell[j]->tower << "," << m_ScinToCell[j]->sample << " ";
if (++i == l_nRow)
{
(*m_log) << endreq;
(*m_log) << MSG::DEBUG;
// (*m_log) << endreq;
i=0;
}
}
(*m_log) << endreq;
(*m_log) << MSG::DEBUG << "************************************************************"<<endreq;
(*m_log) << MSG::DEBUG << " "<<endreq;
(*m_log) << MSG::DEBUG << "***********************************************************" << endreq;
(*m_log) << MSG::DEBUG << endreq;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment