FairRoot/PandaRoot
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
PndEmcMapperGeo12Root Class Reference

#include <PndEmcMapper.h>

Inheritance diagram for PndEmcMapperGeo12Root:
PndEmcMapper

Public Member Functions

 PndEmcMapperGeo12Root ()
 
const std::map< Int_t,
PndEmcTwoCoordIndex * > & 
GetTciMap ()
 
Int_t GetMapVersion () const
 
void Add (PndEmcMapper *)
 
PndEmcTwoCoordIndexGetTCI (Int_t DetectorId)
 

Static Public Member Functions

static PndEmcMapperInstance ()
 
static void Init (Int_t MapVersion)
 

Protected Attributes

std::map< Int_t,
PndEmcTwoCoordIndex * > 
fIntTwoCoordMap
 

Detailed Description

Definition at line 58 of file PndEmcMapper.h.

Constructor & Destructor Documentation

PndEmcMapperGeo12Root::PndEmcMapperGeo12Root ( )

Definition at line 150 of file PndEmcMapper.cxx.

References PndEmcMapper::fIntTwoCoordMap, and row.

151 {
152  PndEmcTwoCoordIndex *_tci;
153  Int_t iTheta, iPhi, detId, detId_tmp, iX, iY;
154  iTheta = iPhi = detId = detId_tmp =iX = iY = 0;
155  // Crys 1-5000; copyNo 1-20; nRow 1-100, nMod 1-2
156  // 72(iTheta)x160(iPhi) for barrel part
157  // index iTheta from 1 (backward part) till 72 (forward)
158  for (Int_t module = 1; module <= 2; module++) {
159  if (module == 2) {
160  for (Int_t row = 1; row <= 28; row++) {
161  for (Int_t crystal = 1; crystal <= 10; crystal++) {
162  for (Int_t copy = 1; copy <= 16; copy++) {
163  if ((copy==1 || copy==9) && (crystal>=3 && crystal<=8) && (row<=3)) continue;
164  iPhi = (11-crystal)+(copy-1)*10;
165  iTheta = -row + 29;
166 
167  detId = module*100000000 + row*1000000 + copy*10000 + crystal;
168  _tci = new PndEmcTwoCoordIndex(iTheta, iPhi, detId);
169  fIntTwoCoordMap[detId] = _tci;
170  }
171  }
172  }
173  }
174  if (module == 1) {
175  for (Int_t row = 1; row <= 43; row++) {
176  for (Int_t crystal = 1; crystal <= 10; crystal++) {
177  for (Int_t copy=1; copy<=16;copy++) {
178  if ((copy==1 || copy==9) && (crystal>=3 && crystal<=8) && (row<=3)) continue;
179  iPhi = (11-crystal)+(copy-1)*10;
180  iTheta = row + 28;
181 
182  detId = module*100000000 + row*1000000 + copy*10000 + crystal;
183  _tci = new PndEmcTwoCoordIndex(iTheta,iPhi,detId);
184  fIntTwoCoordMap[detId] = _tci;
185  }
186  }
187  }
188  } // if module
189  }
190 }
int row
Definition: anaLmdDigi.C:67
stores crystal index coordinates (x,y) or (theta,phi)
std::map< Int_t, PndEmcTwoCoordIndex * > fIntTwoCoordMap
Definition: PndEmcMapper.h:40

Member Function Documentation

void PndEmcMapper::Add ( PndEmcMapper newMapper)
inherited

Definition at line 89 of file PndEmcMapper.cxx.

References PndEmcMapper::fIntTwoCoordMap, and PndEmcMapper::GetTciMap().

Referenced by PndEmcMapper::Init().

90 {
91  std::map<Int_t,PndEmcTwoCoordIndex* > newMapp = newMapper->GetTciMap();
92 
93  fIntTwoCoordMap.insert(newMapp.begin(),newMapp.end());
94 }
const std::map< Int_t, PndEmcTwoCoordIndex * > & GetTciMap()
std::map< Int_t, PndEmcTwoCoordIndex * > fIntTwoCoordMap
Definition: PndEmcMapper.h:40
Int_t PndEmcMapper::GetMapVersion ( ) const
inlineinherited

Accessors

Definition at line 34 of file PndEmcMapper.h.

References PndEmcMapper::fMapVersion.

34 { return fMapVersion ;};
static Int_t fMapVersion
Definition: PndEmcMapper.h:45
PndEmcTwoCoordIndex * PndEmcMapper::GetTCI ( Int_t  DetectorId)
inherited
const std::map< Int_t, PndEmcTwoCoordIndex * > & PndEmcMapper::GetTciMap ( )
inherited

Definition at line 441 of file PndEmcMapper.cxx.

References PndEmcMapper::fIntTwoCoordMap.

Referenced by PndEmcMapper::Add(), and PndEmcHitsToWaveform::Exec().

442 {
443  return fIntTwoCoordMap;
444 }
std::map< Int_t, PndEmcTwoCoordIndex * > fIntTwoCoordMap
Definition: PndEmcMapper.h:40
PndEmcMapper::Init ( Int_t  MapVersion)
staticinherited

Definition at line 25 of file PndEmcMapper.cxx.

References PndEmcMapper::_instance, PndEmcMapper::Add(), and PndEmcMapper::fMapVersion.

Referenced by anaPatternRecoQuality(), clonemc(), dbuilder(), generatePatternDB(), PndEmcGeoPar::InitEmcMapper(), kfparticle(), patternMatcher(), pid(), pid2_complete(), pid_box(), pid_complete(), pid_complete_runs(), pid_complete_sec(), pid_day1(), pid_multi(), pid_rich(), pidideal_complete(), pidideal_day1(), prod_pid(), prod_rec(), reco(), reco2_complete(), reco_box(), reco_complete(), reco_complete_gf2(), reco_complete_runs(), reco_complete_sec(), reco_completeCA(), reco_day1(), reco_fts(), reco_multi(), reco_rich(), reco_sttcombi(), recoideal_box(), recoideal_complete(), recoideal_day1(), recolocal_complete(), recoqa_complete(), run_reco_complete(), run_reco_sttcombi_timebased(), run_tracking_sttcombi_timebased(), runTrackingPid(), testFilter(), trackingQA_complete(), trackingQA_forward_complete(), and trackingQANewLinks().

26 {
27  if (mapVersion==0)
28  {
29  cout<<"Emc mapper version 0 does not exist"<<endl;
30  }
31  else if (mapVersion!=fMapVersion)
32  {
33  fMapVersion=mapVersion;
34  switch (mapVersion) {
35  case 1:
40  break;
41  case 2:
46  break;
47  case 3:
52  break;
53  case 4:
55  break;
56  case 5:
58  break;
59  case 6:
61  break;
62  case 7:
64  break;
65  case 8: // old backward emc mappping (geom. version 2008)
67  break;
68  case 9: // old barrel emc mapping
73  break;
74  default :
75  cout<<"Emc Mapper version "<<mapVersion<<" is not defined"<<endl;
76  }
77  }
78 }
static Int_t fMapVersion
Definition: PndEmcMapper.h:45
void Add(PndEmcMapper *)
static PndEmcMapper * _instance
Definition: PndEmcMapper.h:44
PndEmcMapper::Instance ( )
staticinherited

Member Data Documentation

std::map<Int_t,PndEmcTwoCoordIndex* > PndEmcMapper::fIntTwoCoordMap
protectedinherited

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