CMS 3D CMS Logo

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
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void beginJob (void) override
 
void endJob () override
 
 GlobalHitsProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~GlobalHitsProducer () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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::PCaloHitContainerECalEBSrc_Token_
 
edm::InputTag ECalEESrc_
 
edm::EDGetTokenT< edm::PCaloHitContainerECalEESrc_Token_
 
edm::InputTag ECalESSrc_
 
edm::EDGetTokenT< edm::PCaloHitContainerECalESSrc_Token_
 
FloatVector ECalEta
 
FloatVector ECalPhi
 
FloatVector ECalToF
 
std::string fName
 
int frequency
 
FloatVector G4TrkE
 
FloatVector G4TrkPt
 
edm::InputTag G4TrkSrc_
 
edm::EDGetTokenT< edm::SimTrackContainerG4TrkSrc_Token_
 
edm::InputTag G4VtxSrc_
 
edm::EDGetTokenT< edm::SimVertexContainerG4VtxSrc_Token_
 
FloatVector G4VtxX
 
FloatVector G4VtxY
 
FloatVector G4VtxZ
 
bool getAllProvenances
 
FloatVector HCalE
 
FloatVector HCalEta
 
FloatVector HCalPhi
 
edm::InputTag HCalSrc_
 
edm::EDGetTokenT< edm::PCaloHitContainerHCalSrc_Token_
 
FloatVector HCalToF
 
std::string label
 
FloatVector MuonCscEta
 
FloatVector MuonCscPhi
 
edm::InputTag MuonCscSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerMuonCscSrc_Token_
 
FloatVector MuonCscToF
 
FloatVector MuonCscZ
 
FloatVector MuonDtEta
 
FloatVector MuonDtPhi
 
FloatVector MuonDtR
 
edm::InputTag MuonDtSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerMuonDtSrc_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::PSimHitContainerMuonRpcSrc_Token_
 
int nRawGenPart
 
FloatVector PreShE
 
FloatVector PreShEta
 
FloatVector PreShPhi
 
FloatVector PreShToF
 
bool printProvenanceInfo
 
FloatVector PxlBrlEta
 
edm::InputTag PxlBrlHighSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerPxlBrlHighSrc_Token_
 
edm::InputTag PxlBrlLowSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerPxlBrlLowSrc_Token_
 
FloatVector PxlBrlPhi
 
FloatVector PxlBrlR
 
FloatVector PxlBrlToF
 
FloatVector PxlFwdEta
 
edm::InputTag PxlFwdHighSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerPxlFwdHighSrc_Token_
 
edm::InputTag PxlFwdLowSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerPxlFwdLowSrc_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::PSimHitContainerSiTECHighSrc_Token_
 
edm::InputTag SiTECLowSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerSiTECLowSrc_Token_
 
edm::InputTag SiTIBHighSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerSiTIBHighSrc_Token_
 
edm::InputTag SiTIBLowSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerSiTIBLowSrc_Token_
 
edm::InputTag SiTIDHighSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerSiTIDHighSrc_Token_
 
edm::InputTag SiTIDLowSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerSiTIDLowSrc_Token_
 
edm::InputTag SiTOBHighSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerSiTOBHighSrc_Token_
 
edm::InputTag SiTOBLowSrc_
 
edm::EDGetTokenT< edm::PSimHitContainerSiTOBLowSrc_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 12 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.

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

Definition at line 154 of file GlobalHitsProducer.cc.

155 {
156 }

Member Function Documentation

void GlobalHitsProducer::beginJob ( void  )
overridevirtual

Reimplemented from edm::EDProducer.

Definition at line 158 of file GlobalHitsProducer.cc.

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

Definition at line 1553 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().

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

Reimplemented from edm::EDProducer.

Definition at line 163 of file GlobalHitsProducer.cc.

References count, AlCaHLTBitMon_QueryRunRegistry::string, and verbosity.

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

Definition at line 1217 of file GlobalHitsProducer.cc.

References dEcal, gamEcalExtractorBlocks_cff::detector, 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(), mps_fire::i, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), PV3DBase< T, PVType, FrameType >::phi(), PreShE, PreShEta, PreShPhi, PreShToF, sdEcalBrl, sdEcalFwd, sdEcalPS, AlCaHLTBitMon_QueryRunRegistry::string, subdetector, and verbosity.

Referenced by produce().

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

Definition at line 274 of file GlobalHitsProducer.cc.

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

Referenced by produce().

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

Definition at line 1430 of file GlobalHitsProducer.cc.

References gamEcalExtractorBlocks_cff::detector, dHcal, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), edm::Event::getByToken(), HcalGeometry::getPosition(), CaloGeometry::getSubdetectorGeometry(), HCalE, HCalEta, HCalPhi, HCalSrc_Token_, HCalToF, mps_fire::i, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), PV3DBase< T, PVType, FrameType >::phi(), sdHcalBrl, sdHcalEC, sdHcalFwd, sdHcalOut, AlCaHLTBitMon_QueryRunRegistry::string, subdetector, and verbosity.

Referenced by produce().

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

Definition at line 871 of file GlobalHitsProducer.cc.

References gamEcalExtractorBlocks_cff::detector, dMuon, PVValHelper::eta, edm::EventSetup::get(), edm::Event::getByToken(), mps_fire::i, RPCGeometry::idToDetUnit(), CSCGeometry::idToDetUnit(), edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), 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, RPCDetId::region(), sdMuonCSC, sdMuonDT, sdMuonRPC, sdMuonRPCRgnBrl, sdMuonRPCRgnFwdn, sdMuonRPCRgnFwdp, AlCaHLTBitMon_QueryRunRegistry::string, subdetector, GeomDet::surface(), verbosity, and z.

Referenced by produce().

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

Definition at line 430 of file GlobalHitsProducer.cc.

References gamEcalExtractorBlocks_cff::detector, dTrk, PVValHelper::eta, edm::EventSetup::get(), edm::Event::getByToken(), mps_fire::i, TrackerGeometry::idToDetUnit(), edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), 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, subdetector, GeomDet::surface(), verbosity, and z.

Referenced by produce().

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

Definition at line 172 of file GlobalHitsProducer.cc.

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

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

Definition at line 1390 of file GlobalHitsProducer.cc.

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

Referenced by produce().

1391 {
1392  std::string MsgLoggerCat = "GlobalHitsProducer_storeECal";
1393 
1394  if (verbosity > 2) {
1395  TString eventout("\n nECalHits = ");
1396  eventout += ECalE.size();
1397  for (unsigned int i = 0; i < ECalE.size(); ++i) {
1398  eventout += "\n (e,tof,phi,eta) = (";
1399  eventout += ECalE[i];
1400  eventout += ", ";
1401  eventout += ECalToF[i];
1402  eventout += ", ";
1403  eventout += ECalPhi[i];
1404  eventout += ", ";
1405  eventout += ECalEta[i];
1406  eventout += ")";
1407  } // end ECal output
1408  eventout += "\n nPreShHits = ";
1409  eventout += PreShE.size();
1410  for (unsigned int i = 0; i < PreShE.size(); ++i) {
1411  eventout += "\n (e,tof,phi,eta) = (";
1412  eventout += PreShE[i];
1413  eventout += ", ";
1414  eventout += PreShToF[i];
1415  eventout += ", ";
1416  eventout += PreShPhi[i];
1417  eventout += ", ";
1418  eventout += PreShEta[i];
1419  eventout += ")";
1420  } // end PreShower output
1421  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1422  } // end verbose output
1423 
1426 
1427  return;
1428 }
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 393 of file GlobalHitsProducer.cc.

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

Referenced by produce().

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

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

Referenced by produce().

1528 {
1529  std::string MsgLoggerCat = "GlobalHitsProducer_storeHCal";
1530 
1531  if (verbosity > 2) {
1532  TString eventout("\n nHCalHits = ");
1533  eventout += HCalE.size();
1534  for (unsigned int i = 0; i < HCalE.size(); ++i) {
1535  eventout += "\n (e,tof,phi,eta) = (";
1536  eventout += HCalE[i];
1537  eventout += ", ";
1538  eventout += HCalToF[i];
1539  eventout += ", ";
1540  eventout += HCalPhi[i];
1541  eventout += ", ";
1542  eventout += HCalEta[i];
1543  eventout += ")";
1544  } // end HCal output
1545  edm::LogInfo(MsgLoggerCat) << eventout << "\n";
1546  } // end verbose output
1547 
1549 
1550  return;
1551 }
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 1147 of file GlobalHitsProducer.cc.

References mps_fire::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().

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

References mps_fire::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().

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