45 edm::LogVerbatim (
"DTLocalTriggerSynchTask") <<
"[DTLocalTriggerSynchTask]: Constructor" << endl;
49 ddu_Token_ = consumes<DTLocalTriggerCollection>(
51 seg_Token_ = consumes<DTRecSegment4DCollection>(
66 edm::LogVerbatim (
"DTLocalTriggerSynchTask") <<
"[DTLocalTriggerSynchTask]: analyzed " <<
nevents <<
" events" << endl;
72 edm::LogVerbatim (
"DTLocalTriggerSynchTask") <<
"[DTLocalTriggerSynchTask]: Book Histograms"<<endl;
82 std::vector<const DTChamber*>::const_iterator chambIt =
muonGeom->chambers().begin();
83 std::vector<const DTChamber*>::const_iterator chambEnd =
muonGeom->chambers().end();
85 for (; chambIt!=chambEnd; ++chambIt) {
109 for (
int i=0;
i<5;++
i){
110 for (
int j=0;
j<6;++
j){
111 for (
int k=0;
k<13;++
k){
121 vector<L1MuDTChambPhDigi>
const* phTrigs = l1DTTPGPh->getContainer();
123 vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
124 vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
125 for(; iph !=iphe ; ++iph) {
127 int phwheel = iph->whNum();
128 int phsec = iph->scNum() + 1;
129 int phst = iph->stNum();
130 int phcode = iph->code();
132 if(phcode>
phCodeBestTM[phwheel+3][phst][phsec] && phcode<7) {
143 for (detUnitIt=trigsDDU->begin();detUnitIt!=trigsDDU->end();++detUnitIt){
149 int sec =
id.sector();
150 int st =
id.station();
154 int quality = trigIt->quality();
156 if(quality>-1 && quality<7 &&
164 vector<const DTRecSegment4D*> bestSegments4D;
168 DTRecSegment4DCollection::id_iterator chambIdIt;
170 for (chambIdIt = segments4D->id_begin(); chambIdIt != segments4D->id_end(); ++chambIdIt){
177 for ( track = range.first; track != range.second; ++track){
178 if( (*track).hasPhi() ) {
180 if ( hits>hitsBest ){
187 bestSegments4D.push_back(best);
193 vector<const DTRecSegment4D*>::const_iterator bestSegIt = bestSegments4D.begin();
194 vector<const DTRecSegment4D*>::const_iterator bestSegEnd = bestSegments4D.end();
195 for (; bestSegIt!=bestSegEnd; ++bestSegIt ){
197 float dir = atan((*bestSegIt)->localDirection().x()/ (*bestSegIt)->localDirection().z())*180/
Geom::pi();
207 float t0seg = (*bestSegIt)->phiSegment()->t0();
209 float time = tTrig+t0seg;
212 int wheel = chambId.
wheel();
213 int sector = chambId.
sector();
215 int scsector = sector>12 ? sector==13 ? 4 : 10 : sector;
220 if (fabs(t0seg)>0.01) {
221 innerME.find(
"SEG_TrackCrossingTime")->second->Fill(htime);
222 if ( qualTM>=0 ) innerME.find(
"TM_TrackCrossingTimeAll")->second->Fill(htime);
223 if ( qualTM==6 ) innerME.find(
"TM_TrackCrossingTimeHH")->second->Fill(htime);
224 if ( qualDDU>=0 ) innerME.find(
"DDU_TrackCrossingTimeAll")->second->Fill(htime);
225 if ( qualDDU==6 ) innerME.find(
"DDU_TrackCrossingTimeHH")->second->Fill(htime);
235 stringstream wheel; wheel << dtChId.
wheel();
237 stringstream sector; sector << dtChId.
sector();
238 uint32_t chRawId = dtChId.
rawId();
240 ibooker.
setCurrentFolder(
baseDir() +
"/Wheel" + wheel.str() +
"/Sector" + sector.str() +
"/Station" + station.str() );
243 string histoTag[5] = {
"SEG_TrackCrossingTime",
"TM_TrackCrossingTimeAll",
"TM_TrackCrossingTimeHH",
"DDU_TrackCrossingTimeAll",
"DDU_TrackCrossingTimeHH" };
249 for (
int iHisto=0;iHisto<5;++iHisto) {
250 string histoName = histoTag[iHisto] + (
rangeInBX ?
"InBX" :
"") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
251 edm::LogVerbatim (
"DTLocalTriggerSynchTask") <<
"[DTLocalTriggerSynchTask]: booking "
252 <<
baseDir() +
"/Wheel" << wheel.str()
253 <<
"/Sector" << sector.str()
254 <<
"/Station"<< station.str()
255 <<
"/" << histoName << endl;
260 string floatTag[2] = {
"tTrig_SL1",
"tTrig_SL3" };
262 for (
int iFloat=0;iFloat<2;++iFloat) {
263 string floatName = floatTag[iFloat] +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
T getParameter(std::string const &) const
std::pair< const_iterator, const_iterator > range
iterator range
virtual int degreesOfFreedom() const
return the DOF of the segment
std::string baseDirectory
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Beginrun.
int phCodeBestTM[6][5][13]
edm::EDGetTokenT< DTLocalTriggerCollection > ddu_Token_
edm::ESHandle< DTGeometry > muonGeom
uint32_t rawId() const
get the raw id
int phCodeBestDDU[6][5][13]
virtual void setES(const edm::EventSetup &setup)=0
Pass the Event Setup to the synchronization module at each event.
void analyze(const edm::Event &event, const edm::EventSetup &context)
Analyze.
virtual ~DTLocalTriggerSynchTask()
Destructor.
DTLocalTriggerSynchTask(const edm::ParameterSet &ps)
Constructor.
MonitorElement * book1D(Args &&...args)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Book the histograms.
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
DTTTrigBaseSync * tTrigSync
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
edm::ParameterSet parameters
edm::EDGetTokenT< L1MuDTChambPhContainer > dcc_Token_
void setCurrentFolder(const std::string &fullpath)
std::vector< DTLocalTrigger >::const_iterator const_iterator
std::map< uint32_t, std::map< std::string, MonitorElement * > > triggerHistos
std::pair< const_iterator, const_iterator > Range
void bookHistos(DQMStore::IBooker &, const DTChamberId &dtCh)
Book the histograms.
MonitorElement * bookFloat(Args &&...args)
int station() const
Return the station number.
int wheel() const
Return the wheel number.
T get(const Candidate &c)