35 theRecHits4DLabel_(pset.getParameter<
InputTag>(
"recHits4DLabel")),
37 theCalibChamber_(pset.getUntrackedParameter<
string>(
"calibChamber",
"All")) {
39 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Constructor called!";
46 rootFile_ =
new TFile(rootFileName.c_str(),
"RECREATE");
51 TH1::SetDefaultSumw2(
true);
58 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Destructor called!";
75 int selWheel, selStation, selSector;
77 linestr >> selWheel >> selStation >> selSector;
78 chosenChamberId =
DTChamberId(selWheel, selStation, selSector);
79 LogVerbatim(
"Calibration") <<
" Chosen chamber: " << chosenChamberId << endl;
83 for(chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt){
86 if((
theCalibChamber_ !=
"All") && ((*chamberIdIt) != chosenChamberId))
continue;
90 LogTrace(
"Calibration") <<
" Booking histos for Chamber: " << *chamberIdIt;
100 segment != range.second; ++segment){
103 LogTrace(
"Calibration") <<
"Segment local pos (in chamber RF): " << (*segment).localPosition()
104 <<
"\nSegment global pos: " << chamber->
toGlobal((*segment).localPosition());
106 if( !(*
select_)(*segment,
event, eventSetup) )
continue;
109 if( (*segment).hasPhi() ) {
111 double segmentVDrift = segment->phiSegment()->vDrift();
112 if( segmentVDrift != 0.00 ){
119 if( (*segment).hasZed() ){
121 double segmentVDrift = segment->zSegment()->vDrift();
122 if( segmentVDrift != 0.00 ){
133 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Writing histos to file!" << endl;
136 vector<TH1F*>::const_iterator itHistTH1F = (*itChHistos).second.begin();
137 vector<TH1F*>::const_iterator itHistTH1F_end = (*itChHistos).second.end();
138 for(; itHistTH1F != itHistTH1F_end; ++itHistTH1F) (*itHistTH1F)->Write();
142 for(; itHistTH2F != itHistTH2F_end; ++itHistTH2F) (*itHistTH2F)->Write();
163 vector<TH1F*> histosTH1F;
164 histosTH1F.push_back(
new TH1F((
"hRPhiVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Phi segments", 200, -0.4, 0.4));
165 if(chId.
station() != 4) histosTH1F.push_back(
new TH1F((
"hRZVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Z segments", 200, -0.4, 0.4));
167 vector<TH2F*> histosTH2F;
168 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosX" + chHistoName).c_str(),
"v-drift corr. vs. segment x position", 250, -125., 125., 200, -0.4, 0.4));
169 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosY" + chHistoName).c_str(),
"v-drift corr. vs. segment y position", 250, -125., 125., 200, -0.4, 0.4));
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
DTSegmentSelector * select_
std::pair< const_iterator, const_iterator > range
iterator range
edm::InputTag theRecHits4DLabel_
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
def setup(process, global_tag, zero_tesla=False)
~DTVDriftSegmentCalibration() override
C::const_iterator const_iterator
constant access iterator type
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
ChamberHistosMapTH1F theVDriftHistoMapTH1F_
ChamberHistosMapTH2F theVDriftHistoMapTH2F_
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
void bookHistos(DTChamberId)
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
std::string theCalibChamber_
int station() const
Return the station number.
int wheel() const
Return the wheel number.
DTVDriftSegmentCalibration(const edm::ParameterSet &pset)