30 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),
32 iConfig.getParameter<edm::
InputTag>(
"cfTrackTag"))),
34 iConfig.getParameter<edm::
InputTag>(
"cfVertexTag"))),
36 edm::
InputTag(
"mix",
"g4SimHitsTrackerHitsTECLowTof"))),
38 edm::
InputTag(
"mix",
"g4SimHitsEcalHitsEB"))),
40 edm::
InputTag(
"mix",
"g4SimHitsHcalHits")))
43 <<
" filename: " <<
filename_ << std::endl;
80 std::string subdetTracker(
"g4SimHitsTrackerHitsTECLowTof");
94 char histotracks[30],sighistotracks[30],histotracksindsig[30],histotracksind[30];
95 sprintf(histotracks,
"Tracks_bcr_%d",
bunchcr_);
96 sprintf(sighistotracks,
"SignalTracks_bcr_%d",
bunchcr_);
97 sprintf(histotracksind,
"VtxPointers_%d",
bunchcr_);
98 sprintf(histotracksindsig,
"VtxPointers_signal_%d",
bunchcr_);
105 for (cfi1=col1->begin(); cfi1!=col1->end();cfi1++) {
106 if (cfi1.getTrigger()==0) {
107 trhist->Fill(cfi1.bunch());
108 trindhist->Fill(cfi1->vertIndex());
110 trindhistsig->Fill(cfi1->vertIndex());
111 trhistsig->Fill(cfi1.bunch());
117 char histovertices[30], sighistovertices[30],histovertexindices[30],histovertexindicessig[30];
118 sprintf(histovertices,
"Vertices_bcr_%d",
bunchcr_);
119 sprintf(sighistovertices,
"SignalVertices_bcr_%d",
bunchcr_);
120 sprintf(histovertexindices,
"TrackPointers_%d",
bunchcr_);
121 sprintf(histovertexindicessig,
"TrackPointers_signal_%d",
bunchcr_);
128 for (cfi2=col2->begin(); cfi2!=col2->end();cfi2++) {
129 if (cfi2.getTrigger()==0) {
130 vtxhist->Fill(cfi2.bunch());
131 if (!cfi2->noParent()) vtxindhist->Fill(cfi2->parentIndex());
133 vtxhistsig->Fill(cfi2.bunch());
134 if (!cfi2->noParent()) vtxindhistsig->Fill(cfi2->parentIndex());
139 int bsp=cf_simhit->getBunchSpace();
142 sprintf(tof,
"TrackerHit_Tof_bcr_%d",
bunchcr_);
144 sprintf(tof,
"SignalTrackerHit_Tof_bcr_%d",
bunchcr_);
145 MonitorElement * tofhist_sig =
dbe_->
book1D(tof,
"TrackerHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
148 for (cfish=colsh->begin(); cfish!=colsh->end();cfish++) {
149 if (cfish.getTrigger()) {
150 tofhist_sig->Fill(cfish->timeOfFlight());
153 tofhist->Fill(cfish->timeOfFlight());
158 sprintf(tof,
"EcalEBHit_Tof_bcr_%d",
bunchcr_);
160 sprintf(tof,
"SignalEcalEBHit_Tof_bcr_%d",
bunchcr_);
161 MonitorElement * tofecalhist_sig =
dbe_->
book1D(tof,
"EcalEBHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
165 for (cfiecal=colecal->begin(); cfiecal!=colecal->end();cfiecal++) {
166 if (cfiecal.getTrigger()) tofecalhist_sig->Fill(cfiecal->time());
167 else tofecalhist->Fill(cfiecal->time());
171 sprintf(tof,
"HcalHit_Tof_bcr_%d",
bunchcr_);
173 sprintf(tof,
"SignalHcalHit_Tof_bcr_%d",
bunchcr_);
174 MonitorElement * tofhcalhist_sig =
dbe_->
book1D(tof,
"HcalHit_ToF",100,
float(bsp*minbunch_),
float(bsp*maxbunch_)+50.);
179 for (cfihcal=colhcal->begin(); cfihcal!=colhcal->end();cfihcal++) {
180 if (cfihcal.getTrigger()) tofhcalhist_sig->Fill(cfihcal->time());
181 else tofhcalhist->Fill(cfihcal->time());
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
edm::EDGetTokenT< CrossingFrame< SimTrack > > cfVertexToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
TestSuite(const edm::ParameterSet &)
edm::EDGetTokenT< CrossingFrame< SimTrack > > cfTrackToken_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
edm::EDGetTokenT< CrossingFrame< PSimHit > > g4SimHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > g4SimHits_HCal_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > g4SimHits_Ecal_Token_
void showDirStructure(void) const
void setCurrentFolder(const std::string &fullpath)