66 : subtractT0_(
pset.getParameter<
bool>(
"subtractT0")),
93 for (dtLayerIt = digis->begin(); dtLayerIt != digis->end(); ++dtLayerIt) {
98 const DTLayerId layerId = (*dtLayerIt).first;
102 const DTWireId wireId(layerId, (*digi).wire());
104 double t0 = (*digi).countsTDC();
130 std::map<DTLayerId, TH1F*> meanHistoMap;
131 std::map<DTLayerId, TH1F*> sigmaHistoMap;
140 double mean = sumW / nDigis;
145 if (meanHistoMap.find(layerId) == meanHistoMap.end()) {
149 TH1F* meanHistoTP =
new TH1F((
histoName +
"_tpMean").c_str(),
150 "mean from test pulses by channel",
153 (firstChannel + nWires));
154 TH1F* sigmaHistoTP =
new TH1F((
histoName +
"_tpSigma").c_str(),
155 "sigma from test pulses by channel",
158 (firstChannel + nWires));
159 meanHistoMap[layerId] = meanHistoTP;
160 sigmaHistoMap[layerId] = sigmaHistoTP;
163 int nBin = meanHistoMap[layerId]->GetXaxis()->FindFixBin(wireId.
wire());
164 meanHistoMap[layerId]->SetBinContent(
nBin,
mean);
165 sigmaHistoMap[layerId]->SetBinContent(
nBin,
rms);
168 for (std::map<DTLayerId, TH1F*>::const_iterator
key = meanHistoMap.begin();
key != meanHistoMap.end(); ++
key) {
169 meanHistoMap[(*key).first]->Write();
170 sigmaHistoMap[(*key).first]->Write();
176 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 &)
std::map< DTWireId, double > sumWPerWire_
std::map< DTWireId, int > nDigisPerWire_
std::string getHistoName(const DTLayerId &)
int firstChannel() const
Returns the wire number of the first wire.
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::unique_ptr< DTTTrigBaseSync > tTrigSync_
#define DEFINE_FWK_MODULE(type)
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.
const edm::EDGetTokenT< DTDigiCollection > digiToken_
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.