All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
SiStripGeomBuilder.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripDigi
4 // Class: SiStripGeomBuilder
5 //
6 //
7 // Original Author: Jordi Duarte Campderros
8 // Created: Wed Jul 13 16:23:11 CET 2011
9 //
10 // @autor J. Duarte Campderros, IFCA, Spain, duarte@ifca.unican.es
11 //
12 //
13 
14 // standard
15 #include<stdlib.h>
16 #include<string>
17 
18 // Include Marlin
19 #include <streamlog/streamlog.h>
20 
21 #include "SiStripGeomBuilder.h"
22 #include "SiStripGeomFTD.h"
23 //#include "SiStripGeomVXD.h"
24 
25 namespace sistrip
26 {
27 
28 SiStripGeom *SiStripGeomBuilder::Build(const std::string & detector,const double & pitchFront,
29  const double & pitchRear)
30 {
31  SiStripGeom *p = 0;
32 
33  // Building the concrete SiStripGeom
34  if( detector == "FTD" )
35  {
36  p = new SiStripGeomFTD("FTD",pitchFront,pitchRear);
37  }
38  //else if( detector == "VXD" )
39  //{
40  // p = new SiStripGeomVXD();
41  //}
42  // Add another type here and codify a new concrete
43  // class derived from SiStripGeom
44  else
45  {
46  streamlog_out(ERROR) << "Detector type unknown: " << detector << std::endl;
47  exit(-1);
48  }
49 
50  return p;
51 }
52 
53 }
static SiStripGeom * Build(const std::string &detector, const double &pitchFront, const double &pitchRear)
Gear geometry class - holds all geometry information about silicon strip sensors. ...
Definition: SiStripGeom.h:59