CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
GlobalHitsProducer Class Reference

#include <GlobalHitsProducer.h>

Inheritance diagram for GlobalHitsProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef std::vector< float > FloatVector
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

virtual void beginJob (void)
 
virtual void endJob ()
 
 GlobalHitsProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
virtual ~GlobalHitsProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void clear ()
 
void fillECal (edm::Event &, const edm::EventSetup &)
 
void fillG4MC (edm::Event &)
 
void fillHCal (edm::Event &, const edm::EventSetup &)
 
void fillMuon (edm::Event &, const edm::EventSetup &)
 
void fillTrk (edm::Event &, const edm::EventSetup &)
 
void storeECal (PGlobalSimHit &)
 
void storeG4MC (PGlobalSimHit &)
 
void storeHCal (PGlobalSimHit &)
 
void storeMuon (PGlobalSimHit &)
 
void storeTrk (PGlobalSimHit &)
 

Private Attributes

unsigned int count
 
FloatVector ECalE
 
edm::InputTag ECalEBSrc_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
ECalEBSrc_Token_
 
edm::InputTag ECalEESrc_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
ECalEESrc_Token_
 
edm::InputTag ECalESSrc_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
ECalESSrc_Token_
 
FloatVector ECalEta
 
FloatVector ECalPhi
 
FloatVector ECalToF
 
std::string fName
 
int frequency
 
FloatVector G4TrkE
 
FloatVector G4TrkPt
 
edm::InputTag G4TrkSrc_
 
edm::EDGetTokenT
< edm::SimTrackContainer
G4TrkSrc_Token_
 
edm::InputTag G4VtxSrc_
 
edm::EDGetTokenT
< edm::SimVertexContainer
G4VtxSrc_Token_
 
FloatVector G4VtxX
 
FloatVector G4VtxY
 
FloatVector G4VtxZ
 
bool getAllProvenances
 
FloatVector HCalE
 
FloatVector HCalEta
 
FloatVector HCalPhi
 
edm::InputTag HCalSrc_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
HCalSrc_Token_
 
FloatVector HCalToF
 
std::string label
 
FloatVector MuonCscEta
 
FloatVector MuonCscPhi
 
edm::InputTag MuonCscSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
MuonCscSrc_Token_
 
FloatVector MuonCscToF
 
FloatVector MuonCscZ
 
FloatVector MuonDtEta
 
FloatVector MuonDtPhi
 
FloatVector MuonDtR
 
edm::InputTag MuonDtSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
MuonDtSrc_Token_
 
FloatVector MuonDtToF
 
FloatVector MuonRpcBrlEta
 
FloatVector MuonRpcBrlPhi
 
FloatVector MuonRpcBrlR
 
FloatVector MuonRpcBrlToF
 
FloatVector MuonRpcFwdEta
 
FloatVector MuonRpcFwdPhi
 
FloatVector MuonRpcFwdToF
 
FloatVector MuonRpcFwdZ
 
edm::InputTag MuonRpcSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
MuonRpcSrc_Token_
 
int nRawGenPart
 
FloatVector PreShE
 
FloatVector PreShEta
 
FloatVector PreShPhi
 
FloatVector PreShToF
 
bool printProvenanceInfo
 
FloatVector PxlBrlEta
 
edm::InputTag PxlBrlHighSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
PxlBrlHighSrc_Token_
 
edm::InputTag PxlBrlLowSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
PxlBrlLowSrc_Token_
 
FloatVector PxlBrlPhi
 
FloatVector PxlBrlR
 
FloatVector PxlBrlToF
 
FloatVector PxlFwdEta
 
edm::InputTag PxlFwdHighSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
PxlFwdHighSrc_Token_
 
edm::InputTag PxlFwdLowSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
PxlFwdLowSrc_Token_
 
FloatVector PxlFwdPhi
 
FloatVector PxlFwdToF
 
FloatVector PxlFwdZ
 
FloatVector SiBrlEta
 
FloatVector SiBrlPhi
 
FloatVector SiBrlR
 
FloatVector SiBrlToF
 
FloatVector SiFwdEta
 
FloatVector SiFwdPhi
 
FloatVector SiFwdToF
 
FloatVector SiFwdZ
 
edm::InputTag SiTECHighSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTECHighSrc_Token_
 
edm::InputTag SiTECLowSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTECLowSrc_Token_
 
edm::InputTag SiTIBHighSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTIBHighSrc_Token_
 
edm::InputTag SiTIBLowSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTIBLowSrc_Token_
 
edm::InputTag SiTIDHighSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTIDHighSrc_Token_
 
edm::InputTag SiTIDLowSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTIDLowSrc_Token_
 
edm::InputTag SiTOBHighSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTOBHighSrc_Token_
 
edm::InputTag SiTOBLowSrc_
 
edm::EDGetTokenT
< edm::PSimHitContainer
SiTOBLowSrc_Token_
 
int verbosity
 
int vtxunit
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Class to fill PGlobalDigis object to be inserted into data stream containing information about various sub-systems in global coordinates with full geometry

Author
M. Strang SUNY-Buffalo

Class to fill PGlobalSimHit object to be inserted into data stream containing information about various sub-systems in global coordinates with full geometry

Author
M. Strang SUNY-Buffalo

Class to fill PGlobalRecHit object to be inserted into data stream containing information about various sub-systems in global coordinates with full geometry

Author
M. Strang SUNY-Buffalo

Definition at line 75 of file GlobalHitsProducer.h.

Member Typedef Documentation

typedef std::vector<float> GlobalHitsProducer::FloatVector

Definition at line 80 of file GlobalHitsProducer.h.

Constructor & Destructor Documentation

GlobalHitsProducer::GlobalHitsProducer ( const edm::ParameterSet iPSet)
explicit

Definition at line 11 of file GlobalHitsProducer.cc.

References clear(), ECalEBSrc_, ECalEBSrc_Token_, ECalEESrc_, ECalEESrc_Token_, ECalESSrc_, ECalESSrc_Token_, fName, frequency, getAllProvenances, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HCalSrc_, HCalSrc_Token_, edm::InputTag::instance(), edm::InputTag::label(), label, MuonCscSrc_, MuonCscSrc_Token_, MuonDtSrc_, MuonDtSrc_Token_, MuonRpcSrc_, MuonRpcSrc_Token_, printProvenanceInfo, PxlBrlHighSrc_, PxlBrlHighSrc_Token_, PxlBrlLowSrc_, PxlBrlLowSrc_Token_, PxlFwdHighSrc_, PxlFwdHighSrc_Token_, PxlFwdLowSrc_, PxlFwdLowSrc_Token_, SiTECHighSrc_, SiTECHighSrc_Token_, SiTECLowSrc_, SiTECLowSrc_Token_, SiTIBHighSrc_, SiTIBHighSrc_Token_, SiTIBLowSrc_, SiTIBLowSrc_Token_, SiTIDHighSrc_, SiTIDHighSrc_Token_, SiTIDLowSrc_, SiTIDLowSrc_Token_, SiTOBHighSrc_, SiTOBHighSrc_Token_, SiTOBLowSrc_, SiTOBLowSrc_Token_, AlCaHLTBitMon_QueryRunRegistry::string, verbosity, and vtxunit.

11  :
12  fName(""), verbosity(0), frequency(0), vtxunit(0), label(""),
14  G4VtxSrc_Token_( consumes<edm::SimVertexContainer>((iPSet.getParameter<edm::InputTag>("G4VtxSrc"))) ),
15  G4TrkSrc_Token_( consumes<edm::SimTrackContainer>(iPSet.getParameter<edm::InputTag>("G4TrkSrc")) ),
16  //ECalEBSrc_(""), ECalEESrc_(""), ECalESSrc_(""), HCalSrc_(""),
17  //PxlBrlLowSrc_(""), PxlBrlHighSrc_(""), PxlFwdLowSrc_(""),
18  //PxlFwdHighSrc_(""), SiTIBLowSrc_(""), SiTIBHighSrc_(""),
19  //SiTOBLowSrc_(""), SiTOBHighSrc_(""), SiTIDLowSrc_(""),
20  //SiTIDHighSrc_(""), SiTECLowSrc_(""), SiTECHighSrc_(""),
21  //MuonDtSrc_(""), MuonCscSrc_(""), MuonRpcSrc_(""),
22  count(0)
23 {
24  std::string MsgLoggerCat = "GlobalHitsProducer_GlobalHitsProducer";
25 
26  // get information from parameter set
27  fName = iPSet.getUntrackedParameter<std::string>("Name");
28  verbosity = iPSet.getUntrackedParameter<int>("Verbosity");
29  frequency = iPSet.getUntrackedParameter<int>("Frequency");
30  vtxunit = iPSet.getUntrackedParameter<int>("VtxUnit");
31  label = iPSet.getParameter<std::string>("Label");
32  edm::ParameterSet m_Prov =
33  iPSet.getParameter<edm::ParameterSet>("ProvenanceLookup");
35  m_Prov.getUntrackedParameter<bool>("GetAllProvenances");
37  m_Prov.getUntrackedParameter<bool>("PrintProvenanceInfo");
38 
39  //get Labels to use to extract information
40  PxlBrlLowSrc_ = iPSet.getParameter<edm::InputTag>("PxlBrlLowSrc");
41  PxlBrlHighSrc_ = iPSet.getParameter<edm::InputTag>("PxlBrlHighSrc");
42  PxlFwdLowSrc_ = iPSet.getParameter<edm::InputTag>("PxlFwdLowSrc");
43  PxlFwdHighSrc_ = iPSet.getParameter<edm::InputTag>("PxlFwdHighSrc");
44 
45  SiTIBLowSrc_ = iPSet.getParameter<edm::InputTag>("SiTIBLowSrc");
46  SiTIBHighSrc_ = iPSet.getParameter<edm::InputTag>("SiTIBHighSrc");
47  SiTOBLowSrc_ = iPSet.getParameter<edm::InputTag>("SiTOBLowSrc");
48  SiTOBHighSrc_ = iPSet.getParameter<edm::InputTag>("SiTOBHighSrc");
49  SiTIDLowSrc_ = iPSet.getParameter<edm::InputTag>("SiTIDLowSrc");
50  SiTIDHighSrc_ = iPSet.getParameter<edm::InputTag>("SiTIDHighSrc");
51  SiTECLowSrc_ = iPSet.getParameter<edm::InputTag>("SiTECLowSrc");
52  SiTECHighSrc_ = iPSet.getParameter<edm::InputTag>("SiTECHighSrc");
53 
54  MuonCscSrc_ = iPSet.getParameter<edm::InputTag>("MuonCscSrc");
55  MuonDtSrc_ = iPSet.getParameter<edm::InputTag>("MuonDtSrc");
56  MuonRpcSrc_ = iPSet.getParameter<edm::InputTag>("MuonRpcSrc");
57 
58  ECalEBSrc_ = iPSet.getParameter<edm::InputTag>("ECalEBSrc");
59  ECalEESrc_ = iPSet.getParameter<edm::InputTag>("ECalEESrc");
60  ECalESSrc_ = iPSet.getParameter<edm::InputTag>("ECalESSrc");
61 
62  HCalSrc_ = iPSet.getParameter<edm::InputTag>("HCalSrc");
63 
64  // fix for consumes
65  PxlBrlLowSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("PxlBrlLowSrc"));
66  PxlBrlHighSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("PxlBrlHighSrc"));
67  PxlFwdLowSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("PxlFwdLowSrc"));
68  PxlFwdHighSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("PxlFwdHighSrc"));
69 
70  SiTIBLowSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTIBLowSrc"));
71  SiTIBHighSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTIBHighSrc"));
72  SiTOBLowSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTOBLowSrc"));
73  SiTOBHighSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTOBHighSrc"));
74  SiTIDLowSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTIDLowSrc"));
75  SiTIDHighSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTIDHighSrc"));
76  SiTECLowSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTECLowSrc"));
77  SiTECHighSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("SiTECHighSrc"));
78 
79  MuonCscSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuonCscSrc"));
80  MuonDtSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuonDtSrc"));
81  MuonRpcSrc_Token_ = consumes<edm::PSimHitContainer>(iPSet.getParameter<edm::InputTag>("MuonRpcSrc"));
82 
83  ECalEBSrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("ECalEBSrc"));
84  ECalEESrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("ECalEESrc"));
85  ECalESSrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("ECalESSrc"));
86  HCalSrc_Token_ = consumes<edm::PCaloHitContainer>(iPSet.getParameter<edm::InputTag>("HCalSrc"));
87 
88  // use value of first digit to determine default output level (inclusive)
89  // 0 is none, 1 is basic, 2 is fill output, 3 is gather output
90  verbosity %= 10;
91 
92  // create persistent object
93  produces<PGlobalSimHit>(label);
94 
95  // print out Parameter Set information being used
96  if (verbosity >= 0) {
97  edm::LogInfo(MsgLoggerCat)
98  << "\n===============================\n"
99  << "Initialized as EDProducer with parameter values:\n"
100  << " Name = " << fName << "\n"
101  << " Verbosity = " << verbosity << "\n"
102  << " Frequency = " << frequency << "\n"
103  << " VtxUnit = " << vtxunit << "\n"
104  << " Label = " << label << "\n"
105  << " GetProv = " << getAllProvenances << "\n"
106  << " PrintProv = " << printProvenanceInfo << "\n"
107  << " PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
108  << ":" << PxlBrlLowSrc_.instance() << "\n"
109  << " PxlBrlHighSrc = " << PxlBrlHighSrc_.label()
110  << ":" << PxlBrlHighSrc_.instance() << "\n"
111  << " PxlFwdLowSrc = " << PxlFwdLowSrc_.label()
112  << ":" << PxlBrlLowSrc_.instance() << "\n"
113  << " PxlFwdHighSrc = " << PxlFwdHighSrc_.label()
114  << ":" << PxlBrlHighSrc_.instance() << "\n"
115  << " SiTIBLowSrc = " << SiTIBLowSrc_.label()
116  << ":" << SiTIBLowSrc_.instance() << "\n"
117  << " SiTIBHighSrc = " << SiTIBHighSrc_.label()
118  << ":" << SiTIBHighSrc_.instance() << "\n"
119  << " SiTOBLowSrc = " << SiTOBLowSrc_.label()
120  << ":" << SiTOBLowSrc_.instance() << "\n"
121  << " SiTOBHighSrc = " << SiTOBHighSrc_.label()
122  << ":" << SiTOBHighSrc_.instance() << "\n"
123  << " SiTIDLowSrc = " << SiTIDLowSrc_.label()
124  << ":" << SiTIDLowSrc_.instance() << "\n"
125  << " SiTIDHighSrc = " << SiTIDHighSrc_.label()
126  << ":" << SiTIDHighSrc_.instance() << "\n"
127  << " SiTECLowSrc = " << SiTECLowSrc_.label()
128  << ":" << SiTECLowSrc_.instance() << "\n"
129  << " SiTECHighSrc = " << SiTECHighSrc_.label()
130  << ":" << SiTECHighSrc_.instance() << "\n"
131  << " MuonCscSrc = " << MuonCscSrc_.label()
132  << ":" << MuonCscSrc_.instance() << "\n"
133  << " MuonDtSrc = " << MuonDtSrc_.label()
134  << ":" << MuonDtSrc_.instance() << "\n"
135  << " MuonRpcSrc = " << MuonRpcSrc_.label()
136  << ":" << MuonRpcSrc_.instance() << "\n"
137  << " ECalEBSrc = " << ECalEBSrc_.label()
138  << ":" << ECalEBSrc_.instance() << "\n"
139  << " ECalEESrc = " << ECalEESrc_.label()
140  << ":" << ECalEESrc_.instance() << "\n"
141  << " ECalESSrc = " << ECalESSrc_.label()
142  << ":" << ECalESSrc_.instance() << "\n"
143  << " HCalSrc = " << HCalSrc_.label()
144  << ":" << HCalSrc_.instance() << "\n"
145  << "===============================\n";
146  }
147 
148  // migrated here from beginJob
149  clear();
150 
151 }
edm::InputTag ECalESSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
edm::InputTag ECalEESrc_
edm::EDGetTokenT< edm::PSimHitContainer > MuonRpcSrc_Token_
edm::InputTag MuonCscSrc_
edm::InputTag MuonDtSrc_
edm::InputTag SiTOBHighSrc_
edm::InputTag PxlBrlHighSrc_
edm::InputTag PxlBrlLowSrc_
edm::InputTag PxlFwdLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
edm::InputTag SiTIDLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
edm::InputTag SiTECHighSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
edm::InputTag ECalEBSrc_
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonCscSrc_Token_
edm::InputTag SiTIBLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
edm::InputTag SiTECLowSrc_
edm::InputTag SiTIDHighSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
edm::InputTag PxlFwdHighSrc_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDHighSrc_Token_
edm::InputTag SiTOBLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdLowSrc_Token_
std::string const & label() const
Definition: InputTag.h:43
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEESrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
edm::InputTag SiTIBHighSrc_
std::string const & instance() const
Definition: InputTag.h:44
edm::InputTag MuonRpcSrc_
GlobalHitsProducer::~GlobalHitsProducer ( )
virtual

Definition at line 153 of file GlobalHitsProducer.cc.

154 {
155 }

Member Function Documentation

void GlobalHitsProducer::beginJob ( void  )
virtual

Reimplemented from edm::EDProducer.

Definition at line 157 of file GlobalHitsProducer.cc.

158 {
159  return;
160 }
void GlobalHitsProducer::clear ( void  )
private

Definition at line 1552 of file GlobalHitsProducer.cc.

References ECalE, ECalEta, ECalPhi, ECalToF, G4TrkE, G4TrkPt, G4VtxX, G4VtxY, G4VtxZ, HCalE, HCalEta, HCalPhi, HCalToF, MuonCscEta, MuonCscPhi, MuonCscToF, MuonCscZ, MuonDtEta, MuonDtPhi, MuonDtR, MuonDtToF, MuonRpcBrlEta, MuonRpcBrlPhi, MuonRpcBrlR, MuonRpcBrlToF, MuonRpcFwdEta, MuonRpcFwdPhi, MuonRpcFwdToF, MuonRpcFwdZ, nRawGenPart, PreShE, PreShEta, PreShPhi, PreShToF, PxlBrlEta, PxlBrlPhi, PxlBrlR, PxlBrlToF, PxlFwdEta, PxlFwdPhi, PxlFwdToF, PxlFwdZ, SiBrlEta, SiBrlPhi, SiBrlR, SiBrlToF, SiFwdEta, SiFwdPhi, SiFwdToF, SiFwdZ, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by GlobalHitsProducer(), and produce().

1553 {
1554  std::string MsgLoggerCat = "GlobalHitsProducer_clear";
1555 
1556  if (verbosity > 0)
1557  edm::LogInfo(MsgLoggerCat)
1558  << "Clearing event holders";
1559 
1560  // reset G4MC info
1561  nRawGenPart = 0;
1562  G4VtxX.clear();
1563  G4VtxY.clear();
1564  G4VtxZ.clear();
1565  G4TrkPt.clear();
1566  G4TrkE.clear();
1567 
1568  // reset electromagnetic info
1569  // reset ECal info
1570  ECalE.clear();
1571  ECalToF.clear();
1572  ECalPhi.clear();
1573  ECalEta.clear();
1574  // reset Preshower info
1575  PreShE.clear();
1576  PreShToF.clear();
1577  PreShPhi.clear();
1578  PreShEta.clear();
1579 
1580  // reset hadronic info
1581  // reset HCal info
1582  HCalE.clear();
1583  HCalToF.clear();
1584  HCalPhi.clear();
1585  HCalEta.clear();
1586 
1587  // reset tracker info
1588  // reset Pixel info
1589  PxlBrlToF.clear();
1590  PxlBrlR.clear();
1591  PxlBrlPhi.clear();
1592  PxlBrlEta.clear();
1593  PxlFwdToF.clear();
1594  PxlFwdZ.clear();
1595  PxlFwdPhi.clear();
1596  PxlFwdEta.clear();
1597  // reset strip info
1598  SiBrlToF.clear();
1599  SiBrlR.clear();
1600  SiBrlPhi.clear();
1601  SiBrlEta.clear();
1602  SiFwdToF.clear();
1603  SiFwdZ.clear();
1604  SiFwdPhi.clear();
1605  SiFwdEta.clear();
1606 
1607  // reset muon info
1608  // reset muon DT info
1609  MuonDtToF.clear();
1610  MuonDtR.clear();
1611  MuonDtPhi.clear();
1612  MuonDtEta.clear();
1613  // reset muon CSC info
1614  MuonCscToF.clear();
1615  MuonCscZ.clear();
1616  MuonCscPhi.clear();
1617  MuonCscEta.clear();
1618  // rest muon RPC info
1619  MuonRpcBrlToF.clear();
1620  MuonRpcBrlR.clear();
1621  MuonRpcBrlPhi.clear();
1622  MuonRpcBrlEta.clear();
1623  MuonRpcFwdToF.clear();
1624  MuonRpcFwdZ.clear();
1625  MuonRpcFwdPhi.clear();
1626  MuonRpcFwdEta.clear();
1627 
1628  return;
1629 }
void GlobalHitsProducer::endJob ( void  )
virtual

Reimplemented from edm::EDProducer.

Definition at line 162 of file GlobalHitsProducer.cc.

References count, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

163 {
164  std::string MsgLoggerCat = "GlobalHitsProducer_endJob";
165  if (verbosity >= 0)
166  edm::LogInfo(MsgLoggerCat)
167  << "Terminating having processed " << count << " events.";
168  return;
169 }
void GlobalHitsProducer::fillECal ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1216 of file GlobalHitsProducer.cc.

References dEcal, DetId::det(), ECalE, ECalEBSrc_Token_, ECalEESrc_Token_, ECalESSrc_Token_, ECalEta, ECalPhi, ECalToF, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), edm::Event::getByToken(), CaloGeometry::getGeometry(), CaloCellGeometry::getPosition(), i, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), j, PV3DBase< T, PVType, FrameType >::phi(), PreShE, PreShEta, PreShPhi, PreShToF, sdEcalBrl, sdEcalFwd, sdEcalPS, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by produce().

1218 {
1219  std::string MsgLoggerCat = "GlobalHitsProducer_fillECal";
1220 
1221  TString eventout;
1222  if (verbosity > 0)
1223  eventout = "\nGathering info:";
1224 
1225  // access the calorimeter geometry
1226  edm::ESHandle<CaloGeometry> theCaloGeometry;
1227  iSetup.get<CaloGeometryRecord>().get(theCaloGeometry);
1228  if (!theCaloGeometry.isValid()) {
1229  edm::LogWarning(MsgLoggerCat)
1230  << "Unable to find CaloGeometryRecord in event!";
1231  return;
1232  }
1233  const CaloGeometry& theCalo(*theCaloGeometry);
1234 
1235  // iterator to access containers
1236  edm::PCaloHitContainer::const_iterator itHit;
1237 
1239  // get ECal information
1241  edm::PCaloHitContainer theECalHits;
1242  // extract EB container
1244  iEvent.getByToken(ECalEBSrc_Token_,EBContainer);
1245  if (!EBContainer.isValid()) {
1246  edm::LogWarning(MsgLoggerCat)
1247  << "Unable to find EcalHitsEB in event!";
1248  return;
1249  }
1250  // extract EE container
1252  iEvent.getByToken(ECalEESrc_Token_,EEContainer);
1253  if (!EEContainer.isValid()) {
1254  edm::LogWarning(MsgLoggerCat)
1255  << "Unable to find EcalHitsEE in event!";
1256  return;
1257  }
1258  // place both containers into new container
1259  theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1260  EBContainer->end());
1261  theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1262  EEContainer->end());
1263 
1264  // cycle through new container
1265  int i = 0, j = 0;
1266  for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1267 
1268  ++i;
1269 
1270  // create a DetId from the detUnitId
1271  DetId theDetUnitId(itHit->id());
1272  int detector = theDetUnitId.det();
1273  int subdetector = theDetUnitId.subdetId();
1274 
1275  // check that expected detector is returned
1276  if ((detector == dEcal) &&
1277  ((subdetector == sdEcalBrl) ||
1278  (subdetector == sdEcalFwd))) {
1279 
1280  // get the Cell geometry
1281  const CaloCellGeometry *theDet = theCalo.
1282  getSubdetectorGeometry(theDetUnitId)->getGeometry(theDetUnitId);
1283 
1284  if (!theDet) {
1285  edm::LogWarning(MsgLoggerCat)
1286  << "Unable to get CaloCellGeometry from ECalHits for Hit " << i;
1287  continue;
1288  }
1289 
1290  ++j;
1291 
1292  // get the global position of the cell
1293  const GlobalPoint& globalposition = theDet->getPosition();
1294 
1295  // gather necessary information
1296  ECalE.push_back(itHit->energy());
1297  ECalToF.push_back(itHit->time());
1298  ECalPhi.push_back(globalposition.phi());
1299  ECalEta.push_back(globalposition.eta());
1300 
1301  } else {
1302  edm::LogWarning(MsgLoggerCat)
1303  << "ECal PCaloHit " << i
1304  << " is expected to be (det,subdet) = ("
1305  << dEcal << "," << sdEcalBrl
1306  << " || " << sdEcalFwd << "); value returned is: ("
1307  << detector << "," << subdetector << ")";
1308  continue;
1309  } // end detector type check
1310  } // end loop through ECal Hits
1311 
1312  if (verbosity > 1) {
1313  eventout += "\n Number of ECal Hits collected:............. ";
1314  eventout += j;
1315  }
1316 
1318  // Get Preshower information
1320  // extract PreShower container
1321  edm::Handle<edm::PCaloHitContainer> PreShContainer;
1322  iEvent.getByToken(ECalESSrc_Token_,PreShContainer);
1323  if (!PreShContainer.isValid()) {
1324  edm::LogWarning(MsgLoggerCat)
1325  << "Unable to find EcalHitsES in event!";
1326  return;
1327  }
1328 
1329  // cycle through container
1330  i = 0, j = 0;
1331  for (itHit = PreShContainer->begin();
1332  itHit != PreShContainer->end(); ++itHit) {
1333 
1334  ++i;
1335 
1336  // create a DetId from the detUnitId
1337  DetId theDetUnitId(itHit->id());
1338  int detector = theDetUnitId.det();
1339  int subdetector = theDetUnitId.subdetId();
1340 
1341  // check that expected detector is returned
1342  if ((detector == dEcal) &&
1343  (subdetector == sdEcalPS)) {
1344 
1345  // get the Cell geometry
1346  const CaloCellGeometry *theDet = theCalo.
1347  getSubdetectorGeometry(theDetUnitId)->getGeometry(theDetUnitId);
1348 
1349  if (!theDet) {
1350  edm::LogWarning(MsgLoggerCat)
1351  << "Unable to get CaloCellGeometry from PreShContainer for Hit "
1352  << i;
1353  continue;
1354  }
1355 
1356  ++j;
1357 
1358  // get the global position of the cell
1359  const GlobalPoint& globalposition = theDet->getPosition();
1360 
1361  // gather necessary information
1362  PreShE.push_back(itHit->energy());
1363  PreShToF.push_back(itHit->time());
1364  PreShPhi.push_back(globalposition.phi());
1365  PreShEta.push_back(globalposition.eta());
1366 
1367  } else {
1368  edm::LogWarning(MsgLoggerCat)
1369  << "PreSh PCaloHit " << i
1370  << " is expected to be (det,subdet) = ("
1371  << dEcal << "," << sdEcalPS
1372  << "); value returned is: ("
1373  << detector << "," << subdetector << ")";
1374  continue;
1375  } // end detector type check
1376  } // end loop through PreShower Hits
1377 
1378  if (verbosity > 1) {
1379  eventout += "\n Number of PreSh Hits collected:............ ";
1380  eventout += j;
1381  }
1382 
1383  if (verbosity > 0)
1384  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1385 
1386  return;
1387 }
int i
Definition: DBlmapReader.cc:9
static const int dEcal
std::vector< PCaloHit > PCaloHitContainer
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
static const int sdEcalPS
static const int sdEcalFwd
int j
Definition: DBlmapReader.cc:9
static const int sdEcalBrl
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56
T eta() const
Definition: PV3DBase.h:76
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEESrc_Token_
bool isValid() const
Definition: ESHandle.h:47
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
void GlobalHitsProducer::fillG4MC ( edm::Event iEvent)
private

Definition at line 273 of file GlobalHitsProducer.cc.

References G4TrkE, G4TrkPt, G4TrkSrc_Token_, G4VtxSrc_Token_, G4VtxX, G4VtxY, G4VtxZ, edm::Event::getByToken(), edm::Event::getManyByType(), i, edm::HandleBase::isValid(), nRawGenPart, edm::Provenance::product(), edm::HandleBase::provenance(), mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, csvLumiCalc::unit, verbosity, and vtxunit.

Referenced by produce().

274 {
275 
276  std::string MsgLoggerCat = "GlobalHitsProducer_fillG4MC";
277 
278  TString eventout;
279  if (verbosity > 0)
280  eventout = "\nGathering info:";
281 
283  // get MC information
286  std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
287  iEvent.getManyByType(AllHepMCEvt);
288 
289  // loop through products and extract VtxSmearing if available. Any of them
290  // should have the information needed
291  for (unsigned int i = 0; i < AllHepMCEvt.size(); ++i) {
292  HepMCEvt = AllHepMCEvt[i];
293  if ((HepMCEvt.provenance()->product()).moduleLabel() == "generatorSmeared")
294  break;
295  }
296 
297  if (!HepMCEvt.isValid()) {
298  edm::LogWarning(MsgLoggerCat)
299  << "Unable to find HepMCProduct in event!";
300  return;
301  } else {
302  eventout += "\n Using HepMCProduct: ";
303  eventout += (HepMCEvt.provenance()->product()).moduleLabel();
304  }
305  const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
306  nRawGenPart = MCEvt->particles_size();
307 
308  if (verbosity > 1) {
309  eventout += "\n Number of Raw Particles collected:......... ";
310  eventout += nRawGenPart;
311  }
312 
314  // get G4Vertex information
316  // convert unit stored in SimVertex to mm
317  float unit = 0.;
318  if (vtxunit == 0) unit = 1.; // already in mm
319  if (vtxunit == 1) unit = 10.; // stored in cm, convert to mm
320 
322  iEvent.getByToken(G4VtxSrc_Token_, G4VtxContainer);
323  if (!G4VtxContainer.isValid()) {
324  edm::LogWarning(MsgLoggerCat)
325  << "Unable to find SimVertex in event!";
326  return;
327  }
328  int i = 0;
329  edm::SimVertexContainer::const_iterator itVtx;
330  for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
331  ++itVtx) {
332 
333  ++i;
334 
335  const math::XYZTLorentzVector G4Vtx1(itVtx->position().x(),
336  itVtx->position().y(),
337  itVtx->position().z(),
338  itVtx->position().e());
339  double G4Vtx[4];
340  G4Vtx1.GetCoordinates(G4Vtx);
341 
342  G4VtxX.push_back((G4Vtx[0]*unit)/micrometer);
343  G4VtxY.push_back((G4Vtx[1]*unit)/micrometer);
344  G4VtxZ.push_back((G4Vtx[2]*unit)/millimeter);
345  }
346 
347  if (verbosity > 1) {
348  eventout += "\n Number of G4Vertices collected:............ ";
349  eventout += i;
350  }
351 
353  // get G4Track information
356  iEvent.getByToken(G4TrkSrc_Token_, G4TrkContainer);
357 
358  if (!G4TrkContainer.isValid()) {
359  edm::LogWarning(MsgLoggerCat)
360  << "Unable to find SimTrack in event!";
361  return;
362  }
363  i = 0;
364  edm::SimTrackContainer::const_iterator itTrk;
365  for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
366  ++itTrk) {
367 
368  ++i;
369 
370  const math::XYZTLorentzVector G4Trk1(itTrk->momentum().x(),
371  itTrk->momentum().y(),
372  itTrk->momentum().z(),
373  itTrk->momentum().e());
374  double G4Trk[4];
375  G4Trk1.GetCoordinates(G4Trk);
376 
377  G4TrkPt.push_back(sqrt(G4Trk[0]*G4Trk[0]+G4Trk[1]*G4Trk[1])); //GeV
378  G4TrkE.push_back(G4Trk[3]); //GeV
379  }
380 
381  if (verbosity > 1) {
382  eventout += "\n Number of G4Tracks collected:.............. ";
383  eventout += i;
384  }
385 
386  if (verbosity > 0)
387  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
388 
389  return;
390 }
void getManyByType(std::vector< Handle< PROD > > &results) const
Definition: Event.h:454
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
string unit
Definition: csvLumiCalc.py:46
T sqrt(T t)
Definition: SSEVec.h:48
BranchDescription const & product() const
Definition: Provenance.h:42
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
Provenance const * provenance() const
Definition: HandleBase.h:84
void GlobalHitsProducer::fillHCal ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 1429 of file GlobalHitsProducer.cc.

References DetId::det(), dHcal, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), edm::Event::getByToken(), CaloGeometry::getGeometry(), CaloCellGeometry::getPosition(), HCalE, HCalEta, HCalPhi, HCalSrc_Token_, HCalToF, i, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), j, PV3DBase< T, PVType, FrameType >::phi(), sdHcalBrl, sdHcalEC, sdHcalFwd, sdHcalOut, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by produce().

1431 {
1432  std::string MsgLoggerCat = "GlobalHitsProducer_fillHCal";
1433 
1434  TString eventout;
1435  if (verbosity > 0)
1436  eventout = "\nGathering info:";
1437 
1438  // access the calorimeter geometry
1439  edm::ESHandle<CaloGeometry> theCaloGeometry;
1440  iSetup.get<CaloGeometryRecord>().get(theCaloGeometry);
1441  if (!theCaloGeometry.isValid()) {
1442  edm::LogWarning(MsgLoggerCat)
1443  << "Unable to find CaloGeometryRecord in event!";
1444  return;
1445  }
1446  const CaloGeometry& theCalo(*theCaloGeometry);
1447 
1448  // iterator to access containers
1449  edm::PCaloHitContainer::const_iterator itHit;
1450 
1452  // get HCal information
1454  // extract HCal container
1456  iEvent.getByToken(HCalSrc_Token_,HCalContainer);
1457  if (!HCalContainer.isValid()) {
1458  edm::LogWarning(MsgLoggerCat)
1459  << "Unable to find HCalHits in event!";
1460  return;
1461  }
1462 
1463  // cycle through container
1464  int i = 0, j = 0;
1465  for (itHit = HCalContainer->begin();
1466  itHit != HCalContainer->end(); ++itHit) {
1467 
1468  ++i;
1469 
1470  // create a DetId from the detUnitId
1471  DetId theDetUnitId(itHit->id());
1472  int detector = theDetUnitId.det();
1473  int subdetector = theDetUnitId.subdetId();
1474 
1475  // check that expected detector is returned
1476  if ((detector == dHcal) &&
1477  ((subdetector == sdHcalBrl) ||
1478  (subdetector == sdHcalEC) ||
1479  (subdetector == sdHcalOut) ||
1480  (subdetector == sdHcalFwd))) {
1481 
1482  // get the Cell geometry
1483  const CaloCellGeometry *theDet = theCalo.
1484  getSubdetectorGeometry(theDetUnitId)->getGeometry(theDetUnitId);
1485 
1486  if (!theDet) {
1487  edm::LogWarning(MsgLoggerCat)
1488  << "Unable to get CaloCellGeometry from HCalContainer for Hit " << i;
1489  continue;
1490  }
1491 
1492  ++j;
1493 
1494  // get the global position of the cell
1495  const GlobalPoint& globalposition = theDet->getPosition();
1496 
1497  // gather necessary information
1498  HCalE.push_back(itHit->energy());
1499  HCalToF.push_back(itHit->time());
1500  HCalPhi.push_back(globalposition.phi());
1501  HCalEta.push_back(globalposition.eta());
1502 
1503  } else {
1504  edm::LogWarning(MsgLoggerCat)
1505  << "HCal PCaloHit " << i
1506  << " is expected to be (det,subdet) = ("
1507  << dHcal << "," << sdHcalBrl
1508  << " || " << sdHcalEC << " || " << sdHcalOut << " || " << sdHcalFwd
1509  << "); value returned is: ("
1510  << detector << "," << subdetector << ")";
1511  continue;
1512  } // end detector type check
1513  } // end loop through HCal Hits
1514 
1515  if (verbosity > 1) {
1516  eventout += "\n Number of HCal Hits collected:............. ";
1517  eventout += j;
1518  }
1519 
1520  if (verbosity > 0)
1521  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1522 
1523  return;
1524 }
int i
Definition: DBlmapReader.cc:9
static const int sdHcalOut
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:75
Definition: DetId.h:18
static const int dHcal
const T & get() const
Definition: EventSetup.h:56
static const int sdHcalFwd
static const int sdHcalBrl
T eta() const
Definition: PV3DBase.h:76
bool isValid() const
Definition: ESHandle.h:47
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
static const int sdHcalEC
void GlobalHitsProducer::fillMuon ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 870 of file GlobalHitsProducer.cc.

References DetId::det(), dMuon, eta, edm::EventSetup::get(), edm::Event::getByToken(), i, RPCGeometry::idToDetUnit(), CSCGeometry::idToDetUnit(), edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), j, DTGeometry::layer(), MuonCscEta, MuonCscPhi, MuonCscSrc_Token_, MuonCscToF, MuonCscZ, MuonDtEta, MuonDtPhi, MuonDtR, MuonDtSrc_Token_, MuonDtToF, MuonRpcBrlEta, MuonRpcBrlPhi, MuonRpcBrlR, MuonRpcBrlToF, MuonRpcFwdEta, MuonRpcFwdPhi, MuonRpcFwdToF, MuonRpcFwdZ, MuonRpcSrc_Token_, perp(), phi, HLT_25ns14e33_v3_cff::region, sdMuonCSC, sdMuonDT, sdMuonRPC, sdMuonRPCRgnBrl, sdMuonRPCRgnFwdn, sdMuonRPCRgnFwdp, AlCaHLTBitMon_QueryRunRegistry::string, GeomDet::surface(), verbosity, and z.

Referenced by produce().

872 {
873  std::string MsgLoggerCat = "GlobalHitsProducer_fillMuon";
874 
875  TString eventout;
876  if (verbosity > 0)
877  eventout = "\nGathering info:";
878 
879  // iterator to access containers
880  edm::PSimHitContainer::const_iterator itHit;
881 
882  //int i = 0, j = 0;
884  // access the CSC Muon
886  // access the CSC Muon geometry
887  edm::ESHandle<CSCGeometry> theCSCGeometry;
888  iSetup.get<MuonGeometryRecord>().get(theCSCGeometry);
889  if (!theCSCGeometry.isValid()) {
890  edm::LogWarning(MsgLoggerCat)
891  << "Unable to find MuonGeometryRecord for the CSCGeometry in event!";
892  return;
893  }
894  const CSCGeometry& theCSCMuon(*theCSCGeometry);
895 
896  // get Muon CSC information
897  edm::Handle<edm::PSimHitContainer> MuonCSCContainer;
898  iEvent.getByToken(MuonCscSrc_Token_,MuonCSCContainer);
899  if (!MuonCSCContainer.isValid()) {
900  edm::LogWarning(MsgLoggerCat)
901  << "Unable to find MuonCSCHits in event!";
902  return;
903  }
904 
905  // cycle through container
906  int i = 0, j = 0;
907  for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
908  ++itHit) {
909 
910  ++i;
911 
912  // create a DetId from the detUnitId
913  DetId theDetUnitId(itHit->detUnitId());
914  int detector = theDetUnitId.det();
915  int subdetector = theDetUnitId.subdetId();
916 
917  // check that expected detector is returned
918  if ((detector == dMuon) &&
919  (subdetector == sdMuonCSC)) {
920 
921  // get the GeomDetUnit from the geometry using theDetUnitID
922  const GeomDetUnit *theDet = theCSCMuon.idToDetUnit(theDetUnitId);
923 
924  if (!theDet) {
925  edm::LogWarning(MsgLoggerCat)
926  << "Unable to get GeomDetUnit from theCSCMuon for hit " << i;
927  continue;
928  }
929 
930  ++j;
931 
932  // get the Surface of the hit (knows how to go from local <-> global)
933  const BoundPlane& bSurface = theDet->surface();
934 
935  // gather necessary information
936  MuonCscToF.push_back(itHit->tof());
937  MuonCscZ.push_back(bSurface.toGlobal(itHit->localPosition()).z());
938  MuonCscPhi.push_back(bSurface.toGlobal(itHit->localPosition()).phi());
939  MuonCscEta.push_back(bSurface.toGlobal(itHit->localPosition()).eta());
940  } else {
941  edm::LogWarning(MsgLoggerCat)
942  << "MuonCsc PSimHit " << i
943  << " is expected to be (det,subdet) = ("
944  << dMuon << "," << sdMuonCSC
945  << "); value returned is: ("
946  << detector << "," << subdetector << ")";
947  continue;
948  } // end detector type check
949  } // end loop through CSC Hits
950 
951  if (verbosity > 1) {
952  eventout += "\n Number of CSC muon Hits collected:......... ";
953  eventout += j;
954  }
955 
956  //i = 0, j = 0;
958  // access the DT Muon
960  // access the DT Muon geometry
961  edm::ESHandle<DTGeometry> theDTGeometry;
962  iSetup.get<MuonGeometryRecord>().get(theDTGeometry);
963  if (!theDTGeometry.isValid()) {
964  edm::LogWarning(MsgLoggerCat)
965  << "Unable to find MuonGeometryRecord for the DTGeometry in event!";
966  return;
967  }
968  const DTGeometry& theDTMuon(*theDTGeometry);
969 
970  // get Muon DT information
971  edm::Handle<edm::PSimHitContainer> MuonDtContainer;
972  iEvent.getByToken(MuonDtSrc_Token_,MuonDtContainer);
973  if (!MuonDtContainer.isValid()) {
974  edm::LogWarning(MsgLoggerCat)
975  << "Unable to find MuonDTHits in event!";
976  return;
977  }
978 
979  // cycle through container
980  i = 0, j = 0;
981  for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
982  ++itHit) {
983 
984  ++i;
985 
986  // create a DetId from the detUnitId
987  DetId theDetUnitId(itHit->detUnitId());
988  int detector = theDetUnitId.det();
989  int subdetector = theDetUnitId.subdetId();
990 
991  // check that expected detector is returned
992  if ((detector == dMuon) &&
993  (subdetector == sdMuonDT)) {
994 
995  // CSC uses wires and layers rather than the full detID
996  // get the wireId
997  DTWireId wireId(itHit->detUnitId());
998 
999  // get the DTLayer from the geometry using the wireID
1000  const DTLayer *theDet = theDTMuon.layer(wireId.layerId());
1001 
1002  if (!theDet) {
1003  edm::LogWarning(MsgLoggerCat)
1004  << "Unable to get GeomDetUnit from theDtMuon for hit " << i;
1005  continue;
1006  }
1007 
1008  ++j;
1009 
1010  // get the Surface of the hit (knows how to go from local <-> global)
1011  const BoundPlane& bSurface = theDet->surface();
1012 
1013  // gather necessary information
1014  MuonDtToF.push_back(itHit->tof());
1015  MuonDtR.push_back(bSurface.toGlobal(itHit->localPosition()).perp());
1016  MuonDtPhi.push_back(bSurface.toGlobal(itHit->localPosition()).phi());
1017  MuonDtEta.push_back(bSurface.toGlobal(itHit->localPosition()).eta());
1018  } else {
1019  edm::LogWarning(MsgLoggerCat)
1020  << "MuonDt PSimHit " << i
1021  << " is expected to be (det,subdet) = ("
1022  << dMuon << "," << sdMuonDT
1023  << "); value returned is: ("
1024  << detector << "," << subdetector << ")";
1025  continue;
1026  } // end detector type check
1027  } // end loop through DT Hits
1028 
1029  if (verbosity > 1) {
1030  eventout += "\n Number of DT muon Hits collected:.......... ";
1031  eventout += j;
1032  }
1033 
1034  //i = 0, j = 0;
1035  //int RPCBrl = 0, RPCFwd = 0;
1037  // access the RPC Muon
1039  // access the RPC Muon geometry
1040  edm::ESHandle<RPCGeometry> theRPCGeometry;
1041  iSetup.get<MuonGeometryRecord>().get(theRPCGeometry);
1042  if (!theRPCGeometry.isValid()) {
1043  edm::LogWarning(MsgLoggerCat)
1044  << "Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1045  return;
1046  }
1047  const RPCGeometry& theRPCMuon(*theRPCGeometry);
1048 
1049  // get Muon RPC information
1050  edm::Handle<edm::PSimHitContainer> MuonRPCContainer;
1051  iEvent.getByToken(MuonRpcSrc_Token_,MuonRPCContainer);
1052  if (!MuonRPCContainer.isValid()) {
1053  edm::LogWarning(MsgLoggerCat)
1054  << "Unable to find MuonRPCHits in event!";
1055  return;
1056  }
1057 
1058  // cycle through container
1059  i = 0, j = 0;
1060  int RPCBrl =0, RPCFwd = 0;
1061  for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1062  ++itHit) {
1063 
1064  ++i;
1065 
1066  // create a DetID from the detUnitId
1067  DetId theDetUnitId(itHit->detUnitId());
1068  int detector = theDetUnitId.det();
1069  int subdetector = theDetUnitId.subdetId();
1070 
1071  // check that expected detector is returned
1072  if ((detector == dMuon) &&
1073  (subdetector == sdMuonRPC)) {
1074 
1075  // get an RPCDetID from the detUnitID
1076  RPCDetId RPCId(itHit->detUnitId());
1077 
1078  // find the region of the RPC hit
1079  int region = RPCId.region();
1080 
1081  // get the GeomDetUnit from the geometry using the RPCDetId
1082  const GeomDetUnit *theDet = theRPCMuon.idToDetUnit(theDetUnitId);
1083 
1084  if (!theDet) {
1085  edm::LogWarning(MsgLoggerCat)
1086  << "Unable to get GeomDetUnit from theRPCMuon for hit " << i;
1087  continue;
1088  }
1089 
1090  ++j;
1091 
1092  // get the Surface of the hit (knows how to go from local <-> global)
1093  const BoundPlane& bSurface = theDet->surface();
1094 
1095  // gather necessary information
1096  if ((region == sdMuonRPCRgnFwdp) || (region == sdMuonRPCRgnFwdn)) {
1097  ++RPCFwd;
1098 
1099  MuonRpcFwdToF.push_back(itHit->tof());
1100  MuonRpcFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).z());
1101  MuonRpcFwdPhi.
1102  push_back(bSurface.toGlobal(itHit->localPosition()).phi());
1103  MuonRpcFwdEta.
1104  push_back(bSurface.toGlobal(itHit->localPosition()).eta());
1105  } else if (region == sdMuonRPCRgnBrl) {
1106  ++RPCBrl;
1107 
1108  MuonRpcBrlToF.push_back(itHit->tof());
1109  MuonRpcBrlR.
1110  push_back(bSurface.toGlobal(itHit->localPosition()).perp());
1111  MuonRpcBrlPhi.
1112  push_back(bSurface.toGlobal(itHit->localPosition()).phi());
1113  MuonRpcBrlEta.
1114  push_back(bSurface.toGlobal(itHit->localPosition()).eta());
1115  } else {
1116  edm::LogWarning(MsgLoggerCat)
1117  << "Invalid region for RPC Muon hit" << i;
1118  continue;
1119  } // end check of region
1120  } else {
1121  edm::LogWarning(MsgLoggerCat)
1122  << "MuonRpc PSimHit " << i
1123  << " is expected to be (det,subdet) = ("
1124  << dMuon << "," << sdMuonRPC
1125  << "); value returned is: ("
1126  << detector << "," << subdetector << ")";
1127  continue;
1128  } // end detector type check
1129  } // end loop through RPC Hits
1130 
1131  if (verbosity > 1) {
1132  eventout += "\n Number of RPC muon Hits collected:......... ";
1133  eventout += j;
1134  eventout += "\n RPC Barrel muon Hits:............ ";
1135  eventout += RPCBrl;
1136  eventout += "\n RPC Forward muon Hits:........... ";
1137  eventout += RPCFwd;
1138  }
1139 
1140  if (verbosity > 0)
1141  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1142 
1143  return;
1144 }
int i
Definition: DBlmapReader.cc:9
static const int sdMuonRPCRgnFwdn
static const int sdMuonDT
edm::EDGetTokenT< edm::PSimHitContainer > MuonRpcSrc_Token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
static const int sdMuonRPC
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
edm::EDGetTokenT< edm::PSimHitContainer > MuonCscSrc_Token_
static const int sdMuonCSC
int j
Definition: DBlmapReader.cc:9
static const int sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnBrl
bool isValid() const
Definition: HandleBase.h:75
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
T perp() const
Magnitude of transverse component.
static const int dMuon
bool isValid() const
Definition: ESHandle.h:47
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
void GlobalHitsProducer::fillTrk ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 429 of file GlobalHitsProducer.cc.

References DetId::det(), dTrk, eta, edm::EventSetup::get(), edm::Event::getByToken(), i, TrackerGeometry::idToDetUnit(), edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), j, perp(), phi, PxlBrlEta, PxlBrlHighSrc_Token_, PxlBrlLowSrc_Token_, PxlBrlPhi, PxlBrlR, PxlBrlToF, PxlFwdEta, PxlFwdHighSrc_Token_, PxlFwdLowSrc_Token_, PxlFwdPhi, PxlFwdToF, PxlFwdZ, sdPxlBrl, sdPxlFwd, sdSiTEC, sdSiTIB, sdSiTID, sdSiTOB, SiBrlEta, SiBrlPhi, SiBrlR, SiBrlToF, SiFwdEta, SiFwdPhi, SiFwdToF, SiFwdZ, SiTECHighSrc_Token_, SiTECLowSrc_Token_, SiTIBHighSrc_Token_, SiTIBLowSrc_Token_, SiTIDHighSrc_Token_, SiTIDLowSrc_Token_, SiTOBHighSrc_Token_, SiTOBLowSrc_Token_, AlCaHLTBitMon_QueryRunRegistry::string, GeomDet::surface(), verbosity, and z.

Referenced by produce().

431 {
432  std::string MsgLoggerCat = "GlobalHitsProducer_fillTrk";
433 
434  TString eventout;
435  if (verbosity > 0)
436  eventout = "\nGathering info:";
437 
438  // access the tracker geometry
439  edm::ESHandle<TrackerGeometry> theTrackerGeometry;
440  iSetup.get<TrackerDigiGeometryRecord>().get(theTrackerGeometry);
441  if (!theTrackerGeometry.isValid()) {
442  edm::LogWarning(MsgLoggerCat)
443  << "Unable to find TrackerDigiGeometryRecord in event!";
444  return;
445  }
446  const TrackerGeometry& theTracker(*theTrackerGeometry);
447 
448  // iterator to access containers
449  edm::PSimHitContainer::const_iterator itHit;
450 
452  // get Pixel Barrel information
454  edm::PSimHitContainer thePxlBrlHits;
455  // extract low container
456  edm::Handle<edm::PSimHitContainer> PxlBrlLowContainer;
457  iEvent.getByToken(PxlBrlLowSrc_Token_,PxlBrlLowContainer);
458  if (!PxlBrlLowContainer.isValid()) {
459  edm::LogWarning(MsgLoggerCat)
460  << "Unable to find TrackerHitsPixelBarrelLowTof in event!";
461  return;
462  }
463  // extract high container
464  edm::Handle<edm::PSimHitContainer> PxlBrlHighContainer;
465  iEvent.getByToken(PxlBrlHighSrc_Token_,PxlBrlHighContainer);
466  if (!PxlBrlHighContainer.isValid()) {
467  edm::LogWarning(MsgLoggerCat)
468  << "Unable to find TrackerHitsPixelBarrelHighTof in event!";
469  return;
470  }
471  // place both containers into new container
472  thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
473  PxlBrlLowContainer->end());
474  thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
475  PxlBrlHighContainer->end());
476 
477  // cycle through new container
478  int i = 0, j = 0;
479  for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
480 
481  ++i;
482 
483  // create a DetId from the detUnitId
484  DetId theDetUnitId(itHit->detUnitId());
485  int detector = theDetUnitId.det();
486  int subdetector = theDetUnitId.subdetId();
487 
488  // check that expected detector is returned
489  if ((detector == dTrk) && (subdetector == sdPxlBrl)) {
490 
491  // get the GeomDetUnit from the geometry using theDetUnitID
492  const GeomDetUnit *theDet = theTracker.idToDetUnit(theDetUnitId);
493 
494  if (!theDet) {
495  edm::LogWarning(MsgLoggerCat)
496  << "Unable to get GeomDetUnit from PxlBrlHits for Hit " << i;
497  continue;
498  }
499 
500  ++j;
501 
502  // get the Surface of the hit (knows how to go from local <-> global)
503  const BoundPlane& bSurface = theDet->surface();
504 
505  // gather necessary information
506  PxlBrlToF.push_back(itHit->tof());
507  PxlBrlR.push_back(bSurface.toGlobal(itHit->localPosition()).perp());
508  PxlBrlPhi.push_back(bSurface.toGlobal(itHit->localPosition()).phi());
509  PxlBrlEta.push_back(bSurface.toGlobal(itHit->localPosition()).eta());
510 
511  } else {
512  edm::LogWarning(MsgLoggerCat)
513  << "PxlBrl PSimHit " << i
514  << " is expected to be (det,subdet) = ("
515  << dTrk << "," << sdPxlBrl
516  << "); value returned is: ("
517  << detector << "," << subdetector << ")";
518  continue;
519  } // end detector type check
520  } // end loop through PxlBrl Hits
521 
522  if (verbosity > 1) {
523  eventout += "\n Number of Pixel Barrel Hits collected:..... ";
524  eventout += j;
525  }
526 
528  // get Pixel Forward information
530  edm::PSimHitContainer thePxlFwdHits;
531  // extract low container
532  edm::Handle<edm::PSimHitContainer> PxlFwdLowContainer;
533  iEvent.getByToken(PxlFwdLowSrc_Token_,PxlFwdLowContainer);
534  if (!PxlFwdLowContainer.isValid()) {
535  edm::LogWarning(MsgLoggerCat)
536  << "Unable to find TrackerHitsPixelEndcapLowTof in event!";
537  return;
538  }
539  // extract high container
540  edm::Handle<edm::PSimHitContainer> PxlFwdHighContainer;
541  iEvent.getByToken(PxlFwdHighSrc_Token_,PxlFwdHighContainer);
542  if (!PxlFwdHighContainer.isValid()) {
543  edm::LogWarning("GlobalHitsProducer_fillTrk")
544  << "Unable to find TrackerHitsPixelEndcapHighTof in event!";
545  return;
546  }
547  // place both containers into new container
548  thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
549  PxlFwdLowContainer->end());
550  thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
551  PxlFwdHighContainer->end());
552 
553  // cycle through new container
554  i = 0; j = 0;
555  for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
556 
557  ++i;
558 
559  // create a DetId from the detUnitId
560  DetId theDetUnitId(itHit->detUnitId());
561  int detector = theDetUnitId.det();
562  int subdetector = theDetUnitId.subdetId();
563 
564  // check that expected detector is returned
565  if ((detector == dTrk) && (subdetector == sdPxlFwd)) {
566 
567  // get the GeomDetUnit from the geometry using theDetUnitID
568  const GeomDetUnit *theDet = theTracker.idToDetUnit(theDetUnitId);
569 
570  if (!theDet) {
571  edm::LogWarning(MsgLoggerCat)
572  << "Unable to get GeomDetUnit from PxlFwdHits for Hit " << i;;
573  continue;
574  }
575 
576  ++j;
577 
578  // get the Surface of the hit (knows how to go from local <-> global)
579  const BoundPlane& bSurface = theDet->surface();
580 
581  // gather necessary information
582  PxlFwdToF.push_back(itHit->tof());
583  PxlFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).z());
584  PxlFwdPhi.push_back(bSurface.toGlobal(itHit->localPosition()).phi());
585  PxlFwdEta.push_back(bSurface.toGlobal(itHit->localPosition()).eta());
586  } else {
587  edm::LogWarning(MsgLoggerCat)
588  << "PxlFwd PSimHit " << i
589  << " is expected to be (det,subdet) = ("
590  << dTrk << "," << sdPxlFwd
591  << "); value returned is: ("
592  << detector << "," << subdetector << ")";
593  continue;
594  } // end detector type check
595  } // end loop through PxlFwd Hits
596 
597  if (verbosity > 1) {
598  eventout += "\n Number of Pixel Forward Hits collected:.... ";
599  eventout += j;
600  }
601 
603  // get Silicon Barrel information
605  edm::PSimHitContainer theSiBrlHits;
606  // extract TIB low container
607  edm::Handle<edm::PSimHitContainer> SiTIBLowContainer;
608  iEvent.getByToken(SiTIBLowSrc_Token_,SiTIBLowContainer);
609  if (!SiTIBLowContainer.isValid()) {
610  edm::LogWarning(MsgLoggerCat)
611  << "Unable to find TrackerHitsTIBLowTof in event!";
612  return;
613  }
614  // extract TIB high container
615  edm::Handle<edm::PSimHitContainer> SiTIBHighContainer;
616  iEvent.getByToken(SiTIBHighSrc_Token_,SiTIBHighContainer);
617  if (!SiTIBHighContainer.isValid()) {
618  edm::LogWarning(MsgLoggerCat)
619  << "Unable to find TrackerHitsTIBHighTof in event!";
620  return;
621  }
622  // extract TOB low container
623  edm::Handle<edm::PSimHitContainer> SiTOBLowContainer;
624  iEvent.getByToken(SiTOBLowSrc_Token_,SiTOBLowContainer);
625  if (!SiTOBLowContainer.isValid()) {
626  edm::LogWarning(MsgLoggerCat)
627  << "Unable to find TrackerHitsTOBLowTof in event!";
628  return;
629  }
630  // extract TOB high container
631  edm::Handle<edm::PSimHitContainer> SiTOBHighContainer;
632  iEvent.getByToken(SiTOBHighSrc_Token_,SiTOBHighContainer);
633  if (!SiTOBHighContainer.isValid()) {
634  edm::LogWarning(MsgLoggerCat)
635  << "Unable to find TrackerHitsTOBHighTof in event!";
636  return;
637  }
638  // place all containers into new container
639  theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
640  SiTIBLowContainer->end());
641  theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
642  SiTIBHighContainer->end());
643  theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
644  SiTOBLowContainer->end());
645  theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
646  SiTOBHighContainer->end());
647 
648  // cycle through new container
649  i = 0; j = 0;
650  for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
651 
652  ++i;
653 
654  // create a DetId from the detUnitId
655  DetId theDetUnitId(itHit->detUnitId());
656  int detector = theDetUnitId.det();
657  int subdetector = theDetUnitId.subdetId();
658 
659  // check that expected detector is returned
660  if ((detector == dTrk) &&
661  ((subdetector == sdSiTIB) ||
662  (subdetector == sdSiTOB))) {
663 
664  // get the GeomDetUnit from the geometry using theDetUnitID
665  const GeomDetUnit *theDet = theTracker.idToDetUnit(theDetUnitId);
666 
667  if (!theDet) {
668  edm::LogWarning(MsgLoggerCat)
669  << "Unable to get GeomDetUnit from SiBrlHits for Hit " << i;
670  continue;
671  }
672 
673  ++j;
674 
675  // get the Surface of the hit (knows how to go from local <-> global)
676  const BoundPlane& bSurface = theDet->surface();
677 
678  // gather necessary information
679  SiBrlToF.push_back(itHit->tof());
680  SiBrlR.push_back(bSurface.toGlobal(itHit->localPosition()).perp());
681  SiBrlPhi.push_back(bSurface.toGlobal(itHit->localPosition()).phi());
682  SiBrlEta.push_back(bSurface.toGlobal(itHit->localPosition()).eta());
683  } else {
684  edm::LogWarning(MsgLoggerCat)
685  << "SiBrl PSimHit " << i
686  << " is expected to be (det,subdet) = ("
687  << dTrk << "," << sdSiTIB
688  << " || " << sdSiTOB << "); value returned is: ("
689  << detector << "," << subdetector << ")";
690  continue;
691  } // end detector type check
692  } // end loop through SiBrl Hits
693 
694  if (verbosity > 1) {
695  eventout += "\n Number of Silicon Barrel Hits collected:... ";
696  eventout += j;
697  }
698 
700  // get Silicon Forward information
702  edm::PSimHitContainer theSiFwdHits;
703  // extract TID low container
704  edm::Handle<edm::PSimHitContainer> SiTIDLowContainer;
705  iEvent.getByToken(SiTIDLowSrc_Token_,SiTIDLowContainer);
706  if (!SiTIDLowContainer.isValid()) {
707  edm::LogWarning(MsgLoggerCat)
708  << "Unable to find TrackerHitsTIDLowTof in event!";
709  return;
710  }
711  // extract TID high container
712  edm::Handle<edm::PSimHitContainer> SiTIDHighContainer;
713  iEvent.getByToken(SiTIDHighSrc_Token_,SiTIDHighContainer);
714  if (!SiTIDHighContainer.isValid()) {
715  edm::LogWarning("GlobalHitsProducer_fillTrk")
716  << "Unable to find TrackerHitsTIDHighTof in event!";
717  return;
718  }
719  // extract TEC low container
720  edm::Handle<edm::PSimHitContainer> SiTECLowContainer;
721  iEvent.getByToken(SiTECLowSrc_Token_,SiTECLowContainer);
722  if (!SiTECLowContainer.isValid()) {
723  edm::LogWarning(MsgLoggerCat)
724  << "Unable to find TrackerHitsTECLowTof in event!";
725  return;
726  }
727  // extract TEC high container
728  edm::Handle<edm::PSimHitContainer> SiTECHighContainer;
729  iEvent.getByToken(SiTECHighSrc_Token_,SiTECHighContainer);
730  if (!SiTECHighContainer.isValid()) {
731  edm::LogWarning(MsgLoggerCat)
732  << "Unable to find TrackerHitsTECHighTof in event!";
733  return;
734  }
735  // place all containers into new container
736  theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
737  SiTIDLowContainer->end());
738  theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
739  SiTIDHighContainer->end());
740  theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
741  SiTECLowContainer->end());
742  theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
743  SiTECHighContainer->end());
744 
745  // cycle through container
746  i = 0; j = 0;
747  for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
748 
749  ++i;
750 
751  // create a DetId from the detUnitId
752  DetId theDetUnitId(itHit->detUnitId());
753  int detector = theDetUnitId.det();
754  int subdetector = theDetUnitId.subdetId();
755 
756  // check that expected detector is returned
757  if ((detector == dTrk) &&
758  ((subdetector == sdSiTID) ||
759  (subdetector == sdSiTEC))) {
760 
761  // get the GeomDetUnit from the geometry using theDetUnitID
762  const GeomDetUnit *theDet = theTracker.idToDetUnit(theDetUnitId);
763 
764  if (!theDet) {
765  edm::LogWarning(MsgLoggerCat)
766  << "Unable to get GeomDetUnit from SiFwdHits Hit " << i;
767  return;
768  }
769 
770  ++j;
771 
772  // get the Surface of the hit (knows how to go from local <-> global)
773  const BoundPlane& bSurface = theDet->surface();
774 
775  // gather necessary information
776  SiFwdToF.push_back(itHit->tof());
777  SiFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).z());
778  SiFwdPhi.push_back(bSurface.toGlobal(itHit->localPosition()).phi());
779  SiFwdEta.push_back(bSurface.toGlobal(itHit->localPosition()).eta());
780  } else {
781  edm::LogWarning(MsgLoggerCat)
782  << "SiFwd PSimHit " << i
783  << " is expected to be (det,subdet) = ("
784  << dTrk << "," << sdSiTOB
785  << " || " << sdSiTEC << "); value returned is: ("
786  << detector << "," << subdetector << ")";
787  continue;
788  } // end check detector type
789  } // end loop through SiFwd Hits
790 
791  if (verbosity > 1) {
792  eventout += "\n Number of Silicon Forward Hits collected:.. ";
793  eventout += j;
794  }
795 
796  if (verbosity > 0)
797  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
798 
799  return;
800  }
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
int i
Definition: DBlmapReader.cc:9
static const int dTrk
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
static const int sdSiTID
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
static const int sdSiTIB
static const int sdPxlBrl
int j
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
static const int sdSiTOB
bool isValid() const
Definition: HandleBase.h:75
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
Definition: DetId.h:18
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBHighSrc_Token_
const T & get() const
Definition: EventSetup.h:56
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDHighSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
static const int sdSiTEC
T perp() const
Magnitude of transverse component.
std::vector< PSimHit > PSimHitContainer
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
static const int sdPxlFwd
bool isValid() const
Definition: ESHandle.h:47
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
void GlobalHitsProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 171 of file GlobalHitsProducer.cc.

References clear(), count, edm::EventID::event(), fillECal(), fillG4MC(), fillHCal(), fillMuon(), fillTrk(), frequency, edm::Event::getAllProvenance(), getAllProvenances, i, edm::EventBase::id(), label, printProvenanceInfo, edm::Event::put(), edm::EventID::run(), storeECal(), storeG4MC(), storeHCal(), storeMuon(), storeTrk(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

173 {
174  std::string MsgLoggerCat = "GlobalHitsProducer_produce";
175 
176  // keep track of number of events processed
177  ++count;
178 
179  // get event id information
180  edm::RunNumber_t nrun = iEvent.id().run();
181  edm::EventNumber_t nevt = iEvent.id().event();
182 
183  if (verbosity > 0) {
184  edm::LogInfo(MsgLoggerCat)
185  << "Processing run " << nrun << ", event " << nevt
186  << " (" << count << " events total)";
187  } else if (verbosity == 0) {
188  if (nevt%frequency == 0 || nevt == 1) {
189  edm::LogInfo(MsgLoggerCat)
190  << "Processing run " << nrun << ", event " << nevt
191  << " (" << count << " events total)";
192  }
193  }
194 
195  // clear event holders
196  clear();
197 
198  // look at information available in the event
199  if (getAllProvenances) {
200 
201  std::vector<const edm::Provenance*> AllProv;
202  iEvent.getAllProvenance(AllProv);
203 
204  if (verbosity >= 0)
205  edm::LogInfo(MsgLoggerCat)
206  << "Number of Provenances = " << AllProv.size();
207 
208  if (printProvenanceInfo && (verbosity >= 0)) {
209  TString eventout("\nProvenance info:\n");
210 
211  for (unsigned int i = 0; i < AllProv.size(); ++i) {
212  eventout += "\n ******************************";
213  eventout += "\n Module : ";
214  eventout += AllProv[i]->moduleLabel();
215  eventout += "\n ProductID : ";
216  eventout += AllProv[i]->productID().id();
217  eventout += "\n ClassName : ";
218  eventout += AllProv[i]->className();
219  eventout += "\n InstanceName : ";
220  eventout += AllProv[i]->productInstanceName();
221  eventout += "\n BranchName : ";
222  eventout += AllProv[i]->branchName();
223  }
224  eventout += "\n ******************************\n";
225  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
226  printProvenanceInfo = false;
227  }
228  getAllProvenances = false;
229  }
230 
231  // call fill functions
232  //gather G4MC information from event
233  fillG4MC(iEvent);
234  // gather Tracker information from event
235  fillTrk(iEvent,iSetup);
236  // gather muon information from event
237  fillMuon(iEvent, iSetup);
238  // gather Ecal information from event
239  fillECal(iEvent, iSetup);
240  // gather Hcal information from event
241  fillHCal(iEvent, iSetup);
242 
243  if (verbosity > 0)
244  edm::LogInfo (MsgLoggerCat)
245  << "Done gathering data from event.";
246 
247  // produce object to put into event
248  std::auto_ptr<PGlobalSimHit> pOut(new PGlobalSimHit);
249 
250  if (verbosity > 2)
251  edm::LogInfo (MsgLoggerCat)
252  << "Saving event contents:";
253 
254  // call store functions
255  // store G4MC information in product
256  storeG4MC(*pOut);
257  // store Tracker information in produce
258  storeTrk(*pOut);
259  // store Muon information in produce
260  storeMuon(*pOut);
261  // store ECal information in produce
262  storeECal(*pOut);
263  // store HCal information in produce
264  storeHCal(*pOut);
265 
266  // store information in event
267  iEvent.put(pOut,label);
268 
269  return;
270 }
RunNumber_t run() const
Definition: EventID.h:39
void storeECal(PGlobalSimHit &)
EventNumber_t event() const
Definition: EventID.h:41
void getAllProvenance(std::vector< Provenance const * > &provenances) const
Definition: Event.cc:95
int i
Definition: DBlmapReader.cc:9
unsigned long long EventNumber_t
void storeMuon(PGlobalSimHit &)
void storeG4MC(PGlobalSimHit &)
void storeTrk(PGlobalSimHit &)
void fillMuon(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
void fillTrk(edm::Event &, const edm::EventSetup &)
void fillECal(edm::Event &, const edm::EventSetup &)
void fillHCal(edm::Event &, const edm::EventSetup &)
void storeHCal(PGlobalSimHit &)
edm::EventID id() const
Definition: EventBase.h:60
void fillG4MC(edm::Event &)
unsigned int RunNumber_t
void GlobalHitsProducer::storeECal ( PGlobalSimHit product)
private

Definition at line 1389 of file GlobalHitsProducer.cc.

References ECalE, ECalEta, ECalPhi, ECalToF, i, PreShE, PreShEta, PreShPhi, PreShToF, PGlobalSimHit::putECalHits(), PGlobalSimHit::putPreShHits(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by produce().

1390 {
1391  std::string MsgLoggerCat = "GlobalHitsProducer_storeECal";
1392 
1393  if (verbosity > 2) {
1394  TString eventout("\n nECalHits = ");
1395  eventout += ECalE.size();
1396  for (unsigned int i = 0; i < ECalE.size(); ++i) {
1397  eventout += "\n (e,tof,phi,eta) = (";
1398  eventout += ECalE[i];
1399  eventout += ", ";
1400  eventout += ECalToF[i];
1401  eventout += ", ";
1402  eventout += ECalPhi[i];
1403  eventout += ", ";
1404  eventout += ECalEta[i];
1405  eventout += ")";
1406  } // end ECal output
1407  eventout += "\n nPreShHits = ";
1408  eventout += PreShE.size();
1409  for (unsigned int i = 0; i < PreShE.size(); ++i) {
1410  eventout += "\n (e,tof,phi,eta) = (";
1411  eventout += PreShE[i];
1412  eventout += ", ";
1413  eventout += PreShToF[i];
1414  eventout += ", ";
1415  eventout += PreShPhi[i];
1416  eventout += ", ";
1417  eventout += PreShEta[i];
1418  eventout += ")";
1419  } // end PreShower output
1420  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1421  } // end verbose output
1422 
1425 
1426  return;
1427 }
int i
Definition: DBlmapReader.cc:9
void putECalHits(const std::vector< float > &e, const std::vector< float > &tof, const std::vector< float > &phi, const std::vector< float > &eta)
void putPreShHits(const std::vector< float > &e, const std::vector< float > &tof, const std::vector< float > &phi, const std::vector< float > &eta)
void GlobalHitsProducer::storeG4MC ( PGlobalSimHit product)
private

Definition at line 392 of file GlobalHitsProducer.cc.

References G4TrkE, G4TrkPt, G4VtxX, G4VtxY, G4VtxZ, i, nRawGenPart, PGlobalSimHit::putG4Trk(), PGlobalSimHit::putG4Vtx(), PGlobalSimHit::putRawGenPart(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by produce().

393 {
394  std::string MsgLoggerCat = "GlobalHitsProducer_storeG4MC";
395 
396  if (verbosity > 2) {
397  TString eventout("\n nRawGenPart = ");
398  eventout += nRawGenPart;
399  eventout += "\n nG4Vtx = ";
400  eventout += G4VtxX.size();
401  for (unsigned int i = 0; i < G4VtxX.size(); ++i) {
402  eventout += "\n (x,y,z) = (";
403  eventout += G4VtxX[i];
404  eventout += ", ";
405  eventout += G4VtxY[i];
406  eventout += ", ";
407  eventout += G4VtxZ[i];
408  eventout += ")";
409  }
410  eventout += "\n nG4Trk = ";
411  eventout += G4TrkPt.size();
412  for (unsigned int i = 0; i < G4TrkPt.size(); ++i) {
413  eventout += "\n (pt,e) = (";
414  eventout += G4TrkPt[i];
415  eventout += ", ";
416  eventout += G4TrkE[i];
417  eventout += ")";
418  }
419  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
420  } // end verbose output
421 
422  product.putRawGenPart(nRawGenPart);
423  product.putG4Vtx(G4VtxX, G4VtxY, G4VtxZ);
424  product.putG4Trk(G4TrkPt, G4TrkE);
425 
426  return;
427 }
int i
Definition: DBlmapReader.cc:9
void putG4Trk(const std::vector< float > &pt, const std::vector< float > &e)
void putRawGenPart(int n)
void putG4Vtx(const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &z)
void GlobalHitsProducer::storeHCal ( PGlobalSimHit product)
private

Definition at line 1526 of file GlobalHitsProducer.cc.

References HCalE, HCalEta, HCalPhi, HCalToF, i, PGlobalSimHit::putHCalHits(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by produce().

1527 {
1528  std::string MsgLoggerCat = "GlobalHitsProducer_storeHCal";
1529 
1530  if (verbosity > 2) {
1531  TString eventout("\n nHCalHits = ");
1532  eventout += HCalE.size();
1533  for (unsigned int i = 0; i < HCalE.size(); ++i) {
1534  eventout += "\n (e,tof,phi,eta) = (";
1535  eventout += HCalE[i];
1536  eventout += ", ";
1537  eventout += HCalToF[i];
1538  eventout += ", ";
1539  eventout += HCalPhi[i];
1540  eventout += ", ";
1541  eventout += HCalEta[i];
1542  eventout += ")";
1543  } // end HCal output
1544  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1545  } // end verbose output
1546 
1548 
1549  return;
1550 }
int i
Definition: DBlmapReader.cc:9
void putHCalHits(const std::vector< float > &e, const std::vector< float > &tof, const std::vector< float > &phi, const std::vector< float > &eta)
void GlobalHitsProducer::storeMuon ( PGlobalSimHit product)
private

Definition at line 1146 of file GlobalHitsProducer.cc.

References i, MuonCscEta, MuonCscPhi, MuonCscToF, MuonCscZ, MuonDtEta, MuonDtPhi, MuonDtR, MuonDtToF, MuonRpcBrlEta, MuonRpcBrlPhi, MuonRpcBrlR, MuonRpcBrlToF, MuonRpcFwdEta, MuonRpcFwdPhi, MuonRpcFwdToF, MuonRpcFwdZ, PGlobalSimHit::putMuonCscHits(), PGlobalSimHit::putMuonDtHits(), PGlobalSimHit::putMuonRpcBrlHits(), PGlobalSimHit::putMuonRpcFwdHits(), AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by produce().

1147 {
1148  std::string MsgLoggerCat = "GlobalHitsProducer_storeMuon";
1149 
1150  if (verbosity > 2) {
1151  TString eventout("\n nMuonCSCHits = ");
1152  eventout += MuonCscToF.size();
1153  for (unsigned int i = 0; i < MuonCscToF.size(); ++i) {
1154  eventout += "\n (tof,z,phi,eta) = (";
1155  eventout += MuonCscToF[i];
1156  eventout += ", ";
1157  eventout += MuonCscZ[i];
1158  eventout += ", ";
1159  eventout += MuonCscPhi[i];
1160  eventout += ", ";
1161  eventout += MuonCscEta[i];
1162  eventout += ")";
1163  } // end MuonCsc output
1164  eventout += "\n nMuonDtHits = ";
1165  eventout += MuonDtToF.size();
1166  for (unsigned int i = 0; i < MuonDtToF.size(); ++i) {
1167  eventout += "\n (tof,r,phi,eta) = (";
1168  eventout += MuonDtToF[i];
1169  eventout += ", ";
1170  eventout += MuonDtR[i];
1171  eventout += ", ";
1172  eventout += MuonDtPhi[i];
1173  eventout += ", ";
1174  eventout += MuonDtEta[i];
1175  eventout += ")";
1176  } // end MuonDt output
1177  eventout += "\n nMuonRpcBrlHits = ";
1178  eventout += MuonRpcBrlToF.size();
1179  for (unsigned int i = 0; i < MuonRpcBrlToF.size(); ++i) {
1180  eventout += "\n (tof,r,phi,eta) = (";
1181  eventout += MuonRpcBrlToF[i];
1182  eventout += ", ";
1183  eventout += MuonRpcBrlR[i];
1184  eventout += ", ";
1185  eventout += MuonRpcBrlPhi[i];
1186  eventout += ", ";
1187  eventout += MuonRpcBrlEta[i];
1188  eventout += ")";
1189  } // end MuonRpcBrl output
1190  eventout += "\n nMuonRpcFwdHits = ";
1191  eventout += MuonRpcFwdToF.size();
1192  for (unsigned int i = 0; i < MuonRpcFwdToF.size(); ++i) {
1193  eventout += "\n (tof,z,phi,eta) = (";
1194  eventout += MuonRpcFwdToF[i];
1195  eventout += ", ";
1196  eventout += MuonRpcFwdZ[i];
1197  eventout += ", ";
1198  eventout += MuonRpcFwdPhi[i];
1199  eventout += ", ";
1200  eventout += MuonRpcFwdEta[i];
1201  eventout += ")";
1202  } // end MuonRpcFwd output
1203  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1204  } // end verbose output
1205 
1209  MuonRpcBrlEta);
1211  MuonRpcFwdEta);
1212 
1213  return;
1214 }
int i
Definition: DBlmapReader.cc:9
void putMuonRpcFwdHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
void putMuonRpcBrlHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
void putMuonCscHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
void putMuonDtHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
void GlobalHitsProducer::storeTrk ( PGlobalSimHit product)
private

Definition at line 802 of file GlobalHitsProducer.cc.

References i, PGlobalSimHit::putPxlBrlHits(), PGlobalSimHit::putPxlFwdHits(), PGlobalSimHit::putSiBrlHits(), PGlobalSimHit::putSiFwdHits(), PxlBrlEta, PxlBrlPhi, PxlBrlR, PxlBrlToF, PxlFwdEta, PxlFwdPhi, PxlFwdToF, PxlFwdZ, SiBrlEta, SiBrlPhi, SiBrlR, SiBrlToF, SiFwdEta, SiFwdPhi, SiFwdToF, SiFwdZ, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

Referenced by produce().

803 {
804  std::string MsgLoggerCat = "GlobalHitsProducer_storeTrk";
805 
806  if (verbosity > 2) {
807  TString eventout("\n nPxlBrlHits = ");
808  eventout += PxlBrlToF.size();
809  for (unsigned int i = 0; i < PxlBrlToF.size(); ++i) {
810  eventout += "\n (tof,r,phi,eta) = (";
811  eventout += PxlBrlToF[i];
812  eventout += ", ";
813  eventout += PxlBrlR[i];
814  eventout += ", ";
815  eventout += PxlBrlPhi[i];
816  eventout += ", ";
817  eventout += PxlBrlEta[i];
818  eventout += ")";
819  } // end PxlBrl output
820  eventout += "\n nPxlFwdHits = ";
821  eventout += PxlFwdToF.size();
822  for (unsigned int i = 0; i < PxlFwdToF.size(); ++i) {
823  eventout += "\n (tof,z,phi,eta) = (";
824  eventout += PxlFwdToF[i];
825  eventout += ", ";
826  eventout += PxlFwdZ[i];
827  eventout += ", ";
828  eventout += PxlFwdPhi[i];
829  eventout += ", ";
830  eventout += PxlFwdEta[i];
831  eventout += ")";
832  } // end PxlFwd output
833  eventout += "\n nSiBrlHits = ";
834  eventout += SiBrlToF.size();
835  for (unsigned int i = 0; i < SiBrlToF.size(); ++i) {
836  eventout += "\n (tof,r,phi,eta) = (";
837  eventout += SiBrlToF[i];
838  eventout += ", ";
839  eventout += SiBrlR[i];
840  eventout += ", ";
841  eventout += SiBrlPhi[i];
842  eventout += ", ";
843  eventout += SiBrlEta[i];
844  eventout += ")";
845  } // end SiBrl output
846  eventout += "\n nSiFwdHits = ";
847  eventout += SiFwdToF.size();
848  for (unsigned int i = 0; i < SiFwdToF.size(); ++i) {
849  eventout += "\n (tof,z,phi,eta) = (";
850  eventout += SiFwdToF[i];
851  eventout += ", ";
852  eventout += SiFwdZ[i];
853  eventout += ", ";
854  eventout += SiFwdPhi[i];
855  eventout += ", ";
856  eventout += SiFwdEta[i];
857  eventout += ")";
858  } // end SiFwd output
859  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
860  } // end verbose output
861 
866 
867  return;
868 }
int i
Definition: DBlmapReader.cc:9
void putSiBrlHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
void putPxlFwdHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
void putSiFwdHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
void putPxlBrlHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)

Member Data Documentation

unsigned int GlobalHitsProducer::count
private

Definition at line 232 of file GlobalHitsProducer.h.

Referenced by endJob(), and produce().

FloatVector GlobalHitsProducer::ECalE
private

Definition at line 133 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

edm::InputTag GlobalHitsProducer::ECalEBSrc_
private

Definition at line 137 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PCaloHitContainer> GlobalHitsProducer::ECalEBSrc_Token_
private

Definition at line 139 of file GlobalHitsProducer.h.

Referenced by fillECal(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::ECalEESrc_
private

Definition at line 138 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PCaloHitContainer> GlobalHitsProducer::ECalEESrc_Token_
private

Definition at line 140 of file GlobalHitsProducer.h.

Referenced by fillECal(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::ECalESSrc_
private

Definition at line 147 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PCaloHitContainer> GlobalHitsProducer::ECalESSrc_Token_
private

Definition at line 148 of file GlobalHitsProducer.h.

Referenced by fillECal(), and GlobalHitsProducer().

FloatVector GlobalHitsProducer::ECalEta
private

Definition at line 136 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

FloatVector GlobalHitsProducer::ECalPhi
private

Definition at line 135 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

FloatVector GlobalHitsProducer::ECalToF
private

Definition at line 134 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

std::string GlobalHitsProducer::fName
private

Definition at line 110 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

int GlobalHitsProducer::frequency
private

Definition at line 112 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer(), and produce().

FloatVector GlobalHitsProducer::G4TrkE
private

Definition at line 124 of file GlobalHitsProducer.h.

Referenced by clear(), fillG4MC(), and storeG4MC().

FloatVector GlobalHitsProducer::G4TrkPt
private

Definition at line 123 of file GlobalHitsProducer.h.

Referenced by clear(), fillG4MC(), and storeG4MC().

edm::InputTag GlobalHitsProducer::G4TrkSrc_
private

Definition at line 127 of file GlobalHitsProducer.h.

edm::EDGetTokenT<edm::SimTrackContainer> GlobalHitsProducer::G4TrkSrc_Token_
private

Definition at line 129 of file GlobalHitsProducer.h.

Referenced by fillG4MC().

edm::InputTag GlobalHitsProducer::G4VtxSrc_
private

Definition at line 126 of file GlobalHitsProducer.h.

edm::EDGetTokenT<edm::SimVertexContainer> GlobalHitsProducer::G4VtxSrc_Token_
private

Definition at line 128 of file GlobalHitsProducer.h.

Referenced by fillG4MC().

FloatVector GlobalHitsProducer::G4VtxX
private

Definition at line 120 of file GlobalHitsProducer.h.

Referenced by clear(), fillG4MC(), and storeG4MC().

FloatVector GlobalHitsProducer::G4VtxY
private

Definition at line 121 of file GlobalHitsProducer.h.

Referenced by clear(), fillG4MC(), and storeG4MC().

FloatVector GlobalHitsProducer::G4VtxZ
private

Definition at line 122 of file GlobalHitsProducer.h.

Referenced by clear(), fillG4MC(), and storeG4MC().

bool GlobalHitsProducer::getAllProvenances
private

Definition at line 115 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer(), and produce().

FloatVector GlobalHitsProducer::HCalE
private

Definition at line 152 of file GlobalHitsProducer.h.

Referenced by clear(), fillHCal(), and storeHCal().

FloatVector GlobalHitsProducer::HCalEta
private

Definition at line 155 of file GlobalHitsProducer.h.

Referenced by clear(), fillHCal(), and storeHCal().

FloatVector GlobalHitsProducer::HCalPhi
private

Definition at line 154 of file GlobalHitsProducer.h.

Referenced by clear(), fillHCal(), and storeHCal().

edm::InputTag GlobalHitsProducer::HCalSrc_
private

Definition at line 156 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PCaloHitContainer> GlobalHitsProducer::HCalSrc_Token_
private

Definition at line 157 of file GlobalHitsProducer.h.

Referenced by fillHCal(), and GlobalHitsProducer().

FloatVector GlobalHitsProducer::HCalToF
private

Definition at line 153 of file GlobalHitsProducer.h.

Referenced by clear(), fillHCal(), and storeHCal().

std::string GlobalHitsProducer::label
private
FloatVector GlobalHitsProducer::MuonCscEta
private

Definition at line 216 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonCscPhi
private

Definition at line 215 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

edm::InputTag GlobalHitsProducer::MuonCscSrc_
private

Definition at line 217 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::MuonCscSrc_Token_
private

Definition at line 218 of file GlobalHitsProducer.h.

Referenced by fillMuon(), and GlobalHitsProducer().

FloatVector GlobalHitsProducer::MuonCscToF
private

Definition at line 213 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonCscZ
private

Definition at line 214 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonDtEta
private

Definition at line 209 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonDtPhi
private

Definition at line 208 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonDtR
private

Definition at line 207 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

edm::InputTag GlobalHitsProducer::MuonDtSrc_
private

Definition at line 210 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::MuonDtSrc_Token_
private

Definition at line 211 of file GlobalHitsProducer.h.

Referenced by fillMuon(), and GlobalHitsProducer().

FloatVector GlobalHitsProducer::MuonDtToF
private

Definition at line 206 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcBrlEta
private

Definition at line 223 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcBrlPhi
private

Definition at line 222 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcBrlR
private

Definition at line 221 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcBrlToF
private

Definition at line 220 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcFwdEta
private

Definition at line 227 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcFwdPhi
private

Definition at line 226 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcFwdToF
private

Definition at line 224 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

FloatVector GlobalHitsProducer::MuonRpcFwdZ
private

Definition at line 225 of file GlobalHitsProducer.h.

Referenced by clear(), fillMuon(), and storeMuon().

edm::InputTag GlobalHitsProducer::MuonRpcSrc_
private

Definition at line 228 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::MuonRpcSrc_Token_
private

Definition at line 229 of file GlobalHitsProducer.h.

Referenced by fillMuon(), and GlobalHitsProducer().

int GlobalHitsProducer::nRawGenPart
private

Definition at line 119 of file GlobalHitsProducer.h.

Referenced by clear(), fillG4MC(), and storeG4MC().

FloatVector GlobalHitsProducer::PreShE
private

Definition at line 143 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

FloatVector GlobalHitsProducer::PreShEta
private

Definition at line 146 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

FloatVector GlobalHitsProducer::PreShPhi
private

Definition at line 145 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

FloatVector GlobalHitsProducer::PreShToF
private

Definition at line 144 of file GlobalHitsProducer.h.

Referenced by clear(), fillECal(), and storeECal().

bool GlobalHitsProducer::printProvenanceInfo
private

Definition at line 116 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer(), and produce().

FloatVector GlobalHitsProducer::PxlBrlEta
private

Definition at line 164 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

edm::InputTag GlobalHitsProducer::PxlBrlHighSrc_
private

Definition at line 170 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::PxlBrlHighSrc_Token_
private

Definition at line 174 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::PxlBrlLowSrc_
private

Definition at line 169 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::PxlBrlLowSrc_Token_
private

Definition at line 173 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

FloatVector GlobalHitsProducer::PxlBrlPhi
private

Definition at line 163 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::PxlBrlR
private

Definition at line 162 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::PxlBrlToF
private

Definition at line 161 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::PxlFwdEta
private

Definition at line 168 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

edm::InputTag GlobalHitsProducer::PxlFwdHighSrc_
private

Definition at line 172 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::PxlFwdHighSrc_Token_
private

Definition at line 176 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::PxlFwdLowSrc_
private

Definition at line 171 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::PxlFwdLowSrc_Token_
private

Definition at line 175 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

FloatVector GlobalHitsProducer::PxlFwdPhi
private

Definition at line 167 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::PxlFwdToF
private

Definition at line 165 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::PxlFwdZ
private

Definition at line 166 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiBrlEta
private

Definition at line 182 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiBrlPhi
private

Definition at line 181 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiBrlR
private

Definition at line 180 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiBrlToF
private

Definition at line 179 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiFwdEta
private

Definition at line 186 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiFwdPhi
private

Definition at line 185 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiFwdToF
private

Definition at line 183 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

FloatVector GlobalHitsProducer::SiFwdZ
private

Definition at line 184 of file GlobalHitsProducer.h.

Referenced by clear(), fillTrk(), and storeTrk().

edm::InputTag GlobalHitsProducer::SiTECHighSrc_
private

Definition at line 194 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTECHighSrc_Token_
private

Definition at line 202 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::SiTECLowSrc_
private

Definition at line 193 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTECLowSrc_Token_
private

Definition at line 201 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::SiTIBHighSrc_
private

Definition at line 188 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTIBHighSrc_Token_
private

Definition at line 196 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::SiTIBLowSrc_
private

Definition at line 187 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTIBLowSrc_Token_
private

Definition at line 195 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::SiTIDHighSrc_
private

Definition at line 192 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTIDHighSrc_Token_
private

Definition at line 200 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::SiTIDLowSrc_
private

Definition at line 191 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTIDLowSrc_Token_
private

Definition at line 199 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::SiTOBHighSrc_
private

Definition at line 190 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTOBHighSrc_Token_
private

Definition at line 198 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

edm::InputTag GlobalHitsProducer::SiTOBLowSrc_
private

Definition at line 189 of file GlobalHitsProducer.h.

Referenced by GlobalHitsProducer().

edm::EDGetTokenT<edm::PSimHitContainer> GlobalHitsProducer::SiTOBLowSrc_Token_
private

Definition at line 197 of file GlobalHitsProducer.h.

Referenced by fillTrk(), and GlobalHitsProducer().

int GlobalHitsProducer::verbosity
private
int GlobalHitsProducer::vtxunit
private

Definition at line 113 of file GlobalHitsProducer.h.

Referenced by fillG4MC(), and GlobalHitsProducer().