41 filename_(iConfig.getParameter<std::
string>(
"fileName")),
42 minbunch_(iConfig.getParameter<int>(
"minBunch")),maxbunch_(iConfig.getParameter<int>(
"maxBunch")),
dbe_(0),
44 iConfig.getParameter<edm::
InputTag>(
"cfTrackTag"))),
46 iConfig.getParameter<edm::
InputTag>(
"cfVertexTag")))
55 std::cout <<
"Constructed GlobalTest, filename: "
78 size_t NrPileupEvtsSize = NrPileupEvts.size() + 1;
80 size_t NrVerticesSize = NrVertices.size() + 1;
82 size_t NrTracksSize = NrTracks.size() + 1;
84 size_t TrackPartIdSize = TrackPartId.size() + 1;
86 size_t CaloEnergyEBSize = CaloEnergyEB.size() + 1;
88 size_t CaloEnergyEESize = CaloEnergyEE.size() + 1;
90 labels[0] =
new char [NrPileupEvtsSize];
91 strncpy(
labels[0], NrPileupEvts.c_str(), NrPileupEvtsSize);
92 labels[1] =
new char [NrVerticesSize];
93 strncpy(
labels[1], NrVertices.c_str(), NrVerticesSize);
94 labels[2] =
new char [NrTracksSize];
95 strncpy(
labels[2], NrTracks.c_str(), NrTracksSize);
96 labels[3] =
new char [TrackPartIdSize];
97 strncpy(
labels[3], TrackPartId.c_str(), TrackPartIdSize);
98 labels[4] =
new char [CaloEnergyEBSize];
99 strncpy(
labels[4], CaloEnergyEB.c_str(), CaloEnergyEBSize);
100 labels[5] =
new char [CaloEnergyEESize];
101 strncpy(
labels[5], CaloEnergyEE.c_str(), CaloEnergyEESize);
107 sprintf(label,
"%s_%d",
labels[0],
i);
109 sprintf(label,
"%s_%d",
labels[1],
i);
111 sprintf(label,
"%s_%d",
labels[2],
i);
113 sprintf(label,
"%s_%d",
labels[3],
i);
115 sprintf(label,
"%s_%d",
labels[4],
i);
117 sprintf(label,
"%s_%d",
labels[5],
i);
126 for (
int i = 0;
i < 6;
i++)
delete[]
labels[
i];
167 for (cfitr=coltr->begin(); cfitr!=coltr->end();cfitr++) {
172 double sumE[10]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
175 for (cfiecalb=colecalb->begin(); cfiecalb!=colecalb->end();cfiecalb++) {
176 sumE[cfiecalb.bunch()-
minbunch_]+=cfiecalb->energy();
183 double sumEE[10]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
186 for (cfiecale=colecale->begin(); cfiecale!=colecale->end();cfiecale++) {
187 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]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< CrossingFrame< PCaloHit > > g4SimHits_EE_Token_
MonitorElement * trackPartIdH_[nMaxH]
edm::EDGetTokenT< CrossingFrame< SimTrack > > cfTrackToken_
MonitorElement * caloEnergyEBH_[nMaxH]
GlobalTest(const edm::ParameterSet &)
MonitorElement * nrPileupsH_[nMaxH]
MonitorElement * nrTracksH_[nMaxH]
edm::EDGetTokenT< CrossingFrame< SimTrack > > cfVertexToken_
MonitorElement * nrVerticesH_[nMaxH]
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
void showDirStructure(void) const
edm::EDGetTokenT< CrossingFrame< PCaloHit > > g4SimHits_EB_Token_
void setCurrentFolder(const std::string &fullpath)