CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTTTrigCalibration Class Reference

#include <DTTTrigCalibration.h>

Inheritance diagram for DTTTrigCalibration:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &eventSetup) override
 Fill the time boxes. More...
 
 DTTTrigCalibration (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob () override
 Fit the time box rising edge and write the resulting ttrig to the DB. More...
 
 ~DTTTrigCalibration () override
 Destructor. More...
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void dumpTTrigMap (const DTTtrig *tTrig) const
 
std::string getOccupancyName (const DTLayerId &slId) const
 
std::string getTBoxName (const DTSuperLayerId &slId) const
 
void plotTTrig (const DTTtrig *tTrig) const
 

Private Attributes

bool checkNoisyChannels
 
bool debug
 
std::string digiLabel
 
bool doSubtractT0
 
bool findTMeanAndSigma
 
double kFactor
 
int maxDigiPerLayer
 
int maxTDCCounts
 
TFile * theFile
 
std::unique_ptr< DTTimeBoxFittertheFitter
 
std::map< DTSuperLayerId, TH1F * > theHistoMap
 
std::map< DTLayerId, TH1F * > theOccupancyMap
 
edm::ESGetToken< DTStatusFlag,
DTStatusFlagRcd
theStatusMapToken
 
std::unique_ptr< DTTTrigBaseSynctheSync
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Analyzer class which fills time box plots with SL granularity for t_trig computation, fits the rising edge and write results to DB. The time boxes are written to file.

Author
G. Cerminara - INFN Torino

Definition at line 33 of file DTTTrigCalibration.h.

Constructor & Destructor Documentation

DTTTrigCalibration::DTTTrigCalibration ( const edm::ParameterSet pset)

Constructor.

Definition at line 40 of file DTTTrigCalibration.cc.

References gather_cfg::cout, debug, dtT0WireCalibration_cfg::digiLabel, DeDxTools::esConsumes(), get, edm::ParameterSet::getUntrackedParameter(), HLT_FULL_cff::InputTag, dtT0Analyzer_cfg::rootFileName, and interactiveExample::theFile.

40  {
41  // Get the debug parameter for verbose output
42  debug = pset.getUntrackedParameter<bool>("debug");
43 
44  // Get the label to retrieve digis from the event
45  digiLabel = pset.getUntrackedParameter<string>("digiLabel");
46  consumes<DTDigiCollection>(edm::InputTag(digiLabel));
47 
48  // Switch on/off the DB writing
49  findTMeanAndSigma = pset.getUntrackedParameter<bool>("fitAndWrite", false);
50 
51  // The TDC time-window (ns)
52  maxTDCCounts = 5000 * pset.getUntrackedParameter<int>("tdcRescale", 1);
53  //The maximum number of digis per layer
54  maxDigiPerLayer = pset.getUntrackedParameter<int>("maxDigiPerLayer", 10);
55 
56  // The root file which will contain the histos
57  string rootFileName = pset.getUntrackedParameter<string>("rootFileName");
58  theFile = new TFile(rootFileName.c_str(), "RECREATE");
59  theFile->cd();
60  theFitter = std::make_unique<DTTimeBoxFitter>();
61  if (debug)
62  theFitter->setVerbosity(1);
63 
64  double sigmaFit = pset.getUntrackedParameter<double>("sigmaTTrigFit", 10.);
65  theFitter->setFitSigma(sigmaFit);
66 
67  doSubtractT0 = pset.getUntrackedParameter<bool>("doSubtractT0", "false");
68  // Get the synchronizer
69  if (doSubtractT0) {
70  theSync = DTTTrigSyncFactory::get()->create(pset.getUntrackedParameter<string>("tTrigMode"),
71  pset.getUntrackedParameter<ParameterSet>("tTrigModeConfig"),
73  }
74 
75  checkNoisyChannels = pset.getUntrackedParameter<bool>("checkNoisyChannels", "false");
76 
77  // the kfactor to be uploaded in the ttrig DB
78  kFactor = pset.getUntrackedParameter<double>("kFactor", -0.7);
79 
80  if (debug)
81  cout << "[DTTTrigCalibration]Constructor called!" << endl;
82 
83  if (checkNoisyChannels) {
85  }
86 }
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< DTTimeBoxFitter > theFitter
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::unique_ptr< DTTTrigBaseSync > theSync
tuple cout
Definition: gather_cfg.py:144
#define get
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > theStatusMapToken
DTTTrigCalibration::~DTTTrigCalibration ( )
override

Destructor.

Definition at line 89 of file DTTTrigCalibration.cc.

References gather_cfg::cout, debug, and interactiveExample::theFile.

89  {
90  if (debug)
91  cout << "[DTTTrigCalibration]Destructor called!" << endl;
92 
93  // // Delete all histos
94  // for(map<DTSuperLayerId, TH1F*>::const_iterator slHisto = theHistoMap.begin();
95  // slHisto != theHistoMap.end();
96  // slHisto++) {
97  // delete (*slHisto).second;
98  // }
99 
100  theFile->Close();
101 }
tuple cout
Definition: gather_cfg.py:144

Member Function Documentation

void DTTTrigCalibration::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Fill the time boxes.

Perform the real analysis.

Implements edm::one::EDAnalyzerBase.

Definition at line 104 of file DTTTrigCalibration.cc.

References DTLayer::chamber(), DTSuperLayerId::chamberId(), gather_cfg::cout, debug, dtT0WireCalibration_cfg::digiLabel, edm::EventSetup::getHandle(), phase1PixelTopology::layer, hltrates_dqm_sourceclient-live_cfg::offset, DTLayerId::superlayerId(), and interactiveExample::theFile.

104  {
105  if (debug)
106  cout << "[DTTTrigCalibration] #Event: " << event.id().event() << endl;
107 
108  // Get the digis from the event
110  event.getByLabel(digiLabel, digis);
111 
112  ESHandle<DTStatusFlag> statusMap;
113  if (checkNoisyChannels) {
114  // Get the map of noisy channels
115  statusMap = eventSetup.getHandle(theStatusMapToken);
116  }
117 
118  if (doSubtractT0)
119  theSync->setES(eventSetup);
120 
121  //The chambers too noisy in this event
122  vector<DTChamberId> badChambers;
123 
124  // Iterate through all digi collections ordered by LayerId
126  for (dtLayerIt = digis->begin(); dtLayerIt != digis->end(); ++dtLayerIt) {
127  // Get the iterators over the digis associated with this LayerId
128  const DTDigiCollection::Range& digiRange = (*dtLayerIt).second;
129 
130  const DTLayerId layerId = (*dtLayerIt).first;
131  const DTSuperLayerId slId = layerId.superlayerId();
132  const DTChamberId chId = slId.chamberId();
133  bool badChamber = false;
134 
135  if (debug)
136  cout << "----------- Layer " << layerId << " -------------" << endl;
137 
138  //Check if the layer is inside a noisy chamber
139  for (vector<DTChamberId>::const_iterator chamber = badChambers.begin(); chamber != badChambers.end(); ++chamber) {
140  if ((*chamber) == chId) {
141  badChamber = true;
142  break;
143  }
144  }
145  if (badChamber)
146  continue;
147 
148  //Check if the layer has too many digis
149  if ((digiRange.second - digiRange.first) > maxDigiPerLayer) {
150  if (debug)
151  cout << "Layer " << layerId << "has too many digis (" << (digiRange.second - digiRange.first) << ")" << endl;
152  badChambers.push_back(chId);
153  continue;
154  }
155 
156  // Get the histo from the map
157  TH1F* hTBox = theHistoMap[slId];
158  if (hTBox == nullptr) {
159  // Book the histogram
160  theFile->cd();
161  hTBox =
162  new TH1F(getTBoxName(slId).c_str(), "Time box (ns)", int(0.25 * 32.0 * maxTDCCounts / 25.0), 0, maxTDCCounts);
163  if (debug)
164  cout << " New Time Box: " << hTBox->GetName() << endl;
165  theHistoMap[slId] = hTBox;
166  }
167  TH1F* hO = theOccupancyMap[layerId];
168  if (hO == nullptr) {
169  // Book the histogram
170  theFile->cd();
171  hO = new TH1F(getOccupancyName(layerId).c_str(), "Occupancy", 100, 0, 100);
172  if (debug)
173  cout << " New Time Box: " << hO->GetName() << endl;
174  theOccupancyMap[layerId] = hO;
175  }
176 
177  // Loop over all digis in the given range
178  for (DTDigiCollection::const_iterator digi = digiRange.first; digi != digiRange.second; ++digi) {
179  const DTWireId wireId(layerId, (*digi).wire());
180 
181  // Check for noisy channels and skip them
182  if (checkNoisyChannels) {
183  bool isNoisy = false;
184  bool isFEMasked = false;
185  bool isTDCMasked = false;
186  bool isTrigMask = false;
187  bool isDead = false;
188  bool isNohv = false;
189  statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
190  if (isNoisy) {
191  if (debug)
192  cout << "Wire: " << wireId << " is noisy, skipping!" << endl;
193  continue;
194  }
195  }
196  theFile->cd();
197  double offset = 0;
198  if (doSubtractT0) {
199  const DTLayer* layer = nullptr; //fake
200  const GlobalPoint glPt; //fake
201  offset = theSync->offset(layer, wireId, glPt);
202  }
203  hTBox->Fill((*digi).time() - offset);
204  if (debug) {
205  cout << " Filling Time Box: " << hTBox->GetName() << endl;
206  cout << " offset (ns): " << offset << endl;
207  cout << " time(ns): " << (*digi).time() - offset << endl;
208  }
209  hO->Fill((*digi).wire());
210  }
211  }
212 }
std::map< DTSuperLayerId, TH1F * > theHistoMap
DTChamberId chamberId() const
Return the corresponding ChamberId.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45
std::string getTBoxName(const DTSuperLayerId &slId) const
constexpr std::array< uint8_t, layerIndexSize > layer
std::unique_ptr< DTTTrigBaseSync > theSync
std::string getOccupancyName(const DTLayerId &slId) const
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
tuple cout
Definition: gather_cfg.py:144
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
std::map< DTLayerId, TH1F * > theOccupancyMap
edm::ESGetToken< DTStatusFlag, DTStatusFlagRcd > theStatusMapToken
void DTTTrigCalibration::dumpTTrigMap ( const DTTtrig tTrig) const
private

Definition at line 280 of file DTTTrigCalibration.cc.

References DTTtrig::begin(), gather_cfg::cout, and DTTtrig::end().

280  {
281  static const double convToNs = 25. / 32.;
282  for (DTTtrig::const_iterator ttrig = tTrig->begin(); ttrig != tTrig->end(); ++ttrig) {
283  cout << "Wh: " << (*ttrig).first.wheelId << " St: " << (*ttrig).first.stationId
284  << " Sc: " << (*ttrig).first.sectorId << " Sl: " << (*ttrig).first.slId
285  << " TTrig mean (ns): " << (*ttrig).second.tTrig * convToNs
286  << " TTrig sigma (ns): " << (*ttrig).second.tTrms * convToNs << endl;
287  }
288 }
std::vector< std::pair< DTTtrigId, DTTtrigData > >::const_iterator const_iterator
Access methods to data.
Definition: DTTtrig.h:141
const_iterator begin() const
Definition: DTTtrig.cc:250
tuple cout
Definition: gather_cfg.py:144
const_iterator end() const
Definition: DTTtrig.cc:252
void DTTTrigCalibration::endJob ( void  )
overridevirtual

Fit the time box rising edge and write the resulting ttrig to the DB.

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 214 of file DTTTrigCalibration.cc.

References gather_cfg::cout, debug, DTTimeUnits::ns, DTTtrig::set(), interactiveExample::theFile, and DTCalibDBUtils::writeToDB().

Referenced by o2olib.O2ORunMgr::executeJob().

214  {
215  if (debug)
216  cout << "[DTTTrigCalibration]Writing histos to file!" << endl;
217 
218  // Write all time boxes to file
219  theFile->cd();
220  for (map<DTSuperLayerId, TH1F*>::const_iterator slHisto = theHistoMap.begin(); slHisto != theHistoMap.end();
221  ++slHisto) {
222  (*slHisto).second->Write();
223  }
224  for (map<DTLayerId, TH1F*>::const_iterator slHisto = theOccupancyMap.begin(); slHisto != theOccupancyMap.end();
225  ++slHisto) {
226  (*slHisto).second->Write();
227  }
228 
229  if (findTMeanAndSigma) {
230  // Create the object to be written to DB
231  DTTtrig* tTrig = new DTTtrig();
232 
233  // Loop over the map, fit the histos and write the resulting values to the DB
234  for (map<DTSuperLayerId, TH1F*>::const_iterator slHisto = theHistoMap.begin(); slHisto != theHistoMap.end();
235  ++slHisto) {
236  pair<double, double> meanAndSigma = theFitter->fitTimeBox((*slHisto).second);
237  tTrig->set((*slHisto).first, meanAndSigma.first, meanAndSigma.second, kFactor, DTTimeUnits::ns);
238 
239  if (debug) {
240  cout << " SL: " << (*slHisto).first << " mean = " << meanAndSigma.first << " sigma = " << meanAndSigma.second
241  << endl;
242  }
243  }
244 
245  // Print the ttrig map
246  dumpTTrigMap(tTrig);
247 
248  // Plot the tTrig
249  plotTTrig(tTrig);
250 
251  if (debug)
252  cout << "[DTTTrigCalibration]Writing ttrig object to DB!" << endl;
253 
254  // FIXME: to be read from cfg?
255  string tTrigRecord = "DTTtrigRcd";
256 
257  // Write the object to DB
258  DTCalibDBUtils::writeToDB(tTrigRecord, tTrig);
259  }
260 }
std::map< DTSuperLayerId, TH1F * > theHistoMap
static void writeToDB(std::string record, const T &payload)
int set(int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit)
Definition: DTTtrig.cc:172
std::unique_ptr< DTTimeBoxFitter > theFitter
void plotTTrig(const DTTtrig *tTrig) const
tuple cout
Definition: gather_cfg.py:144
std::map< DTLayerId, TH1F * > theOccupancyMap
void dumpTTrigMap(const DTTtrig *tTrig) const
string DTTTrigCalibration::getOccupancyName ( const DTLayerId slId) const
private

Definition at line 271 of file DTTTrigCalibration.cc.

References DTLayerId::layer(), DTChamberId::sector(), DTChamberId::station(), DTSuperLayerId::superlayer(), and DTChamberId::wheel().

271  {
272  string histoName;
273  stringstream theStream;
274  theStream << "Ch_" << slId.wheel() << "_" << slId.station() << "_" << slId.sector() << "_SL" << slId.superlayer()
275  << "_L" << slId.layer() << "_Occupancy";
276  theStream >> histoName;
277  return histoName;
278 }
int layer() const
Return the layer number.
Definition: DTLayerId.h:42
int superlayer() const
Return the superlayer number (deprecated method name)
int sector() const
Definition: DTChamberId.h:49
int station() const
Return the station number.
Definition: DTChamberId.h:42
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
string DTTTrigCalibration::getTBoxName ( const DTSuperLayerId slId) const
private

Definition at line 262 of file DTTTrigCalibration.cc.

References DTChamberId::sector(), DTChamberId::station(), DTSuperLayerId::superlayer(), and DTChamberId::wheel().

262  {
263  string histoName;
264  stringstream theStream;
265  theStream << "Ch_" << slId.wheel() << "_" << slId.station() << "_" << slId.sector() << "_SL" << slId.superlayer()
266  << "_hTimeBox";
267  theStream >> histoName;
268  return histoName;
269 }
int superlayer() const
Return the superlayer number (deprecated method name)
int sector() const
Definition: DTChamberId.h:49
int station() const
Return the station number.
Definition: DTChamberId.h:42
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
void DTTTrigCalibration::plotTTrig ( const DTTtrig tTrig) const
private

Definition at line 290 of file DTTTrigCalibration.cc.

References DTTtrig::begin(), and DTTtrig::end().

290  {
291  TH1F* tTrig_YB1_Se10 = new TH1F("tTrig_YB1_Se10", "tTrig YB1_Se10", 15, 1, 16);
292  TH1F* tTrig_YB2_Se10 = new TH1F("tTrig_YB2_Se10", "tTrig YB2_Se10", 15, 1, 16);
293  TH1F* tTrig_YB2_Se11 = new TH1F("tTrig_YB2_Se11", "tTrig YB2_Se11", 12, 1, 13);
294 
295  static const double convToNs = 25. / 32.;
296  for (DTTtrig::const_iterator ttrig = tTrig->begin(); ttrig != tTrig->end(); ++ttrig) {
297  // avoid to have wired numbers in the plot
298  float tTrigValue = 0;
299  float tTrmsValue = 0;
300  if ((*ttrig).second.tTrig * convToNs > 0 && (*ttrig).second.tTrig * convToNs < 32000) {
301  tTrigValue = (*ttrig).second.tTrig * convToNs;
302  tTrmsValue = (*ttrig).second.tTrms * convToNs;
303  }
304 
305  int binx;
306  string binLabel;
307  stringstream binLabelStream;
308  if ((*ttrig).first.sectorId != 14) {
309  binx = ((*ttrig).first.stationId - 1) * 3 + (*ttrig).first.slId;
310  binLabelStream << "MB" << (*ttrig).first.stationId << "_SL" << (*ttrig).first.slId;
311  } else {
312  binx = 12 + (*ttrig).first.slId;
313  binLabelStream << "MB14_SL" << (*ttrig).first.slId;
314  }
315  binLabelStream >> binLabel;
316 
317  if ((*ttrig).first.wheelId == 2) {
318  if ((*ttrig).first.sectorId == 10 || (*ttrig).first.sectorId == 14) {
319  tTrig_YB2_Se10->Fill(binx, tTrigValue);
320  tTrig_YB2_Se10->SetBinError(binx, tTrmsValue);
321  tTrig_YB2_Se10->GetXaxis()->SetBinLabel(binx, binLabel.c_str());
322  tTrig_YB2_Se10->GetYaxis()->SetTitle("ns");
323  } else {
324  tTrig_YB2_Se11->Fill(binx, tTrigValue);
325  tTrig_YB2_Se11->SetBinError(binx, tTrmsValue);
326  tTrig_YB2_Se11->GetXaxis()->SetBinLabel(binx, binLabel.c_str());
327  tTrig_YB2_Se11->GetYaxis()->SetTitle("ns");
328  }
329  } else {
330  tTrig_YB1_Se10->Fill(binx, tTrigValue);
331  tTrig_YB1_Se10->SetBinError(binx, tTrmsValue);
332  tTrig_YB1_Se10->GetXaxis()->SetBinLabel(binx, binLabel.c_str());
333  tTrig_YB1_Se10->GetYaxis()->SetTitle("ns");
334  }
335  }
336 
337  tTrig_YB1_Se10->Write();
338  tTrig_YB2_Se10->Write();
339  tTrig_YB2_Se11->Write();
340 }
std::vector< std::pair< DTTtrigId, DTTtrigData > >::const_iterator const_iterator
Access methods to data.
Definition: DTTtrig.h:141
const_iterator begin() const
Definition: DTTtrig.cc:250
const_iterator end() const
Definition: DTTtrig.cc:252

Member Data Documentation

bool DTTTrigCalibration::checkNoisyChannels
private

Definition at line 83 of file DTTTrigCalibration.h.

bool DTTTrigCalibration::debug
private
std::string DTTTrigCalibration::digiLabel
private

Definition at line 66 of file DTTTrigCalibration.h.

bool DTTTrigCalibration::doSubtractT0
private

Definition at line 81 of file DTTTrigCalibration.h.

bool DTTTrigCalibration::findTMeanAndSigma
private

Definition at line 85 of file DTTTrigCalibration.h.

double DTTTrigCalibration::kFactor
private

Definition at line 87 of file DTTTrigCalibration.h.

int DTTTrigCalibration::maxDigiPerLayer
private

Definition at line 71 of file DTTTrigCalibration.h.

int DTTTrigCalibration::maxTDCCounts
private

Definition at line 69 of file DTTTrigCalibration.h.

TFile* DTTTrigCalibration::theFile
private

Definition at line 74 of file DTTTrigCalibration.h.

std::unique_ptr<DTTimeBoxFitter> DTTTrigCalibration::theFitter
private

Definition at line 90 of file DTTTrigCalibration.h.

std::map<DTSuperLayerId, TH1F*> DTTTrigCalibration::theHistoMap
private

Definition at line 77 of file DTTTrigCalibration.h.

std::map<DTLayerId, TH1F*> DTTTrigCalibration::theOccupancyMap
private

Definition at line 78 of file DTTTrigCalibration.h.

edm::ESGetToken<DTStatusFlag, DTStatusFlagRcd> DTTTrigCalibration::theStatusMapToken
private

Definition at line 93 of file DTTTrigCalibration.h.

std::unique_ptr<DTTTrigBaseSync> DTTTrigCalibration::theSync
private

Definition at line 92 of file DTTTrigCalibration.h.