Commit d98658b8 authored by Markus Kohler's avatar Markus Kohler Committed by Graeme Stewart
Browse files

more variables in sTGCDigitVariables (MuonPRDTest-01-01-04)

	* add more variables to sTGCDigitVariables
	* tagging MuonPRDTest-01-01-04

2015-04-27 Jochen Meyer
	* addressing coverity defect 14555
	* some clean-up
	* tagging MuonPRDTest-01-01-03

2015-02-11 Jochen Meyer
	* adding CSCDigitVariables (to be used via NSWPRDValAlg)
	* some clean-up
	* tagging MuonPRDTest-01-01-02

2015-02-10 Markus Koehler
	* filling sTGCDigitVariables.* with actual implementation
	* tagging MuonPRDTest-01-01-01

2015-02-08 Jochen Meyer
	* factorizing NSW component
	* tagging MuonPRDTest-01-01-00
...
(Long ChangeLog diff - truncated)
parent 9b759dd9
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef NSWPRDVALALG_H // Include guard
#define NSWPRDVALALG_H
#include "AthenaBaseComps/AthAlgorithm.h"
#include <vector>
class ITHistSvc;
class TTree;
class MmIdHelper;
class sTgcIdHelper;
namespace MuonGM {
class MuonDetectorManager;
}
class NSWPRDValAlg:public AthAlgorithm
{
public:
NSWPRDValAlg(const std::string& name, ISvcLocator* pSvcLocator); // Constructor
StatusCode initialize();
StatusCode finalize();
StatusCode execute();
private:
void initializeTruthVariables();
void clearTruthVariables();
StatusCode fillTruthVariables();
void deleteTruthVariables();
void initializeMuEntryVariables();
void clearMuEntryVariables();
StatusCode fillMuEntryVariables();
void deleteMuEntryVariables();
// sTGC hit validation
void initializeNSWsTGCHitVariables();
void clearNSWsTGCHitVariables();
StatusCode fillNSWsTGCHitVariables();
void deleteNSWsTGCHitVariables();
// sTGC fast digitization validation
void initializeNSWsTGCFastDigitVariables();
void clearNSWsTGCFastDigitVariables();
StatusCode fillNSWsTGCFastDigitVariables();
void deleteNSWsTGCFastDigitVariables();
// sTGC digitization validation
void initializeNSWsTGCDigitVariables();
void clearNSWsTGCDigitVariables();
StatusCode fillNSWsTGCDigitVariables();
void deleteNSWsTGCDigitVariables();
// MicroMegas hit validation
void initializeNSWMMHitVariables();
void clearNSWMMHitVariables();
StatusCode fillNSWMMHitVariables();
void deleteNSWMMHitVariables();
// MicroMegas fast digitization validation
void initializeNSWMMFastDigitVariables();
void clearNSWMMFastDigitVariables();
StatusCode fillNSWMMFastDigitVariables();
void deleteNSWMMFastDigitVariables();
// MicroMegas digitization validation
void initializeNSWMMDigitVariables();
void clearNSWMMDigitVariables();
StatusCode fillNSWMMDigitVariables();
void deleteNSWMMDigitVariables();
ITHistSvc *m_thistSvc;
TTree *m_tree;
const MuonGM::MuonDetectorManager* m_detManager;
const MmIdHelper* m_MmIdHelper;
const sTgcIdHelper* m_sTgcIdHelper;
BooleanProperty m_doTruth; // switch on the output of the MC truth
BooleanProperty m_doMuEntry; // switch on the output of the Muon Entry Layer
BooleanProperty m_doSTGCHit; // switch on the output of the Small TGC data
BooleanProperty m_doSTGCFastDigit; // switch on the output of the Small TGC fast digitization
BooleanProperty m_doSTGCDigit; // swicth on the output of the Small TGC digit
BooleanProperty m_doMMHit; // switch on the output of the MicroMegas data
BooleanProperty m_doMMFastDigit; // switch on the output of the MicroMegas fast digitization
BooleanProperty m_doMMDigit; // switch on the output of the MicroMegas digitization
unsigned int m_runNumber;
unsigned int m_eventNumber;
std::string m_Truth_ContainerName;
int m_Truth_nVertices;
std::vector<double> *m_Truth_vertexX;
std::vector<double> *m_Truth_vertexY;
std::vector<double> *m_Truth_vertexZ;
std::vector<double> *m_Truth_vertexT;
std::vector<int> *m_Truth_vertexId;
int m_Truth_nParticles;
std::vector<double> *m_Truth_particlePt;
std::vector<double> *m_Truth_particleEta;
std::vector<double> *m_Truth_particlePhi;
std::vector<double> *m_Truth_particleE;
std::vector<double> *m_Truth_particleM;
std::vector<int> *m_Truth_particlePdg_id;
std::vector<int> *m_Truth_particleStatus;
std::vector<int> *m_Truth_particleBarcode;
std::vector<int> *m_Truth_particleProduction_vertex_id;
std::vector<int> *m_Truth_particleEnd_vertex_id;
std::string m_MuEntry_ContainerName;
int m_MuEntry_nParticles;
std::vector<double> *m_MuEntry_particlePt;
std::vector<double> *m_MuEntry_particleEta;
std::vector<double> *m_MuEntry_particlePhi;
std::vector<int> *m_MuEntry_particlePdg_id;
std::vector<int> *m_MuEntry_particleBarcode;
std::vector<double> *m_MuEntry_positionEta;
std::vector<double> *m_MuEntry_positionPhi;
std::vector<double> *m_MuEntry_positionX;
std::vector<double> *m_MuEntry_positionY;
std::vector<double> *m_MuEntry_positionZ;
// sTGC variables for hit validation
std::string m_NSWsTGC_ContainerName;
int m_NSWsTGC_nSimHits;
std::vector<int> *m_NSWsTGC_trackId;
std::vector<int> *m_NSWsTGC_truthEl;
std::vector<double> *m_NSWsTGC_globalTime;
std::vector<double> *m_NSWsTGC_hitGlobalPositionX;
std::vector<double> *m_NSWsTGC_hitGlobalPositionY;
std::vector<double> *m_NSWsTGC_hitGlobalPositionZ;
std::vector<double> *m_NSWsTGC_hitGlobalPositionR;
std::vector<double> *m_NSWsTGC_hitGlobalPositionP;
std::vector<double> *m_NSWsTGC_hitGlobalDirectionX;
std::vector<double> *m_NSWsTGC_hitGlobalDirectionY;
std::vector<double> *m_NSWsTGC_hitGlobalDirectionZ;
std::vector<double> *m_NSWsTGC_hitLocalPositionX;
std::vector<double> *m_NSWsTGC_hitLocalPositionY;
std::vector<double> *m_NSWsTGC_hitLocalPositionZ;
std::vector<double> *m_NSWsTGC_detector_globalPositionX;
std::vector<double> *m_NSWsTGC_detector_globalPositionY;
std::vector<double> *m_NSWsTGC_detector_globalPositionZ;
std::vector<double> *m_NSWsTGC_detector_globalPositionR;
std::vector<double> *m_NSWsTGC_detector_globalPositionP;
std::vector<double> *m_NSWsTGC_hitToDsurfacePositionX;
std::vector<double> *m_NSWsTGC_hitToDsurfacePositionY;
std::vector<double> *m_NSWsTGC_hitToDsurfacePositionZ;
std::vector<double> *m_NSWsTGC_hitToRsurfacePositionX;
std::vector<double> *m_NSWsTGC_hitToRsurfacePositionY;
std::vector<double> *m_NSWsTGC_hitToRsurfacePositionZ;
std::vector<double> *m_NSWsTGC_FastDigitRsurfacePositionX;
std::vector<double> *m_NSWsTGC_FastDigitRsurfacePositionY;
std::vector<int> *m_NSWsTGC_particleEncoding;
std::vector<double> *m_NSWsTGC_kineticEnergy;
std::vector<double> *m_NSWsTGC_depositEnergy;
std::vector<double> *m_NSWsTGC_StepLength;
std::vector<std::string> *m_NSWsTGC_sim_stationName;
std::vector<int> *m_NSWsTGC_wedgeId; // large=0, small=1
std::vector<int> *m_NSWsTGC_wedgeType; // pivot 0, confirmation 1
std::vector<int> *m_NSWsTGC_detectorNumber; // [0-3]
std::vector<int> *m_NSWsTGC_sim_stationEta;
std::vector<int> *m_NSWsTGC_sim_stationPhi; // [1-16]
std::vector<int> *m_NSWsTGC_sim_multilayer; // [1-2]
std::vector<int> *m_NSWsTGC_sim_layer; // [1-4]
std::vector<int> *m_NSWsTGC_sim_side; // [1-4]
std::vector<int> *m_NSWsTGC_stripNumber; // 0 (small R to n-1
std::vector<int> *m_NSWsTGC_wireNumber; // wire groups 0-31 in increasing phi
std::vector<std::string> *m_NSWsTGC_off_stationName;
std::vector<int> *m_NSWsTGC_off_stationEta;
std::vector<int> *m_NSWsTGC_off_stationPhi;
std::vector<int> *m_NSWsTGC_off_multiplet;
std::vector<int> *m_NSWsTGC_off_gas_gap;
std::vector<int> *m_NSWsTGC_off_channel_type;
std::vector<int> *m_NSWsTGC_off_channel;
// sTGC variables for fast digitization validation
std::string m_NSWsTGC_FastDigitContainerName;
int m_NSWsTGC_nFastDigits;
std::vector<std::string> *m_NSWsTGC_fdg_stationName;
std::vector<int> *m_NSWsTGC_fdg_stationEta;
std::vector<int> *m_NSWsTGC_fdg_stationPhi;
std::vector<int> *m_NSWsTGC_fdg_multiplet;
std::vector<int> *m_NSWsTGC_fdg_gas_gap;
std::vector<int> *m_NSWsTGC_fdg_channel_type;
std::vector<int> *m_NSWsTGC_fdg_channel;
std::vector<double> *m_NSWsTGC_fdg_globalPosX;
std::vector<double> *m_NSWsTGC_fdg_globalPosY;
std::vector<double> *m_NSWsTGC_fdg_globalPosZ;
std::vector<double> *m_NSWsTGC_fdg_localPosX;
std::vector<double> *m_NSWsTGC_fdg_localPosY;
std::vector<double> *m_NSWsTGC_fdg_covMatrix_1_1;
std::vector<double> *m_NSWsTGC_fdg_covMatrix_2_2;
std::vector<int> *m_NSWsTGC_fdg_truth_barcode;
std::vector<double> *m_NSWsTGC_fdg_truth_hitOnSurfaceX;
std::vector<double> *m_NSWsTGC_fdg_truth_hitOnSurfaceY;
// sTGC variables for digitization validation
std::string m_NSWsTGC_DigitContainerName;
int m_NSWsTGC_nDigits;
std::vector<std::string> *m_NSWsTGC_dig_stationName;
std::vector<int> *m_NSWsTGC_dig_stationEta;
std::vector<int> *m_NSWsTGC_dig_stationPhi;
std::vector<int> *m_NSWsTGC_dig_multiplet;
std::vector<int> *m_NSWsTGC_dig_gas_gap;
std::vector<int> *m_NSWsTGC_dig_channel_type;
std::vector<int> *m_NSWsTGC_dig_channel;
// MicroMegas variables for hit validation
std::string m_NSWMM_ContainerName;
int m_NSWMM_nSimHits;
std::vector<int> *m_NSWMM_trackId;
std::vector<int> *m_NSWMM_truthEl;
std::vector<double> *m_NSWMM_globalTime;
std::vector<double> *m_NSWMM_hitGlobalPositionX;
std::vector<double> *m_NSWMM_hitGlobalPositionY;
std::vector<double> *m_NSWMM_hitGlobalPositionZ;
std::vector<double> *m_NSWMM_hitGlobalPositionR;
std::vector<double> *m_NSWMM_hitGlobalPositionP;
std::vector<double> *m_NSWMM_hitGlobalDirectionX;
std::vector<double> *m_NSWMM_hitGlobalDirectionY;
std::vector<double> *m_NSWMM_hitGlobalDirectionZ;
std::vector<double> *m_NSWMM_hitLocalPositionX;
std::vector<double> *m_NSWMM_hitLocalPositionY;
std::vector<double> *m_NSWMM_hitLocalPositionZ;
std::vector<double> *m_NSWMM_detector_globalPositionX;
std::vector<double> *m_NSWMM_detector_globalPositionY;
std::vector<double> *m_NSWMM_detector_globalPositionZ;
std::vector<double> *m_NSWMM_detector_globalPositionR;
std::vector<double> *m_NSWMM_detector_globalPositionP;
std::vector<double> *m_NSWMM_hitToDsurfacePositionX;
std::vector<double> *m_NSWMM_hitToDsurfacePositionY;
std::vector<double> *m_NSWMM_hitToDsurfacePositionZ;
std::vector<double> *m_NSWMM_hitToRsurfacePositionX;
std::vector<double> *m_NSWMM_hitToRsurfacePositionY;
std::vector<double> *m_NSWMM_hitToRsurfacePositionZ;
std::vector<double> *m_NSWMM_FastDigitRsurfacePositionX;
std::vector<double> *m_NSWMM_FastDigitRsurfacePositionY;
std::vector<int> *m_NSWMM_particleEncoding;
std::vector<double> *m_NSWMM_kineticEnergy;
std::vector<double> *m_NSWMM_depositEnergy;
std::vector<double> *m_NSWMM_StepLength;
std::vector<std::string> *m_NSWMM_sim_stationName;
std::vector<int> *m_NSWMM_sim_stationEta;
std::vector<int> *m_NSWMM_sim_stationPhi;
std::vector<int> *m_NSWMM_sim_multilayer;
std::vector<int> *m_NSWMM_sim_layer;
std::vector<int> *m_NSWMM_sim_side;
std::vector<std::string> *m_NSWMM_off_stationName;
std::vector<int> *m_NSWMM_off_stationEta;
std::vector<int> *m_NSWMM_off_stationPhi;
std::vector<int> *m_NSWMM_off_multiplet;
std::vector<int> *m_NSWMM_off_gas_gap;
std::vector<int> *m_NSWMM_off_channel;
// MicroMegas variables for fast digitization validation
std::string m_NSWMM_FastDigitContainerName;
int m_NSWMM_nFastDigits;
std::vector<std::string> *m_NSWMM_fdg_stationName;
std::vector<int> *m_NSWMM_fdg_stationEta;
std::vector<int> *m_NSWMM_fdg_stationPhi;
std::vector<int> *m_NSWMM_fdg_multiplet;
std::vector<int> *m_NSWMM_fdg_gas_gap;
std::vector<int> *m_NSWMM_fdg_channel;
std::vector<double> *m_NSWMM_fdg_globalPosX;
std::vector<double> *m_NSWMM_fdg_globalPosY;
std::vector<double> *m_NSWMM_fdg_globalPosZ;
std::vector<double> *m_NSWMM_fdg_localPosX;
std::vector<double> *m_NSWMM_fdg_localPosY;
std::vector<double> *m_NSWMM_fdg_covMatrix_1_1;
std::vector<int> *m_NSWMM_fdg_truth_barcode;
std::vector<double> *m_NSWMM_fdg_truth_hitOnSurfaceX;
std::vector<double> *m_NSWMM_fdg_truth_hitOnSurfaceY;
// MicroMegas variables for digitization validation
std::string m_NSWMM_DigitContainerName;
int m_NSWMM_nDigits;
std::vector<std::string> *m_NSWMM_dig_stationName;
std::vector<int> *m_NSWMM_dig_stationEta;
std::vector<int> *m_NSWMM_dig_stationPhi;
std::vector<int> *m_NSWMM_dig_multiplet;
std::vector<int> *m_NSWMM_dig_gas_gap;
std::vector<int> *m_NSWMM_dig_channel;
std::vector< std::vector<float> > *m_NSWMM_dig_time;
std::vector< std::vector<float> > *m_NSWMM_dig_charge;
std::vector< std::vector<int> > *m_NSWMM_dig_stripPosition;
std::vector< std::vector<double> > *m_NSWMM_dig_stripLposX;
std::vector< std::vector<double> > *m_NSWMM_dig_stripLposY;
std::vector< std::vector<double> > *m_NSWMM_dig_stripGposX;
std::vector< std::vector<double> > *m_NSWMM_dig_stripGposY;
std::vector< std::vector<double> > *m_NSWMM_dig_stripGposZ;
std::vector< std::vector<float> > *m_NSWMM_dig_sr_time;
std::vector< std::vector<float> > *m_NSWMM_dig_sr_charge;
std::vector< std::vector<int> > *m_NSWMM_dig_sr_stripPosition;
std::vector< std::vector<double> > *m_NSWMM_dig_sr_stripLposX;
std::vector< std::vector<double> > *m_NSWMM_dig_sr_stripLposY;
std::vector< std::vector<double> > *m_NSWMM_dig_sr_stripGposX;
std::vector< std::vector<double> > *m_NSWMM_dig_sr_stripGposY;
std::vector< std::vector<double> > *m_NSWMM_dig_sr_stripGposZ;
std::vector< int > *m_NSWMM_dig_truth_barcode;
std::vector< double > *m_NSWMM_dig_truth_localPosX;
std::vector< double > *m_NSWMM_dig_truth_localPosY;
std::vector< double > *m_NSWMM_dig_truth_globalPosX;
std::vector< double > *m_NSWMM_dig_truth_globalPosY;
std::vector< double > *m_NSWMM_dig_truth_globalPosZ;
std::vector< float > *m_NSWMM_dig_truth_XZ_angle;
std::vector<int> *m_NSWMM_dig_stripForTrigger;
std::vector<float> *m_NSWMM_dig_stripTimeForTrigger;
double m_energyThreshold;
};
#endif // NSWHITSDUMPALG_H
......@@ -9,38 +9,33 @@ public
use AtlasPolicy AtlasPolicy-*
use GaudiInterface GaudiInterface-* External
use AthenaBaseComps AthenaBaseComps-* Control
use MuonRIO_OnTrack MuonRIO_OnTrack-* MuonSpectrometer/MuonReconstruction/MuonRecEvent
use MuonRecToolInterfaces MuonRecToolInterfaces-* MuonSpectrometer/MuonReconstruction/MuonRecTools
use TrkExInterfaces TrkExInterfaces-* Tracking/TrkExtrapolation
use TrkParameters TrkParameters-* Tracking/TrkEvent
private
use AtlasCLHEP AtlasCLHEP-* External
use AtlasROOT AtlasROOT-* External
use AtlasHepMC AtlasHepMC-* External
use xAODEventInfo xAODEventInfo-* Event/xAOD
use AthenaKernel AthenaKernel-* Control
use AthenaBaseComps AthenaBaseComps-* Control
use xAODEventInfo xAODEventInfo-* Event/xAOD
use StoreGate StoreGate-* Control
use Identifier Identifier-* DetectorDescription
use GeneratorObjects GeneratorObjects-* Generators
use TrackRecord TrackRecord-* Simulation/G4Sim
use MuonRIO_OnTrack MuonRIO_OnTrack-* MuonSpectrometer/MuonReconstruction/MuonRecEvent
use MuonRecToolInterfaces MuonRecToolInterfaces-* MuonSpectrometer/MuonReconstruction/MuonRecTools
use MuonIdHelpers MuonIdHelpers-* MuonSpectrometer
use MuonDigitContainer MuonDigitContainer-* MuonSpectrometer
use MuonReadoutGeometry MuonReadoutGeometry-* MuonSpectrometer/MuonDetDescr
use MuonSimData MuonSimData-* MuonSpectrometer
use MuonSimEvent MuonSimEvent-* MuonSpectrometer
use MuonIdHelpers MuonIdHelpers-* MuonSpectrometer
use MuonSimData MuonSimData-* MuonSpectrometer
use MuonPrepRawData MuonPrepRawData-* MuonSpectrometer/MuonReconstruction/MuonRecEvent
use TrackRecord TrackRecord-* Simulation/G4Sim
use TrkExInterfaces TrkExInterfaces-* Tracking/TrkExtrapolation
use TrkParameters TrkParameters-* Tracking/TrkEvent
use TrkSurfaces TrkSurfaces-* Tracking/TrkDetDescr
use TrkGeometry TrkGeometry-* Tracking/TrkDetDescr
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#include "CSCDigitVariables.h"
#include "AthenaKernel/errorcheck.h"
#include "MuonSimData/CscSimDataCollection.h"
#include "MuonDigitContainer/CscDigitContainer.h"
#include "MuonDigitContainer/CscDigit.h"
#include "MuonReadoutGeometry/CscReadoutElement.h"
#include "TTree.h"
/** ---------- filling of variables */
/** ---------- to be called on each evt i.e. execute level of main alg */
StatusCode CSCDigitVariables::fillVariables()
{
ATH_MSG_DEBUG("do fillCSCDigitVariables()");
// clear variables
CHECK( this->clearVariables() );
// get truth information container of digitization
const CscSimDataCollection* csc_SdoContainer = nullptr;
CHECK( m_evtStore->retrieve(csc_SdoContainer, "CSC_SDO") );
// get digit container (a container corresponds to a multilayer of a module)
const CscDigitContainer *csc_DigitContainer = nullptr;
CHECK( m_evtStore->retrieve(csc_DigitContainer, m_ContainerName.c_str()) );
if(csc_DigitContainer->size()==0) ATH_MSG_WARNING(" CSC DigitContainer empty ");
// iteration on all containers, i.e. all multilayers of all modules
for(auto it : *csc_DigitContainer) {
// a digit collection is instanciated for each container, i.e. holds all digits of a multilayer
const CscDigitCollection* coll = it;
// loop on all digits inside a collection, i.e. multilayer
for (unsigned int item=0; item<coll->size(); item++) {
// get specific digit and identify it
const CscDigit* digit = coll->at(item);
Identifier Id = digit->identify();
std::string stName = m_CscIdHelper->stationNameString(m_CscIdHelper->stationName(Id));
int stationEta = m_CscIdHelper->stationEta(Id);
int stationPhi = m_CscIdHelper->stationPhi(Id);
int chlayer = m_CscIdHelper->chamberLayer(Id);
int wlayer = m_CscIdHelper->wireLayer(Id);
int gas_gap = m_CscIdHelper->gasGap(Id);
// channel here seems to be sth like the channel/strip closest to the initial Geant4 hit
// that is entering the digitzation process (probably only of limited use)
int channel = m_CscIdHelper->strip(Id);
ATH_MSG_DEBUG( "MicroMegas Digit Offline id: Station Name [" << stName << " ]"
<< " Station Eta [" << stationEta << "]"
<< " Station Phi [" << stationPhi << "]"
<< " ChamberLayer [" << chlayer << "]"
<< " wireLayer [" << wlayer << "]"
<< " GasGap [" << gas_gap << "]"
<< " ChNr [" << channel << "]" );
// module details down to the level of channel which is closest to the Geant4 hit
// to be stored in the ntuple
m_CSC_dig_stationName->push_back(stName);
m_CSC_dig_stationEta->push_back(stationEta);
m_CSC_dig_stationPhi->push_back(stationPhi);
m_CSC_dig_chlayer->push_back(chlayer);
m_CSC_dig_wlayer->push_back(wlayer);
m_CSC_dig_gas_gap->push_back(gas_gap);
m_CSC_dig_channel->push_back(channel);
const MuonGM::CscReadoutElement* rdoEl = m_detManager->getCscReadoutElement(Id);
// retrieve the MC truth associated with the digit (means the Geant4 hit information)
if (csc_SdoContainer) {
// search the truth container with the Id of the digit
const CscSimData csc_sdo = (csc_SdoContainer->find(Id))->second;
std::vector<CscSimData::Deposit> deposits;
// get the truth deposits
csc_sdo.deposits(deposits);
// use the information of the first deposit
int truth_barcode = deposits[0].first.barcode();
double truth_localPosX = deposits[0].second.zpos();
double truth_localPosY = deposits[0].second.ypos();
double truth_charge = deposits[0].second.charge();
// get global and local coordinates of this first deposit
Amg::Vector2D hit_on_surface(truth_localPosX, truth_localPosY);
Amg::Vector3D hit_gpos(0., 0., 0.);
rdoEl->surface(Id).localToGlobal(hit_on_surface, Amg::Vector3D(0., 0., 0.), hit_gpos);
ATH_MSG_DEBUG("CSC Digit, truth barcode=" << truth_barcode);
ATH_MSG_DEBUG("CSC Digit, truth localPosX=" << std::setw(9) << std::setprecision(2) << truth_localPosX
<< ", truth localPosY=" << std::setw(9) << std::setprecision(2) << truth_localPosY
<< ", truth charge=" << std::setw(8) << std::setprecision(5) << truth_charge);
// truth information like positions and barcode
// to be stored in the ntuple
m_CSC_dig_truth_barcode->push_back( truth_barcode );
m_CSC_dig_truth_localPosX->push_back( truth_localPosX );
m_CSC_dig_truth_localPosY->push_back( truth_localPosY );
m_CSC_dig_truth_globalPosX->push_back( hit_gpos[0] );
m_CSC_dig_truth_globalPosY->push_back( hit_gpos[1] );
m_CSC_dig_truth_globalPosZ->push_back( hit_gpos[2] );
m_CSC_dig_truth_charge->push_back( truth_charge );
}
// digit counter for the ntuple
m_CSC_nDigits++;
}
}
ATH_MSG_DEBUG("processed " << m_CSC_nDigits << " MicroMegas hits");
return StatusCode::SUCCESS;
}
/** ---------- clearing of variables */
/** ---------- to be called inside filling method before filling starts */
StatusCode CSCDigitVariables::clearVariables()
{
m_CSC_nDigits = 0;
// information of the module down to the channel closest to the initial G4 hit
// size of vector is m_CSC_nDigits
m_CSC_dig_stationName->clear();
m_CSC_dig_stationEta->clear();
m_CSC_dig_stationPhi->clear();
m_CSC_dig_chlayer->clear();
m_CSC_dig_wlayer->clear();
m_CSC_dig_gas_gap->clear();
m_CSC_dig_channel->clear();
// truth information of the (1st) Geant4 hit that caused this
// digit to be recorded (size is m_CSC_nDigits)
m_CSC_dig_truth_barcode->clear();
m_CSC_dig_truth_localPosX->clear();
m_CSC_dig_truth_localPosY->clear();
m_CSC_dig_truth_globalPosX->clear();
m_CSC_dig_truth_globalPosY->clear();
m_CSC_dig_truth_globalPosZ->clear();
m_CSC_dig_truth_charge->clear();
return StatusCode::SUCCESS;
}
/** ---------- creating variables and associate them to branches */
/** ---------- to be called on initialization level of main alg */
StatusCode CSCDigitVariables::initializeVariables()
{
m_CSC_nDigits = 0;