2626
2727#include < TH1F.h>
2828#include < TF1.h>
29- #include < TTree.h>
3029
3130namespace mu2e
3231{
@@ -64,10 +63,6 @@ namespace mu2e
6463 double _maxADCspread;
6564 std::string _tmpDBfileName;
6665 std::vector<TH1F *> _pedestalHists;
67-
68- ProditionsHandle<CRVCalib> _calib_h;
69-
70- std::vector<double > _timeOffsets;
7166 };
7267
7368
@@ -91,7 +86,6 @@ namespace mu2e
9186 GeomHandle<CosmicRayShield> CRS ;
9287 const std::vector<std::shared_ptr<CRSScintillatorBar> > &counters = CRS ->getAllCRSScintillatorBars ();
9388 _pedestalHists.reserve (counters.size ()*CRVId::nChanPerBar);
94- _timeOffsets.resize (counters.size ()*CRVId::nChanPerBar);
9589
9690 art::ServiceHandle<art::TFileService> tfs;
9791 for (size_t barIndex=0 ; barIndex<counters.size (); ++barIndex)
@@ -103,7 +97,6 @@ namespace mu2e
10397 _pedestalHists.emplace_back (tfs->make <TH1F >(Form (" crvPedestalHist_%lu" ,channelIndex),
10498 Form (" crvPedestalHist_%lu" ,channelIndex),
10599 _histBins,_histMin,_histMax));
106- _timeOffsets[channelIndex]=0 ;
107100 }
108101 }
109102 }
@@ -144,25 +137,6 @@ namespace mu2e
144137 outputFile<<channel<<" ," <<funcPedestal.GetParameter (1 )<<" ,-1,-1" <<std::endl; // only print out pedestal values
145138 }
146139
147- outputFile<<std::endl;
148-
149- // time offsets
150- art::ServiceHandle<art::TFileService> tfs;
151- TTree *treeTimeOffsets = tfs->make <TTree>(" crvTimeOffsets" ," crvTimeOffsets" );
152- size_t channel;
153- double offset;
154- treeTimeOffsets->Branch (" channel" , &channel);
155- treeTimeOffsets->Branch (" timeOffset" , &offset);
156-
157- outputFile<<" TABLE CRVTime" <<std::endl;
158- outputFile<<" #channel, timeOffset" <<std::endl;
159- for (channel=0 ; channel<_timeOffsets.size (); ++channel)
160- {
161- offset=_timeOffsets.at (channel);
162- outputFile<<channel<<" ," <<offset<<std::endl; // write to temporary DB text file
163- treeTimeOffsets->Fill (); // fill tree
164- }
165-
166140 outputFile.close ();
167141 }
168142
@@ -171,19 +145,6 @@ namespace mu2e
171145 art::Handle<CrvDigiCollection> crvDigiCollection;
172146 if (!event.getByLabel (_crvDigiModuleLabel,(_useNZS?" NZS" :" " ),crvDigiCollection)) return ;
173147
174- // find time offsets from first event
175- // need to assume that this is only used for calibration runs where the time offsets stay constant over the entire run
176- static bool first=true ;
177- if (first)
178- {
179- first=false ;
180- auto const & calib = _calib_h.get (event.id ());
181- for (size_t channelIndex=0 ; channelIndex<_timeOffsets.size (); ++channelIndex)
182- {
183- _timeOffsets[channelIndex] = calib.timeOffset (channelIndex);
184- }
185- }
186-
187148 for (auto iter=crvDigiCollection->begin (); iter!=crvDigiCollection->end (); ++iter)
188149 {
189150 int barIndex = iter->GetScintillatorBarIndex ().asInt ();
0 commit comments