20#include <TGeoManager.h>
32MdcROOTGeo::m_kReplica[m_kLayer] = { 40, 44, 48, 56, 64, 72, 80, 80,
33 76, 76, 88, 88, 100, 100, 112, 112, 128, 128, 140, 140,
34 160, 160, 160, 160, 176, 176, 176, 176, 208, 208, 208, 208, 240, 240, 240, 240,
35 256, 256, 256, 256, 256, 256, 256, 256,
36 288, 288, 288, 288, 288, 288
40MdcROOTGeo::m_kStereoDir[m_kTrueLayer] = { 1, 1, 1, 1, -1, -1, -1, -1,
41 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
42 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1,
46MdcROOTGeo::m_kiCorrectLayer[m_kCorrectLayer] = {9, 11, 13, 15, 17, 19, 36, 38, 40, 42};
49MdcROOTGeo::m_kiCorrectReplica[m_kCorrectLayer] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
59 m_twistedTubsColor = 63;
64 if (cgem_flag) m_StartLayer = 8;
65 else m_StartLayer = 0;
69 k_QNotOverflow = kFALSE;
72 for (
int layer = 0; layer < m_kLayer; layer++) {
73 m_NodeLayer[layer] = 0;
74 for (
int replica = 0; replica < m_kReplicaMax; replica++) {
75 m_NodeReplica[layer][replica] = 0;
77 m_PhysicalReplica[layer][replica].set(0);
81 for (
int i = 0; i < m_kCorrectLayer; i++) {
82 m_CorrectMap[m_kiCorrectLayer[i]] = m_kiCorrectReplica[i];
85 for (
int layer = 0; layer < m_kTrueLayer; layer++) {
86 for (
int replica = 0; replica < m_kReplicaMax; replica++) {
87 m_Mdc2DWire[layer][replica] = 0;
95 cout <<
"delete old MdcROOTGeo" << endl;
96 for (Int_t layer = 0; layer < m_kTrueLayer; ++layer)
99 for (Int_t replica = 0; replica < m_kReplica[simuLayer]; ++replica)
101 delete m_Mdc2DWire[layer][replica];
129 cout <<
"MdcROOTGeo::Init2DGeometry, ROOT Geometry not Initialized yet!" << endl;
135 Int_t mdcLineColor = 15;
136 Int_t mdcXYStyle = 1001;
137 Int_t mdcZRStyle = 1001;
138 Int_t mdcStereoSuperColor = 38;
139 Int_t mdcAxialSuperColor = 4;
141 Double_t local[3] = {0.0, 0.0, 0.0};
142 Double_t master[3] = {0.0, 0.0, 0.0};
144 Double_t
P[306] = {0.0};
145 Double_t center[3] = {0.0, 0.0, 0.0};
150 TGeoTube *mdcShape = (TGeoTube*)
GetVolumeMdc()->GetShape();
152 Double_t rmin = mdcShape->GetRmin();
153 if (m_StartLayer > 0)
155 TGeoTube *mdcShapeOuter = (TGeoTube*)(
GetLayer(m_StartLayer)->GetVolume())->GetShape();
156 rmin = mdcShapeOuter->GetRmin();
159 m_MdcXY =
new BesCircle2D(
"Mdc",
"Mdc", rmin, mdcShape->GetRmax(), ¢er[0]);
161 m_MdcXY->SetFillColor(mdcColor);
162 m_MdcXY->SetFillStyle(mdcXYStyle);
163 m_MdcXY->SetLineColor(mdcLineColor);
188 for (Int_t layer = m_StartLayer; layer < m_kTrueLayer; layer++) {
190 for (
int replica = 0; replica < m_kReplica[simuLayer]; replica++) {
193 name = TString(
"Mdc Layer ");
198 if (m_kStereoDir[layer] != 0) {
199 TGeoArb8 *wireShape = (TGeoArb8*)wirePhyNode->GetShape();
200 Double_t *localArb8Point, masterArb8Point[24];
201 localArb8Point = wireShape->GetVertices();
202 for (Int_t i = 0; i < 8; i++) {
203 local[0] = localArb8Point[2*i];
204 local[1] = localArb8Point[2*i+1];
205 if (i < 4) local[2] = wireShape->GetDz() * (-1.0);
206 else local[2] = wireShape->GetDz();
208 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel())
209 ->LocalToMaster(local, &master[0]);
210 for (Int_t j = 0; j < 3; j++) {
211 masterArb8Point[3*i+j] = master[j];
215 m_Mdc2DWire[layer][replica] =
new Mdc2DWire(name, name, 8, &masterArb8Point[0]);
220 TGeoTubeSeg *wireShape = (TGeoTubeSeg*)wirePhyNode->GetShape();
222 Double_t centerR = 0.5*(wireShape->GetRmin() + wireShape->GetRmax());
223 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut)
224 centerR = wireShape->GetRmax();
226 0.5*(wireShape->GetPhi1() + wireShape->GetPhi2()) * TMath::DegToRad();
227 local[0] = centerR *
cos(centerPhi);
228 local[1] = centerR *
sin(centerPhi);
230 wirePhyNode->GetMatrix(-1*wirePhyNode->GetLevel())
231 ->LocalToMaster(local, &master[0]);
233 Double_t rmin = wireShape->GetRmin();
234 Double_t rmax = wireShape->GetRmax();
235 if (layer >= m_kStereoLayerIn+m_kAxialLayerIn+m_kStereoLayerOut)
236 rmax = rmin + 2*(rmax-rmin);
237 m_Mdc2DWire[layer][replica] =
238 new Mdc2DWire( name, name, rmin, rmax, wireShape->GetDz(),centerPhi, &master[0] );
246 TGeoTube *aMdcLayer = 0;
249 for (Int_t layer = m_StartLayer; layer < m_kLayer; layer++) {
250 aMdcLayer = (TGeoTube*)
GetLayer(layer)->GetVolume()->GetShape();
252 P[3*iPoint+1] = aMdcLayer->GetRmin();
253 P[3*iPoint+2] = aMdcLayer->GetDz();
258 P[3*iPoint+1] = aMdcLayer->GetRmax();
259 P[3*iPoint+2] = aMdcLayer->GetDz();
262 P[3*iPoint+1] = aMdcLayer->GetRmax();
263 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0);
266 for (Int_t layer = m_kLayer-1; layer >= m_StartLayer; layer--) {
267 aMdcLayer = (TGeoTube*)
GetLayer(layer)->GetVolume()->GetShape();
269 P[3*iPoint+1] = aMdcLayer->GetRmin();
270 P[3*iPoint+2] = aMdcLayer->GetDz() * (-1.0);
275 m_MdcZR[0] =
new BesPolygon2D(
"MdcZRUp",
"MdcZRUp", iPoint, &
P[0]);
277 for (Int_t i = 0; i < iPoint; i++)
280 m_MdcZR[1] =
new BesPolygon2D(
"MdcZRDown",
"MdcZRDown", iPoint, &
P[0]);
282 for (Int_t i = 0; i < 2; i++) {
283 m_MdcZR[i]->SetFillColor(mdcColor);
284 m_MdcZR[i]->SetFillStyle(mdcZRStyle);
285 m_MdcZR[i]->SetLineColor(mdcLineColor);
294 Int_t nDaughters =
m_TopVolume->GetNodes()->GetEntries();
295 cout <<
"logicalMdc contains " << nDaughters <<
" nodes : " << endl;
296 for (Int_t i = 0; i < nDaughters; i++) {
297 cout << i <<
" : " <<
m_TopVolume->GetNode(i)->GetName() << endl;
303 if (!m_Mdc) std::cout <<
"m_Mdc = 0" << std::endl;
306 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
308 for (
int replica = 0; replica < m_kReplica[layer]; replica++) {
309 std::stringstream osname;
311 if (layer >= 0 && layer < m_kStereoLayerIn) {
313 osname <<
"pv_" <<
"logical" <<
"Mdc" <<
"Stereo" <<
"Layer" << layer <<
"Cell" <<
"_" << rep;
315 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
318 osname <<
"pv_" <<
"logical" <<
"Mdc" <<
"Axial" <<
"Layer" << layer <<
"Cell" <<
"_" << rep;
320 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
321 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
323 osname <<
"pv_" <<
"logical" <<
"Mdc" <<
"Stereo" <<
"Layer" << layer <<
"Cell" <<
"_" << rep;
325 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut && layer < m_kLayer) {
327 Int_t nBeforeAxialLayerOut = m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut;
328 Int_t iTrueLayer = nBeforeAxialLayerOut + (layer - nBeforeAxialLayerOut)/2;
331 osname <<
"pv_" <<
"logical" <<
"Mdc" <<
"Axial" <<
"Layer" << iTrueLayer <<
"_0" <<
"Cell" <<
"_" << rep;
335 osname <<
"pv_" <<
"logical" <<
"Mdc" <<
"Axial" <<
"Layer" << iTrueLayer <<
"_1" <<
"Cell" <<
"_" << rep;
339 m_NodeReplica[layer][replica] =
GetNode( osname.str() );
346 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
350 TGeoNode *nodeLayer = m_Mdc->GetNode(layer);
351 m_NodeLayer[layer] = nodeLayer;
354 Int_t nDaughters = nodeLayer->GetVolume()->GetNodes()->GetEntries();
362 for (
int replica = 0; replica < m_kReplica[layer]; replica++) {
363 m_NodeReplica[layer][replica] = nodeLayer->GetVolume()->GetNode(replica);
376 for (intMap::iterator
iter = m_CorrectMap.begin();
iter != m_CorrectMap.end();
iter++) {
377 if (layer == (*iter).first ||
378 (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut &&
379 layer - m_kAxialLayerOut == (*iter).first)) {
380 rep -= (*iter).second;
381 if (rep < 0) rep += m_kReplica[layer];
393 m_Mdc->SetLineColor(m_MdcColor);
394 m_Mdc->SetVisibility(0);
396 for (
int segment = 1; segment <= m_kSegment; segment++) {
403 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
404 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
405 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
406 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) {
418 for (
int segment = 1; segment <= m_kSegment; segment++) {
419 for (
int no = 0; no < 2; no++) {
425 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
427 for (
int replica = 0; replica < m_kReplica[layer]; replica++) {
439 m_Mdc->SetLineColor(m_MdcColor);
440 m_Mdc->SetVisibility(0);
442 for (
int segment = 1; segment <= m_kSegment; segment++) {
449 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
450 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
451 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
452 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) {
464 for (
int segment = 1; segment <= m_kSegment; segment++) {
465 for (
int no = 0; no < 2; no++) {
471 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
473 for (
int replica = 0; replica < m_kReplica[layer]; replica++) {
485 for (
int segment = 1; segment <= m_kSegment; segment++) {
490 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
495 for (
int segment = 1; segment <= m_kSegment; segment++) {
496 for (
int no = 0; no < 2; no++) {
502 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
504 for (
int replica = 0; replica < m_kReplica[layer]; replica++) {
505 if (replica < m_kReplica[layer]/4)
GetReplica(layer, replica)->SetVisibility(0);
506 else GetReplica(layer, replica)->SetVisibility(1);
514 for (
int segment = 1; segment <= m_kSegment; segment++) {
519 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
524 for (
int segment = 1; segment <= m_kSegment; segment++) {
525 for (
int no = 0; no < 2; no++) {
531 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
533 for (
int replica = 0; replica < m_kReplica[layer]; replica++) {
534 if (replica < m_kReplica[layer]/4 ||
535 replica > m_kReplica[layer]*3/4 )
GetReplica(layer, replica)->SetVisibility(1);
536 else GetReplica(layer, replica)->SetVisibility(0);
544 if (gGeoManager == 0) std::cout <<
"Create gGeoManager first" << std::endl;
545 TGeoNode *
bes = gGeoManager->GetTopNode();
546 TGeoNode *nodeMdc =
bes->GetVolume()->GetNode(
m_childNo);
549 if (!m_Mdc) std::cout <<
"m_Mdc = 0" << std::endl;
551 for (
int segment = 0; segment < 2*m_kSegment-2; segment++) {
552 m_PhysicalSegment[segment] = gGeoManager->MakePhysicalNode( TString(
"/") +
bes->GetName() +
553 TString(
"/") + nodeMdc->GetName() +
554 TString(
"/") + m_Mdc->GetNode((m_kLayer + 2*m_kSegment - 2 - 1) - segment)->GetName() );
555 m_PhysicalSegment[segment]->SetVisibility(0);
556 m_PhysicalSegment[segment]->SetIsVolAtt(kFALSE);
557 m_PhysicalSegment[segment]->SetLineColor(m_segmentColor);
562 for (
int layer = m_StartLayer; layer < m_kLayer; layer++) {
563 TGeoNode *nodeLayer =
GetLayer(layer);
565 for (
int replica = 0; replica < m_kReplica[layer]; replica++) {
566 TGeoNode *nodeReplica =
GetReplica(layer, replica);
569 m_PhysicalReplica[layer][replica] = gGeoManager->MakePhysicalNode( TString(
"/") +
bes->GetName() +
570 TString(
"/") + nodeMdc->GetName() +
571 TString(
"/") + nodeLayer->GetName() +
572 TString(
"/") + nodeReplica->GetName() );
573 m_PhysicalReplica[layer][replica]->SetVisibility(0);
574 m_PhysicalReplica[layer][replica]->SetIsVolAtt(kFALSE);
575 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
576 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
577 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) ) {
578 m_PhysicalReplica[layer][replica]->SetLineColor(m_twistedTubsColor);
581 m_PhysicalReplica[layer][replica]->SetLineColor(m_replicaColor);
609 for (
int layer = m_StartLayer; layer < m_kLayer; layer++)
611 if ( (layer >= 0 && layer < m_kStereoLayerIn) ||
612 (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
613 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) )
615 for (
int replica = 0; replica < m_kReplica[layer]; replica++)
620 for (
int replica = 0; replica < m_kReplica[layer]; replica++)
632 if (gPad) view =
dynamic_cast<BesView*
>(gPad->GetView());
636 for (
int segment = 0; segment < 2*m_kSegment-2; segment++) {
637 TGeoPhysicalNode *phyNode = 0;
638 phyNode = m_PhysicalSegment[segment];
641 phyNode->SetVisibility(0);
642 if ( (segment >= 2 && segment <= 3) || segment > 59) {
684 for (
int i = 0; i <
m_HitsArray->GetEntries(); i++)
687 (*PphyNode)->SetVisibility(0);
695 aWire->
AddInfo(aWire->GetTitle());
715 if (m_MdcDigiCol) NDigiCol = m_MdcDigiCol->GetEntries();
719 for (
int i = 0; i < NDigiCol; i++) {
733 phyNode = &m_PhysicalReplica[layer][wire];
742 phyNode = &m_PhysicalReplica[
GetSimuLayer(layer)][wire];
748 phyNode = &m_PhysicalReplica[
GetSimuLayer(layer) + 1][wire];
756 aWire = m_Mdc2DWire[layer][wire];
759 aWire->
AddInfo(aWire->GetTitle());
764 sprintf(
data,
"NO time");
766 sprintf(
data,
"time=%-.1f ns",
time);
767 if(fabs(evTime)>0.0001){
768 sprintf(
data,
"%s, Tdrift(Raw)=%-.1f ns",
data,
time - evTime +230);
772 sprintf(
data,
"%s, NO charge",
data);
774 sprintf(
data,
"%s, charge=%d",
data,charge);
777 sprintf(
data,
"Fired");
800 if (gPad) view =
dynamic_cast<BesView*
>(gPad->GetView());
805 phyNode->SetVisibility(1);
808 phyNode->SetVisibility(0);
816 if (gPad) view =
dynamic_cast<BesView*
>(gPad->GetView());
818 for (
int i = 0; i <
m_HitsArray->GetEntries(); i++)
827 (*PphyNode)->SetVisibility(0);
829 (*PphyNode)->SetVisibility(1);
831 else (*PphyNode)->SetVisibility(0);
849 k_QNotOverflow = input;
861 k_ColorfulWire = input;
866 k_MdcTimeSubEvTime = input;
872 std::stringstream osname;
873 osname <<
"logical" <<
"Mdc" <<
"Segment" << segment;
880 std::stringstream osname;
881 if (layer >= 0 && layer < m_kStereoLayerIn) {
882 osname <<
"logical" <<
"Mdc" <<
"Stereo" <<
"Layer" << layer;
884 else if (layer >= m_kStereoLayerIn && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
885 osname <<
"logical" <<
"Mdc" <<
"Axial" <<
"Layer" << layer;
887 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
888 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
889 osname <<
"logical" <<
"Mdc" <<
"Stereo" <<
"Layer" << layer;
891 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut &&
892 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) {
893 osname <<
"logical" <<
"Mdc" <<
"Axial" <<
"Layer" << layer <<
"_0";
895 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut &&
897 osname <<
"logical" <<
"Mdc" <<
"Axial" <<
"Layer" << layer - m_kAxialLayerOut <<
"_1";
906 std::stringstream osname;
907 if (layer >= 0 && layer < m_kStereoLayerIn) {
908 osname <<
"logical" <<
"Mdc" <<
"Stereo" <<
"Layer" << layer <<
"Cell";
910 else if (layer >= m_kStereoLayerIn
911 && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
912 osname <<
"logical" <<
"Mdc" <<
"Axial" <<
"Layer" << layer <<
"Cell";
914 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
915 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
916 osname <<
"logical" <<
"Mdc" <<
"Stereo" <<
"Layer" << layer <<
"Cell";
918 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut &&
919 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut) {
920 osname <<
"logical" <<
"Mdc"
921 <<
"Axial" <<
"Layer" << layer <<
"_0" <<
"Cell";
923 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut + m_kAxialLayerOut
924 && layer < m_kLayer) {
925 osname <<
"logical" <<
"Mdc"
926 <<
"Axial" <<
"Layer" << layer - m_kAxialLayerOut
936 std::stringstream osname;
937 if (segment == 1 || segment == 2) {
938 osname <<
"pv_" <<
"logical" <<
"Mdc"
939 <<
"Segment" << segment <<
"_"
940 << m_kSegmentNodeOffset - (segment - 1);
944 osname <<
"pv_" <<
"logical" <<
"Mdc"
945 <<
"Segment" << segment <<
"_"
946 << m_kSegmentNodeOffset - m_kSegmentBr - 2*(segment - 1 - m_kSegmentBr) - no;
950 return GetNode( osname.str() );
958 std::stringstream osname;
959 if (layer >= 0 && layer < m_kStereoLayerIn) {
960 osname <<
"pv_" <<
"logical" <<
"Mdc"
961 <<
"Stereo" <<
"Layer" << layer <<
"_" << layer;
963 else if (layer >= m_kStereoLayerIn
964 && layer < m_kStereoLayerIn + m_kAxialLayerIn) {
965 osname <<
"pv_" <<
"logical" <<
"Mdc"
966 <<
"Axial" <<
"Layer" << layer <<
"_" << layer;
968 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn &&
969 layer < m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut) {
970 osname <<
"pv_" <<
"logical" <<
"Mdc"
971 <<
"Stereo" <<
"Layer" << layer <<
"_" << layer;
973 else if (layer >= m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut
974 && layer < m_kLayer) {
975 Int_t nBeforeAxialLayerOut =
976 m_kStereoLayerIn + m_kAxialLayerIn + m_kStereoLayerOut;
978 nBeforeAxialLayerOut + (layer - nBeforeAxialLayerOut)/2;
980 osname <<
"pv_" <<
"logical" <<
"Mdc"
981 <<
"Axial" <<
"Layer" << iTrueLayer <<
"_0" <<
"_" << layer;
984 osname <<
"pv_" <<
"logical" <<
"Mdc"
985 <<
"Axial" <<
"Layer" << iTrueLayer <<
"_1" <<
"_" << layer;
990 return GetNode( osname.str() );
993 if (m_NodeLayer[layer] != 0) {
994 return m_NodeLayer[layer];
1008 if (m_NodeReplica[layer][replica] != 0) {
1010 return m_NodeReplica[layer][replica];
1021 if (m_PhysicalSegment[segment] != 0) {
1022 return m_PhysicalSegment[segment];
1034 if (m_PhysicalReplica[layer][replica]) {
1035 return m_PhysicalReplica[layer][replica].get();
1046 if (m_Mdc2DWire[layer][wire])
return m_Mdc2DWire[layer][wire];
1053 if (trueLayer < 36 || trueLayer >= m_kTrueLayer)
return trueLayer;
1054 if (trueLayer >= 36)
return (36 + 2*(trueLayer-36));
1062 for (
int i = 0; i < m_MdcDigiCol->GetEntries(); i++) {
1076 TString opt = option;
1079 if (!
m_2DGeoInit) cout <<
"MdcROOTGeo::Draw2D(), 2D Geometry not initialized!" << endl;
1081 if (!view) cout <<
"MdcROOTGeo::Draw(), BesView not found" << endl;
1084 if (opt.Contains(
"XY")) {
1092 if (opt.Contains(
"ZR")) {
1093 for (Int_t i = 0; i < 2; i++) {
1095 m_MdcZR[i]->
Draw(
"");
1103 Int_t replicaDraw = 0;
1105 for (Int_t layer = m_StartLayer; layer < m_kTrueLayer; layer++) {
1107 for (
int replica = 0; replica < m_kReplica[simuLayer]; replica++) {
1108 if (m_kStereoDir[layer] == -1) replicaDraw = replica;
1109 else if (m_kStereoDir[layer] == 1) replicaDraw = m_kReplica[simuLayer]-1 - replica;
1110 else replicaDraw = replica;
1112 if (m_Mdc2DWire[layer][replicaDraw]) {
1115 m_Mdc2DWire[layer][replicaDraw]->
SetFired(
false);
1116 m_Mdc2DWire[layer][replicaDraw]->
Draw(wireOpt);
1128 if (!view) cout <<
"MdcROOTGeo::DrawHits(), BesView not found" << endl;
1135 TString wireOpt(
"");
1153 aWire->
Draw(wireOpt);
double sin(const BesAngle a)
double cos(const BesAngle a)
R__EXTERN BesEvent * gEvent
double P(RecMdcKalTrack *trk)
virtual void SetNSegment(Int_t np)
virtual void Draw(Option_t *option="")
BesEventHeader GetHeader()
const TObjArray * GetMdcDigiCol() const
void SetRotatable(Bool_t input)
virtual void Draw(Option_t *option="")
Bool_t GetVisMdcHitsGlobal()
void SetChargeChannel(UInt_t cc)
UInt_t GetTimeChannel() const
void SetQOverflow(Bool_t qOvfl)
void SetTime(Double_t time)
virtual void AddInfo(TString info)
void SetColorfulWire(Bool_t colorfulWire, Bool_t subEvTime)
void SetEvTime(Double_t time)
void SetTimeChannel(UInt_t tc)
virtual void Draw(Option_t *option="")
Bool_t GetQOverflow() const
UInt_t GetChargeChannel() const
virtual void SetFired(bool status=true)
void SetCharge(Double_t charge)
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
static int wire(const Identifier &id)
Bool_t getQOverflow() const
UInt_t getTimeChannel() const
void setQOverflow(Bool_t sqof)
void setTimeChannel(UInt_t stc)
void setChargeChannel(UInt_t scc)
UInt_t getChargeChannel() const
TGeoNode * GetSegment(int segment, int no)
Get segment node;.
void SetTFire(Bool_t input)
int CorrectReplica(int layer, int replica)
Correct some axial layer id to copyNo;.
void SetVolumeDefaultVis()
Set default visual attributes;.
TGeoVolume * GetVolumeLayer(int layer)
Get layer volume;
TGeoPhysicalNode * GetPhysicalSegment(int segment)
Get segment physical node;.
void SetQuarterVisible()
Set quater visible;.
void SetNode()
Set the pointers to theirs nodes;.
void SetMdcTimeSubEvTime(Bool_t input)
TGeoNode * GetLayer(int layer)
Get layer node;
void SetQFire(Bool_t input)
void SetQNotOverflow(Bool_t input)
void DrawHits(Option_t *option)
Draw 2D hits.
void SetColorfulWire(Bool_t input)
void InitFromROOT(TGeoVolume *vol)
Initialize ROOTGeo from TGeoVolume logicalMdc.
void Init2DGeometry()
Initialize 2D Geometry.
TGeoNode * GetReplica(int layer, int replica)
Get replica node;.
TGeoVolume * GetVolumeReplica(int layer)
Get replica volume;.
TGeoVolume * GetVolumeSegment(int segment)
Get segment volume;.
void Draw(Option_t *option)
Draw function.
void SetVisMdcHits()
Set Mdc hits visibility;.
void ClearHits()
Set all physicalNodes corresponding to digiCol;.
void SetVisMdcDetector()
Set Mdc default detector visibility;.
Int_t GetSimuLayer(Int_t trueLayer)
Trans trueLayer to simuLayer (0~42)->(0~49)
Mdc2DWire * Get2DWire(Int_t layer, Int_t replica)
Get Mdc2DWire;.
void SetVolumeMdc(TGeoVolume *vol)
Set Mdc volume, while initializing from ROOT;.
void SetHalfVisible()
Set half visible;.
TGeoPhysicalNode * GetPhysicalReplica(int layer, int replica)
Get replica physical node;.
void SetPhysicalDefaultVis()
Set default physical node attributes;.
void SetPhysicalNode()
Set the pointers to the physical nodes;.
void SetAllVisible()
Set all visible;.
TGeoVolume * GetVolumeMdc()
Get Mdc volume;.
Bool_t IsHit(Int_t layer, Int_t wire)
Judge whether the digiCol contains (layer, wire)
void SetDetector()
Draw Detecor (what is detector depends on you)
void InitFromGDML(const char *gdmlFile, const char *setupName)
Initialize ROOTGeo from GDML.
static double MdcTime(int timeChannel)
static double MdcCharge(int chargeChannel)
TGeoNode * GetNode(const std::string &nn)
Get a node(physical volume) by name;.
TGeoVolume * GetTopVolume()
Get the top(world) volume;.
TGeoVolume * GetLogicalVolume(const std::string &vn)
Get a logical volume by name;.
void ReadGdml(const char *gdmlFile, const char *setupName)
Initialize the instance of ROOTGeo.
TObjArray * m_DetectorsArray
TObjArray * m_2DHitsArray
UInt_t getOverflow() const
UInt_t getChargeChannel() const
UInt_t getTimeChannel() const