48 filename_(iConfig.getParameter<std::string>(
"fileName")),
49 minbunch_(iConfig.getParameter<int>(
"minBunch")),maxbunch_(iConfig.getParameter<int>(
"maxBunch")),
dbe_(0)
70 std::string NrPileupEvts =
"NrPileupEvts";
71 size_t NrPileupEvtsSize = NrPileupEvts.size() + 1;
72 std::string NrVertices =
"NrVertices";
73 size_t NrVerticesSize = NrVertices.size() + 1;
74 std::string NrTracks =
"NrTracks";
75 size_t NrTracksSize = NrTracks.size() + 1;
76 std::string TrackPartId =
"TrackPartId";
77 size_t TrackPartIdSize = TrackPartId.size() + 1;
78 std::string CaloEnergyEB =
"CaloEnergyEB";
79 size_t CaloEnergyEBSize = CaloEnergyEB.size() + 1;
80 std::string CaloEnergyEE =
"CaloEnergyEE";
81 size_t CaloEnergyEESize = CaloEnergyEE.size() + 1;
83 labels[0] =
new char [NrPileupEvtsSize];
84 strncpy(
labels[0], NrPileupEvts.c_str(), NrPileupEvtsSize);
85 labels[1] =
new char [NrVerticesSize];
86 strncpy(
labels[1], NrVertices.c_str(), NrVerticesSize);
87 labels[2] =
new char [NrTracksSize];
88 strncpy(
labels[2], NrTracks.c_str(), NrTracksSize);
89 labels[3] =
new char [TrackPartIdSize];
90 strncpy(
labels[3], TrackPartId.c_str(), TrackPartIdSize);
91 labels[4] =
new char [CaloEnergyEBSize];
92 strncpy(
labels[4], CaloEnergyEB.c_str(), CaloEnergyEBSize);
93 labels[5] =
new char [CaloEnergyEESize];
94 strncpy(
labels[5], CaloEnergyEE.c_str(), CaloEnergyEESize);
100 sprintf(label,
"%s_%d",
labels[0],
i);
102 sprintf(label,
"%s_%d",
labels[1],
i);
104 sprintf(label,
"%s_%d",
labels[2],
i);
106 sprintf(label,
"%s_%d",
labels[3],
i);
108 sprintf(label,
"%s_%d",
labels[4],
i);
110 sprintf(label,
"%s_%d",
labels[5],
i);
119 for (
int i = 0;
i < 6;
i++)
delete[]
labels[
i];
138 std::string ecalsubdetb(
"g4SimHitsEcalHitsEB");
139 std::string ecalsubdete(
"g4SimHitsEcalHitsEE");
142 iEvent.
getByLabel(
"mix",ecalsubdetb,cf_calohitB);
143 iEvent.
getByLabel(
"mix",ecalsubdete,cf_calohitE);
160 for (cfitr=coltr->begin(); cfitr!=coltr->end();cfitr++) {
165 double sumE[10]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
168 for (cfiecalb=colecalb->begin(); cfiecalb!=colecalb->end();cfiecalb++) {
169 sumE[cfiecalb.bunch()-
minbunch_]+=cfiecalb->energy();
176 double sumEE[10]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
179 for (cfiecale=colecale->begin(); cfiecale!=colecale->end();cfiecale++) {
180 sumEE[cfiecale.bunch()-
minbunch_]+=cfiecale->energy();
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * caloEnergyEEH_[nMaxH]
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
bool getByType(Handle< PROD > &result) const
MonitorElement * trackPartIdH_[nMaxH]
MonitorElement * caloEnergyEBH_[nMaxH]
GlobalTest(const edm::ParameterSet &)
MonitorElement * nrPileupsH_[nMaxH]
MonitorElement * nrTracksH_[nMaxH]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
MonitorElement * nrVerticesH_[nMaxH]
void showDirStructure(void) const
void setCurrentFolder(const std::string &fullpath)