test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
ZoneCreation.h File Reference
#include "L1Trigger/L1TMuonEndCap/interface/PhiMemoryImage.h"
#include "L1Trigger/L1TMuonEndCap/interface/EmulatorClasses.h"

Go to the source code of this file.

Functions

ZonesOutput zonemaker (std::vector< ConvertedHit > ConvHits)
 
std::vector< ZonesOutputZones (std::vector< std::vector< ConvertedHit >> Hits)
 

Function Documentation

ZonesOutput zonemaker ( std::vector< ConvertedHit ConvHits)

Definition at line 12 of file ZoneCreation.h.

References ZonesOutput::convertedhits, h, convertSQLitetoXML_cfg::output, and ZonesOutput::zone.

Referenced by Zones().

12  {
13 
14  //bool verbose = false;
15  PhiMemoryImage image0;
16  std::vector<PhiMemoryImage> zones (4,image0);
17 
18 
19  for(std::vector<ConvertedHit>::iterator h = ConvHits.begin();h != ConvHits.end();h++){
20 
21  std::vector<int> zc=h->ZoneContribution();
22 
23  for(std::vector<int>::iterator in_this_zone = zc.begin();in_this_zone != zc.end();in_this_zone++){
24  for(int zone = 0;zone<4;zone++){
25  if(zone == *in_this_zone)
26  zones[zone].SetBit(h->Station(),(h->Zhit()+1));
27  }
28  }
29  }
30 
32  output.zone = zones;
33  output.convertedhits = ConvHits;
34 
35  return output;
36 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: zones.h:12
std::vector< PhiMemoryImage > zone
std::vector< ConvertedHit > convertedhits
std::vector<ZonesOutput> Zones ( std::vector< std::vector< ConvertedHit >>  Hits)

Definition at line 39 of file ZoneCreation.h.

References i, convertSQLitetoXML_cfg::output, tmp, and zonemaker().

Referenced by L1TMuonEndCapTrackProducer::produce().

39  {
40 
41 
43  std::vector<ZonesOutput> output (3,tmp);
44 
45  for(int i=0;i<3;i++)
46  output[i] = zonemaker(Hits[i]);
47 
48 
49  return output;
50 
51 }
int i
Definition: DBlmapReader.cc:9
ZonesOutput zonemaker(std::vector< ConvertedHit > ConvHits)
Definition: ZoneCreation.h:12
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100