Public Member Functions | Private Member Functions | Private Attributes | List of all members
Detector Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/Calibration/calibana/Detector.h"

Public Member Functions

 Detector (std::string detname)
 
 ~Detector ()
 
std::string name ()
 
std::string Name ()
 
std::string FullName ()
 
unsigned int NCells ()
 
unsigned int NPlanes ()
 
unsigned int NDiblocks ()
 
float HalfW ()
 
unsigned int CellToModule (int cell)
 
bool IsTB ()
 
bool IsND ()
 
bool IsFD ()
 
std::map< std::string, uint32_t > EndOfPeriodMap ()
 
std::map< std::string, uint32_t > EndOfEpochMap ()
 

Private Member Functions

void SetEndOfPeriodMap ()
 

Private Attributes

std::string fName
 
std::string fFullName
 
unsigned int fNCells
 
unsigned int fNPlanes
 
unsigned int fNDiblocks
 
float fHalfW
 
std::map< std::string, uint32_t > fEndOfPeriodMap
 
std::map< std::string, uint32_t > fEndOfEpochMap
 

Detailed Description

Definition at line 2 of file Detector.h.

Constructor & Destructor Documentation

Detector::Detector ( std::string  detname)

Definition at line 42 of file Detector.h.

References om::cout, allTimeWatchdog::endl, fFullName, fHalfW, fNCells, fNDiblocks, fNPlanes, and SetEndOfPeriodMap().

43 : fName(detname)
44 {
45  if ( detname=="nd" ){
46  fFullName="Near Detector";
47  fHalfW = 200;
48  fNCells = 96; // 3 modules of 32 cells
49  fNPlanes = 192;
50  fNDiblocks = 4;
51  }
52  else if( detname=="fd" ){
53  fFullName="Far Detector";
54  fHalfW = 800;
55  fNCells = 384; // 12 modules of 32 cells
56  fNPlanes = 896;
57  fNDiblocks = 14;
58  }
59  else if( detname=="tb" ){
60  fFullName="Testbeam Detector";
61  fHalfW = 150;
62  fNCells = 64;
63  fNPlanes = 63;
64  fNDiblocks = 2; //3 if the different FEBs need to be taken into account.
65  }
66  else{
67  std::cout << "Unrecognized detector: " << detname << std::endl;
68  std::abort();
69  }
71 }
void SetEndOfPeriodMap()
Definition: Detector.h:99
std::string fFullName
Definition: Detector.h:28
unsigned int fNDiblocks
Definition: Detector.h:31
std::string fName
Definition: Detector.h:27
float fHalfW
Definition: Detector.h:32
OStream cout
Definition: OStream.cxx:6
unsigned int fNPlanes
Definition: Detector.h:30
unsigned int fNCells
Definition: Detector.h:29
Detector::~Detector ( )

Member Function Documentation

unsigned int Detector::CellToModule ( int  cell)

Definition at line 75 of file Detector.h.

References om::cout, allTimeWatchdog::endl, FullName(), makeTrainCVSamples::int, new_module::module, and Name().

Referenced by MEUPerFEB::BadFeb(), and HalfW().

76 {
77  unsigned int module = (unsigned int)(cell) % 32;
78  if( (Name()=="nd" && module > 2 ) ||
79  (Name()=="fd" && module > 11) ){
80  std::cout << "Invalid module for " << FullName()
81  << ": " << module << std::endl;
82  std::abort();
83  }
84  return module;
85 }
std::string Name()
Definition: Detector.h:89
OStream cout
Definition: OStream.cxx:6
std::string FullName()
Definition: Detector.h:11
std::map< std::string, uint32_t > Detector::EndOfEpochMap ( )
inline

Definition at line 24 of file Detector.h.

References fEndOfEpochMap.

Referenced by ValidCalibPDF::DiblockTex(), CalibAnaPlot::DrawPeriodLines(), and CalibAnaPlot::PrintEpochLengths().

24 { return fEndOfEpochMap; }
std::map< std::string, uint32_t > fEndOfEpochMap
Definition: Detector.h:36
std::map< std::string, uint32_t > Detector::EndOfPeriodMap ( )
inline

Definition at line 23 of file Detector.h.

References fEndOfPeriodMap.

Referenced by CalibAnaPlot::DrawPeriodLines().

23 { return fEndOfPeriodMap; }
std::map< std::string, uint32_t > fEndOfPeriodMap
Definition: Detector.h:35
std::string Detector::FullName ( )
inline

Definition at line 11 of file Detector.h.

References fFullName.

Referenced by CalibAnaPlot::CalibAnaPlot(), and CellToModule().

11 { return fFullName; }
std::string fFullName
Definition: Detector.h:28
float Detector::HalfW ( )
inline

Definition at line 15 of file Detector.h.

References getBrightness::cell, CellToModule(), and fHalfW.

Referenced by BrightnessModelPlots::SchedulePlots(), and ValidCalibPDF::SchedulePlots().

15 { return fHalfW; }
float fHalfW
Definition: Detector.h:32
bool Detector::IsFD ( )
inline

Definition at line 21 of file Detector.h.

References fName.

Referenced by ValidCalibPDF::PassesAbsCalCut(), MEUPerDiblock::ScheduleSamples(), and ValidCalibPDF::ScheduleSamples().

21 { return fName=="fd"; }
std::string fName
Definition: Detector.h:27
bool Detector::IsND ( )
inline

Definition at line 20 of file Detector.h.

References fName.

Referenced by ValidCalibPDF::PassesAbsCalCut(), MEUPerDiblock::ScheduleSamples(), and ValidCalibPDF::ScheduleSamples().

20 { return fName=="nd"; }
std::string fName
Definition: Detector.h:27
bool Detector::IsTB ( )
inline

Definition at line 19 of file Detector.h.

References fName.

Referenced by ValidCalibPDF::FillHitPlots(), ValidCalibPDF::PassesAbsCalCut(), and ValidCalibPDF::ScheduleSamples().

19 { return fName=="tb"; }
std::string fName
Definition: Detector.h:27
std::string Detector::name ( )
inline
std::string Detector::Name ( )

Definition at line 89 of file Detector.h.

References fName.

Referenced by CellToModule(), and name().

90 {
91  if (fName=="nd"){ return "ND";}
92  else if(fName=="fd"){ return "FD";}
93  else if(fName=="tb"){ return "TB";}
94  else return "";
95 }
std::string fName
Definition: Detector.h:27
unsigned int Detector::NCells ( )
inline

Definition at line 12 of file Detector.h.

References fNCells.

Referenced by MEUPerCell::DriftTex(), BrightnessModelPlots::SchedulePlots(), MEUPerCell::SchedulePlots(), and ValidCalibPDF::SchedulePlots().

12 { return fNCells; }
unsigned int fNCells
Definition: Detector.h:29
unsigned int Detector::NDiblocks ( )
inline

Definition at line 14 of file Detector.h.

References fNDiblocks.

Referenced by ValidCalibPDF::AbsoluteCalibration(), MEUPerDiblock::SchedulePlots(), and ValidCalibPDF::SchedulePlots().

14 { return fNDiblocks; }
unsigned int fNDiblocks
Definition: Detector.h:31
unsigned int Detector::NPlanes ( )
inline
void Detector::SetEndOfPeriodMap ( )
private

Definition at line 99 of file Detector.h.

References fEndOfEpochMap, and fEndOfPeriodMap.

Referenced by Detector().

100 {
101  fEndOfPeriodMap["2"] = 1444656758;
102  fEndOfPeriodMap["3"] = 1467229500;
103  fEndOfPeriodMap["4"] = 1479081600;
104  fEndOfPeriodMap["5"] = 1487548800;
105  fEndOfPeriodMap["6"] = 1510059600;
106  fEndOfPeriodMap["7"] = 1530835200;
107  fEndOfPeriodMap["7"] = 1540015200;
108  fEndOfPeriodMap["8"] = 1551139200;
109 
110  fEndOfEpochMap["2a"] = 1426291199;
111  fEndOfEpochMap["2b"] = 1431734399;
112  fEndOfEpochMap["2c"] = 1433756400;
113  fEndOfEpochMap["2d"] = 1435968060;
114  fEndOfEpochMap["2e"] = 1444656758;
115  fEndOfEpochMap["3a"] = 1445600160;
116  fEndOfEpochMap["3b"] = 1447804800;
117  fEndOfEpochMap["3c"] = 1453248000;
118  fEndOfEpochMap["3d"] = 1462175700;
119  fEndOfEpochMap["3e"] = 1467229500;
120  fEndOfEpochMap["4a"] = 1469795700;
121  fEndOfEpochMap["4b"] = 1478822400;
122  fEndOfEpochMap["4c"] = 1479081600;
123  fEndOfEpochMap["5a"] = 1484006400;
124  fEndOfEpochMap["5b"] = 1487548800;
125  fEndOfEpochMap["6a"] = 1499428860;
126  fEndOfEpochMap["6b"] = 1510059600;
127  fEndOfEpochMap["7a"] = 1514764800;
128  fEndOfEpochMap["7b"] = 1521504000;
129  fEndOfEpochMap["7c"] = 1523318400;
130  fEndOfEpochMap["7d"] = 1530835200;
131  fEndOfEpochMap["7e"] = 1540015200;
132  fEndOfEpochMap["8a"] = 1540166400;
133  fEndOfEpochMap["8b"] = 1551139200;
134  fEndOfEpochMap["8b"] = 1551139200;
135  fEndOfEpochMap["9a"] = 1572478302;
136 }
std::map< std::string, uint32_t > fEndOfEpochMap
Definition: Detector.h:36
std::map< std::string, uint32_t > fEndOfPeriodMap
Definition: Detector.h:35

Member Data Documentation

std::map< std::string, uint32_t > Detector::fEndOfEpochMap
private

Definition at line 36 of file Detector.h.

Referenced by EndOfEpochMap(), and SetEndOfPeriodMap().

std::map< std::string, uint32_t > Detector::fEndOfPeriodMap
private

Definition at line 35 of file Detector.h.

Referenced by EndOfPeriodMap(), and SetEndOfPeriodMap().

std::string Detector::fFullName
private

Definition at line 28 of file Detector.h.

Referenced by Detector(), and FullName().

float Detector::fHalfW
private

Definition at line 32 of file Detector.h.

Referenced by Detector(), and HalfW().

std::string Detector::fName
private

Definition at line 27 of file Detector.h.

Referenced by IsFD(), IsND(), IsTB(), name(), and Name().

unsigned int Detector::fNCells
private

Definition at line 29 of file Detector.h.

Referenced by Detector(), and NCells().

unsigned int Detector::fNDiblocks
private

Definition at line 31 of file Detector.h.

Referenced by Detector(), and NDiblocks().

unsigned int Detector::fNPlanes
private

Definition at line 30 of file Detector.h.

Referenced by Detector(), and NPlanes().


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