69 subtractT0_(pset.getParameter<bool>(
"subtractT0")),
70 digiLabel_(pset.getParameter<edm::
InputTag>(
"digiLabel")),
74 rootFile_ =
new TFile(rootFileName.c_str(),
"RECREATE");
107 for (dtLayerIt = digis->begin();
108 dtLayerIt != digis->end();
114 const DTLayerId layerId = (*dtLayerIt).first;
118 digi != digiRange.second;
120 const DTWireId wireId( layerId, (*digi).wire() );
122 double t0 = (*digi).countsTDC();
149 std::map<DTLayerId, TH1F*> meanHistoMap;
150 std::map<DTLayerId, TH1F*> sigmaHistoMap;
151 for(std::map<DTWireId, int>::const_iterator wireIdIt =
nDigisPerWire_.begin();
159 double mean = sumW/nDigis;
160 double rms = sumW2/nDigis - mean*
mean;
164 if(meanHistoMap.find(layerId) == meanHistoMap.end()) {
166 const int firstChannel =
dtGeom_->layer(layerId)->specificTopology().firstChannel();
167 const int nWires =
dtGeom_->layer(layerId)->specificTopology().channels();
168 TH1F* meanHistoTP =
new TH1F((histoName +
"_tpMean").c_str(),
"mean from test pulses by channel",
169 nWires,firstChannel,(firstChannel + nWires));
170 TH1F* sigmaHistoTP =
new TH1F((histoName +
"_tpSigma").c_str(),
"sigma from test pulses by channel",
171 nWires,firstChannel,(firstChannel + nWires));
172 meanHistoMap[layerId] = meanHistoTP;
173 sigmaHistoMap[layerId] = sigmaHistoTP;
176 int nBin = meanHistoMap[layerId]->GetXaxis()->FindFixBin(wireId.
wire());
177 meanHistoMap[layerId]->SetBinContent(nBin,mean);
178 sigmaHistoMap[layerId]->SetBinContent(nBin,rms);
181 for(std::map<DTLayerId, TH1F*>::const_iterator
key = meanHistoMap.begin();
182 key != meanHistoMap.end(); ++
key){
183 meanHistoMap[(*key).first]->Write();
184 sigmaHistoMap[(*key).first]->Write();
191 std::stringstream theStream;
194 theStream >> histoName;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTTPAnalyzer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
std::map< DTWireId, double > sumWPerWire_
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos)
std::map< DTWireId, int > nDigisPerWire_
int layer() const
Return the layer number.
DTTTrigBaseSync * tTrigSync_
std::string getHistoName(const DTLayerId &)
virtual void setES(const edm::EventSetup &setup)=0
Pass the Event Setup to the synchronization module at each event.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< DTWireId, double > sumW2PerWire_
int wire() const
Return the wire number.
int superlayer() const
Return the superlayer number (deprecated method name)
std::vector< DTDigi >::const_iterator const_iterator
void beginRun(const edm::Run &, const edm::EventSetup &) override
DTLayerId layerId() const
Return the corresponding LayerId.
std::pair< const_iterator, const_iterator > Range
edm::ESHandle< DTGeometry > dtGeom_
int station() const
Return the station number.
int wheel() const
Return the wheel number.
T get(const Candidate &c)