CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemGeomSvc Class Reference

#include <CgemGeomSvc.h>

+ Inheritance diagram for CgemGeomSvc:

Public Member Functions

 CgemGeomSvc (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~CgemGeomSvc ()
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &inc)
 
bool initGeom ()
 
void readAlignPar ()
 
double getInnerROfCgem () const
 
double getOuterROfCgem () const
 
double getLengthOfCgem () const
 
int getNumberOfCgemLayer () const
 
int getNumberOfCgemFoil () const
 
double getThicknessOfCgemLayer (int i) const
 
CgemGeoLayergetCgemLayer (int i) const
 
double getThicknessOfGapD (int i) const
 
double getThicknessOfCathode (int i) const
 
double getThicknessOfAnode (int i) const
 
CgemGeoReadoutPlanegetReadoutPlane (int iLayer, int iSheet) const
 
bool isXStripDescriptionOn () const
 
bool isVStripDescriptionOn () const
 
void setDensityOfCable (double rho)
 
double getDensityOfCable () const
 
string getMaterialOfCgemFoil (int i) const
 
string getMaterialOfCathode (int i) const
 
string getMaterialOfAnode (int i) const
 
CgemGeoSeparatorgetCgemSeparator () const
 
CgemGeoAligngetAlignPtr () const
 
CgemMidDriftPlanegetMidDriftPtr () const
 
bool isPassive () const
 
bool isEffDensityHoles () const
 
bool isEffDensityStrips () const
 
int getNMaterialsCathode () const
 
int getNMaterialsAnode () const
 
int getNMaterialsFoil () const
 
virtual double getInnerROfCgem () const =0
 
virtual double getOuterROfCgem () const =0
 
virtual double getLengthOfCgem () const =0
 
virtual double getThicknessOfCathode (int i) const =0
 
virtual double getThicknessOfAnode (int i) const =0
 
virtual double getThicknessOfGapD (int i) const =0
 
virtual int getNumberOfCgemLayer () const =0
 
virtual int getNumberOfCgemFoil () const =0
 
virtual double getThicknessOfCgemLayer (int i) const =0
 
virtual CgemGeoLayergetCgemLayer (int i) const =0
 
virtual CgemGeoReadoutPlanegetReadoutPlane (int iLayer, int iSheet) const =0
 
virtual CgemGeoSeparatorgetCgemSeparator () const =0
 
virtual CgemGeoAligngetAlignPtr () const =0
 
virtual CgemMidDriftPlanegetMidDriftPtr () const =0
 

Static Public Attributes

static const int NLAYER_MAX = 3
 
static const int NFOIL_MAX = 3
 
static const int NSHEET_MAX = 2
 
static const int N_MATERIAL_MAX = 30
 
static const int NMATERIALS_CATHODE = 14
 
static const int NMATERIALS_ANODE = 20
 
static const int NMATERIALS_FOIL = 3
 

Additional Inherited Members

- Static Public Member Functions inherited from ICgemGeomSvc
static const InterfaceID & interfaceID ()
 

Detailed Description

Definition at line 25 of file CgemGeomSvc.h.

Constructor & Destructor Documentation

◆ CgemGeomSvc()

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

Definition at line 27 of file CgemGeomSvc.cxx.

28 :Service(name,pSvcLocator)
29{
30 declareProperty("UseIniGeomFile", m_iFile = 6); // CHECK it must be read from the file!
31 declareProperty("PrintDebugInfo", m_debugCout = false);
32 declareProperty("TestReadoutPlane", m_testReadoutPlane = false);
33 declareProperty("AlignFile", m_alignFile);
34 declareProperty("UseEffectiveDensityHoles", m_effDensityHoles = false);
35 declareProperty("UseEffectiveDensityStrips", m_effDensityStrips = false);
36}

◆ ~CgemGeomSvc()

CgemGeomSvc::~CgemGeomSvc ( )

Definition at line 38 of file CgemGeomSvc.cxx.

38 {
39 for(int i=0; i<m_N_CgemLayer; i++){
40 for(int j=0; j < m_N_GemFoil; j++) delete m_foil[i][j];
41 int nSheet=m_CgemLayer[i]->getNumberOfSheet();
42 for(int j=0; j<nSheet; j++) delete m_ReadoutPlane[i][j];
43 delete m_CgemLayer[i];
44 }
45 delete m_CgemSeparator;
46 delete m_align;
47 delete m_midDrift;
48
49}
int getNumberOfSheet() const
Definition: CgemGeoLayer.h:215

Member Function Documentation

◆ finalize()

StatusCode CgemGeomSvc::finalize ( )
virtual

Definition at line 103 of file CgemGeomSvc.cxx.

103 {
104
105 MsgStream log(msgSvc(),name());
106
107 log<<MSG::INFO << "finalizing.... "<<endreq;
108
109 log<<MSG::INFO << "End of Run "<<endreq;
110 return StatusCode::SUCCESS;
111
112}
IMessageSvc * msgSvc()

◆ getAlignPtr()

CgemGeoAlign * CgemGeomSvc::getAlignPtr ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 69 of file CgemGeomSvc.h.

69{ return m_align; }

Referenced by CgemLineFit::initialize(), and BesCgemSD::ProcessHits().

◆ getCgemLayer()

◆ getCgemSeparator()

CgemGeoSeparator * CgemGeomSvc::getCgemSeparator ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 66 of file CgemGeomSvc.h.

66{return m_CgemSeparator;}

◆ getDensityOfCable()

double CgemGeomSvc::getDensityOfCable ( ) const
inline

Definition at line 60 of file CgemGeomSvc.h.

60{return m_Rho_Cable;}

◆ getInnerROfCgem()

double CgemGeomSvc::getInnerROfCgem ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 40 of file CgemGeomSvc.h.

40{return m_R_i_Cgem;}

◆ getLengthOfCgem()

double CgemGeomSvc::getLengthOfCgem ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 42 of file CgemGeomSvc.h.

42{return m_L_Cgem;}

Referenced by CgemLineFit::initialize().

◆ getMaterialOfAnode()

string CgemGeomSvc::getMaterialOfAnode ( int  i) const
inline

Definition at line 63 of file CgemGeomSvc.h.

63{return nma_Materials[i+1];}

◆ getMaterialOfCathode()

string CgemGeomSvc::getMaterialOfCathode ( int  i) const
inline

Definition at line 62 of file CgemGeomSvc.h.

62{return nmc_Materials[i+1];}

◆ getMaterialOfCgemFoil()

string CgemGeomSvc::getMaterialOfCgemFoil ( int  i) const
inline

Definition at line 61 of file CgemGeomSvc.h.

61{return nmg_Materials[i+1];}

◆ getMidDriftPtr()

CgemMidDriftPlane * CgemGeomSvc::getMidDriftPtr ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 72 of file CgemGeomSvc.h.

72{ return m_midDrift; }

Referenced by CgemLineFit::initialize().

◆ getNMaterialsAnode()

int CgemGeomSvc::getNMaterialsAnode ( ) const
inline

Definition at line 86 of file CgemGeomSvc.h.

86{return NMATERIALS_ANODE;}
static const int NMATERIALS_ANODE
Definition: CgemGeomSvc.h:83

◆ getNMaterialsCathode()

int CgemGeomSvc::getNMaterialsCathode ( ) const
inline

Definition at line 85 of file CgemGeomSvc.h.

85{return NMATERIALS_CATHODE;}
static const int NMATERIALS_CATHODE
Definition: CgemGeomSvc.h:82

◆ getNMaterialsFoil()

int CgemGeomSvc::getNMaterialsFoil ( ) const
inline

Definition at line 87 of file CgemGeomSvc.h.

87{return NMATERIALS_FOIL;}
static const int NMATERIALS_FOIL
Definition: CgemGeomSvc.h:84

◆ getNumberOfCgemFoil()

int CgemGeomSvc::getNumberOfCgemFoil ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 46 of file CgemGeomSvc.h.

46{return m_N_GemFoil ;}

◆ getNumberOfCgemLayer()

int CgemGeomSvc::getNumberOfCgemLayer ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 45 of file CgemGeomSvc.h.

45{return m_N_CgemLayer ;}

Referenced by CgemClusterCreate::initialize(), CgemSegmentFitAlg::initialize(), and DotsHelixFitter::initialize().

◆ getOuterROfCgem()

double CgemGeomSvc::getOuterROfCgem ( ) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 41 of file CgemGeomSvc.h.

41{return m_R_o_Cgem;}

◆ getReadoutPlane()

CgemGeoReadoutPlane * CgemGeomSvc::getReadoutPlane ( int  iLayer,
int  iSheet 
) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 140 of file CgemGeomSvc.h.

140 {
141 if( (iLayer<NLAYER_MAX) && (iSheet<NSHEET_MAX) ) return m_ReadoutPlane[iLayer][iSheet];
142 else return 0;
143}
static const int NLAYER_MAX
Definition: CgemGeomSvc.h:78
static const int NSHEET_MAX
Definition: CgemGeomSvc.h:80

Referenced by DotsHelixFitter::calculateNewHelix(), BesCgemDigitizer::Digitize_v2(), CgemHitOnTrack::getFitStuff(), CgemROOTGeo::InitGeometry(), CgemLineFit::initialize(), CgemSegmentFitAlg::initialize(), and HoughHit::residual().

◆ getThicknessOfAnode()

double CgemGeomSvc::getThicknessOfAnode ( int  i) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 52 of file CgemGeomSvc.h.

52{return m_T_Anode[i] ;}

◆ getThicknessOfCathode()

double CgemGeomSvc::getThicknessOfCathode ( int  i) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 51 of file CgemGeomSvc.h.

51{return m_T_Cathode[i] ;}

◆ getThicknessOfCgemLayer()

double CgemGeomSvc::getThicknessOfCgemLayer ( int  i) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 47 of file CgemGeomSvc.h.

47{return m_T_CgemLayer[i] ;}

◆ getThicknessOfGapD()

double CgemGeomSvc::getThicknessOfGapD ( int  i) const
inlinevirtual

Implements ICgemGeomSvc.

Definition at line 50 of file CgemGeomSvc.h.

50{return m_T_Gap_D[i] ;}

◆ handle()

void CgemGeomSvc::handle ( const Incident &  inc)

Definition at line 114 of file CgemGeomSvc.cxx.

114 {
115 MsgStream log( messageService(), name() );
116 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
117
118 IDataProviderSvc* m_eventSvc;
119 Gaudi::svcLocator()->service("EventDataSvc", m_eventSvc, true);
120 SmartDataPtr<Event::EventHeader> eventHeader(m_eventSvc,"/Event/EventHeader");
121 if (!eventHeader) {
122 log << MSG::FATAL << "Could not find Event Header" << endreq;
123 }
124// if (m_updatealign) return;
125// if (inc.type() == "NewRun" ){
126// log << MSG::DEBUG << "Begin Event" << endreq;
127// clean();
128// m_updatealign = true;
129// if(m_nomcalignment&&m_mindex==0) {
130// int RunNo=eventHeader->runNumber();
131// if(RunNo<0) m_readAlignParDataBase=false ;
132// else m_readAlignParDataBase=true;
133// m_mindex+=1;
134// cout<<"m__RunNo="<<RunNo<<"m_mindex="<<m_mindex<<endl;
135// }
136// //std::cout<<"############"<<m_readAlignParDataBase<<std::endl;
137// ReadAlignPar();
138// }
139}

◆ initGeom()

bool CgemGeomSvc::initGeom ( )

cable density (g/cm3)

CGEM/MDC separator

CHECK: now it is the passive dimensions m_R_i_Cgem = m_CgemLayer[0]->getInnerROfCgemLayer(); m_R_o_Cgem = m_CgemSeparator->getOuterROfSeparator(); // m_CgemLayer[m_N_CgemLayer-1]->getOuterROfCgemLayer(); // CHECK m_L_Cgem = m_CgemSeparator->getLengthOfSeparator(); // m_CgemLayer[m_N_CgemLayer-1]->getLengthOfCgemLayer(); // CHECK

Definition at line 144 of file CgemGeomSvc.cxx.

144 {
145 cout.precision(10);
146 // cout<<"precision: "<<cout.precision()<<endl;
147 /* Get the geometry parameter file from asigned path and value */
148 string geoFilePath = getenv("CGEMGEOMSVCROOT");
149 // int iFile=iPar
150 cout << "IFILE " << m_iFile << endl;
151 // if(m_iFile==0) m_iFile=ReadBoostRoot::GetCgem();
152 switch (m_iFile){
153 case 1 :
154 geoFilePath += "/dat/cgem_model_1_default.txt";
155 break;
156 case 2 :
157 geoFilePath += "/dat/cgem_model_2_default.txt";
158 break;
159 case 3 :
160 geoFilePath += "/dat/cgem_model_3_default.txt";
161 break;
162 case 4 :
163 geoFilePath += "/dat/cgem_model_4_default.txt";
164 break;
165 case 5 :
166 geoFilePath += "/dat/cgem_model_5_default.txt";
167 break;
168 case 6 :
169 geoFilePath += "/dat/cgem_model_6_default.txt";
170 break;
171
172 case 7 :
173 geoFilePath += "/dat/cgem_model_oldgeom.txt";
174 break;
175
176 default :
177 cout << "Warning in CgemGeomSvc::initGeom(): The geometry will be constructed through default model!" << endl;
178 geoFilePath += "/dat/cgem_model_6_default.txt";
179 break;
180 }
181 cout << "INFO in CgemGeomSvc::initGeom(): Geometry will be constructed through File: "
182 << geoFilePath << endl;
183
184 /* Open and read the geometry parameter file */
185 ifstream fin(geoFilePath.c_str(), ios::in);
186 if (!fin.good())
187 {
188 cout << "Error in CgemGeomSvc::initGeom(): Fail to open geomtry file: " << endl;
189 cout << geoFilePath << endl;
190 return false;
191 }
192 string strcom; /* One input line of fin file */
193
194
195 if(m_debugCout) cout << left << "=======get BesMdcGeoParameter from CgemGeomSvc=======" << endl;
196
197 /* Information of CgemLayer and Readout Strip */
198 std::getline(fin, strcom); // Line 2
199 std::getline(fin, strcom); // Line 3
200 fin >> m_N_CgemLayer
201 >> m_N_GemFoil; // Line 3
202 if(m_debugCout) cout << "N_CgemLayer : " << left << setw(8) << m_N_CgemLayer
203 << "N_GemFoil : " << left << setw(8) << m_N_GemFoil << endl;
204 std::getline(fin, strcom); // Line 4
205 std::getline(fin, strcom); // Line 5
206 std::getline(fin, strcom); // Line 6
207 double rLayer, lenLayer, numSheet, wSheet, aStereo, wPitchX, wPitchV, wStripX, wStripV, nChannelX, nChannelV;
208 double phi_start[3][2], dX_start_strip[3][2], dV_start_strip[3][2];
209 double gap_d[3];
210 for (int i=0; i < m_N_CgemLayer; i++)
211 {
212 fin >> rLayer >> lenLayer >> numSheet >> wSheet >> aStereo >> wPitchX >> wPitchV
213 >> wStripX >> wStripV >> nChannelX >> nChannelV
214 >> phi_start[i][0] >> phi_start[i][1]
215 >> dX_start_strip[i][0] >> dX_start_strip[i][1]
216 >> dV_start_strip[i][0] >> dV_start_strip[i][1]
217 >> gap_d[i] >> m_Orientation; // Line 6 7 8
218 //cout<<"rLayer = "<<rLayer<<endl;
219 //nChannelX=nChannelX/numSheet;
220 //nChannelV=nChannelV/numSheet;
221 m_T_Gap_D[i] = gap_d[i];
222 m_CgemLayer[i] = new CgemGeoLayer();
223 m_CgemLayer[i]->setInnerROfCgemLayer(rLayer);
224 m_CgemLayer[i]->setLengthOfCgemLayer(lenLayer);
225 m_CgemLayer[i]->setNumberOfSheet(numSheet);
226 m_CgemLayer[i]->setWidthOfSheet(wSheet);
227 m_CgemLayer[i]->setAngleOfStereo(aStereo);
228 m_CgemLayer[i]->setWidthOfPitchX(wPitchX);
229 m_CgemLayer[i]->setWidthOfPitchV(wPitchV);
230 m_CgemLayer[i]->setWidthOfStripX(wStripX);
231 m_CgemLayer[i]->setWidthOfStripV(wStripV);
232 m_CgemLayer[i]->setNumberOfChannelX(nChannelX);
233 m_CgemLayer[i]->setNumberOfChannelV(nChannelV);
234 m_CgemLayer[i]->setOrientation(m_Orientation);
235 std::getline(fin, strcom); // Line 7 8 9
236 }
237
238 /* Information of Cathode*/
239 double ncMaterials[3];
240 double tc_cu1[3],tc_kapton1[3], tc_epoxy0[3],tc_carbonf[3],tc_epoxy1[3],tc_honeycomb[3],tc_rohacell1[3],tc_epoxy2[3],tc_kapton2[3],tc_epoxy3[3],tc_rohacell2[3],tc_epoxy4[3],tc_kapton3[3],tc_cu2[3];
241 std::getline(fin, strcom); // Line 10
242
243
244 //******** L3 new modification from here ******///
245
246 fin >>nmc_Materials[0]>>nmc_Materials[1]>>nmc_Materials[2]>>nmc_Materials[3]>>nmc_Materials[4]>>nmc_Materials[5]
247 >>nmc_Materials[6]>>nmc_Materials[7]>>nmc_Materials[8]>>nmc_Materials[9]>>nmc_Materials[10]>>nmc_Materials[11]
248 >>nmc_Materials[12]>>nmc_Materials[13]>>nmc_Materials[14]; //Line 10
249 for (int i=0; i < m_N_CgemLayer; i++)
250 {
251 std::getline(fin,strcom); //Line 11 12 13
252 fin >>ncMaterials[i]>>tc_cu1[i]>>tc_kapton1[i]>>tc_epoxy0[i]>>tc_carbonf[i]>>tc_epoxy1[i]>>tc_honeycomb[i]>>tc_rohacell1[i]
253 >>tc_epoxy2[i]>>tc_kapton2[i]>>tc_epoxy3[i]>>tc_rohacell2[i]>>tc_epoxy4[i]>>tc_kapton3[i]>>tc_cu2[i];
254 if ( ncMaterials[i] > N_MATERIAL_MAX) {
255 cout << "Error : CgemGeomSvc::initGeom(), Number of materials in Cathode[Layer "<<i<<"] is wrong!" << endl;
256 cout << "It must be less than " << N_MATERIAL_MAX << " and is " << ncMaterials[i] << endl;
257 cout << "please, either increase N_MATERIAL_MAX or decrease m_N_Cathode1_Materials" << endl;
258 return false;
259 }
260 }
261 /* Information of GemFoil*/
262 double ngMaterials[3];
263 double tg_cu1[3],tg_kapton[3],tg_cu2[3],r_i_hole[3],r_o1_hole[3],r_o2_hole[3],l_hole[3];
264 double tg_gt1[3],tg_gt2[3],tg_gi[3];
265 std::getline(fin,strcom); //Line 14
266 std::getline(fin,strcom); //Line 15
267 for (int i=0;i<m_N_CgemLayer;i++)
268 {
269 std::getline(fin,strcom);//Line 16 17 18
270 fin>>tg_gt1[i]>>tg_gt2[i]>>tg_gi[i];
271 }
272 std::getline(fin,strcom); //line 19
273 std::getline(fin,strcom); //line 20
274 fin >>nmg_Materials[0]>>nmg_Materials[1]>>nmg_Materials[2]>>nmg_Materials[3];
275 for (int i=0;i<m_N_CgemLayer;i++)
276 {
277 std::getline(fin,strcom); //line 21 22 23
278 fin>>ngMaterials[i]>>tg_cu1[i]>>tg_kapton[i]>>tg_cu2[i]>>r_i_hole[i]>>r_o1_hole[i]>>r_o2_hole[i]>>l_hole[i];
279 }
280
281
282 /* Information of Anode*/
283 double naMaterials[3];
284 double ta_cu1[3],ta_kapton1[3],ta_cu2[3],ta_epoxy1[3],ta_kapton2[3],ta_epoxy2[3],ta_rohacell1[3];
285 double ta_carbonf1[3], ta_kapton3[3], ta_epoxy3[3], ta_honeycomb[3],ta_kapton4[3],ta_epoxy4[3],ta_rohacell2[3];
286 double ta_carbonf2[3],ta_epoxy5[3],ta_cu3[3],ta_kapton5[3], ta_kapton6[3], ta_cu4[3];
287 std::getline(fin,strcom); //line 24
288 std::getline(fin,strcom); //line 25
289 fin >>nma_Materials[0]>>nma_Materials[1]>>nma_Materials[2]>>nma_Materials[3]>>nma_Materials[4]>>nma_Materials[5]
290 >>nma_Materials[6]>>nma_Materials[7]>>nma_Materials[8]>>nma_Materials[9]>>nma_Materials[10]>>nma_Materials[11]
291 >>nma_Materials[12]>>nma_Materials[13]>>nma_Materials[14]>>nma_Materials[15]>>nma_Materials[16]>>nma_Materials[17]>>nma_Materials[18]
292 >>nma_Materials[19]>>nma_Materials[20];
293 for (int i=0;i<m_N_CgemLayer;i++)
294 {
295 std::getline(fin,strcom); //line 26 27 28
296 fin >>naMaterials[i]>>ta_cu1[i]>>ta_kapton1[i]>>ta_cu2[i]>>ta_epoxy1[i]>>ta_kapton2[i]>>ta_epoxy2[i]>>ta_rohacell1[i]
297 >>ta_carbonf1[i]>>ta_kapton3[i]>>ta_epoxy3[i]>>ta_honeycomb[i]>>ta_kapton4[i]>>ta_epoxy4[i]>>ta_rohacell2[i]
298 >>ta_carbonf2[i]>>ta_epoxy5[i]>>ta_cu3[i]>>ta_kapton5[i]>>ta_kapton6[i]>>ta_cu4[i]
299 >>m_B_strip_x_on>>m_B_strip_v_on;
300 if (naMaterials[i] > N_MATERIAL_MAX) {
301 cout << "Error : CgemGeomSvc::initGeom(), Number of materials in Anode[L"<<i<<"] is wrong!" << endl;
302 cout << "It must be less than " << N_MATERIAL_MAX << " and is " << naMaterials[i] << endl;
303 cout << "please, either increase N_MATERIAL_MAX or decrease N_Materials" << endl;
304 return false;
305 }
306 }
307
308 /** cable density (g/cm3) **/
309 std::getline(fin, strcom); // Line 29
310 std::getline(fin, strcom); // Line 30
311 fin >> m_Rho_Cable; // Line 30
312 if(m_debugCout) cout << "cable density " << m_Rho_Cable << endl;
313
314 /** CGEM/MDC separator **/
315 std::getline(fin, strcom); // Line 31
316 std::getline(fin, strcom); // Line 32
317 std::getline(fin, strcom); // Line 33
318 double r_i_separator,r_o_separator,l_separator;
319 double t_al1,t_al2,t_carbonf;
320 fin >> r_i_separator >> r_o_separator >> l_separator; // Line 33
321
322 std::getline(fin, strcom); // Line 34
323 std::getline(fin, strcom); // Line 35
324 fin >> t_al1 >> t_carbonf>> t_al2; // Line 35
325
326 m_CgemSeparator = new CgemGeoSeparator();
327 m_CgemSeparator->setInnerR(r_i_separator);
328 m_CgemSeparator->setOuterR(r_o_separator);
329 m_CgemSeparator->setLength(l_separator);
330 m_CgemSeparator->setThickOfInnerAluminum(t_al1);
331 m_CgemSeparator->setThickOfCarbonFiber(t_carbonf);
332 m_CgemSeparator->setThickOfOuterAluminum(t_al2);
333
334 /* Information of Total volume in simulation */
335
336 std::getline(fin, strcom); // Line 36
337 std::getline(fin, strcom); // Line 37
338 std::getline(fin, strcom); // Line 38
339 fin >> m_R_i_Cgem >> m_R_o_Cgem >> m_L_Cgem; // Line 38
340
341 std::getline(fin, strcom); // Line 39
342 std::getline(fin, strcom); // Line 40
343 std::getline(fin, strcom); // Line 41
344 fin >> m_passive; // Line 41
345 if(m_debugCout) cout << "Cgem passive elements are switched " << m_passive << endl;
346
347 double T_Cathode,T_Anode, T_GemFoil;
348 for (int i=0; i < m_N_CgemLayer; i++) {
349 T_Cathode = tc_cu1[i]+tc_kapton1[i]+tc_epoxy0[i]+tc_carbonf[i]+tc_epoxy1[i]+tc_honeycomb[i]+tc_rohacell1[i]+tc_epoxy2[i]+tc_kapton2[i]+tc_epoxy3[i]+tc_rohacell2[i]+tc_epoxy4[i]+tc_kapton3[i]+tc_cu2[i];
350 m_T_Cathode[i] = T_Cathode;
351
352 T_Anode = ta_cu1[i]+ta_kapton1[i]+ta_cu2[i]+ta_epoxy1[i]+ta_kapton2[i]+ta_epoxy2[i]+ta_rohacell1[i]+ta_carbonf1[i]+ta_kapton3[i]+ta_epoxy3[i]+ta_honeycomb[i]+ta_kapton4[i]+ta_epoxy4[i]+ta_rohacell2[i]+ta_carbonf2[i]+ta_epoxy5[i]+ta_cu3[i]+ta_kapton5[i]+ta_kapton6[i]+ta_cu4[i];
353 m_T_Anode[i] = T_Anode;
354
355 T_GemFoil = tg_cu1[i]+tg_kapton[i]+tg_cu2[i];
356 m_T_CgemLayer[i] = T_Cathode+ gap_d[i] + tg_gt1[i] + tg_gt2[i] + tg_gi[i] + T_GemFoil*3 + T_Anode;
357 /* output the thickness information of each material layer */
358 if(m_debugCout)
359 {
360 cout << left << "R_CgemLayer " << left << "L_CgemLayer "
361 << left << "N_Sheet " << left << "W_Sheet "
362 << left << "A_Stereo " << left << "W_Pitch_X "
363 << left << "W_Pitch_V "<< left << "W_Strip_X "
364 << left << "W_Strip_V "<< left << "N_Channel_Phi "
365 << left << "N_Channel_V " << left << "Orientation " << endl;
366 cout << left << setw(12) << m_CgemLayer[i]->getInnerROfCgemLayer()
367 << left << setw(12) << m_CgemLayer[i]->getLengthOfCgemLayer()
368 << left << setw(8) << m_CgemLayer[i]->getNumberOfSheet()
369 << left << setw(8) << m_CgemLayer[i]->getWidthOfSheet()
370 << left << setw(8) << m_CgemLayer[i]->getAngleOfStereo()
371 << left << setw(10) << m_CgemLayer[i]->getWidthOfPitchX()
372 << left << setw(10) << m_CgemLayer[i]->getWidthOfPitchV()
373 << left << setw(10) << m_CgemLayer[i]->getWidthOfStripX()
374 << left << setw(10) << m_CgemLayer[i]->getWidthOfStripV()
375 << left << setw(14) << m_CgemLayer[i]->getNumberOfChannelX()
376 << left << setw(12) << m_CgemLayer[i]->getNumberOfChannelV()
377 << left << setw(11) << m_CgemLayer[i]->getOrientation() << endl;
378
379 cout << left << "T_Cathode L"<<i << left << "T_GemFoil L"<<i << left << "T_Anode L"<<i
380 << left << "T_CgemLayer "<<i << endl;
381 cout << left << setw(10) << T_Cathode << left << setw(10) << T_GemFoil
382 << left << setw(8) << T_Anode << left << setw(9) << m_T_CgemLayer[i] << endl;
383
384 cout << "from r= " << m_CgemLayer[i]->getInnerROfCgemLayer()
385 << " to r=" << m_CgemLayer[i]->getInnerROfCgemLayer() + m_T_CgemLayer[i] << endl;
386 cout << "thickness " << m_T_CgemLayer[i] << endl;
387 }
388
389 /* Information of CgemLayer */
390 m_CgemLayer[i]->setIDOfCgemLayer(i);
391 m_CgemLayer[i]->setOuterROfCgemLayer(m_CgemLayer[i]->getInnerROfCgemLayer() + m_T_CgemLayer[i]);
392
393 /* Information of Cathode */
394 bool fReversed = m_CgemLayer[i]->getOrientation();
395 if(fReversed == false) {
396 m_CgemLayer[i]->setInnerROfCathode( m_CgemLayer[i]->getInnerROfCgemLayer() );
397 m_CgemLayer[i]->setOuterROfCathode( m_CgemLayer[i]->getInnerROfCgemLayer() + T_Cathode);
398 } else {
399 m_CgemLayer[i]->setOuterROfCathode( m_CgemLayer[i]->getOuterROfCgemLayer() );
400 m_CgemLayer[i]->setInnerROfCathode( m_CgemLayer[i]->getOuterROfCgemLayer() - T_Cathode);
401 }
402
403 if(m_debugCout) cout << "CATHODE from " << m_CgemLayer[i]->getInnerROfCathode() << " to " << m_CgemLayer[i]->getOuterROfCathode() << " thickness " << m_CgemLayer[i]->getOuterROfCathode() - m_CgemLayer[i]->getInnerROfCathode() << endl;
404
405 int counter = 0;
406 double inner_r_cathode[NMATERIALS_CATHODE];
407 inner_r_cathode[0] = m_CgemLayer[i]->getInnerROfCathode();
408 if(fReversed == true) counter = NMATERIALS_CATHODE-1;
409
410 for(int imat = 0; imat < NMATERIALS_CATHODE; imat++) {
411
412 switch(counter) {
413 case 0 :
414 m_CgemLayer[i]->setInnerROfCathodeCu1(inner_r_cathode[imat]);
415 m_CgemLayer[i]->setOuterROfCathodeCu1(inner_r_cathode[imat]+tc_cu1[i]);
416 inner_r_cathode[imat]+=tc_cu1[i];
417 break;
418 case 1 :
419 m_CgemLayer[i]->setInnerROfCathodeKapton1(inner_r_cathode[imat]);
420 m_CgemLayer[i]->setOuterROfCathodeKapton1(inner_r_cathode[imat]+tc_kapton1[i]);
421 inner_r_cathode[imat]+=tc_kapton1[i];
422 break;
423 case 2 :
424 m_CgemLayer[i]->setInnerROfCathodeEpoxy0(inner_r_cathode[imat]);
425 m_CgemLayer[i]->setOuterROfCathodeEpoxy0(inner_r_cathode[imat]+tc_epoxy0[i]);
426 inner_r_cathode[imat]+=tc_epoxy0[i];
427 break;
428 case 3 :
429 m_CgemLayer[i]->setInnerROfCathodeCarbonf(inner_r_cathode[imat]);
430 m_CgemLayer[i]->setOuterROfCathodeCarbonf(inner_r_cathode[imat]+tc_carbonf[i]);
431 inner_r_cathode[imat]+=tc_carbonf[i];
432 break;
433 case 4 :
434 m_CgemLayer[i]->setInnerROfCathodeEpoxy1(inner_r_cathode[imat]);
435 m_CgemLayer[i]->setOuterROfCathodeEpoxy1(inner_r_cathode[imat]+tc_epoxy1[i]);
436 inner_r_cathode[imat]+=tc_epoxy1[i];
437 break;
438 case 5 :
439 m_CgemLayer[i]->setInnerROfCathodeHoneycomb(inner_r_cathode[imat]);
440 m_CgemLayer[i]->setOuterROfCathodeHoneycomb(inner_r_cathode[imat]+tc_honeycomb[i]);
441 inner_r_cathode[imat]+=tc_honeycomb[i];
442 break;
443 case 6 :
444 m_CgemLayer[i]->setInnerROfCathodeRohacell1(inner_r_cathode[imat]);
445 m_CgemLayer[i]->setOuterROfCathodeRohacell1(inner_r_cathode[imat]+tc_rohacell1[i]);
446 inner_r_cathode[imat]+=tc_rohacell1[i];
447 break;
448 case 7 :
449 m_CgemLayer[i]->setInnerROfCathodeEpoxy2(inner_r_cathode[imat]);
450 m_CgemLayer[i]->setOuterROfCathodeEpoxy2(inner_r_cathode[imat]+tc_epoxy2[i]);
451 inner_r_cathode[imat]+=tc_epoxy2[i];
452 break;
453 case 8 :
454 m_CgemLayer[i]->setInnerROfCathodeKapton2(inner_r_cathode[imat]);
455 m_CgemLayer[i]->setOuterROfCathodeKapton2(inner_r_cathode[imat]+tc_kapton2[i]);
456 inner_r_cathode[imat]+=tc_kapton2[i];
457 break;
458 case 9 :
459 m_CgemLayer[i]->setInnerROfCathodeEpoxy3(inner_r_cathode[imat]);
460 m_CgemLayer[i]->setOuterROfCathodeEpoxy3(inner_r_cathode[imat]+tc_epoxy3[i]);
461 inner_r_cathode[imat]+=tc_epoxy3[i];
462 break;
463 case 10 :
464 m_CgemLayer[i]->setInnerROfCathodeRohacell2(inner_r_cathode[imat]);
465 m_CgemLayer[i]->setOuterROfCathodeRohacell2(inner_r_cathode[imat]+tc_rohacell2[i]);
466 inner_r_cathode[imat]+=tc_rohacell2[i];
467 break;
468 case 11 :
469 m_CgemLayer[i]->setInnerROfCathodeEpoxy4(inner_r_cathode[imat]);
470 m_CgemLayer[i]->setOuterROfCathodeEpoxy4(inner_r_cathode[imat]+tc_epoxy4[i]);
471 inner_r_cathode[imat]+=tc_epoxy4[i];
472 break;
473 case 12 :
474 m_CgemLayer[i]->setInnerROfCathodeKapton3(inner_r_cathode[imat]);
475 m_CgemLayer[i]->setOuterROfCathodeKapton3(inner_r_cathode[imat]+tc_kapton3[i]);
476 inner_r_cathode[imat]+=tc_kapton3[i];
477 break;
478 case 13 :
479 m_CgemLayer[i]->setInnerROfCathodeCu2(inner_r_cathode[imat]);
480 m_CgemLayer[i]->setOuterROfCathodeCu2(inner_r_cathode[imat]+tc_cu2[i]);
481 inner_r_cathode[imat]+=tc_cu2[i];
482
483 if(m_debugCout) cout << " CATHODE CU INNER " << inner_r_cathode[imat] << " OUTER " << inner_r_cathode[imat]+tc_cu2[i] << endl;
484
485 break;
486 default:
487 break;
488 }
489
490 // cout << imat << " " << counter << " inner " << inner_r_cathode[imat] << " outer " << outer_r_cathode[imat] << endl;
491 if(imat == NMATERIALS_CATHODE - 1) {
492 if(m_debugCout) cout << "breaking" << endl;
493 break;
494 }
495 inner_r_cathode[imat + 1] = inner_r_cathode[imat];
496 if(fReversed == false) counter++;
497 else counter--;
498 }
499 if(m_debugCout)
500 {
501 cout << "T_cathode: " << setw(15) <<T_Cathode;
502 cout << setw(20) << m_CgemLayer[i]->getInnerROfCathode() << endl
503 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeCu1()
504 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeCu1()
505 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeKapton1()
506 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeKapton1()<<endl
507 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeEpoxy0()
508 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeEpoxy0()<<endl
509 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeCarbonf()
510 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeCarbonf()
511 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeEpoxy1()
512 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeEpoxy1()<<endl
513 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeHoneycomb()
514 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeHoneycomb()
515 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeRohacell1()
516 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeRohacell1()<<endl
517 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeEpoxy2()
518 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeEpoxy2()
519 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeKapton2()
520 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeKapton2()<<endl
521 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeEpoxy3()
522 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeEpoxy3()
523 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeRohacell2()
524 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeRohacell2()<<endl
525 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeEpoxy4()
526 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeEpoxy4()
527 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeKapton3()
528 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeKapton3()<<endl
529 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeCu2()
530 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeCu2() << endl
531 << setw(20) << m_CgemLayer[i]->getOuterROfCathode() << endl;
532 }
533
534
535 /* Check over the radius */
536 if(fReversed == false) {
537 if (fabs((m_CgemLayer[i]->getOuterROfCathode() / m_CgemLayer[i]->getOuterROfCathodeCu2()) - 1) > FLT_EPSILON){
538 cout << fabs(m_CgemLayer[i]->getOuterROfCathode() - m_CgemLayer[i]->getOuterROfCathodeCu2()) << endl;
539 cout << setw(20) << m_CgemLayer[i]->getOuterROfCathode()
540 << setw(20) << m_CgemLayer[i]->getOuterROfCathodeCu2()
541 << ", FLT_EPSILON = " << FLT_EPSILON << endl;
542 cout << "Error : CgemGeomSvc::initGeom(), Cathode size is wrong!" << endl;
543 return false;
544 }
545 }
546 else {
547 if (fabs((m_CgemLayer[i]->getInnerROfCathode() / m_CgemLayer[i]->getInnerROfCathodeCu1()) - 1) > FLT_EPSILON){//?
548 cout << fabs(m_CgemLayer[i]->getInnerROfCathode() - m_CgemLayer[i]->getInnerROfCathodeCu1()) << endl;
549 cout << setw(20) << m_CgemLayer[i]->getInnerROfCathode()
550 << setw(20) << m_CgemLayer[i]->getInnerROfCathodeCu1()
551 << ", FLT_EPSILON = " << FLT_EPSILON << endl;
552 cout << "Error : CgemGeomSvc::initGeom(), Cathode size is wrong!" << endl;
553 return false;
554 }
555 }
556
557 /* Information of Gap and GemFoil */
558 if(fReversed == false) {
559 m_CgemLayer[i]->setInnerROfGapD( m_CgemLayer[i]->getOuterROfCathode() );
560 m_CgemLayer[i]->setOuterROfGapD( m_CgemLayer[i]->getOuterROfCathode() + gap_d[i] );
561 m_CgemLayer[i]->setInnerROfGapT1( m_CgemLayer[i]->getOuterROfGapD() + tg_cu1[i]+tg_kapton[i]+tg_cu2[i] );
562 m_CgemLayer[i]->setOuterROfGapT1( m_CgemLayer[i]->getInnerROfGapT1() + tg_gt1[i] );
563 m_CgemLayer[i]->setInnerROfGapT2( m_CgemLayer[i]->getOuterROfGapT1() + tg_cu1[i]+tg_kapton[i]+tg_cu2[i]);
564 m_CgemLayer[i]->setOuterROfGapT2( m_CgemLayer[i]->getInnerROfGapT2() + tg_gt2[i] );
565 m_CgemLayer[i]->setInnerROfGapI( m_CgemLayer[i]->getOuterROfGapT2() + tg_cu1[i]+tg_kapton[i]+tg_cu2[i] );
566 m_CgemLayer[i]->setOuterROfGapI( m_CgemLayer[i]->getInnerROfGapI() + tg_gi[i]);
567 }
568 else {//?
569 m_CgemLayer[i]->setOuterROfGapD( m_CgemLayer[i]->getInnerROfCathode() );
570 m_CgemLayer[i]->setInnerROfGapD( m_CgemLayer[i]->getInnerROfCathode() - gap_d[i]);
571 m_CgemLayer[i]->setOuterROfGapT1( m_CgemLayer[i]->getInnerROfGapD() - tg_cu1[i]-tg_kapton[i]-tg_cu2[i]);
572 m_CgemLayer[i]->setInnerROfGapT1( m_CgemLayer[i]->getOuterROfGapT1() - tg_gt1[i]);
573 m_CgemLayer[i]->setOuterROfGapT2( m_CgemLayer[i]->getInnerROfGapT1() - tg_cu1[i]-tg_kapton[i]-tg_cu2[i] );
574 m_CgemLayer[i]->setInnerROfGapT2( m_CgemLayer[i]->getOuterROfGapT2() - tg_gt2[i]);
575 m_CgemLayer[i]->setOuterROfGapI( m_CgemLayer[i]->getInnerROfGapT2() - tg_cu1[i]-tg_kapton[i]-tg_cu2[i]);
576 m_CgemLayer[i]->setInnerROfGapI( m_CgemLayer[i]->getOuterROfGapI() - tg_gi[i]);
577 }
578
579 if(m_debugCout)
580 {
581 cout << "Geom foil&gap " << setw(15) << gap_d[i] << setw(15)
582 << tg_cu1[i]+tg_kapton[i]+tg_cu2[i] << setw(15) << tg_gt1[i]
583 << setw(15) << tg_gt2[i] << setw(15) << tg_gi[i] << endl;
584
585 cout << "gaps: -----------------------------" << endl;
586 cout << setw(20) << m_CgemLayer[i]->getInnerROfGapD()
587 << setw(20) << m_CgemLayer[i]->getOuterROfGapD()
588 << setw(20) << m_CgemLayer[i]->getInnerROfGapT1()
589 << setw(20) << m_CgemLayer[i]->getOuterROfGapT1() << endl
590 << setw(20) << m_CgemLayer[i]->getInnerROfGapT2()
591 << setw(20) << m_CgemLayer[i]->getOuterROfGapT2()
592 << setw(20) << m_CgemLayer[i]->getInnerROfGapI()
593 << setw(20) << m_CgemLayer[i]->getOuterROfGapI() << endl;
594 }
595
596 /* The number of GemFoil can only be 3 in the code! */
597 if (m_N_GemFoil != 3){
598 cout << "Error : CgemGeomSvc::initGeom(), GemFoil number in code is 3! If m_N_GemFoil != 3,you should modify the code,especially the gap information!" << endl;
599 return false;
600 }
601
602 double R_i_GemFoil[3] = {0};
603 if(fReversed == false) {
604 R_i_GemFoil[0] = m_CgemLayer[i]->getOuterROfGapD();
605 R_i_GemFoil[1] = m_CgemLayer[i]->getOuterROfGapT1();
606 R_i_GemFoil[2] = m_CgemLayer[i]->getOuterROfGapT2();
607 }
608 else {
609 R_i_GemFoil[0] = m_CgemLayer[i]->getOuterROfGapT1();
610 R_i_GemFoil[1] = m_CgemLayer[i]->getOuterROfGapT2();
611 R_i_GemFoil[2] = m_CgemLayer[i]->getOuterROfGapI();
612 }
613
614 for(int j=0; j < m_N_GemFoil; j++){
615 m_foil[i][j] = new CgemGeoFoil();
616
617 m_foil[i][j]->setIDOfCgemFoil(j);
618
619
620 double inner_r_foil[N_MATERIAL_MAX];
621 double outer_r_foil[N_MATERIAL_MAX];
622 double m_t_foil_list[N_MATERIAL_MAX] = {tg_cu1[i], tg_kapton[i], tg_cu2[i]};
623
624 inner_r_foil[0] = R_i_GemFoil[j];
625
626 if(fReversed == true) counter = ngMaterials[i] - 1;
627 else counter = 0;
628
629 m_foil[i][j]->setInnerROfCgemFoilHole(r_i_hole[j]);
630 m_foil[i][j]->setOuterR1OfCgemFoilHole(r_o1_hole[j]);
631 m_foil[i][j]->setOuterR2OfCgemFoilHole(r_o2_hole[j]);
632 m_foil[i][j]->setLengthOfCgemFoilHole(l_hole[j]);
633
634 for(int imat = 0; imat < ngMaterials[i]; imat++) {
635 outer_r_foil[imat] = inner_r_foil[imat] + m_t_foil_list[counter];
636
637 switch(counter) {
638 case 0 :
639 m_foil[i][j]->setInnerROfCgemFoilCu1(inner_r_foil[imat]);
640 m_foil[i][j]->setOuterROfCgemFoilCu1(outer_r_foil[imat]);
641 break;
642 case 1 :
643 m_foil[i][j]->setInnerROfCgemFoilKapton(inner_r_foil[imat]);
644 m_foil[i][j]->setOuterROfCgemFoilKapton(outer_r_foil[imat]);
645 break;
646 case 2 :
647 m_foil[i][j]->setInnerROfCgemFoilCu2(inner_r_foil[imat]);
648 m_foil[i][j]->setOuterROfCgemFoilCu2(outer_r_foil[imat]);
649 break;
650 default:
651 break;
652 }
653
654 // cout << imat << " " << counter << " inner " << inner_r_foil[imat] << " outer " << outer_r_foil[imat] << endl;
655 if(imat == ngMaterials[i] - 1) {
656 if(m_debugCout) cout << "breaking" << endl;
657 break;
658 }
659 inner_r_foil[imat + 1] = outer_r_foil[imat];
660 if(fReversed == false) counter++;
661 else counter--;
662 }
663
664 m_foil[i][j]->setInnerROfCgemFoil( R_i_GemFoil[j] );
665 m_foil[i][j]->setOuterROfCgemFoil( R_i_GemFoil[j] + tg_cu1[i]+tg_kapton[i]+tg_cu2[i] );
666
667 m_CgemLayer[i]->setCgemFoil(j, m_foil[i][j]);
668
669 if(m_debugCout)
670 {
671 cout << "Geom foil: layer " << i << " " << j << endl;
672 cout << setw(15) << tg_cu1[i] << setw(15)
673 << tg_kapton[i] << setw(15) << tg_cu2[i] << endl;
674
675 cout << setw(20) << m_foil[i][j]->getIDOfCgemFoil()
676 << setw(20) << m_foil[i][j]->getInnerROfCgemFoil()
677 << setw(20) << m_foil[i][j]->getInnerROfCgemFoilCu1()
678 << setw(20) << m_foil[i][j]->getOuterROfCgemFoilCu1()
679 << setw(20) << m_foil[i][j]->getInnerROfCgemFoilKapton() << endl
680 << setw(20) << m_foil[i][j]->getOuterROfCgemFoilKapton()
681 << setw(20) << m_foil[i][j]->getInnerROfCgemFoilCu2()
682 << setw(20) << m_foil[i][j]->getOuterROfCgemFoilCu2()
683 << setw(20) << m_foil[i][j]->getOuterROfCgemFoil() << endl;
684 }
685 }
686
687 if(m_debugCout)
688 {
689 if(fReversed) {
690 cout << "GEM" << endl;
691 cout << "I " << m_CgemLayer[i]->getInnerROfGapI() << " " << m_CgemLayer[i]->getOuterROfGapI() << endl;
692 cout << m_foil[i][2]->getInnerROfCgemFoil() << " " << m_foil[i][2]->getOuterROfCgemFoil() << endl;
693 cout << "T2 " << m_CgemLayer[i]->getInnerROfGapT2() << " " << m_CgemLayer[i]->getOuterROfGapT2() << endl;
694 cout << m_foil[i][1]->getInnerROfCgemFoil() << " " << m_foil[i][1]->getOuterROfCgemFoil() << endl;
695 cout << "T1 " << m_CgemLayer[i]->getInnerROfGapT1() << " " << m_CgemLayer[i]->getOuterROfGapT1() << endl;
696 cout << m_foil[i][0]->getInnerROfCgemFoil() << " " << m_foil[i][0]->getOuterROfCgemFoil() << endl;
697 cout << "D " << m_CgemLayer[i]->getInnerROfGapD() << " " << m_CgemLayer[i]->getOuterROfGapD() << endl;
698 }
699 else {
700 cout << "GEM" << endl;
701 cout << "D " << m_CgemLayer[i]->getInnerROfGapD() << " " << m_CgemLayer[i]->getOuterROfGapD() << endl;
702 cout << m_foil[i][0]->getInnerROfCgemFoil() << " " << m_foil[i][0]->getOuterROfCgemFoil() << endl;
703 cout << "T1 " << m_CgemLayer[i]->getInnerROfGapT1() << " " << m_CgemLayer[i]->getOuterROfGapT1() << endl;
704 cout << m_foil[i][1]->getInnerROfCgemFoil() << " " << m_foil[i][1]->getOuterROfCgemFoil() << endl;
705 cout << "T2 " << m_CgemLayer[i]->getInnerROfGapT2() << " " << m_CgemLayer[i]->getOuterROfGapT2() << endl;
706 cout << m_foil[i][2]->getInnerROfCgemFoil() << " " << m_foil[i][2]->getOuterROfCgemFoil() << endl;
707 cout << "I " << m_CgemLayer[i]->getInnerROfGapI() << " " << m_CgemLayer[i]->getOuterROfGapI() << endl;
708 }
709 }
710
711 /* Information of Anode */
712 if(fReversed == false) {
713 m_CgemLayer[i]->setInnerROfAnode( m_CgemLayer[i]->getOuterROfGapI() );
714 m_CgemLayer[i]->setOuterROfAnode( m_CgemLayer[i]->getOuterROfGapI() + T_Anode );
715 } else {
716 m_CgemLayer[i]->setOuterROfAnode( m_CgemLayer[i]->getInnerROfGapI() );
717 m_CgemLayer[i]->setInnerROfAnode( m_CgemLayer[i]->getInnerROfGapI() - T_Anode);
718 }
719
720 if(m_debugCout) cout << "ANODE from " << m_CgemLayer[i]->getInnerROfAnode() << " to " << m_CgemLayer[i]->getOuterROfAnode() << " thickness " << m_CgemLayer[i]->getOuterROfAnode() - m_CgemLayer[i]->getInnerROfAnode() << endl;
721
722
723
724 double inner_r_anode[N_MATERIAL_MAX];
725 double outer_r_anode[N_MATERIAL_MAX];
726 double m_t_anode_list[N_MATERIAL_MAX] = {
727 ta_cu1[i],ta_kapton1[i],ta_cu2[i],ta_epoxy1[i],ta_kapton2[i],ta_epoxy2[i],ta_rohacell1[i],ta_carbonf1[i],ta_kapton3[i],ta_epoxy3[i],ta_honeycomb[i],ta_kapton4[i],ta_epoxy4[i],ta_rohacell2[i],ta_carbonf2[i],ta_epoxy5[i],ta_cu3[i],ta_kapton5[i],ta_kapton6[i],ta_cu4[i]
728 };
729 inner_r_anode[0] = m_CgemLayer[i]->getInnerROfAnode();
730
731 if(fReversed == true) counter = NMATERIALS_ANODE - 1;
732 else counter = 0;
733
734 for(int imat = 0; imat < NMATERIALS_ANODE; imat++) {
735 outer_r_anode[imat] = inner_r_anode[imat] + m_t_anode_list[counter];
736
737 switch(counter) {
738 case 0 :
739 m_CgemLayer[i]->setInnerROfAnodeCu1(inner_r_anode[imat]);
740 m_CgemLayer[i]->setOuterROfAnodeCu1(outer_r_anode[imat]);
741 break;
742 case 1 :
743 m_CgemLayer[i]->setInnerROfAnodeKapton1(inner_r_anode[imat]);
744 m_CgemLayer[i]->setOuterROfAnodeKapton1(outer_r_anode[imat]);
745 break;
746 case 2:
747 m_CgemLayer[i]->setInnerROfAnodeCu2(inner_r_anode[imat]);
748 m_CgemLayer[i]->setOuterROfAnodeCu2(outer_r_anode[imat]);
749 break;
750 case 3:
751 m_CgemLayer[i]->setInnerROfAnodeEpoxy1(inner_r_anode[imat]);
752 m_CgemLayer[i]->setOuterROfAnodeEpoxy1(outer_r_anode[imat]);
753 break;
754 case 4:
755 m_CgemLayer[i]->setInnerROfAnodeKapton2(inner_r_anode[imat]);
756 m_CgemLayer[i]->setOuterROfAnodeKapton2(outer_r_anode[imat]);
757 break;
758 case 5:
759 m_CgemLayer[i]->setInnerROfAnodeEpoxy2(inner_r_anode[imat]);
760 m_CgemLayer[i]->setOuterROfAnodeEpoxy2(outer_r_anode[imat]);
761 break;
762 case 6:
763 m_CgemLayer[i]->setInnerROfAnodeRohacell1(inner_r_anode[imat]);
764 m_CgemLayer[i]->setOuterROfAnodeRohacell1(outer_r_anode[imat]);
765 break;
766 case 7:
767 m_CgemLayer[i]->setInnerROfAnodeCarbonf1(inner_r_anode[imat]);
768 m_CgemLayer[i]->setOuterROfAnodeCarbonf1(outer_r_anode[imat]);
769 break;
770 case 8 :
771 m_CgemLayer[i]->setInnerROfAnodeKapton3(inner_r_anode[imat]);
772 m_CgemLayer[i]->setOuterROfAnodeKapton3(outer_r_anode[imat]);
773 break;
774 case 9:
775 m_CgemLayer[i]->setInnerROfAnodeEpoxy3(inner_r_anode[imat]);
776 m_CgemLayer[i]->setOuterROfAnodeEpoxy3(outer_r_anode[imat]);
777 break;
778 case 10:
779 m_CgemLayer[i]->setInnerROfAnodeHoneycomb(inner_r_anode[imat]);
780 m_CgemLayer[i]->setOuterROfAnodeHoneycomb(outer_r_anode[imat]);
781 break;
782 case 11:
783 m_CgemLayer[i]->setInnerROfAnodeKapton4(inner_r_anode[imat]);
784 m_CgemLayer[i]->setOuterROfAnodeKapton4(outer_r_anode[imat]);
785 break;
786 case 12:
787 m_CgemLayer[i]->setInnerROfAnodeEpoxy4(inner_r_anode[imat]);
788 m_CgemLayer[i]->setOuterROfAnodeEpoxy4(outer_r_anode[imat]);
789 break;
790 case 13:
791 m_CgemLayer[i]->setInnerROfAnodeRohacell2(inner_r_anode[imat]);
792 m_CgemLayer[i]->setOuterROfAnodeRohacell2(outer_r_anode[imat]);
793 break;
794 case 14:
795 m_CgemLayer[i]->setInnerROfAnodeCarbonf2(inner_r_anode[imat]);
796 m_CgemLayer[i]->setOuterROfAnodeCarbonf2(outer_r_anode[imat]);
797 break;
798 case 15:
799 m_CgemLayer[i]->setInnerROfAnodeEpoxy5(inner_r_anode[imat]);
800 m_CgemLayer[i]->setOuterROfAnodeEpoxy5(outer_r_anode[imat]);
801 break;
802 case 16:
803 m_CgemLayer[i]->setInnerROfAnodeCu3(inner_r_anode[imat]);
804 m_CgemLayer[i]->setOuterROfAnodeCu3(outer_r_anode[imat]);
805 break;
806 case 17:
807 m_CgemLayer[i]->setInnerROfAnodeKapton5(inner_r_anode[imat]);
808 m_CgemLayer[i]->setOuterROfAnodeKapton5(outer_r_anode[imat]);
809 break;
810 case 18:
811 m_CgemLayer[i]->setInnerROfAnodeKapton6(inner_r_anode[imat]);
812 m_CgemLayer[i]->setOuterROfAnodeKapton6(outer_r_anode[imat]);
813 break;
814 case 19:
815 m_CgemLayer[i]->setInnerROfAnodeCu4(inner_r_anode[imat]);
816 m_CgemLayer[i]->setOuterROfAnodeCu4(outer_r_anode[imat]);
817 break;
818 default:
819 break;
820 }
821
822 // cout << imat << " " << counter << " inner " << inner_r_anode[imat] << " outer " << outer_r_anode[imat] << endl;
823 if(imat == NMATERIALS_ANODE - 1) {
824 if(m_debugCout) cout << "breaking" << endl;
825 break;
826 }
827 inner_r_anode[imat + 1] = outer_r_anode[imat];
828 if(fReversed == false) counter++;
829 else counter--;
830 }
831 if(m_debugCout)
832 {
833 cout << "ANODE: " << endl;
834 cout << setw(20) << m_CgemLayer[i]->getInnerROfAnode() << endl
835 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeCu1()
836 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeCu1()
837 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeKapton1()
838 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeKapton1() << endl
839 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeCu2()
840 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeCu2()
841 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeEpoxy1()
842 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeEpoxy1() << endl
843 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeKapton2()
844 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeKapton2()
845 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeEpoxy2()
846 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeEpoxy2() << endl
847 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeRohacell1()
848 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeRohacell1()
849 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeCarbonf1()
850 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeCarbonf1() << endl
851 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeKapton3()
852 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeKapton3() << endl
853 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeEpoxy3()
854 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeEpoxy3()
855 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeHoneycomb()
856 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeHoneycomb() <<endl
857 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeKapton4()
858 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeKapton4()
859 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeEpoxy4()
860 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeEpoxy4() << endl
861 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeRohacell2()
862 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeRohacell2()
863 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeCarbonf2()
864 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeCarbonf2() << endl
865 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeEpoxy5()
866 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeEpoxy5()
867 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeCu3()
868 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeCu3() << endl
869 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeKapton5()
870 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeKapton5() << endl
871 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeKapton6()
872 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeKapton6()
873 << setw(20) << m_CgemLayer[i]->getInnerROfAnodeCu4()
874 << setw(20) << m_CgemLayer[i]->getOuterROfAnodeCu4() << endl
875 << setw(20) << m_CgemLayer[i]->getOuterROfAnode() << endl;
876 cout << "X strip description is " << m_B_strip_x_on << " and V strip description is " << m_B_strip_v_on << endl;
877 }
878
879 /* Check over the radius! */
880 if(fReversed == false) {
881 if(fabs((m_CgemLayer[i]->getOuterROfAnode() / m_CgemLayer[i]->getOuterROfCgemLayer())-1) > FLT_EPSILON){
882 cout << fabs(m_CgemLayer[i]->getOuterROfAnode() - m_CgemLayer[i]->getOuterROfCgemLayer()) << endl;
883 cout << FLT_EPSILON << endl;
884 cout << "Error : CgemLayer size is wrong!" << endl;
885 return false;
886 }
887 }
888 else {
889 if(fabs((m_CgemLayer[i]->getInnerROfAnode() / m_CgemLayer[i]->getInnerROfCgemLayer())-1) > FLT_EPSILON){
890 cout << fabs(m_CgemLayer[i]->getInnerROfAnode() - m_CgemLayer[i]->getInnerROfCgemLayer()) << endl;
891 cout << FLT_EPSILON << endl;
892 cout << "Error : CgemLayer size is wrong!" << endl;
893 return false;
894 }
895
896 }
897
898 m_CgemLayer[i]->print();
899
900 int nSheet=m_CgemLayer[i]->getNumberOfSheet();
901 double rVstrips=m_CgemLayer[i]->getInnerROfAnode();
902 double rXstrips = m_CgemLayer[i]->getInnerROfAnodeCu2();
903 //double rMidAnode = 0.5*(rVstrips+m_CgemLayer[i]->getOuterROfAnodeCu2());
904 if(fReversed) {
905 rVstrips=m_CgemLayer[i]->getOuterROfAnode();
906 rXstrips = m_CgemLayer[i]->getOuterROfAnodeCu2();
907 }
908 double width_sheet=rXstrips*CLHEP::twopi/nSheet;
909 if(m_debugCout) cout<<"construct CgemReadoutPlanes: "<<endl;
910
911 //cout << "!!!!!!!! CHECK DELETE " << rXstrips << " " << width_sheet << " " << endl;
912
913 for(int j=0; j<nSheet; j++){
914 if(m_debugCout) cout<<"------ layer "<<i<<", sheet "<<j<<" ------ "<<endl;
915 double rStrips = 0.5*(rXstrips+rVstrips);
916 dX_start_strip[i][j]=(2.*M_PI*rStrips-m_CgemLayer[i]->getNumberOfChannelX()*m_CgemLayer[i]->getWidthOfPitchX())/(2.*nSheet)*rXstrips/rStrips;// dX calculation FIXME
917 m_ReadoutPlane[i][j]=new CgemGeoReadoutPlane(i,j,
918 rXstrips, rVstrips,
919 phi_start[i][j], dX_start_strip[i][j],
920 dV_start_strip[i][j],
921 width_sheet,
922 -0.5*m_CgemLayer[i]->getLengthOfCgemLayer(),
923 m_CgemLayer[i]->getLengthOfCgemLayer(),
924 m_CgemLayer[i]->getNumberOfChannelX()/nSheet,
925 m_CgemLayer[i]->getNumberOfChannelV()/nSheet,
926 m_CgemLayer[i]->getWidthOfPitchX(),
927 m_CgemLayer[i]->getWidthOfStripX(),
928 m_CgemLayer[i]->getWidthOfPitchV(),
929 m_CgemLayer[i]->getWidthOfStripV(),
930 m_CgemLayer[i]->getAngleOfStereo(),
931 m_CgemLayer[i]->getMiddleROfGapD(),
932 m_CgemLayer[i]->getOuterROfGapD()
933 );
934 }// loop sheet
935
936 } /* end of "for (int i=0; i < m_N_CgemLayer; i++)" */
937
938 if(m_debugCout) cout << "INFO : CgemGeomSvc::initGeom(), Successfully input geometry parameters!" << endl;
939
940 /** CHECK: now it is the passive dimensions
941 m_R_i_Cgem = m_CgemLayer[0]->getInnerROfCgemLayer();
942 m_R_o_Cgem = m_CgemSeparator->getOuterROfSeparator(); // m_CgemLayer[m_N_CgemLayer-1]->getOuterROfCgemLayer(); // CHECK
943 m_L_Cgem = m_CgemSeparator->getLengthOfSeparator(); // m_CgemLayer[m_N_CgemLayer-1]->getLengthOfCgemLayer(); // CHECK
944 **/
945 //if(m_debugCout)
946 {
947 cout << "====================CGEM Information=========================" << endl;
948 cout << "R_i_Cgem " << "R_o_Cgem " << "L_Cgem" << endl;
949 cout << left << setw(10) << m_R_i_Cgem
950 << left << setw(10) << m_R_o_Cgem
951 << left << setw(10) << m_L_Cgem << endl;
952 cout << "====================CGEM Information End!====================" << endl;
953 cout << " " << endl;
954
955
956 cout << "************************ FINAL CHECK OF THE DIMENSIONS" << endl;
957 for(int ilayer = 0; ilayer < 3; ilayer++) {
958
959
960 cout << "inner global radius of layer" << ilayer << ": " << m_CgemLayer[ilayer]->getInnerROfCgemLayer()
961 << " outer " << m_CgemLayer[ilayer]->getOuterROfCgemLayer() << endl;
962 cout << "inner radius of cathode: " << m_CgemLayer[ilayer]->getInnerROfCathode()
963 << " outer " << m_CgemLayer[ilayer]->getOuterROfCathode() << endl;
964
965 for(int ifoil = 0; ifoil < 3; ifoil++) {
966 cout << "inner radius of gem" << ifoil << ": " << m_foil[ilayer][ifoil]->getInnerROfCgemFoil()
967 << " outer " << m_foil[ilayer][ifoil]->getOuterROfCgemFoil() << endl;
968 }
969
970 cout << "inner radius of anode: " << m_CgemLayer[ilayer]->getInnerROfAnode()
971 << " outer " << m_CgemLayer[ilayer]->getOuterROfAnode() << endl;
972 }
973 cout << endl;
974 }
975
976 return true;
977} /* end of "Execute()" */
#define M_PI
Definition: TConstant.h:4
double getOuterROfCgemFoilCu1() const
Definition: CgemGeoFoil.h:36
double getInnerROfCgemFoilCu2() const
Definition: CgemGeoFoil.h:39
void setIDOfCgemFoil(int id)
Definition: CgemGeoFoil.h:17
void setInnerROfCgemFoilKapton(double r)
Definition: CgemGeoFoil.h:22
void setOuterROfCgemFoilCu1(double r)
Definition: CgemGeoFoil.h:21
double getOuterROfCgemFoilKapton() const
Definition: CgemGeoFoil.h:38
void setLengthOfCgemFoilHole(double r)
Definition: CgemGeoFoil.h:29
void setInnerROfCgemFoilCu1(double r)
Definition: CgemGeoFoil.h:20
double getInnerROfCgemFoil() const
Definition: CgemGeoFoil.h:33
double getInnerROfCgemFoilCu1() const
Definition: CgemGeoFoil.h:35
void setOuterROfCgemFoilCu2(double r)
Definition: CgemGeoFoil.h:25
int getIDOfCgemFoil() const
Definition: CgemGeoFoil.h:32
void setInnerROfCgemFoilCu2(double r)
Definition: CgemGeoFoil.h:24
void setOuterR1OfCgemFoilHole(double r)
Definition: CgemGeoFoil.h:27
void setOuterROfCgemFoilKapton(double r)
Definition: CgemGeoFoil.h:23
void setOuterR2OfCgemFoilHole(double r)
Definition: CgemGeoFoil.h:28
double getInnerROfCgemFoilKapton() const
Definition: CgemGeoFoil.h:37
void setOuterROfCgemFoil(double r)
Definition: CgemGeoFoil.h:19
void setInnerROfCgemFoil(double r)
Definition: CgemGeoFoil.h:18
double getOuterROfCgemFoilCu2() const
Definition: CgemGeoFoil.h:40
double getOuterROfCgemFoil() const
Definition: CgemGeoFoil.h:34
void setInnerROfCgemFoilHole(double r)
Definition: CgemGeoFoil.h:26
void setWidthOfPitchV(double w)
Definition: CgemGeoLayer.h:211
void setWidthOfStripX(double w)
Definition: CgemGeoLayer.h:212
double getOuterROfAnodeCu1() const
Definition: CgemGeoLayer.h:164
void setInnerROfCathodeEpoxy3(double r)
Definition: CgemGeoLayer.h:50
void setAngleOfStereo(double a)
Definition: CgemGeoLayer.h:208
void setIDOfCgemLayer(int id)
Definition: CgemGeoLayer.h:16
void setOuterROfAnodeKapton4(double r)
Definition: CgemGeoLayer.h:143
void setInnerROfCathodeEpoxy4(double r)
Definition: CgemGeoLayer.h:54
double getInnerROfCathode() const
Definition: CgemGeoLayer.h:61
void setInnerROfAnodeKapton6(double r)
Definition: CgemGeoLayer.h:156
double getInnerROfAnodeEpoxy4() const
Definition: CgemGeoLayer.h:187
double getInnerROfAnodeEpoxy1() const
Definition: CgemGeoLayer.h:169
void setInnerROfAnodeRohacell2(double r)
Definition: CgemGeoLayer.h:146
void setOuterROfCathodeKapton3(double r)
Definition: CgemGeoLayer.h:57
void setOuterROfAnodeCarbonf2(double r)
Definition: CgemGeoLayer.h:149
double getInnerROfCathodeKapton2() const
Definition: CgemGeoLayer.h:79
void setOuterROfAnodeCu3(double r)
Definition: CgemGeoLayer.h:153
void setOuterROfAnodeKapton1(double r)
Definition: CgemGeoLayer.h:123
double getInnerROfCathodeEpoxy0() const
Definition: CgemGeoLayer.h:67
double getWidthOfPitchV() const
Definition: CgemGeoLayer.h:221
void setOuterROfAnodeRohacell2(double r)
Definition: CgemGeoLayer.h:147
double getOuterROfCathodeEpoxy4() const
Definition: CgemGeoLayer.h:86
double getInnerROfGapI() const
Definition: CgemGeoLayer.h:110
double getOuterROfAnodeCarbonf1() const
Definition: CgemGeoLayer.h:178
void setOuterROfAnode(double r)
Definition: CgemGeoLayer.h:119
void setInnerROfAnodeHoneycomb(double r)
Definition: CgemGeoLayer.h:140
double getWidthOfStripV() const
Definition: CgemGeoLayer.h:223
double getOuterROfGapD() const
Definition: CgemGeoLayer.h:104
void setOuterROfAnodeEpoxy5(double r)
Definition: CgemGeoLayer.h:151
void setOuterROfCathodeRohacell2(double r)
Definition: CgemGeoLayer.h:53
double getInnerROfCathodeKapton3() const
Definition: CgemGeoLayer.h:87
void setInnerROfCathodeCarbonf(double r)
Definition: CgemGeoLayer.h:38
double getInnerROfAnodeHoneycomb() const
Definition: CgemGeoLayer.h:183
double getOuterROfAnodeEpoxy2() const
Definition: CgemGeoLayer.h:174
double getInnerROfGapT1() const
Definition: CgemGeoLayer.h:106
double getInnerROfCathodeCu1() const
Definition: CgemGeoLayer.h:63
double getLengthOfCgemLayer() const
Definition: CgemGeoLayer.h:22
void setInnerROfAnodeCu2(double r)
Definition: CgemGeoLayer.h:124
double getOuterROfCathodeEpoxy1() const
Definition: CgemGeoLayer.h:72
void setOuterROfAnodeEpoxy3(double r)
Definition: CgemGeoLayer.h:139
double getInnerROfCathodeCu2() const
Definition: CgemGeoLayer.h:89
void setOuterROfAnodeKapton5(double r)
Definition: CgemGeoLayer.h:155
double getInnerROfCathodeEpoxy2() const
Definition: CgemGeoLayer.h:77
double getInnerROfAnodeKapton6() const
Definition: CgemGeoLayer.h:199
double getOuterROfCathodeKapton1() const
Definition: CgemGeoLayer.h:66
double getOuterROfAnodeHoneycomb() const
Definition: CgemGeoLayer.h:184
void setOuterROfCathodeKapton2(double r)
Definition: CgemGeoLayer.h:49
void setInnerROfCathodeKapton2(double r)
Definition: CgemGeoLayer.h:48
void setOuterROfAnodeEpoxy1(double r)
Definition: CgemGeoLayer.h:127
double getOuterROfAnodeKapton2() const
Definition: CgemGeoLayer.h:172
double getInnerROfCathodeEpoxy4() const
Definition: CgemGeoLayer.h:85
double getOuterROfAnodeCu4() const
Definition: CgemGeoLayer.h:202
double getOuterROfAnodeKapton1() const
Definition: CgemGeoLayer.h:166
void setInnerROfAnodeEpoxy5(double r)
Definition: CgemGeoLayer.h:150
double getOuterROfCathodeCu2() const
Definition: CgemGeoLayer.h:90
double getInnerROfAnodeCu1() const
Definition: CgemGeoLayer.h:163
void setInnerROfCathodeCu2(double r)
Definition: CgemGeoLayer.h:58
double getInnerROfAnodeKapton2() const
Definition: CgemGeoLayer.h:171
void setInnerROfGapD(double r)
Definition: CgemGeoLayer.h:94
void setOuterROfGapI(double r)
Definition: CgemGeoLayer.h:101
double getInnerROfCgemLayer() const
Definition: CgemGeoLayer.h:23
double getOuterROfCathodeEpoxy3() const
Definition: CgemGeoLayer.h:82
void setNumberOfChannelV(int n)
Definition: CgemGeoLayer.h:207
double getInnerROfAnode() const
Definition: CgemGeoLayer.h:161
double getInnerROfGapT2() const
Definition: CgemGeoLayer.h:108
void setCgemFoil(int i, CgemGeoFoil *pFoil)
Definition: CgemGeoLayer.h:114
double getWidthOfStripX() const
Definition: CgemGeoLayer.h:222
double getOuterROfAnodeRohacell1() const
Definition: CgemGeoLayer.h:176
void setInnerROfAnodeEpoxy2(double r)
Definition: CgemGeoLayer.h:130
void setOuterROfAnodeKapton2(double r)
Definition: CgemGeoLayer.h:129
double getOuterROfGapT1() const
Definition: CgemGeoLayer.h:107
void setInnerROfAnodeCarbonf2(double r)
Definition: CgemGeoLayer.h:148
void setOuterROfGapT2(double r)
Definition: CgemGeoLayer.h:99
double getOuterROfCathodeRohacell2() const
Definition: CgemGeoLayer.h:84
double getOuterROfCathodeCarbonf() const
Definition: CgemGeoLayer.h:70
void setOuterROfCathodeKapton1(double r)
Definition: CgemGeoLayer.h:35
double getOuterROfGapT2() const
Definition: CgemGeoLayer.h:109
double getInnerROfAnodeCu3() const
Definition: CgemGeoLayer.h:195
void setOuterROfCathodeCarbonf(double r)
Definition: CgemGeoLayer.h:39
void setInnerROfAnodeKapton1(double r)
Definition: CgemGeoLayer.h:122
void setInnerROfAnodeCarbonf1(double r)
Definition: CgemGeoLayer.h:134
double getOuterROfAnodeCu3() const
Definition: CgemGeoLayer.h:196
double getInnerROfCathodeEpoxy3() const
Definition: CgemGeoLayer.h:81
void setOuterROfAnodeKapton3(double r)
Definition: CgemGeoLayer.h:137
double getOuterROfAnodeKapton3() const
Definition: CgemGeoLayer.h:180
void setInnerROfCgemLayer(double innerR)
Definition: CgemGeoLayer.h:18
double getOuterROfAnode() const
Definition: CgemGeoLayer.h:162
double getOuterROfCathodeCu1() const
Definition: CgemGeoLayer.h:64
void setInnerROfAnodeCu1(double r)
Definition: CgemGeoLayer.h:120
void setInnerROfGapT1(double r)
Definition: CgemGeoLayer.h:96
void setInnerROfGapI(double r)
Definition: CgemGeoLayer.h:100
void setInnerROfCathodeHoneycomb(double r)
Definition: CgemGeoLayer.h:42
double getOuterROfCathodeKapton3() const
Definition: CgemGeoLayer.h:88
int getNumberOfChannelX() const
Definition: CgemGeoLayer.h:216
double getInnerROfAnodeRohacell1() const
Definition: CgemGeoLayer.h:175
void setNumberOfSheet(int n)
Definition: CgemGeoLayer.h:205
void setInnerROfAnodeCu3(double r)
Definition: CgemGeoLayer.h:152
void setInnerROfAnode(double r)
Definition: CgemGeoLayer.h:118
int getNumberOfChannelV() const
Definition: CgemGeoLayer.h:217
void setInnerROfGapT2(double r)
Definition: CgemGeoLayer.h:98
double getOuterROfCathode() const
Definition: CgemGeoLayer.h:62
double getOuterROfAnodeEpoxy1() const
Definition: CgemGeoLayer.h:170
double getWidthOfSheet() const
Definition: CgemGeoLayer.h:219
double getInnerROfAnodeEpoxy2() const
Definition: CgemGeoLayer.h:173
void setOuterROfCathodeEpoxy4(double r)
Definition: CgemGeoLayer.h:55
double getOuterROfCathodeRohacell1() const
Definition: CgemGeoLayer.h:76
double getOuterROfAnodeEpoxy4() const
Definition: CgemGeoLayer.h:188
void setInnerROfCathodeRohacell1(double r)
Definition: CgemGeoLayer.h:44
void setInnerROfAnodeCu4(double r)
Definition: CgemGeoLayer.h:158
void setOuterROfAnodeEpoxy2(double r)
Definition: CgemGeoLayer.h:131
void setInnerROfAnodeRohacell1(double r)
Definition: CgemGeoLayer.h:132
void setOuterROfGapT1(double r)
Definition: CgemGeoLayer.h:97
double getInnerROfAnodeCu4() const
Definition: CgemGeoLayer.h:201
void setInnerROfAnodeKapton5(double r)
Definition: CgemGeoLayer.h:154
double getOuterROfAnodeCarbonf2() const
Definition: CgemGeoLayer.h:192
double getOuterROfGapI() const
Definition: CgemGeoLayer.h:111
void setOrientation(bool o)
Definition: CgemGeoLayer.h:26
void setOuterROfAnodeCu2(double r)
Definition: CgemGeoLayer.h:125
double getInnerROfAnodeRohacell2() const
Definition: CgemGeoLayer.h:189
void setInnerROfCathodeRohacell2(double r)
Definition: CgemGeoLayer.h:52
double getOuterROfCgemLayer() const
Definition: CgemGeoLayer.h:24
void setOuterROfCathodeRohacell1(double r)
Definition: CgemGeoLayer.h:45
void setInnerROfAnodeKapton4(double r)
Definition: CgemGeoLayer.h:142
double getInnerROfCathodeCarbonf() const
Definition: CgemGeoLayer.h:69
void setInnerROfCathodeEpoxy1(double r)
Definition: CgemGeoLayer.h:40
double getAngleOfStereo() const
Definition: CgemGeoLayer.h:218
double getInnerROfAnodeCarbonf1() const
Definition: CgemGeoLayer.h:177
void setOuterROfCathodeEpoxy1(double r)
Definition: CgemGeoLayer.h:41
void setNumberOfChannelX(int n)
Definition: CgemGeoLayer.h:206
void setOuterROfAnodeKapton6(double r)
Definition: CgemGeoLayer.h:157
double getInnerROfAnodeEpoxy3() const
Definition: CgemGeoLayer.h:181
void setOuterROfCgemLayer(double outerR)
Definition: CgemGeoLayer.h:19
double getOuterROfAnodeEpoxy5() const
Definition: CgemGeoLayer.h:194
void setOuterROfCathodeEpoxy0(double r)
Definition: CgemGeoLayer.h:37
double getInnerROfCathodeKapton1() const
Definition: CgemGeoLayer.h:65
double getWidthOfPitchX() const
Definition: CgemGeoLayer.h:220
void setOuterROfCathodeCu2(double r)
Definition: CgemGeoLayer.h:59
void setWidthOfStripV(double w)
Definition: CgemGeoLayer.h:213
double getInnerROfAnodeKapton3() const
Definition: CgemGeoLayer.h:179
void setOuterROfCathodeHoneycomb(double r)
Definition: CgemGeoLayer.h:43
double getInnerROfCathodeEpoxy1() const
Definition: CgemGeoLayer.h:71
double getInnerROfAnodeKapton4() const
Definition: CgemGeoLayer.h:185
void setOuterROfCathodeEpoxy2(double r)
Definition: CgemGeoLayer.h:47
bool getOrientation() const
Definition: CgemGeoLayer.h:27
void setInnerROfCathodeKapton1(double r)
Definition: CgemGeoLayer.h:34
void setInnerROfCathodeEpoxy0(double r)
Definition: CgemGeoLayer.h:36
void setLengthOfCgemLayer(double length)
Definition: CgemGeoLayer.h:17
void setInnerROfCathodeCu1(double r)
Definition: CgemGeoLayer.h:32
void setOuterROfAnodeHoneycomb(double r)
Definition: CgemGeoLayer.h:141
void setInnerROfCathodeKapton3(double r)
Definition: CgemGeoLayer.h:56
void setInnerROfAnodeEpoxy1(double r)
Definition: CgemGeoLayer.h:126
void setInnerROfCathode(double r)
Definition: CgemGeoLayer.h:30
double getInnerROfAnodeEpoxy5() const
Definition: CgemGeoLayer.h:193
void setOuterROfAnodeCarbonf1(double r)
Definition: CgemGeoLayer.h:135
double getOuterROfAnodeCu2() const
Definition: CgemGeoLayer.h:168
double getInnerROfGapD() const
Definition: CgemGeoLayer.h:103
double getInnerROfAnodeCarbonf2() const
Definition: CgemGeoLayer.h:191
void setInnerROfAnodeKapton3(double r)
Definition: CgemGeoLayer.h:136
double getInnerROfAnodeKapton5() const
Definition: CgemGeoLayer.h:197
double getOuterROfAnodeEpoxy3() const
Definition: CgemGeoLayer.h:182
double getInnerROfAnodeKapton1() const
Definition: CgemGeoLayer.h:165
void setInnerROfCathodeEpoxy2(double r)
Definition: CgemGeoLayer.h:46
double getOuterROfCathodeEpoxy2() const
Definition: CgemGeoLayer.h:78
double getInnerROfAnodeCu2() const
Definition: CgemGeoLayer.h:167
double getOuterROfCathodeHoneycomb() const
Definition: CgemGeoLayer.h:74
void setOuterROfCathodeEpoxy3(double r)
Definition: CgemGeoLayer.h:51
double getOuterROfCathodeKapton2() const
Definition: CgemGeoLayer.h:80
double getOuterROfAnodeKapton4() const
Definition: CgemGeoLayer.h:186
void setInnerROfAnodeEpoxy3(double r)
Definition: CgemGeoLayer.h:138
double getInnerROfCathodeHoneycomb() const
Definition: CgemGeoLayer.h:73
double getInnerROfCathodeRohacell1() const
Definition: CgemGeoLayer.h:75
void setOuterROfGapD(double r)
Definition: CgemGeoLayer.h:95
void setOuterROfAnodeCu1(double r)
Definition: CgemGeoLayer.h:121
void setOuterROfAnodeCu4(double r)
Definition: CgemGeoLayer.h:159
double getOuterROfAnodeKapton5() const
Definition: CgemGeoLayer.h:198
void setOuterROfCathodeCu1(double r)
Definition: CgemGeoLayer.h:33
void setWidthOfSheet(double w)
Definition: CgemGeoLayer.h:209
void setOuterROfAnodeRohacell1(double r)
Definition: CgemGeoLayer.h:133
double getInnerROfCathodeRohacell2() const
Definition: CgemGeoLayer.h:83
void setWidthOfPitchX(double w)
Definition: CgemGeoLayer.h:210
void setInnerROfAnodeEpoxy4(double r)
Definition: CgemGeoLayer.h:144
void setOuterROfAnodeEpoxy4(double r)
Definition: CgemGeoLayer.h:145
double getOuterROfAnodeRohacell2() const
Definition: CgemGeoLayer.h:190
double getOuterROfAnodeKapton6() const
Definition: CgemGeoLayer.h:200
double getOuterROfCathodeEpoxy0() const
Definition: CgemGeoLayer.h:68
void setInnerROfAnodeKapton2(double r)
Definition: CgemGeoLayer.h:128
void setOuterROfCathode(double r)
Definition: CgemGeoLayer.h:31
void setInnerR(double innerR)
void setOuterR(double outerR)
void setLength(double length)
void setThickOfOuterAluminum(double thick)
void setThickOfCarbonFiber(double thick)
void setThickOfInnerAluminum(double thick)
static const int N_MATERIAL_MAX
Definition: CgemGeomSvc.h:81
std::ifstream ifstream
Definition: bpkt_streams.h:44

Referenced by initialize().

◆ initialize()

StatusCode CgemGeomSvc::initialize ( )
virtual

Definition at line 62 of file CgemGeomSvc.cxx.

62 {
63 MsgStream log(msgSvc(), name());
64 log << MSG::INFO << "initializing......" << endreq;
65
66 StatusCode sc = Service::initialize();
67 if ( sc.isFailure() ) return sc;
68
69 initGeom();
70 m_align = new CgemGeoAlign();
71 m_align->initAlignPar(m_alignFile);
72 for(int layer=0; layer<m_N_CgemLayer; layer++){
73 double r = m_CgemLayer[layer]->getMiddleROfGapD();
74 m_align->setLayerR(layer, r);
75 }
76
77 cout << "CgemGeomSvc::initialize(): alignfile: " << m_alignFile << " --------------------------------------" << endl;
78
79 m_midDrift = new CgemMidDriftPlane();
80 m_midDrift->setAlignment(m_align);
81 for(int layer=0; layer<m_N_CgemLayer; layer++){
82 //double rInner = m_CgemLayer[layer]->getInnerROfGapD();
83 //double rOuter = m_CgemLayer[layer]->getOuterROfGapD();
84 //double r = (rInner + rOuter)*0.5;
85 double r = m_CgemLayer[layer]->getMiddleROfGapD();
86 m_midDrift->setR(layer, r);
87
88 int nSheet=m_CgemLayer[layer]->getNumberOfSheet();
89 for(int i=0; i<nSheet; i++){
90 m_midDrift->setReadoutPlane(layer, i, m_ReadoutPlane[layer][i]);
91 }
92
93 // double vAngle = m_CgemLayer[layer]->getAngleOfStereo();
94 // m_midDrift->setVangle(layer, vAngle);
95 }
96
97 if(m_testReadoutPlane) TestReadoutPlane();
98
99 return StatusCode::SUCCESS;
100}
void setLayerR(int layer_geo, double r)
Definition: CgemGeoAlign.h:67
void initAlignPar(std::string alignFile)
double getMiddleROfGapD() const
Definition: CgemGeoLayer.h:105
bool initGeom()
void setAlignment(CgemGeoAlign *alignPtr)
void setR(int layer, double r)
void setReadoutPlane(int layer, int sheet, CgemGeoReadoutPlane *readoutPtr)

Referenced by CgemROOTGeo::InitGeometry().

◆ isEffDensityHoles()

bool CgemGeomSvc::isEffDensityHoles ( ) const
inline

Definition at line 75 of file CgemGeomSvc.h.

75{return m_effDensityHoles;}

◆ isEffDensityStrips()

bool CgemGeomSvc::isEffDensityStrips ( ) const
inline

Definition at line 76 of file CgemGeomSvc.h.

76{return m_effDensityStrips;}

◆ isPassive()

bool CgemGeomSvc::isPassive ( ) const
inline

Definition at line 74 of file CgemGeomSvc.h.

74{ return m_passive; }

◆ isVStripDescriptionOn()

bool CgemGeomSvc::isVStripDescriptionOn ( ) const
inline

Definition at line 57 of file CgemGeomSvc.h.

57{return m_B_strip_v_on; }

◆ isXStripDescriptionOn()

bool CgemGeomSvc::isXStripDescriptionOn ( ) const
inline

Definition at line 56 of file CgemGeomSvc.h.

56{return m_B_strip_x_on; }

◆ queryInterface()

StatusCode CgemGeomSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvUnknown 
)
virtual

Definition at line 51 of file CgemGeomSvc.cxx.

51 {
52
53 if ( IID_ICgemGeomSvc.versionMatch(riid) ) {
54 *ppvInterface = static_cast<ICgemGeomSvc*> (this);
55 } else {
56 return Service::queryInterface(riid, ppvInterface) ;
57 }
58 return StatusCode::SUCCESS;
59}

◆ readAlignPar()

void CgemGeomSvc::readAlignPar ( )

Definition at line 141 of file CgemGeomSvc.cxx.

141 {
142}

◆ setDensityOfCable()

void CgemGeomSvc::setDensityOfCable ( double  rho)
inline

Definition at line 59 of file CgemGeomSvc.h.

59{m_Rho_Cable = rho;}

Member Data Documentation

◆ N_MATERIAL_MAX

const int CgemGeomSvc::N_MATERIAL_MAX = 30
static

Definition at line 81 of file CgemGeomSvc.h.

Referenced by initGeom().

◆ NFOIL_MAX

const int CgemGeomSvc::NFOIL_MAX = 3
static

Definition at line 79 of file CgemGeomSvc.h.

◆ NLAYER_MAX

const int CgemGeomSvc::NLAYER_MAX = 3
static

Definition at line 78 of file CgemGeomSvc.h.

Referenced by getReadoutPlane().

◆ NMATERIALS_ANODE

const int CgemGeomSvc::NMATERIALS_ANODE = 20
static

Definition at line 83 of file CgemGeomSvc.h.

Referenced by getNMaterialsAnode(), and initGeom().

◆ NMATERIALS_CATHODE

const int CgemGeomSvc::NMATERIALS_CATHODE = 14
static

Definition at line 82 of file CgemGeomSvc.h.

Referenced by getNMaterialsCathode(), and initGeom().

◆ NMATERIALS_FOIL

const int CgemGeomSvc::NMATERIALS_FOIL = 3
static

Definition at line 84 of file CgemGeomSvc.h.

Referenced by getNMaterialsFoil().

◆ NSHEET_MAX

const int CgemGeomSvc::NSHEET_MAX = 2
static

Definition at line 80 of file CgemGeomSvc.h.

Referenced by getReadoutPlane().


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