66 : subtractT0_(
pset.getParameter<
bool>(
"subtractT0")),
94 for (dtLayerIt = digis->begin(); dtLayerIt != digis->end(); ++dtLayerIt) {
99 const DTLayerId layerId = (*dtLayerIt).first;
103 const DTWireId wireId(layerId, (*digi).wire());
105 double t0 = (*digi).countsTDC();
131 std::map<DTLayerId, TH1F*> meanHistoMap;
132 std::map<DTLayerId, TH1F*> sigmaHistoMap;
141 double mean = sumW / nDigis;
146 if (meanHistoMap.find(layerId) == meanHistoMap.end()) {
150 TH1F* meanHistoTP =
new TH1F((
histoName +
"_tpMean").c_str(),
151 "mean from test pulses by channel",
154 (firstChannel + nWires));
155 TH1F* sigmaHistoTP =
new TH1F((
histoName +
"_tpSigma").c_str(),
156 "sigma from test pulses by channel",
159 (firstChannel + nWires));
160 meanHistoMap[layerId] = meanHistoTP;
161 sigmaHistoMap[layerId] = sigmaHistoTP;
164 int nBin = meanHistoMap[layerId]->GetXaxis()->FindFixBin(wireId.
wire());
165 meanHistoMap[layerId]->SetBinContent(
nBin,
mean);
166 sigmaHistoMap[layerId]->SetBinContent(
nBin,
rms);
169 for (std::map<DTLayerId, TH1F*>::const_iterator
key = meanHistoMap.begin();
key != meanHistoMap.end(); ++
key) {
170 meanHistoMap[(*key).first]->Write();
171 sigmaHistoMap[(*key).first]->Write();
177 std::stringstream theStream;
int station() const
Return the station number.
int wire() const
Return the wire number.
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
DTTPAnalyzer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
std::map< DTWireId, double > sumWPerWire_
std::map< DTWireId, int > nDigisPerWire_
constexpr std::array< uint8_t, layerIndexSize > layer
std::string getHistoName(const DTLayerId &)
int firstChannel() const
Returns the wire number of the first wire.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::unique_ptr< DTTTrigBaseSync > tTrigSync_
const DTTopology & specificTopology() const
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< DTWireId, double > sumW2PerWire_
int superlayer() const
Return the superlayer number (deprecated method name)
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
int layer() const
Return the layer number.
int wheel() const
Return the wheel number.
edm::ESHandle< DTGeometry > dtGeom_
DTLayerId layerId() const
Return the corresponding LayerId.
int channels() const
Returns the number of wires in the layer.
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.