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),
42 cfTrackTag_(iConfig.getParameter<edm::
InputTag>(
"cfTrackTag")),
43 cfVertexTag_(iConfig.getParameter<edm::
InputTag>(
"cfVertexTag"))
83 std::string subdetTracker(
"g4SimHitsTrackerHitsTECLowTof");
88 iEvent.
getByLabel(
"mix",subdetTracker,cf_simhit);
89 iEvent.
getByLabel(
"mix",ecalsubdet,cf_calohitEcal);
90 iEvent.
getByLabel(
"mix",hcalsubdet,cf_calohitHcal);
97 char histotracks[30],sighistotracks[30],histotracksindsig[30],histotracksind[30];
98 sprintf(histotracks,
"Tracks_bcr_%d",
bunchcr_);
99 sprintf(sighistotracks,
"SignalTracks_bcr_%d",
bunchcr_);
100 sprintf(histotracksind,
"VtxPointers_%d",
bunchcr_);
101 sprintf(histotracksindsig,
"VtxPointers_signal_%d",
bunchcr_);
108 for (cfi1=col1->begin(); cfi1!=col1->end();cfi1++) {
109 if (cfi1.getTrigger()==0) {
110 trhist->Fill(cfi1.bunch());
111 trindhist->Fill(cfi1->vertIndex());
113 trindhistsig->Fill(cfi1->vertIndex());
114 trhistsig->Fill(cfi1.bunch());
120 char histovertices[30], sighistovertices[30],histovertexindices[30],histovertexindicessig[30];
121 sprintf(histovertices,
"Vertices_bcr_%d",
bunchcr_);
122 sprintf(sighistovertices,
"SignalVertices_bcr_%d",
bunchcr_);
123 sprintf(histovertexindices,
"TrackPointers_%d",
bunchcr_);
124 sprintf(histovertexindicessig,
"TrackPointers_signal_%d",
bunchcr_);
131 for (cfi2=col2->begin(); cfi2!=col2->end();cfi2++) {
132 if (cfi2.getTrigger()==0) {
133 vtxhist->Fill(cfi2.bunch());
134 if (!cfi2->noParent()) vtxindhist->Fill(cfi2->parentIndex());
136 vtxhistsig->Fill(cfi2.bunch());
137 if (!cfi2->noParent()) vtxindhistsig->Fill(cfi2->parentIndex());
142 int bsp=cf_simhit->getBunchSpace();
145 sprintf(tof,
"TrackerHit_Tof_bcr_%d",
bunchcr_);
147 sprintf(tof,
"SignalTrackerHit_Tof_bcr_%d",
bunchcr_);
148 MonitorElement * tofhist_sig =
dbe_->
book1D(tof,
"TrackerHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
151 for (cfish=colsh->begin(); cfish!=colsh->end();cfish++) {
152 if (cfish.getTrigger()) {
153 tofhist_sig->Fill(cfish->timeOfFlight());
156 tofhist->Fill(cfish->timeOfFlight());
161 sprintf(tof,
"EcalEBHit_Tof_bcr_%d",
bunchcr_);
163 sprintf(tof,
"SignalEcalEBHit_Tof_bcr_%d",
bunchcr_);
164 MonitorElement * tofecalhist_sig =
dbe_->
book1D(tof,
"EcalEBHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
168 for (cfiecal=colecal->begin(); cfiecal!=colecal->end();cfiecal++) {
169 if (cfiecal.getTrigger()) tofecalhist_sig->Fill(cfiecal->time());
170 else tofecalhist->Fill(cfiecal->time());
174 sprintf(tof,
"HcalHit_Tof_bcr_%d",
bunchcr_);
176 sprintf(tof,
"SignalHcalHit_Tof_bcr_%d",
bunchcr_);
177 MonitorElement * tofhcalhist_sig =
dbe_->
book1D(tof,
"HcalHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
182 for (cfihcal=colhcal->begin(); cfihcal!=colhcal->end();cfihcal++) {
183 if (cfihcal.getTrigger()) tofhcalhist_sig->Fill(cfihcal->time());
184 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")
TestSuite(const edm::ParameterSet &)
edm::InputTag cfVertexTag_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag cfTrackTag_
void showDirStructure(void) const
void setCurrentFolder(const std::string &fullpath)