1 #ifndef SimMuon_DTDigiReader_h
2 #define SimMuon_DTDigiReader_h
34 file =
new TFile(
"DTDigiPlots.root",
"RECREATE");
36 DigiTimeBox =
new TH1F(
"DigiTimeBox",
"Digi Time Box",2048,0,1600);
37 DigiTimeBoxW0 =
new TH1F(
"DigiTimeBoxW0",
"Digi Time Box W0",2000,0,1600);
38 DigiTimeBoxW1 =
new TH1F(
"DigiTimeBoxW1",
"Digi Time Box W1",2000,0,1600);
39 DigiTimeBoxW2 =
new TH1F(
"DigiTimeBoxW2",
"Digi Time Box W2",2000,0,1600);
40 if(
file->IsOpen())
cout<<
"file open!"<<endl;
41 else cout<<
"*** Error in opening file ***"<<endl;
48 DigiTimeBoxW0->Write();
49 DigiTimeBoxW1->Write();
50 DigiTimeBoxW2->Write();
57 cout <<
"--- Run: " <<
event.id().run()
58 <<
" Event: " <<
event.id().event() << endl;
61 event.getByLabel(
label, dtDigis);
64 event.getByLabel(
"g4SimHits",
"MuonDTHits",simHits);
68 for (detUnitIt=dtDigis->begin();
69 detUnitIt!=dtDigis->end();
76 cout<<
"--------------"<<endl;
84 cout<<
" Wire: "<<(*digiIt).wire()<<endl
85 <<
" digi time (ns): "<<(*digiIt).time()<<endl;
87 for(vector<PSimHit>::const_iterator simHit = simHits->begin();
88 simHit != simHits->end(); simHit++){
89 DTWireId wireId((*simHit).detUnitId());
90 if (wireId.layerId()==
id &&
abs((*simHit).particleType())==13){
91 cout<<
"entry: "<<(*simHit).entryPoint()<<endl
92 <<
"exit: "<<(*simHit).exitPoint()<<endl
93 <<
"TOF: "<<(*simHit).timeOfFlight()<<endl;
100 DigiTimeBoxW0->Fill((*digiIt).time());
101 else if(
abs(
id.superlayer())==1)
102 DigiTimeBoxW1->Fill((*digiIt).time());
103 else if(
abs(
id.superlayer())==2)
104 DigiTimeBoxW2->Fill((*digiIt).time());
105 else cout<<
"Error"<<endl;
106 DigiTimeBox->Fill((*digiIt).time());
110 cout<<
"--------------"<<endl;
T getUntrackedParameter(std::string const &, T const &) const
DTDigiReader(const ParameterSet &pset)
void analyze(const Event &event, const EventSetup &eventSetup)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< DigiType >::const_iterator const_iterator
std::pair< const_iterator, const_iterator > Range