CMS 3D CMS Logo

RPCEfficiencyBookSecondStep.cc

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <iostream>
00004 #include <string>
00005 #include <map>
00006 
00007 
00008 #include <DataFormats/MuonDetId/interface/RPCDetId.h>
00009 #include <DQMOffline/Muon/interface/RPCEfficiencySecond.h>
00010 #include <DQMOffline/Muon/interface/RPCBookFolderStructure.h>
00011 #include "DQMServices/Core/interface/MonitorElement.h"
00012 #include "Geometry/RPCGeometry/interface/RPCGeomServ.h"
00013 
00014 std::map<std::string, MonitorElement*> RPCEfficiencySecond::bookDetUnitSeg(RPCDetId & detId,int nstrips) {
00015   
00016   std::map<std::string, MonitorElement*> meMap;
00017    
00018   RPCBookFolderStructure *  folderStr = new RPCBookFolderStructure(); //Anna
00019   std::string folder = "Muons/RPCEfficiency/RollByRoll/" +  folderStr->folderStructure(detId);
00020 
00021   dbe->setCurrentFolder(folder);
00022 
00023   RPCGeomServ RPCname(detId);
00024   std::string nameRoll = RPCname.name();
00025 
00026   char detUnitLabel[128];
00027   char layerLabel[128];
00028 
00029   sprintf(detUnitLabel ,"%s",nameRoll.c_str());
00030   sprintf(layerLabel ,"%s",nameRoll.c_str());
00031 
00032   char meId [128];
00033   char meTitle [128];
00034   
00035   //Begin booking DT
00036   if(detId.region()==0) {
00037 
00038     //std::cout<<"Booking "<<folder<<meId<<std::endl;
00039     sprintf(meId,"ExpectedOccupancyFromDT_%s",detUnitLabel);
00040     sprintf(meTitle,"ExpectedOccupancyFromDT_for_%s",layerLabel);
00041     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00042     //std::cout<<"Booking "<<meId<<std::endl;
00043  
00044     sprintf(meId,"RealDetectedOccupancyFromDT_%s",detUnitLabel);
00045     sprintf(meTitle,"RealDetectedOccupancyFromDT_for_%s",layerLabel);
00046     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00047     //std::cout<<"Booking "<<folder<<meId<<std::endl;
00048 
00049     sprintf(meId,"RPCDataOccupancyFromDT_%s",detUnitLabel);
00050     sprintf(meTitle,"RPCDataOccupancyFromDT_for_%s",layerLabel);
00051     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00052 
00053     sprintf(meId,"Profile_%s",detUnitLabel);
00054     sprintf(meTitle,"Profile_for_%s",layerLabel);
00055     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00056     //std::cout<<"Booking "<<folder<<meId<<std::endl;
00057 
00058     sprintf(meId,"BXDistribution_%s",detUnitLabel);
00059     sprintf(meTitle,"BXDistribution_for_%s",layerLabel);
00060     meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
00061     
00062   }else{
00063     //std::cout<<"Booking for the EndCap"<<detUnitLabel<<std::endl;
00064 
00065     //std::cout<<"Booking "<<meId<<std::endl;
00066     sprintf(meId,"ExpectedOccupancyFromCSC_%s",detUnitLabel);
00067     sprintf(meTitle,"ExpectedOccupancyFromCSC_for_%s",layerLabel);
00068     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00069        
00070     //std::cout<<"Booking "<<meId<<std::endl;
00071     sprintf(meId,"RealDetectedOccupancyFromCSC_%s",detUnitLabel);
00072     sprintf(meTitle,"RealDetectedOccupancyFromCSC_for_%s",layerLabel);
00073     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00074     
00075     //std::cout<<"Booking "<<meId<<std::endl;
00076     sprintf(meId,"RPCDataOccupancyFromCSC_%s",detUnitLabel);
00077     sprintf(meTitle,"RPCDataOccupancyFromCSC_for_%s",layerLabel);
00078     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00079     
00080     //std::cout<<"Booking "<<meId<<std::endl;
00081     sprintf(meId,"Profile_%s",detUnitLabel);
00082     sprintf(meTitle,"Profile_for_%s",layerLabel);
00083     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00084     
00085     //std::cout<<"Booking "<<meId<<std::endl;
00086     sprintf(meId,"BXDistribution_%s",detUnitLabel);
00087     sprintf(meTitle,"BXDistribution_for_%s",layerLabel);
00088     meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
00089   }
00090   return meMap;
00091 }
00092 
00093 
00094 

Generated on Tue Jun 9 17:33:51 2009 for CMSSW by  doxygen 1.5.4