Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:15:37

0001 void analyze(int nevts=20,
0002          char *prdfname="/gpfs/mnt/gpfs02/sphenix/data/data01/t1044-2016a/cosmics/cosmics_00001858-0000.prdf",
0003          char *outfile = "signal.root")
0004 {
0005   gSystem->Load("/gpfs/mnt/gpfs02/sphenix/sim/sim01/sPHENIX/sunywrk/abhisek/HCAL/build/lib/libhcal.so");
0006   //IHCAL high gain channels
0007   int hbd_channels[] = {64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94};
0008 
0009   //IHCAL low gain channels
0010   //int hbd_channels[] = {65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95};
0011   
0012   //OHCAL high gain channels
0013   //int hbd_channels[] = {112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142};
0014 
0015    //OHCAL low gain channels
0016   //int hbd_channels[] = {113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143};
0017 
0018   int nch = sizeof(hbd_channels)/sizeof(int);
0019   hcal *hcaldet = new hcal();
0020   hcaldet->setPrdf(prdfname);
0021   hcaldet->SetCableMap(nch,hbd_channels);
0022   hcaldet->set_verbosity( false );
0023   hcaldet->set_display( true );
0024   hcaldet->set_positive_polarity( false );
0025   hcaldet->evLoop(nevts);
0026   hcaldet->Save(outfile);
0027 }
0028