All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
icarus::crt::CRTCalibrationAnalysis Class Reference
Inheritance diagram for icarus::crt::CRTCalibrationAnalysis:

Classes

struct  Config
 

Public Types

using Parameters = art::EDAnalyzer::Table< Config >
 

Public Member Functions

 CRTCalibrationAnalysis (Parameters const &config)
 Constructor: configures the module (see the Config structure above) More...
 
virtual void beginJob () override
 
virtual void beginRun (const art::Run &run) override
 
virtual void analyze (const art::Event &event) override
 

Private Attributes

art::ServiceHandle
< art::TFileService > 
tfs
 
map< uint8_t, vector< TH1F * > * > macToHistos
 
art::InputTag fCRTDAQProducerLabel
 
geo::GeometryCore const * fGeometryService
 pointer to Geometry provider More...
 
int fTriggerOffset
 (units of ticks) time of expected neutrino event More...
 
CRTCommonUtilsfCrtutils
 

Detailed Description

Definition at line 72 of file CRTCalibrationAnalysis_module.cc.

Member Typedef Documentation

Definition at line 90 of file CRTCalibrationAnalysis_module.cc.

Constructor & Destructor Documentation

icarus::crt::CRTCalibrationAnalysis::CRTCalibrationAnalysis ( Parameters const &  config)
explicit

Constructor: configures the module (see the Config structure above)

Definition at line 119 of file CRTCalibrationAnalysis_module.cc.

120  : EDAnalyzer(config)
121  , fCRTDAQProducerLabel(config().CRTDAQLabel())
122  , fCrtutils(new CRTCommonUtils())
123  {
124  // Get a pointer to the geometry service provider.
125  fGeometryService = lar::providerFrom<geo::Geometry>();
126  // The same for detector TDC clock services.
127  // Access to detector properties.
128  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
129  fTriggerOffset = trigger_offset(clockData);
130 
131  for(int i=1; i<232; i++){
132 
133  macToHistos[i] = new vector<TH1F*>();
134 
135  for(int ch=0; ch<32; ch++){
136 
137  string hname = "hadc_"+to_string(i)+"_"+to_string(ch);
138  string htitle = "raw charge: mac5 "+to_string(i)+", ch. "+to_string(ch);
139  macToHistos[i]->push_back(tfs->make<TH1F>(hname.c_str(),htitle.c_str(),4100,0,4100));
140  }
141  }
142  }
art::ServiceHandle< art::TFileService > tfs
int fTriggerOffset
(units of ticks) time of expected neutrino event
map< uint8_t, vector< TH1F * > * > macToHistos
geo::GeometryCore const * fGeometryService
pointer to Geometry provider
std::string to_string(WindowPattern const &pattern)
int trigger_offset(DetectorClocksData const &data)

Member Function Documentation

void icarus::crt::CRTCalibrationAnalysis::analyze ( const art::Event &  event)
overridevirtual

Definition at line 154 of file CRTCalibrationAnalysis_module.cc.

155  {
156  MF_LOG_DEBUG("CRTCalibrationAnalysis") << "beginning analyis" << '\n';
157 
158 
159  art::Handle<vector<icarus::crt::CRTData>> crtDAQHandle;
160  bool isCRTDAQ = event.getByLabel(fCRTDAQProducerLabel, crtDAQHandle);
161 
162  if (isCRTDAQ) {
163  MF_LOG_DEBUG("CRTCalibrationAnalysis") << "about to loop over CRTDAQ entries" << '\n';
164 
165  for ( auto const& febdat : (*crtDAQHandle) ) {
166 
167  for(int ch=0; ch<32; ch++) {
168  macToHistos[febdat.fMac5]->at(ch)->Fill( febdat.fAdc[ch] );
169  }
170 
171  } //for CRT FEB events
172 
173  }//if crtdetsim products present
174 
175  else
176  mf::LogError("CRTCalibrationAnalysis") << "CRTDAQ products not found!" << std::endl;
177 
178  } // CRTCalibrationAnalysis::analyze()
map< uint8_t, vector< TH1F * > * > macToHistos
void icarus::crt::CRTCalibrationAnalysis::beginJob ( )
overridevirtual

Definition at line 145 of file CRTCalibrationAnalysis_module.cc.

146  {
147  }
void icarus::crt::CRTCalibrationAnalysis::beginRun ( const art::Run &  run)
overridevirtual

Definition at line 149 of file CRTCalibrationAnalysis_module.cc.

150  {
151  }

Member Data Documentation

art::InputTag icarus::crt::CRTCalibrationAnalysis::fCRTDAQProducerLabel
private

Definition at line 108 of file CRTCalibrationAnalysis_module.cc.

CRTCommonUtils* icarus::crt::CRTCalibrationAnalysis::fCrtutils
private

Definition at line 113 of file CRTCalibrationAnalysis_module.cc.

geo::GeometryCore const* icarus::crt::CRTCalibrationAnalysis::fGeometryService
private

pointer to Geometry provider

Definition at line 111 of file CRTCalibrationAnalysis_module.cc.

int icarus::crt::CRTCalibrationAnalysis::fTriggerOffset
private

(units of ticks) time of expected neutrino event

Definition at line 112 of file CRTCalibrationAnalysis_module.cc.

map<uint8_t,vector<TH1F*>*> icarus::crt::CRTCalibrationAnalysis::macToHistos
private

Definition at line 105 of file CRTCalibrationAnalysis_module.cc.

art::ServiceHandle<art::TFileService> icarus::crt::CRTCalibrationAnalysis::tfs
private

Definition at line 103 of file CRTCalibrationAnalysis_module.cc.


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