41 TestSuite::TestSuite(
const edm::ParameterSet& iConfig): filename_(iConfig.getParameter<std::string>(
"fileName")), bunchcr_(iConfig.getParameter<int>(
"BunchNr")), minbunch_(iConfig.getParameter<int>(
"minBunch")),maxbunch_(iConfig.getParameter<int>(
"maxBunch")),
dbe_(0)
81 std::string subdetTracker(
"g4SimHitsTrackerHitsTECLowTof");
82 std::string ecalsubdet(
"g4SimHitsEcalHitsEB");
83 std::string hcalsubdet(
"g4SimHitsHcalHits");
86 iEvent.
getByLabel(
"mix",subdetTracker,cf_simhit);
87 iEvent.
getByLabel(
"mix",ecalsubdet,cf_calohitEcal);
88 iEvent.
getByLabel(
"mix",hcalsubdet,cf_calohitHcal);
95 char histotracks[30],sighistotracks[30],histotracksindsig[30],histotracksind[30];
96 sprintf(histotracks,
"Tracks_bcr_%d",
bunchcr_);
97 sprintf(sighistotracks,
"SignalTracks_bcr_%d",
bunchcr_);
98 sprintf(histotracksind,
"VtxPointers_%d",
bunchcr_);
99 sprintf(histotracksindsig,
"VtxPointers_signal_%d",
bunchcr_);
106 for (cfi1=col1->begin(); cfi1!=col1->end();cfi1++) {
107 if (cfi1.getTrigger()==0) {
108 trhist->Fill(cfi1.bunch());
109 trindhist->Fill(cfi1->vertIndex());
111 trindhistsig->Fill(cfi1->vertIndex());
112 trhistsig->Fill(cfi1.bunch());
118 char histovertices[30], sighistovertices[30],histovertexindices[30],histovertexindicessig[30];
119 sprintf(histovertices,
"Vertices_bcr_%d",
bunchcr_);
120 sprintf(sighistovertices,
"SignalVertices_bcr_%d",
bunchcr_);
121 sprintf(histovertexindices,
"TrackPointers_%d",
bunchcr_);
122 sprintf(histovertexindicessig,
"TrackPointers_signal_%d",
bunchcr_);
129 for (cfi2=col2->begin(); cfi2!=col2->end();cfi2++) {
130 if (cfi2.getTrigger()==0) {
131 vtxhist->Fill(cfi2.bunch());
132 if (!cfi2->noParent()) vtxindhist->Fill(cfi2->parentIndex());
134 vtxhistsig->Fill(cfi2.bunch());
135 if (!cfi2->noParent()) vtxindhistsig->Fill(cfi2->parentIndex());
140 int bsp=cf_simhit->getBunchSpace();
143 sprintf(tof,
"TrackerHit_Tof_bcr_%d",
bunchcr_);
145 sprintf(tof,
"SignalTrackerHit_Tof_bcr_%d",
bunchcr_);
146 MonitorElement * tofhist_sig =
dbe_->
book1D(tof,
"TrackerHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
149 for (cfish=colsh->begin(); cfish!=colsh->end();cfish++) {
150 if (cfish.getTrigger()) {
151 tofhist_sig->Fill(cfish->timeOfFlight());
154 tofhist->Fill(cfish->timeOfFlight());
159 sprintf(tof,
"EcalEBHit_Tof_bcr_%d",
bunchcr_);
161 sprintf(tof,
"SignalEcalEBHit_Tof_bcr_%d",
bunchcr_);
162 MonitorElement * tofecalhist_sig =
dbe_->
book1D(tof,
"EcalEBHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
166 for (cfiecal=colecal->begin(); cfiecal!=colecal->end();cfiecal++) {
167 if (cfiecal.getTrigger()) tofecalhist_sig->Fill(cfiecal->time());
168 else tofecalhist->Fill(cfiecal->time());
172 sprintf(tof,
"HcalHit_Tof_bcr_%d",
bunchcr_);
174 sprintf(tof,
"SignalHcalHit_Tof_bcr_%d",
bunchcr_);
175 MonitorElement * tofhcalhist_sig =
dbe_->
book1D(tof,
"HcalHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
180 for (cfihcal=colhcal->begin(); cfihcal!=colhcal->end();cfihcal++) {
181 if (cfihcal.getTrigger()) tofhcalhist_sig->Fill(cfihcal->time());
182 else tofhcalhist->Fill(cfihcal->time());
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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
TestSuite(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void showDirStructure(void) const
void setCurrentFolder(const std::string &fullpath)