CMS 3D CMS Logo

SiStripGainsPCLWorker.cc
Go to the documentation of this file.
3 
4 #include <iostream>
5 #include <sstream>
6 
7 //********************************************************************************//
9  NEvent(0),
10  NTrack(0),
11  NClusterStrip(0),
12  NClusterPixel(0),
13  NStripAPVs(0),
14  NPixelDets(0),
15  SRun(1<<31),
16  ERun(0),
17  bareTkGeomPtr_(nullptr)
18 {
19 
20  MinTrackMomentum = iConfig.getUntrackedParameter<double> ("minTrackMomentum" , 3.0);
21  MaxTrackMomentum = iConfig.getUntrackedParameter<double> ("maxTrackMomentum" , 99999.0);
22  MinTrackEta = iConfig.getUntrackedParameter<double> ("minTrackEta" , -5.0);
23  MaxTrackEta = iConfig.getUntrackedParameter<double> ("maxTrackEta" , 5.0);
24  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips" , 2);
25  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits" , 8);
26  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double> ("MaxTrackChiOverNdf" , 3);
27  MaxTrackingIteration = iConfig.getUntrackedParameter<int> ("MaxTrackingIteration" , 7);
28  AllowSaturation = iConfig.getUntrackedParameter<bool> ("AllowSaturation" , false);
29  FirstSetOfConstants = iConfig.getUntrackedParameter<bool> ("FirstSetOfConstants" , true);
30  Validation = iConfig.getUntrackedParameter<bool> ("Validation" , false);
31  OldGainRemoving = iConfig.getUntrackedParameter<bool> ("OldGainRemoving" , false);
32  useCalibration = iConfig.getUntrackedParameter<bool> ("UseCalibration" , false);
33  m_DQMdir = iConfig.getUntrackedParameter<std::string> ("DQMdir" , "AlCaReco/SiStripGains");
34  m_calibrationMode = iConfig.getUntrackedParameter<std::string> ("calibrationMode" , "StdBunch");
35 
36  //Set the monitoring element tag and store
37  dqm_tag_.reserve(7);
38  dqm_tag_.clear();
39  dqm_tag_.push_back( "StdBunch" ); // statistic collection from Standard Collision Bunch @ 3.8 T
40  dqm_tag_.push_back( "StdBunch0T" ); // statistic collection from Standard Collision Bunch @ 0 T
41  dqm_tag_.push_back( "AagBunch" ); // statistic collection from First Collision After Abort Gap @ 3.8 T
42  dqm_tag_.push_back( "AagBunch0T" ); // statistic collection from First Collision After Abort Gap @ 0 T
43  dqm_tag_.push_back( "IsoMuon" ); // statistic collection from Isolated Muon @ 3.8 T
44  dqm_tag_.push_back( "IsoMuon0T" ); // statistic collection from Isolated Muon @ 0 T
45  dqm_tag_.push_back( "Harvest" ); // statistic collection: Harvest
46 
47  Charge_Vs_Index.insert( Charge_Vs_Index.begin(), dqm_tag_.size(), 0);
48  Charge_Vs_PathlengthTIB.insert( Charge_Vs_PathlengthTIB.begin(), dqm_tag_.size(), 0);
49  Charge_Vs_PathlengthTOB.insert( Charge_Vs_PathlengthTOB.begin(), dqm_tag_.size(), 0);
56 
57  // configure token for gathering the ntuple variables
58  edm::ParameterSet swhallowgain_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("gain");
59 
60  std::string label = swhallowgain_pset.getUntrackedParameter<std::string>("label");
61  CalibPrefix_ = swhallowgain_pset.getUntrackedParameter<std::string>("prefix");
62  CalibSuffix_ = swhallowgain_pset.getUntrackedParameter<std::string>("suffix");
63 
64  trackindex_token_ = consumes<std::vector<int> >(edm::InputTag(label, CalibPrefix_ + "trackindex" + CalibSuffix_));
65  rawid_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, CalibPrefix_ + "rawid" + CalibSuffix_));
66  localdirx_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdirx" + CalibSuffix_));
67  localdiry_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdiry" + CalibSuffix_));
68  localdirz_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "localdirz" + CalibSuffix_));
69  firststrip_token_ = consumes<std::vector<unsigned short> >(edm::InputTag(label, CalibPrefix_ + "firststrip" + CalibSuffix_));
70  nstrips_token_ = consumes<std::vector<unsigned short> >(edm::InputTag(label, CalibPrefix_ + "nstrips" + CalibSuffix_));
71  saturation_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "saturation" + CalibSuffix_));
72  overlapping_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "overlapping" + CalibSuffix_));
73  farfromedge_token_ = consumes<std::vector<bool> >(edm::InputTag(label, CalibPrefix_ + "farfromedge" + CalibSuffix_));
74  charge_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, CalibPrefix_ + "charge" + CalibSuffix_));
75  path_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "path" + CalibSuffix_));
76  chargeoverpath_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "chargeoverpath"+ CalibSuffix_));
77  amplitude_token_ = consumes<std::vector<unsigned char> >(edm::InputTag(label, CalibPrefix_ + "amplitude" + CalibSuffix_));
78  gainused_token_ = consumes<std::vector<double> >(edm::InputTag(label, CalibPrefix_ + "gainused" + CalibSuffix_));
79 
80  edm::ParameterSet evtinfo_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("evtinfo");
81  label = evtinfo_pset.getUntrackedParameter<std::string>("label");
82  EventPrefix_ = evtinfo_pset.getUntrackedParameter<std::string>("prefix");
83  EventSuffix_ = evtinfo_pset.getUntrackedParameter<std::string>("suffix");
84  TrigTech_token_ = consumes<std::vector<bool> >(edm::InputTag(label, EventPrefix_ + "TrigTech" + EventSuffix_));
85 
86  edm::ParameterSet track_pset = iConfig.getUntrackedParameter<edm::ParameterSet>("tracks");
87  label = track_pset.getUntrackedParameter<std::string>("label");
88  TrackPrefix_ = track_pset.getUntrackedParameter<std::string>("prefix");
89  TrackSuffix_ = track_pset.getUntrackedParameter<std::string>("suffix");
90 
91  trackchi2ndof_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "chi2ndof" + TrackSuffix_));
92  trackp_token_ = consumes<std::vector<float> >(edm::InputTag(label, TrackPrefix_ + "momentum" + TrackSuffix_));
93  trackpt_token_ = consumes<std::vector<float> >(edm::InputTag(label, TrackPrefix_ + "pt" + TrackSuffix_));
94  tracketa_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "eta" + TrackSuffix_));
95  trackphi_token_ = consumes<std::vector<double> >(edm::InputTag(label, TrackPrefix_ + "phi" + TrackSuffix_));
96  trackhitsvalid_token_ = consumes<std::vector<unsigned int> >(edm::InputTag(label, TrackPrefix_ + "hitsvalid" + TrackSuffix_));
97  trackalgo_token_ = consumes<std::vector<int> >(edm::InputTag(label, TrackPrefix_ + "algo" + TrackSuffix_));
98 
99 }
100 
101 //********************************************************************************//
102 void
104 
105  using namespace edm;
106 
107  this->checkBookAPVColls(iSetup); // check whether APV colls are booked and do so if not yet done
108 
109  edm::ESHandle<SiStripGain> gainHandle;
110  iSetup.get<SiStripGainRcd>().get(gainHandle);
111  if(!gainHandle.isValid()){edm::LogError("SiStripGainPCLWorker")<< "gainHandle is not valid\n"; exit(0);}
112 
113  edm::ESHandle<SiStripQuality> SiStripQuality_;
114  iSetup.get<SiStripQualityRcd>().get(SiStripQuality_);
115 
116  for(unsigned int a=0;a<APVsCollOrdered.size();a++){
117 
118  std::shared_ptr<stAPVGain> APV = APVsCollOrdered[a];
119 
120  if(APV->SubDet==PixelSubdetector::PixelBarrel || APV->SubDet==PixelSubdetector::PixelEndcap) continue;
121 
122  APV->isMasked = SiStripQuality_->IsApvBad(APV->DetId,APV->APVId);
123 
124  if(gainHandle->getNumberOfTags()!=2){edm::LogError("SiStripGainPCLWorker")<< "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";fflush(stdout);exit(0);};
125  float newPreviousGain = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 1),1);
126  if(APV->PreviousGain!=1 and newPreviousGain!=APV->PreviousGain)edm::LogWarning("SiStripGainPCLWorker")<< "WARNING: ParticleGain in the global tag changed\n";
127  APV->PreviousGain = newPreviousGain;
128 
129  float newPreviousGainTick = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 0),0);
130  if(APV->PreviousGainTick!=1 and newPreviousGainTick!=APV->PreviousGainTick){
131  edm::LogWarning("SiStripGainPCLWorker")<< "WARNING: TickMarkGain in the global tag changed\n"<< std::endl
132  <<" APV->SubDet: "<< APV->SubDet << " APV->APVId:" << APV->APVId << std::endl
133  <<" APV->PreviousGainTick: "<<APV->PreviousGainTick<<" newPreviousGainTick: "<<newPreviousGainTick<<std::endl;
134  }
135  APV->PreviousGainTick = newPreviousGainTick;
136  }
137 
138 }
139 
140 //********************************************************************************//
141 // ------------ method called for each event ------------
142 void
144 {
145  using namespace edm;
146 
147  // this->checkBookAPVColls(iSetup); // check whether APV colls are booked and do so if not yet done
148 
149  eventnumber = iEvent.id().event();
150  runnumber = iEvent.id().run();
151 
152  auto handle01 = connect(TrigTech , TrigTech_token_ , iEvent);
153  auto handle02 = connect(trackchi2ndof , trackchi2ndof_token_ , iEvent);
154  auto handle03 = connect(trackp , trackp_token_ , iEvent);
155  auto handle04 = connect(trackpt , trackpt_token_ , iEvent);
156  auto handle05 = connect(tracketa , tracketa_token_ , iEvent);
157  auto handle06 = connect(trackphi , trackphi_token_ , iEvent);
158  auto handle07 = connect(trackhitsvalid, trackhitsvalid_token_, iEvent);
159  auto handle08 = connect(trackindex , trackindex_token_ , iEvent);
160  auto handle09 = connect(rawid , rawid_token_ , iEvent);
161  auto handle11 = connect(localdirx , localdirx_token_ , iEvent);
162  auto handle12 = connect(localdiry , localdiry_token_ , iEvent);
163  auto handle13 = connect(localdirz , localdirz_token_ , iEvent);
164  auto handle14 = connect(firststrip , firststrip_token_ , iEvent);
165  auto handle15 = connect(nstrips , nstrips_token_ , iEvent);
166  auto handle16 = connect(saturation , saturation_token_ , iEvent);
167  auto handle17 = connect(overlapping , overlapping_token_ , iEvent);
168  auto handle18 = connect(farfromedge , farfromedge_token_ , iEvent);
169  auto handle19 = connect(charge , charge_token_ , iEvent);
170  auto handle21 = connect(path , path_token_ , iEvent);
171  auto handle22 = connect(chargeoverpath, chargeoverpath_token_, iEvent);
172  auto handle23 = connect(amplitude , amplitude_token_ , iEvent);
173  auto handle24 = connect(gainused , gainused_token_ , iEvent);
174  auto handle25 = connect(trackalgo , trackalgo_token_ , iEvent);
175 
176  processEvent();
177 
178 }
179 
180 //********************************************************************************//
182 
183  edm::LogInfo("SiStripGainsPCLWorker") << "Processing run " << runnumber
184  << " and event " << eventnumber
185  << std::endl;
186 
189 
190  NEvent++;
191  NTrack+=(*trackp).size();
192 
193  edm::LogInfo("SiStripGainsPCLWorker")
194  <<"for mode"<< m_calibrationMode
195  <<" Nevent:"<<NEvent
196  <<" NTrack:"<<NTrack
197  <<" NClusterStrip:"<<NClusterStrip
198  <<" NClusterPixel:"<<NClusterPixel
199  <<" NStripAPVs:"<<NStripAPVs
200  <<" NPixelDets:"<<NPixelDets
201  <<std::endl;
202 
203  int elepos = statCollectionFromMode(m_calibrationMode.c_str());
204 
205  unsigned int FirstAmplitude=0;
206  for(unsigned int i=0;i<(*chargeoverpath).size();i++){
207 
208  FirstAmplitude+=(*nstrips)[i];
209  int TI = (*trackindex)[i];
210 
211  if((*tracketa )[TI] < MinTrackEta )continue;
212  if((*tracketa )[TI] > MaxTrackEta )continue;
213  if((*trackp )[TI] < MinTrackMomentum )continue;
214  if((*trackp )[TI] > MaxTrackMomentum )continue;
215  if((*trackhitsvalid)[TI] < MinTrackHits )continue;
216  if((*trackchi2ndof )[TI] > MaxTrackChiOverNdf )continue;
217  if((*trackalgo )[TI] > MaxTrackingIteration )continue;
218 
219  std::shared_ptr<stAPVGain> APV = APVsColl[((*rawid)[i]<<4) | ((*firststrip)[i]/128)]; //works for both strip and pixel thanks to firstStrip encoding for pixel in the calibTree
220 
221  if(APV->SubDet>2 && (*farfromedge)[i] == false )continue;
222  if(APV->SubDet>2 && (*overlapping)[i] == true )continue;
223  if(APV->SubDet>2 && (*saturation )[i] && !AllowSaturation)continue;
224  if(APV->SubDet>2 && (*nstrips )[i] > MaxNrStrips )continue;
225 
226  if(APV->SubDet>2){
227  NClusterStrip++;
228  } else {
229  NClusterPixel++;
230  }
231 
232  int Charge = 0;
233  if(APV->SubDet>2 && (useCalibration || !FirstSetOfConstants)){
234  bool Saturation = false;
235  for(unsigned int s=0;s<(*nstrips)[i];s++){
236  int StripCharge = (*amplitude)[FirstAmplitude-(*nstrips)[i]+s];
237  if(useCalibration && !FirstSetOfConstants){ StripCharge=(int)(StripCharge*(APV->PreviousGain/APV->CalibGain));
238  }else if(useCalibration){ StripCharge=(int)(StripCharge/APV->CalibGain);
239  }else if(!FirstSetOfConstants){ StripCharge=(int)(StripCharge*APV->PreviousGain);}
240  if(StripCharge>1024){
241  StripCharge = 255;
242  Saturation = true;
243  }else if(StripCharge>254){
244  StripCharge = 254;
245  Saturation = true;
246  }
247  Charge += StripCharge;
248  }
249  if(Saturation && !AllowSaturation)continue;
250  }else if(APV->SubDet>2){
251  Charge = (*charge)[i];
252  }else{
253  Charge = (*charge)[i]/265.0; //expected scale factor between pixel and strip charge
254  }
255 
256  double ClusterChargeOverPath = ( (double) Charge )/(*path)[i] ;
257  if(APV->SubDet>2){
258  if(Validation) {ClusterChargeOverPath/=(*gainused)[i];}
259  if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];}
260  }
261 
262  // real histogram for calibration
263  (Charge_Vs_Index[elepos])->Fill(APV->Index,ClusterChargeOverPath);
264 
265  LogDebug("SiStripGainsPCLWorker") <<" for mode "<< m_calibrationMode << "\n"
266  <<" i "<< i
267  <<" NClusterStrip "<< NClusterStrip
268  <<" useCalibration "<< useCalibration
269  <<" FirstSetOfConstants "<< FirstSetOfConstants
270  <<" APV->DetId "<< APV->DetId
271  <<" APV->Index "<< APV->Index
272  <<" Charge "<< Charge
273  <<" ClusterChargeOverPath "<< ClusterChargeOverPath
274  <<std::endl;
275 
276  // control histograms
277 
278  if(APV->SubDet==StripSubdetector::TIB){
279  (Charge_Vs_PathlengthTIB[elepos]) ->Fill((*path)[i],Charge);
280  }else if(APV->SubDet==StripSubdetector::TOB){
281  (Charge_Vs_PathlengthTOB[elepos]) ->Fill((*path)[i],Charge);
282  }else if(APV->SubDet==StripSubdetector::TID){
283  if(APV->Eta<0){
284  (Charge_Vs_PathlengthTIDM[elepos]) ->Fill((*path)[i],Charge);
285  }else if(APV->Eta>0){
286  (Charge_Vs_PathlengthTIDP[elepos]) ->Fill((*path)[i],Charge);
287  }
288  }else if(APV->SubDet==StripSubdetector::TEC){
289  if(APV->Eta<0){
290  if(APV->Thickness<0.04){
291  (Charge_Vs_PathlengthTECM1[elepos])->Fill((*path)[i],Charge);
292  }else if(APV->Thickness>0.04){
293  (Charge_Vs_PathlengthTECM2[elepos])->Fill((*path)[i],Charge);
294  }
295  }else if(APV->Eta>0){
296  if(APV->Thickness<0.04){
297  (Charge_Vs_PathlengthTECP1[elepos])->Fill((*path)[i],Charge);
298  }else if(APV->Thickness>0.04){
299  (Charge_Vs_PathlengthTECP2[elepos])->Fill((*path)[i],Charge);
300  }
301  }
302  }
303  }// END OF ON-CLUSTER LOOP
304 
305  LogDebug("SiStripGainsPCLWorker")<<" for mode"<< m_calibrationMode
306  <<" entries in histogram:"<< (Charge_Vs_Index[elepos])->getTH2S()->GetEntries()
307  <<std::endl;
308 
309 }//END OF processEvent()
310 
311 
312 //********************************************************************************//
313 void
315 {
316 }
317 
318 //********************************************************************************//
319 // ------------ method called once each job just before starting event loop ------------
320 void
322 
324  const TrackerGeometry *newBareTkGeomPtr = &(*tkGeom_);
325  if (newBareTkGeomPtr == bareTkGeomPtr_) return; // already filled APVColls, nothing changed
326 
327  if (!bareTkGeomPtr_) { // pointer not yet set: called the first time => fill the APVColls
328  auto const & Det = newBareTkGeomPtr->dets();
329 
330  edm::LogInfo("SiStripGainsPCLWorker")
331  <<" Resetting APV struct"<<std::endl;
332 
333  unsigned int Index=0;
334 
335  for(unsigned int i=0;i<Det.size();i++){
336 
337  DetId Detid = Det[i]->geographicalId();
338  int SubDet = Detid.subdetId();
339 
340  if( SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID ||
341  SubDet == StripSubdetector::TOB || SubDet == StripSubdetector::TEC ){
342 
343  auto DetUnit = dynamic_cast<const StripGeomDetUnit*> (Det[i]);
344  if(!DetUnit)continue;
345 
346  const StripTopology& Topo = DetUnit->specificTopology();
347  unsigned int NAPV = Topo.nstrips()/128;
348 
349  for(unsigned int j=0;j<NAPV;j++){
350  auto APV = std::make_shared<stAPVGain>();
351  APV->Index = Index;
352  APV->Bin = -1;
353  APV->DetId = Detid.rawId();
354  APV->APVId = j;
355  APV->SubDet = SubDet;
356  APV->FitMPV = -1;
357  APV->FitMPVErr = -1;
358  APV->FitWidth = -1;
359  APV->FitWidthErr = -1;
360  APV->FitChi2 = -1;
361  APV->FitNorm = -1;
362  APV->Gain = -1;
363  APV->PreviousGain = 1;
364  APV->PreviousGainTick = 1;
365  APV->x = DetUnit->position().basicVector().x();
366  APV->y = DetUnit->position().basicVector().y();
367  APV->z = DetUnit->position().basicVector().z();
368  APV->Eta = DetUnit->position().basicVector().eta();
369  APV->Phi = DetUnit->position().basicVector().phi();
370  APV->R = DetUnit->position().basicVector().transverse();
371  APV->Thickness = DetUnit->surface().bounds().thickness();
372  APV->NEntries = 0;
373  APV->isMasked = false;
374 
375  APVsCollOrdered.push_back(APV);
376  APVsColl[(APV->DetId<<4) | APV->APVId] = APV;
377  Index++;
378  NStripAPVs++;
379  } // loop on APVs
380  } // if is Strips
381  } // loop on dets
382 
383  for(unsigned int i=0;i<Det.size();i++){ //Make two loop such that the Pixel information is added at the end --> make transition simpler
384  DetId Detid = Det[i]->geographicalId();
385  int SubDet = Detid.subdetId();
387  auto DetUnit = dynamic_cast<const PixelGeomDetUnit*> (Det[i]);
388  if(!DetUnit) continue;
389 
390  const PixelTopology& Topo = DetUnit->specificTopology();
391  unsigned int NROCRow = Topo.nrows()/(80.);
392  unsigned int NROCCol = Topo.ncolumns()/(52.);
393 
394  for(unsigned int j=0;j<NROCRow;j++){
395  for(unsigned int i=0;i<NROCCol;i++){
396 
397  auto APV = std::make_shared<stAPVGain>();
398  APV->Index = Index;
399  APV->Bin = -1;
400  APV->DetId = Detid.rawId();
401  APV->APVId = (j<<3 | i);
402  APV->SubDet = SubDet;
403  APV->FitMPV = -1;
404  APV->FitMPVErr = -1;
405  APV->FitWidth = -1;
406  APV->FitWidthErr = -1;
407  APV->FitChi2 = -1;
408  APV->Gain = -1;
409  APV->PreviousGain = 1;
410  APV->PreviousGainTick = 1;
411  APV->x = DetUnit->position().basicVector().x();
412  APV->y = DetUnit->position().basicVector().y();
413  APV->z = DetUnit->position().basicVector().z();
414  APV->Eta = DetUnit->position().basicVector().eta();
415  APV->Phi = DetUnit->position().basicVector().phi();
416  APV->R = DetUnit->position().basicVector().transverse();
417  APV->Thickness = DetUnit->surface().bounds().thickness();
418  APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId());
419  APV->NEntries = 0;
420 
421  APVsCollOrdered.push_back(APV);
422  APVsColl[(APV->DetId<<4) | APV->APVId] = APV;
423  Index++;
424  NPixelDets++;
425 
426  } // loop on ROC cols
427  } // loop on ROC rows
428  } // if Pixel
429  } // loop on Dets
430  } //if (!bareTkGeomPtr_) ...
431  bareTkGeomPtr_ = newBareTkGeomPtr;
432 }
433 
434 
435 //********************************************************************************//
436 void
438 {
439 }
440 
441 //********************************************************************************//
442 void
445  desc.setUnknown();
446  descriptions.addDefault(desc);
447 }
448 
449 //********************************************************************************//
450 void
452 
453  ibooker.cd();
454  std::string dqm_dir = m_DQMdir;
455  const char* tag = dqm_tag_[statCollectionFromMode(m_calibrationMode.c_str())].c_str();
456 
457  edm::LogInfo("SiStripGainsPCLWorker") << "Setting " << dqm_dir << "in DQM and booking histograms for tag "
458  << tag << std::endl;
459 
460  ibooker.setCurrentFolder(dqm_dir);
461 
462  std::string stag(tag);
463  if(stag.size()!=0 && stag[0]!='_') stag.insert(0,1,'_');
464 
465  std::string cvi = std::string("Charge_Vs_Index") + stag;
466  std::string cvpTIB = std::string("Charge_Vs_PathlengthTIB") + stag;
467  std::string cvpTOB = std::string("Charge_Vs_PathlengthTOB") + stag;
468  std::string cvpTIDP = std::string("Charge_Vs_PathlengthTIDP") + stag;
469  std::string cvpTIDM = std::string("Charge_Vs_PathlengthTIDM") + stag;
470  std::string cvpTECP1 = std::string("Charge_Vs_PathlengthTECP1") + stag;
471  std::string cvpTECP2 = std::string("Charge_Vs_PathlengthTECP2") + stag;
472  std::string cvpTECM1 = std::string("Charge_Vs_PathlengthTECM1") + stag;
473  std::string cvpTECM2 = std::string("Charge_Vs_PathlengthTECM2") + stag;
474 
475  int elepos = statCollectionFromMode(tag);
476 
477  Charge_Vs_Index[elepos] = ibooker.book2S(cvi.c_str() , cvi.c_str() , 88625, 0 , 88624,2000,0,4000);
478  Charge_Vs_PathlengthTIB[elepos] = ibooker.book2S(cvpTIB.c_str() , cvpTIB.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
479  Charge_Vs_PathlengthTOB[elepos] = ibooker.book2S(cvpTOB.c_str() , cvpTOB.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
480  Charge_Vs_PathlengthTIDP[elepos] = ibooker.book2S(cvpTIDP.c_str() , cvpTIDP.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
481  Charge_Vs_PathlengthTIDM[elepos] = ibooker.book2S(cvpTIDM.c_str() , cvpTIDM.c_str() , 20 , 0.3 , 1.3 , 250,0,2000);
482  Charge_Vs_PathlengthTECP1[elepos] = ibooker.book2S(cvpTECP1.c_str(), cvpTECP1.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
483  Charge_Vs_PathlengthTECP2[elepos] = ibooker.book2S(cvpTECP2.c_str(), cvpTECP2.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
484  Charge_Vs_PathlengthTECM1[elepos] = ibooker.book2S(cvpTECM1.c_str(), cvpTECM1.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
485  Charge_Vs_PathlengthTECM2[elepos] = ibooker.book2S(cvpTECM2.c_str(), cvpTECM2.c_str(), 20 , 0.3 , 1.3 , 250,0,2000);
486 
487 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:39
std::vector< MonitorElement * > Charge_Vs_PathlengthTOB
const std::vector< double > * chargeoverpath
bool IsApvBad(const uint32_t &detid, const short &apvNb) const
edm::EDGetTokenT< std::vector< double > > gainused_token_
EventNumber_t event() const
Definition: EventID.h:41
T getUntrackedParameter(std::string const &, T const &) const
const std::vector< int > * trackalgo
virtual int nrows() const =0
edm::EDGetTokenT< std::vector< double > > localdirz_token_
edm::EDGetTokenT< std::vector< bool > > saturation_token_
edm::EDGetTokenT< std::vector< double > > trackchi2ndof_token_
virtual void checkBookAPVColls(const edm::EventSetup &setup)
const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
size_t getNumberOfTags() const
Definition: SiStripGain.h:87
void cd(void)
Definition: DQMStore.cc:269
edm::EDGetTokenT< std::vector< float > > trackp_token_
SiStripGainsPCLWorker(const edm::ParameterSet &)
const TrackerGeometry * bareTkGeomPtr_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
const std::vector< bool > * TrigTech
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &)
const std::vector< int > * trackindex
const std::vector< float > * trackpt
const std::vector< unsigned int > * rawid
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
#define nullptr
const std::vector< unsigned int > * charge
const std::vector< double > * path
const std::vector< bool > * farfromedge
edm::EDGetTokenT< std::vector< unsigned int > > trackhitsvalid_token_
edm::EDGetTokenT< std::vector< unsigned short > > firststrip_token_
edm::EDGetTokenT< std::vector< bool > > farfromedge_token_
edm::EDGetTokenT< std::vector< bool > > overlapping_token_
static float getApvGain(const uint16_t &apv, const SiStripApvGain::Range &range)
Definition: SiStripGain.h:69
std::vector< std::string > dqm_tag_
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::EDGetTokenT< std::vector< unsigned short > > nstrips_token_
const std::vector< double > * tracketa
edm::EDGetTokenT< std::vector< double > > tracketa_token_
int iEvent
Definition: GenABIO.cc:230
const std::vector< double > * localdiry
void addDefault(ParameterSetDescription const &psetDescription)
const std::vector< float > * trackp
const std::vector< bool > * saturation
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::ESHandle< TrackerGeometry > tkGeom_
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
MonitorElement * book2S(Args &&...args)
Definition: DQMStore.h:139
const std::vector< double > * localdirz
const std::vector< double > * trackphi
std::vector< MonitorElement * > Charge_Vs_PathlengthTIB
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
const std::vector< bool > * overlapping
edm::EDGetTokenT< std::vector< int > > trackindex_token_
const std::vector< double > * localdirx
edm::EDGetTokenT< std::vector< double > > localdirx_token_
edm::EDGetTokenT< std::vector< unsigned int > > charge_token_
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP1
edm::EDGetTokenT< std::vector< double > > trackphi_token_
const std::vector< unsigned short > * firststrip
const std::vector< unsigned int > * trackhitsvalid
Definition: DetId.h:18
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM2
edm::EDGetTokenT< std::vector< float > > trackpt_token_
virtual int nstrips() const =0
const T & get() const
Definition: EventSetup.h:56
edm::Handle< T > connect(const T *&ptr, edm::EDGetTokenT< T > token, const edm::Event &evt)
edm::EDGetTokenT< std::vector< double > > path_token_
edm::EventID id() const
Definition: EventBase.h:58
HLT enums.
virtual int ncolumns() const =0
std::vector< MonitorElement * > Charge_Vs_PathlengthTECM1
double a
Definition: hdecay.h:121
const std::vector< unsigned char > * amplitude
int statCollectionFromMode(const char *tag) const
edm::EDGetTokenT< std::vector< double > > chargeoverpath_token_
const std::vector< double > * trackchi2ndof
edm::EDGetTokenT< std::vector< int > > trackalgo_token_
std::vector< MonitorElement * > Charge_Vs_PathlengthTECP2
edm::EDGetTokenT< std::vector< double > > localdiry_token_
bool isValid() const
Definition: ESHandle.h:47
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDP
edm::EDGetTokenT< std::vector< unsigned char > > amplitude_token_
const std::vector< unsigned short > * nstrips
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
std::vector< MonitorElement * > Charge_Vs_PathlengthTIDM
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: Run.h:42
const std::vector< double > * gainused
edm::EDGetTokenT< std::vector< unsigned int > > rawid_token_
std::vector< MonitorElement * > Charge_Vs_Index
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:66
edm::EDGetTokenT< std::vector< bool > > TrigTech_token_