CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
TEcnaNumbering Class Reference

#include <TEcnaNumbering.h>

Inheritance diagram for TEcnaNumbering:

Public Member Functions

void BuildBarrelCrysTable ()
 
void BuildEndcapCrysTable ()
 
void BuildEndcapSCTable ()
 
Int_t Get0SMEchaFrom1SMTowAnd0TowEcha (const Int_t &, const Int_t &)
 
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha (const Int_t &, const Int_t &)
 
Int_t Get0TowEchaFrom0SMEcha (const Int_t &)
 
Int_t Get0TowEchaFrom1SMCrys (const Int_t &)
 
Int_t Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha (const Int_t &, const Int_t &, const TString)
 
Int_t Get1DeeSCEcnaFrom0DeeEcha (const Int_t &)
 
Int_t Get1DeeSCEcnaFrom1DeeCrys (const Int_t &, const TString)
 
Int_t Get1DeeSCEcnaFromDeeSCCons (const Int_t &, const Int_t &)
 
Int_t Get1SCEchaFrom0DeeEcha (const Int_t &)
 
Int_t Get1SCEchaFrom1DeeCrys (const Int_t &, const TString)
 
Int_t Get1SMCrysFrom1SMTowAnd0TowEcha (const Int_t &, const Int_t &)
 
Int_t Get1SMTowFrom0SMEcha (const Int_t &)
 
Int_t Get1SMTowFrom1SMCrys (const Int_t &)
 
Int_t Get1StexCrysFrom1StexStinAnd0StinEcha (const Int_t &, const Int_t &, const Int_t &)
 
Int_t Get1StexStinFrom0StexEcha (const Int_t &)
 
Int_t GetDeeDirIndex (const TString)
 
TString GetDeeDirViewedFromIP (const Int_t &)
 
TString GetDeeHalfEndcap (const Int_t &)
 
Int_t GetDeeSCConsFrom1DeeSCEcna (const Int_t &, const Int_t &)
 
Int_t GetDeeSCConsFrom1DeeSCEcna (const Int_t &, const Int_t &, const Int_t &)
 
Int_t GetDSFrom1DeeSCEcna (const Int_t &, const Int_t &)
 
Int_t GetDSFromFED (const Int_t &)
 
Int_t GetDSSCFrom1DeeSCEcna (const Int_t &, const Int_t &, const Int_t &)
 
Int_t GetDSSCFrom1DeeSCEcna (const Int_t &, const Int_t &)
 
TString GetEEDeeEndcap (const Int_t &)
 
TString GetEEDeeType (const Int_t &)
 
Double_t GetEta (const Int_t &, const Int_t &, const Int_t &)
 
Double_t GetEtaMax (const Int_t &, const Int_t &)
 
Double_t GetEtaMin (const Int_t &, const Int_t &)
 
Int_t GetHashedNumberFromIEtaAndIPhi (const Int_t &, const Int_t &)
 
Int_t GetIEtaFromHashed (const Int_t &, const Int_t &)
 
Double_t GetIEtaMax (const Int_t &, const Int_t &)
 
Double_t GetIEtaMax (const Int_t &)
 
Double_t GetIEtaMin (const Int_t &, const Int_t &)
 
Double_t GetIEtaMin (const Int_t &)
 
Double_t GetIHocoMax (const Int_t &, const Int_t &)
 
Double_t GetIHocoMin (const Int_t &, const Int_t &)
 
Double_t GetIIXMax (const Int_t &)
 
Double_t GetIIXMax ()
 
Double_t GetIIXMin (const Int_t &)
 
Double_t GetIIXMin ()
 
Int_t GetIPhiFromHashed (const Int_t &)
 
Int_t GetIXCrysInDee (const Int_t &, const Int_t &, const Int_t &)
 
Int_t GetIXCrysInSC (const Int_t &, const Int_t &, const Int_t &)
 
Int_t GetIXSCInDee (const Int_t &)
 
Double_t GetJIYMax (const Int_t &, const Int_t &)
 
Double_t GetJIYMax (const Int_t &)
 
Double_t GetJIYMin (const Int_t &, const Int_t &)
 
Double_t GetJIYMin (const Int_t &)
 
Double_t GetJPhiMax (const Int_t &, const Int_t &)
 
Double_t GetJPhiMax (const Int_t &)
 
Double_t GetJPhiMin (const Int_t &, const Int_t &)
 
Double_t GetJPhiMin (const Int_t &)
 
Double_t GetJVecoMax (const Int_t &, const Int_t &)
 
Double_t GetJVecoMin (const Int_t &, const Int_t &)
 
Int_t GetJYCrysInDee (const Int_t &, const Int_t &, const Int_t &)
 
Int_t GetJYCrysInSC (const Int_t &, const Int_t &, const Int_t &)
 
TString GetJYDirectionEB (const Int_t &)
 
TString GetJYDirectionEE (const Int_t &)
 
Int_t GetJYSCInDee (const Int_t &)
 
Int_t GetMaxSCInDS (const Int_t &)
 
Double_t GetPhi (const Int_t &, const Int_t &, const Int_t &)
 
Double_t GetPhiInSM (const Int_t &, const Int_t &, const Int_t &)
 
Double_t GetPhiMax (const Int_t &, const Int_t &)
 
Double_t GetPhiMax (const Int_t &)
 
Double_t GetPhiMin (const Int_t &, const Int_t &)
 
Double_t GetPhiMin (const Int_t &)
 
TString GetSCQuadFrom1DeeSCEcna (const Int_t &)
 
Int_t GetSCQuadTypeIndex (const TString, const TString)
 
TString GetSCType (const Int_t &)
 
Double_t GetSMCentralPhi (const Int_t &)
 
Int_t GetSMFromFED (const Int_t &)
 
TString GetSMHalfBarrel (const Int_t &)
 
TString GetStexHalfStas (const Int_t &)
 
TString GetStinLvrbType (const Int_t &)
 
TString GetTowerLvrbType (const Int_t &)
 
Double_t GetVecoMax (const Int_t &, const Int_t &)
 
Double_t GetVecoMin (const Int_t &, const Int_t &)
 
TString GetXDirectionEB (const Int_t &)
 
TString GetXDirectionEE (const Int_t &)
 
TString GetYDirectionEB (const Int_t &)
 
TString GetYDirectionEE (const Int_t &)
 
Int_t MaxCrysInStinEcna (const Int_t &, const Int_t &, const TString)
 
void SetEcalSubDetector (const TString, const TEcnaParEcal *)
 
Int_t StexEchaForCons (const Int_t &, const Int_t &)
 
 TEcnaNumbering ()
 
 TEcnaNumbering (const TString, const TEcnaParEcal *)
 
 ~TEcnaNumbering ()
 

Protected Member Functions

void Init ()
 

Private Attributes

Int_t fCdelete
 
Int_t fCnew
 
TString fCodeChNumberingITP1Bot
 
TString fCodeChNumberingITP2Top
 
TString fCodeChNumberingLvrbBot
 
TString fCodeChNumberingLvrbTop
 
TEcnaParEcalfEcal
 
Int_t fFlagPrint
 
TString fFlagSubDet
 
Int_t fgMaxCar
 
Int_t * fT1d_DeeSCCons
 
Int_t * fT1d_DS
 
Int_t * fT1d_DSSC
 
Int_t * fT1d_ich_IX
 
Int_t * fT1d_jch_JY
 
Int_t * fT1d_RecovDeeSC
 
Int_t * fT1dDeeCrys
 
Int_t * fT1dDeeSC
 
Int_t * fT1dSCEcha
 
Int_t * fT1dSMCrys
 
Int_t * fT1dSMTow
 
Int_t * fT1dTowEcha
 
Int_t ** fT2d_DeeSCCons
 
Int_t ** fT2d_DS
 
Int_t ** fT2d_DSSC
 
Int_t ** fT2d_ich_IX
 
Int_t ** fT2d_jch_JY
 
Int_t ** fT2d_RecovDeeSC
 
Int_t ** fT2dDeeCrys
 
Int_t ** fT2dDeeSC
 
Int_t ** fT2dSCEcha
 
Int_t ** fT2dSMCrys
 
Int_t *** fT3dDeeCrys
 
TString fTTBELL
 

Detailed Description

Definition at line 10 of file TEcnaNumbering.h.

Constructor & Destructor Documentation

TEcnaNumbering::TEcnaNumbering ( )

Definition at line 28 of file TEcnaNumbering.cc.

28  {
29 // Constructor without argument: call to method Init()
30 
31 // cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << endl;
32 
33  Init();
34 }
TEcnaNumbering::TEcnaNumbering ( const TString  SubDet,
const TEcnaParEcal pEcal 
)

Definition at line 36 of file TEcnaNumbering.cc.

References Init(), and SetEcalSubDetector().

36  {
37 // Constructor with argument: call to methods Init() and SetEcalSubDetector(const TString)
38 
39  // cout << "[Info Management] CLASS: TEcnaNumbering. CREATE OBJECT: this = " << this << endl;
40 
41  Init();
42  SetEcalSubDetector(SubDet.Data(), pEcal);
43 }
void SetEcalSubDetector(const TString, const TEcnaParEcal *)
TEcnaNumbering::~TEcnaNumbering ( )

Definition at line 46 of file TEcnaNumbering.cc.

References fCdelete, fT1d_DeeSCCons, fT1d_DS, fT1d_DSSC, fT1d_ich_IX, fT1d_jch_JY, fT1d_RecovDeeSC, fT1dDeeCrys, fT1dDeeSC, fT1dSCEcha, fT1dSMCrys, fT1dSMTow, fT1dTowEcha, fT2d_DeeSCCons, fT2d_DS, fT2d_DSSC, fT2d_ich_IX, fT2d_jch_JY, fT2d_RecovDeeSC, fT2dDeeCrys, fT2dDeeSC, fT2dSCEcha, fT2dSMCrys, and fT3dDeeCrys.

46  {
47 //destructor
48 
49  //if (fEcal != 0){delete fEcal; fCdelete++;}
50 
51  //....................... Barrel
52  if (fT2dSMCrys != 0){delete [] fT2dSMCrys; fCdelete++;}
53  if (fT1dSMCrys != 0){delete [] fT1dSMCrys; fCdelete++;}
54  if (fT1dSMTow != 0){delete [] fT1dSMTow; fCdelete++;}
55  if (fT1dTowEcha != 0){delete [] fT1dTowEcha; fCdelete++;}
56 
57  //....................... Endcap
58  if (fT3dDeeCrys != 0){delete [] fT3dDeeCrys; fCdelete++;}
59  if (fT2dDeeCrys != 0){delete [] fT2dDeeCrys; fCdelete++;}
60  if (fT1dDeeCrys != 0){delete [] fT1dDeeCrys; fCdelete++;}
61  if (fT2dDeeSC != 0){delete [] fT2dDeeSC; fCdelete++;}
62  if (fT1dDeeSC != 0){delete [] fT1dDeeSC; fCdelete++;}
63  if (fT2dSCEcha != 0){delete [] fT2dSCEcha; fCdelete++;}
64  if (fT1dSCEcha != 0){delete [] fT1dSCEcha; fCdelete++;}
65  if (fT2d_jch_JY != 0){delete [] fT2d_jch_JY; fCdelete++;}
66  if (fT1d_jch_JY != 0){delete [] fT1d_jch_JY; fCdelete++;}
67  if (fT2d_ich_IX != 0){delete [] fT2d_ich_IX; fCdelete++;}
68  if (fT1d_ich_IX != 0){delete [] fT1d_ich_IX; fCdelete++;}
69  if (fT2d_DS != 0){delete [] fT2d_DS; fCdelete++;}
70  if (fT1d_DS != 0){delete [] fT1d_DS; fCdelete++;}
71  if (fT2d_DSSC != 0){delete [] fT2d_DSSC; fCdelete++;}
72  if (fT1d_DSSC != 0){delete [] fT1d_DSSC; fCdelete++;}
73  if (fT2d_DeeSCCons != 0){delete [] fT2d_DeeSCCons; fCdelete++;}
74  if (fT1d_DeeSCCons != 0){delete [] fT1d_DeeSCCons; fCdelete++;}
75  if (fT2d_RecovDeeSC != 0){delete [] fT2d_RecovDeeSC; fCdelete++;}
76  if (fT1d_RecovDeeSC != 0){delete [] fT1d_RecovDeeSC; fCdelete++;}
77 
78  // cout << "[Info Management] CLASS: TEcnaNumbering. DESTROY OBJECT: this = " << this << endl;
79 
80 }
Int_t * fT1dSCEcha
Int_t ** fT2d_DS
Int_t * fT1dDeeCrys
Int_t * fT1d_ich_IX
Int_t ** fT2d_ich_IX
Int_t ** fT2d_RecovDeeSC
Int_t * fT1d_DeeSCCons
Int_t ** fT2dDeeSC
Int_t ** fT2d_DSSC
Int_t * fT1dSMCrys
Int_t ** fT2d_jch_JY
Int_t * fT1d_RecovDeeSC
Int_t * fT1d_jch_JY
Int_t * fT1dTowEcha
Int_t ** fT2d_DeeSCCons
Int_t ** fT2dDeeCrys
Int_t ** fT2dSMCrys
Int_t *** fT3dDeeCrys
Int_t ** fT2dSCEcha

Member Function Documentation

void TEcnaNumbering::BuildBarrelCrysTable ( )

Definition at line 156 of file TEcnaNumbering.cc.

References fCdelete, fCnew, fEcal, fT1dSMCrys, fT1dSMTow, fT1dTowEcha, fT2dSMCrys, i, j, gen::k, TEcnaParEcal::MaxCrysInSM(), TEcnaParEcal::MaxCrysInTow(), and TEcnaParEcal::MaxTowInSM().

Referenced by Get1SMCrysFrom1SMTowAnd0TowEcha(), and SetEcalSubDetector().

157 {
158 // Build the correspondance table: SMCrys <-> (SMTow, TowEcha) for the ECAL BARREL
159 //
160 // From CMS Internal Note "CMS ECAL Barrel channel numbering"
161 //
162 // Name Number Reference set Range Comment
163 //
164 // SMTow : Tower number in SuperModule [1,68] (phi,eta) progression
165 // SMCrys : Crystal number in SuperModule [1,1700] (phi,eta) progression
166 // SMEcha : Electronic channel number in SuperModule [0,1699] S shape data reading order
167 //
168 // TowEcha: Electronic channel number in Tower [0,24] S shape data reading order
169 //
170 //
171 // fill the 2D array: fT2dSMCrys[n_SMTow][n_TowEcha]
172 //
173 // and the 1d arrays: fT1dSMTow[i_SMCrys] and fT1dTowEcha[i_SMCrys]
174 //
175 //-----------------------------------------------------------------------------------------------------
176 
177  if ( fT2dSMCrys == 0 )
178  {
179  Int_t MaxSMTow = fEcal->MaxTowInSM();
180  Int_t MaxTowEcha = fEcal->MaxCrysInTow();
181  Int_t MaxSMCrys = fEcal->MaxCrysInSM();
182 
183  //................... Allocation and Init CrysNumbersTable
184 
185  fT2dSMCrys = new Int_t*[MaxSMTow]; fCnew++;
186  fT1dSMCrys = new Int_t[MaxSMTow*MaxTowEcha]; fCnew++;
187  for(Int_t i_SMTow = 0 ; i_SMTow < MaxSMTow ; i_SMTow++){
188  fT2dSMCrys[i_SMTow] = &fT1dSMCrys[0] + i_SMTow*MaxTowEcha;}
189  for(Int_t i=0; i<MaxSMTow; i++)
190  {for(Int_t j=0; j<MaxTowEcha; j++){fT2dSMCrys[i][j]=0;}}
191 
192  fT1dSMTow = new Int_t[MaxSMCrys]; fCnew++;
193  for(Int_t i=0; i<MaxSMCrys; i++){fT1dSMTow[i]=0;}
194 
195  fT1dTowEcha = new Int_t[MaxSMCrys]; fCnew++;
196  for(Int_t i=0; i<MaxSMCrys; i++){fT1dTowEcha[i]=0;}
197 
198  //........................ Build table
199  Int_t m2 = (Int_t)2;
200  Int_t m26 = (Int_t)26;
201 
202  // Int_t jch_type[2][26];
203  Int_t** jch_type = new Int_t*[m2]; fCnew++;
204  Int_t* jch_type_d1 = new Int_t[m2*m26]; fCnew++;
205  for(Int_t i_m2 = 0 ; i_m2 < m2 ; i_m2++){
206  jch_type[i_m2] = &jch_type_d1[0] + i_m2*m26;}
207 
208  for(Int_t k=25;k>=21;k--){jch_type[0][k] = 25-k;} // k = 25,24,23,22,21 -> jch_type[0][k] = 0,1,2,3,4
209  for(Int_t k=16;k<=20;k++){jch_type[0][k] = k-16;} // k = 16,17,18,19,20 -> jch_type[0][k] = 0,1,2,3,4
210  for(Int_t k=15;k>=11;k--){jch_type[0][k] = 15-k;} // k = 15,14,12,13,11 -> jch_type[0][k] = 0,1,2,3,4
211  for(Int_t k=6; k<=10;k++){jch_type[0][k] = k-6;} // k = 6, 7, 8, 9,10 -> jch_type[0][k] = 0,1,2,3,4
212  for(Int_t k=5; k>=1; k--){jch_type[0][k] = 5-k;} // k = 5, 4, 3, 2, 1 -> jch_type[0][k] = 0,1,2,3,4
213 
214  for(Int_t k=1; k<=5; k++){jch_type[1][k] = k-1;} // k = 1, 2, 3, 4, 5 -> jch_type[1][k] = 0,1,2,3,4
215  for(Int_t k=10;k>=6; k--){jch_type[1][k] = 10-k;} // k = 10, 9, 8, 7, 6 -> jch_type[1][k] = 0,1,2,3,4
216  for(Int_t k=11;k<=15;k++){jch_type[1][k] = k-11;} // k = 11,12,13,14,15 -> jch_type[1][k] = 0,1,2,3,4
217  for(Int_t k=20;k>=16;k--){jch_type[1][k] = 20-k;} // k = 20,19,18,17,16 -> jch_type[1][k] = 0,1,2,3,4
218  for(Int_t k=21;k<=25;k++){jch_type[1][k] = k-21;} // k = 21,22,23,24,25 -> jch_type[1][k] = 0,1,2,3,4
219 
220  // Int_t ich_type[2][26];
221  Int_t** ich_type = new Int_t*[m2]; fCnew++;
222  Int_t* ich_type_d1 = new Int_t[m2*m26]; fCnew++;
223  for(Int_t i_m2 = 0 ; i_m2 < m2 ; i_m2++){
224  ich_type[i_m2] = &ich_type_d1[0] + i_m2*m26;}
225 
226  for(Int_t k=25;k>=21;k--){ich_type[0][k] = 0;} // k = 25,24,23,22,21 -> ich_type[0][k] = 0
227  for(Int_t k=16;k<=20;k++){ich_type[0][k] = 1;} // k = 16,17,18,19,20 -> ich_type[0][k] = 1
228  for(Int_t k=15;k>=11;k--){ich_type[0][k] = 2;} // k = 15,14,12,13,11 -> ich_type[0][k] = 2
229  for(Int_t k=6; k<=10;k++){ich_type[0][k] = 3;} // k = 6, 7, 8, 9,10 -> ich_type[0][k] = 3
230  for(Int_t k=5; k>=1; k--){ich_type[0][k] = 4;} // k = 5, 4, 3, 2, 1 -> ich_type[0][k] = 4
231 
232  for(Int_t k=1; k<=5; k++){ich_type[1][k] = 0;} // k = 1, 2, 3, 4, 5 -> ich_type[1][k] = 0
233  for(Int_t k=10;k>=6; k--){ich_type[1][k] = 1;} // k = 10, 9, 8, 7, 6 -> ich_type[1][k] = 1
234  for(Int_t k=11;k<=15;k++){ich_type[1][k] = 2;} // k = 11,12,13,14,15 -> ich_type[1][k] = 2
235  for(Int_t k=20;k>=16;k--){ich_type[1][k] = 3;} // k = 20,19,18,17,16 -> ich_type[1][k] = 3
236  for(Int_t k=21;k<=25;k++){ich_type[1][k] = 4;} // k = 21,22,23,24,25 -> ich_type[1][k] = 4
237 
238  // Int_t type[17]={0,0,0,1,1, 0,0,1,1, 0,0,1,1, 0,0,1,1};
239  Int_t m17 =17;
240  Int_t* type = new Int_t[m17]; fCnew++;
241 
242  // 0 -> LVRB at the bottom, 1 -> LVRB at the top
243  type[0] = 0; // M1
244  type[1] = 0;
245  type[2] = 0;
246  type[3] = 1;
247  type[4] = 1;
248 
249  type[5] = 0; // M2
250  type[6] = 0;
251  type[7] = 1;
252  type[8] = 1;
253 
254  type[9] = 0; // M3
255  type[10] = 0;
256  type[11] = 1;
257  type[12] = 1;
258 
259  type[13] = 0; // M4
260  type[14] = 0;
261  type[15] = 1;
262  type[16] = 1;
263 
264  for(Int_t tow=0; tow<MaxSMTow; tow++) // tow = 0 to 67 (MaxSMTow = 68)
265  {
266  for(Int_t ic=1; ic<=MaxTowEcha; ic++) // ic = 1 to 25 (MaxTowEcha = 25)
267  {
268  Int_t jtow = tow % 4; // jtow = 0,1,2,3
269  Int_t itow = tow / 4; // itow = 0 to 16
270 
271  Int_t icrys = itow*5 + ich_type[type[itow]][ic]; // type[0->16] = 0,1 ,
272  // ich_type[0->1][1->25] = 0,1,2,3,4
273  // icrys = 0 to 84 (=> eta)
274 
275  Int_t jcrys = jtow*5 + jch_type[type[itow]][ic]; // type[0->16] = 0,1 ,
276  // jch_type[0->1][1->25] = 0,1,2,3,4
277  // jcrys = 0 to 19 (=> phi)
278 
279  Int_t n1SMCrys = icrys*20+jcrys+1; // n1SMCrys = 1 to 1700
280 
281  fT2dSMCrys[tow][ic-1] = n1SMCrys; // fT2dSMCrys[] : range = [1,1700]
282  fT1dSMTow[n1SMCrys-1] = tow+1; // fT1dSMTow[] : range = [1,68]
283  fT1dTowEcha[n1SMCrys-1] = ic-1; // fT1dTowEcha[] : range = [0,24]
284  }
285  }
286  // cout << "#TEcnaNumbering::TBuildBarrelCrysTable()> Crys Table Building done" << endl;
287 
288  delete [] jch_type; fCdelete++;
289  delete [] jch_type_d1; fCdelete++;
290  delete [] ich_type; fCdelete++;
291  delete [] ich_type_d1; fCdelete++;
292  delete [] type; fCdelete++;
293  }
294  else
295  {
296  // cout << "#TEcnaNumbering::TBuildBarrelCrysTable()> No Building of Crys Table since it is already done." << endl;
297  }
298 }
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
Int_t MaxCrysInSM()
TEcnaParEcal * fEcal
Int_t * fT1dSMCrys
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
Int_t MaxCrysInTow()
Int_t * fT1dTowEcha
Int_t ** fT2dSMCrys
Int_t MaxTowInSM()
void TEcnaNumbering::BuildEndcapCrysTable ( )

Definition at line 925 of file TEcnaNumbering.cc.

References fCdelete, fCnew, fEcal, fT1d_ich_IX, fT1d_jch_JY, fT1dDeeCrys, fT1dDeeSC, fT1dSCEcha, fT2d_ich_IX, fT2d_jch_JY, fT2dDeeCrys, fT2dDeeSC, fT2dSCEcha, fT3dDeeCrys, i, j, gen::k, TEcnaParEcal::MaxCrysEcnaInDee(), TEcnaParEcal::MaxCrysInSC(), TEcnaParEcal::MaxCrysIXInSC(), TEcnaParEcal::MaxCrysIYInSC(), TEcnaParEcal::MaxSCEcnaInDee(), and TEcnaParEcal::MaxSCIYInDee().

Referenced by Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(), and SetEcalSubDetector().

926 {
927 // Build the correspondance table: DeeCrys <-> (DeeSC, SCEcha) for the ECAL ENDCAP
928 //
929 // From CMS Internal Note "CMS ECAL Endcap channel numbering"
930 //
931 // Name Number Reference set Range Comment
932 //
933 // DeeSC : Super-Crystal (SC) number in Dee [1,200] (IY,IX) progression
934 // DeeCrys : Crystal number in Dee [1,5000] (IY,IX) progression
935 // DeeEcha : Electronic channel number in Dee [0,4999] Crystal numbering for construction
936 //
937 // SCEcha : Electronic channel number in SC [1,25] Crystal numbering for construction
938 //
939 //
940 // fill the 3D array: fT3dDeeCrys[n_DeeSC][n_SCEcha][2]
941 //
942 // and the 2d arrays: fT2dDeeSC[n_DeeCrys][2] and fT2dSCEcha[n_DeeCrys][2]
943 //
944 //------------------------------------------------------------------------------------------------------
945 
946  if ( fT3dDeeCrys == 0 )
947  {
948  Int_t MaxDeeSC = fEcal->MaxSCEcnaInDee(); // fEcal->MaxSCEcnaInDee() = 200
949  Int_t MaxSCEcha = fEcal->MaxCrysInSC();
950  Int_t MaxDeeCrys = fEcal->MaxCrysEcnaInDee();
951 
952  Int_t MaxDirections = 2; // (2 directions: left and right)
953 
954  //................... Allocation and Init CrysNumbersTable
955  fT3dDeeCrys = new Int_t**[MaxDeeSC]; fCnew++;
956  fT2dDeeCrys = new Int_t*[MaxDeeSC*MaxSCEcha]; fCnew++;
957  fT1dDeeCrys = new Int_t[MaxDeeSC*MaxSCEcha*MaxDirections]; fCnew++;
958 
959  for(Int_t i_DeeSC = 0; i_DeeSC < MaxDeeSC; i_DeeSC++){
960  fT3dDeeCrys[i_DeeSC] = &fT2dDeeCrys[0] + i_DeeSC*MaxSCEcha;
961  for(Int_t i_SCEcha = 0; i_SCEcha < MaxSCEcha; i_SCEcha++){
962  fT2dDeeCrys[i_DeeSC*MaxSCEcha + i_SCEcha] = &fT1dDeeCrys[0]
963  + (i_DeeSC*MaxSCEcha + i_SCEcha)*MaxDirections;}}
964  for(Int_t i=0; i<MaxDeeSC; i++)
965  {for(Int_t j=0; j<MaxSCEcha; j++)
966  {for(Int_t k=0; k<MaxDirections; k++){fT3dDeeCrys[i][j][k]=0;}}}
967 
968  fT2dDeeSC = new Int_t*[MaxDeeCrys]; fCnew++;
969  fT1dDeeSC = new Int_t[MaxDeeCrys*MaxDirections]; fCnew++;
970  for(Int_t i_DeeCrys = 0 ; i_DeeCrys < MaxDeeCrys ; i_DeeCrys++){
971  fT2dDeeSC[i_DeeCrys] = &fT1dDeeSC[0] + i_DeeCrys*MaxDirections;}
972  for(Int_t i=0; i<MaxDeeCrys; i++)
973  {for(Int_t j=0; j<MaxDirections; j++){fT2dDeeSC[i][j]=0;}}
974 
975  fT2dSCEcha = new Int_t*[MaxDeeCrys]; fCnew++;
976  fT1dSCEcha = new Int_t[MaxDeeCrys*MaxDirections]; fCnew++;
977  for(Int_t i_DeeCrys = 0 ; i_DeeCrys < MaxDeeCrys ; i_DeeCrys++){
978  fT2dSCEcha[i_DeeCrys] = &fT1dSCEcha[0] + i_DeeCrys*MaxDirections;}
979  for(Int_t i=0; i<MaxDeeCrys; i++)
980  {for(Int_t j=0; j<MaxDirections; j++){fT2dSCEcha[i][j]=0;}}
981 
982  //................................ Build table
983  Int_t MaxTyp = (Int_t)4;
984  Int_t MaxCrysP1 = (Int_t)(fEcal->MaxCrysInSC()+1);
985 
986  // Int_t fT2d_jch_JY[type][Echa+1]: JY in the SC as a function of type and Echa+1
987  fT2d_jch_JY = new Int_t*[MaxTyp]; fCnew++;
988  fT1d_jch_JY = new Int_t[MaxTyp*MaxCrysP1]; fCnew++;
989  for(Int_t i_MaxTyp = 0 ; i_MaxTyp < MaxTyp ; i_MaxTyp++){
990  fT2d_jch_JY[i_MaxTyp] = &fT1d_jch_JY[0] + i_MaxTyp*MaxCrysP1;}
991 
992  // type: 0=(top/right), 1=(top/left), 2=(bottom/left), 3=(bottom/right),
993 
994  //................. top/right
995  for(Int_t k= 5;k>= 1;k--){fT2d_jch_JY[0][k] = 4;} // k = 5, 4, 3, 2, 1 -> fT2d_jch_JY[0][k] = 4
996  for(Int_t k=10;k>= 6;k--){fT2d_jch_JY[0][k] = 3;} // k = 10, 9, 8, 7, 6 -> fT2d_jch_JY[0][k] = 3
997  for(Int_t k=15;k>=11;k--){fT2d_jch_JY[0][k] = 2;} // k = 15,14,13,12,11 -> fT2d_jch_JY[0][k] = 2
998  for(Int_t k=20;k>=16;k--){fT2d_jch_JY[0][k] = 1;} // k = 20,19,18,17,16 -> fT2d_jch_JY[0][k] = 1
999  for(Int_t k=25;k>=21;k--){fT2d_jch_JY[0][k] = 0;} // k = 25,24,23,22,21 -> fT2d_jch_JY[0][k] = 0
1000  //................. top/left
1001  for(Int_t k= 5;k>= 1;k--){fT2d_jch_JY[1][k] = 5-k;} // k = 5, 4, 3, 2, 1 -> fT2d_jch_JY[1][k] = 0,1,2,3,4
1002  for(Int_t k=10;k>= 6;k--){fT2d_jch_JY[1][k] = 10-k;} // k = 10, 9, 8, 7, 6 -> fT2d_jch_JY[1][k] = 0,1,2,3,4
1003  for(Int_t k=15;k>=11;k--){fT2d_jch_JY[1][k] = 15-k;} // k = 15,14,13,12,11 -> fT2d_jch_JY[1][k] = 0,1,2,3,4
1004  for(Int_t k=20;k>=16;k--){fT2d_jch_JY[1][k] = 20-k;} // k = 20,19,18,17,16 -> fT2d_jch_JY[1][k] = 0,1,2,3,4
1005  for(Int_t k=25;k>=21;k--){fT2d_jch_JY[1][k] = 25-k;} // k = 25,24,23,22,21 -> fT2d_jch_JY[1][k] = 0,1,2,3,4
1006  //................. bottom/left
1007  for(Int_t k= 1;k<=5; k++){fT2d_jch_JY[2][k] = 0;} // k = 1, 2, 3, 4, 5 -> fT2d_jch_JY[2][k] = 0
1008  for(Int_t k= 6;k<=10;k++){fT2d_jch_JY[2][k] = 1;} // k = 6, 7, 8, 9,10 -> fT2d_jch_JY[2][k] = 1
1009  for(Int_t k=11;k<=15;k++){fT2d_jch_JY[2][k] = 2;} // k = 11,12,13,14,15 -> fT2d_jch_JY[2][k] = 2
1010  for(Int_t k=16;k<=20;k++){fT2d_jch_JY[2][k] = 3;} // k = 16,17,18,19,20 -> fT2d_jch_JY[2][k] = 3
1011  for(Int_t k=21;k<=25;k++){fT2d_jch_JY[2][k] = 4;} // k = 21,22,23,24,25 -> fT2d_jch_JY[2][k] = 4
1012  //................. bottom/right
1013  for(Int_t k= 1;k<=5; k++){fT2d_jch_JY[3][k] = k-1;} // k = 1, 2, 3, 4, 5 -> fT2d_jch_JY[3][k] = 0,1,2,3,4
1014  for(Int_t k= 6;k<=10;k++){fT2d_jch_JY[3][k] = k-6;} // k = 6, 7, 8, 9,10 -> fT2d_jch_JY[3][k] = 0,1,2,3,4
1015  for(Int_t k=11;k<=15;k++){fT2d_jch_JY[3][k] = k-11;} // k = 11,12,13,14,15 -> fT2d_jch_JY[3][k] = 0,1,2,3,4
1016  for(Int_t k=16;k<=20;k++){fT2d_jch_JY[3][k] = k-16;} // k = 16,17,18,19,20 -> fT2d_jch_JY[3][k] = 0,1,2,3,4
1017  for(Int_t k=21;k<=25;k++){fT2d_jch_JY[3][k] = k-21;} // k = 21,22,23,24,25 -> fT2d_jch_JY[3][k] = 0,1,2,3,4
1018 
1019  // Int_t fT2d_ich_IX[type][Echa+1]: IX in the SC as a function of type and Echa+1
1020  fT2d_ich_IX = new Int_t*[MaxTyp]; fCnew++;
1021  fT1d_ich_IX = new Int_t[MaxTyp*MaxCrysP1]; fCnew++;
1022  for(Int_t i_MaxTyp = 0 ; i_MaxTyp < MaxTyp ; i_MaxTyp++){
1023  fT2d_ich_IX[i_MaxTyp] = &fT1d_ich_IX[0] + i_MaxTyp*MaxCrysP1;}
1024 
1025  //................. top/right
1026  for(Int_t k= 5;k>= 1;k--){fT2d_ich_IX[0][k] = 5-k;} // k = 5, 4, 3, 2, 1 -> fT2d_ich_IX[0][k] = 0,1,2,3,4
1027  for(Int_t k=10;k>= 6;k--){fT2d_ich_IX[0][k] = 10-k;} // k = 10, 9, 8, 7, 6 -> fT2d_ich_IX[0][k] = 0,1,2,3,4
1028  for(Int_t k=15;k>=11;k--){fT2d_ich_IX[0][k] = 15-k;} // k = 15,14,13,12,11 -> fT2d_ich_IX[0][k] = 0,1,2,3,4
1029  for(Int_t k=20;k>=16;k--){fT2d_ich_IX[0][k] = 20-k;} // k = 20,19,18,17,16 -> fT2d_ich_IX[0][k] = 0,1,2,3,4
1030  for(Int_t k=25;k>=21;k--){fT2d_ich_IX[0][k] = 25-k;} // k = 25,24,23,22,21 -> fT2d_ich_IX[0][k] = 0,1,2,3,4
1031  //................. top/left
1032  for(Int_t k= 5;k>= 1;k--){fT2d_ich_IX[1][k] = 4;} // k = 5, 4, 3, 2, 1 -> fT2d_ich_IX[1][k] = 4
1033  for(Int_t k=10;k>= 6;k--){fT2d_ich_IX[1][k] = 3;} // k = 10, 9, 8, 7, 6 -> fT2d_ich_IX[1][k] = 3
1034  for(Int_t k=15;k>=11;k--){fT2d_ich_IX[1][k] = 2;} // k = 15,14,13,12,11 -> fT2d_ich_IX[1][k] = 2
1035  for(Int_t k=20;k>=16;k--){fT2d_ich_IX[1][k] = 1;} // k = 20,19,18,17,16 -> fT2d_ich_IX[1][k] = 1
1036  for(Int_t k=25;k>=21;k--){fT2d_ich_IX[1][k] = 0;} // k = 25,24,23,22,21 -> fT2d_ich_IX[1][k] = 0
1037  //................. bottom/left
1038  for(Int_t k=1; k<=5; k++){fT2d_ich_IX[2][k] = 5-k;} // k = 1, 2, 3, 4, 5 -> fT2d_ich_IX[2][k] = 0,1,2,3,4
1039  for(Int_t k=6; k<=10;k++){fT2d_ich_IX[2][k] = 10-k;} // k = 6, 7, 8, 9,10 -> fT2d_ich_IX[2][k] = 0,1,2,3,4
1040  for(Int_t k=11;k<=15;k++){fT2d_ich_IX[2][k] = 15-k;} // k = 11,12,13,14,15 -> fT2d_ich_IX[2][k] = 0,1,2,3,4
1041  for(Int_t k=16;k<=20;k++){fT2d_ich_IX[2][k] = 20-k;} // k = 16,17,18,19,20 -> fT2d_ich_IX[2][k] = 0,1,2,3,4
1042  for(Int_t k=21;k<=25;k++){fT2d_ich_IX[2][k] = 25-k;} // k = 21,22,23,24,25 -> fT2d_ich_IX[2][k] = 0,1,2,3,4
1043  //................. bottom/right
1044  for(Int_t k= 1;k<= 5;k++){fT2d_ich_IX[3][k] = 4;} // k = 1, 2, 3, 4, 5 -> fT2d_ich_IX[3][k] = 4
1045  for(Int_t k= 6;k<=10;k++){fT2d_ich_IX[3][k] = 3;} // k = 6, 7, 8, 9,10 -> fT2d_ich_IX[3][k] = 3
1046  for(Int_t k=11;k<=15;k++){fT2d_ich_IX[3][k] = 2;} // k = 11,12,13,14,15 -> fT2d_ich_IX[3][k] = 2
1047  for(Int_t k=16;k<=20;k++){fT2d_ich_IX[3][k] = 1;} // k = 16,17,18,19,20 -> fT2d_ich_IX[3][k] = 1
1048  for(Int_t k=21;k<=25;k++){fT2d_ich_IX[3][k] = 0;} // k = 21,22,23,24,25 -> fT2d_ich_IX[3][k] = 0
1049 
1050  //............................................ type
1051  Int_t Nb_DeeSC_JY = fEcal->MaxSCIYInDee();
1052  Int_t** type = new Int_t*[Nb_DeeSC_JY]; fCnew++;
1053  Int_t* type_d1 = new Int_t[Nb_DeeSC_JY*MaxDirections]; fCnew++;
1054  for(Int_t i_DeeSC_JY = 0 ; i_DeeSC_JY < Nb_DeeSC_JY ; i_DeeSC_JY++){
1055  type[i_DeeSC_JY] = &type_d1[0] + i_DeeSC_JY*MaxDirections;}
1056 
1057  // bottom = (0,9), top = (10,19)
1058  // right = 0 , left = 1
1059  // type = Quadrant number - 1
1060 
1061  type[10][0] = 0; // Q1 top right
1062  type[11][0] = 0;
1063  type[12][0] = 0;
1064  type[13][0] = 0;
1065  type[14][0] = 0;
1066  type[15][0] = 0;
1067  type[16][0] = 0;
1068  type[17][0] = 0;
1069  type[18][0] = 0;
1070  type[19][0] = 0;
1071 
1072  type[10][1] = 1; // Q2 top left
1073  type[11][1] = 1;
1074  type[12][1] = 1;
1075  type[13][1] = 1;
1076  type[14][1] = 1;
1077  type[15][1] = 1;
1078  type[16][1] = 1;
1079  type[17][1] = 1;
1080  type[18][1] = 1;
1081  type[19][1] = 1;
1082 
1083  type[ 0][1] = 2; // Q3 : bottom left
1084  type[ 1][1] = 2;
1085  type[ 2][1] = 2;
1086  type[ 3][1] = 2;
1087  type[ 4][1] = 2;
1088  type[ 5][1] = 2;
1089  type[ 6][1] = 2;
1090  type[ 7][1] = 2;
1091  type[ 8][1] = 2;
1092  type[ 9][1] = 2;
1093 
1094  type[ 0][0] = 3; // Q4 : bottom right
1095  type[ 1][0] = 3;
1096  type[ 2][0] = 3;
1097  type[ 3][0] = 3;
1098  type[ 4][0] = 3;
1099  type[ 5][0] = 3;
1100  type[ 6][0] = 3;
1101  type[ 7][0] = 3;
1102  type[ 8][0] = 3;
1103  type[ 9][0] = 3;
1104 
1105  Int_t Nb_SCCrys_IX = fEcal->MaxCrysIXInSC();
1106  Int_t Nb_SCCrys_JY = fEcal->MaxCrysIYInSC();
1107 
1108  for(Int_t kSC=0; kSC<MaxDeeSC; kSC++) // kSC = 0 to 199 (MaxDeeSC = 200)
1109  {
1110  for(Int_t n_Echa=1; n_Echa<=MaxSCEcha; n_Echa++) // n_Echa = 1 to 25 (MaxSCEcha = 25)
1111  {
1112  for(Int_t idir=0; idir<2; idir++)
1113  {
1114  Int_t ikSC = kSC / Nb_DeeSC_JY; // ikSC = 0 to 9
1115  Int_t jkSC = kSC % Nb_DeeSC_JY; // jkSC = 0,1,2,..,19
1116 
1117  Int_t icrys = ikSC*Nb_SCCrys_IX + fT2d_ich_IX[type[jkSC][idir]][n_Echa];
1118  // type[0->9][1->2] = 0,1,2,3
1119  // fT2d_ich_IX[0->3][1->25] = 0,1,2,3,4
1120  // icrys = 0 to 49 (=> IX)
1121 
1122  Int_t jcrys = jkSC*Nb_SCCrys_JY + fT2d_jch_JY[type[jkSC][idir]][n_Echa];
1123  // type[0->9][1->2] = 0,1,2,3
1124  // fT2d_jch_JY[0->3][1->25] = 0,1,2,3,4
1125  // jcrys = 0 to 99 (=> IY)
1126 
1127  Int_t n_DeeCrys = icrys*Nb_DeeSC_JY*Nb_SCCrys_JY+jcrys+1; // n_DeeCrys = 1 to 5000
1128 
1129  fT3dDeeCrys[kSC][n_Echa-1][idir] = n_DeeCrys; // fT3dDeeCrys[][][] : range = [1,5000]
1130  fT2dDeeSC[n_DeeCrys-1][idir] = kSC+1; // fT2dDeeSC[][] : range = [1,200]
1131  fT2dSCEcha[n_DeeCrys-1][idir] = n_Echa; // fT2dSCEcha[][] : range = [1,25]
1132  }
1133  }
1134  }
1135  // cout << "#TEcnaNumbering::TBuildEndcapCrysTable()> Crys Table Building done" << endl;
1136 
1137  delete [] type; fCdelete++;
1138  delete [] type_d1; fCdelete++;
1139  }
1140  else
1141  {
1142  // cout << "#TEcnaNumbering::TBuildEndcapCrysTable()> No Building of Crys Table since it is already done " << endl;
1143  }
1144 }
type
Definition: HCALResponse.h:22
Int_t * fT1dSCEcha
int i
Definition: DBlmapReader.cc:9
Int_t MaxSCIYInDee()
Int_t MaxCrysEcnaInDee()
Int_t * fT1dDeeCrys
Int_t * fT1d_ich_IX
Int_t ** fT2d_ich_IX
Int_t ** fT2dDeeSC
TEcnaParEcal * fEcal
Int_t MaxCrysIXInSC()
int j
Definition: DBlmapReader.cc:9
Int_t ** fT2d_jch_JY
Int_t MaxSCEcnaInDee()
int k[5][pyjets_maxn]
Int_t MaxCrysIYInSC()
Int_t * fT1d_jch_JY
Int_t MaxCrysInSC()
Int_t ** fT2dDeeCrys
Int_t *** fT3dDeeCrys
Int_t ** fT2dSCEcha
void TEcnaNumbering::BuildEndcapSCTable ( )

Definition at line 1146 of file TEcnaNumbering.cc.

References fCnew, fEcal, fT1d_DeeSCCons, fT1d_DS, fT1d_DSSC, fT1d_RecovDeeSC, fT2d_DeeSCCons, fT2d_DS, fT2d_DSSC, fT2d_RecovDeeSC, i, j, TEcnaParEcal::MaxDeeInEE(), TEcnaParEcal::MaxSCEcnaInDee(), and TEcnaParEcal::MaxSCForConsInDee().

Referenced by SetEcalSubDetector().

1147 {
1148 // Build the correspondance table: (Dee, DeeSC) <-> (DS , DSSC) for the ECAL ENDCAP
1149 //
1150 // From CMS Internal Note "CMS ECAL Endcap channel numbering"
1151 //
1152 // Name Number Reference set Range Comment
1153 //
1154 // Dee : Dee number [1,4]
1155 // DeeSC : Super-Crystal (SC) number in Dee [1,200] (IY,IX) progression
1156 // DS : Data Sector number in EE + or - [1,9] (IY,IX) progression
1157 // DSSC : Super-Crystal (SC) number in Data Sector [1,32] Crystal numbering in data sector
1158 // DeeSCCons: Super-Crystal (SC) number for construction [1,297]
1159 //
1160 // fill the 2d arrays: fT2d_DS[4][200], fT2d_DSSC[4][200] and fT2d_DeeSCCons[4][200]
1161 //
1162 //------------------------------------------------------------------------------------------------------
1163 
1164 //.................. Allocations and Init
1165  Int_t MaxEEDee = fEcal->MaxDeeInEE();
1166  Int_t MaxDeeSC = fEcal->MaxSCEcnaInDee();
1167  Int_t MaxEESCForCons = 2*fEcal->MaxSCForConsInDee();
1168 
1169  fT2d_DS = new Int_t*[MaxEEDee]; fCnew++; // = DS[Dee - 1, CNA_SCInDee - 1]
1170  fT1d_DS = new Int_t[MaxEEDee*MaxDeeSC]; fCnew++;
1171  for(Int_t i_DeeCrys = 0 ; i_DeeCrys < MaxEEDee ; i_DeeCrys++){
1172  fT2d_DS[i_DeeCrys] = &fT1d_DS[0] + i_DeeCrys*MaxDeeSC;}
1173  for(Int_t i=0; i<MaxEEDee; i++)
1174  {for(Int_t j=0; j<MaxDeeSC; j++){fT2d_DS[i][j]=0;}}
1175 
1176  fT2d_DSSC = new Int_t*[MaxEEDee]; fCnew++; // = SCInDS[Dee - 1, CNA_SCInDee - 1]
1177  fT1d_DSSC = new Int_t[MaxEEDee*MaxDeeSC]; fCnew++;
1178  for(Int_t i_DeeCrys = 0 ; i_DeeCrys < MaxEEDee ; i_DeeCrys++){
1179  fT2d_DSSC[i_DeeCrys] = &fT1d_DSSC[0] + i_DeeCrys*MaxDeeSC;}
1180  for(Int_t i=0; i<MaxEEDee; i++)
1181  {for(Int_t j=0; j<MaxDeeSC; j++){fT2d_DSSC[i][j]=0;}}
1182 
1183  fT2d_DeeSCCons = new Int_t*[MaxEEDee]; fCnew++; // = SCConsInDee[Dee - 1, CNA_SCInDee - 1]
1184  fT1d_DeeSCCons = new Int_t[MaxEEDee*MaxDeeSC]; fCnew++;
1185  for(Int_t i_DeeCrys = 0 ; i_DeeCrys < MaxEEDee ; i_DeeCrys++){
1186  fT2d_DeeSCCons[i_DeeCrys] = &fT1d_DeeSCCons[0] + i_DeeCrys*MaxDeeSC;}
1187  for(Int_t i=0; i<MaxEEDee; i++)
1188  {for(Int_t j=0; j<MaxDeeSC; j++){fT2d_DeeSCCons[i][j]=0;}}
1189 
1190  fT2d_RecovDeeSC = new Int_t*[MaxEEDee]; fCnew++; // = CNA_SCInDee[Dee - 1, SCConsInDee - 1]
1191  fT1d_RecovDeeSC = new Int_t[MaxEEDee*MaxEESCForCons]; fCnew++;
1192  for(Int_t i_DeeCrys = 0 ; i_DeeCrys < MaxEEDee ; i_DeeCrys++){
1193  fT2d_RecovDeeSC[i_DeeCrys] = &fT1d_RecovDeeSC[0] + i_DeeCrys*MaxEESCForCons;}
1194  for(Int_t i=0; i<MaxEEDee; i++)
1195  {for(Int_t j=0; j<MaxEESCForCons; j++){fT2d_RecovDeeSC[i][j]=0;}}
1196 
1197  //.............................. Data sector (DS) numbers: fT2d_DS[][]
1198  // isc = ECNA numbers
1199 
1200  Int_t ids = 0;
1201 
1202  //........... (D1,S1)=(D2,S9)=(D3,S9)=(D4,S1)
1203  for(Int_t dee = 1; dee<=4; dee++)
1204  {
1205  if( dee == 1 || dee == 4 ){ids = 1;}
1206  if( dee == 2 || dee == 3 ){ids = 9;}
1207  for(Int_t isc= 13; isc<= 20; isc++)fT2d_DS[dee-1][isc-1] = ids;
1208  for(Int_t isc= 33; isc<= 40; isc++)fT2d_DS[dee-1][isc-1] = ids;
1209  for(Int_t isc= 54; isc<= 60; isc++)fT2d_DS[dee-1][isc-1] = ids;
1210  for(Int_t isc= 75; isc<= 79; isc++)fT2d_DS[dee-1][isc-1] = ids;
1211  for(Int_t isc= 96; isc<= 99; isc++)fT2d_DS[dee-1][isc-1] = ids;
1212  for(Int_t isc=118; isc<=119; isc++)fT2d_DS[dee-1][isc-1] = ids;
1213  }
1214  //........... (D1,S2)=(D2,S8)=(D3,S8)=(D4,S2)
1215  for(Int_t dee = 1; dee<=4; dee++)
1216  {
1217  if( dee == 1 || dee == 4 ){ids = 2;}
1218  if( dee == 2 || dee == 3 ){ids = 8;}
1219  for(Int_t isc= 32; isc<= 32; isc++)fT2d_DS[dee-1][isc-1] = ids;
1220  for(Int_t isc= 51; isc<= 53; isc++)fT2d_DS[dee-1][isc-1] = ids;
1221  for(Int_t isc= 72; isc<= 74; isc++)fT2d_DS[dee-1][isc-1] = ids;
1222  for(Int_t isc= 92; isc<= 95; isc++)fT2d_DS[dee-1][isc-1] = ids;
1223  for(Int_t isc=112; isc<=117; isc++)fT2d_DS[dee-1][isc-1] = ids;
1224  for(Int_t isc=132; isc<=138; isc++)fT2d_DS[dee-1][isc-1] = ids;
1225  for(Int_t isc=152; isc<=157; isc++)fT2d_DS[dee-1][isc-1] = ids;
1226  for(Int_t isc=173; isc<=176; isc++)fT2d_DS[dee-1][isc-1] = ids;
1227  for(Int_t isc=193; isc<=193; isc++)fT2d_DS[dee-1][isc-1] = ids;
1228  }
1229  //........... (D1,S3)=(D2,S7)=(D3,S7)=(D4,S3)
1230  for(Int_t dee = 1; dee<=4; dee++)
1231  {
1232  if( dee == 1 || dee == 4 ){ids = 3;}
1233  if( dee == 2 || dee == 3 ){ids = 7;}
1234  for(Int_t isc= 50; isc<= 50; isc++)fT2d_DS[dee-1][isc-1] = ids;
1235  for(Int_t isc= 69; isc<= 71; isc++)fT2d_DS[dee-1][isc-1] = ids;
1236  for(Int_t isc= 88; isc<= 91; isc++)fT2d_DS[dee-1][isc-1] = ids;
1237  for(Int_t isc=108; isc<=111; isc++)fT2d_DS[dee-1][isc-1] = ids;
1238  for(Int_t isc=127; isc<=131; isc++)fT2d_DS[dee-1][isc-1] = ids;
1239  for(Int_t isc=147; isc<=151; isc++)fT2d_DS[dee-1][isc-1] = ids;
1240  for(Int_t isc=166; isc<=172; isc++)fT2d_DS[dee-1][isc-1] = ids;
1241  for(Int_t isc=188; isc<=192; isc++)fT2d_DS[dee-1][isc-1] = ids;
1242  }
1243  //........... (D1,S4)=(D2,S6)=(D3,S6)=(D4,S4)
1244  for(Int_t dee = 1; dee<=4; dee++)
1245  {
1246  if( dee == 1 || dee == 4 ){ids = 4;}
1247  if( dee == 2 || dee == 3 ){ids = 6;}
1248  for(Int_t isc= 27; isc<= 29; isc++)fT2d_DS[dee-1][isc-1] = ids;
1249  for(Int_t isc= 44; isc<= 49; isc++)fT2d_DS[dee-1][isc-1] = ids;
1250  for(Int_t isc= 62; isc<= 68; isc++)fT2d_DS[dee-1][isc-1] = ids;
1251  for(Int_t isc= 82; isc<= 87; isc++)fT2d_DS[dee-1][isc-1] = ids;
1252  for(Int_t isc=102; isc<=107; isc++)fT2d_DS[dee-1][isc-1] = ids;
1253  for(Int_t isc=123; isc<=126; isc++)fT2d_DS[dee-1][isc-1] = ids;
1254  for(Int_t isc=144; isc<=146; isc++)fT2d_DS[dee-1][isc-1] = ids;
1255  for(Int_t isc=165; isc<=165; isc++)fT2d_DS[dee-1][isc-1] = ids;
1256  }
1257  //........... (D1,S5)=(D2,S5)=(D3,S5)=(D4,S5)
1258  for(Int_t dee = 1; dee<=4; dee++)
1259  {
1260  for(Int_t isc= 1; isc<= 8; isc++)fT2d_DS[dee-1][isc-1] = 5;
1261  for(Int_t isc= 21; isc<= 26; isc++)fT2d_DS[dee-1][isc-1] = 5;
1262  for(Int_t isc= 41; isc<= 43; isc++)fT2d_DS[dee-1][isc-1] = 5;
1263  }
1264 
1265  //............................................ SC numbers in Data Sectors: fT2d_DSSC[][]
1266  // fT2d_DSSC[dee-1][SC ECNA number - 1] = SC number in DS;
1267  for(Int_t dee=1; dee<=4; dee++)
1268  {
1269  for(Int_t isc=1; isc<=MaxDeeSC; isc++)
1270  {fT2d_DSSC[dee-1][isc-1] = -1;}
1271  //.......................................... S1 (D1,D4), S9 (D2,D3) ; 33 SC's
1272  fT2d_DSSC[dee-1][13-1] = 12;
1273  fT2d_DSSC[dee-1][14-1] = 11;
1274  fT2d_DSSC[dee-1][15-1] = 10;
1275  fT2d_DSSC[dee-1][16-1] = 9;
1276  fT2d_DSSC[dee-1][17-1] = 4;
1277  fT2d_DSSC[dee-1][18-1] = 3;
1278  fT2d_DSSC[dee-1][19-1] = 2;
1279  fT2d_DSSC[dee-1][20-1] = 1;
1280 
1281  fT2d_DSSC[dee-1][33-1] = 16;
1282  fT2d_DSSC[dee-1][34-1] = 15;
1283  fT2d_DSSC[dee-1][35-1] = 14;
1284  fT2d_DSSC[dee-1][36-1] = 13;
1285  fT2d_DSSC[dee-1][37-1] = 8;
1286  fT2d_DSSC[dee-1][38-1] = 7;
1287  fT2d_DSSC[dee-1][39-1] = 6;
1288  fT2d_DSSC[dee-1][40-1] = 5;
1289 
1290  fT2d_DSSC[dee-1][54-1] = 33;
1291  fT2d_DSSC[dee-1][55-1] = 31;
1292  fT2d_DSSC[dee-1][56-1] = 27;
1293  fT2d_DSSC[dee-1][57-1] = 24;
1294  fT2d_DSSC[dee-1][58-1] = 20;
1295  fT2d_DSSC[dee-1][59-1] = 17;
1296  fT2d_DSSC[dee-1][60-1] = 30; // (182a, 33a for construction)
1297 
1298  fT2d_DSSC[dee-1][75-1] = 32;
1299  fT2d_DSSC[dee-1][76-1] = 28;
1300  fT2d_DSSC[dee-1][77-1] = 25;
1301  fT2d_DSSC[dee-1][78-1] = 21;
1302  fT2d_DSSC[dee-1][79-1] = 18;
1303 
1304  fT2d_DSSC[dee-1][96-1] = 29;
1305  fT2d_DSSC[dee-1][97-1] = 26;
1306  fT2d_DSSC[dee-1][98-1] = 22;
1307  fT2d_DSSC[dee-1][99-1] = 19;
1308 
1309  fT2d_DSSC[dee-1][118-1] = 23;
1310  fT2d_DSSC[dee-1][119-1] = 30; // (182b, 33b for construction)
1311 
1312  //.......................................... S2 (D1,D4), S8(D2,D3) ; 32 SC's
1313  fT2d_DSSC[dee-1][32-1] = 25; // also 3; // ( (207c, 58c) also (178c, 29c) for construction)
1314 
1315  fT2d_DSSC[dee-1][51-1] = 32;
1316  fT2d_DSSC[dee-1][52-1] = 26;
1317  fT2d_DSSC[dee-1][53-1] = 18;
1318 
1319  fT2d_DSSC[dee-1][72-1] = 27;
1320  fT2d_DSSC[dee-1][73-1] = 19;
1321  fT2d_DSSC[dee-1][74-1] = 12;
1322 
1323  fT2d_DSSC[dee-1][92-1] = 28;
1324  fT2d_DSSC[dee-1][93-1] = 20;
1325  fT2d_DSSC[dee-1][94-1] = 13;
1326  fT2d_DSSC[dee-1][95-1] = 7;
1327 
1328  fT2d_DSSC[dee-1][112-1] = 29;
1329  fT2d_DSSC[dee-1][113-1] = 21;
1330  fT2d_DSSC[dee-1][114-1] = 14;
1331  fT2d_DSSC[dee-1][115-1] = 8;
1332  fT2d_DSSC[dee-1][116-1] = 4;
1333  fT2d_DSSC[dee-1][117-1] = 1;
1334 
1335  fT2d_DSSC[dee-1][132-1] = 30;
1336  fT2d_DSSC[dee-1][133-1] = 22;
1337  fT2d_DSSC[dee-1][134-1] = 15;
1338  fT2d_DSSC[dee-1][135-1] = 9;
1339  fT2d_DSSC[dee-1][136-1] = 5;
1340  fT2d_DSSC[dee-1][137-1] = 2;
1341  fT2d_DSSC[dee-1][138-1] = 3; // (178a, 29a for construction)
1342 
1343  fT2d_DSSC[dee-1][152-1] = 31;
1344  fT2d_DSSC[dee-1][153-1] = 23;
1345  fT2d_DSSC[dee-1][154-1] = 16;
1346  fT2d_DSSC[dee-1][155-1] = 10;
1347  fT2d_DSSC[dee-1][156-1] = 6;
1348  fT2d_DSSC[dee-1][157-1] = 3; // (178b, 29b for construction)
1349 
1350  fT2d_DSSC[dee-1][173-1] = 24;
1351  fT2d_DSSC[dee-1][174-1] = 17;
1352  fT2d_DSSC[dee-1][175-1] = 11;
1353  fT2d_DSSC[dee-1][176-1] = 25; // (207a, 58a for construction)
1354 
1355  fT2d_DSSC[dee-1][193-1] = 25; // (207b, 58b for construction)
1356 
1357  //.......................................... S3 (D1,D4), S7 (D2,D3) ; 34 SC's
1358  fT2d_DSSC[dee-1][50-1] = 10;
1359 
1360  fT2d_DSSC[dee-1][69-1] = 18;
1361  fT2d_DSSC[dee-1][70-1] = 11;
1362  fT2d_DSSC[dee-1][71-1] = 3;
1363 
1364  fT2d_DSSC[dee-1][88-1] = 25;
1365  fT2d_DSSC[dee-1][89-1] = 19;
1366  fT2d_DSSC[dee-1][90-1] = 12;
1367  fT2d_DSSC[dee-1][91-1] = 4;
1368 
1369  fT2d_DSSC[dee-1][108-1] = 26;
1370  fT2d_DSSC[dee-1][109-1] = 20;
1371  fT2d_DSSC[dee-1][110-1] = 13;
1372  fT2d_DSSC[dee-1][111-1] = 5;
1373 
1374  fT2d_DSSC[dee-1][127-1] = 31;
1375  fT2d_DSSC[dee-1][128-1] = 27;
1376  fT2d_DSSC[dee-1][129-1] = 21;
1377  fT2d_DSSC[dee-1][130-1] = 14;
1378  fT2d_DSSC[dee-1][131-1] = 6;
1379 
1380  fT2d_DSSC[dee-1][147-1] = 32;
1381  fT2d_DSSC[dee-1][148-1] = 28;
1382  fT2d_DSSC[dee-1][149-1] = 22;
1383  fT2d_DSSC[dee-1][150-1] = 15;
1384  fT2d_DSSC[dee-1][151-1] = 7;
1385 
1386  fT2d_DSSC[dee-1][166-1] = 33;
1387  fT2d_DSSC[dee-1][167-1] = 30;
1388  fT2d_DSSC[dee-1][168-1] = 29;
1389  fT2d_DSSC[dee-1][169-1] = 23;
1390  fT2d_DSSC[dee-1][170-1] = 16;
1391  fT2d_DSSC[dee-1][171-1] = 8;
1392  fT2d_DSSC[dee-1][172-1] = 1;
1393 
1394  fT2d_DSSC[dee-1][188-1] = 34; // (298a, 149a for construction)
1395  fT2d_DSSC[dee-1][189-1] = 24;
1396  fT2d_DSSC[dee-1][190-1] = 17;
1397  fT2d_DSSC[dee-1][191-1] = 9;
1398  fT2d_DSSC[dee-1][192-1] = 2;
1399 
1400  //.......................................... S4 (D1,D4), S6 (D2,D3) ; 33 SC's
1401  fT2d_DSSC[dee-1][27-1] = 33;
1402  fT2d_DSSC[dee-1][28-1] = 32;
1403  fT2d_DSSC[dee-1][29-1] = 14; // also 21; // ( (261a, 112a) also (268a, 119a) for construction)
1404 
1405  fT2d_DSSC[dee-1][44-1] = 22;
1406  fT2d_DSSC[dee-1][45-1] = 15;
1407  fT2d_DSSC[dee-1][46-1] = 8;
1408  fT2d_DSSC[dee-1][47-1] = 4;
1409  fT2d_DSSC[dee-1][48-1] = 2;
1410  fT2d_DSSC[dee-1][49-1] = 1;
1411 
1412  fT2d_DSSC[dee-1][62-1] = 29;
1413  fT2d_DSSC[dee-1][63-1] = 28;
1414  fT2d_DSSC[dee-1][64-1] = 23;
1415  fT2d_DSSC[dee-1][65-1] = 16;
1416  fT2d_DSSC[dee-1][66-1] = 9;
1417  fT2d_DSSC[dee-1][67-1] = 5;
1418  fT2d_DSSC[dee-1][68-1] = 3;
1419 
1420  fT2d_DSSC[dee-1][82-1] = 31;
1421  fT2d_DSSC[dee-1][83-1] = 30;
1422  fT2d_DSSC[dee-1][84-1] = 24;
1423  fT2d_DSSC[dee-1][85-1] = 17;
1424  fT2d_DSSC[dee-1][86-1] = 10;
1425  fT2d_DSSC[dee-1][87-1] = 6;
1426 
1427  fT2d_DSSC[dee-1][102-1] = 21; // (268c, 119c for construction)
1428  fT2d_DSSC[dee-1][103-1] = 27;
1429  fT2d_DSSC[dee-1][104-1] = 25;
1430  fT2d_DSSC[dee-1][105-1] = 18;
1431  fT2d_DSSC[dee-1][106-1] = 11;
1432  fT2d_DSSC[dee-1][107-1] = 7;
1433 
1434  fT2d_DSSC[dee-1][123-1] = 21; // (268b, 119b for construction)
1435  fT2d_DSSC[dee-1][124-1] = 26;
1436  fT2d_DSSC[dee-1][125-1] = 19;
1437  fT2d_DSSC[dee-1][126-1] = 12;
1438 
1439  fT2d_DSSC[dee-1][144-1] = 14; // (261c, 112c for construction)
1440  fT2d_DSSC[dee-1][145-1] = 20;
1441  fT2d_DSSC[dee-1][146-1] = 13;
1442 
1443  fT2d_DSSC[dee-1][165-1] = 14; // (261b, 112b for construction)
1444 
1445  //.......................................... S5 (2*17 = 34 SC's)
1446  if(dee == 1 || dee == 3)
1447  {
1448  fT2d_DSSC[dee-1][1-1] = 34;
1449  fT2d_DSSC[dee-1][2-1] = 33;
1450  fT2d_DSSC[dee-1][3-1] = 32;
1451  fT2d_DSSC[dee-1][4-1] = 31;
1452  fT2d_DSSC[dee-1][5-1] = 26;
1453  fT2d_DSSC[dee-1][6-1] = 25;
1454  fT2d_DSSC[dee-1][7-1] = 24;
1455  fT2d_DSSC[dee-1][8-1] = 23;
1456 
1457  fT2d_DSSC[dee-1][21-1] = 30;
1458  fT2d_DSSC[dee-1][22-1] = 29;
1459  fT2d_DSSC[dee-1][23-1] = 28;
1460  fT2d_DSSC[dee-1][24-1] = 27;
1461  fT2d_DSSC[dee-1][25-1] = 22;
1462  fT2d_DSSC[dee-1][26-1] = 21;
1463 
1464  fT2d_DSSC[dee-1][41-1] = 20; // (281a for construction)
1465  fT2d_DSSC[dee-1][42-1] = 19;
1466  fT2d_DSSC[dee-1][43-1] = 18;
1467  }
1468 
1469  if(dee == 2 || dee == 4)
1470  {
1471  fT2d_DSSC[dee-1][1-1] = 17;
1472  fT2d_DSSC[dee-1][2-1] = 16;
1473  fT2d_DSSC[dee-1][3-1] = 15;
1474  fT2d_DSSC[dee-1][4-1] = 14;
1475  fT2d_DSSC[dee-1][5-1] = 9;
1476  fT2d_DSSC[dee-1][6-1] = 8;
1477  fT2d_DSSC[dee-1][7-1] = 7;
1478  fT2d_DSSC[dee-1][8-1] = 6;
1479 
1480  fT2d_DSSC[dee-1][21-1] = 13;
1481  fT2d_DSSC[dee-1][22-1] = 12;
1482  fT2d_DSSC[dee-1][23-1] = 11;
1483  fT2d_DSSC[dee-1][24-1] = 10;
1484  fT2d_DSSC[dee-1][25-1] = 5;
1485  fT2d_DSSC[dee-1][26-1] = 4;
1486 
1487  fT2d_DSSC[dee-1][41-1] = 3; // (132a for construction)
1488  fT2d_DSSC[dee-1][42-1] = 2;
1489  fT2d_DSSC[dee-1][43-1] = 1;
1490  }
1491  }
1492  //............................... Numbers for construction: fT2d_DeeSCCons[][]
1493  // fT2d_DeeSCCons[dee-1][SC ECNA number - 1] = SC number for construction;
1494 
1495  //............................... init to -1
1496  for(Int_t dee=1; dee<=4; dee++)
1497  {for(Int_t isc=1; isc<=MaxDeeSC; isc++)
1498  {fT2d_DeeSCCons[dee-1][isc-1] = -1;}}
1499 
1500  for(Int_t i_dee_type=1; i_dee_type<=2; i_dee_type++)
1501  {
1502  Int_t dee = -1;
1503  if( i_dee_type == 1 ){dee = 1;}
1504  if( i_dee_type == 2 ){dee = 3;}
1505 
1506  //.......................................... (D1,S1 or D3,S9) AND (D2,S9 or D4,S1)
1507  // number in comment = fT2d_DSSC[dee-1][SC ECNA nb - 1] (= SC number in DS)
1508  fT2d_DeeSCCons[dee-1][13-1] = 161; fT2d_DeeSCCons[dee][13-1] = 12; // 12;
1509  fT2d_DeeSCCons[dee-1][14-1] = 160; fT2d_DeeSCCons[dee][14-1] = 11; // 11;
1510  fT2d_DeeSCCons[dee-1][15-1] = 159; fT2d_DeeSCCons[dee][15-1] = 10; // 10;
1511  fT2d_DeeSCCons[dee-1][16-1] = 158; fT2d_DeeSCCons[dee][16-1] = 9; // 9;
1512  fT2d_DeeSCCons[dee-1][17-1] = 153; fT2d_DeeSCCons[dee][17-1] = 4; // 4;
1513  fT2d_DeeSCCons[dee-1][18-1] = 152; fT2d_DeeSCCons[dee][18-1] = 3; // 3;
1514  fT2d_DeeSCCons[dee-1][19-1] = 151; fT2d_DeeSCCons[dee][19-1] = 2; // 2;
1515  fT2d_DeeSCCons[dee-1][20-1] = 150; fT2d_DeeSCCons[dee][20-1] = 1; // 1;
1516 
1517  fT2d_DeeSCCons[dee-1][33-1] = 165; fT2d_DeeSCCons[dee][33-1] = 16; // 16;
1518  fT2d_DeeSCCons[dee-1][34-1] = 164; fT2d_DeeSCCons[dee][34-1] = 15; // 15;
1519  fT2d_DeeSCCons[dee-1][35-1] = 163; fT2d_DeeSCCons[dee][35-1] = 14; // 14;
1520  fT2d_DeeSCCons[dee-1][36-1] = 162; fT2d_DeeSCCons[dee][36-1] = 13; // 13;
1521  fT2d_DeeSCCons[dee-1][37-1] = 157; fT2d_DeeSCCons[dee][37-1] = 8; // 8;
1522  fT2d_DeeSCCons[dee-1][38-1] = 156; fT2d_DeeSCCons[dee][38-1] = 7; // 7;
1523  fT2d_DeeSCCons[dee-1][39-1] = 155; fT2d_DeeSCCons[dee][39-1] = 6; // 6;
1524  fT2d_DeeSCCons[dee-1][40-1] = 154; fT2d_DeeSCCons[dee][40-1] = 5; // 5;
1525 
1526  fT2d_DeeSCCons[dee-1][54-1] = 193; fT2d_DeeSCCons[dee][54-1] = 44; // 33;
1527  fT2d_DeeSCCons[dee-1][55-1] = 186; fT2d_DeeSCCons[dee][55-1] = 37; // 31;
1528  fT2d_DeeSCCons[dee-1][56-1] = 179; fT2d_DeeSCCons[dee][56-1] = 30; // 27;
1529  fT2d_DeeSCCons[dee-1][57-1] = 173; fT2d_DeeSCCons[dee][57-1] = 24; // 24;
1530  fT2d_DeeSCCons[dee-1][58-1] = 169; fT2d_DeeSCCons[dee][58-1] = 20; // 20;
1531  fT2d_DeeSCCons[dee-1][59-1] = 166; fT2d_DeeSCCons[dee][59-1] = 17; // 17;
1532  fT2d_DeeSCCons[dee-1][60-1] = 182; fT2d_DeeSCCons[dee][60-1] = 33; // 30; // 182a ; 33a;
1533 
1534  fT2d_DeeSCCons[dee-1][75-1] = 187; fT2d_DeeSCCons[dee][75-1] = 38; // 32;
1535  fT2d_DeeSCCons[dee-1][76-1] = 180; fT2d_DeeSCCons[dee][76-1] = 31; // 28;
1536  fT2d_DeeSCCons[dee-1][77-1] = 174; fT2d_DeeSCCons[dee][77-1] = 25; // 25;
1537  fT2d_DeeSCCons[dee-1][78-1] = 170; fT2d_DeeSCCons[dee][78-1] = 21; // 21;
1538  fT2d_DeeSCCons[dee-1][79-1] = 167; fT2d_DeeSCCons[dee][79-1] = 18; // 18;
1539 
1540  fT2d_DeeSCCons[dee-1][96-1] = 181; fT2d_DeeSCCons[dee][96-1] = 32; // 29;
1541  fT2d_DeeSCCons[dee-1][97-1] = 175; fT2d_DeeSCCons[dee][97-1] = 26; // 26;
1542  fT2d_DeeSCCons[dee-1][98-1] = 171; fT2d_DeeSCCons[dee][98-1] = 22; // 22;
1543  fT2d_DeeSCCons[dee-1][99-1] = 168; fT2d_DeeSCCons[dee][99-1] = 19; // 19;
1544 
1545  fT2d_DeeSCCons[dee-1][118-1] = 172; fT2d_DeeSCCons[dee][118-1] = 23; // 23;
1546  fT2d_DeeSCCons[dee-1][119-1] = 182; fT2d_DeeSCCons[dee][119-1] = 33; // 30; // 182b ; 33b;
1547 
1548  //.......................................... (D1,S2 or D3,S8) AND (D2,S8 or D4,S2)
1549  fT2d_DeeSCCons[dee-1][32-1] = 178; fT2d_DeeSCCons[dee][32-1] = 29; // 25-3; // 178c-207c ; 29c-58c;
1550 
1551  fT2d_DeeSCCons[dee-1][51-1] = 216; fT2d_DeeSCCons[dee][51-1] = 67; // 32;
1552  fT2d_DeeSCCons[dee-1][52-1] = 208; fT2d_DeeSCCons[dee][52-1] = 59; // 26;
1553  fT2d_DeeSCCons[dee-1][53-1] = 200; fT2d_DeeSCCons[dee][53-1] = 51; // 18;
1554 
1555  fT2d_DeeSCCons[dee-1][72-1] = 209; fT2d_DeeSCCons[dee][72-1] = 60; // 27;
1556  fT2d_DeeSCCons[dee-1][73-1] = 201; fT2d_DeeSCCons[dee][73-1] = 52; // 19;
1557  fT2d_DeeSCCons[dee-1][74-1] = 194; fT2d_DeeSCCons[dee][74-1] = 45; // 12;
1558 
1559  fT2d_DeeSCCons[dee-1][92-1] = 210; fT2d_DeeSCCons[dee][92-1] = 61; // 28;
1560  fT2d_DeeSCCons[dee-1][93-1] = 202; fT2d_DeeSCCons[dee][93-1] = 53; // 20;
1561  fT2d_DeeSCCons[dee-1][94-1] = 195; fT2d_DeeSCCons[dee][94-1] = 46; // 13;
1562  fT2d_DeeSCCons[dee-1][95-1] = 188; fT2d_DeeSCCons[dee][95-1] = 39; // 7;
1563 
1564  fT2d_DeeSCCons[dee-1][112-1] = 211; fT2d_DeeSCCons[dee][112-1] = 62; // 29;
1565  fT2d_DeeSCCons[dee-1][113-1] = 203; fT2d_DeeSCCons[dee][113-1] = 54; // 21;
1566  fT2d_DeeSCCons[dee-1][114-1] = 196; fT2d_DeeSCCons[dee][114-1] = 47; // 14;
1567  fT2d_DeeSCCons[dee-1][115-1] = 189; fT2d_DeeSCCons[dee][115-1] = 40; // 8;
1568  fT2d_DeeSCCons[dee-1][116-1] = 183; fT2d_DeeSCCons[dee][116-1] = 34; // 4;
1569  fT2d_DeeSCCons[dee-1][117-1] = 176; fT2d_DeeSCCons[dee][117-1] = 27; // 1;
1570 
1571  fT2d_DeeSCCons[dee-1][132-1] = 212; fT2d_DeeSCCons[dee][132-1] = 63; // 30;
1572  fT2d_DeeSCCons[dee-1][133-1] = 204; fT2d_DeeSCCons[dee][133-1] = 55; // 22;
1573  fT2d_DeeSCCons[dee-1][134-1] = 197; fT2d_DeeSCCons[dee][134-1] = 48; // 15;
1574  fT2d_DeeSCCons[dee-1][135-1] = 190; fT2d_DeeSCCons[dee][135-1] = 41; // 9;
1575  fT2d_DeeSCCons[dee-1][136-1] = 184; fT2d_DeeSCCons[dee][136-1] = 35; // 5;
1576  fT2d_DeeSCCons[dee-1][137-1] = 177; fT2d_DeeSCCons[dee][137-1] = 28; // 2;
1577  fT2d_DeeSCCons[dee-1][138-1] = 178; fT2d_DeeSCCons[dee][138-1] = 29; // 3; // 178a ; 29a;
1578 
1579  fT2d_DeeSCCons[dee-1][152-1] = 213; fT2d_DeeSCCons[dee][152-1] = 64; // 31;
1580  fT2d_DeeSCCons[dee-1][153-1] = 205; fT2d_DeeSCCons[dee][153-1] = 56; // 23;
1581  fT2d_DeeSCCons[dee-1][154-1] = 198; fT2d_DeeSCCons[dee][154-1] = 49; // 16;
1582  fT2d_DeeSCCons[dee-1][155-1] = 191; fT2d_DeeSCCons[dee][155-1] = 42; // 10;
1583  fT2d_DeeSCCons[dee-1][156-1] = 185; fT2d_DeeSCCons[dee][156-1] = 36; // 6;
1584  fT2d_DeeSCCons[dee-1][157-1] = 178; fT2d_DeeSCCons[dee][157-1] = 29; // 3; // 178b ; 29b;
1585 
1586  fT2d_DeeSCCons[dee-1][173-1] = 206; fT2d_DeeSCCons[dee][173-1] = 57; // 24;
1587  fT2d_DeeSCCons[dee-1][174-1] = 199; fT2d_DeeSCCons[dee][174-1] = 50; // 17;
1588  fT2d_DeeSCCons[dee-1][175-1] = 192; fT2d_DeeSCCons[dee][175-1] = 43; // 11;
1589  fT2d_DeeSCCons[dee-1][176-1] = 207; fT2d_DeeSCCons[dee][176-1] = 58; // 25; // 58a ; 207a;
1590 
1591  fT2d_DeeSCCons[dee-1][193-1] = 207; fT2d_DeeSCCons[dee][193-1] = 58; // 25; // 58b ; 207b;
1592 
1593  //.......................................... (D1,S3 or D3,S7) AND (D2,S7 or D4,S3)
1594  fT2d_DeeSCCons[dee-1][50-1] = 224; fT2d_DeeSCCons[dee][50-1] = 75; // 10;
1595 
1596  fT2d_DeeSCCons[dee-1][69-1] = 233; fT2d_DeeSCCons[dee][69-1] = 84; // 18;
1597  fT2d_DeeSCCons[dee-1][70-1] = 225; fT2d_DeeSCCons[dee][70-1] = 76; // 11;
1598  fT2d_DeeSCCons[dee-1][71-1] = 217; fT2d_DeeSCCons[dee][71-1] = 68; // 3;
1599 
1600  fT2d_DeeSCCons[dee-1][88-1] = 242; fT2d_DeeSCCons[dee][88-1] = 93; // 25;
1601  fT2d_DeeSCCons[dee-1][89-1] = 234; fT2d_DeeSCCons[dee][89-1] = 85; // 19;
1602  fT2d_DeeSCCons[dee-1][90-1] = 226; fT2d_DeeSCCons[dee][90-1] = 77; // 12;
1603  fT2d_DeeSCCons[dee-1][91-1] = 218; fT2d_DeeSCCons[dee][91-1] = 69; // 4;
1604 
1605  fT2d_DeeSCCons[dee-1][108-1] = 243; fT2d_DeeSCCons[dee][108-1] = 94; // 26;
1606  fT2d_DeeSCCons[dee-1][109-1] = 235; fT2d_DeeSCCons[dee][109-1] = 86; // 20;
1607  fT2d_DeeSCCons[dee-1][110-1] = 227; fT2d_DeeSCCons[dee][110-1] = 78; // 13;
1608  fT2d_DeeSCCons[dee-1][111-1] = 219; fT2d_DeeSCCons[dee][111-1] = 70; // 5;
1609 
1610  fT2d_DeeSCCons[dee-1][127-1] = 252; fT2d_DeeSCCons[dee][127-1] = 103; // 31;
1611  fT2d_DeeSCCons[dee-1][128-1] = 244; fT2d_DeeSCCons[dee][128-1] = 95; // 27;
1612  fT2d_DeeSCCons[dee-1][129-1] = 236; fT2d_DeeSCCons[dee][129-1] = 87; // 21;
1613  fT2d_DeeSCCons[dee-1][130-1] = 228; fT2d_DeeSCCons[dee][130-1] = 79; // 14;
1614  fT2d_DeeSCCons[dee-1][131-1] = 220; fT2d_DeeSCCons[dee][131-1] = 71; // 6;
1615 
1616  fT2d_DeeSCCons[dee-1][147-1] = 253; fT2d_DeeSCCons[dee][147-1] = 104; // 32;
1617  fT2d_DeeSCCons[dee-1][148-1] = 245; fT2d_DeeSCCons[dee][148-1] = 96; // 28;
1618  fT2d_DeeSCCons[dee-1][149-1] = 237; fT2d_DeeSCCons[dee][149-1] = 88; // 22;
1619  fT2d_DeeSCCons[dee-1][150-1] = 229; fT2d_DeeSCCons[dee][150-1] = 80; // 15;
1620  fT2d_DeeSCCons[dee-1][151-1] = 221; fT2d_DeeSCCons[dee][151-1] = 72; // 7;
1621 
1622  fT2d_DeeSCCons[dee-1][166-1] = 254; fT2d_DeeSCCons[dee][166-1] = 105; // 33;
1623  fT2d_DeeSCCons[dee-1][167-1] = 247; fT2d_DeeSCCons[dee][167-1] = 98; // 30;
1624  fT2d_DeeSCCons[dee-1][168-1] = 246; fT2d_DeeSCCons[dee][168-1] = 97; // 29;
1625  fT2d_DeeSCCons[dee-1][169-1] = 238; fT2d_DeeSCCons[dee][169-1] = 89; // 23;
1626  fT2d_DeeSCCons[dee-1][170-1] = 230; fT2d_DeeSCCons[dee][170-1] = 81; // 16;
1627  fT2d_DeeSCCons[dee-1][171-1] = 222; fT2d_DeeSCCons[dee][171-1] = 73; // 8;
1628  fT2d_DeeSCCons[dee-1][172-1] = 214; fT2d_DeeSCCons[dee][172-1] = 65; // 1;
1629 
1630  fT2d_DeeSCCons[dee-1][188-1] = 298; fT2d_DeeSCCons[dee][188-1] = 149; // 24; // 298a ; 149a;
1631  fT2d_DeeSCCons[dee-1][189-1] = 239; fT2d_DeeSCCons[dee][189-1] = 90; // 24;
1632  fT2d_DeeSCCons[dee-1][190-1] = 231; fT2d_DeeSCCons[dee][190-1] = 82; // 17;
1633  fT2d_DeeSCCons[dee-1][191-1] = 223; fT2d_DeeSCCons[dee][191-1] = 74; // 9;
1634  fT2d_DeeSCCons[dee-1][192-1] = 215; fT2d_DeeSCCons[dee][192-1] = 66; // 2;
1635 
1636  //.......................................... (D1,S4 or D3,S6) AND (D2,S6 or D4,S4)
1637  fT2d_DeeSCCons[dee-1][29-1] = 261; fT2d_DeeSCCons[dee][29-1] = 112; // 14-21; // 261a-268a ; 112a-119a;
1638  fT2d_DeeSCCons[dee-1][27-1] = 283; fT2d_DeeSCCons[dee][27-1] = 134; // 33;
1639  fT2d_DeeSCCons[dee-1][28-1] = 282; fT2d_DeeSCCons[dee][28-1] = 133; // 32;
1640 
1641  fT2d_DeeSCCons[dee-1][44-1] = 269; fT2d_DeeSCCons[dee][44-1] = 120; // 22;
1642  fT2d_DeeSCCons[dee-1][45-1] = 262; fT2d_DeeSCCons[dee][45-1] = 113; // 15;
1643  fT2d_DeeSCCons[dee-1][46-1] = 255; fT2d_DeeSCCons[dee][46-1] = 106; // 8;
1644  fT2d_DeeSCCons[dee-1][47-1] = 248; fT2d_DeeSCCons[dee][47-1] = 99; // 4;
1645  fT2d_DeeSCCons[dee-1][48-1] = 240; fT2d_DeeSCCons[dee][48-1] = 91; // 2;
1646  fT2d_DeeSCCons[dee-1][49-1] = 232; fT2d_DeeSCCons[dee][49-1] = 83; // 1;
1647 
1648  fT2d_DeeSCCons[dee-1][62-1] = 276; fT2d_DeeSCCons[dee][62-1] = 127; // 29;
1649  fT2d_DeeSCCons[dee-1][63-1] = 275; fT2d_DeeSCCons[dee][63-1] = 126; // 28;
1650  fT2d_DeeSCCons[dee-1][64-1] = 270; fT2d_DeeSCCons[dee][64-1] = 121; // 23;
1651  fT2d_DeeSCCons[dee-1][65-1] = 263; fT2d_DeeSCCons[dee][65-1] = 114; // 16;
1652  fT2d_DeeSCCons[dee-1][66-1] = 256; fT2d_DeeSCCons[dee][66-1] = 107; // 9;
1653  fT2d_DeeSCCons[dee-1][67-1] = 249; fT2d_DeeSCCons[dee][67-1] = 100; // 5;
1654  fT2d_DeeSCCons[dee-1][68-1] = 241; fT2d_DeeSCCons[dee][68-1] = 92; // 3;
1655 
1656  fT2d_DeeSCCons[dee-1][82-1] = 278; fT2d_DeeSCCons[dee][82-1] = 129; // 31;
1657  fT2d_DeeSCCons[dee-1][83-1] = 277; fT2d_DeeSCCons[dee][83-1] = 128; // 30;
1658  fT2d_DeeSCCons[dee-1][84-1] = 271; fT2d_DeeSCCons[dee][84-1] = 122; // 24;
1659  fT2d_DeeSCCons[dee-1][85-1] = 264; fT2d_DeeSCCons[dee][85-1] = 115; // 17;
1660  fT2d_DeeSCCons[dee-1][86-1] = 257; fT2d_DeeSCCons[dee][86-1] = 108; // 10;
1661  fT2d_DeeSCCons[dee-1][87-1] = 250; fT2d_DeeSCCons[dee][87-1] = 101; // 6;
1662 
1663  fT2d_DeeSCCons[dee-1][102-1] = 268; fT2d_DeeSCCons[dee][102-1] = 119; // 21; // 268c ; 119c;
1664  fT2d_DeeSCCons[dee-1][103-1] = 274; fT2d_DeeSCCons[dee][103-1] = 125; // 27;
1665  fT2d_DeeSCCons[dee-1][104-1] = 272; fT2d_DeeSCCons[dee][104-1] = 123; // 25;
1666  fT2d_DeeSCCons[dee-1][105-1] = 265; fT2d_DeeSCCons[dee][105-1] = 116; // 18;
1667  fT2d_DeeSCCons[dee-1][106-1] = 258; fT2d_DeeSCCons[dee][106-1] = 109; // 11;
1668  fT2d_DeeSCCons[dee-1][107-1] = 251; fT2d_DeeSCCons[dee][107-1] = 102; // 7;
1669 
1670  fT2d_DeeSCCons[dee-1][123-1] = 268; fT2d_DeeSCCons[dee][123-1] = 119; // 27; // 268b ; 119b;
1671  fT2d_DeeSCCons[dee-1][124-1] = 273; fT2d_DeeSCCons[dee][124-1] = 124; // 26;
1672  fT2d_DeeSCCons[dee-1][125-1] = 266; fT2d_DeeSCCons[dee][125-1] = 117; // 19;
1673  fT2d_DeeSCCons[dee-1][126-1] = 259; fT2d_DeeSCCons[dee][126-1] = 110; // 12;
1674 
1675  fT2d_DeeSCCons[dee-1][144-1] = 261; fT2d_DeeSCCons[dee][144-1] = 112; // 27; // 261c ; 112c;
1676  fT2d_DeeSCCons[dee-1][145-1] = 267; fT2d_DeeSCCons[dee][145-1] = 118; // 20;
1677  fT2d_DeeSCCons[dee-1][146-1] = 260; fT2d_DeeSCCons[dee][146-1] = 111; // 13;
1678 
1679  fT2d_DeeSCCons[dee-1][165-1] = 261; fT2d_DeeSCCons[dee][165-1] = 112; // 27; // 261b ; 112b;
1680 
1681  //.......................................... D1 or D3, right half of S5
1682  fT2d_DeeSCCons[dee-1][1-1] = 297; // 34;
1683  fT2d_DeeSCCons[dee-1][2-1] = 296; // 33;
1684  fT2d_DeeSCCons[dee-1][3-1] = 295; // 32;
1685  fT2d_DeeSCCons[dee-1][4-1] = 294; // 31;
1686  fT2d_DeeSCCons[dee-1][5-1] = 289; // 26;
1687  fT2d_DeeSCCons[dee-1][6-1] = 288; // 25;
1688  fT2d_DeeSCCons[dee-1][7-1] = 287; // 24;
1689  fT2d_DeeSCCons[dee-1][8-1] = 286; // 23;
1690 
1691  fT2d_DeeSCCons[dee-1][21-1] = 293; // 30;
1692  fT2d_DeeSCCons[dee-1][22-1] = 292; // 29;
1693  fT2d_DeeSCCons[dee-1][23-1] = 291; // 28;
1694  fT2d_DeeSCCons[dee-1][24-1] = 290; // 27;
1695  fT2d_DeeSCCons[dee-1][25-1] = 285; // 22;
1696  fT2d_DeeSCCons[dee-1][26-1] = 284; // 21;
1697 
1698  fT2d_DeeSCCons[dee-1][41-1] = 281; // 20; // 281a
1699  fT2d_DeeSCCons[dee-1][42-1] = 280; // 19;
1700  fT2d_DeeSCCons[dee-1][43-1] = 279; // 18;
1701 
1702  //.......................................... D2 or D4, left half of S5
1703  fT2d_DeeSCCons[dee][1-1] = 148; // 17;
1704  fT2d_DeeSCCons[dee][2-1] = 147; // 16;
1705  fT2d_DeeSCCons[dee][3-1] = 146; // 15;
1706  fT2d_DeeSCCons[dee][4-1] = 145; // 14;
1707  fT2d_DeeSCCons[dee][5-1] = 140; // 9;
1708  fT2d_DeeSCCons[dee][6-1] = 139; // 8;
1709  fT2d_DeeSCCons[dee][7-1] = 138; // 7;
1710  fT2d_DeeSCCons[dee][8-1] = 137; // 6;
1711 
1712  fT2d_DeeSCCons[dee][21-1] = 144; // 13;
1713  fT2d_DeeSCCons[dee][22-1] = 143; // 12;
1714  fT2d_DeeSCCons[dee][23-1] = 142; // 11;
1715  fT2d_DeeSCCons[dee][24-1] = 141; // 10;
1716  fT2d_DeeSCCons[dee][25-1] = 136; // 5;
1717  fT2d_DeeSCCons[dee][26-1] = 135; // 4;
1718 
1719  fT2d_DeeSCCons[dee][41-1] = 132; // 3; // 132a
1720  fT2d_DeeSCCons[dee][42-1] = 131; // 2;
1721  fT2d_DeeSCCons[dee][43-1] = 130; // 1;
1722  }
1723 
1724  //........................ ECNA numbers from numbers for constructions: fT2d_RecovDeeSC[][]
1725 
1726  for(Int_t i0EEDee=0; i0EEDee<MaxEEDee; i0EEDee++)
1727  {
1728  for(Int_t i_ecna=0; i_ecna<MaxDeeSC; i_ecna++)
1729  {
1730  //....... test to avoid the -1 init value in 2nd index of array fT2d_RecovDeeSC[][]
1731  // (part of the matrix without real SC counterpart)
1732  if( fT2d_DeeSCCons[i0EEDee][i_ecna] >= 0 && fT2d_DeeSCCons[i0EEDee][i_ecna] <= MaxEESCForCons )
1733  {
1734  fT2d_RecovDeeSC[i0EEDee][fT2d_DeeSCCons[i0EEDee][i_ecna]-1] = i_ecna+1;
1735  }
1736  }
1737  }
1738 }
int i
Definition: DBlmapReader.cc:9
Int_t ** fT2d_DS
Int_t ** fT2d_RecovDeeSC
Int_t * fT1d_DeeSCCons
TEcnaParEcal * fEcal
Int_t ** fT2d_DSSC
int j
Definition: DBlmapReader.cc:9
Int_t MaxSCEcnaInDee()
Int_t * fT1d_RecovDeeSC
Int_t MaxSCForConsInDee()
Int_t ** fT2d_DeeSCCons
Int_t MaxDeeInEE()
Int_t TEcnaNumbering::Get0SMEchaFrom1SMTowAnd0TowEcha ( const Int_t &  n1SMTow,
const Int_t &  i0TowEcha 
)

Definition at line 409 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxCrysInTow().

Referenced by TEcnaHistos::TowerCrystalNumbering().

410 {
411 //get tower number from electronic channel number in SM
412 
413  Int_t i0SMEcha = (n1SMTow-1)*fEcal->MaxCrysInTow()+i0TowEcha;
414 
415  return i0SMEcha;
416 }
TEcnaParEcal * fEcal
Int_t MaxCrysInTow()
Int_t TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha ( const Int_t &  n1StexStin,
const Int_t &  i0StinEcha 
)

Definition at line 2419 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fTTBELL, and TEcnaParEcal::MaxCrysInStin().

Referenced by TEcnaRun::AveragedHighFrequencyNoise(), TEcnaRun::AveragedLowFrequencyNoise(), TEcnaRun::AveragedMeanOfCorrelationsBetweenSamples(), TEcnaRun::AveragedPedestals(), TEcnaRun::AveragedSigmaOfCorrelationsBetweenSamples(), TEcnaRun::AveragedTotalNoise(), TEcnaHistos::GetHistoValues(), TEcnaRead::ReadAveragedNumberOfEvents(), TEcnaRead::ReadCorrelationsBetweenSamples(), TEcnaRead::ReadCovariancesBetweenSamples(), TEcnaRead::ReadNumberOfEvents(), TEcnaRead::ReadRelevantCorrelationsBetweenSamples(), TEcnaRead::ReadSampleMeans(), TEcnaRead::ReadSampleSigmas(), and TEcnaHistos::ViewHistime().

2421 {
2422 // Electronic Channel number in Stex from Stin number in Stex
2423 // and from Electronic Channel number in Stin
2424 
2425  Int_t StexEcha = (Int_t)(-1.);
2426 
2427  if ( n1StexStin > 0 && n1StexStin <= fEcal->MaxStinEcnaInStex() &&
2428  i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
2429  {StexEcha = (n1StexStin-1)*fEcal->MaxCrysInStin() + i0StinEcha;}
2430  else
2431  {
2432  cout << "!TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha *** ERROR ***> VALUE"
2433  << " OUT OF RANGE. Forced to -1. Argument values: n1StexStin = " << n1StexStin
2434  << ", channel = " << i0StinEcha
2435  << fTTBELL << endl;
2436  }
2437  return StexEcha;
2438 }
TEcnaParEcal * fEcal
Int_t MaxCrysInStin()
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::Get0TowEchaFrom0SMEcha ( const Int_t &  i0SMEcha)

Definition at line 390 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxCrysInTow().

Referenced by TEcnaWrite::fT2dWriteAscii(), and TEcnaWrite::WriteAsciiHisto().

391 {
392 //get electronic channel number in tower from electronic channel number in SM
393 
394  Int_t n1SMTow = i0SMEcha/fEcal->MaxCrysInTow()+1;
395  Int_t i0TowEcha = i0SMEcha - fEcal->MaxCrysInTow()*(n1SMTow-1);
396 
397  return i0TowEcha; // range = [0,24]
398 }
TEcnaParEcal * fEcal
Int_t MaxCrysInTow()
Int_t TEcnaNumbering::Get0TowEchaFrom1SMCrys ( const Int_t &  n1SMCrys)

Definition at line 345 of file TEcnaNumbering.cc.

References gather_cfg::cout, fT1dTowEcha, and fTTBELL.

Referenced by EcnaAnalyzer::analyze().

346 {
347 // get Electronic Channel number in Tower from Crystal number in SuperModule
348 
349  Int_t i0TowEcha = -1;
350 
351  if( n1SMCrys >= 1 && n1SMCrys <= fEcal->MaxCrysInSM() )
352  {
353  i0TowEcha = fT1dTowEcha[n1SMCrys-1];
354  }
355  else
356  {
357  i0TowEcha = -2;
358  cout << "!TEcnaNumbering::Get0TowEchaFrom1SMCrys(...)> Crystal number in SM out of range."
359  << " n1SMCrys = " << n1SMCrys << fTTBELL << endl;
360  }
361  return i0TowEcha; // range = [0,24]
362 }
Int_t * fT1dTowEcha
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha ( const Int_t &  n1DeeSCEcna,
const Int_t &  i0SCEcha,
const TString  sDeeDir 
)

Definition at line 1747 of file TEcnaNumbering.cc.

References BuildEndcapCrysTable(), gather_cfg::cout, fEcal, fT3dDeeCrys, fTTBELL, GetDeeDirIndex(), and TEcnaParEcal::MaxCrysInSC().

Referenced by Get1StexCrysFrom1StexStinAnd0StinEcha().

1750 {
1751 //get crystal number in Dee from SC number in Dee
1752 // and from Electronic Channel number in super-crystal
1753 
1754  Int_t n1DeeCrys = 0;
1755  Int_t i0DeeDir = GetDeeDirIndex(sDeeDir);
1756 
1757  if( fT3dDeeCrys == 0 ){BuildEndcapCrysTable();}
1758 
1759  if( (n1DeeSCEcna >= 1) && (n1DeeSCEcna <= fEcal->MaxSCEcnaInDee()) )
1760  {
1761  if (i0SCEcha >=0 && i0SCEcha < fEcal->MaxCrysInSC())
1762  {
1763  n1DeeCrys = fT3dDeeCrys[n1DeeSCEcna-1][i0SCEcha][i0DeeDir];
1764  }
1765  else
1766  {
1767  n1DeeCrys = -2; // Electronic Cnannel in Super-Crystal out of range
1768  cout << "!TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(...)> Electronic Channel in SuperCrystal = "
1769  << i0SCEcha+1 << ". Out of range (range = [1," << fEcal->MaxCrysInSC() << "])" << fTTBELL << endl;
1770  }
1771  }
1772  else
1773  {
1774  n1DeeCrys = -3; // Super-Crystal number in Dee out of range
1775  cout << "!TEcnaNumbering::Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(...)> Super-Crystal number in Dee out of range."
1776  << " n1DeeSCEcna = " << n1DeeSCEcna << fTTBELL << endl;
1777  }
1778 
1779  return n1DeeCrys; // Range = [1,5000]
1780 }
void BuildEndcapCrysTable()
TEcnaParEcal * fEcal
Int_t GetDeeDirIndex(const TString)
Int_t MaxCrysInSC()
tuple cout
Definition: gather_cfg.py:41
Int_t *** fT3dDeeCrys
Int_t TEcnaNumbering::Get1DeeSCEcnaFrom0DeeEcha ( const Int_t &  i0DeeEcha)

Definition at line 1845 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxCrysInSC().

Referenced by Get1StexStinFrom0StexEcha(), and TEcnaWrite::WriteAsciiHisto().

1846 {
1847 //get super-crystal number from electronic channel number in Dee
1848 
1849  Int_t n1DeeSC = i0DeeEcha/fEcal->MaxCrysInSC()+1;
1850 
1851  return n1DeeSC; // range = [1,200]
1852 }
TEcnaParEcal * fEcal
Int_t MaxCrysInSC()
Int_t TEcnaNumbering::Get1DeeSCEcnaFrom1DeeCrys ( const Int_t &  n1DeeCrys,
const TString  sDeeDir 
)

Definition at line 1808 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fT2dDeeSC, fTTBELL, GetDeeDirIndex(), and TEcnaParEcal::MaxCrysEcnaInDee().

Referenced by EcnaAnalyzer::analyze().

1809 {
1810 // get Super-Crystal number in Dee from Crystal number in Dee
1811 
1812  Int_t n1DeeSCEcna = 0;
1813  Int_t iDeeDir = GetDeeDirIndex(sDeeDir);
1814 
1815  if( n1DeeCrys >= 1 && n1DeeCrys <= fEcal->MaxCrysEcnaInDee() )
1816  {
1817  n1DeeSCEcna = fT2dDeeSC[n1DeeCrys-1][iDeeDir];
1818  }
1819  else
1820  {
1821  n1DeeSCEcna = -1;
1822  cout << "!TEcnaNumbering::Get1DeeSCEcnaFrom1DeeCrys(...)> Crystal number in Dee out of range."
1823  << " n1DeeCrys = " << n1DeeCrys << "(max = " << fEcal->MaxCrysEcnaInDee() << ")" << fTTBELL << endl;
1824  }
1825  return n1DeeSCEcna; // range = [1,200]
1826 }
Int_t MaxCrysEcnaInDee()
Int_t ** fT2dDeeSC
TEcnaParEcal * fEcal
Int_t GetDeeDirIndex(const TString)
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons ( const Int_t &  n1DeeNumber,
const Int_t &  DeeSCCons 
)

Definition at line 2022 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fT2d_RecovDeeSC, fTTBELL, TEcnaParEcal::MaxDeeInEE(), and TEcnaParEcal::MaxSCForConsInDee().

Referenced by TEcnaHistos::CorrelationsBetweenSamples(), TEcnaHistos::CovariancesBetweenSamples(), TEcnaGui::DoButtonStinA(), TEcnaGui::DoButtonStinB(), TEcnaHistos::HighFrequencyCorrelationsBetweenChannels(), TEcnaHistos::HighFrequencyCovariancesBetweenChannels(), TEcnaGui::InitKeys(), TEcnaHistos::LowFrequencyCorrelationsBetweenChannels(), TEcnaHistos::LowFrequencyCovariancesBetweenChannels(), TEcnaHistos::SampleADCEvents(), TEcnaHistos::SCCrystalNumbering(), TEcnaHistos::ViewStin(), TEcnaHistos::XtalHighFrequencyNoiseRuns(), TEcnaHistos::XtalLowFrequencyNoiseRuns(), TEcnaHistos::XtalMeanOfCorssRuns(), TEcnaHistos::XtalPedestalsRuns(), TEcnaHistos::XtalSamplesEv(), TEcnaHistos::XtalSamplesSigma(), TEcnaHistos::XtalSampleValues(), TEcnaHistos::XtalSigmaOfCorssRuns(), TEcnaHistos::XtalTimeHighFrequencyNoise(), TEcnaHistos::XtalTimeLowFrequencyNoise(), TEcnaHistos::XtalTimeMeanOfCorss(), TEcnaHistos::XtalTimePedestals(), TEcnaHistos::XtalTimeSigmaOfCorss(), TEcnaHistos::XtalTimeTotalNoise(), and TEcnaHistos::XtalTotalNoiseRuns().

2023 {
2024 // Get SC Ecna number in Dee from SC number for Construction in Dee
2025 
2026  Int_t dee_sc_ecna = -1;
2027 
2028  if( n1DeeNumber > 0 && n1DeeNumber <= fEcal->MaxDeeInEE() )
2029  {
2030  Int_t off_set_cons = 0;
2031  if( n1DeeNumber == 1 || n1DeeNumber == 3 ){off_set_cons = fEcal->MaxSCForConsInDee();}
2032 
2033  if( DeeSCCons > off_set_cons && DeeSCCons <= fEcal->MaxSCForConsInDee()+off_set_cons )
2034  {
2035  dee_sc_ecna = fT2d_RecovDeeSC[n1DeeNumber-1][DeeSCCons-1];
2036  }
2037  else
2038  {
2039  cout << "!TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> DeeSCCons = " << DeeSCCons
2040  << ". Out of range ( range = [ " << off_set_cons+1
2041  << "," << fEcal->MaxSCForConsInDee()+off_set_cons << "] )"
2042  << fTTBELL << endl;
2043  }
2044  }
2045  else
2046  {
2047  if( n1DeeNumber != 0 )
2048  {
2049  cout << "!TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> n1DeeNumber = " << n1DeeNumber
2050  << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )"
2051  << fTTBELL << endl;
2052  }
2053  else
2054  {
2055  cout << "TEcnaNumbering::Get1DeeSCEcnaFromDeeSCCons(...)> Dee = " << n1DeeNumber
2056  << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])"
2057  << fTTBELL << endl;
2058  }
2059  }
2060  return dee_sc_ecna;
2061 }
Int_t ** fT2d_RecovDeeSC
TEcnaParEcal * fEcal
Int_t MaxSCForConsInDee()
Int_t MaxDeeInEE()
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::Get1SCEchaFrom0DeeEcha ( const Int_t &  i0DeeEcha)

Definition at line 1835 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxCrysInSC().

Referenced by TEcnaWrite::fT2dWriteAscii(), TEcnaHistos::ViewHisto(), and TEcnaWrite::WriteAsciiHisto().

1836 {
1837 //get electronic channel number in super-crystal from electronic channel number in Dee
1838 
1839  Int_t i0DeeSC = i0DeeEcha/fEcal->MaxCrysInSC();
1840  Int_t n1SCEcha = i0DeeEcha - fEcal->MaxCrysInSC()*i0DeeSC + 1;
1841 
1842  return n1SCEcha; // range = [1,25]
1843 }
TEcnaParEcal * fEcal
Int_t MaxCrysInSC()
Int_t TEcnaNumbering::Get1SCEchaFrom1DeeCrys ( const Int_t &  n1DeeCrys,
const TString  sDeeDir 
)

Definition at line 1788 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fT2dSCEcha, fTTBELL, GetDeeDirIndex(), and TEcnaParEcal::MaxCrysEcnaInDee().

Referenced by EcnaAnalyzer::analyze().

1789 {
1790 // get Electronic Channel number in Super-Crystal from Crystal ECNA number in Dee
1791 
1792  Int_t n1SCEcha = -1;
1793  Int_t iDeeDir = GetDeeDirIndex(sDeeDir);
1794 
1795  if( n1DeeCrys >= 1 && n1DeeCrys <= fEcal->MaxCrysEcnaInDee() )
1796  {
1797  n1SCEcha = fT2dSCEcha[n1DeeCrys-1][iDeeDir];
1798  }
1799  else
1800  {
1801  n1SCEcha = -2;
1802  cout << "!TEcnaNumbering::Get1SCEchaFrom1DeeCrys(...)> Crystal number in Dee out of range."
1803  << " n1DeeCrys = " << n1DeeCrys << "(max = " << fEcal->MaxCrysEcnaInDee() << ")" << fTTBELL << endl;
1804  }
1805  return n1SCEcha; // range = [1,25]
1806 }
Int_t MaxCrysEcnaInDee()
TEcnaParEcal * fEcal
Int_t GetDeeDirIndex(const TString)
tuple cout
Definition: gather_cfg.py:41
Int_t ** fT2dSCEcha
Int_t TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha ( const Int_t &  n1SMTow,
const Int_t &  i0TowEcha 
)

Definition at line 306 of file TEcnaNumbering.cc.

References BuildBarrelCrysTable(), gather_cfg::cout, fT2dSMCrys, and fTTBELL.

Referenced by Get1StexCrysFrom1StexStinAnd0StinEcha(), TEcnaHistos::TowerCrystalNumbering(), and TEcnaWrite::WriteAsciiHisto().

308 {
309 //get crystal number in SM from tower number in SM
310 // and from Electronic Channel number in tower
311 
312  Int_t n1SMCrys = 0;
313 
314  if( fT2dSMCrys == 0 ){BuildBarrelCrysTable();}
315 
316  if (n1SMTow >= 1 && n1SMTow <= fEcal->MaxTowInSM())
317  {
318  if (i0TowEcha >=0 && i0TowEcha < fEcal->MaxCrysInTow())
319  {
320  n1SMCrys = fT2dSMCrys[n1SMTow-1][i0TowEcha];
321  }
322  else
323  {
324  n1SMCrys = -2; // Electronic Cnannel in Tower out of range
325  cout << "!TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha(...)> Electronic Channel in Tower out of range."
326  << " i0TowEcha = " << i0TowEcha << fTTBELL << endl;
327  }
328  }
329  else
330  {
331  n1SMCrys = -3; // Tower number in SM out of range
332  cout << "!TEcnaNumbering::Get1SMCrysFrom1SMTowAnd0TowEcha(...)> Tower number in SM out of range."
333  << " n1SMTow = " << n1SMTow << fTTBELL << endl;
334  }
335 
336  return n1SMCrys; // Range = [1,1700]
337 }
void BuildBarrelCrysTable()
Int_t ** fT2dSMCrys
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::Get1SMTowFrom0SMEcha ( const Int_t &  i0SMEcha)

Definition at line 400 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxCrysInTow().

Referenced by Get1StexStinFrom0StexEcha(), and TEcnaWrite::WriteAsciiHisto().

401 {
402 //get tower number from electronic channel number in SM
403 
404  Int_t n1SMTow = i0SMEcha/fEcal->MaxCrysInTow()+1;
405 
406  return n1SMTow; // range = [1,68]
407 }
TEcnaParEcal * fEcal
Int_t MaxCrysInTow()
Int_t TEcnaNumbering::Get1SMTowFrom1SMCrys ( const Int_t &  n1SMCrys)

Definition at line 364 of file TEcnaNumbering.cc.

References gather_cfg::cout, fT1dSMTow, and fTTBELL.

Referenced by EcnaAnalyzer::analyze().

365 {
366 // get Tower number in SM (range [1,68]) from Crystal number in SuperModule (range [1,1700])
367 
368  Int_t n1SMtox = 0;
369 
370  if( n1SMCrys >= 1 && n1SMCrys <= fEcal->MaxCrysInSM() )
371  {
372  n1SMtox = fT1dSMTow[n1SMCrys-1];
373  }
374  else
375  {
376  n1SMtox = -1;
377  cout << "!TEcnaNumbering::Get1SMTowFrom1SMCrys(...)> Crystal number in SM out of range."
378  << " n1SMCrys = " << n1SMCrys << fTTBELL << endl;
379  }
380  return n1SMtox; // range = [1,68]
381 }
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::Get1StexCrysFrom1StexStinAnd0StinEcha ( const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  StexNumber 
)

Definition at line 2439 of file TEcnaNumbering.cc.

References fFlagSubDet, Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(), Get1SMCrysFrom1SMTowAnd0TowEcha(), and GetDeeDirViewedFromIP().

Referenced by TEcnaHistos::GetXCrysInStex(), TEcnaHistos::GetYCrysInStex(), TEcnaHistos::HistimePlot(), TEcnaHistos::HistoPlot(), TEcnaHistos::SetAllPavesViewHisto(), and TEcnaHistos::SetAllPavesViewMatrix().

2441 {
2442 // Crystal number in Stex from Stin number in Stex
2443 // and from Electronic Channel number in Stin (for the StexNumber_th Stex)
2444 // argument StexNumber used only in "EE" case
2445 
2446  Int_t n1StexCrys = (Int_t)0;
2447  if( fFlagSubDet == "EB" ){n1StexCrys = Get1SMCrysFrom1SMTowAnd0TowEcha(n1StexStin, i0StinEcha);}
2448  if( fFlagSubDet == "EE" ){TString sDeeDir = GetDeeDirViewedFromIP(StexNumber);
2449  n1StexCrys = Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(n1StexStin, i0StinEcha, sDeeDir);}
2450 
2451  return n1StexCrys;
2452 }
TString GetDeeDirViewedFromIP(const Int_t &)
Int_t Get1SMCrysFrom1SMTowAnd0TowEcha(const Int_t &, const Int_t &)
TString fFlagSubDet
Int_t Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(const Int_t &, const Int_t &, const TString)
Int_t TEcnaNumbering::Get1StexStinFrom0StexEcha ( const Int_t &  i0StexEcha)

Definition at line 2409 of file TEcnaNumbering.cc.

References fFlagSubDet, Get1DeeSCEcnaFrom0DeeEcha(), and Get1SMTowFrom0SMEcha().

Referenced by StexEchaForCons().

2410 {
2411  Int_t n1StexStin = 0;
2412 
2413  if( fFlagSubDet == "EB" ){n1StexStin = Get1SMTowFrom0SMEcha(i0StexEcha);}
2414  if( fFlagSubDet == "EE" ){n1StexStin = Get1DeeSCEcnaFrom0DeeEcha(i0StexEcha);}
2415 
2416  return n1StexStin;
2417 }
Int_t Get1DeeSCEcnaFrom0DeeEcha(const Int_t &)
Int_t Get1SMTowFrom0SMEcha(const Int_t &)
TString fFlagSubDet
Int_t TEcnaNumbering::GetDeeDirIndex ( const TString  sDeeDir)

Definition at line 2169 of file TEcnaNumbering.cc.

Referenced by Get1DeeCrysFrom1DeeSCEcnaAnd0SCEcha(), Get1DeeSCEcnaFrom1DeeCrys(), and Get1SCEchaFrom1DeeCrys().

2170 {
2171 //gives the index of the direction (left,right) of the IX axis of the Dee
2172 // looking from the interaction point (right = 0, left = 1)
2173 
2174  Int_t iDeeDir = 0; // => default
2175  if ( sDeeDir == "right" ){iDeeDir = 0;}
2176  if ( sDeeDir == "left" ){iDeeDir = 1;}
2177  return iDeeDir;
2178 }
TString TEcnaNumbering::GetDeeDirViewedFromIP ( const Int_t &  n1DeeNumber)

Definition at line 2159 of file TEcnaNumbering.cc.

Referenced by EcnaAnalyzer::analyze(), TEcnaWrite::fT2dWriteAscii(), Get1StexCrysFrom1StexStinAnd0StinEcha(), GetIXCrysInSC(), GetJYCrysInSC(), TEcnaHistos::GetXCrysInStex(), TEcnaHistos::GetXSampInStin(), TEcnaHistos::GetXStinInStas(), TEcnaHistos::ModifiedSCEchaForNotConnectedSCs(), TEcnaHistos::SCCrystalNumbering(), TEcnaHistos::SetAllPavesViewMatrix(), TEcnaHistos::ViewDeeSCNumberingPad(), and TEcnaHistos::ViewHisto().

2160 {
2161 //gives the direction (left/right) of the IX axis of the Dee
2162 // looking from the interaction point
2163 
2164  TString sDeeDir = "right"; // => default
2165  if ( (n1DeeNumber == 1) || (n1DeeNumber == 3) ){sDeeDir = "right";}
2166  if ( (n1DeeNumber == 2) || (n1DeeNumber == 4) ){sDeeDir = "left" ;}
2167  return sDeeDir;
2168 }
TString TEcnaNumbering::GetDeeHalfEndcap ( const Int_t &  n1DeeNumber)

Definition at line 2348 of file TEcnaNumbering.cc.

Referenced by GetStexHalfStas().

2349 {
2350 //gives the half-endcap of the Dee ("EE+" or "EE-")
2351 
2352  TString type = "EE-"; // => default value
2353 
2354  if ( n1DeeNumber == 1 || n1DeeNumber == 2 ){type = "EE+";}
2355  if ( n1DeeNumber == 3 || n1DeeNumber == 4 ){type = "EE-";}
2356 
2357  return type;
2358 }
type
Definition: HCALResponse.h:22
Int_t TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna ( const Int_t &  n1DeeNumber,
const Int_t &  n1DeeSCEcna 
)

Definition at line 1961 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fT2d_DeeSCCons, fTTBELL, TEcnaParEcal::MaxDeeInEE(), and TEcnaParEcal::MaxSCEcnaInDee().

Referenced by TEcnaGui::DoButtonStex(), GetDeeSCConsFrom1DeeSCEcna(), TEcnaHistos::GetOkViewHisto(), TEcnaGui::HandleMenu(), TEcnaHistos::HistimePlot(), TEcnaHistos::HistoPlot(), MaxCrysInStinEcna(), TEcnaParHistos::SetPaveSC(), TEcnaHistos::ViewDeeSCNumberingPad(), TEcnaHistos::ViewMatrix(), TEcnaHistos::ViewStin(), TEcnaGui::ViewStinCrystalNumbering(), TEcnaWrite::WriteAsciiCorrelationsBetweenSamples(), TEcnaWrite::WriteAsciiCovariancesBetweenSamples(), and TEcnaWrite::WriteAsciiHisto().

1962 {
1963 // Get SC number for Construction in Dee from SC ECNA number in Dee
1964 
1965  Int_t dee_sc_cons = -1;
1966 
1967  if( n1DeeNumber > 0 && n1DeeNumber <= fEcal->MaxDeeInEE() )
1968  {
1969  if( n1DeeSCEcna > 0 && n1DeeSCEcna <= fEcal->MaxSCEcnaInDee() )
1970  {
1971  dee_sc_cons = fT2d_DeeSCCons[n1DeeNumber-1][n1DeeSCEcna-1];
1972  }
1973  else
1974  {
1975  cout << "!TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> *** WARNING *** n1DeeSCEcna = " << n1DeeSCEcna
1976  << ". Out of range ( range = [1," << fEcal->MaxSCEcnaInDee()
1977  << "] ). Nb for const. forced to " << fT2d_DeeSCCons[n1DeeNumber-1][19] << "." << endl;
1978  dee_sc_cons = fT2d_DeeSCCons[n1DeeNumber-1][19];
1979  }
1980  }
1981  else
1982  {
1983  if( n1DeeNumber != 0 )
1984  {
1985  cout << "!TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber
1986  << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )"
1987  << fTTBELL << endl;
1988  }
1989  else
1990  {
1991  cout << "TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber
1992  << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])"
1993  << fTTBELL << endl;
1994  }
1995  }
1996  return dee_sc_cons;
1997 }
TEcnaParEcal * fEcal
Int_t MaxSCEcnaInDee()
Int_t ** fT2d_DeeSCCons
Int_t MaxDeeInEE()
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna ( const Int_t &  n1DeeNumber,
const Int_t &  n1DeeSCEcna,
const Int_t &  n1SCEcha 
)

Definition at line 1999 of file TEcnaNumbering.cc.

References GetDeeSCConsFrom1DeeSCEcna().

2001 {
2002  //.......... Get the correct SC number (for cons) for the unconnected SC's (inner border)
2003  Int_t dee_sc_cons = GetDeeSCConsFrom1DeeSCEcna(n1DeeNumber, n1DeeSCEcna);
2004 
2005  if( n1DeeSCEcna == 29 || n1DeeSCEcna == 32 )
2006  {
2007  if( n1SCEcha == 11 )
2008  {
2009  if( dee_sc_cons == 261 ){dee_sc_cons = 268;} // 261<=>14/BR
2010  if( dee_sc_cons == 112 ){dee_sc_cons = 119;} // 112<=>14/BL
2011  }
2012  if( n1SCEcha == 1 || n1SCEcha == 2 || n1SCEcha == 3 ||
2013  n1SCEcha == 6 || n1SCEcha == 7 )
2014  {
2015  if( dee_sc_cons == 178 ){dee_sc_cons = 207;} // 178<=>3/TR
2016  if( dee_sc_cons == 29 ){dee_sc_cons = 58;} // 29<=>3/TL
2017  }
2018  }
2019  return dee_sc_cons;
2020 }
Int_t GetDeeSCConsFrom1DeeSCEcna(const Int_t &, const Int_t &)
Int_t TEcnaNumbering::GetDSFrom1DeeSCEcna ( const Int_t &  n1DeeNumber,
const Int_t &  n1DeeSCEcna 
)

Definition at line 1865 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fT2d_DS, fTTBELL, TEcnaParEcal::MaxDeeInEE(), and TEcnaParEcal::MaxSCEcnaInDee().

Referenced by TEcnaParHistos::SetPaveSC(), TEcnaHistos::ViewHisto(), and TEcnaWrite::WriteAsciiHisto().

1866 {
1867 // Get Data Sector number from SC ECNA number in Dee
1868 
1869  Int_t data_sector = -1;
1870 
1871  if( n1DeeNumber > 0 && n1DeeNumber <= fEcal->MaxDeeInEE() )
1872  {
1873  if( n1DeeSCEcna > 0 && n1DeeSCEcna <= fEcal->MaxSCEcnaInDee() )
1874  {
1875  data_sector = fT2d_DS[n1DeeNumber-1][n1DeeSCEcna-1];
1876  }
1877  else
1878  {
1879  cout << "!TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> n1DeeSCEcna = " << n1DeeSCEcna
1880  << ". Out of range ( range = [1," << fEcal->MaxSCEcnaInDee() << "] )"
1881  << fTTBELL << endl;
1882  }
1883  }
1884  else
1885  {
1886  if( n1DeeNumber != 0 )
1887  {
1888  cout << "!TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber
1889  << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )"
1890  << fTTBELL << endl;
1891  }
1892  else
1893  {
1894  cout << "TEcnaNumbering::GetDSFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber
1895  << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])"
1896  << fTTBELL << endl;
1897  }
1898  }
1899  return data_sector;
1900 }
Int_t ** fT2d_DS
TEcnaParEcal * fEcal
Int_t MaxSCEcnaInDee()
Int_t MaxDeeInEE()
tuple cout
Definition: gather_cfg.py:41
Int_t TEcnaNumbering::GetDSFromFED ( const Int_t &  FEDNumber)

Definition at line 2531 of file TEcnaNumbering.cc.

2532 {
2533  Int_t EEDSNumber = 0; // DS = Data Sector
2534 
2535  if( FEDNumber >= 600 && FEDNumber <= 609 ){EEDSNumber = FEDNumber - 599;}
2536  if( FEDNumber >= 646 && FEDNumber <= 655 ){EEDSNumber = FEDNumber - 645;}
2537 
2538  return EEDSNumber;
2539 }
Int_t TEcnaNumbering::GetDSSCFrom1DeeSCEcna ( const Int_t &  n1DeeNumber,
const Int_t &  n1DeeSCEcna,
const Int_t &  n1SCEcha 
)

Definition at line 1902 of file TEcnaNumbering.cc.

Referenced by TEcnaParHistos::SetPaveSC(), TEcnaHistos::ViewDeeSCNumberingPad(), TEcnaHistos::ViewHisto(), and TEcnaWrite::WriteAsciiHisto().

1904 {
1905  //.......... Get the correct SC number for the unconnected SC's (inner border)
1906  Int_t ds_sc = GetDSSCFrom1DeeSCEcna(n1DeeNumber, n1DeeSCEcna);
1907 
1908  if( n1DeeSCEcna == 29 || n1DeeSCEcna == 32 )
1909  {
1910  if( n1SCEcha == 11 )
1911  {
1912  if( ds_sc == 14 ){ds_sc= 21;} // 14 <=> 261/BR OR 112/BL
1913  }
1914  if( n1SCEcha == 1 || n1SCEcha == 2 || n1SCEcha == 3 ||
1915  n1SCEcha == 6 || n1SCEcha == 7 )
1916  {
1917  if( ds_sc == 3 ){ds_sc = 25;} // 3 <=> 178/TR OR 29/TL
1918  }
1919  }
1920  return ds_sc;
1921 }
Int_t GetDSSCFrom1DeeSCEcna(const Int_t &, const Int_t &, const Int_t &)
Int_t TEcnaNumbering::GetDSSCFrom1DeeSCEcna ( const Int_t &  n1DeeNumber,
const Int_t &  n1DeeSCEcna 
)

Definition at line 1923 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fT2d_DSSC, fTTBELL, TEcnaParEcal::MaxDeeInEE(), and TEcnaParEcal::MaxSCEcnaInDee().

1924 {
1925 // Get SC number in Data Sector from SC Ecna number in Dee
1926 
1927  Int_t ds_sc = -1;
1928 
1929  if( n1DeeNumber > 0 && n1DeeNumber <= fEcal->MaxDeeInEE() )
1930  {
1931  if( n1DeeSCEcna > 0 && n1DeeSCEcna <= fEcal->MaxSCEcnaInDee() )
1932  {
1933  ds_sc = fT2d_DSSC[n1DeeNumber-1][n1DeeSCEcna-1]; // 25 (not 3) or 14 (not 21) if n1DeeSCEcna = 32 or 29
1934  // 25 and 14 => 5 Xtals, 3 and 21 => 1 Xtal
1935  }
1936  else
1937  {
1938  cout << "!TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> n1DeeSCEcna = " << n1DeeSCEcna
1939  << ". Out of range ( range = [1," << fEcal->MaxSCEcnaInDee() << "] )"
1940  << fTTBELL << endl;
1941  }
1942  }
1943  else
1944  {
1945  if( n1DeeNumber != 0 )
1946  {
1947  cout << "!TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> n1DeeNumber = " << n1DeeNumber
1948  << ". Out of range ( range = [1," << fEcal->MaxDeeInEE() << "] )"
1949  << fTTBELL << endl;
1950  }
1951  else
1952  {
1953  cout << "TEcnaNumbering::GetDSSCFrom1DeeSCEcna(...)> Dee = " << n1DeeNumber
1954  << ". Out of range (range = [1," << fEcal->MaxDeeInEE() << "])"
1955  << fTTBELL << endl;
1956  }
1957  }
1958  return ds_sc;
1959 }
TEcnaParEcal * fEcal
Int_t ** fT2d_DSSC
Int_t MaxSCEcnaInDee()
Int_t MaxDeeInEE()
tuple cout
Definition: gather_cfg.py:41
TString TEcnaNumbering::GetEEDeeEndcap ( const Int_t &  n1DeeNumber)

Definition at line 2138 of file TEcnaNumbering.cc.

Referenced by TEcnaHistos::SCCrystalNumbering(), and TEcnaHistos::ViewDeeSCNumberingPad().

2139 {
2140 //gives the Endcap (EE+ or EE-) of the Dee (H. Heath, CMS NOTE 2006/027)
2141 
2142  TString eetype = "EE+"; // => default
2143  if ( n1DeeNumber == 1 || n1DeeNumber == 2 ){eetype = "EE+";}
2144  if ( n1DeeNumber == 3 || n1DeeNumber == 4 ){eetype = "EE-";}
2145  return eetype;
2146 }
TString TEcnaNumbering::GetEEDeeType ( const Int_t &  n1DeeNumber)

Definition at line 2147 of file TEcnaNumbering.cc.

Referenced by TEcnaHistos::DeeSCNumbering(), GetXDirectionEE(), GetYDirectionEE(), TEcnaHistos::SCCrystalNumbering(), TEcnaParHistos::SetPaveStex(), and TEcnaHistos::ViewMatrix().

2148 {
2149 //gives the EE +/- and Forward/Near of the Dee (H. Heath, CMS NOTE 2006/027)
2150 
2151  TString type = "EE+F"; // => default
2152  if ( n1DeeNumber == 1 ){type = "EE+F";}
2153  if ( n1DeeNumber == 2 ){type = "EE+N";}
2154  if ( n1DeeNumber == 3 ){type = "EE-N";}
2155  if ( n1DeeNumber == 4 ){type = "EE-F";}
2156  return type;
2157 }
type
Definition: HCALResponse.h:22
Double_t TEcnaNumbering::GetEta ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow,
const Int_t &  i0TowEcha 
)

Definition at line 477 of file TEcnaNumbering.cc.

References gather_cfg::cout, eta(), fCodeChNumberingLvrbBot, fCodeChNumberingLvrbTop, fEcal, fTTBELL, GetSMHalfBarrel(), GetTowerLvrbType(), TEcnaParEcal::MaxCrysEtaInTow(), TEcnaParEcal::MaxSMInEB(), and TEcnaParEcal::MaxTowEtaInSM().

Referenced by TEcnaHistos::TowerCrystalNumbering(), TEcnaHistos::ViewSMTowerNumberingPad(), and TEcnaWrite::WriteAsciiHisto().

479 {
480 //Gives Eta for a given (n1EBSM, n1SMTow, i0TowEcha)
481 
482  Double_t eta = (Double_t)0.;
483 
484  Int_t max_crys_eta_in_tower = fEcal->MaxCrysEtaInTow();
485  Int_t max_tow_eta_in_sm = fEcal->MaxTowEtaInSM();
486  Int_t max_sm_in_barrel = fEcal->MaxSMInEB();
487 
488  if ( n1EBSM >= 1 && n1EBSM <= max_sm_in_barrel )
489  {
490  for (Int_t i_sm_tow_eta = 0; i_sm_tow_eta < max_tow_eta_in_sm; i_sm_tow_eta++)
491  {
492  Int_t i_crys_eta_min = (Int_t)(1 + i_sm_tow_eta*(max_crys_eta_in_tower-1));
493  Int_t i_crys_eta_max = (Int_t)((i_sm_tow_eta+1)*(max_crys_eta_in_tower-1));
494  Int_t i_crys_eta = (Int_t)(i_sm_tow_eta*max_crys_eta_in_tower);
495  // = 0,..,16 -> last xtal in eta for the previous tower
496  Double_t d_echa_eta = (Double_t)(i0TowEcha/max_crys_eta_in_tower); // = 0,1,2,3,4
497 
498  if ( n1SMTow >= i_crys_eta_min && n1SMTow <= i_crys_eta_max )
499  {
501  {eta = (Double_t)(i_crys_eta) + d_echa_eta + 1;}
503  {eta = (Double_t)(i_crys_eta+max_crys_eta_in_tower)-d_echa_eta;}
504  }
505  }
506  if ( GetSMHalfBarrel(n1EBSM) == "EB-" ){eta = - eta;}
507  }
508  else
509  {
510  cout << "TEcnaNumbering::GetEta(...)> SM = " << n1EBSM
511  << ". Out of range (range = [1," << fEcal->MaxSMInEB() << "])"
512  << fTTBELL << endl;
513  }
514  return eta;
515 }
Int_t MaxCrysEtaInTow()
TString GetSMHalfBarrel(const Int_t &)
T eta() const
TString GetTowerLvrbType(const Int_t &)
TEcnaParEcal * fEcal
Int_t MaxTowEtaInSM()
Int_t MaxSMInEB()
tuple cout
Definition: gather_cfg.py:41
TString fCodeChNumberingLvrbBot
TString fCodeChNumberingLvrbTop
Double_t TEcnaNumbering::GetEtaMax ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 543 of file TEcnaNumbering.cc.

References fEcal, GetSMHalfBarrel(), TEcnaParEcal::MaxCrysEtaInTow(), and TEcnaParEcal::MaxTowEtaInSM().

Referenced by GetIEtaMax().

544 {
545 //Gives EtaMax for a given Tower
546 
547  Int_t max_tow_eta_in_sm = fEcal->MaxTowEtaInSM();
548  Int_t max_crys_eta_in_tower = fEcal->MaxCrysEtaInTow();
549 
550  Double_t eta_max = (max_crys_eta_in_tower-1);
551 
552  for (Int_t i_sm_tow_eta = 0; i_sm_tow_eta < max_tow_eta_in_sm; i_sm_tow_eta++)
553  {
554  Int_t i_crys_eta_min = (Int_t)(1 + i_sm_tow_eta*(max_crys_eta_in_tower-1));
555  Int_t i_crys_eta_max = (Int_t)((i_sm_tow_eta+1)*(max_crys_eta_in_tower-1));
556  Int_t i_crys_eta = (Int_t)(i_sm_tow_eta*max_crys_eta_in_tower);
557 
558  if ( n1SMTow >= i_crys_eta_min && n1SMTow <= i_crys_eta_max )
559  {
560  if (GetSMHalfBarrel(n1EBSM) == "EB+")
561  {eta_max = (Double_t)(i_crys_eta + max_crys_eta_in_tower);}
562  if (GetSMHalfBarrel(n1EBSM) == "EB-")
563  {eta_max = -(Double_t)i_crys_eta;}
564  }
565  }
566 
567  return eta_max;
568 }
Int_t MaxCrysEtaInTow()
TString GetSMHalfBarrel(const Int_t &)
TEcnaParEcal * fEcal
Int_t MaxTowEtaInSM()
Double_t TEcnaNumbering::GetEtaMin ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 517 of file TEcnaNumbering.cc.

References fEcal, GetSMHalfBarrel(), TEcnaParEcal::MaxCrysEtaInTow(), and TEcnaParEcal::MaxTowEtaInSM().

Referenced by GetIEtaMin().

518 {
519 //Gives EtaMin for a given Tower
520 
521  Int_t max_tow_eta_in_sm = fEcal->MaxTowEtaInSM();
522  Int_t max_crys_eta_in_tower = fEcal->MaxCrysEtaInTow();
523 
524  Double_t eta_min = (Double_t)0.;
525 
526  for (Int_t i_sm_tow_eta = 0; i_sm_tow_eta < max_tow_eta_in_sm; i_sm_tow_eta++)
527  {
528  Int_t i_crys_eta_min = (Int_t)(1 + i_sm_tow_eta*(max_crys_eta_in_tower-1));
529  Int_t i_crys_eta_max = (Int_t)((i_sm_tow_eta+1)*(max_crys_eta_in_tower-1));
530  Int_t i_crys_eta = (Int_t)(i_sm_tow_eta*max_crys_eta_in_tower);
531 
532  if ( n1SMTow >= i_crys_eta_min && n1SMTow <= i_crys_eta_max )
533  {
534  if (GetSMHalfBarrel(n1EBSM) == "EB+")
535  {eta_min = (Double_t)i_crys_eta;}
536  if (GetSMHalfBarrel(n1EBSM) == "EB-")
537  {eta_min = -(Double_t)(i_crys_eta + max_crys_eta_in_tower);}
538  }
539  }
540  return eta_min;
541 }
Int_t MaxCrysEtaInTow()
TString GetSMHalfBarrel(const Int_t &)
TEcnaParEcal * fEcal
Int_t MaxTowEtaInSM()
Int_t TEcnaNumbering::GetHashedNumberFromIEtaAndIPhi ( const Int_t &  IEta,
const Int_t &  IPhi 
)

Definition at line 422 of file TEcnaNumbering.cc.

Referenced by TEcnaHistos::TowerCrystalNumbering().

423 {
424  Int_t Hashed = 0;
425 
426  if( IEta > 0 ){Hashed = (85 + IEta - 1)*360 + IPhi - 1;}
427  if( IEta < 0 ){Hashed = (85 + IEta)*360 + IPhi - 1;}
428 
429  return Hashed;
430 }
Int_t TEcnaNumbering::GetIEtaFromHashed ( const Int_t &  Hashed,
const Int_t &  SMNumber 
)

Definition at line 432 of file TEcnaNumbering.cc.

References GetSMHalfBarrel().

433 {
434  Int_t IEta = 0;
435 
436  if( GetSMHalfBarrel(SMNumber) == "EB+" ){IEta = Hashed/360 - 85 + 1;}
437  if( GetSMHalfBarrel(SMNumber) == "EB-" ){IEta = 85 + Hashed/360;}
438 
439  return IEta;
440 }
TString GetSMHalfBarrel(const Int_t &)
Double_t TEcnaNumbering::GetIEtaMax ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 584 of file TEcnaNumbering.cc.

References GetEtaMax(), and GetSMHalfBarrel().

Referenced by GetIEtaMax(), GetIHocoMax(), TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

585 {
586 //Gives IEtaMax for a given (n1EBSM, n1SMTow)
587 
588  Double_t i_eta_max = (Int_t)0.;
589 
590  if(GetSMHalfBarrel(n1EBSM) == "EB+")
591  {i_eta_max = (Double_t)GetEtaMax(n1EBSM, n1SMTow)+(Double_t)0.5;}
592  if(GetSMHalfBarrel(n1EBSM) == "EB-")
593  {i_eta_max = (Double_t)GetEtaMax(n1EBSM, n1SMTow)-(Double_t)0.5;}
594 
595  return i_eta_max;
596 }
Double_t GetEtaMax(const Int_t &, const Int_t &)
TString GetSMHalfBarrel(const Int_t &)
Double_t TEcnaNumbering::GetIEtaMax ( const Int_t &  n1EBSM)

Definition at line 615 of file TEcnaNumbering.cc.

References fEcal, GetIEtaMax(), GetSMHalfBarrel(), and TEcnaParEcal::MaxTowInSM().

616 {
617 //Gives IEtaMax for a given (n1EBSM)
618 
619  Double_t i_eta_max = (Int_t)0.;
620 
621  Int_t n1SMTowPlus = (Int_t)fEcal->MaxTowInSM();
622  Int_t n1SMTowMinus = (Int_t)1;
623 
624  if( GetSMHalfBarrel(n1EBSM) == "EB+")
625  {i_eta_max = (Double_t)GetIEtaMax(n1EBSM, n1SMTowPlus );}
626  if( GetSMHalfBarrel(n1EBSM) == "EB-")
627  {i_eta_max = (Double_t)GetIEtaMax(n1EBSM, n1SMTowMinus);}
628 
629  return i_eta_max;
630 }
TString GetSMHalfBarrel(const Int_t &)
TEcnaParEcal * fEcal
Double_t GetIEtaMax(const Int_t &, const Int_t &)
Int_t MaxTowInSM()
Double_t TEcnaNumbering::GetIEtaMin ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 570 of file TEcnaNumbering.cc.

References GetEtaMin(), and GetSMHalfBarrel().

Referenced by GetIEtaMin(), GetIHocoMin(), TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

571 {
572 //Gives IEtaMin for a given (n1EBSM, n1SMTow)
573 
574  Double_t i_eta_min = (Int_t)0.;
575 
576  if(GetSMHalfBarrel(n1EBSM) == "EB+")
577  {i_eta_min = (Double_t)GetEtaMin(n1EBSM, n1SMTow)+(Double_t)0.5;}
578  if(GetSMHalfBarrel(n1EBSM) == "EB-")
579  {i_eta_min = (Double_t)GetEtaMin(n1EBSM, n1SMTow)-(Double_t)0.5;}
580 
581  return i_eta_min;
582 }
TString GetSMHalfBarrel(const Int_t &)
Double_t GetEtaMin(const Int_t &, const Int_t &)
Double_t TEcnaNumbering::GetIEtaMin ( const Int_t &  n1EBSM)

Definition at line 598 of file TEcnaNumbering.cc.

References fEcal, GetIEtaMin(), GetSMHalfBarrel(), and TEcnaParEcal::MaxTowInSM().

599 {
600 //Gives IEtaMin for a given (n1EBSM)
601 
602  Double_t i_eta_min = (Int_t)0.;
603 
604  Int_t n1SMTowPlus = (Int_t)1;
605  Int_t n1SMTowMinus = (Int_t)fEcal->MaxTowInSM();
606 
607  if( GetSMHalfBarrel(n1EBSM) == "EB+" )
608  {i_eta_min = (Double_t)GetIEtaMin(n1EBSM, n1SMTowPlus );}
609  if( GetSMHalfBarrel(n1EBSM) == "EB-" )
610  {i_eta_min = (Double_t)GetIEtaMin(n1EBSM, n1SMTowMinus);}
611 
612  return i_eta_min;
613 }
TString GetSMHalfBarrel(const Int_t &)
TEcnaParEcal * fEcal
Double_t GetIEtaMin(const Int_t &, const Int_t &)
Int_t MaxTowInSM()
Double_t TEcnaNumbering::GetIHocoMax ( const Int_t &  Stex,
const Int_t &  StexStin 
)

Definition at line 2467 of file TEcnaNumbering.cc.

References fFlagSubDet, GetIEtaMax(), and GetIIXMax().

2468 {
2469  Double_t IHocoMax = (Double_t)0.;
2470  if(fFlagSubDet == "EB" ){IHocoMax = GetIEtaMax(Stex, StexStin);}
2471  if(fFlagSubDet == "EE" ){IHocoMax = GetIIXMax(StexStin);}
2472  return IHocoMax;
2473 }
Double_t GetIIXMax()
TString fFlagSubDet
Double_t GetIEtaMax(const Int_t &, const Int_t &)
Double_t TEcnaNumbering::GetIHocoMin ( const Int_t &  Stex,
const Int_t &  StexStin 
)

Definition at line 2459 of file TEcnaNumbering.cc.

References fFlagSubDet, GetIEtaMin(), and GetIIXMin().

2460 {
2461  Double_t IHocoMin = (Double_t)0.;
2462  if(fFlagSubDet == "EB" ){IHocoMin = GetIEtaMin(Stex, StexStin);}
2463  if(fFlagSubDet == "EE" ){IHocoMin = GetIIXMin(StexStin);}
2464  return IHocoMin;
2465 }
Double_t GetIEtaMin(const Int_t &, const Int_t &)
TString fFlagSubDet
Double_t GetIIXMin()
Double_t TEcnaNumbering::GetIIXMax ( const Int_t &  DeeSC)

Definition at line 2276 of file TEcnaNumbering.cc.

References fEcal, TEcnaParEcal::MaxCrysIXInSC(), and TEcnaParEcal::MaxSCIYInDee().

Referenced by TEcnaHistos::EEGridAxis(), and TEcnaHistos::ViewSCGrid().

2277 {
2278 //Gives IIXMax for a given DeeSC , unit = crystal
2279 
2280  Double_t IX_max = ((Double_t)((DeeSC-1)/fEcal->MaxSCIYInDee())+1.)*fEcal->MaxCrysIXInSC();
2281  return IX_max;
2282 }
Int_t MaxSCIYInDee()
TEcnaParEcal * fEcal
Int_t MaxCrysIXInSC()
Double_t TEcnaNumbering::GetIIXMax ( )

Definition at line 2292 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxSCIXInDee().

Referenced by GetIHocoMax().

2293 {
2294 //Gives IIXMax for Dee , unit = Super-crystal
2295 
2296  Double_t i_IX_max = (Int_t)fEcal->MaxSCIXInDee();
2297  return i_IX_max;
2298 }
Int_t MaxSCIXInDee()
TEcnaParEcal * fEcal
Double_t TEcnaNumbering::GetIIXMin ( const Int_t &  DeeSC)

Definition at line 2268 of file TEcnaNumbering.cc.

References fEcal, TEcnaParEcal::MaxCrysIXInSC(), and TEcnaParEcal::MaxSCIYInDee().

Referenced by TEcnaHistos::EEGridAxis(), and TEcnaHistos::ViewSCGrid().

2269 {
2270 //Gives IIXMin for a given DeeSC , unit = crystal
2271 
2272  Double_t IX_min = (Double_t)((DeeSC-1)/fEcal->MaxSCIYInDee())*fEcal->MaxCrysIXInSC() + 1.;
2273  return IX_min;
2274 }
Int_t MaxSCIYInDee()
TEcnaParEcal * fEcal
Int_t MaxCrysIXInSC()
Double_t TEcnaNumbering::GetIIXMin ( )

Definition at line 2284 of file TEcnaNumbering.cc.

Referenced by GetIHocoMin().

2285 {
2286 //Gives IIXMin for Dee , unit = Super-crystal
2287 
2288  Double_t i_IX_min = (Int_t)1.;
2289  return i_IX_min;
2290 }
Int_t TEcnaNumbering::GetIPhiFromHashed ( const Int_t &  Hashed)

Definition at line 442 of file TEcnaNumbering.cc.

443 {
444  Int_t IPhi = Hashed%360 + 1;
445 
446  return IPhi;
447 }
Int_t TEcnaNumbering::GetIXCrysInDee ( const Int_t &  n1DeeNumber,
const Int_t &  DeeSC,
const Int_t &  i0SCEcha 
)

Definition at line 2207 of file TEcnaNumbering.cc.

References fEcal, GetIXCrysInSC(), GetIXSCInDee(), and TEcnaParEcal::MaxCrysIXInSC().

Referenced by TEcnaHistos::GetXCrysInStex(), and TEcnaWrite::WriteAsciiHisto().

2209 {
2210 //Gives Crys IX in Dee for a given (n1DeeNumber, DeeSC, i0SCEcha)
2211 
2212  Int_t IXCrysInDee =
2213  (GetIXSCInDee(DeeSC)-1)*fEcal->MaxCrysIXInSC() +
2214  GetIXCrysInSC(n1DeeNumber, DeeSC, i0SCEcha);
2215  return IXCrysInDee; // possible values: 1,2,...,49,50
2216 }
Int_t GetIXSCInDee(const Int_t &)
TEcnaParEcal * fEcal
Int_t MaxCrysIXInSC()
Int_t GetIXCrysInSC(const Int_t &, const Int_t &, const Int_t &)
Int_t TEcnaNumbering::GetIXCrysInSC ( const Int_t &  n1DeeNumber,
const Int_t &  DeeSC,
const Int_t &  i0SCEcha 
)

Definition at line 2187 of file TEcnaNumbering.cc.

References fT2d_ich_IX, GetDeeDirViewedFromIP(), GetSCQuadFrom1DeeSCEcna(), and GetSCQuadTypeIndex().

Referenced by GetIXCrysInDee(), and TEcnaHistos::GetXSampInStin().

2189 {
2190 //Gives Crys IX in SC for a given (n1DeeNumber, DeeSC, i0SCEcha)
2191 
2192  TString SCQuadType = GetSCQuadFrom1DeeSCEcna(DeeSC);
2193  TString sDeeDir = GetDeeDirViewedFromIP(n1DeeNumber);
2194  Int_t type_index = GetSCQuadTypeIndex(SCQuadType, sDeeDir);
2195  Int_t IXCrysInSC = fT2d_ich_IX[type_index][i0SCEcha+1] + 1;
2196  return IXCrysInSC; // possible values: 1,2,3,4,5
2197 }
TString GetSCQuadFrom1DeeSCEcna(const Int_t &)
TString GetDeeDirViewedFromIP(const Int_t &)
Int_t ** fT2d_ich_IX
Int_t GetSCQuadTypeIndex(const TString, const TString)
Int_t TEcnaNumbering::GetIXSCInDee ( const Int_t &  DeeSC)

Definition at line 2199 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxSCIYInDee().

Referenced by GetIXCrysInDee().

2200 {
2201 //Gives SC IX in Dee for a given (DeeSC)
2202 
2203  Int_t IXSCInDee = (DeeSC-1)/fEcal->MaxSCIYInDee() + 1;
2204  return IXSCInDee; // possible values: 1,2,...,9,10
2205 }
Int_t MaxSCIYInDee()
TEcnaParEcal * fEcal
Double_t TEcnaNumbering::GetJIYMax ( const Int_t &  n1DeeNumber,
const Int_t &  DeeSC 
)

Definition at line 2317 of file TEcnaNumbering.cc.

References fEcal, TEcnaParEcal::MaxCrysIYInSC(), and TEcnaParEcal::MaxSCIYInDee().

Referenced by TEcnaHistos::EEGridAxis(), GetJVecoMax(), GetVecoMax(), and TEcnaHistos::ViewSCGrid().

2318 {
2319 //Gives JIYMax for a given Super-Crystal
2320 
2321  Double_t IY_DeeSC = DeeSC%fEcal->MaxSCIYInDee();
2322  if( IY_DeeSC == 0 ){IY_DeeSC = fEcal->MaxSCIYInDee();}
2323 
2324  Double_t j_IY_max = IY_DeeSC*fEcal->MaxCrysIYInSC();
2325 
2326  return j_IY_max;
2327 }
Int_t MaxSCIYInDee()
TEcnaParEcal * fEcal
Int_t MaxCrysIYInSC()
Double_t TEcnaNumbering::GetJIYMax ( const Int_t &  n1DeeNumber)

Definition at line 2339 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxSCIYInDee().

2340 {
2341 //Gives JIYMax for a given Dee
2342 
2343  Double_t j_IY_max = (Double_t)fEcal->MaxSCIYInDee();
2344 
2345  return j_IY_max;
2346 }
Int_t MaxSCIYInDee()
TEcnaParEcal * fEcal
Double_t TEcnaNumbering::GetJIYMin ( const Int_t &  n1DeeNumber,
const Int_t &  DeeSC 
)

Definition at line 2305 of file TEcnaNumbering.cc.

References fEcal, TEcnaParEcal::MaxCrysIYInSC(), and TEcnaParEcal::MaxSCIYInDee().

Referenced by TEcnaHistos::EEGridAxis(), GetJVecoMin(), GetVecoMin(), and TEcnaHistos::ViewSCGrid().

2306 {
2307 //Gives JIYMin for a given Super-Crystal
2308 
2309  Double_t IY_DeeSC = DeeSC%fEcal->MaxSCIYInDee();
2310  if( IY_DeeSC == 0. ){IY_DeeSC = fEcal->MaxSCIYInDee();}
2311 
2312  Double_t j_IY_min = (IY_DeeSC-1)*fEcal->MaxCrysIYInSC() + 1.;
2313 
2314  return j_IY_min;
2315 }
Int_t MaxSCIYInDee()
TEcnaParEcal * fEcal
Int_t MaxCrysIYInSC()
Double_t TEcnaNumbering::GetJIYMin ( const Int_t &  n1DeeNumber)

Definition at line 2330 of file TEcnaNumbering.cc.

2331 {
2332 //Gives JIYMin for a given Dee
2333 
2334  Double_t j_IY_min = (Double_t)1.;
2335 
2336  return j_IY_min;
2337 }
Double_t TEcnaNumbering::GetJPhiMax ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 827 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxCrysPhiInTow().

Referenced by GetJVecoMax(), TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

828 {
829 //Gives JPhiMax for a given Tower
830 
831  Double_t j_phi_max = (Double_t)20.;
832  Int_t max_crys_phi_in_tower = fEcal->MaxCrysPhiInTow();
833  Int_t rest_temp =(Int_t)(n1SMTow%(max_crys_phi_in_tower-1));
834 
835  if ( rest_temp == 1 ){j_phi_max = (Double_t) 5. + (Double_t)0.5;}
836  if ( rest_temp == 2 ){j_phi_max = (Double_t)10. + (Double_t)0.5;}
837  if ( rest_temp == 3 ){j_phi_max = (Double_t)15. + (Double_t)0.5;}
838  if ( rest_temp == 0 ){j_phi_max = (Double_t)20. + (Double_t)0.5;}
839 
840  return j_phi_max;
841 }
Int_t MaxCrysPhiInTow()
TEcnaParEcal * fEcal
Double_t TEcnaNumbering::GetJPhiMax ( const Int_t &  n1EBSM)

Definition at line 853 of file TEcnaNumbering.cc.

854 {
855 //Gives JPhiMax for a given SuperModule
856 
857  Double_t j_phi_max = (Double_t)20. + (Double_t)0.5;
858 
859  return j_phi_max;
860 }
Double_t TEcnaNumbering::GetJPhiMin ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 811 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxCrysPhiInTow().

Referenced by GetJVecoMin(), TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

812 {
813 //Gives JPhiMin for a given Tower
814 
815  Double_t j_phi_min = (Double_t)1.;
816  Int_t max_crys_phi_in_tower = fEcal->MaxCrysPhiInTow();
817  Int_t rest_temp =(Int_t)(n1SMTow%(max_crys_phi_in_tower-1));
818 
819  if ( rest_temp == 1 ){j_phi_min = (Double_t) 1. - (Double_t)0.5;}
820  if ( rest_temp == 2 ){j_phi_min = (Double_t) 6. - (Double_t)0.5;}
821  if ( rest_temp == 3 ){j_phi_min = (Double_t)11. - (Double_t)0.5;}
822  if ( rest_temp == 0 ){j_phi_min = (Double_t)16. - (Double_t)0.5;}
823 
824  return j_phi_min;
825 }
Int_t MaxCrysPhiInTow()
TEcnaParEcal * fEcal
Double_t TEcnaNumbering::GetJPhiMin ( const Int_t &  n1EBSM)

Definition at line 844 of file TEcnaNumbering.cc.

845 {
846 //Gives JPhiMin for a given SuperModule
847 
848  Double_t j_phi_min = (Double_t)1. - (Double_t)0.5;
849 
850  return j_phi_min;
851 }
Double_t TEcnaNumbering::GetJVecoMax ( const Int_t &  Stex,
const Int_t &  StexStin 
)

Definition at line 2498 of file TEcnaNumbering.cc.

References fFlagSubDet, GetJIYMax(), and GetJPhiMax().

2499 {
2500  Double_t JVecoMax = (Double_t)0.;
2501  if(fFlagSubDet == "EB" ){JVecoMax = GetJPhiMax(Stex, StexStin);}
2502  if(fFlagSubDet == "EE" ){JVecoMax = GetJIYMax(Stex, StexStin);} // not used
2503  return JVecoMax;
2504 }
Double_t GetJPhiMax(const Int_t &, const Int_t &)
Double_t GetJIYMax(const Int_t &, const Int_t &)
TString fFlagSubDet
Double_t TEcnaNumbering::GetJVecoMin ( const Int_t &  Stex,
const Int_t &  StexStin 
)

Definition at line 2491 of file TEcnaNumbering.cc.

References fFlagSubDet, GetJIYMin(), and GetJPhiMin().

2492 {
2493  Double_t JVecoMin = (Double_t)0.;
2494  if(fFlagSubDet == "EB" ){JVecoMin = GetJPhiMin(Stex, StexStin);}
2495  if(fFlagSubDet == "EE" ){JVecoMin = GetJIYMin(Stex, StexStin);} // not used
2496  return JVecoMin;
2497 }
Double_t GetJPhiMin(const Int_t &, const Int_t &)
Double_t GetJIYMin(const Int_t &, const Int_t &)
TString fFlagSubDet
Int_t TEcnaNumbering::GetJYCrysInDee ( const Int_t &  n1DeeNumber,
const Int_t &  DeeSC,
const Int_t &  i0SCEcha 
)

Definition at line 2238 of file TEcnaNumbering.cc.

References fEcal, GetJYCrysInSC(), GetJYSCInDee(), and TEcnaParEcal::MaxCrysIYInSC().

Referenced by TEcnaHistos::GetYCrysInStex(), and TEcnaWrite::WriteAsciiHisto().

2240 {
2241 //Gives Crys JY in Dee for a given (n1DeeNumber, DeeSC, i0SCEcha)
2242 
2243  Int_t JYCrysInDee =
2244  (GetJYSCInDee(DeeSC)-1)*fEcal->MaxCrysIYInSC() +
2245  GetJYCrysInSC(n1DeeNumber, DeeSC, i0SCEcha);
2246  return JYCrysInDee; // possible values: 1,2,...,99,100
2247 }
Int_t GetJYSCInDee(const Int_t &)
TEcnaParEcal * fEcal
Int_t MaxCrysIYInSC()
Int_t GetJYCrysInSC(const Int_t &, const Int_t &, const Int_t &)
Int_t TEcnaNumbering::GetJYCrysInSC ( const Int_t &  n1DeeNumber,
const Int_t &  DeeSC,
const Int_t &  i0SCEcha 
)

Definition at line 2218 of file TEcnaNumbering.cc.

References fT2d_jch_JY, GetDeeDirViewedFromIP(), GetSCQuadFrom1DeeSCEcna(), and GetSCQuadTypeIndex().

Referenced by GetJYCrysInDee(), and TEcnaHistos::GetYSampInStin().

2220 {
2221 //Gives Crys JY in SC for a given (n1DeeNumber, DeeSC, i0SCEcha)
2222 
2223  TString SCQuadType = GetSCQuadFrom1DeeSCEcna(DeeSC);
2224  TString sDeeDir = GetDeeDirViewedFromIP(n1DeeNumber);
2225  Int_t type_index = GetSCQuadTypeIndex(SCQuadType, sDeeDir);
2226  Int_t JYCrysInSC = fT2d_jch_JY[type_index][i0SCEcha+1] + 1;
2227  return JYCrysInSC; // possible values: 1,2,3,4,5
2228 }
TString GetSCQuadFrom1DeeSCEcna(const Int_t &)
TString GetDeeDirViewedFromIP(const Int_t &)
Int_t ** fT2d_jch_JY
Int_t GetSCQuadTypeIndex(const TString, const TString)
TString TEcnaNumbering::GetJYDirectionEB ( const Int_t &  SMNumber)

Definition at line 890 of file TEcnaNumbering.cc.

References GetSMHalfBarrel().

Referenced by TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

891 {
892  TString jydirection = "-x"; // DEFAULT
893 
894  if( GetSMHalfBarrel(SMNumber) == "EB+" ){jydirection = "x";}
895  if( GetSMHalfBarrel(SMNumber) == "EB-" ){jydirection = "-x";}
896 
897  return jydirection;
898 }
TString GetSMHalfBarrel(const Int_t &)
TString TEcnaNumbering::GetJYDirectionEE ( const Int_t &  n1DeeNumber)

Definition at line 2387 of file TEcnaNumbering.cc.

Referenced by TEcnaHistos::ViewSCGrid().

2388 {
2389  TString jydirection = "x"; // ALWAYS IN THIS CASE
2390  return jydirection;
2391 }
Int_t TEcnaNumbering::GetJYSCInDee ( const Int_t &  DeeSC)

Definition at line 2230 of file TEcnaNumbering.cc.

References fEcal, and TEcnaParEcal::MaxSCIYInDee().

Referenced by GetJYCrysInDee().

2231 {
2232 //Gives SC JY in Dee for a given (n1DeeNumber, DeeSC, i0SCEcha)
2233 
2234  Int_t JYSCInDee = (DeeSC-1)%fEcal->MaxSCIYInDee() + 1;
2235  return JYSCInDee; // possible values: 1,2,...,19,20
2236 }
Int_t MaxSCIYInDee()
TEcnaParEcal * fEcal
Int_t TEcnaNumbering::GetMaxSCInDS ( const Int_t &  DeeDS)

Definition at line 2249 of file TEcnaNumbering.cc.

Referenced by TEcnaHistos::GetDSOffset(), TEcnaHistos::HistoPlot(), and TEcnaHistos::ViewHisto().

2250 {
2251 // Gives the number of SC's in Data Sector DeeDS
2252 
2253  Int_t nb_of_sc = -1;
2254  if( DeeDS == 1 || DeeDS == 9 ){nb_of_sc = 33;}
2255  if( DeeDS == 2 || DeeDS == 8 ){nb_of_sc = 32;}
2256  if( DeeDS == 3 || DeeDS == 7 ){nb_of_sc = 34;}
2257  if( DeeDS == 4 || DeeDS == 6 ){nb_of_sc = 33;}
2258  if( DeeDS == 5){nb_of_sc = 34;}
2259  return nb_of_sc;
2260 }
Double_t TEcnaNumbering::GetPhi ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow,
const Int_t &  i0TowEcha 
)

Definition at line 711 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fTTBELL, GetPhiInSM(), GetSMCentralPhi(), TEcnaParEcal::MaxSMInEB(), and phi.

Referenced by TEcnaHistos::TowerCrystalNumbering(), and TEcnaHistos::ViewSMTowerNumberingPad().

713 {
714 //Gives Phi for a given (n1EBSM, n1SMTow, i0TowEcha)
715 
716  Double_t phi = (Double_t)0.;
717 
718  if ( n1EBSM >= 1 && n1EBSM <= fEcal->MaxSMInEB() )
719  {
720  Double_t phiInSM = GetPhiInSM(n1EBSM, n1SMTow, i0TowEcha);
721  Double_t phi_start = GetSMCentralPhi(n1EBSM);
722 
723  phi = 20 - phiInSM + phi_start -(Double_t)10.;
724  }
725  else
726  {
727  cout << "TEcnaNumbering::GetPhi(...)> SM = " << n1EBSM
728  << ". Out of range (range = [1," << fEcal->MaxSMInEB() << "])"
729  << fTTBELL << endl;
730  }
731  return phi;
732 }
TEcnaParEcal * fEcal
Double_t GetPhiInSM(const Int_t &, const Int_t &, const Int_t &)
Int_t MaxSMInEB()
tuple cout
Definition: gather_cfg.py:41
Double_t GetSMCentralPhi(const Int_t &)
Definition: DDAxes.h:10
Double_t TEcnaNumbering::GetPhiInSM ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow,
const Int_t &  i0TowEcha 
)

Definition at line 650 of file TEcnaNumbering.cc.

References gather_cfg::cout, fCodeChNumberingLvrbBot, fCodeChNumberingLvrbTop, fEcal, fTTBELL, GetTowerLvrbType(), TEcnaParEcal::MaxCrysPhiInTow(), and TEcnaParEcal::MaxSMInEB().

Referenced by GetPhi(), and TEcnaWrite::WriteAsciiHisto().

652 {
653 //Gives Phi for a given (n1EBSM, n1SMTow, i0TowEcha)
654 
655  Double_t phi_in_SM = (Double_t)0.;
656 
657  Int_t rest_temp =(Int_t)(n1SMTow%(fEcal->MaxCrysPhiInTow()-1)); // "Phi" of the tower = 1,2,3,0
658 
659  if ( n1EBSM >= 1 && n1EBSM <= fEcal->MaxSMInEB() )
660  {
661  if( rest_temp == 1 ){phi_in_SM = (Double_t)15.;}
662  if( rest_temp == 2 ){phi_in_SM = (Double_t)10.;}
663  if( rest_temp == 3 ){phi_in_SM = (Double_t)5.;}
664  if( rest_temp == 0 ){phi_in_SM = (Double_t)0.;}
665 
667  {
668  if( i0TowEcha == 4 || i0TowEcha == 5 || i0TowEcha == 14 || i0TowEcha == 15 || i0TowEcha == 24 )
669  {phi_in_SM = phi_in_SM + 0;}
670 
671  if( i0TowEcha == 3 || i0TowEcha == 6 || i0TowEcha == 13 || i0TowEcha == 16 || i0TowEcha == 23 )
672  {phi_in_SM = phi_in_SM + 1;}
673 
674  if( i0TowEcha == 2 || i0TowEcha == 7 || i0TowEcha == 12 || i0TowEcha == 17 || i0TowEcha == 22 )
675  {phi_in_SM = phi_in_SM + 2;}
676 
677  if( i0TowEcha == 1 || i0TowEcha == 8 || i0TowEcha == 11 || i0TowEcha == 18 || i0TowEcha == 21 )
678  {phi_in_SM = phi_in_SM + 3;}
679 
680  if( i0TowEcha == 0 || i0TowEcha == 9 || i0TowEcha == 10 || i0TowEcha == 19 || i0TowEcha == 20 )
681  {phi_in_SM = phi_in_SM + 4;}
682  }
684  {
685  if( i0TowEcha == 20 || i0TowEcha == 19 || i0TowEcha == 10 || i0TowEcha == 9 || i0TowEcha == 0 )
686  {phi_in_SM = phi_in_SM + 0;}
687 
688  if( i0TowEcha == 21 || i0TowEcha == 18 || i0TowEcha == 11 || i0TowEcha == 8 || i0TowEcha == 1 )
689  {phi_in_SM = phi_in_SM + 1;}
690 
691  if( i0TowEcha == 22 || i0TowEcha == 17 || i0TowEcha == 12 || i0TowEcha == 7 || i0TowEcha == 2 )
692  {phi_in_SM = phi_in_SM + 2;}
693 
694  if( i0TowEcha == 23 || i0TowEcha == 16 || i0TowEcha == 13 || i0TowEcha == 6 || i0TowEcha == 3 )
695  {phi_in_SM = phi_in_SM + 3;}
696 
697  if( i0TowEcha == 24 || i0TowEcha == 15 || i0TowEcha == 14 || i0TowEcha == 5 || i0TowEcha == 4 )
698  {phi_in_SM = phi_in_SM + 4;}
699  }
700  }
701  else
702  {
703  cout << "TEcnaNumbering::GetPhiInSM(...)> SM = " << n1EBSM
704  << ". Out of range (range = [1," << fEcal->MaxSMInEB() << "])"
705  << fTTBELL << endl;
706  }
707  phi_in_SM = 20 - phi_in_SM;
708  return phi_in_SM;
709 }
Int_t MaxCrysPhiInTow()
TString GetTowerLvrbType(const Int_t &)
TEcnaParEcal * fEcal
Int_t MaxSMInEB()
tuple cout
Definition: gather_cfg.py:41
TString fCodeChNumberingLvrbBot
TString fCodeChNumberingLvrbTop
Double_t TEcnaNumbering::GetPhiMax ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 763 of file TEcnaNumbering.cc.

References fEcal, GetSMCentralPhi(), GetSMHalfBarrel(), and TEcnaParEcal::MaxCrysPhiInTow().

Referenced by GetVecoMax(), TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

764 {
765 //Gives PhiMax for a given Tower
766 
767  Int_t max_crys_phi_in_tower = fEcal->MaxCrysPhiInTow();
768 
769  Double_t phi_max = (Double_t)20.; // DEFAULT
770  Double_t phi_start = GetSMCentralPhi(n1EBSM);
771 
772  Int_t rest_temp =(Int_t)(n1SMTow%(max_crys_phi_in_tower-1));
773 
774  if(GetSMHalfBarrel(n1EBSM) == "EB+")
775  {
776  if ( rest_temp == 1 ) {phi_max = phi_start + (Double_t)10.;}
777  if ( rest_temp == 2 ) {phi_max = phi_start + (Double_t)5.;}
778  if ( rest_temp == 3 ) {phi_max = phi_start - (Double_t)0.;}
779  if ( rest_temp == 0 ) {phi_max = phi_start - (Double_t)5.;}
780  }
781 
782  if(GetSMHalfBarrel(n1EBSM) == "EB-")
783  {
784  if ( rest_temp == 0 ) {phi_max = phi_start + (Double_t)10.;}
785  if ( rest_temp == 3 ) {phi_max = phi_start + (Double_t)5.;}
786  if ( rest_temp == 2 ) {phi_max = phi_start - (Double_t)0.;}
787  if ( rest_temp == 1 ) {phi_max = phi_start - (Double_t)5.;}
788  }
789 
790  return phi_max;
791 }
Int_t MaxCrysPhiInTow()
TString GetSMHalfBarrel(const Int_t &)
TEcnaParEcal * fEcal
Double_t GetSMCentralPhi(const Int_t &)
Double_t TEcnaNumbering::GetPhiMax ( const Int_t &  n1EBSM)

Definition at line 802 of file TEcnaNumbering.cc.

References GetSMCentralPhi().

803 {
804 //Gives PhiMax for a given SuperModule
805 
806  Double_t phi_max = GetSMCentralPhi(n1EBSM) + (Double_t)10.;
807 
808  return phi_max;
809 }
Double_t GetSMCentralPhi(const Int_t &)
Double_t TEcnaNumbering::GetPhiMin ( const Int_t &  n1EBSM,
const Int_t &  n1SMTow 
)

Definition at line 735 of file TEcnaNumbering.cc.

References fEcal, GetSMCentralPhi(), GetSMHalfBarrel(), and TEcnaParEcal::MaxCrysPhiInTow().

Referenced by GetVecoMin(), TEcnaHistos::ViewSMGrid(), TEcnaHistos::ViewSMTowerNumberingPad(), and TEcnaHistos::ViewTowerGrid().

736 {
737 //Gives PhiMin for a given Tower
738 
739  Int_t max_crys_phi_in_tower = fEcal->MaxCrysPhiInTow();
740 
741  Double_t phi_min = (Double_t)0.; // DEFAULT
742  Double_t phi_start = GetSMCentralPhi(n1EBSM);
743 
744  Int_t rest_temp =(Int_t)(n1SMTow%(max_crys_phi_in_tower-1));
745 
746  if(GetSMHalfBarrel(n1EBSM) == "EB+")
747  {
748  if ( rest_temp == 1 ) {phi_min = phi_start + (Double_t)5.;}
749  if ( rest_temp == 2 ) {phi_min = phi_start + (Double_t)0.;}
750  if ( rest_temp == 3 ) {phi_min = phi_start - (Double_t)5.;}
751  if ( rest_temp == 0 ) {phi_min = phi_start - (Double_t)10.;}
752  }
753  if(GetSMHalfBarrel(n1EBSM) == "EB-")
754  {
755  if ( rest_temp == 0 ) {phi_min = phi_start + (Double_t)5.;}
756  if ( rest_temp == 3 ) {phi_min = phi_start + (Double_t)0.;}
757  if ( rest_temp == 2 ) {phi_min = phi_start - (Double_t)5.;}
758  if ( rest_temp == 1 ) {phi_min = phi_start - (Double_t)10.;}
759  }
760  return phi_min;
761 }
Int_t MaxCrysPhiInTow()
TString GetSMHalfBarrel(const Int_t &)
TEcnaParEcal * fEcal
Double_t GetSMCentralPhi(const Int_t &)
Double_t TEcnaNumbering::GetPhiMin ( const Int_t &  n1EBSM)

Definition at line 793 of file TEcnaNumbering.cc.

References GetSMCentralPhi().

794 {
795 //Gives PhiMin for a given SuperModule
796 
797  Double_t phi_min = GetSMCentralPhi(n1EBSM) - (Double_t)10.;
798 
799  return phi_min;
800 }
Double_t GetSMCentralPhi(const Int_t &)
TString TEcnaNumbering::GetSCQuadFrom1DeeSCEcna ( const Int_t &  n1DeeSCEcna)

Definition at line 2102 of file TEcnaNumbering.cc.

Referenced by GetIXCrysInSC(), GetJYCrysInSC(), TEcnaHistos::ModifiedSCEchaForNotConnectedSCs(), TEcnaHistos::SCCrystalNumbering(), TEcnaParHistos::SetPaveSC(), TEcnaHistos::ViewDeeSCNumberingPad(), and TEcnaHistos::ViewMatrix().

2103 {
2104 //gives the quadrant type ("top" or "bottom") from the SC number in Dee
2105 
2106  TString SCQuad = "top"; // => default value
2107 
2108  if (n1DeeSCEcna >= 1 && n1DeeSCEcna <= 10){SCQuad = "bottom";}
2109  if (n1DeeSCEcna >= 21 && n1DeeSCEcna <= 30){SCQuad = "bottom";}
2110  if (n1DeeSCEcna >= 41 && n1DeeSCEcna <= 50){SCQuad = "bottom";}
2111  if (n1DeeSCEcna >= 61 && n1DeeSCEcna <= 70){SCQuad = "bottom";}
2112  if (n1DeeSCEcna >= 81 && n1DeeSCEcna <= 90){SCQuad = "bottom";}
2113  if (n1DeeSCEcna >= 101 && n1DeeSCEcna <= 110){SCQuad = "bottom";}
2114  if (n1DeeSCEcna >= 121 && n1DeeSCEcna <= 130){SCQuad = "bottom";}
2115  if (n1DeeSCEcna >= 141 && n1DeeSCEcna <= 150){SCQuad = "bottom";}
2116  if (n1DeeSCEcna >= 161 && n1DeeSCEcna <= 170){SCQuad = "bottom";}
2117  if (n1DeeSCEcna >= 181 && n1DeeSCEcna <= 190){SCQuad = "bottom";}
2118 
2119  return SCQuad;
2120 }
Int_t TEcnaNumbering::GetSCQuadTypeIndex ( const TString  SCQuadType,
const TString  sDeeDir 
)

Definition at line 2121 of file TEcnaNumbering.cc.

Referenced by GetIXCrysInSC(), and GetJYCrysInSC().

2122 {
2123 //gives the index of the SC quadrant type (top/right, top/left, bottom/left, bottom/right)
2124 // = quadrant number - 1
2125 
2126  Int_t itype = 0; // => default
2127  if ( SCQuadType == "top" && sDeeDir == "right" ){itype = 0;}
2128  if ( SCQuadType == "top" && sDeeDir == "left" ){itype = 1;}
2129  if ( SCQuadType == "bottom" && sDeeDir == "left" ){itype = 2;}
2130  if ( SCQuadType == "bottom" && sDeeDir == "right" ){itype = 3;}
2131  return itype;
2132 }
TString TEcnaNumbering::GetSCType ( const Int_t &  nb_for_cons)

Definition at line 2063 of file TEcnaNumbering.cc.

Referenced by TEcnaHistos::ViewHisto().

2064 {
2065 // gives the special not connected SC's
2066 
2067  TString SCType = "Connected"; // => default type
2068 
2069  if( nb_for_cons == 182 || nb_for_cons == 33 ){SCType = "NotConnected";} // (D1,S1) (D3,S9) || (D2,S9) (D4,S1)
2070 
2071  if( nb_for_cons == 178 || nb_for_cons == 29 ){SCType = "NotConnected";} // (D1,S2) (D3,S8) || (D2,S8) (D4,S2)
2072  if( nb_for_cons == 207 || nb_for_cons == 58 ){SCType = "NotConnected";}
2073 
2074  if( nb_for_cons == 298 || nb_for_cons == 149 ){SCType = "NotConnected";} // (D1,S3) (D3,S7) || (D2,S7) (D4,S3)
2075 
2076  if( nb_for_cons == 261 || nb_for_cons == 112 ){SCType = "NotConnected";} // (D1,S4) (D3,S6) || (D2,S6) (D4,S4)
2077  if( nb_for_cons == 268 || nb_for_cons == 119 ){SCType = "NotConnected";}
2078 
2079  if( nb_for_cons == 281 || nb_for_cons == 132 ){SCType = "NotConnected";} // (D1,S5) (D3,S5) || (D2,S5) (D4,S5)
2080 
2081  if( nb_for_cons == 161 || nb_for_cons == 12 ){SCType = "NotComplete";} // (D1,S1) (D3,S9) || (D2,S9) (D4,S1)
2082  if( nb_for_cons == 216 || nb_for_cons == 67 ){SCType = "NotComplete";} // (D1,S2) (D3,S8) || (D2,S8) (D4,S2)
2083  if( nb_for_cons == 224 || nb_for_cons == 75 ){SCType = "NotComplete";} // (D1,S3) (D3,S7) || (D2,S7) (D4,S3)
2084  if( nb_for_cons == 286 || nb_for_cons == 137 ){SCType = "NotComplete";} // (D1,S5) (D3,S5) || (D2,S5) (D4,S5)
2085 
2086  return SCType;
2087 }
Double_t TEcnaNumbering::GetSMCentralPhi ( const Int_t &  n1EBSM)

Definition at line 638 of file TEcnaNumbering.cc.

References GetSMHalfBarrel().

Referenced by GetPhi(), GetPhiMax(), and GetPhiMin().

639 {
640 //Gives the central phi value of the SuperModule
641 
642  Double_t central_phi = (Double_t)10.; // DEFAULT = SM1
643 
644  if (GetSMHalfBarrel(n1EBSM) == "EB+"){central_phi = 10. + (Double_t)20.*(n1EBSM-1);}
645  if (GetSMHalfBarrel(n1EBSM) == "EB-"){central_phi = 10. + (Double_t)20.*(n1EBSM-19);}
646 
647  return central_phi;
648 }
TString GetSMHalfBarrel(const Int_t &)
Int_t TEcnaNumbering::GetSMFromFED ( const Int_t &  FEDNumber)

Definition at line 2524 of file TEcnaNumbering.cc.

2525 {
2526  Int_t EBSMNumber = 0; // SM = Super Module
2527  if( FEDNumber >= 610 && FEDNumber <= 645 ){EBSMNumber = FEDNumber - 609;}
2528  return EBSMNumber;
2529 }
TString TEcnaNumbering::GetSMHalfBarrel ( const Int_t &  SMNumber)

Definition at line 901 of file TEcnaNumbering.cc.

References fEcal, TEcnaParEcal::MaxSMInEB(), and TEcnaParEcal::MaxSMInEBPlus().

Referenced by GetEta(), GetEtaMax(), GetEtaMin(), GetIEtaFromHashed(), GetIEtaMax(), GetIEtaMin(), GetJYDirectionEB(), GetPhiMax(), GetPhiMin(), GetSMCentralPhi(), GetStexHalfStas(), GetXDirectionEB(), GetYDirectionEB(), TEcnaParHistos::SetPaveLVRB(), TEcnaParHistos::SetPaveStex(), TEcnaHistos::SMTowerNumbering(), TEcnaHistos::TowerCrystalNumbering(), TEcnaHistos::ViewMatrix(), TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewSMTowerNumberingPad().

902 {
903 //gives the half-barrel of the SM ("EB+" or "EB-")
904 
905  TString type = "EB-"; // => default value
906 
907  if ( SMNumber >= 1 && SMNumber <= fEcal->MaxSMInEBPlus() ){type = "EB+";}
908  if ( SMNumber > fEcal->MaxSMInEBPlus() && SMNumber <= fEcal->MaxSMInEB() ){type = "EB-";}
909 
910  return type;
911 }
type
Definition: HCALResponse.h:22
Int_t MaxSMInEBPlus()
TEcnaParEcal * fEcal
Int_t MaxSMInEB()
TString TEcnaNumbering::GetStexHalfStas ( const Int_t &  SMNumber)

Definition at line 2510 of file TEcnaNumbering.cc.

References fFlagSubDet, GetDeeHalfEndcap(), and GetSMHalfBarrel().

Referenced by TEcnaHistos::GetXCrysInStex(), TEcnaHistos::GetXSampInStin(), TEcnaHistos::GetXStinInStas(), TEcnaHistos::GetYCrysInStex(), TEcnaHistos::GetYSampInStin(), TEcnaHistos::GetYStinInStas(), and TEcnaHistos::StexHocoVecoLHFCorcc().

2511 {
2512  TString half_stas = "EB? EE?";
2513 
2514  if( fFlagSubDet == "EB" ){half_stas = GetSMHalfBarrel(SMNumber);}
2515  if( fFlagSubDet == "EE" ){half_stas = GetDeeHalfEndcap(SMNumber);}
2516 
2517  return half_stas;
2518 }
TString GetSMHalfBarrel(const Int_t &)
TString GetDeeHalfEndcap(const Int_t &)
TString fFlagSubDet
TString TEcnaNumbering::GetStinLvrbType ( const Int_t &  n1SMTow)

Definition at line 453 of file TEcnaNumbering.cc.

References GetTowerLvrbType().

Referenced by TEcnaHistos::GetXSampInStin(), and TEcnaHistos::GetYSampInStin().

454 {
455  TString lvrb_type = GetTowerLvrbType(n1SMTow);
456  return lvrb_type;
457 }
TString GetTowerLvrbType(const Int_t &)
TString TEcnaNumbering::GetTowerLvrbType ( const Int_t &  n1SMTow)

Definition at line 458 of file TEcnaNumbering.cc.

References fCodeChNumberingLvrbBot, and fCodeChNumberingLvrbTop.

Referenced by GetEta(), GetPhiInSM(), GetStinLvrbType(), TEcnaParHistos::SetPaveLVRB(), TEcnaHistos::TowerCrystalNumbering(), and TEcnaHistos::ViewSMTowerNumberingPad().

459 {
460 //gives the LVRB type of the crystal numbering of tower
461 
462  TString type = fCodeChNumberingLvrbTop; // => default value
463 
464  if (n1SMTow >= 1 && n1SMTow <= 12){type = fCodeChNumberingLvrbBot;}
465  if (n1SMTow >= 21 && n1SMTow <= 28){type = fCodeChNumberingLvrbBot;}
466  if (n1SMTow >= 37 && n1SMTow <= 44){type = fCodeChNumberingLvrbBot;}
467  if (n1SMTow >= 53 && n1SMTow <= 60){type = fCodeChNumberingLvrbBot;}
468 
469  return type;
470 }
type
Definition: HCALResponse.h:22
TString fCodeChNumberingLvrbBot
TString fCodeChNumberingLvrbTop
Double_t TEcnaNumbering::GetVecoMax ( const Int_t &  Stex,
const Int_t &  StexStin 
)

Definition at line 2483 of file TEcnaNumbering.cc.

References fFlagSubDet, GetJIYMax(), and GetPhiMax().

2484 {
2485  Double_t IVecoMax = (Double_t)0.;
2486  if(fFlagSubDet == "EB" ){IVecoMax = GetPhiMax(Stex, StexStin);}
2487  if(fFlagSubDet == "EE" ){IVecoMax = GetJIYMax(Stex, StexStin);}
2488  return IVecoMax;
2489 }
Double_t GetPhiMax(const Int_t &, const Int_t &)
Double_t GetJIYMax(const Int_t &, const Int_t &)
TString fFlagSubDet
Double_t TEcnaNumbering::GetVecoMin ( const Int_t &  Stex,
const Int_t &  StexStin 
)

Definition at line 2475 of file TEcnaNumbering.cc.

References fFlagSubDet, GetJIYMin(), and GetPhiMin().

2476 {
2477  Double_t IVecoMin = (Double_t)0.;
2478  if(fFlagSubDet == "EB" ){IVecoMin = GetPhiMin(Stex, StexStin);}
2479  if(fFlagSubDet == "EE" ){IVecoMin = GetJIYMin(Stex, StexStin);}
2480  return IVecoMin;
2481 }
Double_t GetPhiMin(const Int_t &, const Int_t &)
Double_t GetJIYMin(const Int_t &, const Int_t &)
TString fFlagSubDet
TString TEcnaNumbering::GetXDirectionEB ( const Int_t &  SMNumber)

Definition at line 869 of file TEcnaNumbering.cc.

References GetSMHalfBarrel().

Referenced by TEcnaHistos::ViewEBGrid(), TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

870 {
871  TString xdirection = "x"; // DEFAULT
872 
873  if( GetSMHalfBarrel(SMNumber) == "EB+" ){xdirection = "x";}
874  if( GetSMHalfBarrel(SMNumber) == "EB-" ){xdirection = "x";}
875 
876  return xdirection;
877 }
TString GetSMHalfBarrel(const Int_t &)
TString TEcnaNumbering::GetXDirectionEE ( const Int_t &  n1DeeNumber)

Definition at line 2364 of file TEcnaNumbering.cc.

References GetEEDeeType().

Referenced by TEcnaHistos::ViewSCGrid().

2365 {
2366  TString xdirection = "x"; // DEFAULT
2367 
2368  if( GetEEDeeType(n1DeeNumber) == "EE+F" ){xdirection = "-x";} // Dee 1
2369  if( GetEEDeeType(n1DeeNumber) == "EE+N" ){xdirection = "-x";} // Dee 2
2370  if( GetEEDeeType(n1DeeNumber) == "EE-N" ){xdirection = "x";} // Dee 3
2371  if( GetEEDeeType(n1DeeNumber) == "EE-F" ){xdirection = "x";} // Dee 4
2372 
2373  return xdirection;
2374 }
TString GetEEDeeType(const Int_t &)
TString TEcnaNumbering::GetYDirectionEB ( const Int_t &  SMNumber)

Definition at line 879 of file TEcnaNumbering.cc.

References GetSMHalfBarrel().

Referenced by TEcnaHistos::ViewSMGrid(), and TEcnaHistos::ViewTowerGrid().

880 {
881  TString ydirection = "-x"; // DEFAULT
882 
883  if( GetSMHalfBarrel(SMNumber) == "EB+" ){ydirection = "-x";}
884  if( GetSMHalfBarrel(SMNumber) == "EB-" ){ydirection = "-x";}
885 
886  return ydirection;
887 }
TString GetSMHalfBarrel(const Int_t &)
TString TEcnaNumbering::GetYDirectionEE ( const Int_t &  n1DeeNumber)

Definition at line 2376 of file TEcnaNumbering.cc.

References GetEEDeeType().

2377 {
2378  TString ydirection = "-x"; // DEFAULT
2379 
2380  if( GetEEDeeType(n1DeeNumber) == "endcap+" ){ydirection = "-x";}
2381  if( GetEEDeeType(n1DeeNumber) == "endcap-" ){ydirection = "-x";}
2382 
2383  return ydirection;
2384 }
TString GetEEDeeType(const Int_t &)
void TEcnaNumbering::Init ( void  )
protected

Definition at line 82 of file TEcnaNumbering.cc.

References fCodeChNumberingITP1Bot, fCodeChNumberingITP2Top, fCodeChNumberingLvrbBot, fCodeChNumberingLvrbTop, fEcal, fgMaxCar, fT1d_DeeSCCons, fT1d_DS, fT1d_DSSC, fT1d_ich_IX, fT1d_jch_JY, fT1d_RecovDeeSC, fT1dDeeCrys, fT1dDeeSC, fT1dSCEcha, fT1dSMCrys, fT1dSMTow, fT1dTowEcha, fT2d_DeeSCCons, fT2d_DS, fT2d_DSSC, fT2d_ich_IX, fT2d_jch_JY, fT2d_RecovDeeSC, fT2dDeeCrys, fT2dDeeSC, fT2dSCEcha, fT2dSMCrys, fT3dDeeCrys, and fTTBELL.

Referenced by TEcnaNumbering().

83 {
84 //Set default values and build crystal numbering table
85 
86  //.............................. Initialisations
87  fTTBELL = '\007';
88  fgMaxCar = 512;
89 
90  //....................... Barrel
91  fT2dSMCrys = 0;
92  fT1dSMCrys = 0;
93  fT1dSMTow = 0;
94  fT1dTowEcha = 0;
95 
96  fCodeChNumberingLvrbBot = "bottom";
98 
99  //....................... Endcap
100  fT3dDeeCrys = 0;
101  fT2dDeeCrys = 0;
102  fT1dDeeCrys = 0;
103  fT2dDeeSC = 0;
104  fT1dDeeSC = 0;
105  fT2dSCEcha = 0;
106  fT1dSCEcha = 0;
107  fT2d_jch_JY = 0;
108  fT1d_jch_JY = 0;
109  fT2d_ich_IX = 0;
110  fT1d_ich_IX = 0;
111  fT2d_DS = 0;
112  fT1d_DS = 0;
113  fT2d_DSSC = 0;
114  fT1d_DSSC = 0;
115  fT2d_DeeSCCons = 0;
116  fT1d_DeeSCCons = 0;
117  fT2d_RecovDeeSC = 0;
118  fT1d_RecovDeeSC = 0;
119 
120  fCodeChNumberingITP1Bot = "bottom"; // ==> Type 1 Interface plate IPT1 (a faire)
121  fCodeChNumberingITP2Top = "top"; // ==> Type 2 Interface plate IPT2 (a faire)
122 
123  //------------------ Init pointers on the CNA objects
124  fEcal = 0;
125 }
Int_t * fT1dSCEcha
Int_t ** fT2d_DS
Int_t * fT1dDeeCrys
Int_t * fT1d_ich_IX
Int_t ** fT2d_ich_IX
Int_t ** fT2d_RecovDeeSC
Int_t * fT1d_DeeSCCons
Int_t ** fT2dDeeSC
TEcnaParEcal * fEcal
Int_t ** fT2d_DSSC
Int_t * fT1dSMCrys
Int_t ** fT2d_jch_JY
TString fCodeChNumberingITP2Top
Int_t * fT1d_RecovDeeSC
Int_t * fT1d_jch_JY
Int_t * fT1dTowEcha
Int_t ** fT2d_DeeSCCons
Int_t ** fT2dDeeCrys
Int_t ** fT2dSMCrys
TString fCodeChNumberingITP1Bot
TString fCodeChNumberingLvrbBot
TString fCodeChNumberingLvrbTop
Int_t *** fT3dDeeCrys
Int_t ** fT2dSCEcha
Int_t TEcnaNumbering::MaxCrysInStinEcna ( const Int_t &  n1DeeNumber,
const Int_t &  n1DeeSCEcna,
const TString  s_option 
)

Definition at line 2542 of file TEcnaNumbering.cc.

References gather_cfg::cout, fEcal, fFlagSubDet, fTTBELL, GetDeeSCConsFrom1DeeSCEcna(), and TEcnaParEcal::MaxCrysInStin().

Referenced by TEcnaRun::AveragedHighFrequencyNoise(), TEcnaRun::AveragedLowFrequencyNoise(), TEcnaRun::AveragedMeanOfCorrelationsBetweenSamples(), TEcnaRun::AveragedPedestals(), TEcnaRun::AveragedSigmaOfCorrelationsBetweenSamples(), TEcnaRun::AveragedTotalNoise(), and TEcnaRead::ReadAveragedNumberOfEvents().

2543 {
2544 // Number of Xtals in "Ecna SC" for not complete and not connected SC's.
2545 // Also valid for all connected and complete SC's and for towers of EB
2546 
2547  Int_t max_crys = fEcal->MaxCrysInStin(); // valid for EB and for connected and complete SC's of EE
2548 
2549  // Number of Xtals in SC for not complete and not connected SC's
2550 
2551  if(fFlagSubDet == "EE")
2552  {
2553  Int_t n_for_cons = GetDeeSCConsFrom1DeeSCEcna(n1DeeNumber, n1DeeSCEcna);
2554 
2555  //............ not complete SC's (inner border)
2556  if( n_for_cons == 12 || n_for_cons == 67 || n_for_cons == 75 || n_for_cons == 137 ||
2557  n_for_cons == 161 || n_for_cons == 216 || n_for_cons == 224 || n_for_cons == 286 ){max_crys = 20;}
2558 
2559  //............ not connected SC's
2560  if( (n_for_cons == 182 || n_for_cons == 33) && (n1DeeSCEcna == 60 || n1DeeSCEcna == 119) ){max_crys = 10;}
2561 
2562  if( (n_for_cons == 178 || n_for_cons == 29) && (n1DeeSCEcna == 138 || n1DeeSCEcna == 157) ){max_crys = 10;}
2563  if( (n_for_cons == 207 || n_for_cons == 58) && (n1DeeSCEcna == 176 || n1DeeSCEcna == 193) ){max_crys = 10;}
2564 
2565  if( (n_for_cons == 298 || n_for_cons == 149) && (n1DeeSCEcna == 188) ){max_crys = 10;}
2566 
2567  if( (n_for_cons == 261 || n_for_cons == 112) && (n1DeeSCEcna == 144 || n1DeeSCEcna == 165) ){max_crys = 10;}
2568  if( (n_for_cons == 268 || n_for_cons == 119) && (n1DeeSCEcna == 102 || n1DeeSCEcna == 123) ){max_crys = 10;}
2569 
2570  if( (n_for_cons == 281 || n_for_cons == 132) && (n1DeeSCEcna == 41) ){max_crys = 10;}
2571 
2572  //............. not connected and mixed Ecna SC's
2573  if( s_option == "TEcnaRun" || s_option == "TEcnaRead" )
2574  {
2575  if( s_option == "TEcnaRun" )
2576  {
2577  // special translation of Xtal 11 of SCEcna 29 and 32 to respectively Xtal 11 of SCEcna 10 and 11
2578  if( n1DeeSCEcna == 29 || n1DeeSCEcna == 32 ){max_crys = 5;}
2579  if( n1DeeSCEcna == 10 || n1DeeSCEcna == 11 ){max_crys = 1;}
2580  }
2581  if( s_option == "TEcnaRead" )
2582  {
2583  //if( n1DeeSCEcna == 29 || n1DeeSCEcna == 32 ){max_crys = 6;}
2584  if( n1DeeSCEcna == 29 || n1DeeSCEcna == 32 ){max_crys = 5;}
2585  if( n1DeeSCEcna == 10 || n1DeeSCEcna == 11 ){max_crys = 1;}
2586  }
2587  }
2588  else
2589  {
2590  cout << "!TEcnaNumbering::MaxCrysInStinEcna(...)> " << s_option
2591  << ": unknown option." << fTTBELL << endl;
2592  }
2593  }
2594  return max_crys;
2595 }
TEcnaParEcal * fEcal
Int_t MaxCrysInStin()
Int_t GetDeeSCConsFrom1DeeSCEcna(const Int_t &, const Int_t &)
TString fFlagSubDet
tuple cout
Definition: gather_cfg.py:41
void TEcnaNumbering::SetEcalSubDetector ( const TString  SubDet,
const TEcnaParEcal pEcal 
)

Definition at line 128 of file TEcnaNumbering.cc.

References BuildBarrelCrysTable(), BuildEndcapCrysTable(), BuildEndcapSCTable(), fEcal, fFlagSubDet, fgMaxCar, and TEcnaParEcal::GetEcalSubDetector().

Referenced by TEcnaNumbering().

128  {
129 //Set the current subdetector flag and the current subdetector parameters
130 
131  fEcal = 0;
132  if( pEcal == 0 )
133  {fEcal = new TEcnaParEcal(SubDet.Data()); /*fCnew++*/ ;}
134  else
135  {fEcal = (TEcnaParEcal*)pEcal;}
136 
137  Int_t MaxCar = fgMaxCar;
138  fFlagSubDet.Resize(MaxCar);
139  fFlagSubDet = fEcal->GetEcalSubDetector(); // fFlagSubDet = "EB" or "EE"
140 
141  if( fFlagSubDet == "EB" ){BuildBarrelCrysTable();}
143 }
void BuildBarrelCrysTable()
void BuildEndcapCrysTable()
TEcnaParEcal * fEcal
TString fFlagSubDet
TString GetEcalSubDetector()
Int_t TEcnaNumbering::StexEchaForCons ( const Int_t &  n1DeeNumber,
const Int_t &  i0StexEcha 
)

Member Data Documentation

Int_t TEcnaNumbering::fCdelete
private

Definition at line 16 of file TEcnaNumbering.h.

Referenced by BuildBarrelCrysTable(), BuildEndcapCrysTable(), and ~TEcnaNumbering().

Int_t TEcnaNumbering::fCnew
private

Definition at line 15 of file TEcnaNumbering.h.

Referenced by BuildBarrelCrysTable(), BuildEndcapCrysTable(), and BuildEndcapSCTable().

TString TEcnaNumbering::fCodeChNumberingITP1Bot
private

Definition at line 53 of file TEcnaNumbering.h.

Referenced by Init().

TString TEcnaNumbering::fCodeChNumberingITP2Top
private

Definition at line 54 of file TEcnaNumbering.h.

Referenced by Init().

TString TEcnaNumbering::fCodeChNumberingLvrbBot
private

Definition at line 32 of file TEcnaNumbering.h.

Referenced by GetEta(), GetPhiInSM(), GetTowerLvrbType(), and Init().

TString TEcnaNumbering::fCodeChNumberingLvrbTop
private

Definition at line 33 of file TEcnaNumbering.h.

Referenced by GetEta(), GetPhiInSM(), GetTowerLvrbType(), and Init().

TEcnaParEcal* TEcnaNumbering::fEcal
private
Int_t TEcnaNumbering::fFlagPrint
private

Definition at line 21 of file TEcnaNumbering.h.

TString TEcnaNumbering::fFlagSubDet
private
Int_t TEcnaNumbering::fgMaxCar
private

Definition at line 14 of file TEcnaNumbering.h.

Referenced by Init(), and SetEcalSubDetector().

Int_t* TEcnaNumbering::fT1d_DeeSCCons
private

Definition at line 63 of file TEcnaNumbering.h.

Referenced by BuildEndcapSCTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1d_DS
private

Definition at line 57 of file TEcnaNumbering.h.

Referenced by BuildEndcapSCTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1d_DSSC
private

Definition at line 60 of file TEcnaNumbering.h.

Referenced by BuildEndcapSCTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1d_ich_IX
private

Definition at line 51 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1d_jch_JY
private

Definition at line 48 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1d_RecovDeeSC
private

Definition at line 66 of file TEcnaNumbering.h.

Referenced by BuildEndcapSCTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1dDeeCrys
private

Definition at line 39 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1dDeeSC
private

Definition at line 42 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1dSCEcha
private

Definition at line 45 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1dSMCrys
private

Definition at line 28 of file TEcnaNumbering.h.

Referenced by BuildBarrelCrysTable(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1dSMTow
private

Definition at line 29 of file TEcnaNumbering.h.

Referenced by BuildBarrelCrysTable(), Get1SMTowFrom1SMCrys(), Init(), and ~TEcnaNumbering().

Int_t* TEcnaNumbering::fT1dTowEcha
private
Int_t** TEcnaNumbering::fT2d_DeeSCCons
private
Int_t** TEcnaNumbering::fT2d_DS
private

Definition at line 56 of file TEcnaNumbering.h.

Referenced by BuildEndcapSCTable(), GetDSFrom1DeeSCEcna(), Init(), and ~TEcnaNumbering().

Int_t** TEcnaNumbering::fT2d_DSSC
private

Definition at line 59 of file TEcnaNumbering.h.

Referenced by BuildEndcapSCTable(), GetDSSCFrom1DeeSCEcna(), Init(), and ~TEcnaNumbering().

Int_t** TEcnaNumbering::fT2d_ich_IX
private

Definition at line 50 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), GetIXCrysInSC(), Init(), and ~TEcnaNumbering().

Int_t** TEcnaNumbering::fT2d_jch_JY
private

Definition at line 47 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), GetJYCrysInSC(), Init(), and ~TEcnaNumbering().

Int_t** TEcnaNumbering::fT2d_RecovDeeSC
private
Int_t** TEcnaNumbering::fT2dDeeCrys
private

Definition at line 38 of file TEcnaNumbering.h.

Referenced by BuildEndcapCrysTable(), Init(), and ~TEcnaNumbering().

Int_t** TEcnaNumbering::fT2dDeeSC
private
Int_t** TEcnaNumbering::fT2dSCEcha
private
Int_t** TEcnaNumbering::fT2dSMCrys
private
Int_t*** TEcnaNumbering::fT3dDeeCrys
private
TString TEcnaNumbering::fTTBELL
private