40 #include "CLHEP/Random/RandomEngine.h" 46 #include "G4HCofThisEvent.hh" 47 #include "G4ProcessManager.hh" 48 #include "G4SDManager.hh" 51 #include "G4TransportationManager.hh" 52 #include "G4UserEventAction.hh" 53 #include "G4VProcess.hh" 68 produces<DigiCollectionFP420>().setBranchAlias(
alias);
94 std::cout <<
"Creating a DigitizerFP420" << std::endl;
95 std::cout <<
"DigitizerFP420: dn0=" <<
dn0 <<
" sn0=" <<
sn0 <<
" pn0=" <<
pn0 <<
" rn0=" <<
rn0 << std::endl;
103 std::cout <<
"Destroying a DigitizerFP420" << std::endl;
116 std::cout <<
" ============== DigitizerFP420: start produce= " << std::endl;
127 std::vector<const CrossingFrame<PSimHit> *> cf_simhitvec;
130 cf_simhitvec.push_back(cf_simhit.
product());
163 std::cout <<
" ============== DigitizerFP420: MixCollection treatment= " << std::endl;
168 for (isim = allTrackerHits->begin(); isim != allTrackerHits->end(); isim++) {
169 unsigned int unitID = (*isim).detUnitId();
170 int det,
zside, sector, zmodule;
182 double losenergy = (*isim).energyLoss();
184 std::cout <<
" ============== DigitizerFP420: losenergy= " << losenergy << std::endl;
185 std::cout <<
" === for intindex = " << intindex << std::endl;
197 std::cout <<
" ============== DigitizerFP420: put zero to container " << std::endl;
203 for (
int det = 1; det <
dn0; det++) {
204 for (
int sector = 1; sector <
sn0; sector++) {
205 for (
int zmodule = 1; zmodule <
pn0; zmodule++) {
232 std::cout <<
" ============== DigitizerFP420: start loop over det iu " << std::endl;
233 std::cout <<
" ============== DigitizerFP420: SimHitMap.size()= " <<
SimHitMap.size() << std::endl;
262 vector<PSimHit>::const_iterator simHitIter =
SimHitMap[
i].begin();
263 vector<PSimHit>::const_iterator simHitIterEnd =
SimHitMap[
i].end();
264 for (; simHitIter != simHitIterEnd; ++simHitIter) {
265 const PSimHit ihit = *simHitIter;
268 std::cout <<
" ====== DigitizerFP420: unitID= " << unitID <<
"Hit number i= " <<
i << std::endl;
269 int det,
zside, sector, zmodule;
274 std::cout <<
"for Hits iu = " << iu <<
" sector = " << sector <<
" zmodule = " << zmodule
275 <<
" zside = " <<
zside <<
" det=" << det << std::endl;
283 std::cout <<
" DigitizerFP420: index = " <<
index <<
" iu = " << iu << std::endl;
288 G4ThreeVector bfield(0., 0., 0.0);
293 std::cout <<
" ============== DigitizerFP420: call run for iu= " << iu << std::endl;
305 std::cout <<
"======= DigitizerFP420: collector size = " <<
collector.size() << std::endl;
320 std::cout <<
" ============= DigitizerFP420:collector " 321 "start!!!!!!!!!!!!!!" 332 unsigned int detID0 = 0;
333 output->put(outputRange, detID0);
338 output->put(outputRange, iu);
376 for (
int det = 1; det <
dn0; det++) {
377 for (
int sector = 1; sector <
sn0; sector++) {
378 for (
int zmodule = 1; zmodule <
pn0; zmodule++) {
383 std::cout <<
"****DigitizerFP420:check2" << std::endl;
388 int newdet, newzside, newsector, newzmodule;
390 std::cout <<
" newdet = " << newdet <<
" newsector = " << newsector <<
" newzmodule = " << newzmodule
391 <<
" newzside = " << newzside << std::endl;
396 outputRange =
output->get(iu);
404 for (; sort_begin != sort_end; ++sort_begin) {
411 std::cout <<
" iu = " << iu <<
" sector = " << sector <<
" zmodule = " << zmodule
412 <<
" zside = " <<
zside <<
" det=" << det <<
" layer = " <<
layer <<
" orient = " <<
orient 416 vector<HDigiFP420>::const_iterator simHitIter =
collector.begin();
417 vector<HDigiFP420>::const_iterator simHitIterEnd =
collector.end();
418 for (; simHitIter != simHitIterEnd; ++simHitIter) {
420 std::cout <<
" strip number=" << istrip.
strip() <<
" adc=" << istrip.
adc() << std::endl;
425 std::cout <<
" ===================================================" << std::endl;
441 std::cout <<
"DigitizerFP420 recoutput" << std::endl;
T getParameter(std::string const &) const
unsigned int detUnitId() const
FP420DigiMain * stripDigitizer_
std::vector< HDigiFP420 >::const_iterator ContainerIterator
T const * product() const
static void unpackFP420Index(const unsigned int &idx, int &det, int &zside, int &station, int &superplane)
static int unpackLayerIndex(int rn0, int zside)
void produce(edm::Event &e, const edm::EventSetup &c) override
std::vector< HDigiFP420 > collector
static void unpackMYIndex(const int &idx, int rn0, int pn0, int sn0, int &det, int &zside, int §or, int &zmodule)
constexpr std::array< uint8_t, layerIndexSize > layer
T getUntrackedParameter(std::string const &, T const &) const
std::vector< HDigiFP420 > run(const std::vector< PSimHit > &input, const G4ThreeVector &, unsigned int)
static unsigned packMYIndex(int rn0, int pn0, int sn0, int det, int zside, int sector, int zmodule)
~DigitizerFP420() override
static unsigned int packFP420Index(int det, int zside, int station, int superplane)
std::pair< ContainerIterator, ContainerIterator > Range
Namespace of DDCMS conversion namespace.
static int unpackOrientation(int rn0, int zside)
vstring trackerContainers