|
ATLAS Offline Software
|
Go to the documentation of this file.
19 , m_inputKey(
"CSCRDO")
20 , m_inputTruthKey(
"CSC_SDO")
86 , m_ntupleFileName(
"/ntuples/file1")
87 , m_ntupleDirName(
"/CSC_RDOAnalysis/")
88 , m_ntupleTreeName(
"CSC_RDOAna")
89 ,
m_path(
"/CSC_RDOAnalysis/")
90 , m_thistSvc(
"THistSvc",
name)
166 m_h_rodID =
new TH1F(
"h_rodID",
"Collection ROD ID", 100, 0, 150);
170 m_h_subID =
new TH1F(
"h_subID",
"Collection Sub-Detector ID", 100, 0, 110);
182 m_h_spuCt =
new TH1F(
"h_spuCt",
"Collection SPU count", 100, 0, 20);
190 m_h_cscID =
new TH1F(
"h_cscID",
"ID of strip collection", 100, 0, 35);
194 m_h_cscTime =
new TH1F(
"h_cscTime",
"Time of first strip", 100, 0, 10);
198 m_h_cscWidth =
new TH1F(
"h_cscWidth",
"Width of strip cluster", 100, 0, 35);
206 m_h_cscAdd =
new TH1F(
"h_cscAdd",
"ID of first strip", 100, 0, 1.5e5);
210 m_h_cscHashID =
new TH1F(
"h_cscHashID",
"hash ID of strip collection", 100, 0, 65000);
234 m_h_ypos =
new TH1F(
"h_ypos",
"y-position (SDO)", 100, -1e5, 1e5);
238 m_h_zpos =
new TH1F(
"h_zpos",
"z-position (SDO)", 100, -1e5, 1e5);
246 return StatusCode::SUCCESS;
299 for ( ; cscCont_itr != cscCont_end; ++cscCont_itr ) {
301 const uint16_t collID((*cscCont_itr)->identify());
302 const uint16_t rodID((*cscCont_itr)->rodId());
303 const uint16_t subID((*cscCont_itr)->subDetectorId());
304 const std::vector<uint16_t>& collRpuID = (*cscCont_itr)->rpuID();
305 const std::vector<uint8_t>&
dataType = (*cscCont_itr)->dataType();
311 for (std::vector<uint16_t>::size_type
i = 0;
i != collRpuID.size(); ++
i) {
315 for (std::vector<uint8_t>::size_type j = 0; j !=
dataType.size(); ++j) {
320 m_smplPhase->push_back((*cscCont_itr)->samplingPhase());
321 m_trigType->push_back((*cscCont_itr)->triggerType());
323 m_eventType->push_back((*cscCont_itr)->eventType());
324 m_calAmp->push_back((*cscCont_itr)->calAmplitude());
325 m_calLayer->push_back((*cscCont_itr)->calLayer());
326 m_scaAdd->push_back((*cscCont_itr)->scaAddress());
327 m_numSmpl->push_back((*cscCont_itr)->numSamples());
328 m_latency->push_back((*cscCont_itr)->latency());
329 m_rate->push_back((*cscCont_itr)->rate());
330 m_sparse->push_back((*cscCont_itr)->sparsified());
331 m_neutron->push_back((*cscCont_itr)->neutron());
332 m_calEn->push_back((*cscCont_itr)->calEnabled());
334 for (
unsigned int k = 0;
k != 10; ++
k) {
335 m_spuCt->push_back((*cscCont_itr)->spuCount(
k));
346 for ( ; csc_itr != csc_end; ++csc_itr ) {
348 const uint16_t cscRpuID((*csc_itr)->rpuID());
349 const uint16_t cscID((*csc_itr)->identify());
350 const uint16_t cscTime((*csc_itr)->time());
351 const uint16_t cscWidth((*csc_itr)->width());
352 const bool cscTimeComp((*csc_itr)->isTimeComputed());
353 const std::vector<uint16_t> cscSmpl_vec((*csc_itr)->samples());
354 const uint32_t cscAdd((*csc_itr)->address());
355 const uint32_t cscHashID((*csc_itr)->hashId());
370 for (std::vector<uint16_t>::size_type
l = 0;
l != cscSmpl_vec.size(); ++
l) {
382 CscSimDataCollection::const_iterator sdo_itr(simDataMapCSC->begin());
383 const CscSimDataCollection::const_iterator sdo_end(simDataMapCSC->end());
385 std::vector<int> barcode_vec;
386 std::vector<int> eventIndex_vec;
387 std::vector<float> energy_vec;
388 std::vector<float> ypos_vec;
389 std::vector<float> zpos_vec;
390 std::vector<float> charge_vec;
391 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
395 const unsigned long long sdoID_int = sdoID.
get_compact();
396 const int sdoWord(sdo.
word());
402 const std::vector<CscSimData::Deposit>& deposits = sdo.
getdeposits();
403 std::vector<CscSimData::Deposit>::const_iterator dep_itr(deposits.begin());
404 const std::vector<CscSimData::Deposit>::const_iterator dep_end(deposits.end());
405 for ( ; dep_itr != dep_end; ++dep_itr ) {
410 const float sdoEnergy(
data.energy());
411 const float sdoYpos(
data.ypos());
412 const float sdoZpos(
data.zpos());
413 const float sdoCharge(
data.charge());
418 m_ypos->push_back(sdoYpos);
419 m_zpos->push_back(sdoZpos);
429 barcode_vec.push_back(
bar);
430 eventIndex_vec.push_back(eventIx);
431 energy_vec.push_back(sdoEnergy);
432 ypos_vec.push_back(sdoYpos);
433 zpos_vec.push_back(sdoZpos);
434 charge_vec.push_back(sdoCharge);
443 eventIndex_vec.clear();
455 return StatusCode::SUCCESS;
459 return StatusCode::SUCCESS;
std::vector< std::vector< float > > * m_charge_vec
char data[hepevt_bytes_allocation_ATLAS]
virtual StatusCode finalize() override final
std::vector< uint32_t > * m_scaAdd
Const iterator class for DataVector/DataList.
std::vector< std::vector< uint16_t > > * m_cscSmpl
std::vector< bool > * m_trigType
std::vector< unsigned long long > * m_sdoID
std::vector< bool > * m_sparse
std::vector< float > * m_zpos
CSC_RDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
std::vector< uint16_t > * m_collRpuID
std::vector< uint8_t > * m_rate
virtual StatusCode execute() override final
std::vector< uint16_t > * m_cscRpuID
std::vector< bool > * m_smplPhase
value_type get_compact() const
Get the compact id.
std::vector< uint32_t > * m_eventType
std::vector< std::vector< int > > * m_eventIndex_vec
std::vector< uint32_t > * m_cscHashID
std::vector< bool > * m_cscTimeComp
std::string m_ntupleFileName
SG::ReadHandleKey< CscSimDataCollection > m_inputTruthKey
std::vector< std::vector< int > > * m_barcode_vec
std::vector< std::vector< float > > * m_zpos_vec
std::vector< uint16_t > * m_cscTime
std::vector< int > * m_eventIndex
std::vector< uint16_t > * m_cscWidth
std::vector< uint32_t > * m_cscAdd
std::vector< std::vector< float > > * m_ypos_vec
a link optimized in size for a GenParticle in a McEventCollection
std::vector< uint16_t > * m_numSmpl
std::vector< uint16_t > * m_collID
std::vector< int > * m_barcode
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< std::vector< float > > * m_energy_vec
std::string m_path
the path being used
const_iterator end() const
return const_iterator for end of container
std::vector< uint8_t > * m_calLayer
const_iterator begin() const
return const_iterator for first entry
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Collection of CSC Raw Hits, arranged according to CSC Detector Elements Author: Ketevi A.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< uint16_t > * m_subID
index_type eventIndex() const
Return the event number of the referenced GenEvent.
std::vector< float > * m_energy
std::vector< bool > * m_calEn
std::vector< uint8_t > * m_calAmp
std::vector< uint16_t > * m_spuCt
virtual StatusCode initialize() override final
std::string m_ntupleDirName
std::vector< uint8_t > * m_dataType
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< float > * m_charge
std::vector< uint16_t > * m_rodID
std::vector< float > * m_ypos
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
std::string m_ntupleTreeName
std::vector< uint16_t > * m_cscID
std::vector< uint8_t > * m_firstBitSum
const std::vector< Deposit > & getdeposits() const
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Handle class for reading from StoreGate.
std::vector< int > * m_sdoWord
std::vector< uint16_t > * m_latency
SG::ReadHandleKey< CscRawDataContainer > m_inputKey
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
std::vector< bool > * m_neutron